From cdca21c0c12fa79ad4e85321d0f0960c0c4c3f33 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 06 三月 2026 10:56:17 +0800
Subject: [PATCH] 优化
---
mini-program/pages/distributor/distributor.vue | 97 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 82 insertions(+), 15 deletions(-)
diff --git a/mini-program/pages/distributor/distributor.vue b/mini-program/pages/distributor/distributor.vue
index ee386ad..5932961 100644
--- a/mini-program/pages/distributor/distributor.vue
+++ b/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%;
--
Gitblit v1.9.3