my-coursedetail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="contain">
  3. <uni-row>
  4. <view style="height: 20rpx;"></view>
  5. </uni-row>
  6. <uni-row>
  7. <uni-col :push="1">
  8. <view class="contain-item"><text class="contain-text">课程号:</text>{{item.courseId}}</view>
  9. </uni-col>
  10. </uni-row>
  11. <uni-row>
  12. <uni-col :span="15" :push="1">
  13. <uni-row>
  14. <uni-col>
  15. <view class="contain-item"><text class="contain-text">教员ID:</text>{{item.uid}}</view>
  16. </uni-col>
  17. </uni-row>
  18. <uni-row>
  19. <uni-col>
  20. <view class="contain-item"><text class="contain-text">教员:</text>{{item.name}}</view>
  21. </uni-col>
  22. </uni-row>
  23. <uni-row>
  24. <uni-col>
  25. <view class="contain-item"><text class="contain-text">教员性别:</text>{{item.sex}}</view>
  26. </uni-col>
  27. </uni-row>
  28. <uni-row>
  29. <uni-col>
  30. <view class="contain-item"><text class="contain-text">教龄:</text>{{item.teachAge}}年</view>
  31. </uni-col>
  32. </uni-row>
  33. <uni-row>
  34. <uni-col>
  35. <view class="contain-item"><text class="contain-text">浏览量:</text>{{item.viewedCount}}次</view>
  36. </uni-col>
  37. </uni-row>
  38. </uni-col>
  39. <uni-col :span="8">
  40. <uni-row>
  41. <image class="teachImg" :mode="aspectFit" :src="item.profilePhoto"></image>
  42. </uni-row>
  43. <uni-row v-if="isShowCollect">
  44. <uni-fav :checked="collect" class="favBtn" :circle="true" bg-color="#dd524d"
  45. bg-color-checked="#007aff" fg-color="#ffffff" fg-color-checked="#ffffff" @click="collecting" />
  46. </uni-row>
  47. </uni-col>
  48. </uni-row>
  49. <uni-row>
  50. <view class="contain-item">
  51. <map :longitude="location[1]" :latitude="location[0]" :markers="marker" class="map"></map>
  52. </view>
  53. </uni-row>
  54. <uni-row>
  55. <uni-col :push="1">
  56. <view class="contain-item"><text class="contain-text">辅导科目:</text>{{item.subject}}</view>
  57. </uni-col>
  58. </uni-row>
  59. <uni-row>
  60. <uni-col :push="1">
  61. <view class="contain-item"><text class="contain-text">教员地址:</text>{{item.location}}</view>
  62. </uni-col>
  63. </uni-row>
  64. <uni-row>
  65. <uni-col :push="1">
  66. <text class="contain-text">课程时间:</text>
  67. </uni-col>
  68. </uni-row>
  69. <view class="tr-container">
  70. <view class="tr_1">
  71. <text class="th_0" decode="true">&ensp;&ensp;&ensp;&ensp;</text>
  72. <text class="th_1">周一</text>
  73. <text class="th_1">周二</text>
  74. <text class="th_1">周三</text>
  75. <text class="th_1">周四</text>
  76. <text class="th_1">周五</text>
  77. <text class="th_1">周六</text>
  78. <text class="th_1">周日</text>
  79. </view>
  80. <view class="tr_2">
  81. <checkbox-group>
  82. <view class="th2_0">上午</view>
  83. <label v-for="item in timeAM" :key="item.value">
  84. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  85. </label>
  86. </checkbox-group>
  87. </view>
  88. <view class="tr_2">
  89. <checkbox-group>
  90. <view class="th2_0">下午</view>
  91. <label v-for="item in timePM" :key="item.value">
  92. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  93. </label>
  94. </checkbox-group>
  95. </view>
  96. <view class="tr_2">
  97. <checkbox-group>
  98. <view class="th2_0">晚上</view>
  99. <label v-for="item in timeEvening" :key="item.value">
  100. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  101. </label>
  102. </checkbox-group>
  103. </view>
  104. </view>
  105. <uni-row>
  106. <uni-col :span="12" :push="1">
  107. <view class="contain-item"><text class="contain-text">教员类型:</text>{{item.teacherType}}</view>
  108. </uni-col>
  109. <uni-col :span="12">
  110. <view><text class="contain-text">教员学历:</text>{{item.education}}</view>
  111. </uni-col>
  112. </uni-row>
  113. <uni-row>
  114. <uni-col :push="1">
  115. <view class="contain-item"><text class="contain-text">上课方式:</text>{{item.mode}}</view>
  116. </uni-col>
  117. </uni-row>
  118. <uni-row>
  119. <uni-col :push="1">
  120. <view class="contain-item"><text class="contain-text">成功经验:</text>{{item.experience}}</view>
  121. </uni-col>
  122. </uni-row>
  123. <uni-row>
  124. <uni-col :push="1">
  125. <view class="contain-item"><text class="contain-text">自我描述:</text>{{item.introduce}}</view>
  126. </uni-col>
  127. </uni-row>
  128. <view v-if="isShowPrivate">
  129. <uni-row>
  130. <uni-col :push="1">
  131. <view class="contain-item"><text class="contain-text">审核不通过原因:</text>{{item.verifyRefuseReason || '暂无'}}</view>
  132. </uni-col>
  133. </uni-row>
  134. <uni-row>
  135. <uni-col :push="1">
  136. <view class="contain-item"><text class="contain-text">本课程发布日期:</text>{{item.datetime}}</view>
  137. </uni-col>
  138. </uni-row>
  139. </view>
  140. <button class="publish-button" @click="publishButton">{{buttonMessage}}</button>
  141. </view>
  142. </template>
  143. <script>
  144. import { mapState } from 'vuex';
  145. export default {
  146. name: 'my-requiredetail',
  147. data() {
  148. return {
  149. };
  150. },
  151. props: {
  152. item: {
  153. type: Object
  154. },
  155. location: {
  156. type: Array
  157. },
  158. marker: {
  159. type: Array
  160. },
  161. timeAM: {
  162. type: Array
  163. },
  164. timePM: {
  165. type: Array
  166. },
  167. timeEvening: {
  168. type: Array
  169. },
  170. collect: {
  171. type: Boolean,
  172. default: false
  173. },
  174. isShowCollect: {
  175. type: Boolean,
  176. default: false
  177. },
  178. isShowPrivate: {
  179. type: Boolean,
  180. default: false
  181. },
  182. buttonMessage: {
  183. type: String
  184. }
  185. },
  186. methods: {
  187. // 点击收藏
  188. collecting() {
  189. // 触发外界通过 @click 绑定的 click 事件处理函数
  190. this.$emit('collecting')
  191. },
  192. publishButton() {
  193. this.$emit('publishButton')
  194. }
  195. },
  196. }
  197. </script>
  198. <style lang="scss" scoped>
  199. .contain {
  200. background-color: #FFF2CC;
  201. border-radius: 10%;
  202. height: 100%;
  203. .contain-item {
  204. margin-bottom: 20rpx;
  205. }
  206. .contain-text {
  207. font-weight: 700;
  208. color: #bbb;
  209. }
  210. .map {
  211. width: 100%;
  212. }
  213. }
  214. .tr-container{
  215. display: flex;
  216. position: relative;
  217. width: 96%;
  218. flex-direction: column;
  219. font-size: 26rpx;
  220. /* border: 1rpx solid gray; */
  221. margin: -10px 20rpx;
  222. margin-bottom: 20px;
  223. }
  224. .tr_1 {
  225. display: flex;
  226. position: relative;
  227. height: 80rpx;
  228. line-height: 80rpx;
  229. }
  230. .tr_2{
  231. display: block;
  232. height: 80rpx;
  233. line-height: 80rpx;
  234. }
  235. .th_0,
  236. .th_1,
  237. .th_2,
  238. .th2_0,
  239. .th2_1,
  240. .th2_2{
  241. width: 12%;
  242. height: 80rpx;
  243. line-height: 80rpx;
  244. border-right: 1rpx solid gray;
  245. border-bottom: 1rpx solid gray;
  246. text-align: center;
  247. }
  248. .th_0,
  249. .th_1,
  250. .th_2{
  251. border-top: 1rpx solid gray;
  252. }
  253. .th_0,
  254. .th2_0{
  255. border-left: 1rpx solid gray;
  256. }
  257. .th2_0{
  258. float: left;
  259. width: 12%;
  260. height: 80rpx;
  261. line-height: 80rpx;
  262. text-align: center;
  263. /* background-color: greenyellow; */
  264. }
  265. .publish-button {
  266. background-color: #E2F0D9;
  267. width: 100%;
  268. border-radius: 25%;
  269. }
  270. /* 教员头像 */
  271. .teachImg{
  272. width: 250rpx;
  273. height: 250rpx;
  274. border-radius: 20rpx;
  275. }
  276. </style>