소스 검색

开发英文评测结果

bayi 2 년 전
부모
커밋
1feb66a46d
4개의 변경된 파일65개의 추가작업 그리고 60개의 파일을 삭제
  1. 2 2
      pages/reading/index.js
  2. 1 1
      pages/reading/index.wxml
  3. 1 0
      pages/score/index.js
  4. 61 57
      pages/score/index.wxml

+ 2 - 2
pages/reading/index.js

@@ -300,7 +300,6 @@ Page({
                 coreType: businessType == 0 ? "cn.pred.raw" : "en.pred.score",
                 refText: lessonText,
                 rank: 100,
-                attachAudioUrl: 1,
                 result: {
                     details: {
                         gop_adjust: 0.5 //评测系数
@@ -398,7 +397,7 @@ Page({
             tone = Math.floor(result.tone);
             myOverall = Math.floor(integrity * 0.45 + accuracy * 0.35 + fluency * 0.1 + tone * 0.1);
         } else if (businessType == 1) {
-            myOverall = Math.floor(integrity * 0.45 + accuracy * 0.45 + fluency * 0.1);
+            myOverall = Math.floor(integrity * 0.55 + accuracy * 0.35 + fluency * 0.1);
         }
         let detail = {
             integrity,
@@ -406,6 +405,7 @@ Page({
             accuracy,
             fluency,
             myOverall,
+            businessType: this.data.videoInfo.userReadExtend.businessType,
             tempFilePath: this.data.tempFilePath,
             title: this.data.videoInfo.userRead.title,
             id: this.data.videoInfo.userRead.exampleId,

+ 1 - 1
pages/reading/index.wxml

@@ -99,7 +99,7 @@
                             {{readDetail.fluency}}/100
                         </view>
                     </view>
-                    <view class="row">
+                    <view class="row" wx:if="{{readDetail.businessType==0}}">
                         <view class="name">语调</view>
                         <progress class="progress" active percent='{{readDetail.tone}}' stroke-width="18"
                             activeColor="#9BE74B " />

+ 1 - 0
pages/score/index.js

@@ -40,6 +40,7 @@ Page({
     })
     this.storeBindings.updateStoreBindings()
     let score = this.data.readDetail
+    console.log('scorescorescore',score);
     wx.setNavigationBarTitle({
       title: score.title
     })

+ 61 - 57
pages/score/index.wxml

@@ -1,62 +1,66 @@
 <view class="container">
-  <view class="scoreBox">
-    <!-- 星星区域 -->
-    <view class="lightBox">
-      <image src="/static/{{score.myOverall>=10?'stars-1.png':'stars-2.png'}}" class="stars stars-1" mode="" />
-      <image src="/static/{{score.myOverall>=30?'stars-1.png':'stars-2.png'}}" class="stars stars-2" mode="" />
-      <image src="/static/{{score.myOverall>=50?'stars-1.png':'stars-2.png'}}" class="stars stars-3" mode="" />
-      <image src="/static/{{score.myOverall>=70?'stars-1.png':'stars-2.png'}}" class="stars stars-4" mode="" />
-      <image src="/static/{{score.myOverall>=90?'stars-1.png':'stars-2.png'}}" class="stars stars-5" mode="" />
-      <image src="/static/light.png" class="light" mode="" />
-    </view>
-    <!-- 主体得分区域 -->
-    <view class="score">
-      <view class="avatarBox">
-        <image src="{{userInfo.avatar}}" class="avatar" mode="" />
-      </view>
-      <view class="nickName">
-        {{userInfo.nickName||userInfo.eid}}
-      </view>
-      <view class="totalScore">
-        <text>综合得分:</text>
-        <text class="num">{{score.myOverall}}</text>
-      </view>
-      <view class="progressBox">
-        <view class="row">
-          <view class="name">完整度</view>
-          <progress class="progress" active percent='{{score.integrity}}' stroke-width="18" activeColor="#70D9FF" />
-          <view class="scoreInfo">
-            {{score.integrity}}/100
-          </view>
-        </view>
-        <view class="row">
-          <view class="name">正确率</view>
-          <progress class="progress" active percent='{{score.accuracy}}' stroke-width="18" activeColor="#918EFD" />
-          <view class="scoreInfo">
-            {{score.accuracy}}/100
-          </view>
+    <view class="scoreBox">
+        <!-- 星星区域 -->
+        <view class="lightBox">
+            <image src="/static/{{score.myOverall>=10?'stars-1.png':'stars-2.png'}}" class="stars stars-1" mode="" />
+            <image src="/static/{{score.myOverall>=30?'stars-1.png':'stars-2.png'}}" class="stars stars-2" mode="" />
+            <image src="/static/{{score.myOverall>=50?'stars-1.png':'stars-2.png'}}" class="stars stars-3" mode="" />
+            <image src="/static/{{score.myOverall>=70?'stars-1.png':'stars-2.png'}}" class="stars stars-4" mode="" />
+            <image src="/static/{{score.myOverall>=90?'stars-1.png':'stars-2.png'}}" class="stars stars-5" mode="" />
+            <image src="/static/light.png" class="light" mode="" />
         </view>
-        <view class="row">
-          <view class="name">流利度</view>
-          <progress class="progress" active percent='{{score.fluency}}' stroke-width="18" activeColor="#FE9500" />
-          <view class="scoreInfo">
-            {{score.fluency}}/100
-          </view>
+        <!-- 主体得分区域 -->
+        <view class="score">
+            <view class="avatarBox">
+                <image src="{{userInfo.avatar}}" class="avatar" mode="" />
+            </view>
+            <view class="nickName">
+                {{userInfo.nickName||userInfo.eid}}
+            </view>
+            <view class="totalScore">
+                <text>综合得分:</text>
+                <text class="num">{{score.myOverall}}</text>
+            </view>
+            <view class="progressBox">
+                <view class="row">
+                    <view class="name">完整度</view>
+                    <progress class="progress" active percent='{{score.integrity}}' stroke-width="18"
+                        activeColor="#70D9FF" />
+                    <view class="scoreInfo">
+                        {{score.integrity}}/100
+                    </view>
+                </view>
+                <view class="row">
+                    <view class="name">正确率</view>
+                    <progress class="progress" active percent='{{score.accuracy}}' stroke-width="18"
+                        activeColor="#918EFD" />
+                    <view class="scoreInfo">
+                        {{score.accuracy}}/100
+                    </view>
+                </view>
+                <view class="row">
+                    <view class="name">流利度</view>
+                    <progress class="progress" active percent='{{score.fluency}}' stroke-width="18"
+                        activeColor="#FE9500" />
+                    <view class="scoreInfo">
+                        {{score.fluency}}/100
+                    </view>
+                </view>
+                <view class="row" wx:if="{{score.businessType==0}}">
+                    <view class="name">语调</view>
+                    <progress class="progress" active percent='{{score.tone}}' stroke-width="18"
+                        activeColor="#9BE74B " />
+                    <view class="scoreInfo">
+                        {{score.tone}}/100
+                    </view>
+                </view>
+            </view>
         </view>
-        <view class="row">
-          <view class="name">语调</view>
-          <progress class="progress" active percent='{{score.tone}}' stroke-width="18" activeColor="#9BE74B " />
-          <view class="scoreInfo">
-            {{score.tone}}/100
-          </view>
-        </view>
-      </view>
     </view>
-  </view>
-  <!-- 底部 -->
-  <view class="footer">
-    <view class="stBtn" bindtap="backReading">试听</view>
-    <uploadFile readingType='{{readingType}}' activityId='{{activityId}}' bindtap="hideFooter" />
-  </view>
-  <canvas id='share' type="2d"> </canvas>
+    <!-- 底部 -->
+    <view class="footer">
+        <view class="stBtn" bindtap="backReading">试听</view>
+        <uploadFile readingType='{{readingType}}' activityId='{{activityId}}' bindtap="hideFooter" />
+    </view>
+    <canvas id='share' type="2d"> </canvas>
 </view>