bayi пре 1 година
родитељ
комит
1426f42c4b

+ 29 - 29
api/works.js

@@ -1,35 +1,35 @@
 import {
-  request
+    request
 } from "../utils/request";
 module.exports = {
-  // 获取作品类目
-  getCategoryList: data => request('/v3/column', 'get', data),
-  // 获取作品二级类目内容
-  getCategoryWorks: data => request('/v3/column/opus', 'get', data),
-  // 作品查询
-  searchWorks: data => request('/v3/recommend/query', 'get', data),
-  // 获取优秀作品展播列表
-  getHotrecommendList: data => request('/userRead/recommend', 'get', data),
-  // 获取官方推荐作品列表
-  getAuthorityList: data => request('/v3/recommend', 'get', data),
-  // 发布作品
-  publishWorks: data => request('/userRead', 'post', data),
-  // 上传挑战结果
-  uploadPk: data => request('/v3/pk', 'post', data),
-  // 获取挑战结果
-  getPkResult: data => request(`/v3/pk/info/${data}`, 'get'),
-  // 获取作品的挑战记录
-  getPkRecord: data => request('/v3/pk', 'get', data),
-  // 获取关注的人的作品
-  getFollowWorks: data => request('/fans/interest', 'get', data),
-  // 发布朗读赛作品
-  publishRankWorks: data => request('/activityRead', 'post', data),
-  // 上传作品评分
-  postWorksScore: data => request('/assessment', 'post', data),
-  //查询某作品的所有用户作品
-  getUserReadByExampleId: data => request('/userRead/userReadByExampleId', 'get', data),
-  // 分享时调用,判断分享作品是不是活动作品
-  isActivityWork: data => request(`/activityJoinRead/isActivityRead/${data}`, 'get'),
+    // 获取作品类目
+    getCategoryList: data => request('/v3/column', 'get', data),
+    // 获取作品二级类目内容
+    getCategoryWorks: data => request('/v3/column/opus', 'get', data),
+    // 作品查询
+    searchWorks: data => request('/v3/recommend/query', 'get', data),
+    // 获取优秀作品展播列表
+    getHotrecommendList: data => request('/userRead/recommend', 'get', data),
+    //   获取资源页面接口
+    getResourceList: data => request('/v3/resource', 'get', data),
+    // 发布作品
+    publishWorks: data => request('/userRead', 'post', data),
+    // 上传挑战结果
+    uploadPk: data => request('/v3/pk', 'post', data),
+    // 获取挑战结果
+    getPkResult: data => request(`/v3/pk/info/${data}`, 'get'),
+    // 获取作品的挑战记录
+    getPkRecord: data => request('/v3/pk', 'get', data),
+    // 获取关注的人的作品
+    getFollowWorks: data => request('/fans/interest', 'get', data),
+    // 发布朗读赛作品
+    publishRankWorks: data => request('/activityRead', 'post', data),
+    // 上传作品评分
+    postWorksScore: data => request('/assessment', 'post', data),
+    //查询某作品的所有用户作品
+    getUserReadByExampleId: data => request('/userRead/userReadByExampleId', 'get', data),
+    // 分享时调用,判断分享作品是不是活动作品
+    isActivityWork: data => request(`/activityJoinRead/isActivityRead/${data}`, 'get'),
 }
 
 /* 

+ 13 - 0
components/activityList/index.js

@@ -17,9 +17,19 @@ Component({
         },
     },
     properties: {
+        //1活动 2排行榜,3:由外部传参
         classify: {
             type: Number,
             value: 1
+        },
+        dataList: {
+            type: Array,
+            value: [],
+            observer(value){
+                this.setData({
+                    activityList:value
+                })
+            }
         }
     },
     /**
@@ -50,6 +60,9 @@ Component({
             this.data.dsqList.forEach(item => {
                 clearInterval(item)
             })
+            if (this.properties.classify == '3') {
+                return
+            }
             let activityList = await getActivities({
                 classify: this.properties.classify,
                 grade: this.data.userInfo.grade

+ 0 - 1
components/activityList/index.less

@@ -1,6 +1,5 @@
 .activityList {
   padding: 0rpx 14rpx;
-  padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
   box-sizing: border-box;
 
   .ranking-class-1 {

+ 0 - 1
components/activityList/index.wxss

@@ -1,6 +1,5 @@
 .activityList {
   padding: 0rpx 14rpx;
-  padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
   box-sizing: border-box;
 }
 .activityList .ranking-class-1 {

+ 0 - 1
components/authority/index.less

@@ -1,7 +1,6 @@
 .authority {
   height: 100%;
   padding: 0rpx 20rpx;
-  padding-bottom: 100px;
 
   .module {
     margin-bottom: 30rpx;

+ 0 - 1
components/authority/index.wxss

@@ -1,7 +1,6 @@
 .authority {
   height: 100%;
   padding: 0rpx 20rpx;
-  padding-bottom: 100px;
 }
 .authority .module {
   margin-bottom: 30rpx;

+ 0 - 2
components/worksList/index.less

@@ -1,6 +1,4 @@
 .worksList {
-  padding-bottom: 100px;
-
   .playLine {
     position: fixed;
     top: 60%;

+ 0 - 3
components/worksList/index.wxss

@@ -1,6 +1,3 @@
-.worksList {
-  padding-bottom: 100px;
-}
 .worksList .playLine {
   position: fixed;
   top: 60%;

+ 1 - 0
pages/index/index.less

@@ -1,5 +1,6 @@
 .recommend {
   position: relative;
+  padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
 
   .desktopTips {
     position: fixed;

+ 1 - 0
pages/index/index.wxss

@@ -1,5 +1,6 @@
 .recommend {
   position: relative;
+  padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
 }
 .recommend .desktopTips {
   position: fixed;

+ 5 - 3
pages/resource/index.js

@@ -3,7 +3,7 @@ import {
 } from 'mobx-miniprogram-bindings'
 import {
     getCategoryList,
-    getAuthorityList,
+    getResourceList
 } from "~/api/works"
 import share from '~/mixins/share'
 import reachBottom from '~/mixins/reachBottom'
@@ -14,6 +14,7 @@ Page({
     behaviors: [reachBottom, share],
     data: {
         categoryList: [],
+        listOptions: {},
         isFixed: false
     },
     onShow() {
@@ -40,12 +41,13 @@ Page({
         if (!this.data.userInfo.grade) {
             return
         }
-        let list = await getAuthorityList({
+        let data = await getResourceList({
             grade: this.data.userInfo.grade
         })
         this.setData({
-            list
+            listOptions: data,
         })
+        console.log(data, );
     },
     async getCategoryList() {
         let grade = this.data.userInfo.grade

+ 1 - 0
pages/resource/index.json

@@ -1,5 +1,6 @@
 {
     "usingComponents": {
+        "activityList": "/components/activityList/index",
         "authority": "/components/authority/index",
         "navigationBar": "/components/navigationBar/index"
     },

+ 3 - 0
pages/resource/index.less

@@ -1,3 +1,6 @@
+.resourceBox{
+    padding-bottom: 120rpx;
+}
 .firstClassify {
     padding: 24rpx 0rpx 20rpx;
     width: 710rpx;

+ 4 - 2
pages/resource/index.wxml

@@ -1,5 +1,5 @@
 <navigationBar bind:reload='resetData'></navigationBar>
-<view>
+<view class="resourceBox">
     <scroll-view class="firstClassify {{isFixed?'isFixed isFixed2':''}}" scroll-x="true" enhanced
         show-scrollbar="{{false}}">
         <view class="firstBox" wx:for="{{categoryList}}" wx:key="id" data-item='{{item}}' bindtap="jumpChildClassify">
@@ -7,5 +7,7 @@
             <view class="name">{{item.title}}</view>
         </view>
     </scroll-view>
-    <authority worksList="{{list}}" />
+    <authority wx:if="{{listOptions.sortList[0]=='recommendReadList'}}" worksList="{{listOptions.recommendReadList}}" />
+    <activityList classify='3' dataList='{{listOptions.activityList}}'/>
+    <authority wx:if="{{listOptions.sortList[1]=='recommendReadList'}}" worksList="{{listOptions.recommendReadList}}" />
 </view>

+ 3 - 0
pages/resource/index.wxss

@@ -1,3 +1,6 @@
+.resourceBox {
+  padding-bottom: 120rpx;
+}
 .firstClassify {
   padding: 24rpx 0rpx 20rpx;
   width: 710rpx;

+ 7 - 7
utils/request.js

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

BIN
小咖秀公众号支付/img/15.png


BIN
小咖秀公众号支付/img/299.png


BIN
小咖秀公众号支付/img/99.png


BIN
小咖秀公众号支付/img/active.png


BIN
小咖秀公众号支付/img/bg.jpg


+ 94 - 0
小咖秀公众号支付/xkxBuy.html

@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>朗读小咖秀</title>
+  </head>
+  <style>
+    * {
+      margin: 0;
+      padding: 0;
+    }
+    #container {
+      overflow: hidden;
+      width: 100%;
+      height: 938px;
+      background: url('./img/bg.jpg') no-repeat;
+      background-size: 100% 100%;
+    }
+    .commoditys {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin: 30px auto;
+      width: 9.0133rem;
+      height: 3.4667rem;
+      padding: 14px 10px;
+      box-sizing: border-box;
+      background: white;
+      border-radius: 20px;
+    }
+    .commodity {
+      position: relative;
+      width: 97px;
+      height: 97px;
+      border-radius: 6px;
+      border: 2px solid white;
+    }
+    .active {
+      position: absolute;
+      width: 27px;
+      height: 18px;
+      right: 0;
+      bottom: 0;
+    }
+    .aborder {
+      border-color: #ff935e;
+    }
+    .c-1 {
+      background: url('./img/299.png');
+      background-size: contain;
+    }
+    .c-2 {
+      background: url('./img/99.png');
+      background-size: contain;
+    }
+    .c-3 {
+      background: url('./img/15.png');
+      background-size: contain;
+    }
+  </style>
+  <body>
+    <div id="container">
+      <div class="commoditys">
+        <div :class="['commodity c-1', active==1?'aborder':'']" @click="selected(1)">
+          <img src="./img/active.png" class="active" v-show="active==1" />
+        </div>
+        <div :class="['commodity c-2', active==2?'aborder':'']" @click="selected(2)">
+          <img src="./img/active.png" class="active" v-show="active==2" />
+        </div>
+        <div :class="['commodity c-3', active==3?'aborder':'']" @click="selected(3)">
+          <img src="./img/active.png" class="active" v-show="active==3" />
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
+  <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.2/??flexible_css.js,flexible.js"></script>
+  <script>
+    let app = new Vue({
+      el: '#container',
+      data: {
+        active: 1
+      },
+      mounted() {
+      },
+      methods: {
+        selected(e) {
+          this.active = e
+        }
+      }
+    })
+  </script>
+</html>