my-coursedetail.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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-addr-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. <view class="publish-button-wrapper">
  141. <button class="publish-button" @click="publishButton">{{buttonMessage}}</button>
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. import { mapState } from 'vuex';
  147. export default {
  148. name: 'my-requiredetail',
  149. data() {
  150. return {
  151. };
  152. },
  153. props: {
  154. item: {
  155. type: Object
  156. },
  157. location: {
  158. type: Array
  159. },
  160. marker: {
  161. type: Array
  162. },
  163. timeAM: {
  164. type: Array
  165. },
  166. timePM: {
  167. type: Array
  168. },
  169. timeEvening: {
  170. type: Array
  171. },
  172. collect: {
  173. type: Boolean,
  174. default: false
  175. },
  176. isShowCollect: {
  177. type: Boolean,
  178. default: false
  179. },
  180. isShowPrivate: {
  181. type: Boolean,
  182. default: false
  183. },
  184. buttonMessage: {
  185. type: String
  186. }
  187. },
  188. methods: {
  189. // 点击收藏
  190. collecting() {
  191. // 触发外界通过 @click 绑定的 click 事件处理函数
  192. this.$emit('collecting')
  193. },
  194. publishButton() {
  195. this.$emit('publishButton')
  196. }
  197. },
  198. }
  199. </script>
  200. <!-- 设置页面背景 -->
  201. <style lang="scss">
  202. page{
  203. height: 100%;
  204. // background-color: #FFF;
  205. }
  206. </style>
  207. <style lang="scss" scoped>
  208. .contain {
  209. //background-color: #FFF2CC;
  210. background-color: #f0f0f0;
  211. // border-radius: 10%;
  212. border-radius: 20rpx;
  213. height: 100%;
  214. .contain-item {
  215. margin-bottom: 20rpx;
  216. }
  217. .contain-addr-item{
  218. margin-bottom: 20rpx;
  219. width: 96%;
  220. }
  221. .contain-text {
  222. font-weight: 700;
  223. color: #bbb;
  224. }
  225. .map {
  226. width: 100%;
  227. }
  228. }
  229. .tr-container{
  230. display: flex;
  231. position: relative;
  232. width: 96%;
  233. flex-direction: column;
  234. font-size: 26rpx;
  235. /* border: 1rpx solid gray; */
  236. margin: -10px 20rpx;
  237. margin-bottom: 20px;
  238. }
  239. .tr_1 {
  240. display: flex;
  241. position: relative;
  242. height: 80rpx;
  243. line-height: 80rpx;
  244. }
  245. .tr_2{
  246. display: block;
  247. height: 80rpx;
  248. line-height: 80rpx;
  249. }
  250. .th_0,
  251. .th_1,
  252. .th_2,
  253. .th2_0,
  254. .th2_1,
  255. .th2_2{
  256. width: 12%;
  257. height: 80rpx;
  258. line-height: 80rpx;
  259. border-right: 1rpx solid gray;
  260. border-bottom: 1rpx solid gray;
  261. text-align: center;
  262. }
  263. .th_0,
  264. .th_1,
  265. .th_2{
  266. border-top: 1rpx solid gray;
  267. }
  268. .th_0,
  269. .th2_0{
  270. border-left: 1rpx solid gray;
  271. }
  272. .th2_0{
  273. float: left;
  274. width: 12%;
  275. height: 80rpx;
  276. line-height: 80rpx;
  277. text-align: center;
  278. /* background-color: greenyellow; */
  279. }
  280. // 底部按钮
  281. .publish-button-wrapper{
  282. margin-top: 10rpx;
  283. height: 130rpx;
  284. }
  285. .publish-button {
  286. //background-color: #E2F0D9;
  287. // background-color: #8FAADC;
  288. background-color: #35b882;
  289. color: white;
  290. width: 200rpx;
  291. border-radius: 50rpx;
  292. margin-bottom: 60rpx;
  293. }
  294. /* 教员头像 */
  295. .teachImg{
  296. width: 250rpx;
  297. height: 250rpx;
  298. border-radius: 20rpx;
  299. }
  300. </style>