diff --git a/project.private.config.json b/project.private.config.json index d57dea3..836ad66 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,11 +23,25 @@ "miniprogram": { "list": [ { + "name": "药房", + "pathName": "gift/pages/dtpDurg/index", + "query": "id=10", + "scene": null, + "launchMode": "default" + }, + { + "name": "就诊地图", + "pathName": "patient/pages/doctor/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { "name": "patient/pages/liveDetail/index", "pathName": "patient/pages/liveDetail/index", "query": "id=33", - "scene": null, - "launchMode": "default" + "launchMode": "default", + "scene": null }, { "name": "患者-个人信息", diff --git a/src/app.json b/src/app.json index 1d1911d..d70cd73 100644 --- a/src/app.json +++ b/src/app.json @@ -83,7 +83,6 @@ }, { "root": "gift", - "independent": true, "pages": [ "pages/giftList/index", "pages/conformOrder/index", @@ -168,6 +167,7 @@ }, "componentFramework": "glass-easel", "sitemapLocation": "sitemap.json", + "requiredPrivateInfos": ["getFuzzyLocation"], "lazyCodeLoading": "requiredComponents", "requiredBackgroundModes": ["audio"] } diff --git a/src/gift/pages/dtpDurg/index.json b/src/gift/pages/dtpDurg/index.json index 1001803..b46cf1d 100644 --- a/src/gift/pages/dtpDurg/index.json +++ b/src/gift/pages/dtpDurg/index.json @@ -1,4 +1,5 @@ -{ - "navigationBarTitleText": "双通道药房", - "usingComponents": {} -} +{ + "navigationBarTitleText": "药房", + "navigationStyle": "default", + "usingComponents": {} +} diff --git a/src/gift/pages/dtpDurg/index.scss b/src/gift/pages/dtpDurg/index.scss index b492f4d..756220b 100644 --- a/src/gift/pages/dtpDurg/index.scss +++ b/src/gift/pages/dtpDurg/index.scss @@ -1,128 +1,93 @@ -.page { - position: relative; - .banner { - width: 100%; - min-height: 344rpx; - } - .container { - padding: 48rpx 40rpx; - position: absolute; - top: 316rpx; - left: 0; - width: 100%; - min-height: 100vh; - border-radius: 24rpx 24rpx 0 0; - background-color: #fafafa; - box-sizing: border-box; - .title { - font-size: 36rpx; - color: #484848; - font-weight: bold; - } - .tags { - margin-top: 16rpx; - display: flex; - .tag { - margin-right: 16rpx; - padding-right: 8rpx; - font-size: 22rpx; - color: #e04775; - line-height: 1; - border-radius: 8rpx; - background-color: #f5dfe6; - display: flex; - align-items: center; - .icon { - margin-right: 8rpx; - padding: 4rpx; - width: 24rpx; - max-height: 24rpx; - background-color: #e04775; - border-radius: 8rpx; - } - } - } - .content { - margin-top: 32rpx; - margin-bottom: 20rpx; - display: flex; - justify-content: space-between; - .inner { - .site { - font-size: 28rpx; - color: #9e9e9e; - } - .tel { - font-size: 28rpx; - color: #9b9ea6; - } - } - .options { - flex-shrink: 0; - display: flex; - .option { - margin-left: 30rpx; - .phone { - width: 48rpx; - height: 48rpx; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - background-color: #fff; - box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1); - &-img { - width: 24rpx; - height: 24rpx; - } - } - .name { - margin-top: 8rpx; - font-size: 24rpx; - color: #484848; - } - } - } - } - - .card { - margin-bottom: 16rpx; - padding: 32rpx 30rpx; - border-radius: 24rpx; - background-color: #fff; - .c-title { - font-size: 32rpx; - font-weight: bold; - color: #484848; - display: flex; - align-items: center; - .c-icon { - margin-right: 16rpx; - width: 36rpx; - height: 36rpx; - } - } - .c-content{ - margin-top: 24rpx; - font-size: 28rpx; - color: #9E9E9E; - } - } - - .remark{ - padding: 32rpx; - border-radius: 24rpx; - background-color: #fff; - .r-title{ - font-size: 32rpx; - color: #484848; - font-weight: bold; - } - .r-content{ - margin-top: 20rpx; - font-size: 28rpx; - color: #9E9E9E; - } - } - } -} +.page { + position: relative; + .banner { + width: 100%; + min-height: 374rpx; + } + .container { + padding: 48rpx 40rpx; + position: absolute; + top: 348rpx; + left: 0; + width: 100%; + min-height: 100vh; + border-radius: 24rpx 24rpx 0 0; + background-color: #FFFFFF; + box-sizing: border-box; + .title { + font-size: 36rpx; + color: #211d2e; + font-weight: bold; + } + .content { + margin-top: 32rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; + .inner { + .site { + font-size: 28rpx; + color: #adacb2; + } + .tel { + font-size: 28rpx; + color: #adacb2; + } + } + } + .options { + margin-top: 40rpx; + display: flex; + align-items: center; + justify-content: center; + gap: 30rpx; + .phone { + flex: 1; + line-height: 70rpx; + font-size: 32rpx; + color: #b982ff; + text-align: center; + border-radius: 60rpx 60rpx 60rpx 60rpx; + border: 1px solid #b982ff; + .icon { + display: inline-block; + width: 36rpx; + height: 36rpx; + vertical-align: middle; + } + } + .site { + flex: 1; + line-height: 76rpx; + font-size: 32rpx; + color: #ffffff; + border-radius: 60rpx; + text-align: center; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + .icon { + display: inline-block; + width: 32rpx; + height: 32rpx; + vertical-align: middle; + } + } + } + + .remark { + margin-top: 56rpx; + padding: 32rpx; + border-radius: 24rpx; + background-color: #FAFAFA; + .r-title { + font-size: 32rpx; + color: #211D2E; + font-weight: bold; + } + .r-content { + margin-top: 20rpx; + font-size: 28rpx; + color: #69686E; + } + } + } +} diff --git a/src/gift/pages/dtpDurg/index.ts b/src/gift/pages/dtpDurg/index.ts index 5e12593..dce7662 100644 --- a/src/gift/pages/dtpDurg/index.ts +++ b/src/gift/pages/dtpDurg/index.ts @@ -1,52 +1,54 @@ -const app = getApp(); - -Page({ - data: { - id: "", - detail: {} as any, - }, - onLoad(options) { - this.setData({ - id: options.id, - }); - app.waitLogin().then(() => { - this.getDetail(); - }); - }, - - getDetail() { - wx.ajax({ - method: "GET", - url: "?r=zd/dtp-pharmacy/detail", - data: { - Id: this.data.id, - }, - }).then((res) => { - this.setData({ - detail: res, - }); - }); - }, - handleSite() { - const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail; - wx.openLocation({ - latitude: LAT, - longitude: LNG, - name: Name, - address: `${ProvinceName}${CityName}${CountyName}${Address}`, - }); - }, - handlePhone() { - const tel = this.data.detail.Telephone; - if (!tel) { - wx.showToast({ - icon: "none", - title: "电话暂未开通", - }); - return; - } - wx.makePhoneCall({ - phoneNumber: tel, - }); - }, -}); +const app = getApp() + +Page({ + data: { + id: '', + detail: {} as any, + }, + onLoad(options) { + this.setData({ + id: options.id, + }) + app.waitLogin({ type: [0, 1] }).then(() => { + this.getDetail() + }) + }, + + getDetail() { + wx.ajax({ + method: 'GET', + url: '?r=zd/dtp-pharmacy/detail', + data: { + Id: this.data.id, + }, + }).then((res) => { + this.setData({ + detail: res, + }) + }) + }, + handleSite() { + const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail + wx.openLocation({ + latitude: LAT, + longitude: LNG, + name: Name, + address: `${ProvinceName}${CityName}${CountyName}${Address}`, + }) + }, + handlePhone() { + const tel = this.data.detail.Telephone + if (!tel) { + wx.showToast({ + icon: 'none', + title: '电话暂未开通', + }) + return + } + wx.makePhoneCall({ + phoneNumber: tel, + }) + }, +}) + +export {} diff --git a/src/gift/pages/dtpDurg/index.wxml b/src/gift/pages/dtpDurg/index.wxml index 3d19ab7..51f5198 100644 --- a/src/gift/pages/dtpDurg/index.wxml +++ b/src/gift/pages/dtpDurg/index.wxml @@ -1,61 +1,27 @@ - - - - - {{detail.Name}} - - - - - 自有输注中心 - - - - - 合作输注中心 - - - - - {{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}} - {{detail.Telephone}} - - - - - - - 地址 - - - - - - 电话 - - - - - - - 自有输注中心 - - {{detail.OwnInfusionCenterName}} - - - - - 合作输注中心 - - {{detail.CooperationInfusionCenterName}} - - - 备注 - {{detail.Remark}} - - - + + + + + {{detail.Name}} + + + {{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}} + {{detail.Telephone}} + + + + + + 电话 + + + + 地址 + + + + 备注 + {{detail.Remark}} + + + diff --git a/src/images/bg25.png b/src/images/bg25.png new file mode 100644 index 0000000..79a674a Binary files /dev/null and b/src/images/bg25.png differ diff --git a/src/images/icon88.png b/src/images/icon88.png new file mode 100644 index 0000000..50013ed Binary files /dev/null and b/src/images/icon88.png differ diff --git a/src/images/icon89.png b/src/images/icon89.png new file mode 100644 index 0000000..ead0297 Binary files /dev/null and b/src/images/icon89.png differ diff --git a/src/images/icon90.png b/src/images/icon90.png new file mode 100644 index 0000000..f9fa44a Binary files /dev/null and b/src/images/icon90.png differ diff --git a/src/images/icon91.png b/src/images/icon91.png new file mode 100644 index 0000000..08c0447 Binary files /dev/null and b/src/images/icon91.png differ diff --git a/src/images/icon92.png b/src/images/icon92.png new file mode 100644 index 0000000..ba7fabf Binary files /dev/null and b/src/images/icon92.png differ diff --git a/src/images/icon93.png b/src/images/icon93.png new file mode 100644 index 0000000..ff6c6ae Binary files /dev/null and b/src/images/icon93.png differ diff --git a/src/images/icon94.png b/src/images/icon94.png new file mode 100644 index 0000000..b31b48f Binary files /dev/null and b/src/images/icon94.png differ diff --git a/src/images/icon95.png b/src/images/icon95.png new file mode 100644 index 0000000..74cc2b3 Binary files /dev/null and b/src/images/icon95.png differ diff --git a/src/images/icon96.png b/src/images/icon96.png new file mode 100644 index 0000000..e367c56 Binary files /dev/null and b/src/images/icon96.png differ diff --git a/src/images/icon97.png b/src/images/icon97.png new file mode 100644 index 0000000..d149f65 Binary files /dev/null and b/src/images/icon97.png differ diff --git a/src/images/title10.png b/src/images/title10.png new file mode 100644 index 0000000..a836162 Binary files /dev/null and b/src/images/title10.png differ diff --git a/src/patient/pages/doctor/index.scss b/src/patient/pages/doctor/index.scss index 6946b20..06593b8 100644 --- a/src/patient/pages/doctor/index.scss +++ b/src/patient/pages/doctor/index.scss @@ -1,13 +1,12 @@ page { - background-color: #fafafa; + background-color: #f6f8f9; } .page { padding-bottom: 200rpx; .page-header { margin-bottom: 30rpx; - padding: 40rpx 32rpx 0; - background-color: #fff; + padding: 10rpx 32rpx 0; .site-line { padding: 30rpx 0 0; display: flex; @@ -24,7 +23,7 @@ page { } .name { font-size: 32rpx; - color: rgba(46, 45, 45, 1); + color: #211d2e; } .triangle { width: 0; @@ -38,7 +37,7 @@ page { width: 172rpx; height: 60rpx; font-size: 32rpx; - color: rgba(46, 45, 45, 0.6); + color: #adacb2; display: flex; align-items: center; justify-content: center; @@ -62,7 +61,7 @@ page { font-size: 28rpx; } .place-input { - color: rgba(168, 168, 168, 1); + color: #adacb2; } } .tabs { @@ -79,7 +78,7 @@ page { .van-tabs__line { width: 34rpx !important; height: 8rpx; - background: #e04775; + background: #b982ff; border-radius: 4rpx; } } @@ -102,7 +101,7 @@ page { right: 0; width: 112rpx; height: 42rpx; - background: #e04775; + background: #b982ff; border-radius: 0rpx 24rpx 0rpx 24rpx; border: 2rpx solid #ebecee; font-size: 24rpx; @@ -126,24 +125,22 @@ page { .wrap { flex: 1; .title { - display: flex; - align-items: center; .name { + margin-right: 12rpx; font-size: 32rpx; - color: #484848; + color: #211d2e; word-break: break-all; line-height: 48rpx; } .tag { flex-shrink: 0; display: inline-block; - vertical-align: middle; - margin-left: 12rpx; + vertical-align: 2rpx; padding: 6rpx 12rpx; font-size: 22rpx; line-height: 1; color: #ffffff; - background: #ffc137; + background: #ffa300; border-radius: 8rpx; } } @@ -156,12 +153,12 @@ page { .site { flex: 1; font-size: 24rpx; - color: #9b9ea6; + color: #adacb2; } .site-num { flex-shrink: 0; font-size: 24rpx; - color: #9b9ea6; + color: #adacb2; } .icon { flex-shrink: 0; @@ -177,16 +174,16 @@ page { padding: 4rpx 16rpx 6rpx 16rpx; line-height: 1; font-size: 22rpx; - color: #e04775; + color: #b982ff; border-radius: 8rpx; - border: 1rpx solid #e04775; + border: 1rpx solid #b982ff; } .drug { vertical-align: middle; padding-right: 8rpx; display: inline-block; font-size: 22rpx; - color: #e04775; + color: #b982ff; line-height: 1; border-radius: 8rpx; background-color: #f5dfe6; @@ -196,7 +193,7 @@ page { padding: 8rpx 10rpx; width: 16rpx; height: 20rpx; - background-color: #e04775; + background-color: #b982ff; } } } @@ -205,7 +202,7 @@ page { } .dtp { - padding: 32rpx 30rpx 0; + padding: 0 30rpx; .dtp-item { margin-bottom: 24rpx; padding: 32rpx; @@ -227,32 +224,9 @@ page { padding-left: 16rpx; .title { font-size: 32rpx; - color: #484848; + color: #211d2e; font-weight: bold; } - .tags { - margin-top: 16rpx; - display: flex; - .tag { - margin-right: 16rpx; - padding-right: 8rpx; - font-size: 22rpx; - color: #e04775; - line-height: 1; - border-radius: 8rpx; - background-color: #f5dfe6; - display: flex; - align-items: center; - .icon { - margin-right: 8rpx; - padding: 4rpx; - width: 24rpx; - max-height: 24rpx; - background-color: #e04775; - border-radius: 8rpx; - } - } - } .content { margin-top: 32rpx; display: flex; @@ -260,37 +234,42 @@ page { .inner { .site { font-size: 24rpx; - color: #9e9e9e; + color: #adacb2; } .tel { font-size: 24rpx; - color: #9b9ea6; + color: #adacb2; } } - .phone { - margin-left: 20rpx; - flex-shrink: 0; - width: 48rpx; - height: 48rpx; - border-radius: 50%; + .options { display: flex; align-items: center; - justify-content: center; - background-color: #fff; - box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1); - &-img { - width: 24rpx; - height: 24rpx; + .phone-icon { + margin-left: 16rpx; + flex-shrink: 0; + width: 44rpx; + height: 44rpx; + } + .map-icon { + margin-left: 16rpx; + flex-shrink: 0; + width: 44rpx; + height: 44rpx; } } } } } } - - .module { - margin-top: 64rpx; + .infusion-center { + margin-top: 20rpx; padding: 0 30rpx; + .tip { + font-size: 28rpx; + color: #d0d0d0; + text-align: center; + margin-bottom: 40rpx; + } .card { margin-bottom: 32rpx; padding: 32rpx; @@ -303,141 +282,54 @@ page { .avatar { margin-right: 18rpx; flex-shrink: 0; - width: 140rpx; - height: 140rpx; + width: 136rpx; + height: 136rpx; border-radius: 16rpx; } .wrap { - position: relative; - padding-right: 120rpx; flex: 1; + position: relative; .name { - font-size: 44rpx; - color: #484848; - } - .title { - .name { - margin-left: 12rpx; - font-size: 28rpx; - color: #484848; - word-break: break-all; - line-height: 42rpx; - } - .tag { - flex-shrink: 0; - display: inline-block; - vertical-align: middle; - padding: 4rpx 12rpx; - font-size: 22rpx; - line-height: 1; - color: #ffffff; - background: #ffc137; - border-radius: 8rpx; - } + max-width: 15em; + font-size: 32rpx; + color: #211d2e; + font-weight: bold; } .w-content { - margin-top: 16rpx; + margin-top: 20rpx; + display: flex; + align-items: center; .inner { flex: 1; - display: flex; - justify-content: space-between; .site { flex: 1; font-size: 24rpx; - color: #9b9ea6; + line-height: 32rpx; + color: #adacb2; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; } - .site-box { - position: absolute; - right: 0; - top: 70rpx; - text-align: center; - .site-num { - flex-shrink: 0; - font-size: 24rpx; - color: #9b9ea6; - } - .icon { - flex-shrink: 0; - margin-left: 14rpx; - width: 36rpx; - height: 36rpx; - } + .tel { + margin-top: 8rpx; + font-size: 24rpx; + line-height: 32rpx; + color: #adacb2; } } - } - } - } - .content { - margin-top: 6rpx; - padding-left: 158rpx; - .row { - margin-top: 16rpx; - display: flex; - align-items: flex-start; - flex-wrap: wrap; - // .tag { - // margin-right: 16rpx; - // flex-shrink: 0; - // padding: 8rpx 16rpx; - // font-size: 24rpx; - // color: #e04775; - // line-height: 1; - // background: #fcf2f6; - // border-radius: 8rpx; - // border: 2rpx solid #e04775; - // } - .p { - font-size: 24rpx; - line-height: 38rpx; - color: #9da0a8; - &.ellipsis { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - } - .tag { - margin-right: 16rpx; - margin-bottom: 10rpx; - width: 120rpx; - height: 32rpx; - background: #ffe6ee; - border-radius: 8rpx; - display: flex; - .week { - flex: 1; - font-size: 20rpx; - line-height: 32rpx; - color: #ffffff; - background-color: #e66c8e; - text-align: center; - border-radius: 8rpx 0 8rpx 8rpx; - } - .value { - flex: 1; - font-size: 20rpx; - color: #e04775; - text-align: center; - line-height: 32rpx; - } - } - .week-name { - flex: 1; - padding: 20rpx 24rpx; - background-color: rgba(253, 244, 247, 1); - border-radius: 16rpx; - font-size: 24rpx; - color: rgba(157, 160, 168, 1); - line-height: 40rpx; - .label { - margin-right: 12rpx; - display: inline-block; - font-size: 20rpx; - color: rgba(255, 255, 255, 1); - line-height: 32rpx; - padding: 0 8rpx; - background: #e04775; - border-radius: 8rpx 8rpx 8rpx 8rpx; + .site-box { + margin-left: 16rpx; + flex-shrink: 0; + display: flex; + gap: 16rpx; + .icon { + flex-shrink: 0; + width: 44rpx; + height: 44rpx; + border-radius: 50%; + } } } } diff --git a/src/patient/pages/doctor/index.ts b/src/patient/pages/doctor/index.ts index 5c6aa11..063603b 100644 --- a/src/patient/pages/doctor/index.ts +++ b/src/patient/pages/doctor/index.ts @@ -8,6 +8,7 @@ Page({ HosList: [], DoctortList: [], dtpList: [], + infusionCenterList: [], pagination: { page: 1, pages: 1, @@ -46,21 +47,11 @@ Page({ bottom, }) } - app.zdWaitLogin().then((_res) => { - if (options.es === '201504') { - app.globalData.IsAliQiWei = 1 - - this.setData({ - es: options.es, - }) - } - + app.waitLogin({ type: [0, 1] }).then(() => { if (options.active && ['1', '2'].includes(options.active)) { this.setData({ tabActive: Number(options.active), }) - } else { - } if (options.pid) { this.setData({ @@ -70,58 +61,62 @@ Page({ CityId: options.cid || '', }) this.getList() - } else { + } + else { this.handleToggleSite() } }) }, 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 + res.authSetting['scope.userFuzzyLocation'] != undefined + && res.authSetting['scope.userFuzzyLocation'] == true ) { - //获取当前位置 - that.getFuzzyLocation() - } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { - //获取当前位置 - that.getFuzzyLocation() - } else { + // 获取当前位置 + this.getFuzzyLocation() + } + else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { + // 获取当前位置 + this.getFuzzyLocation() + } + else { wx.showModal({ title: '请求授权当前位置', content: '需要获取您的地理位置,请确认授权', confirmColor: '#8c75d0', - success(res) { + success: (res) => { if (res.cancel) { - //取消授权 + // 取消授权 wx.showToast({ title: '拒绝授权', icon: 'none', duration: 1000, }) - that.getList() - } else if (res.confirm) { - //确定授权,通过wx.openSetting发起授权请求 + this.getList() + } + else if (res.confirm) { + // 确定授权,通过wx.openSetting发起授权请求 wx.openSetting({ - success(res) { + success: (res) => { if (res.authSetting['scope.userFuzzyLocation'] == true) { wx.showToast({ title: '授权成功', icon: 'success', duration: 1000, }) - //再次授权,调用wx.getLocation的API - that.getFuzzyLocation() - } else { + // 再次授权,调用wx.getLocation的API + this.getFuzzyLocation() + } + else { wx.showToast({ title: '授权失败', icon: 'none', duration: 1000, }) - that.getList() + this.getList() } }, }) @@ -131,8 +126,9 @@ Page({ } }, }) - } else { - that.setData({ + } + else { + this.setData({ LNG: '', LAT: '', }) @@ -140,23 +136,20 @@ Page({ } }, getFuzzyLocation() { - const that = this wx.getFuzzyLocation({ - success(res) { - that.setData({ + success: (res) => { + this.setData({ LNG: res.longitude, LAT: res.latitude, }) - that.getLocationInfo() + this.getLocationInfo() }, - fail() { - that.getList() + fail: (err) => { + console.log('DEBUGPRINT[99]: index.ts:147: err=', err) + this.getList() }, }) }, - handleTapSite() { - - }, handleChangeSite(e: WechatMiniprogram.CustomEvent) { const detail = e.detail this.setData({ @@ -169,13 +162,6 @@ Page({ }, onChange(e: WechatMiniprogram.CustomEvent) { const index = e.detail.index - if (index == 0) { - - } else if (index == 1) { - - } else if (index == 2) { - - } this.setData({ tabActive: index, }) @@ -212,10 +198,12 @@ Page({ } if (tabActive == 0) { this.getHosList() - } else if (tabActive == 1) { + } + else if (tabActive == 1) { this.getDtpList() - } else if (tabActive == 2) { - this.getDoctorList() + } + else if (tabActive == 2) { + this.getInfusionCenter() } }, getHosList() { @@ -240,11 +228,11 @@ Page({ }) }) }, - getDoctorList() { + getDtpList() { const { Name, LNG, LAT, ProvinceId, CityId } = this.data wx.ajax({ method: 'GET', - url: '?r=zd/doctor/list', + url: '?r=zd/dtp-pharmacy/list', data: { lng: LNG, lat: LAT, @@ -254,33 +242,16 @@ Page({ }, }).then((res) => { this.setData({ + dtpList: res.list, locationName: '重新定位', - DoctortList: res.map((item: { Clinic: string }) => { - let weekName = '' - if (item.ClinicType == 2) { - weekName = item.Clinic - } else { - weekName = (JSON.parse(item.Clinic) ? JSON.parse(item.Clinic) : []).map( - (subItem: { weekday: string | number; timeType: string | number }) => { - const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] - const timeDay = { 1: '上午', 2: '下午' } - return { week: week[Number(subItem.weekday) - 1], timeDay: timeDay[subItem.timeType] } - }, - ) - } - return { - weekName, - ...item, - } - }), }) }) }, - getDtpList() { + getInfusionCenter() { const { Name, LNG, LAT, ProvinceId, CityId } = this.data wx.ajax({ method: 'GET', - url: '?r=zd/dtp-pharmacy/list', + url: '?r=xd/infusion-center/list', data: { lng: LNG, lat: LAT, @@ -290,7 +261,7 @@ Page({ }, }).then((res) => { this.setData({ - dtpList: res.list, + infusionCenterList: Array.isArray(res) ? res : res.list, locationName: '重新定位', }) }) @@ -318,14 +289,6 @@ Page({ }, handleDetail(e: WechatMiniprogram.CustomEvent) { const { url } = e.currentTarget.dataset - const { tabActive } = this.data - if (tabActive == 0) { - - } else if (tabActive == 1) { - - } else if (tabActive == 2) { - - } wx.navigateTo({ url, }) @@ -401,7 +364,8 @@ Page({ }) }, handleDefultLocation() { - if (this.data.locationName === '定位中') return + if (this.data.locationName === '定位中') + return this.setData({ locationName: '定位中', }) @@ -433,3 +397,5 @@ Page({ } }, }) + +export {} diff --git a/src/patient/pages/doctor/index.wxml b/src/patient/pages/doctor/index.wxml index 6480a1f..71ef359 100644 --- a/src/patient/pages/doctor/index.wxml +++ b/src/patient/pages/doctor/index.wxml @@ -1,10 +1,7 @@ - - + + - - {{ProvinceName}}{{ProvinceName == CityName ? '' : CityName}} + + + {{ProvinceName}}{{ProvinceName == CityName ? '' : CityName}} + 请选择省市 @@ -26,7 +24,7 @@ {{locationName}} - + - + - + @@ -83,7 +81,7 @@ data-lng="{{item.LNG}}" data-address="{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}" data-name="{{item.Name}}" - src="{{imageUrl}}za-images//1.5/site-circle.png" + src="{{imageUrl}}icon90.png?t={{Timestamp}}" > {{item.DoctorNum}}名医生 @@ -101,7 +99,7 @@ @@ -111,23 +109,27 @@ {{item.Name}} - - - - 自有输注中心 - - - - 合作输注中心 - - {{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}} {{item.Telephone}} - - + + + @@ -135,66 +137,45 @@ - + - + {{item.Name}} - - - {{item.hospital.HospitalClassificationName}}{{item.hospital.HospitalLevelName}} - - {{item.hospital.Name}} - - - {{item.hospital.ProvinceName}}{{item.hospital.CityName}}{{item.hospital.CountyName}}{{item.hospital.Address}} - - - - {{item.hospital.dist}} - + {{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}} + {{item.Telephone}} - - - - - - - {{item.Introduce}} - - - - - 出诊时间{{item.weekName}} - - - - {{wItem.week}} - {{wItem.timeDay}} + + + - + - + @@ -214,11 +195,11 @@ params="{{toastParams}}" > - + + + + + + + + diff --git a/src/patient/pages/enterInfo/index.wxml b/src/patient/pages/enterInfo/index.wxml index 5154c2b..2a62753 100644 --- a/src/patient/pages/enterInfo/index.wxml +++ b/src/patient/pages/enterInfo/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/src/patient/pages/hospital/index.scss b/src/patient/pages/hospital/index.scss index 058b5e4..083797b 100644 --- a/src/patient/pages/hospital/index.scss +++ b/src/patient/pages/hospital/index.scss @@ -1,4 +1,4 @@ -.scroll-view{ +.scroll-view { height: 100vh; } .page { @@ -27,7 +27,7 @@ align-items: center; .name { font-size: 36rpx; - color: #484848; + color: #211D2E; word-break: break-all; } .tag { @@ -37,7 +37,7 @@ font-size: 22rpx; line-height: 1; color: #ffffff; - background: #ffc137; + background: #FFA300; border-radius: 8rpx; } } @@ -49,19 +49,19 @@ .inner { .site { font-size: 24rpx; - color: #9b9ea6; + color: #ADACB2; } .site-num { font-size: 24rpx; - color: #9b9ea6; + color: #ADACB2; } } .options { flex-shrink: 0; .icon { - margin-left: 44rpx; - width: 30rpx; - height: 30rpx; + margin-left: 20rpx; + width: 48rpx; + height: 48rpx; background-color: #edeeef; border-radius: 50%; padding: 6rpx; @@ -80,33 +80,13 @@ border-radius: 24rpx; .m-title { position: relative; - margin-bottom: 48rpx; height: 88rpx; - background-color: #fff; - background: #ffeff4; - box-shadow: inset 0rpx 2rpx 12rpx 0rpx rgba(255, 255, 255, 0); - border-radius: 24rpx 24rpx 0rpx 0rpx; - border: 1rpx solid #efeff1; - display: flex; - align-items: center; - justify-content: center; .m-title-img { - width: 166rpx; - height: 42rpx; - } - .m-icon1 { - position: absolute; - top: -20rpx; - left: 64rpx; - width: 20rpx; - height: 64rpx; - } - .m-icon2 { position: absolute; top: -20rpx; - right: 64rpx; - width: 20rpx; - height: 64rpx; + left: 0; + width: 100%; + height: 108rpx; } } } @@ -125,13 +105,13 @@ padding-left: 20rpx; .name { font-size: 32rpx; - color: #484848; + color: #211D2E; font-weight: bold; } .p { margin-top: 8rpx; font-size: 24rpx; - color: #9da0a8; + color: #ADACB2; &.ellipsis { min-width: 0; overflow: hidden; @@ -150,7 +130,7 @@ margin-bottom: 10rpx; width: 120rpx; height: 32rpx; - background: #ffe6ee; + background: #FAF6FF; border-radius: 8rpx; display: flex; .week { @@ -158,14 +138,14 @@ font-size: 20rpx; line-height: 32rpx; color: #ffffff; - background-color: #e66c8e; + background-color: #B982FF; text-align: center; border-radius: 8rpx 0 8rpx 8rpx; } .value { flex: 1; font-size: 20rpx; - color: #e04775; + color: #B982FF; text-align: center; line-height: 32rpx; } diff --git a/src/patient/pages/hospital/index.ts b/src/patient/pages/hospital/index.ts index cf1ce55..412df9c 100644 --- a/src/patient/pages/hospital/index.ts +++ b/src/patient/pages/hospital/index.ts @@ -33,45 +33,49 @@ Page({ wx.getSetting({ success(res) { if ( - res.authSetting['scope.userFuzzyLocation'] != undefined && - res.authSetting['scope.userFuzzyLocation'] == true + res.authSetting['scope.userFuzzyLocation'] != undefined + && res.authSetting['scope.userFuzzyLocation'] == true ) { - //获取当前位置 + // 获取当前位置 that.getFuzzyLocation() - } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { - //获取当前位置 + } + else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { + // 获取当前位置 that.getFuzzyLocation() - } else { + } + else { wx.showModal({ title: '请求授权当前位置', content: '需要获取您的地理位置,请确认授权', confirmColor: '#8c75d0', success(res) { if (res.cancel) { - //取消授权 + // 取消授权 wx.showToast({ title: '拒绝授权', icon: 'none', duration: 1000, }) that.getDetail() - } else if (res.confirm) { - //确定授权,通过wx.openSetting发起授权请求 + } + else if (res.confirm) { + // 确定授权,通过wx.openSetting发起授权请求 wx.openSetting({ success(res) { if (res.authSetting['scope.userFuzzyLocation'] == true) { wx.showToast({ title: '授权成功', icon: 'success', - duration: 1000 + duration: 1000, }) // 再次授权,调用wx.getLocation的API that.getFuzzyLocation() - } else { + } + else { wx.showToast({ title: '授权失败', icon: 'none', - duration: 1000 + duration: 1000, }) that.getDetail() } @@ -83,7 +87,8 @@ Page({ } }, }) - } else { + } + else { that.setData({ LNG: '', LAT: '', @@ -123,13 +128,14 @@ Page({ this.setData({ detail: { ...res, - doctors: res.doctors.map((item: any) => { + doctors: res.doctors?.map((item: any) => { let weekName = '' if (item.ClinicType == 2) { weekName = item.Clinic - } else { + } + else { weekName = (JSON.parse(item.Clinic) ? JSON.parse(item.Clinic) : []).map( - (subItem: { weekday: string | number; timeType: string | number }) => { + (subItem: { weekday: string | number, timeType: string | number }) => { const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] const timeDay = { 1: '上午', 2: '下午' } return { week: week[Number(subItem.weekday) - 1], timeDay: timeDay[subItem.timeType] } diff --git a/src/patient/pages/hospital/index.wxml b/src/patient/pages/hospital/index.wxml index 0cd1228..90f0d2d 100644 --- a/src/patient/pages/hospital/index.wxml +++ b/src/patient/pages/hospital/index.wxml @@ -1,7 +1,7 @@ - - + + @@ -30,9 +30,7 @@ - - - + - + + + 就诊地图 + + + + + {{item.title}} + + + + diff --git a/src/patient/pages/infusionCenter/index.scss b/src/patient/pages/infusionCenter/index.scss index 6532daa..db1e06b 100644 --- a/src/patient/pages/infusionCenter/index.scss +++ b/src/patient/pages/infusionCenter/index.scss @@ -1,9 +1,93 @@ -.page { - display: block; - width: 100%; -} -.page-title { - margin-top: -120rpx; - text-align: center; - color: #fea8b7; -} +.page { + position: relative; + .banner { + width: 100%; + min-height: 374rpx; + } + .container { + padding: 48rpx 40rpx; + position: absolute; + top: 348rpx; + left: 0; + width: 100%; + min-height: 100vh; + border-radius: 24rpx 24rpx 0 0; + background-color: #fff; + box-sizing: border-box; + .title { + font-size: 36rpx; + color: #211d2e; + font-weight: bold; + } + .content { + margin-top: 32rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; + .inner { + .site { + font-size: 28rpx; + color: #adacb2; + } + .tel { + font-size: 28rpx; + color: #adacb2; + } + } + } + .options { + margin-top: 40rpx; + display: flex; + align-items: center; + justify-content: center; + gap: 30rpx; + .phone { + flex: 1; + line-height: 70rpx; + font-size: 32rpx; + color: #b982ff; + text-align: center; + border-radius: 60rpx 60rpx 60rpx 60rpx; + border: 1px solid #b982ff; + .icon { + display: inline-block; + width: 36rpx; + height: 36rpx; + vertical-align: middle; + } + } + .site { + flex: 1; + line-height: 76rpx; + font-size: 32rpx; + color: #ffffff; + border-radius: 60rpx; + text-align: center; + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + .icon { + display: inline-block; + width: 32rpx; + height: 32rpx; + vertical-align: middle; + } + } + } + + .remark { + margin-top: 56rpx; + padding: 32rpx; + border-radius: 24rpx; + background-color: #fafafa; + .r-title { + font-size: 32rpx; + color: #211d2e; + font-weight: bold; + } + .r-content { + margin-top: 20rpx; + font-size: 28rpx; + color: #69686e; + } + } + } +} diff --git a/src/patient/pages/infusionCenter/index.ts b/src/patient/pages/infusionCenter/index.ts index 82ac822..bdc3ab1 100644 --- a/src/patient/pages/infusionCenter/index.ts +++ b/src/patient/pages/infusionCenter/index.ts @@ -1,6 +1,54 @@ -const _app = getApp(); - -Page({ - data: {}, - onLoad() { }, -}) +const app = getApp() + +Page({ + data: { + id: '', + detail: {} as any, + }, + onLoad(options) { + this.setData({ + id: options.id, + }) + app.waitLogin({ type: [0, 1] }).then(() => { + this.getDetail() + }) + }, + + getDetail() { + wx.ajax({ + method: 'GET', + url: '?r=xd/infusion-center/detail', + data: { + Id: this.data.id, + }, + }).then((res) => { + this.setData({ + detail: res, + }) + }) + }, + handleSite() { + const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail + wx.openLocation({ + latitude: LAT, + longitude: LNG, + name: Name, + address: `${ProvinceName}${CityName}${CountyName}${Address}`, + }) + }, + handlePhone() { + const tel = this.data.detail.Telephone + if (!tel) { + wx.showToast({ + icon: 'none', + title: '电话暂未开通', + }) + return + } + wx.makePhoneCall({ + phoneNumber: tel, + }) + }, +}) + +export {} diff --git a/src/patient/pages/infusionCenter/index.wxml b/src/patient/pages/infusionCenter/index.wxml index 745d42d..51f5198 100644 --- a/src/patient/pages/infusionCenter/index.wxml +++ b/src/patient/pages/infusionCenter/index.wxml @@ -1,2 +1,27 @@ - -即将上线,敬请期待! + + + + + {{detail.Name}} + + + {{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}} + {{detail.Telephone}} + + + + + + 电话 + + + + 地址 + + + + 备注 + {{detail.Remark}} + + + diff --git a/src/patient/pages/liveResult/index.scss b/src/patient/pages/liveResult/index.scss index 86af2d9..84d60b5 100644 --- a/src/patient/pages/liveResult/index.scss +++ b/src/patient/pages/liveResult/index.scss @@ -41,6 +41,18 @@ page { color: #fff; text-align: center; } + .go-live { + margin: 38rpx auto 0; + width: 456rpx; + height: 88rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 40rpx; + color: #B982FF; + background: linear-gradient(to bottom, #ffffff 0%, #e8d6ff 100%); + border-radius: 48rpx 48rpx 48rpx 48rpx; + } .price { margin: 10rpx auto 0; font-size: 56rpx; diff --git a/src/patient/pages/liveResult/index.wxml b/src/patient/pages/liveResult/index.wxml index eafd796..5da474b 100644 --- a/src/patient/pages/liveResult/index.wxml +++ b/src/patient/pages/liveResult/index.wxml @@ -13,7 +13,10 @@ 报名成功 - 欢迎您参与此次活动 + + + 立即进入直播间 + 关注公众号,活动提醒不错过