chore: 使用常量来处理会员中心的路由页面路径判断
This commit is contained in:
@@ -66,15 +66,16 @@ export default {
|
|||||||
|
|
||||||
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
||||||
|
|
||||||
var value = '';
|
let value = ''; // 存放解析后的语言值
|
||||||
|
let langPath = ''; // 存放当前页面语言包路径
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//公共语言包(同步加载)
|
//公共语言包(同步加载)
|
||||||
var lang = loadLangPackSync(locale, 'common');
|
var lang = loadLangPackSync(locale, 'common');
|
||||||
|
|
||||||
//当前页面语言包(同步加载)
|
//当前页面语言包(同步加载)
|
||||||
let route = _this.route;
|
let route = _this.route;
|
||||||
let langPath = processRoutePath(route);
|
langPath = processRoutePath(route);
|
||||||
console.log(`当前语言: ${locale}, 当前页面语言包路径: ${langPath}`);
|
|
||||||
|
|
||||||
// 加载当前页面语言包
|
// 加载当前页面语言包
|
||||||
let currentPageLang = loadLangPackSync(locale, langPath);
|
let currentPageLang = loadLangPackSync(locale, langPath);
|
||||||
@@ -102,7 +103,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('解析语言包失败:', e);
|
console.error('解析语言包失败:', e, { langPath, field, locale });
|
||||||
value = field;
|
value = field;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +116,10 @@ export default {
|
|||||||
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
|
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
|
||||||
|
|
||||||
// 多语言调试,注释后可以关闭控制台输出
|
// 多语言调试,注释后可以关闭控制台输出
|
||||||
console.log(`字段: ${field}, 值: ${value}`)
|
if (field == value) {
|
||||||
|
console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`);
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,15 +7,18 @@ import {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 首页路径
|
// 关于页面路径,使用常量导出
|
||||||
export const INDEX_PAGE_URL = '/pages/index/index';
|
export const INDEX_PAGE_URL = '/pages/index/index';
|
||||||
|
export const CATEGORY_PAGE_URL = '/pages_goods/category';
|
||||||
|
export const CONTACT_PAGE_URL = '/pages_tool/contact/contact';
|
||||||
|
export const MEMBER_PAGE_URL = '/pages_tool/member/index';
|
||||||
|
|
||||||
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
|
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
|
||||||
export const systemTabBarList = [
|
export const systemTabBarList = [
|
||||||
INDEX_PAGE_URL,
|
INDEX_PAGE_URL,
|
||||||
'/pages_goods/category',
|
CATEGORY_PAGE_URL,
|
||||||
'/pages_tool/contact/contact',
|
CONTACT_PAGE_URL,
|
||||||
'/pages_tool/member/index'
|
MEMBER_PAGE_URL
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,6 +112,12 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
/** 导出页面URL常量 */
|
||||||
|
MEMBER_PAGE_URL,
|
||||||
|
CATEGORY_PAGE_URL,
|
||||||
|
CONTACT_PAGE_URL,
|
||||||
|
INDEX_PAGE_URL,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面跳转
|
* 页面跳转
|
||||||
* @param {string} to 跳转链接 /pages/idnex/index
|
* @param {string} to 跳转链接 /pages/idnex/index
|
||||||
@@ -592,6 +601,9 @@ export default {
|
|||||||
}
|
}
|
||||||
return cloneObj
|
return cloneObj
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义模板的跳转链接
|
* 自定义模板的跳转链接
|
||||||
* @param {Object} link
|
* @param {Object} link
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
|
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
redirectTo(item) {
|
redirectTo(item) {
|
||||||
if (!item.wap_url || this.$util.getCurrRoute() != 'pages/member/index' || this.storeToken) {
|
if (!item.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
this.$util.diyRedirectTo(item);
|
this.$util.diyRedirectTo(item);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export default {
|
|||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
|
|
||||||
if (link.wap_url) {
|
if (link.wap_url) {
|
||||||
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
|
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (!link.wap_url || this.$util.getCurrRoute() != 'pages/member/index' || this.storeToken) {
|
if (!link.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) {
|
||||||
this.$util.diyRedirectTo(link);
|
this.$util.diyRedirectTo(link);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
if (link.wap_url) {
|
||||||
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs?.login?.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
@click.stop="modifyInfo()">{{ langIndex == 0 ? 'CN' : 'EN' }}</view>
|
@click.stop="modifyInfo()">{{ langIndex == 0 ? 'CN' : 'EN' }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info-wrap" v-else :style="infoStyle" @click="redirect('/pages/member/index')">
|
<view class="info-wrap" v-else :style="infoStyle" @click="redirect($util.MEMBER_PAGE_URL)">
|
||||||
<view class="headimg">
|
<view class="headimg">
|
||||||
<image :src="$util.getDefaultImage().head" mode="widthFix"></image>
|
<image :src="$util.getDefaultImage().head" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -545,7 +545,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
redirectBeforeAuth(url) {
|
redirectBeforeAuth(url) {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$refs.login.open('/pages/member/index');
|
this.$refs.login.open(this.$util.MEMBER_PAGE_URL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,7 +583,7 @@ export default {
|
|||||||
url: '/wechat/api/wechat/authcode',
|
url: '/wechat/api/wechat/authcode',
|
||||||
data: {
|
data: {
|
||||||
scopes: 'snsapi_userinfo',
|
scopes: 'snsapi_userinfo',
|
||||||
redirect_url: this.$config.h5Domain + '/pages/member/index'
|
redirect_url: this.$config.h5Domain + this.$util.MEMBER_PAGE_URL
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
},
|
},
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
if (link.wap_url) {
|
||||||
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
if (link.wap_url) {
|
||||||
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export default {
|
|||||||
},
|
},
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
if (link.wap_url) {
|
||||||
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,26 +42,22 @@
|
|||||||
|
|
||||||
<!-- 协议勾选 -->
|
<!-- 协议勾选 -->
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view
|
<view class="iconfont"
|
||||||
class="iconfont"
|
|
||||||
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
|
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
|
||||||
@click="isAgree = !isAgree"
|
@click="isAgree = !isAgree"></view>
|
||||||
></view>
|
|
||||||
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
|
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
|
||||||
我同意
|
我同意
|
||||||
<text style="color: #4395ff;" @click="tourl('/pages_tool/agreement/contenr?type=0')">《隐私条款》</text>
|
<text style="color: #4395ff;"
|
||||||
<text style="color: #4395ff;" @click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
|
@click="tourl('/pages_tool/agreement/contenr?type=0')">《隐私条款》</text>
|
||||||
|
<text style="color: #4395ff;"
|
||||||
|
@click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 手机号授权按钮 -->
|
<!-- 手机号授权按钮 -->
|
||||||
<block v-if="isAgree">
|
<block v-if="isAgree">
|
||||||
<button
|
<button class="auth-login save-btn border-0" style="border: none;" open-type="getPhoneNumber"
|
||||||
class="auth-login save-btn border-0"
|
@getphonenumber="getPhoneNumber">
|
||||||
style="border: none;"
|
|
||||||
open-type="getPhoneNumber"
|
|
||||||
@getphonenumber="getPhoneNumber"
|
|
||||||
>
|
|
||||||
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
|
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
|
||||||
</button>
|
</button>
|
||||||
</block>
|
</block>
|
||||||
@@ -71,7 +67,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<view @click="closeLogin" style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
|
<view @click="closeLogin"
|
||||||
|
style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
|
||||||
暂不登录
|
暂不登录
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -118,8 +115,8 @@
|
|||||||
<text class="color-base-text" v-else>获取手机号</text>
|
<text class="color-base-text" v-else>获取手机号</text>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">保存</button>
|
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">保存</button>
|
||||||
</template>
|
</template>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
@@ -226,7 +223,7 @@ export default {
|
|||||||
if (siteInfo) {
|
if (siteInfo) {
|
||||||
this.site_name = siteInfo.site_name;
|
this.site_name = siteInfo.site_name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 同意协议
|
// 同意协议
|
||||||
authno() {
|
authno() {
|
||||||
@@ -254,7 +251,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
open(url, mode) {
|
open(url = '', mode = 'navigateTo') {
|
||||||
if (url) this.url = url;
|
if (url) this.url = url;
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
this.getCode(authData => {
|
this.getCode(authData => {
|
||||||
@@ -266,8 +263,13 @@ export default {
|
|||||||
if (this.$util.isWeChatMiniProgram()) {
|
if (this.$util.isWeChatMiniProgram()) {
|
||||||
// 微信小程序环境,使用微信授权登录
|
// 微信小程序环境,使用微信授权登录
|
||||||
let authData = uni.getStorageSync('authInfo');
|
let authData = uni.getStorageSync('authInfo');
|
||||||
if (authData) this.authLogin(authData);
|
if (authData) {
|
||||||
else this.getCode();
|
this.authLogin(authData);
|
||||||
|
} else {
|
||||||
|
this.getCode(authData => {
|
||||||
|
this.authLogin(authData, 'authOnlyLogin');
|
||||||
|
});
|
||||||
|
}
|
||||||
} else if (this.$util.isWeiXin()) {
|
} else if (this.$util.isWeiXin()) {
|
||||||
// 微信浏览器环境,显示登录页面
|
// 微信浏览器环境,显示登录页面
|
||||||
this.toLogin(mode);
|
this.toLogin(mode);
|
||||||
@@ -283,7 +285,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 跳转去登录页
|
// 跳转去登录页
|
||||||
toLogin(mode) {
|
toLogin(mode = 'navigateTo') {
|
||||||
if (this.url) this.$util.redirectTo('/pages_tool/login/login', {
|
if (this.url) this.$util.redirectTo('/pages_tool/login/login', {
|
||||||
back: encodeURIComponent(this.url)
|
back: encodeURIComponent(this.url)
|
||||||
}, mode);
|
}, mode);
|
||||||
@@ -535,7 +537,8 @@ export default {
|
|||||||
getPhoneNumber(e) {
|
getPhoneNumber(e) {
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
const authInfo = uni.getStorageSync('authInfo');
|
const authInfo = uni.getStorageSync('authInfo');
|
||||||
if (authInfo) { Object.assign(this.authMobileData, authInfo, e.detail);
|
if (authInfo) {
|
||||||
|
Object.assign(this.authMobileData, authInfo, e.detail);
|
||||||
}
|
}
|
||||||
if (uni.getStorageSync('source_member')) {
|
if (uni.getStorageSync('source_member')) {
|
||||||
this.authMobileData.source_member = uni.getStorageSync('source_member');
|
this.authMobileData.source_member = uni.getStorageSync('source_member');
|
||||||
@@ -596,7 +599,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 授权登录
|
// 授权登录
|
||||||
authLogin(data, type = 'authLogin') {
|
authLogin(data, type = 'authLogin') {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -686,8 +689,8 @@ export default {
|
|||||||
|
|
||||||
if (this.forceBindingMobileControl) {
|
if (this.forceBindingMobileControl) {
|
||||||
this.bindMobile();
|
this.bindMobile();
|
||||||
} else {
|
} else {
|
||||||
this.authLogin(authInfo);
|
this.authLogin(authInfo);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -749,7 +752,7 @@ export default {
|
|||||||
// 跳转页面
|
// 跳转页面
|
||||||
tourl(url) {
|
tourl(url) {
|
||||||
this.$util.redirectTo(url);
|
this.$util.redirectTo(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -261,7 +261,7 @@
|
|||||||
this.status = res.data.status;
|
this.status = res.data.status;
|
||||||
this.isSub = false;
|
this.isSub = false;
|
||||||
if (this.status == 2) {
|
if (this.status == 2) {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.loadingCover.hide();
|
this.$refs.loadingCover.hide();
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -367,7 +367,7 @@ export default {
|
|||||||
title: '当前分销商已冻结'
|
title: '当前分销商已冻结'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -234,13 +234,13 @@ export default {
|
|||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: this.$lang('loginSuccessTip')
|
title: this.$lang('loginSuccessTip')
|
||||||
});
|
});
|
||||||
let back = this.back ? this.back : '/pages/member/index';
|
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
|
||||||
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||||
} else {
|
} else {
|
||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -348,13 +348,13 @@ export default {
|
|||||||
this.$store.dispatch('getCartNumber');
|
this.$store.dispatch('getCartNumber');
|
||||||
this.getMemberInfo(() => {
|
this.getMemberInfo(() => {
|
||||||
if (can_receive_registergift == 1) {
|
if (can_receive_registergift == 1) {
|
||||||
let back = this.back ? this.back : '/pages/member/index';
|
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
|
||||||
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||||
} else {
|
} else {
|
||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
|
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, this.redirect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
title: '未开启提现'
|
title: '未开启提现'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'height': menuButtonBounding.height + 'px'
|
'height': menuButtonBounding.height + 'px'
|
||||||
}">
|
}">
|
||||||
<view class="navbar-wrap">
|
<view class="navbar-wrap">
|
||||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
|
||||||
<view class="navbar-title">
|
<view class="navbar-title">
|
||||||
账户余额
|
账户余额
|
||||||
</view>
|
</view>
|
||||||
@@ -171,7 +171,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
toIndex() {
|
toIndex() {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
},
|
},
|
||||||
apply() {
|
apply() {
|
||||||
this.$util.redirectTo('/pages_tool/member/cancellation');
|
this.$util.redirectTo('/pages_tool/member/cancellation');
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
},
|
},
|
||||||
revoke() {
|
revoke() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
url: '/membercancel/api/membercancel/cancelApply',
|
url: '/membercancel/api/membercancel/cancelApply',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -220,7 +220,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export default {
|
|||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -118,7 +118,7 @@ export default {
|
|||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: rres.message
|
title: rres.message
|
||||||
|
|||||||
@@ -354,7 +354,7 @@
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
} else {
|
} else {
|
||||||
if (this.back) this.$util.redirectTo(this.back);
|
if (this.back) this.$util.redirectTo(this.back);
|
||||||
else this.$util.redirectTo('/pages/member/index');
|
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.back) this.$util.redirectTo(this.back, {},
|
if (this.back) this.$util.redirectTo(this.back, {},
|
||||||
'redirectTo');
|
'redirectTo');
|
||||||
else this.$util.redirectTo('/pages/member/index');
|
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
this.initInfo();
|
this.initInfo();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<view class="navbar-wrap">
|
<view class="navbar-wrap">
|
||||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
|
||||||
<view class="navbar-title">
|
<view class="navbar-title">
|
||||||
我的积分
|
我的积分
|
||||||
</view>
|
</view>
|
||||||
@@ -143,7 +143,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ export default {
|
|||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: rres.message
|
title: rres.message
|
||||||
@@ -329,7 +329,7 @@ export default {
|
|||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取rule
|
//获取rule
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user