ltx529596 4 år sedan
förälder
incheckning
074f601e9b
4 ändrade filer med 12 tillägg och 12 borttagningar
  1. 4 3
      src/pages/index/index.vue
  2. 1 1
      src/pages/order/order.vue
  3. 4 5
      src/pages/shop/shop.vue
  4. 3 3
      src/pages/shop/shopdetail.vue

+ 4 - 3
src/pages/index/index.vue

@@ -487,7 +487,9 @@ export default {
           this.futureDayData();
           this.shopSellData();
         }
-      });
+      }).catch(error=>{
+        console.log(error);
+      })
     },
 
     // 关键指数
@@ -558,11 +560,10 @@ export default {
       });
 
       let per = (((todaynum - yesnum) / yesnum) * 100).toFixed(2);
-
       if (todaynum >= yesnum) {
         itemEle.percent = per.split('-')[0];
       } else {
-        itemEle.percent=per.per.split('-')[1];
+        itemEle.percent = per.split('-')[1];
       }
       
       if (yesnum === todaynum) {

+ 1 - 1
src/pages/order/order.vue

@@ -450,7 +450,7 @@ export default {
         }
         .sundate {
           font-size: 28upx;
-          padding-left: 80upx;
+          padding-left: 40upx;
         }
       }
       .iconRight {

+ 4 - 5
src/pages/shop/shop.vue

@@ -99,7 +99,6 @@
         <view class="operate">
           <view
             class="btn stick"
-            :id="`${itemj.id}-btn`"
             @tap="sticktop(item.id, topstatus)"
             >{{ topstatus === '-1' ? '置顶' : '取消置顶' }}</view
           >
@@ -137,8 +136,7 @@
         <view class="operate">
           <view
             class="btn stick"
-            :id="`${itemj.id}-btn`"
-            @tap="sticktop(item.id, topstatus)"
+            @tap="sticktop(item.id, topstatus,$event)"
             >{{ topstatus === '-1' ? '置顶' : '取消置顶' }}</view
           >
           <view class="btn sold" @tap="shopPutDown(item.id)">下架</view>
@@ -175,7 +173,6 @@
         <view class="operate">
           <view
             class="btn stick"
-            :id="`${itemj.id}-btn`"
             @tap="sticktop(item.id, topstatus)"
             >{{ topstatus === '-1' ? '置顶' : '取消置顶' }}</view
           >
@@ -371,7 +368,9 @@ export default {
     },
     // 置顶
     sticktop(id, status) {
-      let view = uni.createSelectorQuery().in(this).select(`#${id}-btn`);
+
+      console.log(e);
+      let view = uni.createSelectorQuery().in(this).select(`#${id}btn`);
 
       view
         .fields(

+ 3 - 3
src/pages/shop/shopdetail.vue

@@ -557,13 +557,13 @@ export default {
         .get('/goods/getById/' + this.SHOPID)
         .then(async (res) => {
           if (res.code === 200 && res.msg === 'OK') {
+            console.log(res);
             this.shopData = res.data;
 
             this.getShopList();
 
             setTimeout(() => {
               // 判断返回的是否是自营商品
-              this.typeProperty = this.shopData.saleRule;
               this.price = this.shopData.salePrice / 100;
               this.rateprice = this.shopData.price / 100;
 
@@ -714,6 +714,8 @@ export default {
                 }
               });
               this.storeId = this.storeList[this.storeIndex].id;
+              this.typeProperty = this.storeList[this.storeIndex].type;
+
               // 商品类型回显
               this.getType();
               this.getLine();
@@ -774,7 +776,6 @@ export default {
           shopId: this.storeId,
         })
         .then(async (res) => {
-          console.log(res);
           let arr = [];
           this.hasNameList = +res.data.shopFrom;
           res.data.customGroupList.forEach((element) => {
@@ -961,7 +962,6 @@ export default {
           return;
         }
 
-        console.log(this.shopNumIndex);
         if (this.shopIndex === 0) {
           this.inventory = '';
         }