test:微信JSAPI联调测试,加密openid
This commit is contained in:
parent
14d3bce616
commit
ee85ae59e8
|
@ -579,11 +579,12 @@
|
|||
//优惠券订单支付
|
||||
createdPay (orderNumber) {
|
||||
let open_id = localStorage.getItem('code_weixin')
|
||||
console.log(582,open_id);
|
||||
let data={
|
||||
token: localStorage.getItem('token'),
|
||||
}
|
||||
if(open_id){
|
||||
data.open_id=open_id;
|
||||
data.open_id=encodeURIComponent(open_id);
|
||||
}
|
||||
req.axiosGet('/key/coupon/createPay/' + orderNumber, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -593,7 +594,6 @@
|
|||
}
|
||||
}).catch(err => { });
|
||||
},
|
||||
|
||||
//根据环境去执行
|
||||
payWayRun (result) {
|
||||
if (this.payType == 1) {// 1微信支付 2 支付宝支付
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
center.style.height = img.clientHeight + "px";
|
||||
}
|
||||
})
|
||||
localStorage.clear()
|
||||
// localStorage.clear()
|
||||
},
|
||||
computed: {
|
||||
bindInputStyle () {
|
||||
|
@ -235,8 +235,12 @@
|
|||
getweixin() {
|
||||
let code_weixin = this.getQueryString('openid');
|
||||
let code_weixin_history = localStorage.getItem('code_weixin')
|
||||
console.log('code_weixin_history',code_weixin_history);
|
||||
console.log(238,code_weixin);
|
||||
if (code_weixin) {
|
||||
if (code_weixin != code_weixin_history) {
|
||||
console.log(2381,code_weixin);
|
||||
|
||||
localStorage.setItem('code_weixin', code_weixin); //(储存code)
|
||||
}
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue