diff --git a/src/components/pickerArea/index.wxml b/src/components/pickerArea/index.wxml index 4f2617c..780688e 100644 --- a/src/components/pickerArea/index.wxml +++ b/src/components/pickerArea/index.wxml @@ -37,7 +37,7 @@ data-name="{{item.label}}" > {{item.label}} - + @@ -77,7 +77,7 @@ diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index 9b974b2..c0125d1 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -220,10 +220,10 @@ } .title { margin-top: 24rpx; - font-size: 32rpx; + font-size: 38rpx; color: #211d2e; font-weight: bold; - line-height: 40rpx; + line-height: 56rpx; } .btn { margin: 36rpx auto 0; diff --git a/src/gift/pages/dtpDurg/index.scss b/src/gift/pages/dtpDurg/index.scss index 078f94e..dc39480 100644 --- a/src/gift/pages/dtpDurg/index.scss +++ b/src/gift/pages/dtpDurg/index.scss @@ -46,15 +46,16 @@ line-height: 70rpx; font-size: 32rpx; color: #b982ff; - text-align: center; border-radius: 60rpx 60rpx 60rpx 60rpx; border: 1px solid #b982ff; + display: flex; + align-items: center; + justify-content: center; .icon { margin-right: 8rpx; display: inline-block; width: 36rpx; height: 36rpx; - vertical-align: middle; } } .site { @@ -63,14 +64,15 @@ font-size: 32rpx; color: #ffffff; border-radius: 60rpx; - text-align: center; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + display: flex; + align-items: center; + justify-content: center; .icon { margin-right: 8rpx; display: inline-block; width: 32rpx; height: 32rpx; - vertical-align: middle; } } } diff --git a/src/gift/pages/dtpDurg/index.ts b/src/gift/pages/dtpDurg/index.ts index dce7662..2cd744d 100644 --- a/src/gift/pages/dtpDurg/index.ts +++ b/src/gift/pages/dtpDurg/index.ts @@ -4,22 +4,108 @@ Page({ data: { id: '', detail: {} as any, + + LNG: '' as number | string, + LAT: '' as number | string, }, onLoad(options) { this.setData({ id: options.id, }) app.waitLogin({ type: [0, 1] }).then(() => { + this.handleToggleSite() + }) + }, + handleToggleSite() { + if (!this.data.LNG) { + wx.getSetting({ + success: (res) => { + if ( + res.authSetting['scope.userFuzzyLocation'] != undefined + && res.authSetting['scope.userFuzzyLocation'] == true + ) { + // 获取当前位置 + this.getFuzzyLocation() + } + else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { + // 获取当前位置 + this.getFuzzyLocation() + } + else { + wx.showModal({ + title: '请求授权当前位置', + content: '需要获取您的地理位置,请确认授权', + confirmColor: '#8c75d0', + success: (res) => { + if (res.cancel) { + // 取消授权 + wx.showToast({ + title: '拒绝授权', + icon: 'none', + duration: 1000, + }) + this.getDetail() + } + else if (res.confirm) { + // 确定授权,通过wx.openSetting发起授权请求 + wx.openSetting({ + success: (res) => { + if (res.authSetting['scope.userFuzzyLocation'] == true) { + wx.showToast({ + title: '授权成功', + icon: 'success', + duration: 1000, + }) + // 再次授权,调用wx.getLocation的API + this.getFuzzyLocation() + } + else { + wx.showToast({ + title: '授权失败', + icon: 'none', + duration: 1000, + }) + this.getDetail() + } + }, + }) + } + }, + }) + } + }, + }) + } + else { + this.setData({ + LNG: '', + LAT: '', + }) this.getDetail() + } + }, + getFuzzyLocation() { + wx.getFuzzyLocation({ + success: (res) => { + this.setData({ + LNG: res.longitude, + LAT: res.latitude, + }) + this.getDetail() + }, + fail: () => { + this.getDetail() + }, }) }, - getDetail() { wx.ajax({ method: 'GET', url: '?r=zd/dtp-pharmacy/detail', data: { Id: this.data.id, + lng: this.data.LNG, + lat: this.data.LAT, }, }).then((res) => { this.setData({ diff --git a/src/images/icon101.png b/src/images/icon101.png index 16bdceb..bcd4c3a 100644 Binary files a/src/images/icon101.png and b/src/images/icon101.png differ diff --git a/src/images/icon102.png b/src/images/icon102.png new file mode 100644 index 0000000..16ebfe1 Binary files /dev/null and b/src/images/icon102.png differ diff --git a/src/images/icon41.png b/src/images/icon41.png index 35cf88e..2cec450 100644 Binary files a/src/images/icon41.png and b/src/images/icon41.png differ diff --git a/src/images/icon42.png b/src/images/icon42.png index 6a4be30..60e266d 100644 Binary files a/src/images/icon42.png and b/src/images/icon42.png differ diff --git a/src/images/icon95.png b/src/images/icon95.png index 74cc2b3..5078f52 100644 Binary files a/src/images/icon95.png and b/src/images/icon95.png differ diff --git a/src/images/icon96.png b/src/images/icon96.png index e367c56..6a8db31 100644 Binary files a/src/images/icon96.png and b/src/images/icon96.png differ diff --git a/src/images/icon97.png b/src/images/icon97.png index 8bef043..01956fd 100644 Binary files a/src/images/icon97.png and b/src/images/icon97.png differ diff --git a/src/images/icon98.png b/src/images/icon98.png index 4c54f51..c8c48ef 100644 Binary files a/src/images/icon98.png and b/src/images/icon98.png differ diff --git a/src/pages/d_interactiveDoctor/index.scss b/src/pages/d_interactiveDoctor/index.scss index f01dcbc..03d8c64 100644 --- a/src/pages/d_interactiveDoctor/index.scss +++ b/src/pages/d_interactiveDoctor/index.scss @@ -468,14 +468,15 @@ page { padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom)); box-sizing: border-box; display: flex; - gap: 10rpx; + gap: 20rpx; border-radius: 32rpx 32rpx 0 0; box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04); border: 2rpx solid #ffffff; background-color: #fff; .send { - padding: 0 12rpx 0 32rpx; flex: 1; + padding: 0 12rpx 0 32rpx; + box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; @@ -485,6 +486,9 @@ page { padding: 10rpx 0; flex: 1; color: #adacb2; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .btn { flex-shrink: 0; @@ -498,7 +502,25 @@ page { border-radius: 111rpx 111rpx 111rpx 111rpx; } } + .short-send { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(40, 48, 49, 1); + height: 76rpx; + background: #ffffff; + box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04); + border-radius: 140rpx 140rpx 140rpx 140rpx; + border: 2rpx solid #f2f4f5; + .icon { + width: 36rpx; + height: 36rpx; + } + } .send-date { + text-align: center; flex-shrink: 0; font-size: 24rpx; color: #283031; @@ -549,6 +571,7 @@ page { box-sizing: border-box; padding-bottom: 80rpx; background-color: transparent; + font-size: 32rpx; .ka-container { padding: 30rpx 62rpx; display: flex; @@ -558,6 +581,9 @@ page { .stat { font-size: 28rpx; color: #adacb2; + &.red { + color: #ef3939; + } } .send-btn { width: 128rpx; diff --git a/src/pages/d_interactiveDoctor/index.ts b/src/pages/d_interactiveDoctor/index.ts index 47053cf..3cc7c8d 100644 --- a/src/pages/d_interactiveDoctor/index.ts +++ b/src/pages/d_interactiveDoctor/index.ts @@ -494,6 +494,8 @@ Page({ text: customMessage, patientId, }, + loading: true, + loadingText: '发送中...', }).then((res) => { if (res.errcode == 10001) { this.setData({ diff --git a/src/pages/d_interactiveDoctor/index.wxml b/src/pages/d_interactiveDoctor/index.wxml index 4521b81..a4338bd 100644 --- a/src/pages/d_interactiveDoctor/index.wxml +++ b/src/pages/d_interactiveDoctor/index.wxml @@ -153,10 +153,11 @@ - - 输入文字 - 发送消息 + + {{customMessage || '输入文字'}} + 快捷回复 + 发送消息 出诊时间 @@ -182,13 +183,13 @@ confirm-type="send" adjust-keyboard-to="bottom" maxlength="{{500}}" - placeholder="输入您的问题" + placeholder="输入文字" bind:blur="bindblur" bindconfirm="handleConfirm" > - {{customMessage.length}}/500 + {{customMessage.length}}/500 发送 @@ -206,7 +207,7 @@ closeable > - 发送消息 + 快捷回复 { - app.mpBehavior({ doctor:true, PageName: 'PG_DoctorCode' }) + app.mpBehavior({ doctor: true, PageName: 'PG_DoctorCode' }) wx.showLoading({ title: '加载中', }) diff --git a/src/pages/d_invite/index.wxml b/src/pages/d_invite/index.wxml index 1fd0ca2..da540d9 100644 --- a/src/pages/d_invite/index.wxml +++ b/src/pages/d_invite/index.wxml @@ -4,3 +4,4 @@ + diff --git a/src/patient/pages/doctor/index.scss b/src/patient/pages/doctor/index.scss index 06593b8..1384a97 100644 --- a/src/patient/pages/doctor/index.scss +++ b/src/patient/pages/doctor/index.scss @@ -171,7 +171,7 @@ page { margin-top: 16rpx; margin-right: 22rpx; display: inline-block; - padding: 4rpx 16rpx 6rpx 16rpx; + padding: 4rpx 16rpx 4rpx 16rpx; line-height: 1; font-size: 22rpx; color: #b982ff; diff --git a/src/patient/pages/hospital/index.scss b/src/patient/pages/hospital/index.scss index 6a57a78..f83034a 100644 --- a/src/patient/pages/hospital/index.scss +++ b/src/patient/pages/hospital/index.scss @@ -7,7 +7,6 @@ .banner { padding: 44rpx 30rpx 0; display: flex; - align-items: center; .hosttipat-img { flex-shrink: 0; width: 180rpx; @@ -51,6 +50,7 @@ font-size: 32rpx; color: #211d2e; .icon { + margin-right: 10rpx; width: 36rpx; height: 36rpx; vertical-align: -8rpx; @@ -86,15 +86,16 @@ line-height: 70rpx; font-size: 32rpx; color: #b982ff; - text-align: center; border-radius: 60rpx 60rpx 60rpx 60rpx; border: 1px solid #b982ff; + display: flex; + align-items: center; + justify-content: center; .icon { margin-right: 8rpx; display: inline-block; width: 36rpx; height: 36rpx; - vertical-align: middle; } } .site { @@ -103,14 +104,15 @@ font-size: 32rpx; color: #ffffff; border-radius: 60rpx; - text-align: center; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + display: flex; + align-items: center; + justify-content: center; .icon { margin-right: 8rpx; display: inline-block; width: 32rpx; height: 32rpx; - vertical-align: middle; } } } @@ -156,7 +158,7 @@ display: inline-block; width: 32rpx; height: 32rpx; - vertical-align: middle; + vertical-align: -6rpx; } } .p { diff --git a/src/patient/pages/hospital/index.ts b/src/patient/pages/hospital/index.ts index 412df9c..a3ed72c 100644 --- a/src/patient/pages/hospital/index.ts +++ b/src/patient/pages/hospital/index.ts @@ -28,27 +28,26 @@ Page({ }) }, handleToggleSite() { - const that = this if (!this.data.LNG) { wx.getSetting({ - success(res) { + success: (res) => { if ( res.authSetting['scope.userFuzzyLocation'] != undefined && res.authSetting['scope.userFuzzyLocation'] == true ) { // 获取当前位置 - that.getFuzzyLocation() + this.getFuzzyLocation() } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { // 获取当前位置 - that.getFuzzyLocation() + this.getFuzzyLocation() } else { wx.showModal({ title: '请求授权当前位置', content: '需要获取您的地理位置,请确认授权', confirmColor: '#8c75d0', - success(res) { + success: (res) => { if (res.cancel) { // 取消授权 wx.showToast({ @@ -56,12 +55,12 @@ Page({ icon: 'none', duration: 1000, }) - that.getDetail() + this.getDetail() } else if (res.confirm) { // 确定授权,通过wx.openSetting发起授权请求 wx.openSetting({ - success(res) { + success: (res) => { if (res.authSetting['scope.userFuzzyLocation'] == true) { wx.showToast({ title: '授权成功', @@ -69,7 +68,7 @@ Page({ duration: 1000, }) // 再次授权,调用wx.getLocation的API - that.getFuzzyLocation() + this.getFuzzyLocation() } else { wx.showToast({ @@ -77,7 +76,7 @@ Page({ icon: 'none', duration: 1000, }) - that.getDetail() + this.getDetail() } }, }) @@ -89,7 +88,7 @@ Page({ }) } else { - that.setData({ + this.setData({ LNG: '', LAT: '', }) @@ -97,18 +96,16 @@ Page({ } }, getFuzzyLocation() { - const that = this wx.getFuzzyLocation({ - success(res) { - console.log(res) - that.setData({ + success: (res) => { + this.setData({ LNG: res.longitude, LAT: res.latitude, }) - that.getDetail() + this.getDetail() }, - fail() { - that.getDetail() + fail: () => { + this.getDetail() }, }) }, @@ -201,3 +198,5 @@ Page({ }, onPageScroll() {}, }) + +export {} diff --git a/src/patient/pages/hospital/index.wxml b/src/patient/pages/hospital/index.wxml index 6da0fe7..478727f 100644 --- a/src/patient/pages/hospital/index.wxml +++ b/src/patient/pages/hospital/index.wxml @@ -31,9 +31,9 @@ 电话 - + - 地址{{detail.dist}} + 地址 {{detail.dist}} @@ -52,7 +52,7 @@ {{item.Name}} - + {{item.Introduce}} diff --git a/src/patient/pages/index/index.scss b/src/patient/pages/index/index.scss index f131725..03258e1 100644 --- a/src/patient/pages/index/index.scss +++ b/src/patient/pages/index/index.scss @@ -21,7 +21,6 @@ page { background: linear-gradient(195deg, #ffe3fc 0%, #ecddff 100%); .container { display: flex; - align-items: center; justify-content: space-between; border-radius: 21rpx; .avatar { @@ -79,19 +78,19 @@ page { } } } + } + .content { + margin-top: 16rpx; + font-size: 32rpx; + line-height: 38rpx; + color: #211d2e; .icon { - margin-left: 4rpx; + vertical-align: -4rpx; display: inline-block; width: 36rpx; height: 36rpx; } } - .content { - margin-top: 16rpx; - font-size: 26rpx; - line-height: 38rpx; - color: rgba(51, 51, 51, 1); - } .hostipal { margin-top: 16rpx; font-size: 28rpx; @@ -104,7 +103,7 @@ page { } .tag { display: inline-block; - padding: 4rpx 12rpx; + padding: 6rpx 12rpx 4rpx; font-size: 22rpx; line-height: 1; color: #ffffff; diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index b5c377a..3354d9a 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -22,10 +22,12 @@ {{zdUserInfo.ExclusiveDoctorName}} - - 医生给您留言了,记得查看! + + 医生给您留言了,记得查看! + + {{zdUserInfo.ExclusiveDoctorHospitalName}} { + this.handleToggleSite() + }) + }, + handleToggleSite() { + if (!this.data.LNG) { + wx.getSetting({ + success: (res) => { + if ( + res.authSetting['scope.userFuzzyLocation'] != undefined + && res.authSetting['scope.userFuzzyLocation'] == true + ) { + // 获取当前位置 + this.getFuzzyLocation() + } + else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { + // 获取当前位置 + this.getFuzzyLocation() + } + else { + wx.showModal({ + title: '请求授权当前位置', + content: '需要获取您的地理位置,请确认授权', + confirmColor: '#8c75d0', + success: (res) => { + if (res.cancel) { + // 取消授权 + wx.showToast({ + title: '拒绝授权', + icon: 'none', + duration: 1000, + }) + this.getDetail() + } + else if (res.confirm) { + // 确定授权,通过wx.openSetting发起授权请求 + wx.openSetting({ + success: (res) => { + if (res.authSetting['scope.userFuzzyLocation'] == true) { + wx.showToast({ + title: '授权成功', + icon: 'success', + duration: 1000, + }) + // 再次授权,调用wx.getLocation的API + this.getFuzzyLocation() + } + else { + wx.showToast({ + title: '授权失败', + icon: 'none', + duration: 1000, + }) + this.getDetail() + } + }, + }) + } + }, + }) + } + }, + }) + } + else { + this.setData({ + LNG: '', + LAT: '', + }) this.getDetail() + } + }, + getFuzzyLocation() { + wx.getFuzzyLocation({ + success: (res) => { + this.setData({ + LNG: res.longitude, + LAT: res.latitude, + }) + this.getDetail() + }, + fail: () => { + this.getDetail() + }, }) }, - getDetail() { wx.ajax({ method: 'GET', url: '?r=xd/infusion-center/detail', data: { Id: this.data.id, + lng: this.data.LNG, + lat: this.data.LAT, }, }).then((res) => { this.setData({ diff --git a/src/patient/pages/interactivePatient/index.scss b/src/patient/pages/interactivePatient/index.scss index 5202b87..6e41925 100644 --- a/src/patient/pages/interactivePatient/index.scss +++ b/src/patient/pages/interactivePatient/index.scss @@ -13,7 +13,6 @@ page { margin: 0 30rpx; padding: 30rpx; display: flex; - align-items: center; justify-content: space-between; border-radius: 24rpx; background-color: #fff; @@ -32,8 +31,11 @@ page { } .content { margin-top: 8rpx; - font-size: 28rpx; - color: rgba(173, 172, 178, 1); + .c-name { + font-size: 28rpx; + color: rgba(173, 172, 178, 1); + margin-right: 10rpx; + } .tag { display: inline-block; font-size: 24rpx; @@ -463,7 +465,7 @@ page { } } .status { - margin-bottom: 32rpx; + margin: 0 0 32rpx; text-align: center; font-size: 28rpx; color: #adacb2; @@ -480,7 +482,7 @@ page { border-radius: 24rpx 24rpx 0 0; background-color: #fff; transition: all 0.3s; - height: calc(124rpx + env(safe-area-inset-bottom)); + height: 184rpx; box-sizing: border-box; .unread { position: absolute; @@ -513,14 +515,20 @@ page { align-items: center; justify-content: space-between; .custom-input { + flex-shrink: 0; + width: 424rpx; + box-sizing: border-box; text-indent: 40rpx; - flex: 1; + padding-right: 40rpx; height: 72rpx; background: #f6f8f9; line-height: 72rpx; border-radius: 98rpx; font-size: 32rpx; color: #adacb2; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; &.active { color: #211d2e; overflow: hidden; @@ -529,6 +537,7 @@ page { } } .shortcut { + flex: 1; width: 244rpx; height: 72rpx; background: #ffffff; @@ -632,8 +641,8 @@ page { transition: all 0.3s; .icon { position: relative; - width: 36rpx; - height: 36rpx; + width: 44rpx; + height: 44rpx; overflow: visible; &::after { content: ''; @@ -659,6 +668,7 @@ page { box-sizing: border-box; padding-bottom: 80rpx; background-color: transparent; + font-size: 32rpx; .ka-container { padding: 30rpx 62rpx; display: flex; @@ -668,6 +678,9 @@ page { .stat { font-size: 28rpx; color: #adacb2; + &.red { + color: #ef3939; + } } .send-btn { width: 128rpx; diff --git a/src/patient/pages/interactivePatient/index.ts b/src/patient/pages/interactivePatient/index.ts index ef39be9..66b2942 100644 --- a/src/patient/pages/interactivePatient/index.ts +++ b/src/patient/pages/interactivePatient/index.ts @@ -369,6 +369,8 @@ Page({ data: { text: customMessage, }, + loading: true, + loadingText: '发送中...', }).then((res) => { if (res.errcode == 10001) { this.setData({ diff --git a/src/patient/pages/interactivePatient/index.wxml b/src/patient/pages/interactivePatient/index.wxml index f4e70c8..5d42e7e 100644 --- a/src/patient/pages/interactivePatient/index.wxml +++ b/src/patient/pages/interactivePatient/index.wxml @@ -13,7 +13,7 @@ {{doctorDetail.doctorName}} - {{doctorDetail.hospitalName}} +
{{doctorDetail.hospitalName}}
{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}
@@ -171,10 +171,12 @@
- 输入您的问题 + + {{customMessage || '输入您的问题'}} + - 快捷提问 + {{doctorDetail.isOpenOneToOne == 1 ? '快捷提问':'请选择您要咨询的问题'}} @@ -237,7 +239,7 @@ > - {{customMessage.length}}/500 + {{customMessage.length}}/500 发送 diff --git a/src/patient/pages/liveResult/index.wxml b/src/patient/pages/liveResult/index.wxml index f2b3f50..dcac9ae 100644 --- a/src/patient/pages/liveResult/index.wxml +++ b/src/patient/pages/liveResult/index.wxml @@ -17,7 +17,7 @@ 立即进入直播间 - + 关注公众号,活动提醒不错过 diff --git a/src/utils/request.ts b/src/utils/request.ts index 816f481..429c6d0 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -2,14 +2,21 @@ interface IGlobalParams { gUrl: string } -export const request = function ( - { gUrl }: IGlobalParams, - { url, method, data, header, showMsg = true, loading = false, isJSON = false, ...options }: IAgaxParams, -): Promise { +export function request({ gUrl }: IGlobalParams, { + url, + method, + data, + header, + showMsg = true, + loading = false, + loadingText = '加载中...', + isJSON = false, + ...options +}: IAgaxParams): Promise { return new Promise((resolve, reject) => { if (loading) { wx.showLoading({ - title: '加载中...', + title: loadingText, mask: true, }) } @@ -29,9 +36,11 @@ export const request = function ( const { code, data } = res.data if (isJSON) { resolve(res.data) - } else if (code === 0) { + } + else if (code === 0) { resolve(data) - } else if (showMsg) { + } + else if (showMsg) { const msg = errPicker(res.data) if (loading) { setTimeout(() => { @@ -40,14 +49,16 @@ export const request = function ( icon: 'none', }) }, 30) - } else { + } + else { wx.showToast({ title: msg, icon: 'none', }) reject(res) } - } else { + } + else { reject(res) } }, diff --git a/typings/index.d.ts b/typings/index.d.ts index 856a3c1..f937be3 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -52,6 +52,7 @@ interface IAppOption { interface IAgaxParams extends WechatMiniprogram.RequestOption { showMsg?: boolean loading?: boolean + loadingText?: string isJSON?: boolean }