Commit 700e47fd authored by gengchunlei's avatar gengchunlei

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

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