bayi 1 年之前
父节点
当前提交
9d72d47603
共有 3 个文件被更改,包括 78 次插入78 次删除
  1. 76 76
      pages/ranking/index.js
  2. 1 1
      pages/reading/index.js
  3. 1 1
      pages/reading/index.wxml

+ 76 - 76
pages/ranking/index.js

@@ -1,83 +1,83 @@
 import {
-  getRankingData
+    getRankingData
 } from '~/api/global'
 Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    ranking: '',
-    userList: [],
-    currentWeek: 0,
-    weekBegin: '',
-    weekEnd: '',
-    //2:邀新榜,3:热播榜,4:挑战pk榜
-    rankingType: '',
-    icon: '',
-    podiumBoxBg: '',
-    color:'',
-    explain: ''
-  },
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        ranking: '',
+        userList: [],
+        currentWeek: 0,
+        weekBegin: '',
+        weekEnd: '',
+        //2:邀新榜,3:热播榜,4:挑战pk榜
+        rankingType: '',
+        icon: '',
+        podiumBoxBg: '',
+        color: '',
+        explain: ''
+    },
 
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    this.setData({
-      rankingType: options.type,
-      icon: options.type == '2' ? '/static/yx.png' : options.type == '3' ? '/static/play.png' : '/static/win.png',
-      podiumBoxBg: options.type == '2' ? 'invitation' : options.type == '3' ? 'hot' : 'pk',
-      color: options.type == '2' ? '#2DCE66' : options.type == '3' ? '#FF7E6C' : '#967DFF',
-    })
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        this.setData({
+            rankingType: options.type,
+            icon: options.type == '2' ? '/static/yx.png' : options.type == '3' ? '/static/play.png' : '/static/win.png',
+            podiumBoxBg: options.type == '2' ? 'invitation' : options.type == '3' ? 'hot' : 'pk',
+            color: options.type == '2' ? '#2DCE66' : options.type == '3' ? '#FF7E6C' : '#967DFF',
+        })
 
-    wx.setNavigationBarColor({
-      frontColor: '#ffffff',
-      backgroundColor: options.type == '2' ? '#2DCE66' : options.type == '3' ? '#FF7E6C' : '#967DFF',
-    })
-    this.getRankingData(options.id)
-  },
-  async getRankingData(id) {
-    let {
-      ranking,
-      userList,
-      currentWeek,
-      weekBegin,
-      weekEnd,
-      title,
-      explain
-    } = await getRankingData(id)
-    wx.setNavigationBarTitle({
-      title
-    })
-    this.setData({
-      ranking,
-      userList,
-      currentWeek,
-      weekBegin,
-      weekEnd,
-      explain
-    })
-  },
-  jumpIndex() {
-    wx.switchTab({
-      url: '/pages/index/index',
-    })
-  },
-  jumpUserInfo({
-    currentTarget
-  }) {
-    if (!currentTarget.dataset.uid) {
-      return
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: options.type == '2' ? '#2DCE66' : options.type == '3' ? '#FF7E6C' : '#967DFF',
+        })
+        this.getRankingData(options.id)
+    },
+    async getRankingData(id) {
+        let {
+            ranking,
+            userList,
+            currentWeek,
+            weekBegin,
+            weekEnd,
+            title,
+            explain
+        } = await getRankingData(id)
+        wx.setNavigationBarTitle({
+            title
+        })
+        this.setData({
+            ranking,
+            userList,
+            currentWeek,
+            weekBegin,
+            weekEnd,
+            explain
+        })
+    },
+    jumpIndex() {
+        wx.switchTab({
+            url: '/pages/index/index',
+        })
+    },
+    jumpUserInfo({
+        currentTarget
+    }) {
+        if (!currentTarget.dataset.uid) {
+            return
+        }
+        wx.navigateTo({
+            url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=${this.data.rankingType==4?'pk':'user'}`,
+        })
+    },
+    onShareAppMessage() {
+        return {
+            title: this.data.rankingType == 3 ? '我要上热门,就差你的一个赞,快来帮帮我吧!' : '这个小程序太赞了!孩子朗读能力蹭蹭上涨,推荐你试试!',
+            path: `/pages/index/index?uid=${wx.getStorageSync('uid')}`,
+            imageUrl: this.data.rankingType == 3 ? 'http://reader-wx.ai160.com/images/reader/v3/375-300-3.jpg' : 'http://reader-wx.ai160.com/images/reader/v3/375-300-2.jpg'
+        }
     }
-    wx.navigateTo({
-      url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=${this.data.rankingType==4?'pk':'user'}`,
-    })
-  },
-  onShareAppMessage() {
-    return {
-      title: this.data.rankingType == 3 ? '我要上热门,就差你的一个赞,快来帮帮我吧!' : '这个小程序太赞了!孩子朗读能力蹭蹭上涨,推荐你试试!',
-      path: `/pages/index/index?uid=${wx.getStorageSync('uid')}`,
-      imageUrl: this.data.rankingType == 3 ? 'http://reader-wx.ai160.com/images/reader/v3/375-300-3.jpg' : 'http://reader-wx.ai160.com/images/reader/v3/375-300-2.jpg'
-    }
-  }
 })

+ 1 - 1
pages/reading/index.js

@@ -916,7 +916,7 @@ Page({
                                                     success(res) {
                                                         resolve({
                                                             title: video.user.profession == '官方' ? '我正在听这篇朗读示范,这发音,播音专业水准!你也来听听!' : '我的新作品发布啦,快来捧场点赞!',
-                                                            path: video.user.profession == '官方' ? `/pages/reading/index?uid=${wx.getStorageSync('uid')}` : `/pages/pkPage/index?videoId=${wx.getStorageSync('shareVideoId')}&uid=${wx.getStorageSync('uid')}&isShare=true`,
+                                                            path: video.user.profession == '官方' ? `/pages/reading/index?uid=${wx.getStorageSync('uid')}&videoId=${video.userRead.id}` : `/pages/pkPage/index?videoId=${wx.getStorageSync('shareVideoId')}&uid=${wx.getStorageSync('uid')}&isShare=true`,
                                                             imageUrl: res.tempFilePath
                                                         })
                                                     },

+ 1 - 1
pages/reading/index.wxml

@@ -37,7 +37,7 @@
             <view class="time">{{silderData.endTime}}</view>
         </view>
     </view>
-    <view class="workFooter" wx:if="{{readingType=='public'&&!readingReset}}">
+    <view class="workFooter" wx:if="{{readingType=='public'&&!readingReset&&!state}}">
         <button class="resetBtn mangeL-box" open-type="share" data-info='{{videoInfo}}'>
             <image src="/static/share.png" mode="" class="icon" />
             <view class="icon-name">分享</view>