Browse Source

开发联调

bayi 9 months ago
parent
commit
485c40f52e

+ 15 - 11
app.js

@@ -34,14 +34,18 @@ App({
         let uid = wx.getStorageSync('uid')
         let uid = wx.getStorageSync('uid')
         if (uid) {
         if (uid) {
             let userInfo = await getMyInfo()
             let userInfo = await getMyInfo()
-            console.log(userInfo,'zzz');
+            console.log(userInfo, 'zzz');
             this.setUser(userInfo.user)
             this.setUser(userInfo.user)
             this.globalData.userInfo = userInfo.user
             this.globalData.userInfo = userInfo.user
             if (getApp().callBack) {
             if (getApp().callBack) {
                 getApp().callBack(userInfo.users);
                 getApp().callBack(userInfo.users);
             }
             }
         } else {
         } else {
-            let userRes = await androidLogin({extOpenId:'1234567',channel:'3016',grade:'PRIMARY_FIRST_GRADE'})
+            let userRes = await androidLogin({
+                extOpenId: '77777777',
+                channel: '3016',
+                grade: 'PRIMARY_FIRST_GRADE'
+            })
             this.setUser(userRes.user)
             this.setUser(userRes.user)
             wx.setStorageSync('uid', userRes.user.uid)
             wx.setStorageSync('uid', userRes.user.uid)
             wx.setStorageSync('user', userRes.user)
             wx.setStorageSync('user', userRes.user)
@@ -68,19 +72,19 @@ App({
     initPlugin() {
     initPlugin() {
         let miniAppPluginId = 'wxf1a06dafa3350688'
         let miniAppPluginId = 'wxf1a06dafa3350688'
         //根据模块ID初始化模块
         //根据模块ID初始化模块
-        console.log("插件ID:" + miniAppPluginId)
         wx.miniapp.loadNativePlugin({
         wx.miniapp.loadNativePlugin({
             pluginId: miniAppPluginId,
             pluginId: miniAppPluginId,
+            channelCode: '3016',
             success: (plugin) => {
             success: (plugin) => {
                 this.globalData.plugin = plugin
                 this.globalData.plugin = plugin
-                console.log('load plugin success', plugin)
-                this.globalData.plugin.initPlugin(({}), (res) => {
-                    if (res === "success") {
-                        console.log("初始化plugin成功")
-                    } else {
-                        console.log("初始化plugin失败")
-                    }
-                })
+                console.log('前端', plugin)
+                 this.globalData.plugin.initPlugin(({}), (res) => {
+                     if (res === "success") {
+                         console.log("初始化plugin成功")
+                     } else {
+                         console.log("初始化plugin失败")
+                     }
+                 })
             },
             },
             fail: (e) => {
             fail: (e) => {
                 console.log('load plugin fail', e)
                 console.log('load plugin fail', e)

+ 1 - 0
components/uploadFile/index.js

@@ -92,6 +92,7 @@ Component({
             this.setData({
             this.setData({
                 uploadSuccess: false
                 uploadSuccess: false
             })
             })
+            this.jumpWork()
         },
         },
         async uploadWorks(audio) {
         async uploadWorks(audio) {
             const data = {
             const data = {

+ 3 - 3
components/uploadFile/index.wxml

@@ -18,10 +18,10 @@
   <view class="success" catchtap="true">
   <view class="success" catchtap="true">
     <image src="/static/lan.png" class="icon" mode="" />
     <image src="/static/lan.png" class="icon" mode="" />
     <view class="tips1">作品上传成功</view>
     <view class="tips1">作品上传成功</view>
-    <view class="tips2">快去分享你的作品</view>
+    <!-- <view class="tips2">快去分享你的作品</view> -->
     <view class="tips2">召唤小伙伴点赞评论!</view>
     <view class="tips2">召唤小伙伴点赞评论!</view>
-    <button class="resetBtn shareBtn" open-type="share" catchtap="cancelMask">
-      分享作品
+    <button class="resetBtn shareBtn" catchtap="cancelMask">
+      查看作品
     </button>
     </button>
   </view>
   </view>
 </view>
 </view>

+ 4 - 2
pages/activity/index.js

@@ -37,8 +37,11 @@ Page({
             classify: 2,
             classify: 2,
             grade: this.data.userInfo.grade
             grade: this.data.userInfo.grade
         })
         })
+        let list = res.filter(item => {
+            return item.type != 2
+        })
         this.setData({
         this.setData({
-            rankList: res
+            rankList: list
         })
         })
     },
     },
     async getActivityList() {
     async getActivityList() {
@@ -46,7 +49,6 @@ Page({
             classify: 3,
             classify: 3,
             grade: this.data.userInfo.grade
             grade: this.data.userInfo.grade
         })
         })
-        console.log(res, 'bbbb');
         this.setData({
         this.setData({
             activityList: res
             activityList: res
         })
         })

+ 8 - 5
pages/my/index.less

@@ -81,7 +81,7 @@
         }
         }
     }
     }
 
 
-    .product {
+    .scrollViewBox {
         margin-top: 40rpx;
         margin-top: 40rpx;
         width: 100%;
         width: 100%;
         box-sizing: border-box;
         box-sizing: border-box;
@@ -96,15 +96,17 @@
         }
         }
 
 
         .goodsList {
         .goodsList {
-
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
+            margin-top: 40rpx;
+            width: 100%;
+            height: 310rpx;
+            white-space: nowrap;
+            box-sizing: border-box;
 
 
             .payBox {
             .payBox {
                 position: relative;
                 position: relative;
                 width: 318rpx;
                 width: 318rpx;
                 height: 318rpx;
                 height: 318rpx;
+                margin-right: 30rpx;
                 background-size: cover;
                 background-size: cover;
                 text-align: center;
                 text-align: center;
                 display: inline-block;
                 display: inline-block;
@@ -140,4 +142,5 @@
             }
             }
         }
         }
     }
     }
+
 }
 }

+ 5 - 5
pages/my/index.wxml

@@ -21,17 +21,17 @@
             </view>
             </view>
         </view>
         </view>
     </view>
     </view>
-    <view class="product">
+    <view class="scrollViewBox" wx:if="{{!vipTime}}">
         <view class="title">开通会员</view>
         <view class="title">开通会员</view>
-        <view class="goodsList">
+        <scroll-view class="goodsList" scroll-x="true" enhanced show-scrollbar="{{false}}">
             <view wx:for="{{products}}" wx:key="id" class="payBox {{item.payType=='YEAR'?'year':'month'}}"
             <view wx:for="{{products}}" wx:key="id" class="payBox {{item.payType=='YEAR'?'year':'month'}}"
                 bindtap="openDonutBuy" data-product="{{item}}">
                 bindtap="openDonutBuy" data-product="{{item}}">
                 <view class="name">{{item.title}}</view>
                 <view class="name">{{item.title}}</view>
                 <view class="price">{{item.price/100}}元</view>
                 <view class="price">{{item.price/100}}元</view>
-                <view class="originPrice">原价:330元</view>
+                <view class="originPrice">原价:{{item.originPrice/100}}元</view>
             </view>
             </view>
-        </view>
+        </scroll-view>
     </view>
     </view>
-    <donutBuy id="donutBuy" bind:reload='paySuccess'></donutBuy>
+    <donutBuy id="donutBuy" bind:paySuccess='paySuccess'></donutBuy>
     <vipModal id="vipModal"></vipModal>
     <vipModal id="vipModal"></vipModal>
 </view>
 </view>

+ 15 - 12
pages/my/index.wxss

@@ -67,7 +67,7 @@
   font-size: 24rpx;
   font-size: 24rpx;
   color: #666;
   color: #666;
 }
 }
-.container .product {
+.container .scrollViewBox {
   margin-top: 40rpx;
   margin-top: 40rpx;
   width: 100%;
   width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
@@ -75,45 +75,48 @@
   padding: 18rpx 23rpx 70rpx;
   padding: 18rpx 23rpx 70rpx;
   border-radius: 20rpx;
   border-radius: 20rpx;
 }
 }
-.container .product .title {
+.container .scrollViewBox .title {
   margin-bottom: 14rpx;
   margin-bottom: 14rpx;
   font-size: 28rpx;
   font-size: 28rpx;
   color: #000000;
   color: #000000;
 }
 }
-.container .product .goodsList {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+.container .scrollViewBox .goodsList {
+  margin-top: 40rpx;
+  width: 100%;
+  height: 310rpx;
+  white-space: nowrap;
+  box-sizing: border-box;
 }
 }
-.container .product .goodsList .payBox {
+.container .scrollViewBox .goodsList .payBox {
   position: relative;
   position: relative;
   width: 318rpx;
   width: 318rpx;
   height: 318rpx;
   height: 318rpx;
+  margin-right: 30rpx;
   background-size: cover;
   background-size: cover;
   text-align: center;
   text-align: center;
   display: inline-block;
   display: inline-block;
   border-radius: 20rpx;
   border-radius: 20rpx;
 }
 }
-.container .product .goodsList .payBox .name {
+.container .scrollViewBox .goodsList .payBox .name {
   margin-top: 42rpx;
   margin-top: 42rpx;
   font-weight: 500;
   font-weight: 500;
   font-size: 40rpx;
   font-size: 40rpx;
 }
 }
-.container .product .goodsList .payBox .price {
+.container .scrollViewBox .goodsList .payBox .price {
   margin-top: 22rpx;
   margin-top: 22rpx;
   font-weight: 500;
   font-weight: 500;
   font-size: 56rpx;
   font-size: 56rpx;
 }
 }
-.container .product .goodsList .payBox .originPrice {
+.container .scrollViewBox .goodsList .payBox .originPrice {
   margin-top: 28rpx;
   margin-top: 28rpx;
   font-size: 24rpx;
   font-size: 24rpx;
   text-decoration: line-through;
   text-decoration: line-through;
 }
 }
-.container .product .goodsList .year {
+.container .scrollViewBox .goodsList .year {
   background-image: url(https://reader-wx.ai160.com/images/reader/pay/yuedao365.webp);
   background-image: url(https://reader-wx.ai160.com/images/reader/pay/yuedao365.webp);
   color: #FEF4B5;
   color: #FEF4B5;
 }
 }
-.container .product .goodsList .month {
+.container .scrollViewBox .goodsList .month {
   background-image: url(http://reader-wx.ai160.com/images/reader/pay/yuedao90.webp);
   background-image: url(http://reader-wx.ai160.com/images/reader/pay/yuedao90.webp);
   color: #7D320A;
   color: #7D320A;
 }
 }

+ 0 - 44
pages/pkResult/index copy.wxml

@@ -1,44 +0,0 @@
-<wxs src="../../utils/filter.wxs" module="filters" />
-<view class="pkResult">
-    <view class="title">{{victory.userRead.title}}</view>
-    <view class="time">{{filters.formatDate(pkRecord.gmtCreated,1)}}</view>
-    <view class="body">
-        <view class="left {{equal?'equal':''}}">
-            <image src="{{victory.user.avatar}}" class="avatar avatarL" />
-            <view class="bodyTitle textOver">{{victory.user.nickName||victory.user.eid}}</view>
-            <view class="bodyScore" wx:if="{{victory.userReadExtend.businessType!=2}}">{{victory.userRead.score}}分
-            </view>
-            <image src="{{vState?'/static/work.png':'/static/play-big.png'}}" class="bodyPlay" bindtap="playAudio"
-                data-type="victory" />
-            <progress percent="{{vProgress}}" stroke-width="4" class="progress" style="margin-right:48rpx;" />
-            <view class="duration">
-                <view class="start">{{vStart}}</view>
-                <view class="end">{{vEnd}}</view>
-            </view>
-        </view>
-        <view class="right {{equal?'equalRight':''}}">
-            <image src="{{defeated.user.avatar}}" class="avatar avatarR" />
-            <view class="bodyTitle textOver">{{defeated.user.nickName||defeated.user.eid}}</view>
-            <view class="bodyScore" wx:if="{{victory.userReadExtend.businessType!=2}}">{{defeated.userRead.score}}分
-            </view>
-            <image src="{{dState?'/static/work.png':'/static/play-big.png'}}" class="bodyPlay" bindtap="playAudio"
-                data-type="defeated" />
-            <progress percent="{{dProgress}}" stroke-width="4" class="progress" />
-            <view class="duration">
-                <view class="start">{{dStart}}</view>
-                <view class="end">{{dEnd}}</view>
-            </view>
-        </view>
-    </view>
-    <view class="footer" wx:if="{{!isplayback}}">
-        <view class="stBtn" bindtap="result" data-type="reading">重新挑战</view>
-        <button class="resetBtn btn" open-type="share">
-            分享战绩
-        </button>
-    </view>
-    <view class="footer" wx:else>
-        <view class="stBtn" bindtap="result" data-type="wantPlay">我也要玩</view>
-        <view class="btn" bindtap="result" data-type="index">回到首页</view>
-    </view>
-</view>
-<canvas id='share' type="2d"> </canvas>

+ 1 - 1
pages/pkResult/index.less

@@ -113,7 +113,7 @@
         margin-top: 96rpx;
         margin-top: 96rpx;
         margin-bottom: 10%;
         margin-bottom: 10%;
         display: flex;
         display: flex;
-        justify-content: space-between;
+        justify-content: center;
         align-items: center;
         align-items: center;
 
 
         .stBtn {
         .stBtn {

+ 1 - 4
pages/pkResult/index.wxml

@@ -30,10 +30,7 @@
             <image src="/static/pr1.png" class="imgBtn" />
             <image src="/static/pr1.png" class="imgBtn" />
             <view class="text">重新挑战</view>
             <view class="text">重新挑战</view>
         </view>
         </view>
-        <button class="resetBtn stBtn" open-type="share">
-            <image src="/static/pr2.png" class="imgBtn" />
-            <view class="text" style="color: #AC2A00;">炫耀一下</view>
-        </button>
+        
     </view>
     </view>
     <view class="footer" wx:else>
     <view class="footer" wx:else>
         <view class="stBtn" bindtap="result" data-type="wantPlay">
         <view class="stBtn" bindtap="result" data-type="wantPlay">

+ 1 - 1
pages/pkResult/index.wxss

@@ -96,7 +96,7 @@
   margin-top: 96rpx;
   margin-top: 96rpx;
   margin-bottom: 10%;
   margin-bottom: 10%;
   display: flex;
   display: flex;
-  justify-content: space-between;
+  justify-content: center;
   align-items: center;
   align-items: center;
 }
 }
 .pkResult .footer .stBtn {
 .pkResult .footer .stBtn {

+ 2 - 2
pages/ranking/index.wxml

@@ -23,9 +23,9 @@
             <view class="ilk {{rankingType=='4'?'current tips2':''}}" data-type='4'>
             <view class="ilk {{rankingType=='4'?'current tips2':''}}" data-type='4'>
                 挑战PK榜
                 挑战PK榜
             </view>
             </view>
-            <view class="ilk {{rankingType=='2'?'current tips2':''}}" data-type='2'>
+          <!--   <view class="ilk {{rankingType=='2'?'current tips2':''}}" data-type='2'>
                 邀新榜
                 邀新榜
-            </view>
+            </view> -->
         </view>
         </view>
         <view class="podiumContent">
         <view class="podiumContent">
             <view class="user first">
             <view class="user first">

+ 0 - 1
pages/reading/index.less

@@ -75,7 +75,6 @@
         width: 100%;
         width: 100%;
         height: 422rpx;
         height: 422rpx;
         pointer-events: auto;
         pointer-events: auto;
-
     }
     }
 
 
     .audio {
     .audio {

+ 7 - 2
project.miniapp.json

@@ -3,6 +3,10 @@
   "name": "朗读小咖秀",
   "name": "朗读小咖秀",
   "version": "0.0.1",
   "version": "0.0.1",
   "mini-android": {
   "mini-android": {
+    "channel": {
+      "name": "APP_CHANNEL",
+      "value": "3016"
+    },
     "sdkVersion": "1.3.5",
     "sdkVersion": "1.3.5",
     "toolkitVersion": "0.10.0",
     "toolkitVersion": "0.10.0",
     "useExtendedSdk": {
     "useExtendedSdk": {
@@ -32,7 +36,8 @@
       "RECORD_AUDIO": "用于录制音频",
       "RECORD_AUDIO": "用于录制音频",
       "READ_EXTERNAL_STORAGE": "用于上传头像",
       "READ_EXTERNAL_STORAGE": "用于上传头像",
       "WRITE_EXTERNAL_STORAGE": "用于上传头像"
       "WRITE_EXTERNAL_STORAGE": "用于上传头像"
-    }
+    },
+    "targetSdkVersion": 28
   },
   },
   "mini-ios": {
   "mini-ios": {
     "sdkVersion": "1.1.6",
     "sdkVersion": "1.1.6",
@@ -74,7 +79,7 @@
       {
       {
         "open": true,
         "open": true,
         "pluginId": "wxf1a06dafa3350688",
         "pluginId": "wxf1a06dafa3350688",
-        "pluginVersion": "1.0.55"
+        "pluginVersion": "1.0.58"
       }
       }
     ]
     ]
   }
   }

+ 3 - 3
utils/request.js

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