detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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>
  20. <u-tabs :list="list" item-width="50%" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs>
  21. </view>
  22. </view>
  23. <u-line color="#D6D6DB" />
  24. </view>
  25. <view class="intro" v-if="current == 0">
  26. <view class="content">
  27. <view class="top">本题库为广东省建筑施工企业安全生产管理人员安全生产考试第三批参考题库(可两行)</view>
  28. <image class="img" src="/static/intro.png" ></image>
  29. </view>
  30. </view>
  31. <view class="title-list" v-if="current == 1">
  32. <view class="content">
  33. <view class="list" v-for="(item1,index) in outline">
  34. <view class="module">
  35. .2Z106000 施工合同管理-模块标题
  36. </view>
  37. <view class="section" :data-index="index" @click="changeItem" :class="{up:!item1.showList}">
  38. 2Z106010 施工承发包的模式-2Z106020 施工合同...
  39. </view>
  40. <view class="article" v-if="item1.showList" :class="{active:index1 == 0}" v-for="(article,index1) in item1.list">
  41. 施工承发包模式-施工合同与物资采购合同二
  42. <navigator url="/pages2/bank/questionBankTest">
  43. <view v-if="index1 == 0" class="btn">试做</view>
  44. </navigator>
  45. </view>
  46. </view>
  47. <view class="list">
  48. <view class="section" :data-index="index" @click="changeItem">
  49. 2Z106010 施工承发包的模式-2Z106020 施工合同...
  50. </view>
  51. <view class="article" :class="{active:index1 == 0}" v-for="(article,index1) in 3">
  52. 施工承发包模式-施工合同与物资采购合同二
  53. <navigator url="/pages2/bank/questionBankTest">
  54. <view v-if="index1 == 0" class="btn">试做</view>
  55. </navigator>
  56. </view>
  57. </view>
  58. <view class="list">
  59. <view class="article" :class="{active:index1 == 0}" v-for="(article,index1) in 3">
  60. 施工承发包模式-施工合同与物资采购合同二
  61. <navigator url="/pages2/bank/questionBankTest">
  62. <view v-if="index1 == 0" class="btn">试做</view>
  63. </navigator>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="bottomBox">
  69. <view class="priceTag">¥ 999.00</view>
  70. <view style="display: flex;color: #FFFFFF;align-items: center;">
  71. <view class="btn1" @click="addCart">加购物车</view>
  72. <view class="btn2" @click="buy">立即购买</view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import { mapGetters } from 'vuex';
  79. export default {
  80. data() {
  81. return {
  82. list: [
  83. {
  84. name: '详情'
  85. },
  86. {
  87. name: '大纲'
  88. }
  89. ],
  90. current:0,
  91. outline:[{
  92. list:[1,2,3,4],
  93. showList:false,
  94. }]
  95. };
  96. },
  97. onUnload() {
  98. },
  99. computed: { ...mapGetters(['userInfo']) },
  100. onLoad(option) {
  101. },
  102. onShow() {
  103. },
  104. methods: {
  105. buy(){
  106. if(this.$method.isGoLogin()){
  107. return
  108. }
  109. this.$navTo.togo('/pages2/order/confirm_list');
  110. },
  111. addCart(){
  112. if(this.$method.isGoLogin()){
  113. return
  114. }
  115. uni.showToast({
  116. title: '添加成功',
  117. duration: 1000
  118. });
  119. },
  120. open(item){
  121. item.showChildren = !item.showChildren
  122. },
  123. change(index){
  124. this.current = index;
  125. },
  126. changeItem(e) {
  127. let index = e.currentTarget.dataset.index
  128. this.outline.forEach((arrItem,i) => {
  129. if(i == index) {
  130. arrItem.showList = !arrItem.showList
  131. }
  132. })
  133. }
  134. }
  135. };
  136. </script>
  137. <style >
  138. page{
  139. background-color: #EAEEF1;
  140. }
  141. </style>
  142. <style lang="scss" scope>
  143. .intro {
  144. background: #EAEEF1;
  145. padding:16rpx 16rpx 124rpx;
  146. .content {
  147. background:#fff;
  148. border-radius: 16rpx;;
  149. .top {
  150. border-radius: 16rpx;
  151. padding:32rpx 28rpx 16rpx;
  152. font-size: 30rpx;
  153. color: #333333;
  154. }
  155. .img {
  156. width:100%;
  157. }
  158. }
  159. }
  160. .title-list {
  161. background: #EAEEF1;
  162. padding:16rpx 16rpx 124rpx;
  163. .content {
  164. .list {
  165. background:#fff;
  166. margin-bottom:30rpx;
  167. overflow: hidden;
  168. border-radius: 16rpx;
  169. padding:10rpx 16rpx;
  170. .module {
  171. font-size: 30rpx;
  172. color: #333333;
  173. }
  174. .section {
  175. padding:30rpx 0;
  176. border-bottom: 1rpx solid #EEEEEE;
  177. font-size: 24rpx;
  178. color: #666666;
  179. &::before {
  180. content:'^';
  181. display: inline-block;
  182. margin-right:20rpx;
  183. }
  184. &.up {
  185. &::before {
  186. transform: rotate(180deg);
  187. }
  188. }
  189. }
  190. .article {
  191. height:80rpx;
  192. display: flex;
  193. align-items: center;
  194. margin-left:88rpx;
  195. font-size: 24rpx;
  196. color: #666666;
  197. border-bottom: 1rpx solid #EEEEEE;
  198. &:nth-last-of-type(1) {
  199. border:0;
  200. }
  201. &.active {
  202. color:#007AFF;
  203. .btn {
  204. width: 96rpx;
  205. height: 48rpx;
  206. line-height: 48rpx;
  207. text-align: center;
  208. color:#fff;
  209. font-size: 30rpx;
  210. border-radius:24rpx;
  211. background: #007AFF;
  212. margin-left:36rpx;
  213. border-radius: 24rpx;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }
  220. .btn2{
  221. width: 200rpx;
  222. height: 64rpx;
  223. background: linear-gradient(0deg, #FFB102, #FD644F);
  224. box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
  225. border-radius: 32rpx;
  226. line-height: 64rpx;
  227. text-align: center;
  228. }
  229. .btn1{
  230. width: 200rpx;
  231. height: 64rpx;
  232. background: linear-gradient(0deg, #015EEA, #00C0FA);
  233. border-radius: 32rpx;
  234. line-height: 64rpx;
  235. text-align: center;
  236. margin-right: 20rpx;
  237. }
  238. .bottomBox{
  239. position: fixed;
  240. bottom: 0;
  241. width: 100%;
  242. left: 0;
  243. height:98rpx ;
  244. background-color: #FFFFFF;
  245. display: flex;
  246. justify-content: space-between;
  247. align-items: center;
  248. padding: 0 30rpx;
  249. }
  250. .blackFont{
  251. color: #333333;
  252. margin: 0 4rpx;
  253. }
  254. .wk_icon{
  255. width: 24rpx;
  256. height: 24rpx;
  257. margin-right: 12rpx;
  258. }
  259. .noteTag{
  260. ont-size: 24rpx;
  261. font-family: PingFang SC;
  262. font-weight: 500;
  263. color: #999999;
  264. align-items: center;
  265. }
  266. .priceTag{
  267. font-size: 30rpx;
  268. font-family: PingFang SC;
  269. font-weight: bold;
  270. color: #FF2D55;
  271. }
  272. .titleTag{
  273. font-size: 32rpx;
  274. font-weight: bold;
  275. color: #333333;
  276. margin-left: 8rpx;
  277. }
  278. .yearTag{
  279. width: 80rpx;
  280. height: 32rpx;
  281. background: #EBF5FF;
  282. border: 2rpx solid #007AFF;
  283. border-radius: 16rpx;
  284. font-size: 24rpx;
  285. color: #007AFF;
  286. text-align: center;
  287. line-height: 32rpx;
  288. }
  289. .itemBox{
  290. background: #FFFFFF;
  291. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  292. border-radius: 24rpx;
  293. width: 100%;
  294. padding: 20rpx;
  295. margin-bottom: 20rpx;
  296. }
  297. </style>