index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view>
  3. <u-navbar :is-back="false" title="选课中心" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
  4. <view class="slot-wrap">
  5. <image src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
  6. </view>
  7. </u-navbar>
  8. <view>
  9. <view style="position: fixed;width: 100%;z-index: 999;background-color: #FFFFFF;">
  10. <u-line color="#D6D6DB" />
  11. <view style="display: flex;justify-content: space-between;height: 78rpx;line-height: 78rpx;padding: 0 30rpx;font-size: 32rpx;">
  12. <view style="color: #666666;">考前培训:建造师-二级</view>
  13. <view style="color: #007AFF;">重新选择</view>
  14. </view>
  15. <u-line color="#D6D6DB" />
  16. <view>
  17. <view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
  18. </view>
  19. <u-line color="#D6D6DB" />
  20. <view class="menuSel" v-show="current==0">
  21. <scroll-view class="r_sliper" scroll-x="true" >
  22. <view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
  23. <view :class="menuIndex==index?'r_t1':'r_t2'" @click="cMenu(index)">
  24. {{item}}
  25. </view>
  26. </view>
  27. </scroll-view>
  28. </view>
  29. <view class="menuSel" v-show="current==1">
  30. <scroll-view class="r_sliper" scroll-x="true" >
  31. <view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
  32. <view :class="menuIndex1==index?'r_t1':'r_t2'" @click="cMenu1(index)">
  33. {{item}}
  34. </view>
  35. </view>
  36. </scroll-view>
  37. </view>
  38. </view>
  39. <view v-show="current==0">
  40. <view class="listBox">
  41. <navigator url="/pages2/course/detail" v-for="(item,index) in array" :key="index" >
  42. <view class="itemBox">
  43. <image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
  44. <view style="display: flex;margin-top: 13rpx;">
  45. <view class="yearTag">2020</view>
  46. <view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
  47. </view>
  48. <view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
  49. <view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
  50. 共 <text class="blackFont">6</text> 科 <text class="blackFont">120</text> 节 <text class="blackFont">60</text> 学时</view>
  51. <view class="priceTag">¥ 999.00</view>
  52. </view>
  53. </view>
  54. </navigator>
  55. </view>
  56. </view>
  57. <view v-show="current==1">
  58. <view class="listBox">
  59. <navigator url="/pages2/bank/detail" v-for="(item,index) in array" :key="index" >
  60. <view class="itemBox">
  61. <image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
  62. <view style="display: flex;margin-top: 13rpx;">
  63. <view class="yearTag">2020</view>
  64. <view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
  65. </view>
  66. <view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
  67. <view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
  68. 共 <text class="blackFont">6</text> 张卷 <text class="blackFont">120</text>道题 </view>
  69. <view class="priceTag">¥ 999.00</view>
  70. </view>
  71. </view>
  72. </navigator>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import { mapGetters } from 'vuex';
  80. export default {
  81. components: {
  82. },
  83. data() {
  84. return {
  85. list:[
  86. {
  87. name: '网课'
  88. },
  89. {
  90. name: '题库通'
  91. }
  92. ],
  93. array:['全部','建设工程施工管理','机电全科','机电工程管理与实','机电全科','全科'],
  94. current:0,
  95. menuIndex:0,
  96. menuIndex1:0
  97. };
  98. },
  99. onPullDownRefresh(){
  100. },
  101. onLoad(option) {
  102. },
  103. onShow() {
  104. /* if(this.current === 2 && this.$method.isLogin()){
  105. this.$refs.refMy.init();
  106. } */
  107. },
  108. methods: {
  109. cMenu(index){
  110. this.menuIndex = index;
  111. },
  112. cMenu1(index){
  113. this.menuIndex1 = index;
  114. },
  115. change(index){
  116. this.current = index;
  117. }
  118. },
  119. onReachBottom() {},
  120. computed: { ...mapGetters(['userInfo']) }
  121. };
  122. </script>
  123. <style >
  124. ::-webkit-scrollbar{
  125. width: 0;
  126. height: 0;
  127. color: transparent
  128. }
  129. page{
  130. background-color: #EAEEF1;
  131. }
  132. </style>
  133. <style scoped>
  134. .blackFont{
  135. color: #333333;
  136. margin: 0 4rpx;
  137. }
  138. .wk_icon{
  139. width: 24rpx;
  140. height: 24rpx;
  141. margin-right: 12rpx;
  142. }
  143. .noteTag{
  144. ont-size: 24rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #999999;
  148. align-items: center;
  149. }
  150. .priceTag{
  151. font-size: 30rpx;
  152. font-family: PingFang SC;
  153. font-weight: bold;
  154. color: #FF2D55;
  155. }
  156. .titleTag{
  157. font-size: 32rpx;
  158. font-weight: bold;
  159. color: #333333;
  160. margin-left: 8rpx;
  161. }
  162. .yearTag{
  163. width: 80rpx;
  164. height: 32rpx;
  165. background: #EBF5FF;
  166. border: 2rpx solid #007AFF;
  167. border-radius: 16rpx;
  168. font-size: 24rpx;
  169. color: #007AFF;
  170. text-align: center;
  171. line-height: 32rpx;
  172. }
  173. .itemBox{
  174. background: #FFFFFF;
  175. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  176. border-radius: 24rpx;
  177. width: 100%;
  178. padding: 20rpx;
  179. margin-bottom: 20rpx;
  180. }
  181. .listBox{
  182. background-color: #EAEEF1;
  183. padding: 30rpx;
  184. position: relative;
  185. top: 240rpx;
  186. }
  187. .menuSel{
  188. width: 100%;
  189. height: 70rpx;
  190. background: #EAEEF1;
  191. white-space:nowrap;
  192. overflow: hidden;
  193. }
  194. .r_sliper{
  195. padding: 0 20rpx;
  196. }
  197. .r_t1{
  198. height: 48rpx;
  199. background: #007AFF;
  200. border-radius: 16rpx;
  201. padding: 3rpx 8rpx;
  202. margin-top: 11rpx;
  203. color: #FFFFFF;
  204. }
  205. .r_t2{
  206. height: 48rpx;
  207. background: #FFFFFF;
  208. border: 2rpx solid #EEEEEE;
  209. border-radius: 16rpx;
  210. padding: 3rpx 8rpx;
  211. margin-top: 11rpx;
  212. color: #666666;
  213. }
  214. </style>