From 7a4b8764b68e0dbaeb90e292a8a4bd47cb379e68 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 27 四月 2026 17:26:02 +0800
Subject: [PATCH] 小程序端和PC端bug修复
---
small-program/shop/pages/mine/mine.vue | 123 +++++++++++++++++++++++++++++-----------
1 files changed, 88 insertions(+), 35 deletions(-)
diff --git a/small-program/shop/pages/mine/mine.vue b/small-program/shop/pages/mine/mine.vue
index 90ef1eb..b9878d4 100644
--- a/small-program/shop/pages/mine/mine.vue
+++ b/small-program/shop/pages/mine/mine.vue
@@ -16,13 +16,13 @@
<view class="profile-section">
<view class="profile-main">
<view class="profile-left">
- <image class="store-avatar" :src="storeAvatar" mode="aspectFill"></image>
+ <image class="store-avatar" @click="previewImage([info.shopAvatar],0)" :src="(info.shopAvatar)?info.shopAvatar:'/static/icon/default2.png'" mode="aspectFill"></image>
<view class="profile-info">
- <text class="store-name">{{ shopDisplayName }}</text>
+ <text class="store-name">{{info.name||''}}</text>
<view class="profile-meta-row">
- <text class="manager-name">{{ managerName }}</text>
- <view class="identity-tag enterprise-tag">浼佷笟</view>
- <view class="identity-tag personal-tag">涓汉</view>
+ <text class="manager-name">{{info.linkName || ''}}</text>
+ <view class="identity-tag enterprise-tag" v-if="info.companyType === 1">浼佷笟</view>
+ <view class="identity-tag personal-tag" v-if="info.companyType === 0">涓汉</view>
</view>
</view>
</view>
@@ -59,7 +59,10 @@
<view class="card menu-card">
<view class="menu-item" v-for="item in menuList" :key="item.title" @click="handleMenuClick(item)">
<text class="menu-title">{{ item.title }}</text>
- <image src="/static/icon/ar_map@2x.png" mode="widthFix" class="menu-arrow"></image>
+ <view class="menu-arrow">
+ <button v-if="item.title === '鍦ㄧ嚎瀹㈡湇'" open-type="contact" type="default"> </button>
+ <image src="/static/icon/ar_map@2x.png" mode="widthFix"></image>
+ </view>
</view>
</view>
</view>
@@ -71,49 +74,79 @@
<script>
import { mapState } from 'vuex'
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
-
export default {
components: {
CustomTabbar
+ },
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo','shopToken']),
+ shopDisplayName() {
+ return this.shopInfo.shopName || ''
+ },
+ managerName() {
+ return this.shopInfo.contactName || this.shopInfo.managerName || ''
+ }
},
data() {
return {
navActionIcon: '',
settingIcon: '',
+ info:{},
storeAvatar: '',
bannerImage: '',
- orderMenus: [
+ /* orderMenus: [
{ title: '寰呮牳楠�', badge: 12, icon: '/static/icon/mine_ic_daifukuan@2x.png', url: '/shop/pages/write-off/write-off' },
{ title: '寰呮敹璐�', badge: 2, icon: '/static/icon/mine_ic_daishouhuo@2x.png', url: '' },
{ title: '閫�娆�/鍞悗', badge: '', icon: '/static/icon/mine_ic_tuikuan@2x.png', url: '' }
- ],
+ ], */
menuList: [
- { title: '瑙勮寖椤荤煡', url: '' },
- { title: '鍦ㄧ嚎瀹㈡湇', url: '' },
- { title: '鍏充簬鎴戜滑', url: '' }
+ { title: '闂ㄥ簵鍚堜綔鍗忚', url: '/pages/rich-text/rich-text',type:2 },
+ { title: '闂ㄥ簵闅愮鏀跨瓥', url: '/pages/rich-text/rich-text',type:3 },
+ { title: '椋庨櫓鎵胯', url: '/pages/rich-text/rich-text',type:6 },
+ { title: '琛屾潕瀵勫瓨椤荤煡', url: '/pages/rich-text/rich-text',type:7 },
+ { title: '浠g悊鐐瑰悎浣滃崗璁�', url: '/pages/rich-text/rich-text',type:8 },
+ { title: '鍦ㄧ嚎瀹㈡湇', url: null,type :-1 },
+ { title: '鍏充簬鎴戜滑', url: '/pages/rich-text/rich-text' ,type:5},
]
}
},
- computed: {
- ...mapState(['navHeight', 'statusbarHeight', 'shopInfo']),
- shopDisplayName() {
- return this.shopInfo.shopName || '涓搧蹇繍鍗楃珯鏃楄埌搴�'
- },
- managerName() {
- return this.shopInfo.contactName || this.shopInfo.managerName || '钄″瓙鐟�'
- }
- },
+ onShow() {
+ this.info ={}
+ this.getMyShop()
+ },
+ onLoad(options) {
+ },
methods: {
+ previewImage(images,index = 0) {
+ uni.previewImage({
+ current: index,
+ urls: images
+ });
+ },
+ async getMyShop(index){
+ var that =this
+ let res = await that.$u.api.getShopInfoDetail()
+ if (res.code === 200) {
+ this.info = res.data
+ console.log(this.info.laborContractImgUrls,this.info.laborContractImgUrls.length,"====================")
+ console.log(this.info,"====================")
+ }
+ },
junp() {
uni.navigateTo({
url: '/shop/pages/settings/settings'
})
},
- handleLogout() {
- uni.showToast({
- title: '璇锋帴鍏ョ櫥鍑洪�昏緫',
- icon: 'none'
- })
+ async handleLogout() {
+ var that =this
+ let res = await that.$u.api.logOutShop()
+ if (res.code === 200) {
+ uni.clearStorageSync("shopInfo")
+ uni.clearStorageSync("shopToken")
+ uni.navigateTo({
+ url:'/shop/pages/login/login'
+ })
+ }
},
goAllOrders() {
uni.showToast({
@@ -123,10 +156,10 @@
},
handleOrderClick(item) {
if (!item.url) {
- uni.showToast({
+ /* uni.showToast({
title: '璇疯ˉ鍏呰烦杞摼鎺�',
icon: 'none'
- })
+ }) */
return
}
@@ -136,16 +169,23 @@
},
handleMenuClick(item) {
if (!item.url) {
- uni.showToast({
+ /* uni.showToast({
title: '璇疯ˉ鍏呴〉闈㈤摼鎺�',
icon: 'none'
- })
+ }) */
return
}
- uni.navigateTo({
- url: item.url
- })
+ if(item.type > 0){
+ uni.navigateTo({
+ url: '/pages/rich-text/rich-text?type='+item.type
+ })
+ }else{
+ uni.navigateTo({
+ url: item.url
+ })
+ }
+
}
}
}
@@ -416,7 +456,20 @@
}
.menu-arrow {
- width: 16rpx;
- height: 26rpx;
+ display: inline-flex;
+ button {
+ position: relative;
+ top: 0;
+ float:right;
+ right: 0;
+ width: 200rpx;
+ height: 26rpx;
+ opacity: 0;
+ z-index: 9999;
+ }
+ image{
+ width: 16rpx;
+ height: 26rpx;
+ }
}
</style>
--
Gitblit v1.9.3