liude 1 жил өмнө
parent
commit
09c692d83d

+ 63 - 20
src/components/service/goodsItem.vue

@@ -1,31 +1,39 @@
 <template>
   <view class="sort">
-    <view class="list" :key="index" v-for="(itm, index) of item" @click='handlerRouterSkip(itm)'>
-      <view class="list-img">
-        <image class="img" :src="error || !loaded ? 'https://cdn.uviewui.com/uview/album/10.jpg' : itm.logo"
-          mode="scaleToFill"></image>
-      </view>
-
-      <view class="list-main">
-        <view class="item-text">{{ itm.name }}</view>
-        <view class="item-flex">
-          <view class="star">
-            <u-rate count="5" v-model="itm.score" :size="14" />
-            <text class="line">|</text>
-            <text class="points">{{ itm.specialPrice }}分</text>
+    <u-swipe-action>
+      <u-swipe-action-item :options="options1" :key="index" v-for="(itm, index) of item"
+        @click="handlerClearItem(itm,index)">
+        <view class="list" @click='handlerRouterSkip(itm)'>
+          <view class="list-img">
+            <image class="img" :src="error || !loaded ? 'https://cdn.uviewui.com/uview/album/10.jpg' : itm.logo"
+              mode="scaleToFill"></image>
+          </view>
+
+          <view class="list-main">
+            <view class="item-text">{{ itm.name }}</view>
+            <view class="item-flex">
+              <view class="star">
+                <u-rate count="5" v-model="itm.score" :size="14" />
+                <text class="line">|</text>
+                <text class="points">{{ itm.specialPrice }}分</text>
+              </view>
+              <view>{{ itm.specialPrice }}单</view>
+            </view>
+            <view class="list-item">
+              <view class="item-l">{{ itm.description }}</view>
+              <view class="item-r"></view>
+            </view>
           </view>
-          <view>{{ itm.specialPrice }}单</view>
-        </view>
-        <view class="list-item">
-          <view class="item-l">{{ itm.description }}</view>
-          <view class="item-r"></view>
         </view>
-      </view>
-    </view>
+      </u-swipe-action-item>
+    </u-swipe-action>
   </view>
 </template>
 
 <script>
+  import {
+    cancelFavorite
+  } from '@/api/client/business.js';
   export default {
     data() {
       return {
@@ -34,6 +42,9 @@
         value1: Number(new Date()),
         count: 2,
         value: 10,
+        options1: [{
+          text: '删除'
+        }]
       };
     },
     props: ['item'],
@@ -53,6 +64,24 @@
           url: `/pages/client/clientPackage/serviceDetail/index?id=${item.id}`,
         });
       },
+      // 点击取消
+      handlerClearItem(item, index) {
+        cancelFavorite(item.id).then(res => {
+          if (res.code == 200) {
+            uni.showToast({
+              title: '取消成功',
+              icon: 'none'
+            })
+            this.$emit('uploadIniList', 1)
+          } else {
+            uni.showToast({
+              title: res.msg,
+              icon: 'none'
+            })
+            return
+          }
+        })
+      }
     },
   };
 </script>
@@ -144,4 +173,18 @@
       }
     }
   }
+
+
+  .swipe-action {
+    background-color: #EFEFEF;
+    box-sizing: border-box;
+
+    &__content {
+
+      &__text {
+        font-size: 15px;
+        color: $u-main-color;
+      }
+    }
+  }
 </style>

+ 166 - 122
src/components/service/index.vue

@@ -1,156 +1,200 @@
 <template>
   <view class="sort">
