ソースを参照

改版开发5.0

bayi 2 年 前
コミット
edd8c2b6eb

+ 4 - 0
app.json

@@ -1,6 +1,7 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/activity/index",
     "pages/match/index",
     "pages/pkResult/index",
     "pages/medalStore/index",
@@ -24,6 +25,9 @@
       "pagePath": "pages/index/index",
       "text": "推荐"
     }, {
+      "pagePath": "pages/activity/index",
+      "text": "活动"
+    }, {
       "pagePath": "pages/works/index",
       "text": "作品"
     }, {

+ 5 - 0
custom-tab-bar/index.js

@@ -20,6 +20,11 @@ Component({
       "iconPath": "/static/tj.png",
       "selectedIconPath": "/static/tj2.png"
     }, {
+      "pagePath": "/pages/activity/index",
+      "text": "活动",
+      "iconPath": "/static/activity.png",
+      "selectedIconPath": "/static/activity2.png"
+    }, {
       "pagePath": "/pages/works/index",
       "text": "作品",
       "iconPath": "/static/zp.png",

+ 52 - 0
pages/activity/index.js

@@ -0,0 +1,52 @@
+// pages/activity/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  onShow() {
+    if (typeof this.getTabBar === 'function') {
+      this.getTabBar().setData({
+        selected: 1
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 9 - 0
pages/activity/index.json

@@ -0,0 +1,9 @@
+{
+  "usingComponents": {
+    "navigationBar": "/components/navigationBar/index",
+    "banner": "/components/banner/index",
+    "activityList": "/components/activityList/index"
+  },
+  "navigationStyle": "custom",
+  "enablePullDownRefresh": false
+}

+ 1 - 0
pages/activity/index.less

@@ -0,0 +1 @@
+/* pages/activity/index.wxss */

+ 6 - 0
pages/activity/index.wxml

@@ -0,0 +1,6 @@
+<navigationBar bind:reload='resetData'></navigationBar>
+<view class="activityBox">
+  <banner classify='3' />
+  <activityList />
+
+</view>

+ 1 - 0
pages/activity/index.wxss

@@ -0,0 +1 @@
+/* pages/activity/index.wxss */

+ 3 - 3
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: '2',
     // 控制一级分类是否固定
     isFixed: false,
     desktopTips: app.globalData.desktopTips,
@@ -128,13 +128,13 @@ Page({
     target
   }) {
     if (target.dataset.type) {
-      if (target.dataset.type == '3') {
+      if (target.dataset.type == '7') {
         this.selectComponent('#worksList').resetAudio()
       }
       this.setData({
         currentType: target.dataset.type
       })
-      if (target.dataset.type != '3') {
+      if (target.dataset.type != '7') {
         this.resetData()
       }
     }

+ 4 - 4
pages/index/index.wxml

@@ -19,9 +19,10 @@
     </scroll-view>
     <!-- 展示类型选择 -->
     <view class="selectType {{isFixed?'isFixed2':''}}" bindtap="selectType">
+      <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="type {{currentType=='3'?'currentType':''}}" data-type='3'>官方活动</view>
+
       <view class="search" bindtap="jumpSearch">
         <image src="/static/search.png" class="searchImg" />
       </view>
@@ -30,8 +31,7 @@
   <!-- 当一级分类固定定位时占位用的元素 -->
   <view class="{{isFixed?'brace':''}}" />
   <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList id="worksList" wx:if="{{currentType!='3'}}" worksList="{{list}}"
-    videoType="public" tabBarPadding='true' />
-  <activityList wx:if="{{currentType=='3'}}" />
+  <worksList id="worksList" wx:if="{{currentType!='7'}}" worksList="{{list}}" videoType="public" tabBarPadding='true' />
+  <activityList classify='2' wx:if="{{currentType=='7'}}" />
 </view>
 <canvas id='share' type="2d"> </canvas>

+ 1 - 1
pages/my/index.js

@@ -25,7 +25,7 @@ Page({
   async onShow() {
     if (typeof this.getTabBar === 'function') {
       this.getTabBar().setData({
-        selected: 2
+        selected: 3
       })
     }
     let uid = wx.getStorageSync('uid') || ''

+ 2 - 2
pages/works/index.js

@@ -16,14 +16,14 @@ Page({
   data: {
     navBarHeight: app.globalData.navBarHeight,
     bannerList: [],
-    // 4关注作品,5我的作品
+    // 4关注作品,5我的作品,6收藏作品
     currentType: '4',
     isFixed: false
   },
   onShow() {
     if (typeof this.getTabBar === 'function') {
       this.getTabBar().setData({
-        selected: 1
+        selected: 2
       })
     }
     let uid = wx.getStorageSync('uid')

+ 1 - 2
pages/works/index.json

@@ -3,8 +3,7 @@
     "navigationBar": "/components/navigationBar/index",
     "worksList": "/components/worksList/index",
     "banner": "/components/banner/index",
-    "emptyBg": "/components/empty/index",
-    "activityList": "/components/activityList/index"
+    "emptyBg": "/components/empty/index"
   },
   "navigationStyle": "custom"
 }

+ 4 - 4
pages/works/index.less

@@ -3,18 +3,18 @@
     padding: 30rpx 15rpx 30rpx 26rpx;
     display: flex;
     align-items: center;
-    justify-content: space-around;
+    justify-content: space-between;
     z-index: 20;
 
     .type {
-      padding: 10rpx 0rpx;
-      width: 167rpx;
+      padding: 14rpx 0rpx;
+      width: 200rpx;
       box-sizing: border-box;
       text-align: center;
       border: 1rpx solid #9f9f9fa4;
       border-radius: 50rpx;
       color: #1A1A1A;
-      font-size: 25rpx;
+      font-size: 28rpx;
     }
 
     .currentType {

+ 1 - 2
pages/works/index.wxml

@@ -4,7 +4,7 @@
   <banner classify='{{currentType}}' />
   <!-- 切换类型 -->
   <view class="selectType {{isFixed?'isFixed isFixed2':''}}" style="top:{{navBarHeight}}px;" bindtap="changeType">
-    <view class="type {{currentType=='7'?'currentType':''}}" data-type='7'>排行榜</view>
+
     <view class="type {{currentType=='4'?'currentType':''}}" data-type='4'>关注作品</view>
     <view class="type {{currentType=='5'?'currentType':''}}" data-type='5'>我的作品</view>
     <view class="type {{currentType=='6'?'currentType':''}}" data-type='6'>收藏作品</view>
@@ -13,7 +13,6 @@
   <worksList wx:if="{{currentType!='7'}}" id="worksList"
     videoType="{{currentType=='4'||currentType=='6'?'follow':'my'}}" worksList="{{list}}" tabBarPadding='true'
     autoPlay='{{false}}' />
-  <activityList classify='2' wx:if="{{currentType=='7'}}" />
   <emptyBg wx:if="{{nullList}}"
     message="{{currentType=='4'?'您还没有关注的用户哦':currentType=='5'?'您还没有作品哦,赶快去发表吧':'您还没有收藏作品哦'}}"></emptyBg>
 </view>

+ 4 - 4
pages/works/index.wxss

@@ -2,18 +2,18 @@
   padding: 30rpx 15rpx 30rpx 26rpx;
   display: flex;
   align-items: center;
-  justify-content: space-around;
+  justify-content: space-between;
   z-index: 20;
 }
 .worksBox .selectType .type {
-  padding: 10rpx 0rpx;
-  width: 167rpx;
+  padding: 14rpx 0rpx;
+  width: 200rpx;
   box-sizing: border-box;
   text-align: center;
   border: 1rpx solid #9f9f9fa4;
   border-radius: 50rpx;
   color: #1A1A1A;
-  font-size: 25rpx;
+  font-size: 28rpx;
 }
 .worksBox .selectType .currentType {
   box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;

BIN
static/activity.png


BIN
static/activity2.png