diff --git a/App.vue b/App.vue index f4b5d87..0d882b8 100644 --- a/App.vue +++ b/App.vue @@ -85,7 +85,7 @@ if (req.errcode == 0) { console.log(req, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); // 未完善信息 - if (req.data.user.status == 3) { + if (req.data.user?.status == 3) { // this.$toast('您还没有完善信息,请先完善信息') // this.$go('../../subPackages/sub_workbench/workbench_upInfo/index') uni.navigateTo({ @@ -94,7 +94,7 @@ return } - if (role == 2 && req.data.user.status == 2) { + if (role == 2 && req.data.user?.status == 2) { let logInfo = uni.getStorageSync('logInfo') || {} let userInfo = { ...logInfo, @@ -113,14 +113,14 @@ }, 100) } - if (role == 1 && req.data.DoctorInfo.user.status == 2) { + if (role == 1 && req.data.DoctorInfo.user?.status == 2) { let logInfo = uni.getStorageSync('logInfo') || {} let userInfo = { ...logInfo, ...(uni.getStorageSync('userInfo') || {}), ...req.data } - userInfo.status = userInfo.user && userInfo.user.status != '' ? userInfo.user.status : userInfo + userInfo.status = userInfo.user && userInfo.user?.status != '' ? userInfo.user.status : userInfo .status uni.setStorageSync('identity', userInfo['role']) diff --git a/api/all.js b/api/all.js index c22e75d..c492676 100644 --- a/api/all.js +++ b/api/all.js @@ -972,7 +972,7 @@ export function chinRefuse(data) { */ export function recordList(data) { return req.request({ - url: 'patient/record-list', + url: 'patient/record-list-by-doctor', method: 'post', data }) @@ -998,7 +998,7 @@ export function prescripDetailList(data) { */ export function prescripRecord(data) { return req.request({ - url: 'examine/list', + url: 'examine/list-by-doctor', method: 'get', data }) diff --git a/common/js/index.js b/common/js/index.js index baa9183..429481c 100644 --- a/common/js/index.js +++ b/common/js/index.js @@ -1,7 +1,9 @@ import Request from './request.js'; import errorCode from './errorCode.js'; let protocol = 'https'; //协议 -let baseUrl = 'app.xiaokang88.com/service/v1/'; // 域名 +let baseUrl = 'app.xiaokang88.com/service/v1/'; // 域名 +// let protocol = 'http'; //协议 +// let baseUrl = 'www.xk888.com/service/v1/'; // 域名 export const config = { baseUrl: `${protocol}://${baseUrl}` } diff --git a/manifest.json b/manifest.json index 2c12fca..3c9f426 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "xiaokang_doctor", - "appid" : "__UNI__2465184", + "appid" : "__UNI__8971029", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/package.json b/package.json index 0ff0b28..688e13f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "id": "cu-editor", - "name": "微信小程序富文本编辑器(仿腾讯文档)", + "name": "xk-doctor-wx", "version": "1.0.4", "description": "照着腾讯文档小程序开发了微信小程序富文本编辑器组件,这几天做个整理,如果有这个需求可以前往腾讯文档小程序操作看看实际效果。腾讯文档小程序用的不是原生的组件,当前项目按现有开放api尽可能实现。", "keywords": [ diff --git a/pages/patient/index.vue b/pages/patient/index.vue index fcf4d3d..2b09a3b 100644 --- a/pages/patient/index.vue +++ b/pages/patient/index.vue @@ -44,7 +44,7 @@ --> + @click="toDetail(item.patient_id)"> diff --git a/pages/workbench/index.vue b/pages/workbench/index.vue index 1eda892..0256ab8 100644 --- a/pages/workbench/index.vue +++ b/pages/workbench/index.vue @@ -77,7 +77,7 @@ + :refresher-triggered="loading" :refresher-enabled="false" v-if="!loading"> - + - + @@ -24,53 +50,71 @@ bar-width="20" inactive-color="#6C7380" active-color="#6ACDBB"> - - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + @@ -125,6 +169,9 @@ computed: { getAvatar() { // this.info.patient.sex + if (this.info.avatar != '') { + return this.info.avatar + } return require(`@/static/image/${1%2==0?'nv':'nan'}.png`) } }, @@ -159,6 +206,24 @@ getMobile(v) { return v.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") }, + // 跳转 + toNext(base_type, id, patient_id, status = 0) { + if (base_type == 2 && id && patient_id) { + switch (status) { + case null: + this.$toast('状态非法') + return + case 0: + this.$toast('该订单还未支付') + break + case 4: + return this.$toast('该订单已取消') + } + this.$go('../../subPackages/sub_workbench/workbench_infoPatient?id=' + patient_id + '&re_id=' + id) + } else if (base_type == 5 && id) { + this.$go('/pages/my/prescriptionDetail?id=' + id) + } + }, patientInfo() { patientInfo({ up_id: this.id, @@ -177,23 +242,23 @@ }, async getList() { let res = {} - // this.current == 0 && (res = await recordList({ - // up_id: this.id, - // store_id: uni.getStorageSync('store_id') || '11001', - // })) - // this.current == 1 && (res = await prescripRecord({ - // up_id: this.id, - // store_id: uni.getStorageSync('store_id') || '11001', - // })) - // if (res.errcode == 0) { - // this.list[this.current] = res.data && res.data.list ? res.data.list : res.data || [] - // this.$nextTick(() => { - // this.loading2 = false - // }) - // } else { - // this.$toast(res.msg); - // this.loading2 = false - // } + this.current == 0 && (res = await recordList({ + up_id: this.id, + store_id: uni.getStorageSync('store_id') || '11001', + })) + this.current == 1 && (res = await prescripRecord({ + up_id: this.id, + store_id: uni.getStorageSync('store_id') || '11001', + })) + if (res.errcode == 0) { + this.list[this.current] = res.data && res.data.list ? res.data.list : res.data || [] + this.$nextTick(() => { + this.loading2 = false + }) + } else { + this.$toast(res.msg); + this.loading2 = false + } this.$nextTick(() => { diff --git a/subPackages/sub_patient/patient_details.vue b/subPackages/sub_patient/patient_details.vue index b98937a..0bc32bc 100644 --- a/subPackages/sub_patient/patient_details.vue +++ b/subPackages/sub_patient/patient_details.vue @@ -105,7 +105,7 @@ return { loading: false, loading2: true, - info: '', + info: {}, tabs: [{ name: '就诊记录' }, { diff --git a/subPackages/sub_workbench/workbench_infoPatient.vue b/subPackages/sub_workbench/workbench_infoPatient.vue index a3422ee..6db84ab 100644 --- a/subPackages/sub_workbench/workbench_infoPatient.vue +++ b/subPackages/sub_workbench/workbench_infoPatient.vue @@ -1,5 +1,5 @@