diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/components/form-template/form-cell/form-multiple-diseases.vue b/components/form-template/form-cell/form-multiple-diseases.vue new file mode 100644 index 0000000..897830f --- /dev/null +++ b/components/form-template/form-cell/form-multiple-diseases.vue @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/components/form-template/form-cell/form-upload.vue b/components/form-template/form-cell/form-upload.vue new file mode 100644 index 0000000..2fdcb00 --- /dev/null +++ b/components/form-template/form-cell/form-upload.vue @@ -0,0 +1,110 @@ + + + + \ No newline at end of file diff --git a/components/form-template/form-cell/index.vue b/components/form-template/form-cell/index.vue index b6339f4..f54aa8b 100644 --- a/components/form-template/form-cell/index.vue +++ b/components/form-template/form-cell/index.vue @@ -1,11 +1,21 @@ + diff --git a/pages/health/record.vue b/pages/health/record.vue new file mode 100644 index 0000000..7b5e3a5 --- /dev/null +++ b/pages/health/record.vue @@ -0,0 +1,176 @@ + + + \ No newline at end of file diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 5d27c9c..ef849ae 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -54,12 +54,12 @@ 基础信息填写 - + - 个人住院信息 + 个人健康信息 - 住院信息列表 + 健康信息列表 @@ -103,8 +103,18 @@ function fillBaseInfo() { toast('请先授权本服务团队') } else { uni.navigateTo({ - url: `/pages/archive/edit-archive?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}`, - complete: console.log + url: `/pages/archive/edit-archive?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}` + }) + } +} + +function toHealthList() { + if (canAuth.value) { + toast('请先授权本服务团队') + } else { + const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : ''}` + uni.navigateTo({ + url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}&name=${encodeURIComponent(name)}` }) } } diff --git a/pages/library/diagnosis-list.vue b/pages/library/diagnosis-list.vue new file mode 100644 index 0000000..e02349a --- /dev/null +++ b/pages/library/diagnosis-list.vue @@ -0,0 +1,159 @@ + + + \ No newline at end of file diff --git a/pages/login/login.vue b/pages/login/login.vue index 2234006..1bd6e10 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -1,143 +1,156 @@ diff --git a/pages/login/redirect-page.vue b/pages/login/redirect-page.vue index 14fb39f..6a0da11 100644 --- a/pages/login/redirect-page.vue +++ b/pages/login/redirect-page.vue @@ -38,10 +38,19 @@ async function changeTeam({ teamId, corpId, corpName }) { } onLoad(options => { - teamId.value = options.teamId || ''; - corpId.value = options.corpId || ''; - changeTeam({ teamId: teamId.value, corpId: corpId.value }); + const href = typeof options.q === 'string' ? decodeURIComponent(options.q) : ''; + const [, url = ''] = href.split('?'); + const data = url.split('&').reduce((acc, cur) => { + console.log(cur) + const [key, value] = cur.split('='); + console.log(key, '=====', value) + acc[key] = value; + return acc; + }, {}) + changeTeam(data) }) + + \ No newline at end of file diff --git a/pages/work/work.vue b/pages/work/work.vue new file mode 100644 index 0000000..85ca984 --- /dev/null +++ b/pages/work/work.vue @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index 5047976..65354f2 100644 --- a/routes/index.js +++ b/routes/index.js @@ -28,6 +28,14 @@ export default [ path: 'pages/health/list', meta: { title: '健康信息', login: true } }, + { + path: 'pages/health/record', + meta: { title: '健康信息', login: true } + }, + { + path: 'pages/library/diagnosis-list', + meta: { title: '选择诊断' } + }, { path: 'pages/team/team-detail', meta: { title: '团队介绍', login: true } diff --git a/static/file.svg b/static/file.svg new file mode 100644 index 0000000..e32ae2a --- /dev/null +++ b/static/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/tabbar/cart.png b/static/tabbar/cart.png new file mode 100644 index 0000000..94bb532 Binary files /dev/null and b/static/tabbar/cart.png differ diff --git a/static/tabbar/cart_selected.png b/static/tabbar/cart_selected.png new file mode 100644 index 0000000..921aefb Binary files /dev/null and b/static/tabbar/cart_selected.png differ diff --git a/static/tabbar/center.png b/static/tabbar/center.png new file mode 100644 index 0000000..8b7da37 Binary files /dev/null and b/static/tabbar/center.png differ diff --git a/static/tabbar/center_selected.png b/static/tabbar/center_selected.png new file mode 100644 index 0000000..8a1d755 Binary files /dev/null and b/static/tabbar/center_selected.png differ diff --git a/static/tabbar/home.png b/static/tabbar/home.png new file mode 100644 index 0000000..7e5e6df Binary files /dev/null and b/static/tabbar/home.png differ diff --git a/static/tabbar/home_selected.png b/static/tabbar/home_selected.png new file mode 100644 index 0000000..667db62 Binary files /dev/null and b/static/tabbar/home_selected.png differ diff --git a/utils/api.js b/utils/api.js index 505caaf..996c989 100644 --- a/utils/api.js +++ b/utils/api.js @@ -7,19 +7,26 @@ const urlsConfig = { getTeamData: 'getTeamData', queryWxJoinedTeams: 'queryWxJoinedTeams', wxAppLogin: 'wxAppLogin', + getTeamHealthTemplate: 'getTeamHealthTemplate', + getTeamHealthTemps: "getTeamHealthTemps", }, knowledgeBase: { - getArticleByIds: 'getArticleByIds' + getArticleByIds: 'getArticleByIds', + getPageDisease: "getPageDisease" }, member: { addCustomer: 'add', + addMedicalRecord: 'addMedicalRecord', bindMiniAppArchive: "bindMiniAppArchive", getCustomerByCustomerId: 'getCustomerByCustomerId', getMiniAppCustomers: 'getMiniAppCustomers', getTeamCustomers: 'getTeamCustomers', getUnbindMiniAppCustomers: 'getUnbindMiniAppCustomers', + getCustomerMedicalRecord: 'getCustomerMedicalRecord', + getMedicalRecordById: 'getMedicalRecordById', unbindMiniAppArchive: 'unbindMiniAppArchive', + updateMedicalRecord: 'updateMedicalRecord' }, wecom: { addContactWay: 'addContactWay' @@ -38,7 +45,6 @@ const urls = Object.keys(urlsConfig).reduce((acc, path) => { }) return acc }, {}) -console.log('urls: ', urls) export default async function api(urlId, data) { const config = urls[urlId]; diff --git a/utils/http.js b/utils/http.js index 4f7acc8..d4586b0 100644 --- a/utils/http.js +++ b/utils/http.js @@ -202,5 +202,28 @@ export default request; export const uploadUrl = `${baseUrl}/upload`; export function getFullPath(path) { - return `${baseUrl}${path}`; + return `${baseUrl}/${path}`; +} + + +export function upload(path) { + return new Promise((resolve) => { + uni.uploadFile({ + url: uploadUrl, // 替换为你的上传接口地址 + filePath: path, + name: 'file', + fileType: 'image', + success: (res) => { + try { + const url = JSON.parse(res.data).filePath; + resolve(url ? getFullPath(url) : '') + } catch (e) { + resolve() + } + }, + fail: res => { + resolve() + } + }) + }) }