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

feat: 支付完善

parent 684c8aa3
......@@ -16,7 +16,9 @@ export default {
},
methods: {
async generateOrder() {
const res = await placeOrder.create(...this.subFromData);
const res = await placeOrder.create({
...this.subFromData
});
if (res) {
this.orderInfo = res;
this.goPay();
......@@ -32,7 +34,7 @@ export default {
const res = await placeOrder.pay({ payOrderNo, payType, tradeType });
if (res) {
let payInfo = {
url: res.data.payUrl,
url: res.payUrl,
params: {
...orderInfo,
tradeType,
......@@ -40,7 +42,7 @@ export default {
}
};
if (tradeType === "JSAPI") {
payInfo = res.data.payInfo;
payInfo = res.payInfo;
}
payByWay(tradeType, payInfo).then(() => {
this.$router.push({ url: "/policy/detail", query: { id: orderNo } });
......
......@@ -156,6 +156,7 @@
>
<div class="form-unit" slot="button">公斤</div>
</cr-field>
<template v-if="formData.insuredUserInfo.relation !== '1'">
<cr-field
v-model="formData.insuredUserInfo.name"
name="insuredUserInfo.name"
......@@ -246,6 +247,7 @@
/>
</template>
</cr-field>
</template>
</cr-cell-group>
<cr-cell-group title="保障方案">
<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