-    <view
-      class="list"
-      :key="index"
-      v-for="(item, index) of item"
-      @click="handlerRouterSkip(item, index)"
-    >
-      <view class="list-img">
-        <image
-          class="img"
-          :src="error || !loaded ? 'https://cdn.uviewui.com/uview/album/10.jpg' : item.logo"
-          mode="scaleToFill"
-        ></image>
-      </view>
-
-      <view class="list-main">
-        <view class="item-text">{{ item.address }}</view>
-        <view class="item-flex">
-          <view class="star">
-            <u-rate :count="item.score" :size="14" />
-            <text class="line">|</text>
-            <text class="points">{{ item.score }}分</text>
+    <u-swipe-action>
+      <u-swipe-action-item :options="options1" :key="index" v-for="(itm, index) of item"
+        @click="handlerClearItem(itm,index)">
+        <view class="list" @click="handlerRouterSkip(itm, index)">
+          <view class="list-img">
+            <image class="img" :src="error || !loaded ? 'https://cdn.uviewui.com/uview/album/10.jpg' : itm.logo"
+              mode="scaleToFill"></image>
+          </view>
+
+          <view class="list-main">
+            <view class="item-text">{{ itm.address }}</view>
+            <view class="item-flex">
+              <view class="star">
+                <u-rate :count="itm.score" :size="14" />
+                <text class="line">|</text>
+                <text class="points">{{ itm.score }}分</text>
+              </view>
+              <view>{{ itm.sale }}单</view>
+            </view>
+            <view class="list-item">
+              <view class="item-l">{{ itm.name }}</view>
+              <view class="item-r">{{ itm.distance }}KM</view>
+            </view>
           </view>
-          <view>{{ item.sale }}单</view>
-        </view>
-        <view class="list-item">
-          <view class="item-l">{{ item.name }}</view>
-          <view class="item-r">{{ item.distance }}KM</view>
         </view>
-      </view>
-    </view>
+      </u-swipe-action-item>
+    </u-swipe-action>
   </view>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      show: false,
