Commit 04344062 authored by 郭志伟's avatar 郭志伟 Committed by 郝聪敏

feat: 支付完善

parent 684c8aa3
...@@ -16,7 +16,9 @@ export default { ...@@ -16,7 +16,9 @@ export default {
}, },
methods: { methods: {
async generateOrder() { async generateOrder() {
const res = await placeOrder.create(...this.subFromData); const res = await placeOrder.create({
...this.subFromData
});
if (res) { if (res) {
this.orderInfo = res; this.orderInfo = res;
this.goPay(); this.goPay();
...@@ -32,7 +34,7 @@ export default { ...@@ -32,7 +34,7 @@ export default {
const res = await placeOrder.pay({ payOrderNo, payType, tradeType }); const res = await placeOrder.pay({ payOrderNo, payType, tradeType });
if (res) { if (res) {
let payInfo = { let payInfo = {
url: res.data.payUrl, url: res.payUrl,
params: { params: {
...orderInfo, ...orderInfo,
tradeType, tradeType,
...@@ -40,7 +42,7 @@ export default { ...@@ -40,7 +42,7 @@ export default {
} }
}; };
if (tradeType === "JSAPI") { if (tradeType === "JSAPI") {
payInfo = res.data.payInfo; payInfo = res.payInfo;
} }
payByWay(tradeType, payInfo).then(() => { payByWay(tradeType, payInfo).then(() => {
this.$router.push({ url: "/policy/detail", query: { id: orderNo } }); this.$router.push({ url: "/policy/detail", query: { id: orderNo } });
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
> >
<div class="form-unit" slot="button">公斤</div> <div class="form-unit" slot="button">公斤</div>
</cr-field> </cr-field>
<template v-if="formData.insuredUserInfo.relation !== '1'">
<cr-field <cr-field
v-model="formData.insuredUserInfo.name" v-model="formData.insuredUserInfo.name"
name="insuredUserInfo.name" name="insuredUserInfo.name"
...@@ -246,6 +247,7 @@ ...@@ -246,6 +247,7 @@
/> />
</template> </template>
</cr-field> </cr-field>
</template>
</cr-cell-group> </cr-cell-group>
<cr-cell-group title="保障方案"> <cr-cell-group title="保障方案">
<cr-field <cr-field
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment