state.vehicleId = option.vehicleId; | state.vehicleId = option.vehicleId; | ||||
state.orderQuery = option.orderQuery; | state.orderQuery = option.orderQuery; | ||||
state.qdSignUrl = option.qdSignUrl; | state.qdSignUrl = option.qdSignUrl; | ||||
state.qdSignAppId = option.qdSignAppId; | |||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
uni.login({ | uni.login({ | ||||
provider: "weixin", | provider: "weixin", | ||||
// isValueCard 1 储值卡 2 记账卡 | // isValueCard 1 储值卡 2 记账卡 | ||||
if (state.isValueCard == 1) { | if (state.isValueCard == 1) { | ||||
if (state.orderQuery == '1') { | if (state.orderQuery == '1') { | ||||
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl)) | |||||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params) | |||||
if(state.qdSignAppId){ | |||||
uni.navigateToMiniProgram({ | |||||
appId: state.qdSignAppId, | |||||
path: state.qdSignUrl, | |||||
extraData: {}, | |||||
success(res) { | |||||
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 { | } else { | ||||
uni.switchTab({ | uni.switchTab({ | ||||
url: "/pages/order/order" | url: "/pages/order/order" | ||||
longitude: "", | longitude: "", | ||||
latitude: "", | latitude: "", | ||||
openidData: {}, | openidData: {}, | ||||
qdSignUrl:"" | |||||
qdSignUrl:"", | |||||
qdSignAppId:"" | |||||
}); | }); | ||||
</script> | </script> |
isValueCard = 2 | isValueCard = 2 | ||||
} | } | ||||
// orderQuery 1 订单查询 0正常订单 | // orderQuery 1 订单查询 0正常订单 | ||||
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=${isValueCard}&vehicleId=${vehicleId}&orderQuery=1&qdSignUrl=${state.details['qdSignUrl']}`); | |||||
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=${isValueCard}&vehicleId=${vehicleId}&orderQuery=1&qdSignUrl=${state.details['qdSignUrl']}&qdSignAppId=${state.details['qdSignAppId']}`); | |||||
}) | }) | ||||
} else if (state.details['orderStep'] == OrderStatus['已支付/待签约']) { | } else if (state.details['orderStep'] == OrderStatus['已支付/待签约']) { | ||||
// 去签约 | // 去签约 | ||||
if (state.details['qtSign'] == 0) { | if (state.details['qtSign'] == 0) { | ||||
const params = encodeURIComponent(JSON.stringify(state.details.qdSignUrl)) | |||||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params) | |||||
if(state.details['qdSignAppId']){ | |||||
uni.navigateToMiniProgram({ | |||||
appId: state.details['qdSignAppId'], | |||||
path: state.details['qdSignUrl'], | |||||
extraData: {}, | |||||
success(res) { | |||||
console.log(res); | |||||
}, | |||||
complete(res) { | |||||
console.log(res); | |||||
}, | |||||
fail(res) { | |||||
console.log(res); | |||||
// 未成功跳转到车主小程序 | |||||
}, | |||||
}); | |||||
}else{ | |||||
const params = encodeURIComponent(JSON.stringify(state.details['qdSignUrl'])) | |||||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params) | |||||
} | |||||
} else { | } else { | ||||
navTo(`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=1`); | navTo(`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=1`); | ||||
} | } |