MrShi
2026-03-06 cdca21c0c12fa79ad4e85321d0f0960c0c4c3f33
mini-program/pages/distributor/distributor.vue
@@ -4,10 +4,15 @@
         <view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' }">
            <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
            <view class="head-bar-nav" :style="{ height: navHeight + 'px' }">
               <view class="loginOut" @click="logoutCom()">
               <view class="loginOut" >
                  <u-icon  class="icon" margin="5" name="home" label="商城" @click="jumpIndex()"label-color="#004096" label-size="13" size="13" mode="widthFix"></u-icon>
                  <text style="margin: 0rpx 10rpx 0 15rpx;font-size: 20rpx;">|</text>
                  <u-icon  class="icon" margin="5" name="bell" @click="logoutCom()" label="登出" label-color="#004096" label-size="13" size="13" mode="widthFix"></u-icon>
               </view>
               <!-- <view class="loginOut" @click="logoutCom()">
                  <image src="/static/icon/ic_tixing@2x.png" mode="widthFix"></image>
                  <text>登出</text>
               </view>
               </view> -->
            </view>
         </view>
         <view class="user">
@@ -16,10 +21,14 @@
                  <image :src="shop.imgurl||'/static/icon/default3.png'" mode="widthFix"></image>
               </view>
               <view class="user-left-info">
                  <view class="user-left-info-title">{{shop.name||''}}</view>
                  <view class="user-left-info-title">
                     <text>{{shop.name||''}}</text>
                     <view class="user-left-info-title-tips1" v-if="shopInfo.saleType == 1">自主采购</view>
                     <view class="user-left-info-title-tips2" v-if="shopInfo.saleType == 0">平台铺货</view>
                  </view>
                  <view class="user-left-info-val">
                     <text>门店ID:{{shop.code}}</text>
                     <text>积分:{{(shop.integral||0).toFixed(0)}}</text>
                     <text>积分:{{(shop.integral||0).toFixed(0)}} <text style="color: #004096; margin-left: 10rpx;" @click="jumpShopIntegral">明细</text></text>
                  </view>
               </view>
            </view>
@@ -34,7 +43,7 @@
                  <view :class="'data-a-left-item '+(active ==1?'active':'')" @click="changeActive(1)">本月</view>
                  <view :class="'data-a-left-item '+(active ==2?'active':'')" @click="changeActive(2)">上月</view>
               </view>
               <view class="data-a-to" @click="jumpShopIntegral">
               <view class="data-a-to" @click="jumpMX">
                  <text>销售明细</text>
                  <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image>
               </view>
@@ -282,7 +291,7 @@
      onLoad() {
          var that =this
          this.getBase64Img('/static/images/bg_card@2x.png')
         uni.$on('updateOrder',function(data){
          uni.$on('updateOrder',function(data){
            if(data.info!=null && data.info.orderId!=null && data.info.orderStatus ==3){
                if(data.info.orderStatus ==3){
                   that.getCountData()
@@ -295,6 +304,11 @@
          }) 
      }, 
      methods:{ 
         jumpMX() {
            uni.navigateTo({
               url: '/pagesA/pages/virtual-account/virtual-account'
            })
         },
         getBase64Img(path){
            var that =this
            uni.getFileSystemManager().readFile({
@@ -302,7 +316,7 @@
              encoding: 'base64',
              success: (res) => {
                const base64Data = 'data:image/png;base64,' + res.data; // 拼接前缀,用于页面显示
                console.log('图片Base64编码:', base64Data);
                // console.log('图片Base64编码:', base64Data);
                // 可以将 base64Data 绑定到 data 中,用于页面展示
                that.backgroundImage = base64Data;
              },
@@ -456,6 +470,11 @@
               
            }
         }, 
         jumpIndex(){
            uni.switchTab({
               url:"/pages/index/index"
            })
         },
         async  logout(){ 
            var that =this
            let res = await that.$u.api.shopLogout({tokenType:1  })
@@ -471,7 +490,7 @@
            })
         },
         jumpShopLogin() {
            uni.navigateTo({
            uni.redirectTo({
               url: '/pages/login/login'
            })
         },
@@ -599,13 +618,29 @@
         background: linear-gradient(180deg, #C8F3FF 0%, #ffffff 100%);
      
         .head-bar {
            width: 100%;
            width: 100%;
            .head-bar-nav {
               width: 100%;
               display: flex;
               align-items: center;
               justify-content: left;
               .home {
                  width: 52rpx;
                  height: 52rpx;
                  background: #C3E6F5;
                  border-radius: 26rpx;
                  margin-right: 20rpx;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  text {
                     font-weight: 400;
                     font-size: 26rpx;
                     color: #004096;
                  }
               }
               .loginOut {
                  width: 120rpx;
                  width: 240rpx;
                  height: 52rpx;
                  background: #C3E6F5;
                  border-radius: 26rpx;
@@ -851,9 +886,41 @@
                  flex-direction: column;
                  justify-content: space-between;
                  .user-left-info-title {
                     font-weight: 600;
                     font-size: 36rpx;
                     color: #111111;
                     display: flex;
                     align-items: center;
                     text {
                        width: calc(100vw - 192rpx - 116rpx - 12rpx);
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        font-weight: 600;
                        font-size: 36rpx;
                        color: #111111;
                     }
                     .user-left-info-title-tips1 {
                        width: 116rpx;
                        height: 36rpx;
                        line-height: 36rpx;
                        text-align: center;
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #FFFFFF;
                        background: linear-gradient( 319deg, #EE9D0E 0%, #FF4E4E 100%);
                        border-radius: 18rpx;
                        margin-left: 12rpx;
                     }
                     .user-left-info-title-tips2 {
                        width: 116rpx;
                        height: 36rpx;
                        line-height: 36rpx;
                        text-align: center;
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #FFFFFF;
                        background: linear-gradient( 270deg, #00DDAD 0%, #00B775 100%);
                        border-radius: 18rpx;
                        margin-left: 12rpx;
                     }
                  }
                  .user-left-info-val {
                     width: 100%;