-      showDate: false,
-      value1: Number(new Date()),
-      count: 2,
-      value: 10,
-    };
-  },
-  props: ['item', 'skipType'],
-
-  methods: {
-    click(item) {},
-    open() {},
-    close() {
-      this.show = false;
+  import {
+    cancelFavorite
+  } from '@/api/client/business.js';
+  export default {
+    data() {
+      return {
+        show: false,
+        showDate: false,
+        value1: Number(new Date()),
+        count: 2,
+        value: 10,
+        options1: [{
+          text: '删除'
+        }]
+      };
     },
-
-    // 点击跳转1
-    handlerRouterSkip(item) {
-      // if (this.skipType == 0) {
+    props: ['item', 'skipType'],
+
+    methods: {
+      click(item) {},
+      open() {},
+      close() {
+        this.show = false;
+      },
+
+      // 点击跳转1
+      handlerRouterSkip(item) {
+        // if (this.skipType == 0) {
         uni.navigateTo({
           url: `/pages/client/clientPackage/storeDetail?id=${item.id}`,
         });
-      // } else if (this.skipType == 1) {
-      //   uni.navigateTo({
-      //     url: `/pages/client/clientPackage/serviceDetail/index?id=${item.id}`,
-      //   });
-      // }
+        // } else if (this.skipType == 1) {
+        //   uni.navigateTo({
+        //     url: `/pages/client/clientPackage/serviceDetail/index?id=${item.id}`,
+        //   });
+        // }
+      },
+      // 点击取消
+      handlerClearItem(item, index) {
+        cancelFavorite(item.id).then(res => {
+          if (res.code == 200) {
+            uni.showToast({
+              title: '取消成功',
+              icon: 'none'
+            })
+            this.$emit('uploadIniList', 0)
+          } else {
+            uni.showToast({
+              title: res.msg,
+              icon: 'none'
+            })
+            return
+          }
+        })
+      }
     },
-  },
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-/*商家服务分类的是实现 */
-
-.sort {
-  min-height: 100vh;
-
-  .list {
-    height: 250rpx;
-    background-color: #fff;
-    padding: 20rpx;
-    margin-bottom: 20rpx;
-    display: flex;
-    .list-img {
-      width: 260rpx;
-      height: 100%;
-      background-color: #ec5729;
-      margin-right: 20rpx;
-
-      image {
-        width: 100%;
+  /*商家服务分类的是实现 */
+
+  .sort {
+    min-height: 100vh;
+
+    .list {
+      height: 250rpx;
+      background-color: #fff;
+      padding: 20rpx;
+      margin-bottom: 20rpx;
+      display: flex;
+
+      .list-img {
+        width: 260rpx;
         height: 100%;
+        background-color: #ec5729;
+        margin-right: 20rpx;
+
+        image {
+          width: 100%;
+          height: 100%;
+        }
       }
-    }
 
-    .list-main {
-      width: calc(100% - 280rpx);
-    }
+      .list-main {
+        width: calc(100% - 280rpx);
+      }
 
-    .item-text {
-      font-weight: bold;
-      margin: 10rpx 0 10rpx;
-      color: #333;
-    }
+      .item-text {
+        font-weight: bold;
+        margin: 10rpx 0 10rpx;
+        color: #333;
+      }
 
-    .item-flex {
-      display: flex;
-      justify-content: space-between;
-      font-size: 28rpx;
-      margin: 0 20rpx 10rpx 0;
-      color: #0d0d0d66;
+      .item-flex {
+        display: flex;
+        justify-content: space-between;
+        font-size: 28rpx;
+        margin: 0 20rpx 10rpx 0;
+        color: #0d0d0d66;
+
+        .star {
+          display: flex;
+
+          .line {
+            margin-left: 16rpx;
+            margin-top: 5rpx;
+            font-size: 22rpx;
+          }
+
+          .points {
+            color: #ff4b04;
+            font-size: 22rpx;
+            margin-top: 6rpx;
+            margin-left: 10rpx;
+          }
+        }
+      }
 
-      .star {
+      .list-item {
         display: flex;
+        justify-content: space-between;
+        margin-top: 40rpx;
 
-        .line {
-          margin-left: 16rpx;
-          margin-top: 5rpx;
-          font-size: 22rpx;
+        .item-l {
+          color: #cfcfcf;
         }
 
-        .points {
-          color: #ff4b04;
-          font-size: 22rpx;
-          margin-top: 6rpx;
-          margin-left: 10rpx;
+        .item-r {
+          color: #252525;
+
+          .Buy {
+            width: 40px;
+            height: 32px;
+            color: #fff;
+            line-height: 32px;
+            text-align: center;
+            display: inline-block;
+            border-radius: 0 16px 16px 0;
+            background-color: #ec5729;
+            padding-bottom: 20rpx;
+          }
         }
       }
     }
+  }
 
-    .list-item {
-      display: flex;
-      justify-content: space-between;
-      margin-top: 40rpx;
-      .item-l {
-        color: #cfcfcf;
-      }
-      .item-r {
-        color: #252525;
-
-        .Buy {
-          width: 40px;
-          height: 32px;
-          color: #fff;
-          line-height: 32px;
-          text-align: center;
-          display: inline-block;
-          border-radius: 0 16px 16px 0;
-          background-color: #ec5729;
-          padding-bottom: 20rpx;
-        }
+  .u-page {
+    padding: 0;
+  }
+
+  .u-demo-block__title {
+    padding: 10px 0 2px 15px;
+  }
+
+  .swipe-action {
+    &__content {
+      padding: 25rpx 0;
+
+      &__text {
+        font-size: 15px;
+        color: $u-main-color;
+        padding-left: 30rpx;
       }
     }
   }
-}
 </style>

+ 224 - 209
src/pages/client/clientPackage/orderAll.vue

@@ -35,7 +35,7 @@
                 </view>
               </view>
               <view class="r-r">
-                <view class="r-item" @click.stop="handlerSkipComment(item, itm)">
+                <view class="r-item" @click.stop="handlerSkipComment(item, itm)" v-if="type == 3">
                   <u-icon name="chat" color="#000" size="28"></u-icon>
                   <span>评价</span>
                 </view>
@@ -48,8 +48,8 @@
           <view class="item-allnumb-box">
             <view class="allnumb-left"> {{ item.allNumb }}件商品 </view>
             <view class="allnumb-right">
-              <span class="r-text">共计</span>¥{{ item.allPrice }}</view
-            >
+              <span class="r-text">共计</span>¥{{ item.allPrice }}
+            </view>
           </view>
 
           <view class="item-bottom">
@@ -65,250 +65,265 @@
 </template>
 
 <script>
-import { userOrdersApi, getUserOrderList, cancelOrder } from '@/api/client/order';
-export default {
-  data() {
-    return {
-      current: 0,
-      type: 0,
-      type_name: '',
-      size: 20,
-      // 订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
-      list: [
-        {
-          name: '待付款',
-          type: 0,
-        },
-        {
-          name: '待发货',
-          type: 1,
-        },
-        {
-          name: '已发货',
-          type: 2,
-        },
-        {
-          name: '已完成',
-          type: 3,
-        },
-        {
-          name: '已关闭',
-          type: 4,
-        },
-        {
-          name: '无效订单',
-          type: 5,
-        },
-      ],
-      init_list: [],
-    };
-  },
-  mounted() {
-    // this.userOrdersPage();
-  },
-  onShow() {
-    let cur = this.$store.state.order.skip_order_type.type;
-    switch (cur) {
-      case 0:
-        this.current = 0;
-        this.userOrdersPage(cur);
-        break;
-      case 1:
-        this.current = 2;
-        this.userOrdersPage(cur);
-        break;
-      case 2:
-        this.current = 3;
-        this.userOrdersPage(cur);
-        break;
-    }
-  },
-  computed: {
-    allNumber() {
-      this.init_list.map(rs => {
-        let sum = 0;
-        let price = 0;
-        rs.goodsInfo.map(rc => {
-          sum += rc.goodsQuantity;
-          price += rc.goodsPrice;
-        });
-        rs.allNumb = sum;
-        rs.allPrice = price;
-      });
-      return;
+  import {
+    userOrdersApi,
+    getUserOrderList,
+    cancelOrder
+  } from '@/api/client/order';
+  export default {
+    data() {
+      return {
+        current: 0,
+        type: 0,
+        type_name: '',
+        size: 20,
+        // 订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
+        list: [{
+            name: '待付款',
+            type: 0,
+          },
+          {
+            name: '待发货',
+            type: 1,
+          },
+          {
+            name: '已发货',
+            type: 2,
+          },
+          {
+            name: '已完成',
+            type: 3,
+          },
+          {
+            name: '已关闭',
+            type: 4,
+          },
+          {
+            name: '无效订单',
+            type: 5,
+          },
+        ],
+        init_list: [],
+      };
     },
-  },
-  methods: {
-    handlerChangeItem(data) {
-      this.current = data.index;
-      this.type = data.type;
-      this.type_name = data.name;
-      this.userOrdersPage(this.type);
+    mounted() {
+      // this.userOrdersPage();
     },
-
-    async userOrdersPage(type) {
-      let orderStatus = type == undefined ? 0 : `${type}`;
-      let res = await getUserOrderList({
-        status: orderStatus,
-        paging: '1,20',
-      });
-      if ((res.code = 200 && res.data)) {
-        this.init_list = res.data.records;
+    onShow() {
+      let cur = this.$store.state.order.skip_order_type.type;
+      switch (cur) {
+        case 0:
+          this.current = 0;
+          this.userOrdersPage(cur);
+          break;
+        case 1:
+          this.current = 2;
+          this.userOrdersPage(cur);
+          break;
+        case 2:
+          this.current = 3;
+          this.userOrdersPage(cur);
+          break;
       }
     },
-
-    // 跳转到订单详情
-    handlerSkipDetail(e) {
-      console.log('@@@@e', e);
-      uni.navigateTo({
-        url: `/pages/client/clientPackage/orderDetail?orderList=${JSON.stringify(e)}`,
-      });
-    },
-    // 取消订单
-    handlerCancelOrder(e) {
-      cancelOrder(e.id).then(res => {
-        console.log('###res', res);
-        if (res.code == 200) {
-          uni.showToast({
-            title: '取消成功',
-            icon: 'none',
+    computed: {
+      allNumber() {
+        this.init_list.map(rs => {
+          let sum = 0;
+          let price = 0;
+          rs.goodsInfo.map(rc => {
+            sum += rc.goodsQuantity;
+            price += rc.goodsPrice;
           });
-          this.userOrdersPage(this.type);
-        } else {
-          console.log('###res', res);
-        }
-      });
+          rs.allNumb = sum;
+          rs.allPrice = price;
+        });
+        return;
+      },
     },
-    // 点击跳转到商品评价
-    handlerSkipComment(item, itm) {
-      uni.navigateTo({
-        url: `/pages/client/clientPackage/goodsEstimation?orderList=${JSON.stringify(
+    methods: {
+      handlerChangeItem(data) {
+        this.current = data.index;
+        this.type = data.type;
+        this.type_name = data.name;
+        this.userOrdersPage(this.type);
+      },
+
+      async userOrdersPage(type) {
+        let orderStatus = type == undefined ? 0 : `${type}`;
+        let res = await getUserOrderList({
+          status: orderStatus,
+          paging: '1,20',
+        });
+        if ((res.code = 200 && res.data)) {
+          this.init_list = res.data.records;
+        }
+      },
+
+      // 跳转到订单详情
+      handlerSkipDetail(e) {
+        console.log('@@@@e', e);
+        uni.navigateTo({
+          url: `/pages/client/clientPackage/orderDetail?orderList=${JSON.stringify(e)}`,
+        });
+      },
+      // 取消订单
+      handlerCancelOrder(e) {
+        cancelOrder(e.id).then(res => {
+          console.log('###res', res);
+          if (res.code == 200) {
+            uni.showToast({
+              title: '取消成功',
+              icon: 'none',
+            });
+            this.userOrdersPage(this.type);
+          } else {
+            console.log('###res', res);
+          }
+        });
+      },
+      // 点击跳转到商品评价
+      handlerSkipComment(item, itm) {
+        uni.navigateTo({
+          url: `/pages/client/clientPackage/goodsEstimation?orderList=${JSON.stringify(
           item,
         )}&goodsList=${JSON.stringify(itm)}`,
-      });
+        });
+      },
     },
-  },
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.order {
-  margin-top: 10px;
-  padding: 10rpx 20rpx 20rpx;
-  box-sizing: border-box;
+  .order {
+    margin-top: 10px;
+    padding: 10rpx 20rpx 20rpx;
+    box-sizing: border-box;
 
-  .order-box {
-    .order-item {
-      margin-bottom: 20rpx;
-      background-color: #fff;
-      border-radius: 20rpx;
-      padding: 20rpx;
-      box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+    .order-box {
+      .order-item {
+        margin-bottom: 20rpx;
+        background-color: #fff;
+        border-radius: 20rpx;
+        padding: 20rpx;
+        box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
 
-      .item-top {
-        display: flex;
-        justify-content: space-between;
-        margin-bottom: 10rpx;
-      }
+        .item-top {
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 10rpx;
+        }
 
-      .item-center {
-        display: flex;
-        align-items: center;
-        margin-bottom: 10rpx;
-        .center-left {
-          height: 160rpx;
+        .item-center {
+          display: flex;
+          align-items: center;
+          margin-bottom: 10rpx;
 
-          .img {
-            width: 160rpx;
+          .center-left {
             height: 160rpx;
+
+            .img {
+              width: 160rpx;
+              height: 160rpx;
+            }
           }
-        }
 
-        .center-right {
-          width: 100%;
-          height: 160rpx;
-          display: flex;
-          justify-content: space-between;
-          margin-left: 20rpx;
-          .r-l {
+          .center-right {
+            width: 100%;
+            height: 160rpx;
             display: flex;
-            flex-direction: column;
-            justify-content: space-around;
-            .right-name {
-              color: #4d5671;
-              font-size: 32rpx;
-              font-weight: bold;
-            }
-            .right-descript {
-              font-size: 28rpx;
-              color: #858797;
-            }
-            .l-box {
+            justify-content: space-between;
+            margin-left: 20rpx;
+
+            .r-l {
               display: flex;
-              font-size: 24rpx;
-              align-items: center;
-              font-style: italic;
-              .right-price {
-                margin-right: 20rpx;
+              flex-direction: column;
+              justify-content: space-around;
+
+              .right-name {
+                color: #4d5671;
+                font-size: 32rpx;
                 font-weight: bold;
+              }
+
+              .right-descript {
                 font-size: 28rpx;
-                color: #f57f32;
+                color: #858797;
               }
-              .right-numb {
+
+              .l-box {
+                display: flex;
                 font-size: 24rpx;
-                color: #858797;
+                align-items: center;
+                font-style: italic;
+
+                .right-price {
+                  margin-right: 20rpx;
+                  font-weight: bold;
+                  font-size: 28rpx;
+                  color: #f57f32;
+                }
+
+                .right-numb {
+                  font-size: 24rpx;
+                  color: #858797;
+                }
               }
             }
-          }
-          .r-r {
-            .r-item {
-              align-items: center;
+
+            .r-r {
+              .r-item {
+                align-items: center;
+              }
             }
           }
         }
-      }
 
-      .item-allnumb-box {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        font-weight: bold;
-        .allnumb-left {
-          font-size: 32rpx;
-        }
-        .allnumb-right {
-          font-size: 26rpx;
-          color: #f57f32;
-          .r-text {
-            color: #000;
+        .item-allnumb-box {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          font-weight: bold;
+
+          .allnumb-left {
+            font-size: 32rpx;
+          }
+
+          .allnumb-right {
+            font-size: 26rpx;
+            color: #f57f32;
+
+            .r-text {
+              color: #000;
+            }
           }
         }
-      }
 
-      .item-bottom {
-        display: flex;
-        width: 100%;
-        margin-top: 20rpx;
-        .btn {
-          width: 80%;
-          height: 70rpx;
-          background-color: rgba(248, 213, 53, 0.8);
-          color: #4e5059;
-          font-size: 28rpx;
-          text-align: center;
-          line-height: 70rpx;
-          border-radius: 20rpx;
+        .item-bottom {
+          display: flex;
+          width: 100%;
+          margin-top: 20rpx;
+
+          .btn {
+            width: 80%;
+            height: 70rpx;
+            background-color: rgba(248, 213, 53, 0.8);
+            color: #4e5059;
+            font-size: 28rpx;
+            text-align: center;
+            line-height: 70rpx;
+            border-radius: 20rpx;
+          }
         }
       }
     }
   }
-}
 
-.gray-color {
-  color: #858797;
-}
+  .gray-color {
+    color: #858797;
+  }
 
-::deep .u-tabs__wrapper__nav__item__text {
-  font-size: 30px;
-}
+  ::deep .u-tabs__wrapper__nav__item__text {
+    font-size: 30px;
+  }
 </style>

+ 11 - 9
src/pages/client/clientPackage/serviceDetail/index.vue

@@ -25,12 +25,12 @@
           </view>
           <text class="price">券后¥{{ goods.specialPrice }}</text>
         </view>
-        <view class="text_title">半售200+</view>
+        <!-- <view class="text_title">半售200+</view> -->
       </view>
 
       <!-- 评价 -->
       <view>
-        <view class="flex evaluate">
+        <!-- <view class="flex evaluate">
           <view class="flex">
             <text style="margin-right: 30rpx">评价</text>
             <u-rate :value="5" readonly activeColor="#f3b935" />
@@ -40,7 +40,7 @@
             <text class="text_title" style="margin-right: 20rpx">共40个消费评价</text>
             <u-icon name="arrow-right" size="16" color="#999" />
           </view>
-        </view>
+        </view> -->
         <!-- <view class="evaluate-context">
           <view class="flex evaluate">
             <view class="flex">
@@ -85,9 +85,9 @@
     </view>
 
     <!-- 评价内容 -->
-    <view class="Evaluate-content">
+    <!-- <view class="Evaluate-content">
       <EvaluateContent :comments="comments"></EvaluateContent>
-    </view>
+    </view> -->
 
     <!-- 底部 -->
     <view class="service-footer">
@@ -117,7 +117,9 @@
     // getGoodsConcentList,
     accountToOrderGetComment
   } from '@/api/client/business.js';
-  import { accountTotIdGetConponList } from "@/api/client/mine.js"
+  import {
+    accountTotIdGetConponList
+  } from "@/api/client/mine.js"
   import GainCoupon from './GainCoupon.vue';
   import EvaluateContent from './EvaluateContent.vue';
   export default {
@@ -183,7 +185,7 @@
       // },
       handlerInitList(id) {
         getGoodsDetailApi(id).then(res => {
-          console.log("@@@@res",res)
+          console.log("@@@@res", res)
           this.goods = res.data.goods;
           this.comments = res.data.comments;
           this.handlerGetGoodsConcentList()
@@ -193,10 +195,10 @@
         // 获取商品评价列表
         let params = {
           // merchantId:this.shoopId,
-          goodsId:this.goods.id
+          goodsId: this.goods.id
         }
         accountToOrderGetComment(params).then(res => {
-          console.log("@@@@res",res)
+          console.log("@@@@res", res)
         })
 
         // 根据id获取优惠券列表

+ 5 - 4
src/pages/client/clientPackage/storeDetail.vue

@@ -3,20 +3,20 @@
     <!-- 轮播图 -->
     <view class="carousel-map">
       <u-swiper :list="swiperList" previousMargin="30" nextMargin="30" circular bgColor="#ffffff" height="190" />
-      <view class="carousel-item">
+      <!-- <view class="carousel-item">
         <view class="mark">
           <view class="mark-item">{{ merchant.score }}分</view>
           <u-rate count="5" v-model="merchant.score" active-color="#fff" readonly inactive-color="#fff" :size="12" />
         </view>
         <view class="good-item">近期有6266个购买者给了给好评</view>
-      </view>
+      </view> -->
     </view>
 
     <!-- 商家信息 -->
     <view class="merchant-info">
       <view class="info-title">
         <view>{{ merchant.name }}</view>
-        <text class="info-mark">{{ merchant.sale / 10000 }}w+单</text>
+        <!-- <text class="info-mark">{{ merchant.sale / 10000 }}w+单</text> -->
       </view>
       <view class="info-tag">商家信息</view>
       <view class="info-item">
@@ -437,7 +437,8 @@
         if (e.id == 0) {
           this.handlerInitList()
         } else {
-          changeGoodsType(e.id, {
+          changeGoodsType(this.ids, {
+            categoryId: e.id,
             size: 20
           }).then(res => {
             this.goods = res.data;

+ 28 - 14
src/pages/client/clientUser/collectList.vue

@@ -14,8 +14,8 @@
       <view v-if="init_list.length > 0">
         <view class="text">以下是您收藏的商品服务</view>
         <!-- 收藏的服务 -->
-        <serviceItem v-if="indexs == 0" :item="init_list" ></serviceItem>
-        <goodsItem v-else :item="init_list"/>
+        <serviceItem v-if="indexs == 0" :item="init_list" @uploadIniList="uploadIniList"></serviceItem>
+        <goodsItem v-else :item="init_list" @uploadIniList="uploadIniList" />
       </view>
       <u-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
     </view>
@@ -26,7 +26,8 @@
   import serviceItem from '@/components/service/index.vue';
   import goodsItem from "@/components/service/goodsItem.vue"
   import {
-    maintainFavoritePaging , getFavouriteGoods
+    maintainFavoritePaging,
+    getFavouriteGoods
   } from '@/api/client/mine.js';
   import {
     getCurrentLocation
@@ -34,7 +35,8 @@
 
   export default {
     components: {
-      serviceItem,goodsItem
+      serviceItem,
+      goodsItem
     },
     data() {
       return {
@@ -55,7 +57,8 @@
             name: '服务',
           },
         ],
-        indexs:0
+        indexs: 0,
+
       };
     },
     onLoad() {
@@ -73,10 +76,10 @@
         //       latitude: res.latitude,
         //       longitude: res.longitude,
         //     };
-            // getCurrentLocation(point).then(rc => {
-            //   this.queryParams.region = rc.data.id;
-              this.handlerInitList();
-            // });
+        // getCurrentLocation(point).then(rc => {
+        //   this.queryParams.region = rc.data.id;
+        this.handlerInitList();
+        // });
         //   },
         //   fail: rs => {
         //     uni.showToast({
@@ -102,7 +105,7 @@
         });
       },
       // 初始化服务列表
-      handlerInitGoodsList(){
+      handlerInitGoodsList() {
         getFavouriteGoods().then(res => {
           if (res.code == 200 && res.data) {
             res.data.map(rs => {
@@ -119,15 +122,26 @@
       clickCollect(e) {
         this.init_list = []
         this.indexs = e.index
-        switch(e.index){
-          case 0 :
+        switch (e.index) {
+          case 0:
             this.handlerInitList()
             break;
-          case 1 :
+          case 1:
             this.handlerInitGoodsList()
-          break;
+            break;
         }
       },
+      uploadIniList(e) {
+        // console.log("@@@e", e);
+        this.init_list = []
+        if (e == 1) {
+          this.handlerInitGoodsList()
+          this.indexs = 1
+        } else {
+          this.handlerInitList()
+          this.indexs = 0
+        }
+      }
     },
   };
 </script>

+ 22 - 20
src/pages/client/clientUser/mine/setting/personInfo.vue

@@ -3,7 +3,8 @@
     <view class="item-box">
       <view class="item-left"> 头像 : </view>
       <view class="item-right flex-end">
-        <image @click="handlerUploadImg" class="img" :src="queryParams.avatar ? queryParams.avatar : require('@/static/QR57a.jpg')"></image>
+        <image @click="handlerUploadImg" class="img"
+          :src="queryParams.avatar ? queryParams.avatar : require('@/static/QR57a.jpg')"></image>
       </view>
     </view>
     <view class="item-box">
@@ -61,18 +62,18 @@
         sexList: [{
             id: 0,
             name: '男',
-            type:'MALE'
+            type: 'MALE'
           },
           {
             id: 1,
             name: '女',
-            type:'FEMALE'
+            type: 'FEMALE'
           }
         ],
         current: 0,
       }
     },
-    mounted(){
+    mounted() {
       this.handlerInitUserMessage()
     },
     methods: {
@@ -155,6 +156,7 @@
       // 上传头像
       uploadAvatar(filePath) {
         // 在这里实现上传头像的逻辑,将filePath作为参数传入
+        console.log("@@@@filePath", filePath)
         this.queryParams.avatar = filePath;
         this.$forceUpdate(); // 手动触发组件的重新渲染
       },
@@ -162,22 +164,22 @@
       // 点击提交按钮
       handlerSubmitBtn() {
         this.queryParams.gender = this.sexList[this.current].type
-        editUserInfo(this.queryParams).then(res=>{
-            if(res.code == 200){
-              uni.showToast({
-                title:'修改成功',
-                icon:'none'
-              })
-              setTimeout(()=>{
-                uni.navigateBack(-1)
-              },1500)
-            }else{
-              uni.showToast({
-                title:res.msg,
-                icon:'none'
-              })
-              return
-            }
+        editUserInfo(this.queryParams).then(res => {
+          if (res.code == 200) {
+            uni.showToast({
+              title: '修改成功',
+              icon: 'none'
+            })
+            setTimeout(() => {
+              uni.navigateBack(-1)
+            }, 1500)
+          } else {
+            uni.showToast({
+              title: res.msg,
+              icon: 'none'
+            })
+            return
+          }
         })
       }
     }