bayi пре 2 година
родитељ
комит
2a8a00a839
6 измењених фајлова са 10 додато и 14 уклоњено
  1. 2 2
      api/user.js
  2. 0 2
      components/voucher/index.js
  3. 3 2
      pages/follow/index.js
  4. 3 3
      pages/follow/index.wxml
  5. 1 4
      pages/index/index.js
  6. 1 1
      pages/ranking/index.wxml

+ 2 - 2
api/user.js

@@ -21,8 +21,8 @@ module.exports = {
   getSelfRead: data => request('/userRead/my', 'get', data),
   //获取其他用户朗读的作品
   getUserRead: data => request('/userRead', 'get', data),
-  // 获取用户关注列表
-  getFansList: data => request('/fans', 'get', data),
+  // 获取用户关注列表 type:1我的关注;2我的粉丝 ;3相互关注
+  getFansList: data => request('/fans/myFriend', 'get', data),
   // 加关注请求类型为post,取消关注为put
   setFans: (data, method = 'post') => request('/fans', method, data),
   // 获取收藏列表

+ 0 - 2
components/voucher/index.js

@@ -67,8 +67,6 @@ Component({
       let productNum = products.find(item => {
         return item.type == 2
       })
-      console.log(productVip,
-        productNum);
       this.setData({
         productVip,
         productNum

+ 3 - 2
pages/follow/index.js

@@ -8,6 +8,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+    // 1我的关注;2我的粉丝 ;3相互关注
     currentType: 1
   },
 
@@ -20,7 +21,6 @@ Page({
   setType({
     currentTarget
   }) {
-    console.log(currentTarget.dataset.type);
     this.setData({
       currentType: currentTarget.dataset.type
     })
@@ -30,7 +30,8 @@ Page({
   loadMore() {
     let type = this.data.currentType
     this.getData(getFansList, {
-      pageSize: 20
+      pageSize: 20,
+      type
     })
   },
   jumpUserInfo({

+ 3 - 3
pages/follow/index.wxml

@@ -1,8 +1,8 @@
 <view class="followBox">
   <view class="screening">
-    <view class="type {{currentType==1?'currentType':''}}" data-type="1" bindtap="setType">相互关注</view>
-    <view class="type {{currentType==2?'currentType':''}}" data-type="2" bindtap="setType">我的关注</view>
-    <view class="type {{currentType==3?'currentType':''}}" data-type="3" bindtap="setType">我的粉丝</view>
+    <view class="type {{currentType==3?'currentType':''}}" data-type="3" bindtap="setType">相互关注</view>
+    <view class="type {{currentType==1?'currentType':''}}" data-type="1" bindtap="setType">我的关注</view>
+    <view class="type {{currentType==2?'currentType':''}}" data-type="2" bindtap="setType">我的粉丝</view>
   </view>
   <view class="follow" wx:for="{{ list }}" wx:key="*this">
     <view class="userInfo">

+ 1 - 4
pages/index/index.js

@@ -17,7 +17,7 @@ Page({
   data: {
     navBarHeight: app.globalData.navBarHeight,
     background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
-    currentType: '3',
+    currentType: '1',
     // 控制一级分类是否固定
     isFixed: false,
     desktopTips: app.globalData.desktopTips,
@@ -112,9 +112,6 @@ Page({
       })
     }
   },
-  onReachBottom() {
-    console.log('zzz');
-  },
   async getCategoryList() {
     let grade = this.data.userInfo.grade
     let categoryList = await getCategoryList({

+ 1 - 1
pages/ranking/index.wxml

@@ -1,7 +1,7 @@
 <view class="rankingBox">
   <view class="podiumBox {{podiumBoxBg}}">
     <view class="dateBox">
-      <text class="dataTitle" style="color:{{color}}">第期</text>
+      <text class="dataTitle" style="color:{{color}}">第{{currentWeek}}期</text>
       <text class="interval">{{weekBegin+'-'+weekEnd}}</text>
     </view>
     <view class="podiumContent">