소스 검색

修改细节问题

306132416@qq.com 4 년 전
부모
커밋
128cc6d3f0
6개의 변경된 파일49개의 추가작업 그리고 36개의 파일을 삭제
  1. 23 17
      pages/activity/activity_deatil.vue
  2. 4 6
      pages/activity/index.vue
  3. 4 3
      pages/enterprise/enterprise_detail.vue
  4. 2 2
      pages/index/index.vue
  5. 14 6
      pages/notice/notice_deatil.vue
  6. 2 2
      pages/supply/index.vue

+ 23 - 17
pages/activity/activity_deatil.vue

@@ -40,13 +40,13 @@
       <view class="button">
         <button
           v-if="!isJoin"
-          @click="subscribeActivity(model.status)"
-          :disabled="!(model.status == 0 && model.type == 2)"
+          @click="subscribeActivity()"
+          :disabled="!(model.status == '待开始' && model.type == 2)"
           :class="{
-            start: model.status == 0 && model.type == 2,
-            begun: model.status == 1,
-            ended: model.status == 2,
-            falseStart: model.status == 0 && model.type == 1,
+            start: model.status == '待开始' && model.type == 2,
+            begun: model.status == '已开始',
+            ended: model.status == '已结束',
+            falseStart: model.status == '待开始' && model.type == 1,
           }"
         >
           {{ model.activiteState }}
@@ -230,13 +230,13 @@ export default {
             this.model.share =
               parseInt(data.real_repost_count) +
               parseInt(data.base_repost_count);
-            if (data.status == 0) {
+            if (data.status == '待开始') {
               if (data.type == 2) {
                 this.model.activiteState = "我要参加";
               } else {
                 this.model.activiteState = "活动待开始";
               }
-            } else if (data.status == 1) {
+            } else if (data.status == '已开始') {
               this.model.activiteState = "活动进行中";
             } else {
               this.model.activiteState = "活动已结束";
@@ -253,12 +253,20 @@ export default {
       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;"/>'
-          );
+		  if(capture.includes('http')){
+			  return (
+				"<img src=" +
+				capture +
+				' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			  );
+		  }else {
+			return (
+			  "<img src=" +
+			  getApp().globalData.shareUrl +
+			  capture +
+			  ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			);
+		  }	
         }
       );
       return result;
@@ -282,7 +290,7 @@ export default {
         },
       });
     },
-    subscribeActivity(status) {
+    subscribeActivity() {
       if (this.model.person_count >= this.model.max_person) {
         uni.showToast({
           title: "报名人数已达上限",
@@ -291,7 +299,6 @@ export default {
         });
         return;
       }
-      console.log(status);
       let that = this;
       uni.requestSubscribeMessage({
         tmplIds: [
@@ -299,7 +306,6 @@ export default {
           "T_ORLiW2C_UM6nZiEerYAokltHgHRGxWCid8eElujus",
         ],
         success(res) {
-          console.log(res);
           that.signUpActivity();
         },
       });

+ 4 - 6
pages/activity/index.vue

@@ -349,15 +349,13 @@ export default {
           justify-content: space-between;
           .right-title {
             width: 100%;
-            margin-bottom:15rpx;
+            margin-bottom:20rpx;
             font-size: 27rpx;
             font-weight: 600;
             letter-spacing: 3rpx;
-			overflow: hidden;
-		    -webkit-line-clamp: 2;
-		    text-overflow: ellipsis;
-		    display: -webkit-box;
-		    -webkit-box-orient: vertical;
+			  overflow: hidden;
+			  text-overflow: ellipsis;
+			  white-space: nowrap;
           }
           .right-inf {
             flex-wrap: wrap;

+ 4 - 3
pages/enterprise/enterprise_detail.vue

@@ -66,7 +66,7 @@
       </view>
     </view>
     <view v-else-if="active === 1" class="proInfo">
-      <view class="products" v-if="productList.length !== 0">
+      <view class="products">
         <view
           class="product"
           @click="toDetail(item.id)"
@@ -77,7 +77,7 @@
             <image
               :src="
                 item.pic_url
-                  ? 'https://kiq.xazhima.com' + item.pic_url
+                  ? globalUrl + item.pic_url
                   : '/static/enterprise/default.webp'
               "
               mode="aspectFit"
@@ -86,7 +86,7 @@
           <view class="name">{{ item.name || "-" }}</view>
         </view>
       </view>
-      <view v-else class="products">
+      <view v-if="productList.length === 0" class="products">
         <img src="/static/nodata.svg" alt="" />
         <div style="margin: 0 auto">暂无产品信息</div>
       </view>
@@ -123,6 +123,7 @@ export default {
       productList: [],
       isShow: false,
       infoObj: {},
+	  globalUrl:getApp().globalData.shareUrl
     };
   },
   onLoad(option) {

+ 2 - 2
pages/index/index.vue

@@ -272,8 +272,8 @@
             border-radius: 10%;
           "
         ></image>
-        <view class="notice-content" style="width: 70%">
-          <view class="notice-content-font" style="white-space: break-spaces">{{
+        <view class="notice-content" style="width: 75%">
+          <view class="notice-content-font">{{
             item.title
           }}</view>
           <view class="display-flex-start" style="margin-top: 20rpx">

+ 14 - 6
pages/notice/notice_deatil.vue

@@ -76,12 +76,20 @@ export default {
       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;"/>'
-          );
+		  if(capture.includes('http')){
+			  return (
+				"<img src=" +
+				capture +
+				' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			  );
+		  }else {
+			return (
+			  "<img src=" +
+			  getApp().globalData.shareUrl +
+			  capture +
+			  ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			);
+		  }	
         }
       );
       return result;

+ 2 - 2
pages/supply/index.vue

@@ -8,7 +8,7 @@
         range-key="name"
         class="picker_self"
       >
-        <view class="picker_title active" style="padding-left: 15%;">
+        <view class="picker_title active" style="padding-left: 1%;">
           {{ picker_title }}
         </view>
       </picker>
@@ -178,7 +178,7 @@ export default {
   .picker::after {
     content: "";
     position: absolute;
-    left: 25%;
+    left: 11%;
     top: 20%;
     width: 0;
     height: 0;