bayi 2 anni fa
parent
commit
3f65bcb990

+ 12 - 3
components/comment/index.js

@@ -56,6 +56,7 @@ Component({
         onceId,
         author,
         show: true,
+        uid: wx.getStorageSync('uid')
       })
       setTimeout(() => {
         animation.translateY(0).step()
@@ -236,9 +237,17 @@ Component({
     jumpUserInfo({
       currentTarget
     }) {
-      wx.navigateTo({
-        url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
-      })
+      let pages = getCurrentPages(); // 获取当前页面栈
+      let len = pages.length; // 获取当前页面栈的长度
+      if (len > 4) {
+        wx.redirectTo({
+          url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
+        })
+      } else {
+        wx.navigateTo({
+          url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
+        })
+      }
     },
     onLongPress({
       currentTarget

+ 7 - 1
components/uploadFile/index.js

@@ -41,6 +41,7 @@ Component({
     // 是否上传过
     uploadState: false,
     percent: 0,
+    userReadId: ''
   },
   /**
    * 组件的方法列表
@@ -114,12 +115,17 @@ Component({
         score: _data.myOverall,
       })
       console.log(scoreRes, 'scoreRes');
-
       this.setData({
         uploadFlag: false,
         uploadState: true,
         uploadSuccess: true,
+        userReadId: res.id,
       })
     },
+    jumpWork() {
+      wx.redirectTo({
+        url:'/pages/userWorks/index'
+      })
+    }
   },
 })

+ 2 - 2
components/uploadFile/index.wxml

@@ -1,6 +1,6 @@
 <view class="btn" bindtap="upload" wx:if="{{!uploadState}}">上传作品</view>
-<button class="resetBtn btn" open-type="share" wx:else>
-  分享作品
+<button class="resetBtn btn" bindtap="jumpWork" wx:else>
+  查看作品
 </button>
 <view class="uploadBox" wx:if="{{uploadFlag}}">
   <view class="upload">

+ 0 - 1
components/videoPreview/index.js

@@ -284,7 +284,6 @@ Component({
       } else {
         url = `/pages/reading/index?videoId=${videoInfo.userRead.exampleId}`
       }
-      console.log(url);
       wx.navigateTo({
         url
       })

+ 10 - 2
pages/reading/index.js

@@ -305,7 +305,7 @@ Page({
         recorderManager.start(options);
       },
       fail: (res) => {
-        console.log("fail=============  " + res);
+        console.log("fail=============  ", res);
       },
     });
     recorderManager.onError(res => {
@@ -319,7 +319,15 @@ Page({
       this.setData({
         tempFilePath: res.tempFilePath,
       });
-
+      //录音机结束后,驰声引擎执行结束操作,等待评测返回结果
+      wsEngine.stop({
+        success: () => {
+          console.log('====== wsEngine stop success ======');
+        },
+        fail: (res) => {
+          console.log('录音结束报错', res);
+        },
+      });
     });
     //监听已录制完指定帧大小的文件事件。如果设置了 frameSize,则会回调此事件。
     recorderManager.onFrameRecorded((res) => {

+ 5 - 5
utils/request.js

@@ -6,13 +6,13 @@ const {
     envVersion
   }
 } = wx.getAccountInfoSync();
-// if (envVersion == 'develop') {
+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'
-// }
+} else {
+  baseUrl = 'https://reader-api.ai160.com/wx'
+  oldUrl = 'https://reader-api.ai160.com'
+}
 
 function request(url, method, data, oldBaseUrl = false) {
   let header = {