|
@@ -102,7 +102,6 @@ Page({
|
|
|
// 录音授权
|
|
|
wx.getSetting({
|
|
|
success(res) {
|
|
|
- console.log(res);
|
|
|
if (!res.authSetting['scope.record']) {
|
|
|
wx.authorize({
|
|
|
scope: 'scope.record',
|
|
@@ -115,9 +114,7 @@ Page({
|
|
|
content: '请先开启录音功能',
|
|
|
success(res) {
|
|
|
wx.openSetting({
|
|
|
- success(res) {
|
|
|
-
|
|
|
- }
|
|
|
+ success(res) {}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -130,8 +127,12 @@ Page({
|
|
|
wsEngine.onResult((res) => {
|
|
|
this.getRecordScore(res)
|
|
|
});
|
|
|
- wsEngine.onErrorResult((res) => {
|
|
|
+ wsEngine.onErrorResult(async (res) => {
|
|
|
console.log("===收到错误结果=============", res)
|
|
|
+ await userEvent({
|
|
|
+ action: 'WXSCORE',
|
|
|
+ targetContent: res
|
|
|
+ })
|
|
|
});
|
|
|
this.innerAudioContext = wx.createInnerAudioContext();
|
|
|
this.innerAudioContext.onTimeUpdate(res => {
|
|
@@ -342,7 +343,8 @@ Page({
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // eeeeee() {
|
|
|
+ // 直接跳转的时候用的,勿动
|
|
|
+ // util() {
|
|
|
// wx.navigateTo({
|
|
|
// url: `/pages/score/index?readingType=${this.data.readingType}`,
|
|
|
// events: {
|
|
@@ -360,7 +362,7 @@ Page({
|
|
|
// })
|
|
|
// },
|
|
|
// 获取测评结果
|
|
|
- getRecordScore(res) {
|
|
|
+ async getRecordScore(res) {
|
|
|
const result = res.result;
|
|
|
const integrity = Math.floor(result.integrity); //完成度
|
|
|
const tone = Math.floor(result.tone); // 语调声调
|
|
@@ -383,6 +385,9 @@ Page({
|
|
|
}
|
|
|
console.log('评测结果', detail);
|
|
|
this.setReadDetail(detail)
|
|
|
+ await userEvent({
|
|
|
+ action: 'WXSCORE',
|
|
|
+ })
|
|
|
if (this.data.readingType == 'public' || this.data.readingType == 'readMatch') {
|
|
|
wx.navigateTo({
|
|
|
url: `/pages/score/index?readingType=${this.data.readingType}&activityId=${this.data.activityId}`,
|