Kaynağa Gözat

优化测试

bayi 2 yıl önce
ebeveyn
işleme
d983482c68

+ 18 - 5
pages/invite/index.js

@@ -1,14 +1,16 @@
 import {
     getInviteList
 } from '~/api/user'
-import share from '~/mixins/share'
-
 Page({
-    behaviors: [share],
+
+    /**
+     * 页面的初始数据
+     */
     data: {
         list: [],
         count: 0
     },
+
     async onShow() {
         let {
             list
@@ -16,8 +18,8 @@ Page({
             pageSize: 9999
         })
         this.setData({
-            list,
-            count: list.length
+            // list,
+            // count: list.length
         })
         console.log(list);
     },
@@ -27,4 +29,15 @@ Page({
     closeTranscript() {
         this.selectComponent("#popUp").hideModal()
     },
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+        const user = wx.getStorageSync('user');
+        return {
+            title: '自从用了它,家里朗朗书声,美妙极了!你家孩子也快来试试!',
+            path: `/pages/index/index?uid=${user.uid}`,
+            imageUrl: 'http://reader-wx.ai160.com/images/reader/v3/375-300-1.jpg'
+        }
+    }
 })

+ 10 - 0
pages/invite/index.less

@@ -220,6 +220,16 @@
             }
         }
 
+        .copywriting {
+            width: 100%;
+            margin: 100rpx 0rpx;
+            text-align: center;
+
+            .text {
+                margin-bottom: 40rpx;
+            }
+        }
+
         .inviteBtn {
             padding: 30rpx 0;
             width: 390rpx;

+ 4 - 0
pages/invite/index.wxml

@@ -210,6 +210,10 @@
                 </view>
                 <view class="time">{{filters.formatDate(item.gmtCreated,1)}}</view>
             </view>
+            <view class="copywriting">
+                <view class="text">别的小伙伴已经拿到大奖啦!</view>
+                <view>快去邀请你的小伙伴为你助力!</view>
+            </view>
             <button class="resetBtn" open-type="share">
                 <image src="/static/yqb.png" class="inviteBtn" />
             </button>

+ 8 - 0
pages/invite/index.wxss

@@ -187,6 +187,14 @@
 .popBox .list .item .time {
   font-size: 26rpx;
 }
+.popBox .list .copywriting {
+  width: 100%;
+  margin: 100rpx 0rpx;
+  text-align: center;
+}
+.popBox .list .copywriting .text {
+  margin-bottom: 40rpx;
+}
 .popBox .list .inviteBtn {
   padding: 30rpx 0;
   width: 390rpx;

+ 1 - 1
pages/my/index.js

@@ -35,7 +35,6 @@ Page({
                 setUser: 'setUser'
             }
         })
-        this.getProducts()
     },
     async onShow() {
         if (typeof this.getTabBar === 'function') {
@@ -57,6 +56,7 @@ Page({
         let userInfo = await getMyInfo()
         let vipTime = await getVipInfo()
         this.setUser(userInfo.user)
+        this.getProducts()
         this.setData({
             userInfo,
             vipTime,

+ 4 - 2
pages/reading/index.js

@@ -84,7 +84,6 @@ Page({
         tempFilePath: ""
     },
     onLoad(options) {
-        console.log(options);
         let videoId = options.videoId
         wx.setNavigationBarTitle({
             title: options.navBarTitle
@@ -145,6 +144,7 @@ Page({
         })
         /*监听评测结果:必须在基础引擎创建后,调用任何评测接口前设置监听,否则有可能收不到相关事件。*/
         wsEngine.onResult((res) => {
+            console.log('触发评分结束了');
             this.getRecordScore(res)
         });
         wsEngine.onErrorResult(async (res) => {
@@ -307,6 +307,7 @@ Page({
         let businessType = this.data.videoInfo.userReadExtend.businessType
         console.log(businessType, 'businessType');
         // https://www.chivox.com/opendoc/#/ChineseDoc/coreCn/Chinese/cn.sent.raw?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e <----参数说明
+        console.log('启动了');
         wsEngine.start({
             request: {
                 coreType: businessType == 0 ? "cn.pred.raw" : "en.pred.score",
@@ -443,6 +444,7 @@ Page({
     // 获取测评结果
     async getRecordScore(res) {
         let result = res.result;
+        console.log(result, 'result');
         let businessType = this.data.videoInfo.userReadExtend.businessType
         let integrity = Math.floor(result.integrity); //完成度
         let accuracy = Math.floor(result.accuracy); // 准确度 发音分
@@ -548,7 +550,7 @@ Page({
                     }
                 }
                 let result = await uploadPk(data)
-                console.log(result,'rrrr');
+                console.log(result, 'rrrr');
                 await userEvent({
                     action: 'WXPKUPLOAD',
                 })