Jelajahi Sumber

开发新官方推荐页面

bayi 2 tahun lalu
induk
melakukan
1a6073d0e7

+ 23 - 0
components/authority/index.js

@@ -0,0 +1,23 @@
+// components/authority/index.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
components/authority/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 3 - 0
components/authority/index.less

@@ -0,0 +1,3 @@
+.authority{
+  
+}

+ 3 - 0
components/authority/index.wxml

@@ -0,0 +1,3 @@
+<view class="authority">
+
+</view>

+ 0 - 0
components/authority/index.wxss


+ 1 - 1
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: '2',
+    currentType: '1',
     // 控制一级分类是否固定
     isFixed: false,
     desktopTips: app.globalData.desktopTips,

+ 2 - 1
pages/index/index.json

@@ -3,7 +3,8 @@
     "navigationBar": "/components/navigationBar/index",
     "banner": "/components/banner/index",
     "worksList": "/components/worksList/index",
-    "activityList": "/components/activityList/index"
+    "activityList": "/components/activityList/index",
+    "authority": "/components/authority/index"
   },
   "navigationStyle": "custom",
   "enablePullDownRefresh": false

+ 2 - 2
pages/index/index.wxml

@@ -22,7 +22,6 @@
       <view class="type {{currentType=='7'?'currentType':''}}" data-type='7'>排行榜</view>
       <view class="type {{currentType=='2'?'currentType':''}}" data-type='2'>作品展播</view>
       <view class="type {{currentType=='1'?'currentType':''}}" data-type='1'>官方推荐</view>
-
       <view class="search" bindtap="jumpSearch">
         <image src="/static/search.png" class="searchImg" />
       </view>
@@ -31,7 +30,8 @@
   <!-- 当一级分类固定定位时占位用的元素 -->
   <view class="{{isFixed?'brace':''}}" />
   <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList id="worksList" wx:if="{{currentType!='7'}}" worksList="{{list}}" videoType="public" tabBarPadding='true' />
+  <worksList id="worksList" wx:if="{{currentType=='2'}}" worksList="{{list}}" videoType="public" tabBarPadding='true' />
   <activityList classify='2' wx:if="{{currentType=='7'}}" />
+  <authority worksList="{{list}}" wx:if="{{currentType=='1'}}" />
 </view>
 <canvas id='share' type="2d"> </canvas>

+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
     envVersion
   }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
+/* if (envVersion == 'develop') {
   baseUrl = 'https://reader-api.efunbox.cn/wx'
   oldUrl = 'https://reader-api.efunbox.cn'
-} else {
+} else { */
 baseUrl = 'https://reader-api.ai160.com/wx'
 oldUrl = 'https://reader-api.ai160.com'
-}
+// }
 
 function request(url, method, data, oldBaseUrl = false) {
   let header = {