courseModel.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <div class="courseModel" style="margin-top: 12px;">
  3. <template v-if="courseViewType == 1 && courseShowInfo.length > 0">
  4. <div class="yunTrain">
  5. <img :src="trainBg" />
  6. <div class="toolText">
  7. <p class="toolTitle">服务</p>
  8. <p class="toolDate" v-if="serviceValidDate">
  9. 服务有效期:{{ serviceValidDate }}
  10. </p>
  11. </div>
  12. </div>
  13. </template>
  14. <h2
  15. class="titles"
  16. v-if="
  17. (courseViewType == 0 || courseViewType == 2) && courseInfo.length > 0
  18. "
  19. >
  20. <img :src="trainSmallBg" />
  21. <span>乐团课程</span>
  22. </h2>
  23. <template v-if="courseInfo">
  24. <!-- 可选课程信息集合 -->
  25. <div
  26. class="section"
  27. v-if="
  28. (courseViewType == 0 || courseViewType == 2) && courseInfo.length > 0
  29. "
  30. >
  31. <el-row class="title-row">
  32. <el-col :span="12">课程类型</el-col>
  33. <!-- 原价 -->
  34. <el-col :span="5" :offset="1" style="text-align: right;">时长</el-col>
  35. <el-col :span="6" style="text-align: right;">价格</el-col>
  36. </el-row>
  37. <el-row
  38. class="option-row"
  39. @click.native="onCheckItem(item)"
  40. v-for="(item, index) in courseInfo"
  41. :key="index"
  42. >
  43. <el-col :span="12">
  44. <i
  45. class="check_default"
  46. :class="[
  47. item.isStatus ? 'check_active' : '',
  48. item.isStudentOptional ? 'disabled' : ''
  49. ]"
  50. ></i
  51. ><template v-if="item.courseType == 'PROJECT'">{{
  52. item.name
  53. }}</template
  54. ><template v-else>{{ item.courseType | coursesType }}</template>
  55. </el-col>
  56. <el-col :span="6">
  57. <span style="color: #AAA; font-size: 12px;"
  58. >{{ item.courseTotalMinuties }}分钟</span
  59. >
  60. </el-col>
  61. <el-col :span="6">
  62. <span style="color: #1A1A1A"
  63. >¥{{ (remissionCourseFeeStatus ? 0 : item.courseCurrentPrice) | moneyFormat }}</span
  64. >
  65. </el-col>
  66. </el-row>
  67. </div>
  68. <!-- 所有不可选的课程合集 courseShowStatus -->
  69. <div
  70. class="section"
  71. v-if="courseViewType == 1 && courseShowInfo.length > 0"
  72. >
  73. <el-row
  74. class="option-row"
  75. v-for="(item, index) in courseShowInfo"
  76. :key="index"
  77. @click.native="onCheckItem(item)"
  78. >
  79. <el-col :span="16">
  80. <i
  81. class="check_default"
  82. :class="[
  83. item.isStatus ? 'check_active' : '',
  84. item.isStudentOptional ? 'disabled' : ''
  85. ]"
  86. ></i>
  87. <span style="display: flex; align-items: center;">
  88. <template v-if="item.courseType == 'PROJECT'"
  89. >{{ chargeTypeName }} </template
  90. ><template v-else>{{ item.courseType | coursesType }}</template>
  91. </span>
  92. <el-icon
  93. v-if="item.courseType == 'PROJECT'"
  94. name="question"
  95. @click.stop="onQuestions('amr')"
  96. />
  97. </el-col>
  98. <!-- <el-col :span="5">
  99. <del style="color: #AAA; font-size: 12px;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
  100. </el-col> -->
  101. <el-col :span="8">
  102. <span style="color: #1A1A1A"
  103. >¥{{ item.courseCurrentPrice | moneyFormat }}</span
  104. >
  105. </el-col>
  106. </el-row>
  107. </div>
  108. <!-- 赠送课程 -->
  109. <div class="section" v-if="memberCourseShowFlag && courseViewType == 2">
  110. <el-row class="title-row">
  111. <el-col :span="12">赠送课程</el-col>
  112. <el-col :span="5" :offset="1" style="text-align: right;">原价</el-col>
  113. <el-col :span="6" style="text-align: right;">现价</el-col>
  114. </el-row>
  115. <el-row
  116. class="option-row"
  117. style="line-height: 20px; padding-top: 8px; font-size: 12px;"
  118. v-for="member in memberCoursePrice"
  119. :key="member.name"
  120. >
  121. <el-col
  122. :span="12"
  123. style="padding-left: 24px;color: #808080; position: relative"
  124. ><i class="small_point"></i> {{ member.name }}</el-col
  125. >
  126. <el-col :span="6"
  127. ><del style="color: #AAA; font-size: 12px;"
  128. >¥{{ member.price | moneyFormat }}</del
  129. ></el-col
  130. >
  131. <el-col :span="6"
  132. ><span style="color: #1A1A1A">¥{{ 0 | moneyFormat }}</span></el-col
  133. >
  134. </el-row>
  135. </div>
  136. </template>
  137. </div>
  138. </template>
  139. <script>
  140. // import videoPlayer from '@/components/video'
  141. export default {
  142. name: "courseModel",
  143. props: {
  144. courseViewType: [Number, String],
  145. courseShowInfo: Array, // 无用
  146. courseInfo: Array,
  147. toolsPackage: Array, // 无用
  148. trainSmallBg: String,
  149. cloudTeacherFee: [Number, String], // 无用
  150. serviceValidDate: String,
  151. chargeTypeName: String,
  152. memberCoursePrice: Array,
  153. memberCourseShowFlag: Boolean,
  154. remissionCourseFeeStatus: Boolean
  155. },
  156. components: {
  157. // videoPlayer
  158. },
  159. data() {
  160. return {
  161. trainBg: require("../../../assets/images/musicGroup/yunTrain_bg.png"),
  162. videoStatus: false
  163. };
  164. },
  165. methods: {
  166. onCheckItem(item) {
  167. this.$emit("onCourseChange", item);
  168. },
  169. onQuestions(item) {
  170. this.$emit("onQuestions", item);
  171. }
  172. }
  173. };
  174. </script>
  175. <style lang="less" scoped>
  176. .giveTitle {
  177. margin-top: 16px;
  178. padding-top: 8px;
  179. color: #1a1a1a;
  180. font-size: 14px;
  181. padding-left: 24px;
  182. }
  183. .small_point {
  184. position: absolute;
  185. left: 8px;
  186. top: 7px;
  187. width: 6px;
  188. height: 6px;
  189. background: #01c1b5;
  190. border-radius: 50%;
  191. }
  192. @import url("./signUpPayment.less");
  193. </style>