Commit 273bcb0b authored by 郭志伟's avatar 郭志伟

feat: 顾问终版联调

parent 879cbdd7
...@@ -20,6 +20,11 @@ export const getCulsuggestion = param => { ...@@ -20,6 +20,11 @@ export const getCulsuggestion = param => {
return req.get("consultant/suggestion/detail", param); return req.get("consultant/suggestion/detail", param);
}; };
// 创建顾问订单-查询顾问信息
export const getCulInfo = param => {
return req.post("consultant/info", param);
};
// 查询顾问订单信息 // 查询顾问订单信息
export const getCulOrder = param => { export const getCulOrder = param => {
return req.get("consultant/order/query", param); return req.get("consultant/order/query", param);
......
...@@ -3,5 +3,17 @@ export default { ...@@ -3,5 +3,17 @@ export default {
serviceHours: "9:00-21:00", serviceHours: "9:00-21:00",
sobot: "", sobot: "",
icp: "京ICP备15059975号", icp: "京ICP备15059975号",
copyright: "全天候保险代理股份有限公司" copyright: "全天候保险代理股份有限公司",
consultant: {
name: "赵玉龙",
role: "金牌保险顾问",
card: "20192000000080002020003828",
id: "tgc5Dswotks",
qrcode: "",
avator: "",
serveNum: "-",
rate: "-%",
tel: "13888888888",
date: "9:00 ~ 21:00"
}
}; };
...@@ -9,19 +9,27 @@ ...@@ -9,19 +9,27 @@
<svg-icon icon-class="triangle-right" slot="button" /> <svg-icon icon-class="triangle-right" slot="button" />
</div> </div>
<cr-popup v-model="show" position="bottom" get-container="body"> <cr-popup v-model="show" position="bottom" get-container="body">
<cr-date-picker ref="datepicker" @confirm="onConfirm" @cancel="onCancel" /> <cr-date-picker
ref="datepicker"
@confirm="onConfirm"
@cancel="onCancel"
:init-value="initVal"
/>
</cr-popup> </cr-popup>
</div> </div>
</template> </template>
<script> <script>
import popupPickerMixin from "../mixins/popupPicker.mixin.js"; import popupPickerMixin from "../mixins/popupPicker.mixin.js";
import { parseTime } from "@/service/utils";
export default { export default {
name: "PopupDatePicker", name: "PopupDatePicker",
mixins: [popupPickerMixin], mixins: [popupPickerMixin],
data() { data() {
return { return {
refName: "datepicker" refName: "datepicker",
initVal: parseTime("", "{y}-{m}-{d}")
}; };
}, },
methods: { methods: {
......
export default { export default {
basicHost: "http://yapi.quantgroups.com/mock/329/", // basicHost: "http://yapi.quantgroups.com/mock/329/",
// basicHost: "http://192.168.29.211:8964/", basicHost: "http://192.168.29.211:8964/",
wxAppId: "wx514de17b23d53a20" wxAppId: "wx514de17b23d53a20"
}; };
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h1>{{ info.name }}</h1> <h1>{{ info.name }}</h1>
<cr-tag><svg-icon icon-class="medal" />{{ info.role }}</cr-tag> <cr-tag><svg-icon icon-class="medal" />{{ info.role }}</cr-tag>
<small>执业保险销售资质:</small> <small>执业保险销售资质:</small>
<small v-html="`${info.id.slice(0, 15)}<br />${info.id.slice(15)}`"></small> <small v-html="`${info.card.slice(0, 15)}<br />${info.id.slice(15)}`"></small>
</div> </div>
<cr-image <cr-image
class="cul-hd-img" class="cul-hd-img"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="cul-entry-title"> <div class="cul-entry-title">
<h3>您的专属保险方案</h3> <h3>您的专属保险方案</h3>
<small>CAPTIVE INSURANC</small> <small>CAPTIVE INSURANC</small>
<cr-tag>自己</cr-tag> <cr-tag v-if="relation">{{ relation }}</cr-tag>
</div> </div>
<svg-icon icon-class="arrow-right" /> <svg-icon icon-class="arrow-right" />
</router-link> </router-link>
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
<script> <script>
import copyright from "@/components/Copyright"; import copyright from "@/components/Copyright";
import Card from "@/components/Card"; import Card from "@/components/Card";
import { getCulInfo } from "@/api/consultant";
import { getCulsuggestion } from "@/api/consultant";
import settings from "@/api/settings";
const { consultant } = settings;
export default { export default {
name: "ConsultantExclusive", name: "ConsultantExclusive",
components: { components: {
...@@ -98,16 +102,9 @@ export default { ...@@ -98,16 +102,9 @@ export default {
}, },
data() { data() {
return { return {
relation: "",
info: { info: {
name: "李玉婷", ...consultant
role: "金牌保险顾问",
id: "20192000000080002020003828",
qrcode: "",
avator: "",
serveNum: 38100,
rate: "99.8%",
tel: "13888888888",
date: "9:00 ~ 21:00"
}, },
oddsInsureList: [ oddsInsureList: [
{ {
...@@ -135,7 +132,34 @@ export default { ...@@ -135,7 +132,34 @@ export default {
] ]
}; };
}, },
mounted() {} watch: {
hasSuggestion: {
immediate: true,
handler(val) {
if (val) {
this.getSuggestion();
}
}
}
},
mounted() {
this.getInfo();
},
methods: {
async getInfo() {
const res = await getCulInfo({ consultantSecId: this.info.id });
if (res) {
this.info.rate = res.satisfaction;
this.info.serveNum = res.serviceNum;
}
},
async getSuggestion() {
const res = await getCulsuggestion();
if (res) {
this.relation = res.relation;
}
}
}
}; };
</script> </script>
<style lang="less" src="./index.less" scoped></style> <style lang="less" src="./index.less" scoped></style>
...@@ -2,20 +2,18 @@ ...@@ -2,20 +2,18 @@
<div class="container"> <div class="container">
<div class="cul-hd"> <div class="cul-hd">
<div class="cul-hd-rec"> <div class="cul-hd-rec">
<small class="cul-hd-rec-sub"> <small class="cul-hd-rec-sub"> HI,{{ goodInfo.name || "-" }}</small>
HI,{{ baseInfo.userName }}{{ baseInfo.sex === 1 ? "先生" : "女士" }} <h4 class="cul-hd-rec-title">以下是您{{ goodInfo.relation || "-" }}的专属保险方案</h4>
</small>
<h4 class="cul-hd-rec-title">以下是您本人的专属保险方案</h4>
</div> </div>
<card title="1"> <card title="1">
<h5 class="cul-hd-card-title" slot="header"> <h5 class="cul-hd-card-title" slot="header">
总保费: 总保费:
<strong>{{ goodInfo.totalAmount }}</strong> <strong>{{ goodInfo.totalAmount || "-" }}</strong>
{{ baseInfo.unit }} 元/年
</h5> </h5>
<p class="cul-hd-card-content"> <p class="cul-hd-card-content">
推荐理由: 推荐理由:
{{ goodInfo.remarks }} {{ goodInfo.remarks || "-" }}
</p> </p>
</card> </card>
</div> </div>
...@@ -106,13 +104,6 @@ export default { ...@@ -106,13 +104,6 @@ export default {
goodInfo: { goodInfo: {
ensure: [] ensure: []
}, },
baseInfo: {
userName: "王斌",
sex: 1,
amount: 10425,
unit: "元/年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
distList: [ distList: [
{ title: "医疗险", price: "500万" }, { title: "医疗险", price: "500万" },
{ title: "重疾险", price: "50万" }, { title: "重疾险", price: "50万" },
......
...@@ -169,9 +169,9 @@ export default { ...@@ -169,9 +169,9 @@ export default {
formData: { formData: {
birthday: "", birthday: "",
socialSecurity: "", socialSecurity: "",
annualIncome: "", annualIncome: "10万",
loan: "", loan: "无房贷",
addressCode: "111,111,11", addressCode: "北京市,北京市",
questionType: "", questionType: "",
userName: "", userName: "",
gender: "", gender: "",
...@@ -306,12 +306,16 @@ export default { ...@@ -306,12 +306,16 @@ export default {
if (type === "annualIncome" || type === "loan") { if (type === "annualIncome" || type === "loan") {
value = value[0]; value = value[0];
} }
// if (type === "area") {} if (type === "addressCode") {
value = value.map(item => item.name).join(",");
}
this.formData[type] = value; this.formData[type] = value;
}, },
async onSubmit() { async onSubmit() {
const { formData } = this; const { formData } = this;
const res = await subCulQus(formData); const { socialSecurity, gender } = formData;
const params = { ...formData, ...{ socialSecurity: +socialSecurity, gender: +gender } };
const res = await subCulQus(params);
if (res) { if (res) {
setTimeout(() => { setTimeout(() => {
this.showSubState = false; this.showSubState = false;
......
...@@ -36,14 +36,14 @@ export default { ...@@ -36,14 +36,14 @@ export default {
orderInfo: [ orderInfo: [
{ {
consultantOrderNo: "", consultantOrderNo: "",
state: 0 state: -1
} }
] ]
}; };
}, },
computed: { computed: {
orderState() { orderState() {
return this.orderInfo[0] ? this.orderInfo[0].state : 0; return this.orderInfo[0] ? this.orderInfo[0].state : -1;
}, },
...mapState(["isShowLogin"]) ...mapState(["isShowLogin"])
}, },
......
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