|
|
@@ -1,4 +1,5 @@
|
|
|
-const _Http = getApp().globalData.http;
|
|
|
+const _Http = getApp().globalData.http,
|
|
|
+ getMapText = getApp().globalData.Language.getMapText;
|
|
|
let downCount = null;
|
|
|
Page({
|
|
|
|
|
|
@@ -12,6 +13,7 @@ Page({
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.queryUserMsg();
|
|
|
+ getApp().globalData.Language.getLanguagePackage(this)
|
|
|
let authlist = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['个人中心']);
|
|
|
let pathList = [{
|
|
|
name: "修改登录密码",
|
|
|
@@ -66,15 +68,15 @@ Page({
|
|
|
outLogin() {
|
|
|
clearTimeout(downCount);
|
|
|
wx.showLoading({
|
|
|
- title: '正在退出...',
|
|
|
+ title: (getMapText('加载中') || '正在退出') + '...',
|
|
|
})
|
|
|
downCount = setTimeout(() => {
|
|
|
_Http.logout().then(res => {
|
|
|
wx.showToast({
|
|
|
- title: '退出成功'
|
|
|
+ title: getMapText('退出成功') || '退出成功'
|
|
|
});
|
|
|
let loginMsg = wx.getStorageSync("loginMsg"),
|
|
|
- languagecode = wx.getStorageSync("languagecode");
|
|
|
+ languagecode = wx.getStorageSync("languagecode");
|
|
|
|
|
|
wx.clearStorageSync();
|
|
|
wx.setStorageSync('loginMsg', loginMsg)
|
|
|
@@ -106,8 +108,8 @@ Page({
|
|
|
if (this.data.userMsg.iswechatbinding) {
|
|
|
let that = this;
|
|
|
wx.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "是否解除绑定",
|
|
|
+ title: getMapText('提示') || "提示",
|
|
|
+ content: getMapText('是否解除绑定') || "是否解除绑定",
|
|
|
success: (res) => {
|
|
|
if (res.confirm) that.handleBDWechat(0);
|
|
|
}
|
|
|
@@ -119,7 +121,7 @@ Page({
|
|
|
handleBDWechat(isbinging) {
|
|
|
let that = this;
|
|
|
wx.getUserProfile({
|
|
|
- desc: '用于完善用户资料',
|
|
|
+ desc: getMapText('用于完善用户资料') || '用于完善用户资料',
|
|
|
success: ({
|
|
|
userInfo
|
|
|
}) => {
|
|
|
@@ -142,7 +144,7 @@ Page({
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
wx.showToast({
|
|
|
- title: isbinging == 0 ? '解除成功' : '绑定成功',
|
|
|
+ title: isbinging == 0 ? (getMapText('解绑成功') || '解除成功') : (getMapText('绑定成功') || '绑定成功'),
|
|
|
icon: "none"
|
|
|
})
|
|
|
}, 100);
|
|
|
@@ -153,7 +155,7 @@ Page({
|
|
|
},
|
|
|
fail: () => {
|
|
|
wx.showToast({
|
|
|
- title: '操作失败,未获得授权',
|
|
|
+ title: getMapText('未获取授权') || '操作失败,未获得授权',
|
|
|
icon: "none"
|
|
|
})
|
|
|
}
|