|
@@ -34,27 +34,7 @@ Component({
|
|
|
methods: {
|
|
|
switchTab(e) {
|
|
|
const { index, path } = e.currentTarget.dataset;
|
|
|
- if (index == 3) {
|
|
|
- wx.getStorage({
|
|
|
- key: 'userInfo',
|
|
|
- success: function (res) {
|
|
|
- app.globalData.userInfo = res.data;
|
|
|
- wx.switchTab({ url: path })
|
|
|
- },
|
|
|
- fail: function (res) {
|
|
|
- wx.getUserProfile({
|
|
|
- desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
- success: (res) => {
|
|
|
- wx.setStorage({ key: "userInfo", data: res.userInfo })
|
|
|
- app.globalData.userInfo = res.userInfo;
|
|
|
- wx.switchTab({ url: path })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- wx.switchTab({ url: path })
|
|
|
- }
|
|
|
+ wx.switchTab({ url: path })
|
|
|
// wx.switchTab({ url })
|
|
|
// wx.reLaunch({ url })
|
|
|
// this.setData({
|