detail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view>
  3. <view style="background-color: #FFFFFF;">
  4. <view >
  5. <image src="/static/login_bg.jpg" style="height: 461rpx;width: 100%;"></image>
  6. <view style="padding:20rpx">
  7. <view style="display: flex;margin-top: 13rpx;">
  8. <view class="yearTag">2020</view>
  9. <view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
  10. </view>
  11. <view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
  12. <view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
  13. 共 <text class="blackFont">6</text> 张卷 <text class="blackFont">1200</text> 道题 </view>
  14. </view>
  15. </view>
  16. </view>
  17. <u-line color="#D6D6DB" />
  18. <view>
  19. <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>
  20. </view>
  21. <u-line color="#D6D6DB" />
  22. </view>
  23. <view style="padding: 20rpx;">
  24. <view class="content">
  25. 10月18日起,每周一20:00上直播课,课程持续到
  26. 10月30日止。
  27. </view>
  28. </view>
  29. <view class="bottomBox">
  30. <view class="priceTag">¥ 999.00</view>
  31. <view style="display: flex;color: #FFFFFF;align-items: center;">
  32. <view class="btn1" @click="addCart">加购物车</view>
  33. <view class="btn2" @click="buy">立即购买</view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { mapGetters } from 'vuex';
  40. export default {
  41. data() {
  42. return {
  43. list: [
  44. {
  45. name: '详情'
  46. },
  47. {
  48. name: '大纲'
  49. }
  50. ],
  51. current:0
  52. };
  53. },
  54. onUnload() {
  55. },
  56. computed: { ...mapGetters(['userInfo']) },
  57. onLoad(option) {
  58. },
  59. onShow() {
  60. },
  61. methods: {
  62. buy(){
  63. if(this.$method.isGoLogin()){
  64. return
  65. }
  66. this.$navTo.togo('/pages2/order/confirm_list');
  67. },
  68. addCart(){
  69. if(this.$method.isGoLogin()){
  70. return
  71. }
  72. uni.showToast({
  73. title: '添加成功',
  74. duration: 1000
  75. });
  76. },
  77. open(item){
  78. item.showChildren = !item.showChildren
  79. },
  80. change(index){
  81. this.current = index;
  82. }
  83. }
  84. };
  85. </script>
  86. <style >
  87. page{
  88. background-color: #EAEEF1;
  89. }
  90. </style>
  91. <style scope>
  92. .content{
  93. background-color: #FFFFFF;
  94. }
  95. .btn2{
  96. width: 200rpx;
  97. height: 64rpx;
  98. background: linear-gradient(0deg, #FFB102, #FD644F);
  99. box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
  100. border-radius: 32rpx;
  101. line-height: 64rpx;
  102. text-align: center;
  103. }
  104. .btn1{
  105. width: 200rpx;
  106. height: 64rpx;
  107. background: linear-gradient(0deg, #015EEA, #00C0FA);
  108. border-radius: 32rpx;
  109. line-height: 64rpx;
  110. text-align: center;
  111. margin-right: 20rpx;
  112. }
  113. .bottomBox{
  114. position: fixed;
  115. bottom: 0;
  116. width: 100%;
  117. left: 0;
  118. height:98rpx ;
  119. background-color: #FFFFFF;
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. padding: 0 30rpx;
  124. }
  125. .blackFont{
  126. color: #333333;
  127. margin: 0 4rpx;
  128. }
  129. .wk_icon{
  130. width: 24rpx;
  131. height: 24rpx;
  132. margin-right: 12rpx;
  133. }
  134. .noteTag{
  135. ont-size: 24rpx;
  136. font-family: PingFang SC;
  137. font-weight: 500;
  138. color: #999999;
  139. align-items: center;
  140. }
  141. .priceTag{
  142. font-size: 30rpx;
  143. font-family: PingFang SC;
  144. font-weight: bold;
  145. color: #FF2D55;
  146. }
  147. .titleTag{
  148. font-size: 32rpx;
  149. font-weight: bold;
  150. color: #333333;
  151. margin-left: 8rpx;
  152. }
  153. .yearTag{
  154. width: 80rpx;
  155. height: 32rpx;
  156. background: #EBF5FF;
  157. border: 2rpx solid #007AFF;
  158. border-radius: 16rpx;
  159. font-size: 24rpx;
  160. color: #007AFF;
  161. text-align: center;
  162. line-height: 32rpx;
  163. }
  164. .itemBox{
  165. background: #FFFFFF;
  166. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  167. border-radius: 24rpx;
  168. width: 100%;
  169. padding: 20rpx;
  170. margin-bottom: 20rpx;
  171. }
  172. </style>