diff --git a/README.md b/README.md index a3f7ab8..b18deff 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ # 宝芝堂-uniapp - `pnpm install` + +## 修改 uview-ui + +### node_modules\uview-ui\components\u-datetime-picker\u-datetime-picker.vue + +```vue + +``` diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index dec9312..807e43e 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,21 +1,16 @@ @@ -28,7 +23,10 @@ }, onLoad() { const params = {_action: 'getData'} - this.$ajax.get('/admin-api/category', { params }).then(res => { + this.$ajax.get('/admin-api/category', { + params, + custom: { loading: true } + }).then(res => { if (res.status == 0) { this.list = res.data.items } @@ -45,17 +43,6 @@ } \ No newline at end of file diff --git a/src/pages/record/index.vue b/src/pages/record/index.vue index 41f8636..6d85c46 100644 --- a/src/pages/record/index.vue +++ b/src/pages/record/index.vue @@ -65,12 +65,7 @@ export default { }, onLoad(e) { this.patient_id = e.patient - this.$ajax.get(`/admin-api/patient/${this.patient_id}`, { params: {_action: 'getData'}}).then(res => { - if (res.status == 0) { - this.patient = res.data - uni.setNavigationBarTitle({ title: this.patient.name }) - } - }) + this.init() }, onShow() { this.loadData(true) @@ -78,15 +73,20 @@ export default { onPullDownRefresh() { this.loadData(true) }, - onReady() { - this.$ajax.get('/admin-api/category', { params: {_action: 'getData'}}).then(res => { + methods: { + async init() { + let res + res = await this.$ajax.get(`/admin-api/patient/${this.patient_id}`, { params: {_action: 'getData'}}) + if (res.status == 0) { + this.patient = res.data + uni.setNavigationBarTitle({ title: `${this.patient.name}-病历记录` }) + } + res = await this.$ajax.get('/admin-api/category', { params: {_action: 'getData'}}) if (res.status == 0) { this.typeList = res.data.items - this.loadData() } - }) - }, - methods: { + this.loadData(true) + }, changeType(e) { this.typeIndex = e this.loadData(true) diff --git a/src/static/treat_head.png b/src/static/treat_head.png deleted file mode 100644 index 57ea27d..0000000 Binary files a/src/static/treat_head.png and /dev/null differ diff --git a/src/static/treat_normal.png b/src/static/treat_normal.png deleted file mode 100644 index 15e8997..0000000 Binary files a/src/static/treat_normal.png and /dev/null differ