修改:兑换码和邀请码扫码后的处理方式
This commit is contained in:
parent
f5d9288bf5
commit
99f678e3f4
|
|
@ -468,9 +468,12 @@
|
|||
identityCurrent:{},
|
||||
identityCurrentName: '',
|
||||
integral_surplus: '',
|
||||
// 页面参数
|
||||
options: {},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.options = options || {};
|
||||
this.$nextTick(() => {
|
||||
this.setSwiperHeight(); // 动态设置 swiper 的高度
|
||||
});
|
||||
|
|
@ -490,14 +493,8 @@
|
|||
this.activeRouter = '/' + curRoute
|
||||
this.getNav();
|
||||
if (that.isLogin) {
|
||||
this.getUserInfo();
|
||||
this.orderNum();
|
||||
this.getIdentityList();
|
||||
this.shareholdersIntegralInfo();
|
||||
this.init();
|
||||
} else {
|
||||
// this.userInfo = {
|
||||
// is_svip: 0
|
||||
// }
|
||||
this.orderMenu.forEach(v=>{
|
||||
v.num = 0
|
||||
})
|
||||
|
|
@ -508,6 +505,19 @@
|
|||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.getUserInfo();
|
||||
this.orderNum();
|
||||
this.getIdentityList();
|
||||
this.shareholdersIntegralInfo();
|
||||
this.getMyMenus();
|
||||
// 参数处理
|
||||
let q = this.options.q || '';
|
||||
if (q) {
|
||||
let params = this.$util.getUrlParams(decodeURIComponent(q));
|
||||
this.scanCodeResultHandle(params);
|
||||
}
|
||||
},
|
||||
authTo(url){
|
||||
if(this.isLogin){
|
||||
uni.navigateTo({
|
||||
|
|
@ -634,11 +644,7 @@
|
|||
},
|
||||
// 授权回调
|
||||
onLoadFun(data) {
|
||||
this.getUserInfo();
|
||||
this.getMyMenus();
|
||||
this.orderNum();
|
||||
this.getIdentityList();
|
||||
this.shareholdersIntegralInfo();
|
||||
this.init();
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
Setting: function() {
|
||||
|
|
@ -855,8 +861,18 @@
|
|||
success(res) {
|
||||
let result = res.result || '';
|
||||
let params = result ? _this.$util.getUrlParams(result) : {};
|
||||
let type = params.type || '';
|
||||
_this.scanCodeResultHandle(params);
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 扫码 - 结果出来
|
||||
scanCodeResultHandle(params){
|
||||
let _this = this;
|
||||
// console.log("二维码内容", {result: result, params: params})
|
||||
let type = params.type || '';
|
||||
// 根据类型进行对应的处理
|
||||
switch (type) {
|
||||
// 邀请码
|
||||
|
|
@ -932,13 +948,10 @@
|
|||
}
|
||||
});*/
|
||||
break;
|
||||
default:
|
||||
_this.$util.tips({ content: '无法识别!'});
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 餐费积分 - 获取当前用户可用餐费积分
|
||||
shareholdersIntegralInfo(){
|
||||
let _this = this;
|
||||
|
|
@ -950,7 +963,6 @@
|
|||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
onPullDownRefresh: function(){
|
||||
this.getNav();
|
||||
|
|
|
|||
|
|
@ -751,6 +751,10 @@ export default {
|
|||
*/
|
||||
// #ifdef MP
|
||||
getUrlParams: function(param, k, p) {
|
||||
// 清除问号前的内容
|
||||
const index = param.indexOf('?');
|
||||
if (index >= 0) param = param.substring(index + 1);
|
||||
|
||||
if (typeof param != 'string') return {};
|
||||
k = k ? k : '&'; //整体参数分隔符
|
||||
p = p ? p : '='; //单个参数分隔符
|
||||
|
|
|
|||
Loading…
Reference in New Issue