提交 8d344812 编写于 作者: 张磊's avatar 张磊

lz-insurance

上级 5eae1572
......@@ -72,6 +72,19 @@
</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
v-if="!expireFlag"
class="detail-bottom"
......@@ -219,14 +232,23 @@ export default {
expireFlag:false,
query: {},
isUnderLine:false,
insuranceText:{}
insuranceText:{},
qrcodeUrl:'',
verificationCode:'',
intervalId:null,
status:'',
};
},
computed: {
...mapGetters('home', ['insuranceInfo']),
},
created() {
this.dataRefreh();
},
mounted() {
// this.$loading.show();
this.$loading.show();
const { yunOrderNo, projectEquityNo} = this.$route.query;
this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo;
......@@ -240,13 +262,67 @@ export default {
web_data:{yunOrderNo: yunOrderNo},
});
},
destroyed() {
this.clear();
},
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) {
console.log('appointDetail-yunOrderNo', yunOrderNo);
const that = this;
getDetailByYunOrderNo(yunOrderNo).then(res => {
const {expireFlag} = res.data;
this.detailInfo = res.data;
this.expireFlag = expireFlag || '';
this.isUnderLine = res.data.detectionCategory == 2;
if(res.code == '000000') {
console.log('appointDetail-orderInfo', res);
const {expireFlag, qrCodeUrl, verificationCode, status, detectionKind, detectionServiceRecordId, sampleCode, externalOrderNo, projectEquityNo} = res.data;
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();
});
},
......@@ -282,7 +358,6 @@ export default {
});
});
},
reAppoint() {
const that = this;
this.$sendBuriedData({
......@@ -395,7 +470,6 @@ export default {
longitude: this.detailInfo.longitude,
name: this.detailInfo.hospitalName,
};
console.log(this.$rocNative.WXInstance);
this.$rocNative.WXInstance.openLocation(addressInfo);
return;
}
......@@ -505,6 +579,40 @@ export default {
border-radius: 15px;
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 {
background: #F9FAFB;
border-radius: 11px;
......
......@@ -132,7 +132,7 @@
<script>
import { createOrderSzV2} from '@/api/question';
import {getBanner} from '@/api/entitlement';
const { VUE_APP_ENV } = process.env;
// const { VUE_APP_ENV } = process.env;
let that;
export default {
data() {
......@@ -153,8 +153,8 @@ export default {
name: '',
},
showProtocol:false,
envVersion: VUE_APP_ENV == 'production' ? 'release' : 'trial',
// envVersion:'trial',
// envVersion: VUE_APP_ENV == 'production' ? 'release' : 'trial',
envVersion:'trial',
openWebAppConfigPositive:{
username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path:'pagesInsurance/all-entrance/index', // 打开页面
......
......@@ -25,15 +25,15 @@
</template>
<script>
const { VUE_APP_ENV } = process.env;
// const { VUE_APP_ENV } = process.env;
import {getEntitlementList} from '@/api/entitlement';
import {getDetailtxt} from '@/api/appoint';
let that;
export default {
data() {
return {
envVersion: VUE_APP_ENV == 'production' ? 'release' : 'trial',
// envVersion:'trial',
// envVersion: VUE_APP_ENV == 'production' ? 'release' : 'trial',
envVersion:'trial',
openWebAppConfigPositive:{
username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path:'pagesInsurance/all-entrance/index', // 打开页面
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册