فهرست منبع

创建活动列表

bayi 2 سال پیش
والد
کامیت
4d15d21afd

+ 23 - 0
components/activityList/index.js

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

+ 4 - 0
components/activityList/index.json

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

+ 1 - 0
components/activityList/index.less

@@ -0,0 +1 @@
+/* components/activityList/index.wxss */

+ 2 - 0
components/activityList/index.wxml

@@ -0,0 +1,2 @@
+<!--components/activityList/index.wxml-->
+<text>components/activityList/index.wxml</text>

+ 1 - 0
components/activityList/index.wxss

@@ -0,0 +1 @@
+/* components/activityList/index.wxss */

+ 4 - 2
pages/index/index.js

@@ -120,8 +120,10 @@ Page({
       this.setData({
         currentType: target.dataset.type
       })
-      this.resetData()
-      this.selectComponent('#worksList').resetAudio()
+      if (target.dataset.type != '3') {
+        this.resetData()
+        this.selectComponent('#worksList').resetAudio()
+      }
     }
   },
 })

+ 2 - 1
pages/index/index.json

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

+ 2 - 1
pages/index/index.wxml

@@ -23,6 +23,7 @@
   <!-- 当一级分类固定定位时占位用的元素 -->
   <view class="{{isFixed?'brace':''}}" />
   <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList id="worksList" worksList="{{list}}" videoType="{{currentType=='1'?'excellent':'public'}}" />
+  <worksList id="worksList" wx:if="{{currentType!='3'}}" worksList="{{list}}"
+    videoType="{{currentType=='1'?'excellent':'public'}}" />
 </view>
 <canvas id='share' type="2d"> </canvas>