浏览代码

Build V1.3.12

wangyuan 2 年之前
父节点
当前提交
2691fefb5d

+ 1 - 0
app.js

@@ -6,6 +6,7 @@ App({
   onLaunch() {
     console.log('App onLaunch');
     const that = this
+    wx.setStorageSync('selectedInex', 0)
     wx.getStorage({
       key: 'accessToken',
       success (res) {

+ 6 - 2
custom-tab-bar/index.js

@@ -24,8 +24,9 @@ Component({
   attached() {
   },
   ready () {
+    const selectedInex = wx.getStorageSync('selectedInex')
     this.setData({
-      selected: app.globalData.selectedInex
+      selected: selectedInex
     })
   },
   methods: {
@@ -33,7 +34,8 @@ Component({
       const data = e.currentTarget.dataset
       const url = data.path
       if (data.index == 1 || data.index == 2) {
-        if (!app.globalData.userInfo.login) {
+        const isLogin = wx.getStorageSync('login')
+        if (isLogin != true) {
           wx.showToast({
             title: '请先授权登录',
             icon: 'error'
@@ -41,10 +43,12 @@ Component({
           return false
         } else {
           app.globalData.selectedInex = data.index
+          wx.setStorageSync('selectedInex', data.index)
           wx.switchTab({url})
         }
       } else {
         app.globalData.selectedInex = data.index
+        wx.setStorageSync('selectedInex', data.index)
         wx.switchTab({url})
       }
     }

+ 1 - 4
pages/appointment/appointment.js

@@ -51,7 +51,7 @@ Page({
     var userName = wx.getStorageSync('userName')
     this.getAccountNmberFn()
     this.setData({
-      appusername: userName.length > 8 ? userName.substring(0,4) : auserName,
+      appusername: userName.length > 8 ? userName.substring(0,4) : userName,
       appuserheadimg: headImg
     })
     if (app.globalData.navigateBackParams.address) {
@@ -88,7 +88,6 @@ Page({
         return item.isBusy == false
       })
       if (allBusy == undefined) {
-        console.log(index,cDate, '约满')
         that.handleAllDayBusy(cDate)
       }
       response.forEach(item => {
@@ -212,8 +211,6 @@ Page({
   },
   setCalendarItem () {
     var that = this
-    console.log(this.data.currentWeek, 'that.data.currentWeek');
-    console.log(that.data.weekList, 'that.data.weekList');
     var _mapWeekList = that.data.weekList
     _mapWeekList.map((item, index) => {
       const baseDate = new Date((index - that.data.currentWeek) * 86400000 + that.data.currentTime)

+ 1 - 1
pages/exchange/exchange.wxml

@@ -7,7 +7,7 @@
     </view>
     <view class="form-item card-pwd ittflex-jcb">
       <view class="label">请输入卡密:</view>
-      <input bindinput="bindCardPwd" class="carditem" password type="text"  placeholder="请输入" placeholder-style="font-size: 26rpx;font-weight: 400;color: #999999;"/>
+      <input bindinput="bindCardPwd" class="carditem" type="text"  placeholder="请输入" placeholder-style="font-size: 26rpx;font-weight: 400;color: #999999;"/>
     </view>
   </view>
   <view class="tips">

+ 5 - 1
pages/index/index.js

@@ -33,11 +33,11 @@ Page({
    */
   onShow() {
     app.globalData.selectedInex = 0
+    wx.setStorageSync('selectedInex', 0)
     this.handleToken()
   },
   handleToken () {
     const accessToken = wx.getStorageSync('accessToken')
-    console.log('accessToken',accessToken);
     if (accessToken) {
       this.storageTokenLogin()
     } else {
@@ -80,6 +80,7 @@ Page({
     console.log(_isNeedPhone, _headImg, '79');
     if (!_isNeedPhone && _headImg !== '') {
       app.globalData.userInfo.login = true
+      wx.setStorageSync('login', true)
       this.initIndexData()
     } else {
       if (_isNeedPhone) {
@@ -93,6 +94,7 @@ Page({
           })
         } else {
           app.globalData.userInfo.login = true
+          wx.setStorageSync('login', true)
         }
       }
     }
@@ -139,6 +141,7 @@ Page({
         })
       } else {
         app.globalData.userInfo.login = true
+        wx.setStorageSync('login', true)
       }
     }).catch(e => {
       wx.hideLoading()
@@ -187,6 +190,7 @@ Page({
       app.globalData.userInfo.headImg = _headImg
       app.globalData.userInfo.userName = _userName
       app.globalData.isNeedHeadImg = false
+      wx.setStorageSync('login', true)
       wx.setStorageSync('headImg', _headImg)
       wx.setStorageSync('userName', _userName)
       wx.setStorageSync('isNeedHeadImg', false)

+ 2 - 0
pages/my/my.js

@@ -87,6 +87,7 @@ Page({
    */
   onLoad(options) {
     app.globalData.selectedInex = 2
+    wx.setStorageSync('selectedInex', 2)
     var headImg = wx.getStorageSync('headImg')
     var userName = wx.getStorageSync('userName')
     this.setData({
@@ -223,6 +224,7 @@ Page({
   authNavTo (url) {
     if (url.indexOf('/report') !== -1) {
       app.globalData.selectedInex = 1
+      wx.setStorageSync('selectedInex', 1)
       wx.switchTab({
         url: url,
       })

+ 2 - 1
pages/report/report.js

@@ -17,8 +17,9 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-    console.log(app.globalData.hasAppointment);
     app.globalData.selectedInex = 1
+    wx.setStorageSync('selectedInex', 1)
+    console.log(app.globalData.hasAppointment);
     this.getMyReportList()
     this.appointmentListFn()
   },

+ 3 - 1
pages/reportDetail/reportDetail.js

@@ -97,7 +97,9 @@ Page({
    */
   onLoad(options) {
     this.setData({
-      reportId: options.reportid
+      reportId: options.reportid,
+      leftNavActive: 0,
+      name: '评估说明'
     })
     this.getReportUserInfoFn(options.reportid)
   },

+ 1 - 1
pages/reportDetail/reportDetail.wxss

@@ -188,7 +188,7 @@
 .s-item-title {
   font-size: 26rpx;
   color: #333;
-  padding-top: 0 30rpx;
+  padding: 0 30rpx;
 }
 .s-item-value {
   font-size: 26rpx;

+ 1 - 1
pages/set/set.js

@@ -14,7 +14,7 @@ Page({
    */
   onLoad(options) {
     this.setData({
-      bindPhone: app.globalData.userInfo.phoneNumber
+      bindPhone: wx.getStorageSync('phoneNumber')
     })
   },