bayi 1 年之前
父节点
当前提交
149946da33
共有 5 个文件被更改,包括 200 次插入192 次删除
  1. 187 183
      pages/pkResult/index.js
  2. 0 1
      pages/pkResult/index.less
  3. 8 2
      pages/pkResult/index.wxml
  4. 0 1
      pages/pkResult/index.wxss
  5. 5 5
      utils/request.js

+ 187 - 183
pages/pkResult/index.js

@@ -62,188 +62,188 @@ Page({
     compareScore(resultData) {
         let first = resultData[0]
         let second = resultData[1]
-      /*   let first = {
-            "readMaskTemplate": null,
-            "user": {
-                "avatar": "http://reader-wx.ai160.com/images/reader/v3/boy.png",
-                "birthday": null,
-                "channel": "3001",
-                "eid": "100511330001627",
-                "gender": 1,
-                "gmtCreated": 1676011831000,
-                "gmtModified": 1695283827000,
-                "grade": "PRIMARY_SENIOR_GRADE",
-                "loginDay": 0,
-                "logoutDate": null,
-                "mCount": null,
-                "messageCount": null,
-                "mobile": "",
-                "myCount": null,
-                "nickName": "",
-                "openId": "oWMml5LoKweewL78KYbkPoWL3taQ",
-                "profession": "学生",
-                "recOsType": null,
-                "recStatus": null,
-                "recUid": "",
-                "saleShareUid": "",
-                "saleUserId": null,
-                "schoolCity": "",
-                "schoolName": "",
-                "schoolProvince": "",
-                "shareUid": "",
-                "sourceType": "",
-                "statusEnum": "NORMAL",
-                "uid": "95d8d8f0815f44cfa9b9245b52eff5c4",
-                "unionId": "o8sgct5tbZfWQBv3Dd595sLS_ZZ4",
-                "userId": "",
-                "vipType": 0,
-                "wechatName": ""
-            },
-            "userRead": {
-                "activityId": null,
-                "audioPath": "https://reader-wx.ai160.com/reader/resource/20230215/1676453639830669.mp3",
-                "backgroundVideoNumber": "",
-                "backgroundVirtualImg": "",
-                "businessType": null,
-                "channel": "3001",
-                "commentAmount": 13,
-                "courseWareNumber": "",
-                "coverImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJX.jpg",
-                "day": "2023-02-15",
-                "demoVideoNumber": "",
-                "duration": 20,
-                "eid": "",
-                "exampleId": 1675912836219052,
-                "favoritesAmount": 0,
-                "gmtCreated": 1676453641000,
-                "gmtModified": 1702345703000,
-                "grade": null,
-                "iconImg": "",
-                "id": 1676453641062792,
-                "lessonText": "",
-                "lessonText2": "",
-                "likeAmount": 2,
-                "markPath": "https://reader-wx.ai160.com/reader/resource/markVideo/1676453641062792.mp4",
-                "nickName": "",
-                "originVideo": "http://reader-wx.ai160.com/audio/reader/001/LD00103248/LD00103248005-2.mp3",
-                "playAmount": 358,
-                "resourcesType": null,
-                "score": 19,
-                "shareAmount": 0,
-                "shareImg": "",
-                "sort": 0,
-                "status": "NORMAL",
-                "summary": "",
-                "tag": "",
-                "title": "一剪梅\n[ 宋 ] 李清照",
-                "traceId": "3c6eb4c15961d904812cd2dccf422b12",
-                "type": "READ",
-                "uid": "95d8d8f0815f44cfa9b9245b52eff5c4",
-                "videoPath": "https://reader-wx.ai160.com/reader/resource/video/1676453641062792.mp4"
-            },
-            "userReadExtend": {
-                "backgroundVideoNumber": "LD00103248005-2",
-                "backgroundVirtualImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJXBJ.jpg",
-                "businessType": 0,
-                "courseWareNumber": "LD00103248005",
-                "demoVideoNumber": "LD00103248005-1",
-                "id": 1675912836252266,
-                "readMaskId": 1,
-                "resourcesType": 1,
-                "userReadId": 1675912836219052
-            }
-        }
-        let second = {
-            "readMaskTemplate": null,
-            "user": {
-                "avatar": "http://reader-wx.ai160.com/images/reader/v3/boy.png",
-                "birthday": 1388505600000,
-                "channel": "3001",
-                "eid": "110010060125671",
-                "gender": 1,
-                "gmtCreated": 1699323582000,
-                "gmtModified": 1702023595000,
-                "grade": "PRIMARY_FIRST_GRADE",
-                "loginDay": 0,
-                "logoutDate": null,
-                "mCount": null,
-                "messageCount": null,
-                "mobile": "",
-                "myCount": null,
-                "nickName": "测试",
-                "openId": "oWMml5GGONTsOiIDIW-kTvdNIZjI",
-                "profession": "老师",
-                "recOsType": null,
-                "recStatus": null,
-                "recUid": "",
-                "saleShareUid": "",
-                "saleUserId": null,
-                "schoolCity": "",
-                "schoolName": "",
-                "schoolProvince": "",
-                "shareUid": "",
-                "sourceType": "",
-                "statusEnum": "NORMAL",
-                "uid": "d83d947655f6455a96f4197d31afa6d4",
-                "unionId": "o8sgct3D71o7iS8V-CvuDOsT_0kQ",
-                "userId": "",
-                "vipType": 0,
-                "wechatName": ""
-            },
-            "userRead": {
-                "activityId": null,
-                "audioPath": "https://reader-wx.ai160.com/reader/resource/20231212/1702345717581444.mp3",
-                "backgroundVideoNumber": "",
-                "backgroundVirtualImg": "",
-                "businessType": null,
-                "channel": "3001",
-                "commentAmount": 0,
-                "courseWareNumber": "",
-                "coverImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJX.jpg",
-                "day": "2023-12-12",
-                "demoVideoNumber": "",
-                "duration": 3,
-                "eid": "",
-                "exampleId": 1675912836219052,
-                "favoritesAmount": 0,
-                "gmtCreated": 1702345717000,
-                "gmtModified": 1702345717000,
-                "grade": null,
-                "iconImg": "",
-                "id": 1702345717919478,
-                "lessonText": "",
-                "lessonText2": "",
-                "likeAmount": 0,
-                "markPath": "https://reader-wx.ai160.com/reader/resource/markVideo/1702345717919478.mp4",
-                "nickName": "",
-                "originVideo": "http://reader-wx.ai160.com/audio/reader/001/LD00103248/LD00103248005-2.mp3",
-                "playAmount": 0,
-                "resourcesType": null,
-                "score": 19,
-                "shareAmount": 0,
-                "shareImg": "",
-                "sort": 0,
-                "status": "CHECK",
-                "summary": "",
-                "tag": "",
-                "title": "一剪梅\n[ 宋 ] 李清照",
-                "traceId": "396d30110403fd2d8ee5b73f9b7853bc",
-                "type": "READ",
-                "uid": "d83d947655f6455a96f4197d31afa6d4",
-                "videoPath": "https://reader-wx.ai160.com/reader/resource/video/1702345717919478.mp4"
-            },
-            "userReadExtend": {
-                "backgroundVideoNumber": "LD00103248005-2",
-                "backgroundVirtualImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJXBJ.jpg",
-                "businessType": 0,
-                "courseWareNumber": "LD00103248005",
-                "demoVideoNumber": "LD00103248005-1",
-                "id": 1675912836252266,
-                "readMaskId": 1,
-                "resourcesType": 1,
-                "userReadId": 1675912836219052
-            }
-        } */
+        /*   let first = {
+              "readMaskTemplate": null,
+              "user": {
+                  "avatar": "http://reader-wx.ai160.com/images/reader/v3/boy.png",
+                  "birthday": null,
+                  "channel": "3001",
+                  "eid": "100511330001627",
+                  "gender": 1,
+                  "gmtCreated": 1676011831000,
+                  "gmtModified": 1695283827000,
+                  "grade": "PRIMARY_SENIOR_GRADE",
+                  "loginDay": 0,
+                  "logoutDate": null,
+                  "mCount": null,
+                  "messageCount": null,
+                  "mobile": "",
+                  "myCount": null,
+                  "nickName": "",
+                  "openId": "oWMml5LoKweewL78KYbkPoWL3taQ",
+                  "profession": "学生",
+                  "recOsType": null,
+                  "recStatus": null,
+                  "recUid": "",
+                  "saleShareUid": "",
+                  "saleUserId": null,
+                  "schoolCity": "",
+                  "schoolName": "",
+                  "schoolProvince": "",
+                  "shareUid": "",
+                  "sourceType": "",
+                  "statusEnum": "NORMAL",
+                  "uid": "95d8d8f0815f44cfa9b9245b52eff5c4",
+                  "unionId": "o8sgct5tbZfWQBv3Dd595sLS_ZZ4",
+                  "userId": "",
+                  "vipType": 0,
+                  "wechatName": ""
+              },
+              "userRead": {
+                  "activityId": null,
+                  "audioPath": "https://reader-wx.ai160.com/reader/resource/20230215/1676453639830669.mp3",
+                  "backgroundVideoNumber": "",
+                  "backgroundVirtualImg": "",
+                  "businessType": null,
+                  "channel": "3001",
+                  "commentAmount": 13,
+                  "courseWareNumber": "",
+                  "coverImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJX.jpg",
+                  "day": "2023-02-15",
+                  "demoVideoNumber": "",
+                  "duration": 20,
+                  "eid": "",
+                  "exampleId": 1675912836219052,
+                  "favoritesAmount": 0,
+                  "gmtCreated": 1676453641000,
+                  "gmtModified": 1702345703000,
+                  "grade": null,
+                  "iconImg": "",
+                  "id": 1676453641062792,
+                  "lessonText": "",
+                  "lessonText2": "",
+                  "likeAmount": 2,
+                  "markPath": "https://reader-wx.ai160.com/reader/resource/markVideo/1676453641062792.mp4",
+                  "nickName": "",
+                  "originVideo": "http://reader-wx.ai160.com/audio/reader/001/LD00103248/LD00103248005-2.mp3",
+                  "playAmount": 358,
+                  "resourcesType": null,
+                  "score": 19,
+                  "shareAmount": 0,
+                  "shareImg": "",
+                  "sort": 0,
+                  "status": "NORMAL",
+                  "summary": "",
+                  "tag": "",
+                  "title": "一剪梅\n[ 宋 ] 李清照",
+                  "traceId": "3c6eb4c15961d904812cd2dccf422b12",
+                  "type": "READ",
+                  "uid": "95d8d8f0815f44cfa9b9245b52eff5c4",
+                  "videoPath": "https://reader-wx.ai160.com/reader/resource/video/1676453641062792.mp4"
+              },
+              "userReadExtend": {
+                  "backgroundVideoNumber": "LD00103248005-2",
+                  "backgroundVirtualImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJXBJ.jpg",
+                  "businessType": 0,
+                  "courseWareNumber": "LD00103248005",
+                  "demoVideoNumber": "LD00103248005-1",
+                  "id": 1675912836252266,
+                  "readMaskId": 1,
+                  "resourcesType": 1,
+                  "userReadId": 1675912836219052
+              }
+          }
+          let second = {
+              "readMaskTemplate": null,
+              "user": {
+                  "avatar": "http://reader-wx.ai160.com/images/reader/v3/boy.png",
+                  "birthday": 1388505600000,
+                  "channel": "3001",
+                  "eid": "110010060125671",
+                  "gender": 1,
+                  "gmtCreated": 1699323582000,
+                  "gmtModified": 1702023595000,
+                  "grade": "PRIMARY_FIRST_GRADE",
+                  "loginDay": 0,
+                  "logoutDate": null,
+                  "mCount": null,
+                  "messageCount": null,
+                  "mobile": "",
+                  "myCount": null,
+                  "nickName": "测试",
+                  "openId": "oWMml5GGONTsOiIDIW-kTvdNIZjI",
+                  "profession": "老师",
+                  "recOsType": null,
+                  "recStatus": null,
+                  "recUid": "",
+                  "saleShareUid": "",
+                  "saleUserId": null,
+                  "schoolCity": "",
+                  "schoolName": "",
+                  "schoolProvince": "",
+                  "shareUid": "",
+                  "sourceType": "",
+                  "statusEnum": "NORMAL",
+                  "uid": "d83d947655f6455a96f4197d31afa6d4",
+                  "unionId": "o8sgct3D71o7iS8V-CvuDOsT_0kQ",
+                  "userId": "",
+                  "vipType": 0,
+                  "wechatName": ""
+              },
+              "userRead": {
+                  "activityId": null,
+                  "audioPath": "https://reader-wx.ai160.com/reader/resource/20231212/1702345717581444.mp3",
+                  "backgroundVideoNumber": "",
+                  "backgroundVirtualImg": "",
+                  "businessType": null,
+                  "channel": "3001",
+                  "commentAmount": 0,
+                  "courseWareNumber": "",
+                  "coverImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJX.jpg",
+                  "day": "2023-12-12",
+                  "demoVideoNumber": "",
+                  "duration": 3,
+                  "eid": "",
+                  "exampleId": 1675912836219052,
+                  "favoritesAmount": 0,
+                  "gmtCreated": 1702345717000,
+                  "gmtModified": 1702345717000,
+                  "grade": null,
+                  "iconImg": "",
+                  "id": 1702345717919478,
+                  "lessonText": "",
+                  "lessonText2": "",
+                  "likeAmount": 0,
+                  "markPath": "https://reader-wx.ai160.com/reader/resource/markVideo/1702345717919478.mp4",
+                  "nickName": "",
+                  "originVideo": "http://reader-wx.ai160.com/audio/reader/001/LD00103248/LD00103248005-2.mp3",
+                  "playAmount": 0,
+                  "resourcesType": null,
+                  "score": 19,
+                  "shareAmount": 0,
+                  "shareImg": "",
+                  "sort": 0,
+                  "status": "CHECK",
+                  "summary": "",
+                  "tag": "",
+                  "title": "一剪梅\n[ 宋 ] 李清照",
+                  "traceId": "396d30110403fd2d8ee5b73f9b7853bc",
+                  "type": "READ",
+                  "uid": "d83d947655f6455a96f4197d31afa6d4",
+                  "videoPath": "https://reader-wx.ai160.com/reader/resource/video/1702345717919478.mp4"
+              },
+              "userReadExtend": {
+                  "backgroundVideoNumber": "LD00103248005-2",
+                  "backgroundVirtualImg": "http://reader-wx.ai160.com/images/reader/v3/readIcon/SCJXBJ.jpg",
+                  "businessType": 0,
+                  "courseWareNumber": "LD00103248005",
+                  "demoVideoNumber": "LD00103248005-1",
+                  "id": 1675912836252266,
+                  "readMaskId": 1,
+                  "resourcesType": 1,
+                  "userReadId": 1675912836219052
+              }
+          } */
         let victory = first.userRead.score > second.userRead.score ? first : second
         let defeated = second.userRead.score < first.userRead.score ? second : first
         let uid = wx.getStorageSync('uid')
@@ -340,7 +340,11 @@ Page({
                 }).exec((res) => {
                     const canvas = res[0].node;
                     const ctx = canvas.getContext('2d');
-                    const dpr = 0.84;
+                    // #if MP
+                    const dpr = wx.getSystemInfoSync().pixelRatio;
+                    // #elif ANDROID
+                    const dpr = 0.84
+                    // #endif
                     canvas.width = res[0].width * dpr;
                     canvas.height = res[0].height * dpr;
                     ctx.scale(dpr, dpr);

+ 0 - 1
pages/pkResult/index.less

@@ -74,7 +74,6 @@
         .right {
             right: 0;
             padding-left: 70rpx;
-            background-color: rgba(255, 166, 0, 0.212);
 
             .duration {
                 padding-right: 20rpx;

+ 8 - 2
pages/pkResult/index.wxml

@@ -35,8 +35,14 @@
         </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 class="stBtn" bindtap="result" data-type="wantPlay">
+            <image src="/static/pr1.png" class="imgBtn" />
+            <view class="text">我也要玩</view>
+        </view>
+        <view class="stBtn" bindtap="result" data-type="index">
+            <image src="/static/pr2.png" class="imgBtn" />
+            <view class="text">回到首页</view>
+        </view>
     </view>
 </view>
 <canvas id='share' type="2d"> </canvas>

+ 0 - 1
pages/pkResult/index.wxss

@@ -64,7 +64,6 @@
 .pkResult .body .right {
   right: 0;
   padding-left: 70rpx;
-  background-color: rgba(255, 166, 0, 0.212);
 }
 .pkResult .body .right .duration {
   padding-right: 20rpx;

+ 5 - 5
utils/request.js

@@ -6,19 +6,19 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
+/* if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else {
+} 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 = {
         'uid': wx.getStorageSync('uid') || '',
-        // 'channelCode': wx.getStorageSync('user').channel == '4001' ? '4001' : '3001'
-        'channelCode': 3006
+        'channelCode': wx.getStorageSync('user').channel == '4001' ? '4001' : '3001'
+        // 'channelCode': 3006
     }
     return new Promise((reslove, reject) => {
         wx.request({