|
|
@ -3,11 +3,12 @@ |
|
|
|
* @email: 18603454788@163.com |
|
|
|
* @Date: 2021-04-19 10:23:19 |
|
|
|
* @LastEditors: aBin |
|
|
|
* @LastEditTime: 2021-06-11 15:50:57 |
|
|
|
* @LastEditTime: 2021-07-08 15:33:53 |
|
|
|
--> |
|
|
|
<template> |
|
|
|
<a-config-provider :locale="zh_CN"> |
|
|
|
<div v-if="isRouter" class="d-flex flex-row flex-nowrap" id="app"> |
|
|
|
<!-- <div class="d-flex flex-row flex-nowrap" id="app"> --> |
|
|
|
<!-- <btn-con /> --> |
|
|
|
<router-view class="flex-1 bg" style="padding: 6px"></router-view> |
|
|
|
</div> |
|
|
@ -26,6 +27,7 @@ export default { |
|
|
|
data() { |
|
|
|
return { zh_CN, isRouter: false }; |
|
|
|
}, |
|
|
|
computed: mapState('home', ['anyringToken', 'ptProps']), |
|
|
|
watch: { |
|
|
|
anyringToken(val) { |
|
|
|
if (val) { |
|
|
@ -33,14 +35,11 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: mapState('home', ['anyringToken', 'ptProps']), |
|
|
|
|
|
|
|
async created() { |
|
|
|
// async created() { |
|
|
|
// const userId = '1387952026067013632'; |
|
|
|
// const params = { userId }; |
|
|
|
// await this.getUserId(params); |
|
|
|
// await this.getToken(); |
|
|
|
// const userId = '1387952026067013632'; |
|
|
|
// const params = { userId }; |
|
|
|
// await this.getUserId(params); |
|
|
|
// await this.getToken(); |
|
|
|
if (localStorage.getItem('patientId')) { |
|
|
|
this.setPatientId(localStorage.getItem('patientId')); |
|
|
|
} |
|
|
@ -71,10 +70,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
isMobile() { |
|
|
|
this.flag = navigator.userAgent.match( |
|
|
|
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i, |
|
|
|
); |
|
|
|
if (this.flag === null) { |
|
|
|
this.flag = device.mobile(); |
|
|
|
if (!this.flag) { |
|
|
|
console.log('pc端'); |
|
|
|
this.getPtpropsPC(); |
|
|
|
} else { |
|
|
@ -109,7 +106,7 @@ export default { |
|
|
|
const params = { userId: props.userId }; |
|
|
|
await that.getUserId(params); |
|
|
|
await that.getToken(); |
|
|
|
await that.getHospitalId(data.data.projectId); |
|
|
|
await that.getHospitalId(props.projectId); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|