studyReport.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <div class="m-container">
  3. <img :src="imgList.topBanner" width="100%" class="topBanner" alt />
  4. <div class="card">
  5. <p class="title">
  6. <img :src="imgList.squrt" class="squrt" alt />
  7. 练习表现
  8. </p>
  9. <div class="cell" :class="one==1?'activce':''" @click="one=1">
  10. <img :src="imgList.excellent" class="icons" alt />
  11. 表现优异!你就是最闪亮的星!
  12. </div>
  13. <div class="cell" :class="one==2?'activce':''" @click="one=2">
  14. <img :src="imgList.good" class="icons" alt />
  15. 表现良好!你非常有潜力!
  16. </div>
  17. <div class="cell" :class="one==3?'activce':''" @click="one=3">
  18. <img :src="imgList.normal" class="icons" alt />
  19. 偶尔开小差,还要加油哦!
  20. </div>
  21. </div>
  22. <div class="card1">
  23. <p class="title">
  24. <img :src="imgList.squrt" class="squrt" alt />
  25. 节奏准确度
  26. </p>
  27. <div class="cell" :class="two==1?'activce':''" @click="two=1">
  28. <img :src="imgList.excellent" class="icons" alt />
  29. 节奏优异!堪称人肉节拍器!
  30. </div>
  31. <div class="cell" :class="two==2?'activce':''" @click="two=2">
  32. <img :src="imgList.good" class="icons" alt />
  33. 基本准确!注意时值饱满哦!
  34. </div>
  35. <div class="cell" :class="two==3?'activce':''" @click="two=3">
  36. <img :src="imgList.normal" class="icons" alt />
  37. 中等稳定!搭配练习节拍器会更好哦!
  38. </div>
  39. </div>
  40. <div class="card">
  41. <p class="title">
  42. <img :src="imgList.squrt" class="squrt" alt />
  43. 音符准确度
  44. </p>
  45. <div class="cell" :class="three==1?'activce':''" @click="three=1">
  46. <img :src="imgList.excellent" class="icons" alt />
  47. 百发百中!棒极了!
  48. </div>
  49. <div class="cell" :class="three==2?'activce':''" @click="three=2">
  50. <img :src="imgList.good" class="icons" alt />
  51. 准确度良好!距离完美只有一步之遥!
  52. </div>
  53. <div class="cell" :class="three==3?'activce':''" @click="three=3">
  54. <img :src="imgList.normal" class="icons" alt />
  55. 中等准确!稍加练习你一定会更好!
  56. </div>
  57. </div>
  58. <div class="card1">
  59. <p class="title">
  60. <img :src="imgList.squrt" class="squrt" alt />
  61. 演奏连贯度
  62. </p>
  63. <div class="cell" :class="four==1?'activce':''" @click="four=1">
  64. <img :src="imgList.excellent" class="icons" alt />
  65. 非常棒!你演奏一气呵成!
  66. </div>
  67. <div class="cell" :class="four==2?'activce':''" @click="four=2">
  68. <img :src="imgList.good" class="icons" alt />
  69. 良好!多注意乐句末多音符时值哦!
  70. </div>
  71. <div class="cell" :class="four==3?'activce':''" @click="four=3">
  72. <img :src="imgList.normal" class="icons" alt />
  73. 继续努力!告诉自己,你一定能行的!
  74. </div>
  75. </div>
  76. <div class="submit" @click="submietInfo">
  77. <img :src="imgList.btn" width="100%" alt />
  78. </div>
  79. </div>
  80. </template>
  81. <script>
  82. import { browser } from '@/common/common'
  83. import { addStudyReport } from "@/api/teacher";
  84. // addStudyReport
  85. export default {
  86. data() {
  87. return {
  88. imgList: {
  89. topBanner: require("@/assets/images/start/topBanner.png"),
  90. squrt: require("@/assets/images/start/squrt.png"),
  91. excellent: require("@/assets/images/start/excellent.png"),
  92. good: require("@/assets/images/start/good.png"),
  93. normal: require("@/assets/images/start/normal.png"),
  94. btn: require("@/assets/images/start/button.png")
  95. },
  96. one: "",
  97. two: "",
  98. three: "",
  99. four: "",
  100. json: {
  101. one: {
  102. "1": "保持日常练习,与老师良好的互动是进步的开始 !稳定的节奏就像是音乐的脉搏,搭配良好的音符准确度,也许将来会成为职业音乐家也不一定哦!",
  103. "2": "保持日常练习,与老师良好的互动是进步的开始 !稳定的节奏就像是音乐的脉搏,搭配良好的音符准确度,也许将来会成为职业音乐家也不一定哦!",
  104. "3": "专注是进步的基石,练习在“精”不在“长”,打开节拍器练习,认真读谱再演奏,高质量的练习会让你在课程中突飞猛进!"
  105. },
  106. two: {
  107. "1": "节奏是音乐的心跳,恭喜你有一颗良好跳动的音乐之心!保持你的优势,同时提升其他方面综合水平,相信未来的你会更好!",
  108. "2": "节奏是音乐的心跳,恭喜你有一颗良好跳动的音乐之心!保持你的优势,同时提升其他方面综合水平,相信未来的你会更好!",
  109. "3": "俗话说“错音不错节奏”,音乐的风格与律动与节奏有着离不开的关系,建议平时多使用节拍器练习,想要提升节奏稳定度,一定要“慢”不要“快”!"
  110. },
  111. three: {
  112. "1": "识谱能力非凡的你,在日常练习中可以针对其他环节做更多的练习,音乐是多元素的艺术表现方式,综合能力的提升才是硬道理!",
  113. "2": "识谱能力非凡的你,在日常练习中可以针对其他环节做更多的练习,音乐是多元素的艺术表现方式,综合能力的提升才是硬道理!",
  114. "3": "识谱慢?没关系!你知道吗,管乐器常用的音符一共才不超过36呦!熟悉它们的位置,分清线上和线间,包你读谱赛神仙!"
  115. },
  116. four: {
  117. "1": "你的演奏行云流水!这一定离不开你对节奏的掌控跟快速准确的识谱,现在可以在曲目演奏过程中加上一些你对音乐的理解,音乐的表达是重要的一环哦!",
  118. "2": "你的演奏行云流水!这一定离不开你对节奏的掌控跟快速准确的识谱,现在可以在曲目演奏过程中加上一些你对音乐的理解,音乐的表达是重要的一环哦!",
  119. "3": "你的演奏行云流水!这一定离不开你对节奏的掌控跟快速准确的识谱,现在可以在曲目演奏过程中加上一些你对音乐的理解,音乐的表达是重要的一环哦!"
  120. }
  121. },
  122. classGroupId:null,
  123. comment:null,
  124. item:null,
  125. };
  126. },
  127. created(){
  128. this.classGroupId = this.$route.query.classGroupId;
  129. this.token = localStorage.getItem('Authorization')
  130. this.token = 'bearer+585ca4d9-683b-49ab-8025-463e4b8a998f'
  131. if (!this.token || !this.classGroupId) {
  132. this.onAppBack()
  133. return
  134. }
  135. },
  136. methods:{
  137. submietInfo(){
  138. // console.log(this.one)
  139. // console.log(this.json.one[this.one])
  140. if(!this.one || !this.two ||!this.three || !this.four){
  141. this.$toast('请认真选择每一项')
  142. return;
  143. }
  144. this.comment = this.json.one[this.one]+this.json.two[this.two]+this.json.three[this.three]+this.json.four[this.four]
  145. this.item = this.one+','+this.two+','+this.three+','+this.four
  146. addStudyReport({classGroupId:this.classGroupId,item:this.item,comment:this.comment}).then(res=>{
  147. if(res.data.code == 200){
  148. this.$toast('提交成功')
  149. this.onAppBack()
  150. }else {
  151. this.$toast(res.data.msg)
  152. }
  153. })
  154. },
  155. onAppBack() {
  156. if(browser().android) {
  157. DAYA.postMessage(JSON.stringify({api: 'back'}))
  158. } else if(browser().iPhone) {
  159. window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api: 'back'}))
  160. }
  161. },
  162. }
  163. };
  164. </script>
  165. <style lang="less">
  166. .m-container {
  167. background: url("../../assets/images/start/bg.png") no-repeat;
  168. background-size: 100% 100%;
  169. width: 100%;
  170. min-height: 16.97rem;
  171. display: flex;
  172. flex-direction: column;
  173. align-items: center;
  174. .topBanner {
  175. position: relative;
  176. top: 0.1rem;
  177. }
  178. .card {
  179. display: flex;
  180. flex-direction: column;
  181. box-sizing: border-box;
  182. background: url("../../assets/images/start/topCard.png") no-repeat;
  183. background-size: 100% 100%;
  184. width: 3.38rem;
  185. height: 3.28rem;
  186. padding: 0.41rem 0.16rem 0.524rem;
  187. margin-bottom: 0.2rem;
  188. }
  189. .card1 {
  190. display: flex;
  191. flex-direction: column;
  192. box-sizing: border-box;
  193. background: url("../../assets/images/start/card.png") no-repeat;
  194. background-size: 100% 100%;
  195. width: 3.38rem;
  196. height: 3.28rem;
  197. padding: 0.41rem 0.16rem 0.524rem;
  198. margin-bottom: 0.2rem;
  199. }
  200. .title {
  201. display: flex;
  202. flex-direction: row;
  203. justify-content: flex-start;
  204. font-size: 0.22rem;
  205. height: 0.22rem;
  206. line-height: 0.22rem;
  207. margin-bottom: 0.365rem;
  208. .squrt {
  209. width: 0.05rem;
  210. height: 0.22rem;
  211. margin-right: 0.1rem;
  212. }
  213. }
  214. .cell.activce {
  215. border: 1px solid #28babd;
  216. color: #28babd;
  217. }
  218. .cell {
  219. width: 3.05rem;
  220. height: 0.42rem;
  221. line-height: 0.42rem;
  222. display: flex;
  223. flex-direction: row;
  224. align-items: center;
  225. border-radius: 21px;
  226. box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.14);
  227. background-color: #fff;
  228. font-size: 0.15rem;
  229. margin-bottom: 0.245rem;
  230. border: 1px solid transparent;
  231. .icons {
  232. width: 0.26rem;
  233. height: 0.26rem;
  234. margin: 0 0.105rem;
  235. }
  236. }
  237. .submit {
  238. width: 3.2rem;
  239. }
  240. }
  241. </style>