bayi %!s(int64=2) %!d(string=hai) anos
pai
achega
f5e98da01f

+ 1 - 1
app.js

@@ -21,7 +21,7 @@ App({
       store,
       actions: ['setUser']
     })
-    let shareUid = options.query.uid
+    let shareUid = options.query.uid || ''
     let uid = wx.getStorageSync('uid')
     if (uid) {
       let userInfo = await getMyInfo()

+ 16 - 0
components/navigationBar/index.js

@@ -34,8 +34,24 @@ Component({
     isGradeShow: false,
     temporaryGrade: null
   },
+  lifetimes: {
+    attached() {
+      if (!this.data.userInfo.grade) {
+        let timer = setInterval(() => {
+          if (this.data.userInfo.uid && !this.data.userInfo.grade) {
+            this.showGrade()
+            clearInterval(timer)
+          }
+        }, 500)
+      }
+
+    }
+  },
   methods: {
     closeGrade() {
+      if (!this.data.userInfo.grade) {
+        return
+      }
       this.setData({
         isGradeShow: false,
       })

+ 1 - 0
components/videoPreview/index.js

@@ -216,6 +216,7 @@ Component({
         })
       }
       let readId = videoInfo.userRead.id
+      console.log(this.properties.videoType);
       let url = this.properties.videoType == 'excellent' ? `/pages/pkPage/index?videoId=${readId}` : `/pages/reading/index?videoId=${videoInfo.userRead.exampleId}&readingType=${this.properties.videoType}`
       wx.navigateTo({
         url

+ 5 - 4
pages/collection/index.json

@@ -1,6 +1,7 @@
 {
-    "usingComponents": {
-      "worksList": "/components/worksList/index"
-    },
-    "navigationBarTitleText": "我的收藏"
+  "usingComponents": {
+    "worksList": "/components/worksList/index",
+    "emptyBg": "/components/empty/index"
+  },
+  "navigationBarTitleText": "我的收藏"
 }

+ 3 - 2
pages/collection/index.wxml

@@ -1,4 +1,5 @@
 <view class="collection">
-    <worksList id="worksList" videoType='collection' worksList="{{list}}" autoPlay="{{false}}" />
-    <canvas id='share' type="2d"> </canvas>
+  <worksList id="worksList" videoType='collection' worksList="{{list}}" autoPlay="{{false}}" />
+  <emptyBg wx:if="{{nullList}}" message="您没有收藏的作品"></emptyBg>
+  <canvas id='share' type="2d"> </canvas>
 </view>

+ 3 - 0
pages/index/index.js

@@ -67,6 +67,9 @@ Page({
     this.storeBindings.updateStoreBindings()
   },
   loadMore() {
+    if (!this.data.userInfo.grade) {
+      return
+    }
     if (this.data.currentType == '1') {
       this.getData(getHotrecommendList, {
         grade: this.data.userInfo.grade