bayi 1 year ago
parent
commit
ce16a8fad5
1 changed files with 5 additions and 3 deletions
  1. 5 3
      pages/reading/index.js

+ 5 - 3
pages/reading/index.js

@@ -95,7 +95,7 @@ Page({
             readingType: options.readingType || 'public',
             uploadHide: options.uploadHide,
             activityId: options.activityId || '',
-            free: Number(options.free)
+            free: options.free ? Number(options.free) : 1
         })
         // 手工绑定 
         this.storeBindings = createStoreBindings(this, {
@@ -290,11 +290,13 @@ Page({
         let lessonText = JSON.parse(this.data.videoInfo.userReadExtend.lessonText).map((item) => {
             return item.text
         }).join('')
-        console.log(lessonText);
+        // userReadExtend 中 businessType   0:中文/ 1: 英文 / 2: 歌曲
+        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 <----参数说明
         wsEngine.start({
             request: {
-                coreType: "cn.pred.raw",
+                coreType: businessType == 0 ? "cn.pred.raw" : "en.pred.score",
                 refText: lessonText,
                 rank: 100,
                 attachAudioUrl: 1,