Browse Source

优化登录授权

wenningning 1 năm trước cách đây
mục cha
commit
f002da1735

+ 1 - 1
sleep/pages/log/smsVoice/index.vue

@@ -75,7 +75,7 @@ export default {
   methods: {
     getList() {
       let _this = this
-      this.params.fixedCondition = " member_union_id='" + this.unionId +"'"
+      this.params.fixedCondition = " `status` = 1 and member_union_id='" + this.unionId +"'"
       API_SMS_VOICE_LOG.getPage(this.params).then(res => {
         if (res.data.length > 0) {
           _this.logList.push(...res.data)

+ 9 - 0
sleep/pages/login/index.vue

@@ -81,6 +81,15 @@ export default {
     getPhoneNumber(e) {
       console.log('e======', e)
       let _this = this
+      if (!e.detail.iv) {
+        console.log('请求失败,重新授权')
+        wx.openSetting({
+          complete: (res) => {
+            console.log(res)
+          }
+        })
+        return
+      }
       let params = {
         encryptedData: e.detail.encryptedData,
         iv: e.detail.iv,

+ 1 - 1
sleep/pages/tabBar/home.vue

@@ -370,7 +370,7 @@ export default {
         if (!res.authSetting['scope.userInfo']) {
           return
         }
-        console.log('222222222222222222222222222')
+        console.log('222222222222222222222222222', res)
         const memberId = Storage.getItem('uid')
         if (memberId) {
           this.memberId = memberId

+ 7 - 7
sleep/pages/tabBar/report.vue

@@ -21,10 +21,10 @@
 
 					<img class="report-header-img" src="../../static/report/reportIconLight.png" />
 
-					<view class="btns-report">
-						<view @click="handleMonthClick" class="btn-month-report">月报</view>
-						<view @click="handleWeekClick" class="btn-week-report">周报</view>
-					</view>
+<!--					<view class="btns-report">-->
+<!--						<view @click="handleMonthClick" class="btn-month-report">月报</view>-->
+<!--						<view @click="handleWeekClick" class="btn-week-report">周报</view>-->
+<!--					</view>-->
 
 					<view class="flex-col report_score space-y-55">
 						<view class="flex-row space-x-10 report_period">
@@ -917,9 +917,9 @@
         this.calendarShow = null
       },
       handleClickBreath(index) {
-        uni.navigateTo({
-          url: '/pages/log/report/reportDetail?index=' + index
-        })
+        // uni.navigateTo({
+        //   url: '/pages/log/report/reportDetail?index=' + index
+        // })
       }
     }
 	}