Browse Source

调整整体样式

bayi 2 years ago
parent
commit
b9bc9e9968

+ 2 - 0
api/works.js

@@ -8,6 +8,8 @@ module.exports = {
   getCategoryWorks: data => request('/v3/column/opus', 'get', data),
   // 获取优秀作品展播列表
   getHotrecommendList: data => request('/userRead/recommend', 'get', data),
+  // 获取官方推荐作品列表
+  getAuthorityList: data => request('/v3/recommend', 'get', data),
   // 发布作品
   publishWorks: data => request('/userRead', 'post', data),
   // 获取关注的人的作品

+ 5 - 1
components/videoPreview/index.wxml

@@ -88,8 +88,12 @@
       <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.likeAmount)}}</view>
     </view>
   </view>
-  <view class="toReading" bindtap="toPkPage" wx:if="{{videoType!='my'}}">
+  <view class="toReading" bindtap="toPkPage" wx:if="{{videoType=='pk'}}">
     <image src="/static/reading.png" class="reading" mode="" />
     <view class="reading-text">挑战PK</view>
   </view>
+  <view class="toReading" bindtap="toPkPage" wx:if="{{videoType=='public'}}">
+    <image src="/static/reading.png" class="reading" mode="" />
+    <view class="reading-text">去朗读</view>
+  </view>
 </view>

+ 3 - 2
pages/index/index.js

@@ -1,6 +1,7 @@
 const app = getApp()
 import {
   getHotrecommendList,
+  getAuthorityList,
   getCategoryList
 } from "~/api/works"
 import reachBottom from '~/mixins/reachBottom'
@@ -67,8 +68,8 @@ Page({
         grade: this.data.userInfo.grade
       })
     } else if (this.data.currentType == '2') {
-      this.getData(getHotrecommendList, {
-        grade: 'PRESCHOOL'
+      this.getData(getAuthorityList, {
+        grade: this.data.userInfo.grade
       })
     }
   },

+ 1 - 1
pages/index/index.wxml

@@ -24,5 +24,5 @@
   <!-- 当一级分类固定定位时占位用的元素 -->
   <view class="{{isFixed?'brace':''}}" />
   <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList id="worksList" worksList="{{list}}" />
+  <worksList id="worksList" worksList="{{list}}" videoType="{{currentType=='1'?'pk':'public'}}" />
 </view>

+ 1 - 1
pages/my/index.less

@@ -1,5 +1,5 @@
 .container {
-  padding: 30rpx 20rpx;
+  padding: 0rpx 20rpx 30rpx;
 
   .userBox {
     display: flex;

+ 1 - 1
pages/my/index.wxss

@@ -1,5 +1,5 @@
 .container {
-  padding: 30rpx 20rpx;
+  padding: 0rpx 20rpx 30rpx;
 }
 .container .userBox {
   display: flex;

+ 1 - 1
pages/works/index.wxml

@@ -8,5 +8,5 @@
     <view class="type {{currentType=='2'?'currentType':''}}" data-type='2'>我的作品</view>
   </view>
   <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList id="worksList" videoType="{{currentType=='1'?'public':'my'}}" worksList="{{list}}" />
+  <worksList id="worksList" videoType="{{currentType=='1'?'pk':'my'}}" worksList="{{list}}" />
 </view>