...
|
...
|
@@ -110,23 +110,11 @@ Page(extend({},Toast,{ |
|
|
});
|
|
|
},
|
|
|
|
|
|
// calcPosition: function (i, dataVal) {
|
|
|
// let positionX, positionY;
|
|
|
// let index = i;
|
|
|
// let count = parseInt(dataVal, 10) + 1;
|
|
|
// let unit = 'px';
|
|
|
// positionX = -index * 80 + unit;
|
|
|
// positionY = -count * 80 + unit;
|
|
|
// return [positionX, positionY].join(' ');
|
|
|
// },
|
|
|
|
|
|
didSelectImage: function (e) {
|
|
|
let index = e.currentTarget.dataset.itemindex;
|
|
|
let graphicsCodeElement = this.data.graphicsCodeElement;
|
|
|
let elem = graphicsCodeElement[index];
|
|
|
let dataVal = (parseInt(elem.dataVal)) % 4 + 1;
|
|
|
// let position = this.calcPosition(index, elem.dataVal);
|
|
|
// elem.position = position;
|
|
|
elem.dataVal = dataVal;
|
|
|
this.setData({graphicsCodeElement});
|
|
|
},
|
...
|
...
|
@@ -395,7 +383,6 @@ verifyBtnAction:function(){ |
|
|
|
|
|
bindBtnAction:function (needBind, callBackFun) {
|
|
|
let that = this
|
|
|
// console.log('phoneNumber,verifyCode', that.data.phoneNum, that.data.verifyCode)
|
|
|
if (!that.data.phoneNum) {
|
|
|
that.wetoast.toast({
|
|
|
title: '请输入有效手机号',
|
...
|
...
|
@@ -416,7 +403,6 @@ bindBtnAction:function (needBind, callBackFun) { |
|
|
}
|
|
|
|
|
|
bindAction(that.data.phoneNum, that.data.verifyCode, that.data.country_area, that.data.inviteCode, function (result) {
|
|
|
// console.log("result:",result)
|
|
|
if (result.message)
|
|
|
that.wetoast.toast({
|
|
|
title: result.message,
|
...
|
...
|
@@ -425,7 +411,6 @@ bindBtnAction:function (needBind, callBackFun) { |
|
|
});
|
|
|
|
|
|
if (result.succeed) {
|
|
|
//新人toast提示
|
|
|
if (result.is_register) {
|
|
|
that.showZanToast({ title:'欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',success: function(){
|
|
|
that.redirectAction();
|
...
|
...
|
@@ -433,6 +418,7 @@ bindBtnAction:function (needBind, callBackFun) { |
|
|
} else {
|
|
|
that.redirectAction();
|
|
|
}
|
|
|
event.emit('user-login-success');
|
|
|
event.emit('wechat-login-success');
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -451,13 +437,6 @@ redirectAction: function() { |
|
|
url: '../webview/webview?url=' + that.data.h5back
|
|
|
})
|
|
|
} else {
|
|
|
// let prePage = getCurrentPages();
|
|
|
// that.newCustomerStorage();
|
|
|
// if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
|
|
|
// prePage[prePage.length - 2].bindPhoneNumComplete();
|
|
|
// }
|
|
|
|
|
|
// console.log("currentPage:", getCurrentPages())
|
|
|
wx.navigateBack({
|
|
|
delta: 2,
|
|
|
})
|
...
|
...
|
|