Kaynağa Gözat

签约完直接激活修改

master
yangteng 3 hafta önce
ebeveyn
işleme
02ef936977
2 değiştirilmiş dosya ile 86 ekleme ve 28 silme
  1. 32
    5
      login/login.vue
  2. 54
    23
      subpackage/orders/order_payment.vue

+ 32
- 5
login/login.vue Dosyayı Görüntüle

@@ -27,7 +27,7 @@
<view class="btn">
<submit-button title="登录" @submit="doLogin"></submit-button>
<button size="default" type="primary" class="ui-btn" open-type="getPhoneNumber" @getphonenumber="doLogin"
>登录</button>
>一键登录</button>
</view>

<view class="agreement">
@@ -143,7 +143,6 @@
// msg("请勾选我已阅读并同意《平台用户服务隐私协议》");
// return;
// }
console.log("e",e)
//判断是验证码登录,还是账号密码登录
// if (state.loginType === "code") {
// reqLogin(loginCode, {
@@ -158,6 +157,7 @@ console.log("e",e)
// loginTime: loginTime,
// });
// }
console.log("e",e)
reqLogin(userBasicGetPhoneNumber, {
jsCode: e.detail.code,
iv: e.detail.iv,
@@ -201,9 +201,36 @@ console.log("e",e)
});
});
};
const decryptPhoneNumber=(e)=>{
console.log("e",e)
}
// const silentLogin = () => {
// if (state.userType == "1") {
// var data = {
// userType: state.userType,
// account: state.mobile,
// loginSource: getItem("loginSource"),
// };
// } else {
// var data = {
// userType: state.userType,
// account: state.userIdNum,
// loginSource: getItem("loginSource"),
// };
// }
// const options = {
// type: 2,
// data: data,
// method: "POST",
// showLoading: true,
// };
// return new Promise(async (resolve, reject) => {
// const res = await requestNew(silentLoginApi, options);
// const data = res;
// setItem("openId", data.openId);
// setItem("token", data.accessToken);
// resolve(data);
// }).catch((error) => {
// reject(error);
// });
// }
</script>

<style lang="scss" scoped>

+ 54
- 23
subpackage/orders/order_payment.vue Dosyayı Görüntüle

@@ -346,6 +346,25 @@


});
// 车辆详情
const orderDetail = () => {
const options = {
type: 2,
data: {
orderNo:state.orderId
},
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await requestNew(orderQueryDetail, options);
setItem('orderQueryActivate', res)
resolve(res);
}).catch((error) => {
reject(error);
});
}
const refreshFirst = () => {
let source = ""

@@ -378,29 +397,41 @@
console.log("state.qtSign",state.qtSign,state.qtSign=='0')
// 记账卡
if(state.cardType=='1'){
// 去诺德签约
if(state.qtSign=='0'){
if(state.qdSignAppId){
uni.navigateToMiniProgram({
appId: state.qdSignAppId,
path: state.qdSignUrl,
extraData: {},
envVersion:'trial',
success(res) {
state.payOK=true
console.log(res);
},
complete(res) {
console.log(res);
},
fail(res) {
console.log(res);
// 未成功跳转到车主小程序
},
});
}else{
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
}
// 去签约,已经签约完,回来查订单详情,如果是激活就去激活
orderDetail().then((res) => {
if (res['orderStep'] == OrderStatus['待激活']) {
// 已签约
gotoActiveOrder(getItem('orderQueryActivate'))
}else{
// 未签约
if(state.qdSignAppId){
uni.navigateToMiniProgram({
appId: state.qdSignAppId,
path: state.qdSignUrl,
extraData: {},
envVersion:'trial',
success(res) {
state.payOK=true
console.log(res);
},
complete(res) {
console.log(res);
},
fail(res) {
console.log(res);
// 未成功跳转到车主小程序
},
});
}else{
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
}
}
})
}else{
// 签约
uni.redirectTo({
@@ -576,7 +607,7 @@
qtSign:"",
xianxia:"",//线下订单 1
payOK:false,
cardType:""
cardType:"",
});
</script>


Loading…
İptal
Kaydet