From 970ae4a13baba5dc53cf93dd1c9c4ac927b759b7 Mon Sep 17 00:00:00 2001 From: limqhz Date: Mon, 29 Mar 2021 00:00:16 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/99@3x.png | Bin 0 -> 1893 bytes pages/healthDocs/index.js | 3 +++ pages/healthDocs/index.json | 2 +- pages/home/index.wxml | 10 ++++------ project.config.json | 11 ++++++++++- 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 images/99@3x.png diff --git a/images/99@3x.png b/images/99@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a85e29bfe72b763d5ac9a6f3a32d6683d09bd8ec GIT binary patch literal 1893 zcmaKsdpH|bAIIYoR0tY$h&!)aL{+6(2x@VgQp6=Fx+%4}rsz^l)s%>?DP23AB2|>C z5LsMGU0&0qR2OAcm#Qc+w`iqVOzXB-R`2`ld7t+@zjMy#{Lc4$pWiuuoP0lD4`oGd zMF0Sx?B$6G5YPU*T|q`Xmif2KiYKYm01sEG@qXAv@nT?5YS+}&Z{AZ)*C4xXiD1p zjx)fkC6?cx@clU7qoc%v!_)H0jERqBn6FIQv$KGW!7YUaPl};SSG!lb=Q;88a9Zo7 zWnCHXWtFpztw$!2a#Os0$gYIohwrD0SoJciEz_t+`R8wsy`VpOX$5+#z&V&gClTgd zItCsy4W`hlYOi5rLV@(#n29cze@)e3v~DmP)!y1*=3)FqQvuA;kK6-j3jWzs@48vE z)E$=m4`bt$%uCxu<;k={ii*XMjJ#oZQl-qi!J7wlwDKrt8b&_bL`^Cuzl!_p#EOLyqHEU5j#7DcmDHKplMFoclQ5bdMRTt{&E^YV0JAkFDT&0|wXj#eAxWxrGx4FRni_ImWX_qWpcWDvpmN#^*9yxV zjzx=b#6-)hcFco_)WK!civfS==_Uk->o4R2k86Xy$_ll$6Xk=ydw5 z1<`{(IY^&%W~@lnroL{zGYtLVm&i|r znRKdUQtCXFwBD05%49YgX5Q;ehppZFMb+7|(+y3y)mBrh|2n#vaqIkVoCkW#^3oT| zLqi7NSRamF&7Z0XYxr)o$A7Wwj+RA+X2tc(>$UsqHef7w?x%VfpErnpVOXg*lN9%w zX+igX#f)#hDQ9iW9!x*AWHlat=3G49{aoL50$GF6YReOTyU?8y?rrfDGx|v2-HfME zU0CB+BjstGNi*bt-0-KykSkWgQ9nvhP#epEHhM1!KuJl>N!>8BXJ zhLLA)?@o!=P$y) z*qpO8w6e3}_9fnlF{qXQs{B^JVN_ZENL@wLUB6LsQ%@CqzaRS@qz(uKw`EsX#%Ah} zLmcj3_tB4`l?}A3lCZ;`eWZ-kkjU1VNOg`2e@MrE;^0uf14wCi<&r+5mi2_Jpa| z?3}uQn;*)9+7gOZZ_wcS-@kV8`V1m#`p4YJ5)u!`B7Rj~)XXC?h+qWg_)aUfc?Y0A X#C!-3cJLE_UrdAR$?QJ?I3(X~ literal 0 HcmV?d00001 diff --git a/pages/healthDocs/index.js b/pages/healthDocs/index.js index e5c0dd6..0f70e21 100644 --- a/pages/healthDocs/index.js +++ b/pages/healthDocs/index.js @@ -117,6 +117,9 @@ Page({ console.log('打开文档成功') } }) + }, + fail: function(e){ + console.log('down file error',e); } }) }, diff --git a/pages/healthDocs/index.json b/pages/healthDocs/index.json index 9d30e69..db2ca28 100644 --- a/pages/healthDocs/index.json +++ b/pages/healthDocs/index.json @@ -3,4 +3,4 @@ "usingComponents": { "header": "/component/header/header" } -} \ No newline at end of file +} diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 53002e9..cf5db33 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -19,6 +19,10 @@ 足球场 + + + 健康报告 + @@ -99,12 +103,6 @@ - - - - - - diff --git a/project.config.json b/project.config.json index 8c33395..ed45262 100644 --- a/project.config.json +++ b/project.config.json @@ -21,14 +21,23 @@ "checkSiteMap": true, "uploadWithSourceMap": true, "compileHotReLoad": false, + "useMultiFrameRuntime": true, + "useApiHook": true, "babelSetting": { "ignore": [], "disablePlugins": [], "outputPath": "" }, + "enableEngineNative": false, "useIsolateContext": true, "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false + "userConfirmedUseCompilerModuleSwitch": false, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "bundle": false, + "useApiHostProcess": false }, "compileType": "miniprogram", "libVersion": "2.10.2", From 68e4dd0eaa9c6dacad3d9605d7d6fe6874bbde53 Mon Sep 17 00:00:00 2001 From: limqhz Date: Sun, 23 May 2021 20:59:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/myBookings/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/myBookings/index.js b/pages/myBookings/index.js index bcc01a8..a074ea3 100644 --- a/pages/myBookings/index.js +++ b/pages/myBookings/index.js @@ -1,6 +1,7 @@ // pages/myBookings/index.js const app = getApp(); let orderSn = "" +let orderLimit = 48; Page({ /** @@ -113,7 +114,7 @@ Page({ return; } else { wx.showToast({ - title: '距离开课48小时内不得取消', + title: '距离开课' + orderLimit + '小时内不得取消', icon: 'none', }) } @@ -164,6 +165,9 @@ Page({ }).then(res => { let currentDate = new Date().getTime(); let startDate = currentDate; + if (res.memberLessonTicket.venueLesson.orderLimit){ + orderLimit = res.memberLessonTicket.venueLesson.orderLimit; + } if (res.memberLessonTicket) { startDate = new Date(res.memberLessonTicket.venueLesson.date.replace(/-/g, "/") + ' ' + res.memberLessonTicket.venueLesson.startTime).getTime(); } @@ -174,7 +178,7 @@ Page({ } this.setData({ memberLessonTicket: res.memberLessonTicket, - isSignIn: (startDate - currentDate) / 1000 / 60 / 60 < 48, + isSignIn: (startDate - currentDate) / 1000 / 60 / 60 < orderLimit, }) }, err => { @@ -223,4 +227,4 @@ Page({ urls: [this.data.memberLessonTicket.venueLesson.coach.wechatCode], }) } -}) \ No newline at end of file +}) From 87236f1f8916e765e3aa2e866af034b40d0617e4 Mon Sep 17 00:00:00 2001 From: limqhz Date: Thu, 27 May 2021 22:43:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/authorizedMask/authorizedMask.js | 104 ------------------- component/authorizedMask/authorizedMask.json | 4 - component/authorizedMask/authorizedMask.wxml | 17 --- component/authorizedMask/authorizedMask.wxss | 67 ------------ component/confirmDialog/confirmDialog.js | 2 +- component/confirmDialog/confirmDialog.wxml | 4 +- pages/basketballGym/index.js | 32 +++--- pages/confirmOrder/index.js | 35 ++++--- pages/gymnasium/index.js | 34 +++--- pages/login/index.js | 72 +++++++------ pages/login/index.wxml | 3 +- pages/myAccount/index.js | 34 +++--- utils/pay.js | 2 +- 13 files changed, 121 insertions(+), 289 deletions(-) delete mode 100644 component/authorizedMask/authorizedMask.js delete mode 100644 component/authorizedMask/authorizedMask.json delete mode 100644 component/authorizedMask/authorizedMask.wxml delete mode 100644 component/authorizedMask/authorizedMask.wxss diff --git a/component/authorizedMask/authorizedMask.js b/component/authorizedMask/authorizedMask.js deleted file mode 100644 index 292ad9b..0000000 --- a/component/authorizedMask/authorizedMask.js +++ /dev/null @@ -1,104 +0,0 @@ -// pages/authorizedMask/authorizedMask.js -const app = getApp(); -Component({ - /** - * 组件的属性列表 - */ - properties: { - isSetting: { - type: Boolean, - value: false - }, - content: { - type: String, - value: '使用小程序需要您授权登录' - }, - isCancel: { - type: Boolean, - value: false - }, - /** - * Only: 只有一個 - * TwainCance: 兩個帶取消 - * */ - type: { - type: String, - value: 'Only' - } - }, - - /** - * 组件的初始数据 - */ - data: { - showBox: true, - }, - - /** - * 组件的方法列表 - */ - methods: { - stopSlide() { - return; - }, - - wxTap() { - this.setData({ - showBox: false - }) - }, - // 微信登录 - wxLogin(e) { - if (e.detail.errMsg === 'getUserInfo:fail auth deny') { - this.setData({ - showBox: true - }) - return - } - this.setData({ - showBox: false - }) - let that = this; - wx.login({ - success: function(res) { - if (res.code) { - app.$api.login({ - avatar: e.detail.userInfo.avatarUrl, - code: res.code, - nickname: e.detail.userInfo.nickName, - }).then(res => { - wx.setStorageSync('access_token', res.data.accessToken); - wx.setStorageSync('userInfo', e.detail.userInfo); - that.triggerEvent('loginSuccess', {}, {}); - }) - } else { - wx.showToast({ - title: '登录失败', - icon: 'none', - }) - } - }, - fail: function(res) { - wx.showToast({ - title: '登录失败', - icon: 'none', - }) - }, - }) - }, - // 取消 - cance() { - this.triggerEvent('cance', {}, {}); - }, - - // 打开设置 - setSuccess: function (e) { - this.triggerEvent('setsuccess', e.detail, {}); - // if (e.detail.authSetting["scope.userLocation"]) {//如果打开了地理位置,就会为true - // this.setData({ - // showFlag: true - // }) - // } - } - } -}) \ No newline at end of file diff --git a/component/authorizedMask/authorizedMask.json b/component/authorizedMask/authorizedMask.json deleted file mode 100644 index e8cfaaf..0000000 --- a/component/authorizedMask/authorizedMask.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/component/authorizedMask/authorizedMask.wxml b/component/authorizedMask/authorizedMask.wxml deleted file mode 100644 index 8d45b2f..0000000 --- a/component/authorizedMask/authorizedMask.wxml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - {{content}} - - - - - - - \ No newline at end of file diff --git a/component/authorizedMask/authorizedMask.wxss b/component/authorizedMask/authorizedMask.wxss deleted file mode 100644 index fb60505..0000000 --- a/component/authorizedMask/authorizedMask.wxss +++ /dev/null @@ -1,67 +0,0 @@ -/* pages/authorizedMask/authorizedMask.wxss */ - -.auth-bg { - position: fixed; - top: 0; - left: 0; - display: flex; - justify-content: center; - align-items: center; - width: 100vw; - height: 100vh; - background: rgba(0, 0, 0, 0.6); - z-index: 1001; -} - -.auth-box { - position: relative; - width: 70%; - height: 350rpx; - background: #252330; - border-radius: 10rpx; - color: #989898; -} - -.message { - display: flex; - justify-content: center; - align-items: center; - height: 250rpx; - /* border-bottom: 2rpx solid #EBEEF5; */ - font-size: 28rpx; -} - -.btn-bg>button { - width: 60%; - height: 70rpx; - line-height: 70rpx; - font-size: 26rpx; - color: #252330; - border-radius: 35rpx; - background: #ffc129; -} - -.btn-bg.btn-tow { - display: flex; -} - -button::after { - border: none; - border-radius: 0; -} - -.close { - position: absolute; - top: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - width: 60rpx; - height: 60rpx; -} - -.close>image { - width: 26rpx; - height: 26rpx; -} diff --git a/component/confirmDialog/confirmDialog.js b/component/confirmDialog/confirmDialog.js index bb2e9a3..7e96307 100644 --- a/component/confirmDialog/confirmDialog.js +++ b/component/confirmDialog/confirmDialog.js @@ -66,7 +66,7 @@ Component({ // 点击获取个人信息 openUserInfo(e) { - this.triggerEvent('getuserinfo', e.detail, {}); + this.triggerEvent('getuserinfo', e, {}); } } }) diff --git a/component/confirmDialog/confirmDialog.wxml b/component/confirmDialog/confirmDialog.wxml index f56874c..c65c5d3 100644 --- a/component/confirmDialog/confirmDialog.wxml +++ b/component/confirmDialog/confirmDialog.wxml @@ -7,8 +7,8 @@ - + - \ No newline at end of file + diff --git a/pages/basketballGym/index.js b/pages/basketballGym/index.js index 8b0712e..a8df561 100644 --- a/pages/basketballGym/index.js +++ b/pages/basketballGym/index.js @@ -268,20 +268,24 @@ Page({ // 授权微信 getUserInfo(e) { - app.$pay.payWxLoing(e.detail).then(res => { - wx.showToast({ - title: '绑定成功', - duration: 2000, - - }) - this.setData({ - isWxLogin: false - }) - }, err => { - this.setData({ - isWxLogin: false - }) - }) + wx.getUserProfile({ + desc: '用于完善会员资料', + success: (res) => { + app.$pay.payWxLoing(res).then(res => { + wx.showToast({ + title: '绑定成功', + duration: 2000, + }) + this.setData({ + isWxLogin: false + }) + }, err => { + this.setData({ + isWxLogin: false + }) + }) + } + }); } }) diff --git a/pages/confirmOrder/index.js b/pages/confirmOrder/index.js index 32c41fe..fdb0ff2 100644 --- a/pages/confirmOrder/index.js +++ b/pages/confirmOrder/index.js @@ -307,21 +307,24 @@ Page({ // 授权微信 getUserInfo(e) { - console.log(e.detail); - app.$pay.payWxLoing(e.detail).then(res => { - wx.showToast({ - title: '绑定成功', - duration: 2000, - - }) - this.setData({ - isWxLogin: false - }) - }, err => { - this.setData({ - isWxLogin: false - }) - }) + wx.getUserProfile({ + desc: '用于完善会员资料', + success: (res) => { + app.$pay.payWxLoing(res).then(res => { + wx.showToast({ + title: '绑定成功', + duration: 2000, + }) + this.setData({ + isWxLogin: false + }) + }, err => { + this.setData({ + isWxLogin: false + }) + }) + } + }); }, // 选中支付方式 @@ -330,4 +333,4 @@ Page({ payType: e.currentTarget.dataset.type }) } -}) \ No newline at end of file +}) diff --git a/pages/gymnasium/index.js b/pages/gymnasium/index.js index faebac7..9b41ed9 100644 --- a/pages/gymnasium/index.js +++ b/pages/gymnasium/index.js @@ -217,19 +217,23 @@ Page({ // 授权微信 getUserInfo(e) { - app.$pay.payWxLoing(e.detail).then(res => { - wx.showToast({ - title: '绑定成功', - duration: 2000, - - }) - this.setData({ - isWxLogin: false - }) - }, err => { - this.setData({ - isWxLogin: false - }) - }) + wx.getUserProfile({ + desc: '用于完善会员资料', + success: (res) => { + app.$pay.payWxLoing(res).then(res => { + wx.showToast({ + title: '绑定成功', + duration: 2000, + }) + this.setData({ + isWxLogin: false + }) + }, err => { + this.setData({ + isWxLogin: false + }) + }) + } + }); } -}) \ No newline at end of file +}) diff --git a/pages/login/index.js b/pages/login/index.js index 3476b5f..0bd8035 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -121,42 +121,52 @@ Page({ showUnclickMask: true }) let that = this; - wx.login({ - success: function(res) { - app.$api.memberLoginWX({ - avatar: e.detail.userInfo.avatarUrl, - code: res.code, - nickname: e.detail.userInfo.nickName - }).then(res => { - wx.setStorageSync('information', res.information); - if (!res.authorization) { - wx.redirectTo({ - url: '/pages/register/index?codeType=' + 1, + wx.getUserProfile({ + desc: '用于完善会员资料', + success: (res) => { + wx.login({ + success: function(r){ + app.$api.memberLoginWX({ + avatar: res.userInfo.avatarUrl, + code: r.code, + nickname: res.userInfo.nickName + }).then(res => { + wx.setStorageSync('information', res.information); + if (!res.authorization) { + wx.redirectTo({ + url: '/pages/register/index?codeType=' + 1, + }) + return; + } + wx.setStorageSync('accessToken', res.authorization.accessToken); + let route = wx.getStorageSync('history'); + wx.removeStorageSync('history'); + if (!route || route == '/pages/login/index') { + return wx.redirectTo({ + url: '/pages/mine/index', + }) + } + wx.redirectTo({ + url: route, + }) + }, err => { + that.setData({ + showUnclickMask: false + }) + }); + }, + fail: function(res) { + that.setData({ + showUnclickMask: false }) - return; - } - wx.setStorageSync('accessToken', res.authorization.accessToken); - let route = wx.getStorageSync('history'); - wx.removeStorageSync('history'); - if (!route || route == '/pages/login/index') { - return wx.redirectTo({ - url: '/pages/mine/index', - }) - } - wx.redirectTo({ - url: route, - }) - }, err => { - that.setData({ - showUnclickMask: false - }) - }); + }, + }) }, - fail: function(res) { + fail: (res) => { that.setData({ showUnclickMask: false }) }, }) }, -}) \ No newline at end of file +}) diff --git a/pages/login/index.wxml b/pages/login/index.wxml index 6dce9e3..b36e663 100644 --- a/pages/login/index.wxml +++ b/pages/login/index.wxml @@ -7,9 +7,8 @@ 快速微信登录 - - \ No newline at end of file + diff --git a/pages/myAccount/index.js b/pages/myAccount/index.js index c436643..c1e670e 100644 --- a/pages/myAccount/index.js +++ b/pages/myAccount/index.js @@ -153,19 +153,23 @@ Page({ // 授权微信 getUserInfo(e) { - app.$pay.payWxLoing(e.detail).then(res => { - wx.showToast({ - title: '绑定成功', - duration: 2000, - - }) - this.setData({ - isWxLogin: false - }) - }, err => { - this.setData({ - isWxLogin: false - }) - }) + wx.getUserProfile({ + desc: '用于完善会员资料', + success: (res) => { + app.$pay.payWxLoing(res).then(res => { + wx.showToast({ + title: '绑定成功', + duration: 2000, + }) + this.setData({ + isWxLogin: false + }) + }, err => { + this.setData({ + isWxLogin: false + }) + }) + } + }); } -}) \ No newline at end of file +}) diff --git a/utils/pay.js b/utils/pay.js index c5d7ce5..a09baa2 100644 --- a/utils/pay.js +++ b/utils/pay.js @@ -23,7 +23,7 @@ export function pay(body) { } export function payWxLoing(body) { - console.log(body) + console.log(body.userInfo) const app = getApp(); return new Promise((resolve, reject) => { From ddd62ca041d0be38966977bb89b978b46a444ff1 Mon Sep 17 00:00:00 2001 From: limqhz Date: Tue, 21 Sep 2021 19:59:28 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=A2=84=E5=AE=9A=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A1=E6=A0=B8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/myBookings/index.wxml | 3 ++- pages/myBookingsList/index.wxml | 3 ++- project.config.json | 7 +++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/myBookings/index.wxml b/pages/myBookings/index.wxml index 58fd584..b6ca669 100644 --- a/pages/myBookings/index.wxml +++ b/pages/myBookings/index.wxml @@ -7,10 +7,11 @@ {{memberLessonTicket.venueLesson.name}} - 已预约 + 预约成功 未签到 已签到 已取消 + 待审核 diff --git a/pages/myBookingsList/index.wxml b/pages/myBookingsList/index.wxml index 1fcee97..96428eb 100644 --- a/pages/myBookingsList/index.wxml +++ b/pages/myBookingsList/index.wxml @@ -14,10 +14,11 @@ 预约单号: {{item.orderSn}} - 已预约 + 预约成功 未签到 已完成 已取消 + 待审核 diff --git a/project.config.json b/project.config.json index ed45262..b22fba3 100644 --- a/project.config.json +++ b/project.config.json @@ -23,6 +23,7 @@ "compileHotReLoad": false, "useMultiFrameRuntime": true, "useApiHook": true, + "useApiHostProcess": true, "babelSetting": { "ignore": [], "disablePlugins": [], @@ -35,12 +36,10 @@ "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], - "minifyWXSS": true, - "bundle": false, - "useApiHostProcess": false + "minifyWXSS": true }, "compileType": "miniprogram", - "libVersion": "2.10.2", + "libVersion": "2.17.0", "appid": "wx73eb8a9ed10a029d", "projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86", "isGameTourist": false,