Browse Source

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/konggang-city-miniprogram

Jing-Jiu 4 years ago
parent
commit
009faa6ab7

+ 1 - 0
App.vue

@@ -59,6 +59,7 @@ export default {
 	  				getApp().globalData.open_id = res.data.data.openid;
 					getApp().globalData.user_status = res.data.data.status;
 					getApp().globalData.user_phone = res.data.data.phone;
+					uni.hideLoading()
 	  			}
 	  		},
 	  		fail: () => {

+ 2 - 1
components/artical-deatil/index.vue

@@ -55,7 +55,8 @@ export default {
   },
   methods: {
     sharePage() {
-		let that = this;
+    let that = this;
+    console.log('点击分享');
       uni.showShareMenu({
         title: this.model.title,
         path:

+ 14 - 10
components/footer-share/footer-share.vue

@@ -20,7 +20,11 @@
     >
       <view style="margin-right: 15rpx; font-size: 26rpx">收藏</view>
       <image
-        :src="isCollectedIcon ? '../../static/collected.png' : '../../static/collection.png'"
+        :src="
+          isCollectedIcon
+            ? '../../static/collected.png'
+            : '../../static/collection.png'
+        "
         mode="aspectFill"
         style="width: 40rpx; height: 40rpx"
       ></image>
@@ -36,10 +40,10 @@ export default {
       type: Boolean,
       default: false,
     },
-	isCollectedIcon: {
-	  type: Boolean,
-	  default: false,
-	},
+    isCollectedIcon: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {};
@@ -57,19 +61,19 @@ export default {
 
 <style>
 .footer-share-box {
-  height: 50rpx;
+  box-sizing: border-box;
+  height: 70rpx;
   position: fixed;
   bottom: 0;
-  width: 98%;
+  width: 100%;
   border-radius: 10rpx;
   box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
   padding: 20rpx;
   background: #fff;
-  margin-left: -20rpx;
-
+  left: 0;
 }
 .share-font {
-  width: 45%;
+  width: 50%;
   justify-content: center;
 }
 .footer-share-box button {

+ 4 - 6
pages/activity/activity_deatil.vue

@@ -225,10 +225,8 @@ export default {
             this.model.type = data.type;
             this.model.status = data.status;
             this.model.way = data.sponsor;
-            // this.model.max_person = data.max_person;
-            // this.model.person_count = data.person_count;
-                    this.model.max_person = 1;
-            this.model.person_count = 2;
+            this.model.max_person = data.max_person;
+            this.model.person_count = data.person_count;
             this.model.share =
               parseInt(data.real_repost_count) +
               parseInt(data.base_repost_count);
@@ -288,10 +286,10 @@ export default {
       if (this.model.person_count >= this.model.max_person) {
         uni.showToast({
           title: "报名人数已上限",
-          icon:'error',
+          icon: "error",
           duration: 2000,
         });
-        return
+        return;
       }
       console.log(status);
       let that = this;

+ 4 - 1
pages/activity/index.vue

@@ -143,7 +143,10 @@ export default {
     };
   },
   onLoad() {
-    this.getActive();
+    
+  },
+  onShow() {
+  	this.getActive();
   },
   methods: {
     bindPickerChange(e, op) {

+ 25 - 13
pages/enterprise/enterprise_detail.vue

@@ -2,10 +2,14 @@
   <view class="content" :class="{ 'margin-bottom-80': isMar }" v-if="isShow">
     <view class="title">
       <view class="logo">
-        <image :src="'https://kiq.xazhima.com' + info.pic_url" alt=""  mode="aspectFit"></image>
+        <image
+          :src="'https://kiq.xazhima.com' + info.pic_url"
+          alt=""
+          mode="aspectFit"
+        ></image>
       </view>
       <view class="name">
-        {{ info.name || '-'}}
+        {{ info.name || "-" }}
       </view>
     </view>
     <view class="enterprise-item-box">
@@ -16,7 +20,7 @@
         class="enterprise-item-name"
         @click="change(idx)"
       >
-        {{ item || '-'}}
+        {{ item || "-" }}
       </view>
     </view>
 
@@ -33,7 +37,7 @@
               :class="{ blue: item.name == '电话' }"
               @click="callphone"
             >
-              {{ value || '-'}}
+              {{ value || "-" }}
             </p>
           </view>
           <view
@@ -47,9 +51,10 @@
           >
             <view class="flex_i">
               <view>
-                {{ item.value[0] || '-'}}
+                {{ item.value[0] || "-" }}
               </view>
-              <view v-if="item.value[0]"
+              <view
+                v-if="item.value[0]"
                 class="copy"
                 @click="copy(item.value[0])"
                 style="color: #02a7f0; margin-left: 15rpx"
@@ -69,9 +74,16 @@
           :key="idx"
         >
           <view class="img">
-            <image :src="'https://kiq.xazhima.com' + item.pic_url"   mode="aspectFit"></image>
+            <image
+              :src="
+                item.pic_url
+                  ? 'https://kiq.xazhima.com' + item.pic_url
+                  : '/static/enterprise/default.webp'
+              "
+              mode="aspectFit"
+            ></image>
           </view>
-          <view class="name">{{ item.name || '-'}}</view>
+          <view class="name">{{ item.name || "-" }}</view>
         </view>
       </view>
       <view v-else class="products">
@@ -120,11 +132,11 @@ export default {
   },
   methods: {
     callphone(value) {
-		if(this.info.phone){
-			uni.makePhoneCall({
-			  phoneNumber: this.info.phone,
-			});
-		}
+      if (this.info.phone) {
+        uni.makePhoneCall({
+          phoneNumber: this.info.phone,
+        });
+      }
     },
     change(idx) {
       this.active = idx;

+ 15 - 1
pages/enterprise/product_detail.vue

@@ -32,6 +32,20 @@ export default {
     };
   },
   methods: {
+    replaceImg(html) {
+      let result = html.replace(
+        /<img [^>]*src=['"]([^'"]+)[^>]*>/gi,
+        function (match, capture) {
+          return (
+            "<img src=" +
+            getApp().globalData.shareUrl +
+            capture +
+            ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+          );
+        }
+      );
+      return result;
+    },
     getRich(ids) {
       uni.request({
         url: `https://kiq.xazhima.com/content/company_product/${Math.floor(
@@ -43,7 +57,7 @@ export default {
         },
         success: (res) => {
           if (res.statusCode === 200) {
-            this.company = res.data;
+            this.company = this.replaceImg(res.data);
           }
         },
         fail: () => {

+ 2 - 1
pages/index/index.vue

@@ -446,12 +446,13 @@ export default {
   },
   onShow() {
     uni.hideTabBar({});
+	this.getActive();
   },
   onLoad() {
+	uni.showLoading({});  
     this.getSwiperList();
     this.getPark();
     this.getNotice();
-    this.getActive();
     this.getAttract(); //招商接口
   },
   onShareAppMessage() {

+ 1 - 1
pages/policy/policy_rich_card.vue

@@ -79,7 +79,7 @@ export default {
 
 <style lang="scss" scoped>
 .card-situation {
-  margin-top: 20rpx;
+  // margin-top: 20rpx;
   padding: 20rpx;
   border-top: 8rpx solid #f2f2f2;
   box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);

+ 4 - 2
pages/supply/supply_detail.vue

@@ -14,7 +14,7 @@
       </view>
       <view class="view">
         <span class="label">图片:</span>
-        <view class="flex">
+        <view class="flex-box">
           <view v-if="imageList.length == 0">-</view>
           <image :src="item.url" v-for="item in imageList" :key="item.id" mode="aspectFit"/>
         </view>
@@ -126,7 +126,9 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.flex,
+.flex-box {
+  display: flex;
+}
 .view {
   display: flex;
 }

BIN
static/enterprise/default.webp