bayi il y a 1 an
Parent
commit
3278011182

+ 2 - 0
api/global.js

@@ -10,6 +10,8 @@ module.exports = {
     getBannerList: data => request('/v3/banner', 'get', data),
     // 获取官方活动
     getActivities: data => request('/v3/activity', 'get', data),
+    // 获取官方活动(新)
+    getActivitiesNew: data => request('/v3/activity/type', 'get', data),
     // 获取排行榜详情
     getRankingData: data => request(`/v3/activity/${data}`, 'get', data),
     // 获取朗读赛详情

+ 17 - 8
components/activityList/index.js

@@ -1,6 +1,7 @@
 const app = getApp()
 import {
-    getActivities
+    getActivities,
+    getActivitiesNew
 } from '~/api/global'
 import {
     storeBindingsBehavior
@@ -17,7 +18,7 @@ Component({
         },
     },
     properties: {
-        //1活动 2排行榜,3:由外部传参
+        //1活动 2排行榜,3:由外部传参,4:只拿邀新活动
         classify: {
             type: Number,
             value: 1
@@ -25,9 +26,9 @@ Component({
         dataList: {
             type: Array,
             value: [],
-            observer(value){
+            observer(value) {
                 this.setData({
-                    activityList:value
+                    activityList: value
                 })
             }
         }
@@ -60,13 +61,21 @@ Component({
             this.data.dsqList.forEach(item => {
                 clearInterval(item)
             })
+            let activityList = []
             if (this.properties.classify == '3') {
                 return
+            } else if (this.properties.classify == '4') {
+                activityList = await getActivitiesNew({
+                    type: 9,
+                    grade: this.data.userInfo.grade
+                })
+            } else {
+                activityList = await getActivities({
+                    classify: this.properties.classify,
+                    grade: this.data.userInfo.grade
+                })
             }
-            let activityList = await getActivities({
-                classify: this.properties.classify,
-                grade: this.data.userInfo.grade
-            })
+
             this.setData({
                 activityList,
             })

+ 1 - 1
pages/index/index.wxml

@@ -12,7 +12,7 @@
         <view class="selectType {{isFixed?'isFixed2':''}}" bindtap="selectType">
             <view class="type {{currentType=='2'?'currentType':''}}" data-type='2'>排行榜</view>
             <view class="type {{currentType=='3'?'currentType':''}}" data-type='3'>作品展播</view>
-            <view class="type {{currentType=='1'?'currentType':''}}" data-type='1'>官方活动</view>
+            <view class="type {{currentType=='4'?'currentType':''}}" data-type='4'>官方活动</view>
             <view class="search" bindtap="jumpSearch">
                 <image src="/static/search.png" class="searchImg" />
             </view>

+ 1 - 1
pages/my/index.less

@@ -295,7 +295,7 @@
         .qrCode{
             position: absolute;
             top: 59rpx;
-            right: 68rpx;
+            right: 40rpx;
             width: 174rpx;
             height: 174rpx;
         }

+ 1 - 1
pages/my/index.wxss

@@ -250,7 +250,7 @@
 .container .longpressBox .qrCode {
   position: absolute;
   top: 59rpx;
-  right: 68rpx;
+  right: 40rpx;
   width: 174rpx;
   height: 174rpx;
 }

+ 2 - 3
pages/resource/index.less

@@ -2,13 +2,12 @@
     padding-bottom: 120rpx;
 }
 .firstClassify {
-    padding: 24rpx 0rpx 20rpx;
-    width: 710rpx;
+    padding: 26rpx 0rpx 24rpx;
+    width: 100%;
     margin: 0 auto 30rpx;
     left: 0;
     right: 0;
     overflow: hidden;
-    border-radius: 10rpx;
     white-space: nowrap;
     background-color: white;
     .firstBox {

+ 2 - 3
pages/resource/index.wxss

@@ -2,13 +2,12 @@
   padding-bottom: 120rpx;
 }
 .firstClassify {
-  padding: 24rpx 0rpx 20rpx;
-  width: 710rpx;
+  padding: 26rpx 0rpx 24rpx;
+  width: 100%;
   margin: 0 auto 30rpx;
   left: 0;
   right: 0;
   overflow: hidden;
-  border-radius: 10rpx;
   white-space: nowrap;
   background-color: white;
 }

BIN
static/activity.png


BIN
static/activity2.png


+ 1 - 1
小咖秀公众号支付/index.html

@@ -260,7 +260,7 @@
         },
         getWxCode() {
           const appId = 'wxf05800eea975a68b'
-          const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios/index.html?uid=' + this.uid)
+          const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=' + this.uid)
           // const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=d83d947655f6455a96f4197d31afa6d4')
           const url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_base#wechat_redirect'
           location.href = url