Commit 700e47fd authored by gengchunlei's avatar gengchunlei

医生端 v1.0.4 1、小程序对接 接口不能用id查询详情调整

parent 5c10002f
...@@ -28,7 +28,7 @@ export function fetchBase({ ...@@ -28,7 +28,7 @@ export function fetchBase({
contentType === 'form' && (contentType = 'application/x-www-form-urlencoded') contentType === 'form' && (contentType = 'application/x-www-form-urlencoded')
contentType === 'json' && (contentType = 'application/json; charset=utf-8') contentType === 'json' && (contentType = 'application/json; charset=utf-8')
contentType === 'file' && (contentType = 'multipart/form-data') contentType === 'file' && (contentType = 'multipart/form-data')
const token = sessionStorage.getItem('token') || ''
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (loading) { if (loading) {
loadingList++ loadingList++
...@@ -40,7 +40,8 @@ export function fetchBase({ ...@@ -40,7 +40,8 @@ export function fetchBase({
params: params, params: params,
data: body, data: body,
headers: { headers: {
'Content-Type': contentType 'Authorization': `${token}`,
'Content-Type': contentType,
} }
}).then(function (response) { }).then(function (response) {
const data = response.data || {} const data = response.data || {}
......
...@@ -65,6 +65,10 @@ export default { ...@@ -65,6 +65,10 @@ export default {
this.store.$patch({ dict: res.data || {} }) this.store.$patch({ dict: res.data || {} })
let idCard = getQueryVariable('idCard') let idCard = getQueryVariable('idCard')
let embed = getQueryVariable('embed') let embed = getQueryVariable('embed')
let token = getQueryVariable('token')
if (token) {
window.sessionStorage.setItem('token', token)
}
if (embed) { if (embed) {
window.sessionStorage.setItem('embed', embed) window.sessionStorage.setItem('embed', embed)
} }
......
...@@ -141,9 +141,9 @@ export default { ...@@ -141,9 +141,9 @@ export default {
}, },
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
let path = `/residentWX/screening/firstDetail/${record.id}` let path = `/residentWX/screening/firstDetail/${record.relationUuid}`
if (this.activeTab == '2') { if (this.activeTab == '2') {
path = `/residentWX/screening/SecondDetail/${record.id}` path = `/residentWX/screening/SecondDetail/${record.relationUuid}`
} }
this.$router.push({ path }) this.$router.push({ path })
} }
......
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
methods: { methods: {
init() { init() {
firstScreenDetail({ id: this.id }).then(res => { firstScreenDetail({ relationUuid: this.id }).then(res => {
this.info = res.data || {} this.info = res.data || {}
this.collapseList[0].info = this.info?.residentsRecord this.collapseList[0].info = this.info?.residentsRecord
this.collapseList[1].info = this.info this.collapseList[1].info = this.info
......
...@@ -737,7 +737,7 @@ export default { ...@@ -737,7 +737,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
secondScreenDetail({ id: this.id }).then(res => { secondScreenDetail({ relationUuid: this.id }).then(res => {
let result = res.data || {} let result = res.data || {}
this.info = result this.info = result
this.highRiskListHandle(result) this.highRiskListHandle(result)
......
...@@ -170,19 +170,19 @@ export default { ...@@ -170,19 +170,19 @@ export default {
let path = `` let path = ``
//主要慢病高危随访 //主要慢病高危随访
if (item.tabs == 1) { if (item.tabs == 1) {
path = `FirstFUDetail/${item.id}` path = `FirstFUDetail/${item.relationUuid}`
} }
//专病高危随访 //专病高危随访
if (item.tabs == 2) { if (item.tabs == 2) {
path = `SecondFUDetail/${item.id}` path = `SecondFUDetail/${item.relationUuid}`
} }
//专病随访 //专病随访
if (item.tabs == 3) { if (item.tabs == 3) {
path = `SeparateFUDetail/${item.id}/${item.diseaseType}` path = `SeparateFUDetail/${item.relationUuid}/${item.diseaseType}`
} }
//通用随访 //通用随访
if (item.tabs == 4) { if (item.tabs == 4) {
path = `GeneralFUDetail/${item.id}` path = `GeneralFUDetail/${item.relationUuid}`
} }
this.$router.push({ this.$router.push({
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
queryMajorFUDetail({ id: this.id }).then(res => { queryMajorFUDetail({ relationUuid: this.id }).then(res => {
this.info = res.data || {} this.info = res.data || {}
this.collapseList[0].info = this.info?.residentsRecord this.collapseList[0].info = this.info?.residentsRecord
this.collapseList[1].info = this.info this.collapseList[1].info = this.info
......
...@@ -359,7 +359,7 @@ export default { ...@@ -359,7 +359,7 @@ export default {
return return
} }
let par = { let par = {
id: this.routerDetail.relationId relationUuid: this.routerDetail.relationId
} }
queryGeneralFUDetail(par).then(res => { queryGeneralFUDetail(par).then(res => {
let result = res.data || {} let result = res.data || {}
......
...@@ -737,7 +737,7 @@ export default { ...@@ -737,7 +737,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
querySpecificFUDetail({ id: this.id }).then(res => { querySpecificFUDetail({ relationUuid: this.id }).then(res => {
let result = res.data || {} let result = res.data || {}
this.info = result this.info = result
this.highRiskListHandle(result) this.highRiskListHandle(result)
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
return return
} }
let params = { let params = {
id: relationId, relationUuid: relationId,
diseaseType, diseaseType,
} }
querySeparateFUDetail(params).then(res => { querySeparateFUDetail(params).then(res => {
......
...@@ -39,12 +39,12 @@ module.exports = defineConfig({ ...@@ -39,12 +39,12 @@ module.exports = defineConfig({
} }
}, },
'/chronic-resident': { '/chronic-resident': {
// target: 'http://192.168.1.142:8903', target: 'http://192.168.1.169:8903',
target: 'https://beta-tumour.zmnyjk.com', // target: 'https://beta-tumour.zmnyjk.com',
changOrigin: true, changOrigin: true,
pathRewrite: { pathRewrite: {
// '^/chronic-resident': '/', '^/chronic-resident': '/',
'^/chronic-resident': '/chronic-resident' // '^/chronic-resident': '/chronic-resident'
} }
} }
}, },
......
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