xuxueyang
2024-07-24 499a94ded67a4c1e763dc6686afe5a2e99faf407
sub_pages/customer/shop/shop.vue
@@ -19,36 +19,36 @@
                  <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>
         </view>
         <view class="tj-info m-t-12">
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">发布</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">获赞</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">粉丝</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">关注</view>
            </view>
         </view>
         <view class="tj-info m-t-12">
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">发布</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">获赞</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">粉丝</view>
            </view>
            <view class="form-item">
               <view class="value">0</view>
               <view class="label">关注</view>
            </view>
         </view>
         <top-tabs :tabs="tabs" :flg="flg" @change="changeTab">
         </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
            //如果没有加载数据,需要加载一下
@@ -248,25 +273,25 @@
      .brand-top-info {
         background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/37/37dc02b58bd44af79e45031af2bb6c0b%E4%BD%8D%E5%9B%BE@2x.png');
         .tj-info{
            display: flex;
            .form-item{
               flex: 1;
               text-align: center;
               .label{
                  font-weight: 400;
                  font-size: 32rpx;
                  color: #FFFFFF;
                  line-height: 44rpx;
               }
               .value{
                  font-weight: 600;
                  font-size: 48rpx;
                  color: #FFFFFF;
                  line-height: 66rpx;
               }
            }
         .tj-info{
            display: flex;
            .form-item{
               flex: 1;
               text-align: center;
               .label{
                  font-weight: 400;
                  font-size: 32rpx;
                  color: #FFFFFF;
                  line-height: 44rpx;
               }
               .value{
                  font-weight: 600;
                  font-size: 48rpx;
                  color: #FFFFFF;
                  line-height: 66rpx;
               }
            }
         }
         .search-container {
            display: flex;