diff --git a/dist.sh b/dist.sh index 1874050..c6b3638 100644 --- a/dist.sh +++ b/dist.sh @@ -2,4 +2,3 @@ cd ./src/images/ || exit svn add . --no-ignore --force svn ci -m "版本更新" -exit diff --git a/project.private.config.json b/project.private.config.json index 4b63061..72f22a2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -2,7 +2,8 @@ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "wutian-miniprogram", "setting": { - "compileHotReLoad": true + "compileHotReLoad": true, + "urlCheck": false }, "condition": { "miniprogram": { diff --git a/src/components/customAudioBar/index.ts b/src/components/customAudioBar/index.ts index b21ad43..40a50b9 100644 --- a/src/components/customAudioBar/index.ts +++ b/src/components/customAudioBar/index.ts @@ -5,15 +5,66 @@ Component({ /** * 组件的属性列表 */ - properties: {}, + properties: { + url: { + type: String, + value: + 'https://circlehbsaas.oss-cn-beijing.aliyuncs.com/audio/20240907757_tmp_acf4f18c59553a8d2d9f74e173a16328.m4a.mp3', + }, + time: { + type: String, + value: '', + }, + }, /** * 组件的初始数据 */ - data: {}, + data: { + play: false, + innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null, + }, + + lifetimes: { + attached() { + this.setData({ + innerAudioContext: wx.createInnerAudioContext(), + }) + }, + }, /** * 组件的方法列表 */ - methods: {}, + methods: { + handlePlay() { + const { url, play, innerAudioContext } = this.data + if (innerAudioContext) { + if (play) { + innerAudioContext.stop() + return + } + innerAudioContext.stop() + innerAudioContext.src = url + innerAudioContext.play() + this.setData({ + play: true, + }) + innerAudioContext.onEnded(() => { + this.setData({ + play: false, + }) + }) + } + }, + handlePause() { + const { innerAudioContext } = this.data + if (innerAudioContext) { + innerAudioContext.pause() + this.setData({ + play: false, + }) + } + }, + }, }) diff --git a/src/components/customAudioBar/index.wxml b/src/components/customAudioBar/index.wxml index be74088..c992c69 100644 --- a/src/components/customAudioBar/index.wxml +++ b/src/components/customAudioBar/index.wxml @@ -1,11 +1,12 @@ - - + + - + + 45” diff --git a/src/components/customRecord/index.scss b/src/components/customRecord/index.scss index c22fb37..b487c96 100644 --- a/src/components/customRecord/index.scss +++ b/src/components/customRecord/index.scss @@ -27,10 +27,11 @@ display: flex; align-items: center; .wave { - width: 260rpx; - height: 60rpx; + width: 230rpx; + height: 68rpx; } .time { + margin-left: 26rpx; font-size: 28rpx; color: rgba(255, 255, 255, 1); } @@ -81,7 +82,7 @@ padding: 56rpx; // border: 28rpx solid rgba(255, 255, 255, 0.25); border-radius: 50%; - animation: grow-bp 0.6s ease-in-out 0.3s infinite; + animation: grow-bp 0.6s ease-in-out infinite; @keyframes grow-bp { 0% { padding: 0; diff --git a/src/components/customRecord/index.ts b/src/components/customRecord/index.ts index 1d52887..ad0248b 100644 --- a/src/components/customRecord/index.ts +++ b/src/components/customRecord/index.ts @@ -1,3 +1,5 @@ +import { isQualifiedName } from 'typescript' + const _app = getApp() // pages/story/a.ts @@ -13,27 +15,111 @@ Component({ data: { startShow: false, show: false, + recorderManager: null as null | WechatMiniprogram.RecorderManager, + time: 0, }, + lifetimes: { + attached() { + const recorderManager = wx.getRecorderManager() + this.setData({ + recorderManager, + }) + this.recorderManagerListen(recorderManager) + }, + }, /** * 组件的方法列表 */ methods: { handleStart() { - this.setData({ - startShow: true, + this.checkRecordPermission(() => { + this.setData({ + startShow: true, + }) }) }, handleShow() { + const { recorderManager } = this.data this.setData({ show: true, }) + recorderManager?.start({ + format: 'mp3', + }) }, handleHide() { + const { recorderManager } = this.data + recorderManager?.stop() this.setData({ startShow: false, show: false, }) }, + recorderManagerListen(recorderManager: WechatMiniprogram.RecorderManager) { + recorderManager.onError(() => { + wx.showToast({ + title: '录音失败', + icon: 'none', + }) + }) + recorderManager.onStart(() => { + this.handleTiem() + }) + recorderManager.onStop((res) => { + this.handleHide() + console.log(res) + }) + }, + checkRecordPermission(callback: () => void) { + wx.getSetting({ + success(res) { + if (!res.authSetting['scope.record']) { + wx.authorize({ + scope: 'scope.record', + success() { + // 用户已同意授权 + }, + fail() { + // 用户拒绝了授权 + wx.showModal({ + title: '提示', + content: '需要获取录音权限,请点击确定进入设置页面进行授权。', + showCancel: false, + success(res) { + if (res.confirm) { + wx.openSetting({ + success(res) { + // 用户在设置页面设置了录音权限 + if (res.authSetting['scope.record']) { + // 用户在设置页面设置了录音权限 + } else { + // 用户在设置页面未设置录音权限 + } + }, + }) + } + }, + }) + }, + }) + } else { + // 已经有录音权限 + callback() + } + }, + }) + }, + handleTiem() { + const time = setTimeout(() => { + clearInterval(time) + if (!this.data.show) return + this.setData({ + time: this.data.time + 1, + }) + console.log(this.data.time) + this.handleTiem() + }, 1000) + }, }, }) diff --git a/src/components/customRecord/index.wxml b/src/components/customRecord/index.wxml index c662c5a..94f03bc 100644 --- a/src/components/customRecord/index.wxml +++ b/src/components/customRecord/index.wxml @@ -8,8 +8,8 @@ - - 45” + + {{time}}” diff --git a/src/custom-tab-bar/index.scss b/src/custom-tab-bar/index.scss index 037271c..c569fe8 100644 --- a/src/custom-tab-bar/index.scss +++ b/src/custom-tab-bar/index.scss @@ -15,6 +15,58 @@ width: 94rpx; height: 94rpx; } + .popup-tip { + padding: 22rpx 48rpx; + position: absolute; + top: -50rpx; + left: 50%; + transform: translate(-50%, -100%); + border-radius: 16rpx; + background-color: rgba(20, 21, 21, 0.76); + .content { + text-align: center; + font-size: 28rpx; + color: #fff; + white-space: nowrap; + line-height: 32rpx; + .plus { + font-size: 52rpx; + font-weight: bold; + } + } + .pt-footer { + margin-top: 16rpx; + display: flex; + align-items: center; + justify-content: center; + gap: 24rpx; + .cancel { + padding: 8rpx 28rpx; + font-size: 24rpx; + color: rgba(255, 255, 255, 1); + } + .ok { + padding: 8rpx 28rpx; + font-size: 24rpx; + color: rgba(20, 21, 21, 1); + line-height: 32rpx; + border-radius: 80rpx; + background-color: #fff; + } + } + &::after { + position: absolute; + content: ''; + bottom: -10rpx; + left: 50%; + transform: translateX(-50%); + width: 0; + height: 0; + border-style: solid; + border-width: 12rpx 12rpx 0 12rpx; + border-color: rgba(20, 21, 21, 0.76) transparent transparent transparent; + } + } } .tab-item { flex: 1; diff --git a/src/custom-tab-bar/index.ts b/src/custom-tab-bar/index.ts index 30be479..8bf8250 100644 --- a/src/custom-tab-bar/index.ts +++ b/src/custom-tab-bar/index.ts @@ -11,18 +11,22 @@ Component({ * 组件的初始数据 */ data: { + showEntryCase: false, + active: 0, tabbar: [ { path: '/pages/home/index', name: '首页', icon: 'tab1.png', iconActive: 'tab-active1.png', + activeIndex: 1, }, { path: '/pages/cases/index', name: '病历', icon: 'tab2.png', iconActive: 'tab-active2.png', + activeIndex: 2, }, { custom: true, @@ -33,16 +37,17 @@ Component({ name: '聊天室', icon: 'tab3.png', iconActive: 'tab-active3.png', + activeIndex: 3, }, { path: '/pages/my/index', name: '我的', icon: 'tab4.png', iconActive: 'tab-active3.png', + activeIndex: 4, }, ], }, - attached() {}, /** * 组件的方法列表 diff --git a/src/custom-tab-bar/index.wxml b/src/custom-tab-bar/index.wxml index fa61949..a29652a 100644 --- a/src/custom-tab-bar/index.wxml +++ b/src/custom-tab-bar/index.wxml @@ -2,8 +2,21 @@ + + + 点击 + + + ,可录入病历 + + 邀约合作医生一起讨论哦 + + + 跳过 + 去录入 + + - + {{item.name}} diff --git a/src/echart/components/homeLevel1/index.scss b/src/echart/components/homeLevel1/index.scss index 6686a4c..5f85013 100644 --- a/src/echart/components/homeLevel1/index.scss +++ b/src/echart/components/homeLevel1/index.scss @@ -5,6 +5,7 @@ gap: 24rpx; align-items: center; .avatar { + flex-shrink: 0; width: 112rpx; height: 112rpx; } @@ -104,6 +105,20 @@ opacity: 0.5; } } + .b-container-none { + position: relative; + z-index: 1; + width: 686rpx; + height: 172rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #fff; + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 1rpx solid #ffffff; + } } } .stat { @@ -143,8 +158,47 @@ } } } - .cooperate, - .invite { + .stat-none { + position: relative; + margin-top: 24rpx; + padding: 96rpx 0 32rpx; + border-radius: 16rpx; + .title { + position: absolute; + top: 0; + left: 0; + padding: 16rpx 24rpx; + font-size: 28rpx; + color: #fff; + } + .s-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 38rpx 0; + .none { + width: 102rpx; + height: 102rpx; + } + .tip { + padding: 0 26rpx; + flex: 1; + font-size: 28rpx; + color: rgba(128, 128, 128, 1); + } + .btn { + width: 184rpx; + height: 72rpx; + text-align: center; + line-height: 72rpx; + font-size: 30rpx; + color: rgba(255, 255, 255, 1); + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 44rpx 44rpx 44rpx 44rpx; + } + } + } + .cooperate { margin-top: 24rpx; background: linear-gradient(180deg, #f1feff 0%, #ffffff 100%); border-radius: 16rpx 16rpx 16rpx 16rpx; @@ -269,4 +323,39 @@ } } } + + .cooperate-none { + margin-top: 24rpx; + background: linear-gradient(180deg, #f1feff 0%, #ffffff 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 2rpx solid #ffffff; + &-header { + padding: 32rpx 20rpx; + display: flex; + align-items: center; + justify-content: space-between; + .name { + font-size: 32rpx; + color: rgba(20, 21, 21, 1); + } + } + .none { + padding-bottom: 54rpx; + text-align: center; + .none-img { + width: 240rpx; + height: 200rpx; + } + .content { + margin-top: -70rpx; + text-align: center; + font-size: 32rpx; + color: rgba(153, 153, 153, 1); + line-height: 44rpx; + .sub-content{ + font-size: 28rpx; + } + } + } + } } diff --git a/src/echart/components/homeLevel1/index.ts b/src/echart/components/homeLevel1/index.ts index 6539630..e141c94 100644 --- a/src/echart/components/homeLevel1/index.ts +++ b/src/echart/components/homeLevel1/index.ts @@ -13,8 +13,6 @@ Component({ data: { fold1: false, foldHeight1: 10000, - fold2: false, - foldHeight2: 10000, }, attached() { @@ -27,11 +25,9 @@ Component({ getHeight() { const query = wx.createSelectorQuery().in(this) query.select('#fold1').boundingClientRect() - query.select('#fold2').boundingClientRect() query.exec((res) => { this.setData({ foldHeight1: res[0].height, - foldHeight2: res[1].height, }) }) }, @@ -40,10 +36,5 @@ Component({ fold1: !this.data.fold1, }) }, - toggleFold2() { - this.setData({ - fold2: !this.data.fold2, - }) - }, }, }) diff --git a/src/echart/components/homeLevel1/index.wxml b/src/echart/components/homeLevel1/index.wxml index e9dcb87..95869da 100644 --- a/src/echart/components/homeLevel1/index.wxml +++ b/src/echart/components/homeLevel1/index.wxml @@ -20,7 +20,7 @@ - + + 我提交的病历 + + + 还没有提交病历 + 提交病历 + + + 我合作的医生(2) @@ -113,47 +127,15 @@ - - - 我合作的医生(2) - - - 展开 - - - - 收起 - - - + + + 我合作的医生 - - - - - - 徐萌 - 主任医师 - - 心内科 - - - 北京天坛医院 - 三甲 - 广州市/番禺区 - - - - 心律失常 - 心律失常 - 心律失常 - 心律失常 - - + + + + 还没有合作医生哦 + 合作医生出示邀约码您用微信扫一扫即可绑定 diff --git a/src/echart/components/homeLevel2/index.scss b/src/echart/components/homeLevel2/index.scss index 342ec70..71452a1 100644 --- a/src/echart/components/homeLevel2/index.scss +++ b/src/echart/components/homeLevel2/index.scss @@ -144,6 +144,20 @@ opacity: 0.5; } } + .b-container-none { + position: relative; + z-index: 1; + width: 686rpx; + height: 172rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #fff; + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 1rpx solid #ffffff; + } } } .stat { @@ -191,6 +205,46 @@ } } } + .stat-none { + position: relative; + margin-top: 24rpx; + padding: 96rpx 0 32rpx; + border-radius: 16rpx; + .title { + position: absolute; + top: 0; + left: 0; + padding: 16rpx 24rpx; + font-size: 28rpx; + color: #fff; + } + .s-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 38rpx 0; + .none { + width: 102rpx; + height: 102rpx; + } + .tip { + padding: 0 26rpx; + flex: 1; + font-size: 28rpx; + color: rgba(128, 128, 128, 1); + } + .btn { + width: 184rpx; + height: 72rpx; + text-align: center; + line-height: 72rpx; + font-size: 30rpx; + color: rgba(255, 255, 255, 1); + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 44rpx 44rpx 44rpx 44rpx; + } + } + } .cooperate, .invite { margin-top: 24rpx; @@ -329,4 +383,39 @@ } } } + .cooperate-none, + .invite-none { + margin-top: 24rpx; + background: linear-gradient(180deg, #f1feff 0%, #ffffff 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 2rpx solid #ffffff; + &-header { + padding: 32rpx 20rpx; + display: flex; + align-items: center; + justify-content: space-between; + .name { + font-size: 32rpx; + color: rgba(20, 21, 21, 1); + } + } + .none { + padding-bottom: 54rpx; + text-align: center; + .none-img { + width: 240rpx; + height: 200rpx; + } + .content { + margin-top: -70rpx; + text-align: center; + font-size: 32rpx; + color: rgba(153, 153, 153, 1); + line-height: 44rpx; + .sub-content { + font-size: 28rpx; + } + } + } + } } diff --git a/src/echart/components/homeLevel2/index.wxml b/src/echart/components/homeLevel2/index.wxml index b387aaa..cc09a08 100644 --- a/src/echart/components/homeLevel2/index.wxml +++ b/src/echart/components/homeLevel2/index.wxml @@ -32,7 +32,7 @@ - + + 我提交的病历 + + + 还没有提交病历 + 提交病历 + + + 我合作的医生(2) @@ -136,7 +150,19 @@ - + + + 我合作的医生 + + + + + 还没有合作医生哦 + 合作医生出示邀约码您用微信扫一扫即可绑定 + + + + 我邀约的医生(1) @@ -181,4 +207,15 @@ + + + 我邀约的医生 + + + + + 还没有邀约医生哦 + + + diff --git a/src/echart/components/homeLevel3/index.scss b/src/echart/components/homeLevel3/index.scss index e3b64e7..4847941 100644 --- a/src/echart/components/homeLevel3/index.scss +++ b/src/echart/components/homeLevel3/index.scss @@ -144,6 +144,20 @@ opacity: 0.5; } } + .b-container-none { + position: relative; + z-index: 1; + width: 686rpx; + height: 172rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #fff; + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 1rpx solid #ffffff; + } } } .stat { @@ -191,4 +205,44 @@ } } } + .stat-none { + position: relative; + margin-top: 24rpx; + padding: 96rpx 0 32rpx; + border-radius: 16rpx; + .title { + position: absolute; + top: 0; + left: 0; + padding: 16rpx 24rpx; + font-size: 28rpx; + color: #fff; + } + .s-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 38rpx 0; + .none { + width: 102rpx; + height: 102rpx; + } + .tip { + padding: 0 26rpx; + flex: 1; + font-size: 28rpx; + color: rgba(128, 128, 128, 1); + } + .btn { + width: 184rpx; + height: 72rpx; + text-align: center; + line-height: 72rpx; + font-size: 30rpx; + color: rgba(255, 255, 255, 1); + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 44rpx 44rpx 44rpx 44rpx; + } + } + } } diff --git a/src/echart/components/homeLevel3/index.wxml b/src/echart/components/homeLevel3/index.wxml index cd8c445..220e1ad 100644 --- a/src/echart/components/homeLevel3/index.wxml +++ b/src/echart/components/homeLevel3/index.wxml @@ -32,7 +32,7 @@ + 我管理的病历 + + + 还没有提交病历 + 提交病历 + + + 我管理的医生 @@ -126,4 +141,15 @@ + + 我管理的医生 + + + 还没有邀约的医生 + + diff --git a/src/echart/components/homeLevel4/index.scss b/src/echart/components/homeLevel4/index.scss index d4bcbbb..fd32747 100644 --- a/src/echart/components/homeLevel4/index.scss +++ b/src/echart/components/homeLevel4/index.scss @@ -97,7 +97,7 @@ position: relative; z-index: 1; padding: 14rpx; - width: 262rpx; + width: 221rpx; height: 116rpx; text-align: center; font-size: 28rpx; @@ -144,6 +144,20 @@ opacity: 0.5; } } + .b-container-none { + position: relative; + z-index: 1; + width: 686rpx; + height: 172rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #fff; + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 1rpx solid #ffffff; + } } } .stat { @@ -156,7 +170,7 @@ top: 0; left: 0; padding: 16rpx 24rpx; - font-size: 28rpx; + font-size: 26rpx; color: #fff; } .picker { @@ -205,6 +219,20 @@ border-right: 1rpx dashed rgba(224, 224, 224, 0.5); } } + .s-container-none { + padding: 4rpx 0; + display: flex; + align-items: center; + justify-content: center; + .none { + width: 116rpx; + height: 102rpx; + } + .tip { + font-size: 28rpx; + color: rgba(128, 128, 128, 1); + } + } } .department { margin-top: 24rpx; @@ -257,6 +285,37 @@ text-align: right; } } + .department-none { + margin-top: 24rpx; + padding: 0 20rpx; + background: linear-gradient(180deg, #f1feff 0%, #ffffff 35%, #ffffff 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + border: 2rpx solid #ffffff; + .d-header { + padding: 32rpx 0; + display: flex; + align-items: center; + justify-content: space-between; + .name { + font-size: 32rpx; + color: rgba(20, 21, 21, 1); + } + } + .d-container { + padding: 24rpx; + text-align: center; + .none-img { + width: 240rpx; + height: 200rpx; + } + .none-title { + margin-top: -80rpx; + font-size: 28rpx; + color: rgba(153, 153, 153, 1); + line-height: 44rpx; + } + } + } .chart-card { margin-top: 24rpx; background: linear-gradient(180deg, #f1feff 0%, #ffffff 35%, #ffffff 100%); @@ -284,7 +343,7 @@ } } } - .cahrt { + .chart { height: 450rpx; } .tip { @@ -293,6 +352,20 @@ color: rgba(153, 153, 153, 1); text-align: right; } + .chart-none { + padding: 24rpx; + text-align: center; + .none-img { + width: 240rpx; + height: 200rpx; + } + .none-title { + margin-top: -80rpx; + font-size: 28rpx; + color: rgba(153, 153, 153, 1); + line-height: 44rpx; + } + } } .rank { margin: 24rpx -32rpx 0; diff --git a/src/echart/components/homeLevel4/index.wxml b/src/echart/components/homeLevel4/index.wxml index b156fbf..cf856d7 100644 --- a/src/echart/components/homeLevel4/index.wxml +++ b/src/echart/components/homeLevel4/index.wxml @@ -32,7 +32,7 @@ +