修改首页选择园区,,商户,,电表
This commit is contained in:
@@ -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();
|
||||
|
@@ -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": "我的"
|
||||
}
|
@@ -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 />
|
||||
|
@@ -1 +1,6 @@
|
||||
/* pages/my/index.wxss */
|
||||
.cellWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user