Browse Source

退出登录优化

master
杜叶春 2 years ago
parent
commit
83490f67a7
  1. 26
      pages/set/set.js
  2. 2
      utils/server.js

26
pages/set/set.js

@ -62,30 +62,18 @@ Page({
}
},
logout: function() {
WXAPI.logout({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
wx.clearStorage({
success: (res) => {
wx.clearStorageSync('isLogin');
wx.clearStorageSync('accessId');
wx.navigateBack()
// wx.reLaunch({
// url: '/pages/login/login',
// })
},
})
} else {
wx.showToast({
icon: 'loading',
title: res.message,
duration: 2000
});
}
wx.clearStorage({
success: (res) => {
wx.clearStorageSync('isLogin');
wx.clearStorageSync('accessId');
wx.navigateBack()
},
})
});
},
onShow: function () {

2
utils/server.js

@ -116,7 +116,7 @@ module.exports = {
productAttribute: (data) => { //购物车选择规格
return requestServer('app.cart.dj_attribute', 'post', data)
},
modifyAttribute: (data) => { //购物车选择规格
modifyAttribute: (data) => { //购物车规格修改
return requestServer('app.cart.modify_attribute', 'post', data)
},
/* 我的 */

Loading…
Cancel
Save