|
@@ -3,7 +3,7 @@ import {
|
|
|
} from '~/api/video'
|
|
|
const aiengine = require('~/utils/ChivoxAiEngine')
|
|
|
const sha1 = require('~/utils/sha1');
|
|
|
-let rowHeight = 0
|
|
|
+let rowH = 0
|
|
|
let videoContext = null
|
|
|
let stl = null
|
|
|
let setTimeoutObj = null
|
|
@@ -20,6 +20,7 @@ Page({
|
|
|
state: false,
|
|
|
num: 3,
|
|
|
},
|
|
|
+ contentH: 0,
|
|
|
scrollTop: 0,
|
|
|
article: [{
|
|
|
id: 1,
|
|
@@ -87,8 +88,13 @@ Page({
|
|
|
article: data
|
|
|
})
|
|
|
var query = wx.createSelectorQuery();
|
|
|
+ query.select('.content').boundingClientRect((rect) => {
|
|
|
+ this.setData({
|
|
|
+ contentH: rect.height
|
|
|
+ })
|
|
|
+ }).exec()
|
|
|
query.select('.row').boundingClientRect((rect) => {
|
|
|
- this.rowHeight = rect.height
|
|
|
+ this.rowH = rect.height
|
|
|
}).exec()
|
|
|
this.videoContext = wx.createVideoContext('myVideo')
|
|
|
// 录音授权
|
|
@@ -207,6 +213,8 @@ Page({
|
|
|
this.setData({
|
|
|
tempFilePath: res.tempFilePath,
|
|
|
});
|
|
|
+ // 长度过长,不用url传输
|
|
|
+ wx.setStorageSync('tempFilePath', res.tempFilePath)
|
|
|
//录音机结束后,驰声引擎执行结束操作,等待评测返回结果
|
|
|
wsEngine.stop({
|
|
|
success: () => {
|
|
@@ -263,7 +271,7 @@ Page({
|
|
|
currentRow: ++this.data.currentRow
|
|
|
})
|
|
|
this.setData({
|
|
|
- scrollTop: this.rowHeight * this.data.currentRow
|
|
|
+ scrollTop: this.rowH * this.data.currentRow
|
|
|
})
|
|
|
this.startRecording()
|
|
|
},
|
|
@@ -303,7 +311,7 @@ Page({
|
|
|
accuracy,
|
|
|
fluency,
|
|
|
myOverall,
|
|
|
- title: this.data.videoInfo.userRead.title
|
|
|
+ title: this.data.videoInfo.userRead.title,
|
|
|
})
|
|
|
wx.redirectTo({
|
|
|
url: `/pages/score/index?detail=${detail}`,
|