提交 38bda998 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release'

lz-insurance

See merge request !259
...@@ -72,6 +72,19 @@ ...@@ -72,6 +72,19 @@
</div> </div>
</div> </div>
</div> </div>
<div class="detail-qrcode-content">
<van-image
width="189px"
height="189px"
:src="qrcodeUrl"
/>
<div class="cancel-code">
{{ `核销码:${verificationCode}` }}
</div>
<div class="tips">
请截图保存图片<br>检测时出示给检测人员
</div>
</div>
<div <div
v-if="!expireFlag" v-if="!expireFlag"
class="detail-bottom" class="detail-bottom"
...@@ -219,14 +232,23 @@ export default { ...@@ -219,14 +232,23 @@ export default {
expireFlag:false, expireFlag:false,
query: {}, query: {},
isUnderLine:false, isUnderLine:false,
insuranceText:{} insuranceText:{},
qrcodeUrl:'',
verificationCode:'',
intervalId:null,
status:'',
}; };
}, },
computed: { computed: {
...mapGetters('home', ['insuranceInfo']), ...mapGetters('home', ['insuranceInfo']),
}, },
created() {
this.dataRefreh();
},
mounted() { mounted() {
// this.$loading.show(); this.$loading.show();
const { yunOrderNo, projectEquityNo} = this.$route.query; const { yunOrderNo, projectEquityNo} = this.$route.query;
this.yunOrderNo = yunOrderNo; this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
...@@ -240,13 +262,67 @@ export default { ...@@ -240,13 +262,67 @@ export default {
web_data:{yunOrderNo: yunOrderNo}, web_data:{yunOrderNo: yunOrderNo},
}); });
}, },
destroyed() {
this.clear();
},
methods: { methods: {
// 定时刷新数据函数
dataRefreh() {
// 计时器正在进行中,退出函数
if (this.intervalId != null) {
return;
}
// 计时器为空,操作
this.intervalId = setInterval(() => {
this.dataRefreh();
this.getDetailByYunOrderNo(this.yunOrderNo);
}, 3000);
},
// 停止定时器
clear() {
clearInterval(this.intervalId);// 清除计时器
this.intervalId = null; // 设置为null
},
getDetailByYunOrderNo(yunOrderNo) { getDetailByYunOrderNo(yunOrderNo) {
console.log('appointDetail-yunOrderNo', yunOrderNo);
const that = this;
getDetailByYunOrderNo(yunOrderNo).then(res => { getDetailByYunOrderNo(yunOrderNo).then(res => {
const {expireFlag} = res.data; if(res.code == '000000') {
this.detailInfo = res.data; console.log('appointDetail-orderInfo', res);
this.expireFlag = expireFlag || ''; const {expireFlag, qrCodeUrl, verificationCode, status, detectionKind, detectionServiceRecordId, sampleCode, externalOrderNo, projectEquityNo} = res.data;
this.isUnderLine = res.data.detectionCategory == 2; this.detailInfo = res.data;
this.expireFlag = expireFlag || '';
this.isUnderLine = res.data.detectionCategory == 2;
this.qrcodeUrl = qrCodeUrl;
this.verificationCode = verificationCode;
if(window._miniprogram) {
if(status != '0202') {
let url;
if(detectionKind == 1) {
url = `/pagesInsurance/sz-insurance/quick-detection-confirm-success?detectionRecordId=${detectionServiceRecordId}&projectEquityNo=${that.projectEquityNo}&yunOrderNo=${that.yunOrderNo}`;
}
if(detectionKind == 0) {
url = `/pages/health/detection-confirm-success/index?detectionRecordId=${detectionServiceRecordId}&yunOrderNo=${that.yunOrderNo}&code=${sampleCode}`;
}
this.clear();
this.$rocNative.WXInstance.miniProgram.redirectTo({url});
}
}else{
if(status != '0202') {
this.clear();
this.$router.push({
path: `/home?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}`,
});
}
}
}else{
this.$toast(res.message || '操作失败');
}
this.$loading.hide(); this.$loading.hide();
}); });
}, },
...@@ -282,7 +358,6 @@ export default { ...@@ -282,7 +358,6 @@ export default {
}); });
}); });
}, },
reAppoint() { reAppoint() {
const that = this; const that = this;
this.$sendBuriedData({ this.$sendBuriedData({
...@@ -395,7 +470,6 @@ export default { ...@@ -395,7 +470,6 @@ export default {
longitude: this.detailInfo.longitude, longitude: this.detailInfo.longitude,
name: this.detailInfo.hospitalName, name: this.detailInfo.hospitalName,
}; };
console.log(this.$rocNative.WXInstance);
this.$rocNative.WXInstance.openLocation(addressInfo); this.$rocNative.WXInstance.openLocation(addressInfo);
return; return;
} }
...@@ -505,6 +579,40 @@ export default { ...@@ -505,6 +579,40 @@ export default {
border-radius: 15px; border-radius: 15px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.detail-qrcode-content{
padding: 20px 0;
border-radius: 11px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 10px;
.cancel-code{
width: 165px;
height: 31px;
background: #F9FAFB;
border-radius: 15px;
font-size: 14px;
color: #666666;
text-align: center;
line-height: 31px;
margin: 2px 0 4.5px 0;
}
.tips{
width: 210px;
height: 50px;
font-size: 18px;
text-align: center;
font-weight: 700;
color: #212121;
line-height: 25px;
}
}
.detail-top-info { .detail-top-info {
background: #F9FAFB; background: #F9FAFB;
border-radius: 11px; border-radius: 11px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册