提交 8e8fc3af authored 作者: 曹末's avatar 曹末

登录问题

上级 97dc3950
...@@ -53,6 +53,17 @@ Page({ ...@@ -53,6 +53,17 @@ Page({
if (this.data.username && this.data.username !== "") { if (this.data.username && this.data.username !== "") {
ActionSheet.show(basicListOption) ActionSheet.show(basicListOption)
} }
},
navigateTo(e) {
if (!this.data.username || this.data.username === "") {
wx.navigateTo({
url: '/pages/login/index',
})
} else {
wx.navigateTo({
url: e.target.dataset.url
})
}
} }
}); });
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
</view> </view>
<view class="settings_container"> <view class="settings_container">
<t-cell-group theme="card"> <t-cell-group theme="card">
<t-cell title="合同管理" leftIcon="collage" hover arrow type="navigateTo" url="/pages/contract/index" /> <t-cell title="合同管理" leftIcon="collage" hover arrow data-url="/pages/contract/index" bind:click="navigateTo" />
<t-cell wx:if="{{isAdmin}}" title="账号管理" leftIcon="usergroup" hover arrow url="/pages/user-manage/index" /> <t-cell wx:if="{{isAdmin}}" title="账号管理" leftIcon="usergroup" hover arrow data-url="/pages/user-manage/index" bind:click="navigateTo" />
<t-cell title="联系客服" leftIcon="earphone" hover arrow /> <t-cell title="联系客服" leftIcon="earphone" hover arrow />
</t-cell-group> </t-cell-group>
</view> </view>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论