修改首页选择园区,,商户,,电表

This commit is contained in:
2024-04-03 14:46:34 +08:00
parent db6d253898
commit f5ddb92449
17 changed files with 188 additions and 68 deletions

View File

@@ -46,15 +46,16 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
const user = wx.getStorageSync('user');
if (!user || !user.id) {
wx.switchTab({
url: '/pages/home/index',
})
alertInfo("请先登录");
return false;
}
this.init()
// const user = wx.getStorageSync('user');
// if (!user || !user.id) {
// wx.switchTab({
// url: '/pages/home/index',
// })
// alertInfo("请先登录");
// return false;
// }
// this.init()
getDot();
},
async init() {
const result = await getUserInfo();

View File

@@ -3,7 +3,8 @@
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"cell": "/components/cell/index",
"van-dialog": "@vant/weapp/dialog/index"
"van-dialog": "@vant/weapp/dialog/index",
"dot": "/components/dot/index"
},
"navigationBarTitleText": "我的"
}

View File

@@ -7,7 +7,14 @@
<van-cell title="联系客服" value="" is-link bind:tap="connect" />
<van-cell wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" />
<van-cell wx:if="{{!!user.isAdmin}}" title="成员管理" value="" is-link bind:click="jumpToMember" />
<van-cell is-link bind:click="jumpToMember" >
<view slot="title">
<view class="cellWrapper">
<view class="text"> 成员管理 </view>
<dot number="{{100}}" />
</view>
</view>
</van-cell>
<!-- </van-cell-group> -->
<!-- <van-cell-group title=" ">
<van-cell title="单元格" value="内容" is-link />

View File

@@ -1 +1,6 @@
/* pages/my/index.wxss */
.cellWrapper {
display: flex;
justify-content: space-between;
}