xuxueyang
2024-07-24 499a94ded67a4c1e763dc6686afe5a2e99faf407
sub_pages/customer/shop/shop.vue
@@ -19,8 +19,8 @@
                  <view class="store-address">云南省-昆明市-官渡区</view>
               </view>
               <view class="store-sc m-l-a m-r-0">
                  <image src="../../../static/icon-gz-1.png" class="icon" v-if="dto.gz"></image>
                  <image src="../../../static/icon-gz-0.png" class="icon" v-if="!dto.gz"></image>
                  <image src="../../../static/icon-gz-1.png" class="icon" v-if="dto.gz" @click="updateGz(false)"></image>
                  <image src="../../../static/icon-gz-0.png" class="icon" v-if="!dto.gz" @click="updateGz(true)"></image>
                  关注
               </view>
            </view>
@@ -48,7 +48,7 @@
         </top-tabs>
      </view>
      <view class="brand-info">
         <view v-if="flg=='0'" class="brand-info-0">
         <view v-if="flg==='0'" class="brand-info-0">
            <view class="component-filter-container" style="padding-top: 12rpx;">
               <view class="flex1">
                  排序<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
@@ -110,10 +110,10 @@
         </view>
         <view v-if="flg=='1'" class="brand-info-1">
         <view v-if="flg==='1'" class="brand-info-1">
            <trade :hidefooter="true"></trade>
         </view>
         <view v-if="flg=='3'" class="brand-info-3">
         <view v-if="flg==='2'" class="brand-info-3">
            <view class="title">
               基础信息
            </view>
@@ -149,9 +149,9 @@
               {
                  name: '分类'
               },
               {
                  name: '评价'
               },
               // {
               //    name: '评价'
               // },
               {
                  name: '商家'
               },
@@ -161,6 +161,31 @@
         }
      },
      methods: {
      //update 关注
      async updateGz(type){
        this.$message.showLoading()
        // var res;
        // if(type){
        //   res = await this.$http.request('post',`/api/follow/add`,{
        //     data:{
        //       supplierId:this.dto.supplierId || this.dto.id
        //     }
        //   })
        // }else{
        //   res = await this.$http.request('get',`/api/follow/add`,{
        //     data:{
        //       supplierId:this.dto.supplierId || this.dto.id
        //     }
        //   })
        // }
        this.$message.hideLoading()
        if(code===0){
          this.dto.gz = !this.dto.gz
          await this.$store.dispatch('sign_add', 'follow')
        }
      },
         changeTab(flg) {
            this.flg = flg
            //如果没有加载数据,需要加载一下