|
|
@@ -9,7 +9,15 @@ Page({ |
|
|
|
* 页面的初始数据 |
|
|
|
*/ |
|
|
|
data: { |
|
|
|
navigationBarHeight |
|
|
|
navigationBarHeight, |
|
|
|
exchange:"" |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
if (options&&options.exchange){ |
|
|
|
this.setData({ |
|
|
|
exchange: options.exchange |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 兑换 |
|
|
|
exchange(e){ |
|
|
@@ -24,7 +32,7 @@ Page({ |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
that.checkPhoneStatus(e.detail.value.code,formId = e.detail.formId); |
|
|
|
that.checkPhoneStatus(e.detail.value.code,e.detail.formId); |
|
|
|
}, |
|
|
|
checkPhoneStatus: function (password, formId) { |
|
|
|
let that = this; |
|
|
@@ -42,7 +50,7 @@ Page({ |
|
|
|
* |
|
|
|
*/ |
|
|
|
wx.redirectTo({ |
|
|
|
url: "/pages/getphoneInfo/index", |
|
|
|
url: `/pages/getphoneInfo/index?exchange=${password}`, |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
@@ -55,10 +63,16 @@ Page({ |
|
|
|
}, |
|
|
|
getCouponOrderByPassword(password, formId) { |
|
|
|
let that = this; |
|
|
|
let passwords; |
|
|
|
if(that.data.exchange){ |
|
|
|
passwords = that.data.exchange |
|
|
|
}else{ |
|
|
|
passwords = password |
|
|
|
} |
|
|
|
Http.post({ |
|
|
|
url: config.api.getCouponOrderByPassword, |
|
|
|
data: { |
|
|
|
password: password, |
|
|
|
password: passwords, |
|
|
|
formId: formId |
|
|
|
} |
|
|
|
}) |
|
|
|