功能:完善门店能力与用户安全配置
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
const auth = require('../../utils/auth')
|
||||
|
||||
/**
|
||||
* index page logic.
|
||||
* Call guide: page data drives the WXML template, and each method is called by user events or lifecycle callbacks.
|
||||
*/
|
||||
Page({
|
||||
data: {
|
||||
navTitle: '游客模式'
|
||||
},
|
||||
|
||||
/**
|
||||
* `onLoad` page method. Use this from WXML event bindings or lifecycle hooks.
|
||||
* Call guide: read or update page data with `this.setData(...)` inside the method when state changes.
|
||||
*/
|
||||
onLoad() {
|
||||
this.syncNavTitle()
|
||||
wx.switchTab({
|
||||
@@ -12,10 +20,18 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* `onShow` page method. Use this from WXML event bindings or lifecycle hooks.
|
||||
* Call guide: read or update page data with `this.setData(...)` inside the method when state changes.
|
||||
*/
|
||||
onShow() {
|
||||
this.syncNavTitle()
|
||||
},
|
||||
|
||||
/**
|
||||
* `syncNavTitle` page method. Use this from WXML event bindings or lifecycle hooks.
|
||||
* Call guide: read or update page data with `this.setData(...)` inside the method when state changes.
|
||||
*/
|
||||
syncNavTitle() {
|
||||
const userInfo = auth.getStoredUserInfo()
|
||||
const navTitle = userInfo && String(userInfo.shopName || '').trim()
|
||||
|
||||
Reference in New Issue
Block a user