Skip to content

Commit

Permalink
“我的”页面,增加后台快捷入口,点击用户编号复制到剪贴板
Browse files Browse the repository at this point in the history
  • Loading branch information
woniudiancang committed Aug 21, 2024
1 parent 5587328 commit 7e392ff
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
version: "6.0.0",
note: '优化',
version: "6.1.0",
note: '“我的”页面,增加后台快捷入口',
subDomain: "beeorder", // 根据教程 https://www.it120.cc/help/qr6l4m.html 查看并设置你自己的 subDomain
merchantId: 27, // 商户ID,可在后台工厂设置-->商户信息查看
customerServiceType: 'QW' // 客服类型,QW为企业微信,需要在后台系统参数配置企业ID和客服URL,否则为小程序的默认客服
Expand Down
1 change: 1 addition & 0 deletions i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
},
auth: {
needLogin: 'Please Login First',
goAdmin: 'Manager',
},
date: {
year: 'Y',
Expand Down
1 change: 1 addition & 0 deletions i18n/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
},
auth: {
needLogin: '登陆后才能访问',
goAdmin: '管理后台',
},
date: {
year: '年',
Expand Down
7 changes: 6 additions & 1 deletion pages/my/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Page({
goadmin() {
wx.navigateToMiniProgram({
appId: 'wx5e5b0066c8d3f33d',
path: 'pages/login/auto?token=' + wx.getStorageSync('token'),
path: 'pages/autoLogin?token=' + wx.getStorageSync('token'),
})
},
clearStorage() {
Expand Down Expand Up @@ -195,4 +195,9 @@ Page({
}
})
},
copyuid() {
wx.setClipboardData({
data: this.data.apiUserInfoMap.base.id + ''
})
},
})
3 changes: 2 additions & 1 deletion pages/my/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<image src="{{ apiUserInfoMap.base.avatarUrl ? apiUserInfoMap.base.avatarUrl : '/images/default.png' }}" mode="aspectFill" class="userinfo-avatar-img"></image>
</button>
<view class="name-box">
<view class="name">{{ $t.my.uid }}:{{ apiUserInfoMap.base.id }}</view>
<view class="name" bindtap="copyuid">{{ $t.my.uid }}:{{ apiUserInfoMap.base.id }}</view>
<view class="name" bindtap="editNick">{{ nick ? nick : $t.my.nickSet }}</view>
<view wx:if="{{apiUserInfoMap.userLevel}}" class="state" bindtap="govip">{{apiUserInfoMap.userLevel.name}}</view>
<view wx:else class="state" bindtap="govip">{{ $t.vip.notVIP }}</view>
Expand Down Expand Up @@ -49,6 +49,7 @@
<van-cell icon="service-o" wx:if="{{ customerServiceType == 'QW' }}" title="{{ $t.my.Contact }}" size="large" is-link bind:click="customerService" />
<van-cell icon="points" title="{{ $t.my.clearStorage }}" size="large" is-link bind:click="clearStorage" />
<van-cell icon="records" title="{{ $t.feedback.title }}" is-link url="/pages/my/feedback" />
<van-cell icon="manager-o" title="{{ $t.auth.goAdmin }}" is-link bind:tap="goadmin" />
</view>
<view class="version">v{{version}}</view>

Expand Down

0 comments on commit 7e392ff

Please sign in to comment.