article.wxml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <navigation-bar
  2. title="文章"
  3. back="{{!IsBuilding}}"
  4. background="{{ThemeCSS === 'DarkColor' ? '#004433' : '#D0ECD3'}}"
  5. color="{{ThemeCSS === 'DarkColor' ? '#ffffff' : '#151815'}}"
  6. extClass="fixed-nav {{ThemeCSS}}"
  7. ></navigation-bar>
  8. <!-- 正常文章 -->
  9. <view wx:if="{{!IsBuilding && !IsBuildError}}" class="{{ThemeCSS}} container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
  10. <view class="panel1 FlexColumn">
  11. <!-- 完整文章 -->
  12. <text class="textArticle" wx:if="{{!IsShowTranslate}}" >
  13. <text bindlongpress="onLongPress" data-strtype="article" data-index="{{index}}" wx:for="{{Content.ArticleEnglishArr}}" wx:key="index" >
  14. <text class="{{itemChild.CSS}}" wx:for="{{item}}" wx:key="index2" wx:for-item="itemChild" wx:for-index="indexChild">{{itemChild.Content}}</text>
  15. </text>
  16. </text>
  17. <!-- 有翻译文章 -->
  18. <view class="textArticle FlexColumn" wx:if="{{IsShowTranslate}}">
  19. <view wx:for="{{Content.ArticleEnglish}}" wx:key="index" class="textArticle">
  20. <rich-text class="textArticle" nodes="{{item}}"></rich-text>
  21. <view class="textArticleTranslate">{{Content.ArticleChinese[index]}}</view>
  22. <view class="panelLine" wx:if="{{index<Content.ArticleEnglish.length-1}}"></view>
  23. </view>
  24. </view>
  25. </view>
  26. <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
  27. <view class="panelFooter1 FlexRow">
  28. <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">
  29. <image src="../images/sysIcon_a15.png" class="sysIcon_a15"></image>
  30. <view class="text02">中英对照</view>
  31. </view>
  32. <view class="panelFooter12 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowQuestion">
  33. 答题
  34. </view>
  35. <view class="panelFooter13 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowSetting">
  36. <image src="../images/sysIcon_a08.png" class="sysIcon_a03"></image>
  37. <view class="text02">更多</view>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 看问题 -->
  42. <view hidden="{{!IsShowQuestion}}" class="{{ThemeCSS}} panelAnswer FlexColumn">
  43. <view class="text03">Reading Comprehension Questions</view>
  44. <swiper class="panelAnswer1" indicator-dots="true" current="{{CurrentQuestionIndex}}" bindchange="updateQuestionIndex" >
  45. <swiper-item class="panelAnswer1Item" wx:for="{{Content.Question}}" wx:key="index" data-index="{{index}}">
  46. <scroll-view scroll-y="true" class="panelAnswer1Item1 FlexColumn">
  47. <view class="panelAnswer2 FlexRow">
  48. <image src="../images/sysIcon_c0{{index+1}}.png" wx:if="{{ThemeCSS=='DarkColor'}}" class="sysIcon_c01"></image>
  49. <image src="../images/sysIcon_d0{{index+1}}.png" wx:if="{{ThemeCSS=='LightColor'}}" class="sysIcon_c01"></image>
  50. <view class="text04 FlexColumn">
  51. <view class="text041" bindlongpress="onLongPress" data-strtype="question" data-index="{{index}}">{{item.QuestionEnglish}}</view>
  52. <view class="text042" wx:if="{{IsShowTranslate}}">{{item.QuestionChinese}}</view>
  53. </view>
  54. </view>
  55. <view class="panelAnswer3 FlexColumn" >
  56. <view class="panelAnswer31 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer310':'' }} FlexRow" wx:for="{{item.OptionsEnglish}}" wx:key="indexChild" wx:for-item="itemChild" wx:for-index="indexChild" catch:tap="selectedAnswer" data-question="{{index}}" data-index="{{indexChild}}">
  57. <view class="panelAnswer311 {{ item.AnswerNumber==indexChild && item.IsShowAnswer?'panelAnswer3110':'' }}" wx:if="{{indexChild!=item.UserAnswer}}"></view>
  58. <view class="panelAnswer311 panelAnswer3110 FlexColumn" wx:if="{{indexChild==item.UserAnswer}}">
  59. <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a10.png" class="sysIcon_a10"></image>
  60. <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a11.png" class="sysIcon_a10"></image>
  61. </view>
  62. <view class="text05 FlexColumn">
  63. <view class="text051" bindlongpress="onLongPress" data-strtype="option" data-index="{{index}}" data-index2="{{indexChild}}">{{itemChild}}</view>
  64. <view class="text052" wx:if="{{IsShowTranslate}}">{{item.OptionsChinese[indexChild]}}</view>
  65. </view>
  66. </view>
  67. </view>
  68. </scroll-view>
  69. </swiper-item>
  70. </swiper>
  71. <view class="panelLine2"></view>
  72. <view class="panelAnswer4 FlexRow">
  73. <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{!Content.Question[CurrentQuestionIndex].IsShowAnswer}}">看答案</view>
  74. <view class="btn1 FlexRow" catch:tap="showData" data-index="{{CurrentQuestionIndex}}" data-name="IsShowAnswer" wx:if="{{Content.Question[CurrentQuestionIndex].IsShowAnswer}}">关答案</view>
  75. <view class="btn1 {{ CurrentQuestionIndex+1==Content.Question.length?'btn10':'' }} FlexRow" catch:tap="nextQuestion">下一题</view>
  76. </view>
  77. <view class="btnClose" capture-bind:tap="showData" data-name="IsShowQuestion">隐藏</view>
  78. </view>
  79. <!-- 设置 -->
  80. <view wx:if="{{IsShowSetting}}" class="panelAnswer FlexColumn">
  81. <view class="text03 text06">更多功能</view>
  82. <view class="btn2 FlexRow" catch:tap="generatePDF">
  83. <view>PDF下载</view>
  84. </view>
  85. <view class="panelAnswer5 FlexColumn">
  86. <view class="panelAnswer51 FlexRow">
  87. <view class="text12">突出关键词</view>
  88. <switch class="switchClass" bindchange="showData" checked="{{IsShowKeyword}}" data-name="IsShowKeyword" />
  89. </view>
  90. <view class="text13">用亮色强调用来生成短文的单词</view>
  91. </view>
  92. <view class="panelLine3"></view>
  93. <view class="panelAnswer5 FlexColumn">
  94. <view class="panelAnswer51 panelAnswer510 FlexRow">
  95. <view class="text12">浅色方案</view>
  96. <switch class="switchClass" bindchange="showData" checked="{{IsShowLightColor}}" data-name="IsShowLightColor"/>
  97. </view>
  98. </view>
  99. <view class="btnClose btnClose2 FlexRow" capture-bind:tap="showData" data-name="IsShowSetting">
  100. <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_a03.png" class="sysIcon_a03"></image>
  101. <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_a09.png" class="sysIcon_a03"></image>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 显示第一次打开帮助 -->
  106. <view wx:if="{{IsShowFirstOpen}}" class="panelHelp container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
  107. <view class="panelHelp1">
  108. <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
  109. <view class="panelHelp2 FlexColumn">
  110. <text class="text07">在这里看文章\n点下面做题目,右下角还有PDF</text>
  111. <view class="btn3 FlexColumn" bind:tap="closeHelp">知道了</view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 显示生成中 -->
  116. <view wx:if="{{IsBuilding}}" class="panelBuildindParent container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
  117. </view>
  118. <image wx:if="{{IsBuilding && ThemeCSS=='DarkColor'}}" src="../images/pic_08.png" mode="widthFix" class="pic_08"></image>
  119. <image wx:if="{{IsBuilding && ThemeCSS=='LightColor'}}" src="../images/pic_09.png" mode="widthFix" class="pic_08"></image>
  120. <view wx:if="{{IsBuilding}}" class="panelBuilding FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
  121. <view class="panelBuilding1 FlexColumn">
  122. <image src="../images/pic_03.png" class="pic_03"></image>
  123. <image src="../images/sysIcon_b08.gif" class="sysIcon_b08"></image>
  124. <view class="panelBuilding11 FlexColumn">
  125. <text class="text08" wx:if="{{CountDown>0}}">生成中…{{CountDown}}秒</text>
  126. <text class="text08" wx:if="{{CountDown==0}}">生成中…差一点,就快好了</text>
  127. <text class="text09">请眨眨眼,揉揉四白穴、睛明穴、攒竹穴</text>
  128. </view>
  129. <view class="panelBuilding12 FlexColumn">
  130. <text class="text10">Vocabulary:</text>
  131. <text class="text11">{{WordsStr}}</text>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 显示生成出错 -->
  136. <view wx:if="{{IsBuildError}}" class="container {{ThemeCSS}} FlexColumn" style='min-height:{{Containnerheight+140}}rpx;'>
  137. <view class="{{ThemeCSS}} panelError FlexColumn">
  138. <image wx:if="{{ThemeCSS=='DarkColor'}}" src="../images/sysIcon_b14.png" class="sysIcon_b14"></image>
  139. <image wx:if="{{ThemeCSS=='LightColor'}}" src="../images/sysIcon_b15.png" class="sysIcon_b14"></image>
  140. <view class="textError1">抱歉,生成失败</view>
  141. <view class="textError2">可能网络不畅或使用了不适合的单词</view>
  142. </view>
  143. </view>