confirm_list.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <template>
  2. <view>
  3. <view style="padding: 30rpx;padding-bottom: 98rpx;">
  4. <view v-for="(item,index) in list" :key="index" >
  5. <view class="item">
  6. <view style="display: flex;justify-content: space-between;padding-bottom: 15rpx;">
  7. <image src="/static/login_bg.jpg" style="height: 134rpx;width: 388rpx;border-radius: 16rpx;"></image>
  8. <view style="margin-left: 20rpx;">
  9. <view style="color: #333333;font-size: 30rpx;font-weight: bold;">
  10. 2020年二建建筑工程管理与实
  11. 务(实务专题班)
  12. </view>
  13. <view class="priceTag">
  14. ¥ 999.00
  15. </view>
  16. </view>
  17. </view>
  18. <u-line color="#D6D6DB" />
  19. <view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
  20. <view style="color: #666666;font-size: 24rpx;">选择班级</view>
  21. <view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="bottomBox">
  27. <view class="priceTag">¥ 999.00</view>
  28. <view style="display: flex;color: #FFFFFF;align-items: center;">
  29. <view class="btn2" @click="goBuy()">确认购买</view>
  30. </view>
  31. </view>
  32. <u-popup v-model="show" mode="bottom"border-radius="40">
  33. <view class="popup_box">
  34. <view style="margin-bottom: 20rpx;">
  35. <view class="line1"></view>
  36. <view class="grade">选择班级</view>
  37. </view>
  38. <u-line color="#D6D6DB" />
  39. <view>
  40. <scroll-view scroll-y="true" style="height: 500rpx;">
  41. <view>
  42. <u-checkbox-group @change="checkboxGroupChange">
  43. <view v-for="(item, index) in list" :key="index" >
  44. <view style="display: flex;align-items: center;padding: 20rpx;">
  45. <view>
  46. <u-checkbox
  47. shape="circle"
  48. @change="checkboxChange"
  49. v-model="item.checked"
  50. :name="item.name"
  51. ></u-checkbox>
  52. </view>
  53. <view :class="item.checked?'white-box blue-box':'white-box'" >
  54. <view>
  55. <view class="blackTxt">2021年第1期二级建造师继续教育选修课(市政)标题过长换行显示</view>
  56. <view class="redTxt">有效期至:2021/11/30</view>
  57. <view class="redTxt">本班还剩41天将结束学习</view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </u-checkbox-group>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. <view class="confrim-btn">
  67. <view class="okBtn">确定</view>
  68. </view>
  69. </view>
  70. </u-popup>
  71. <u-popup v-model="show1" mode="bottom"border-radius="40">
  72. <view class="popup_box">
  73. <view style="margin-bottom: 20rpx;">
  74. <view class="line1"></view>
  75. <view class="grade">选择考期/地区</view>
  76. </view>
  77. <u-line color="#D6D6DB" />
  78. <view style="display: flex;height: 500rpx;">
  79. <view style="width: 50%;">
  80. <view class="topTxt">考期</view>
  81. <view>
  82. <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
  83. <picker-view-column>
  84. <view class="picker-item" v-for="(item,index) in list1" :key="index">{{item.label}}</view>
  85. </picker-view-column>
  86. </picker-view>
  87. </view>
  88. </view>
  89. <view style="width: 50%;">
  90. <view class="topTxt">地区</view>
  91. <view>
  92. <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
  93. <picker-view-column>
  94. <view class="picker-item" v-for="(item,index) in list2" :key="index">{{item.label}}</view>
  95. </picker-view-column>
  96. <picker-view-column>
  97. <view class="picker-item" v-for="(item,index) in list3" :key="index">{{item.label}}</view>
  98. </picker-view-column>
  99. </picker-view>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="confrim-btn">
  104. <view class="okBtn">确定</view>
  105. </view>
  106. </view>
  107. </u-popup>
  108. </view>
  109. </template>
  110. <script>
  111. import { mapGetters } from 'vuex';
  112. export default {
  113. components: {
  114. },
  115. data() {
  116. return {
  117. indicatorStyle: `height: 50px;`,
  118. showArea:true,
  119. show1:false,
  120. list:[{
  121. name: 'apple',
  122. checked: false,
  123. disabled: false
  124. },
  125. {
  126. name: 'banner',
  127. checked: false,
  128. disabled: false
  129. },
  130. {
  131. name: 'orange',
  132. checked: false,
  133. disabled: false
  134. }],
  135. list1:[
  136. {
  137. value: '1',
  138. label: '2021年6月'
  139. },
  140. {
  141. value: '2',
  142. label: '2021年7月'
  143. }
  144. ],
  145. list1:[
  146. {
  147. value: '1',
  148. label: '2021年6月'
  149. },
  150. {
  151. value: '2',
  152. label: '2021年7月'
  153. },
  154. {
  155. value: '3',
  156. label: '2021年8月'
  157. },
  158. {
  159. value: '4',
  160. label: '2021年9月'
  161. }
  162. ],
  163. list2:[
  164. {
  165. value: '1',
  166. label: '广东'
  167. },
  168. {
  169. value: '2',
  170. label: '北京'
  171. }
  172. ],
  173. list3:[
  174. {
  175. value: '1',
  176. label: '广州'
  177. },
  178. {
  179. value: '2',
  180. label: '深圳'
  181. }
  182. ],
  183. value1:'',
  184. show:false
  185. };
  186. },
  187. onPullDownRefresh(){
  188. },
  189. onLoad(option) {
  190. },
  191. onShow() {
  192. /* if(this.current === 2 && this.$method.isLogin()){
  193. this.$refs.refMy.init();
  194. } */
  195. },
  196. methods: {
  197. goBuy(){
  198. this.$navTo.togo('/pages2/order/confirm_pay');
  199. },
  200. bindChange(e) {
  201. const val = e.detail.value
  202. },
  203. checkboxChange(e) {
  204. //console.log(e);
  205. },
  206. // 选中任一checkbox时,由checkbox-group触发
  207. checkboxGroupChange(e) {
  208. // console.log(e);
  209. },
  210. // 全选
  211. checkedAll() {
  212. this.list.map(val => {
  213. val.checked = true;
  214. })
  215. },
  216. openPopup(index){
  217. if(index==0){
  218. this.show = true
  219. }else{
  220. this.show1 = true
  221. }
  222. }
  223. },
  224. onReachBottom() {},
  225. computed: { ...mapGetters(['userInfo']) }
  226. };
  227. </script>
  228. <style >
  229. page{
  230. background-color: #EAEEF1;
  231. }
  232. </style>
  233. <style scoped>
  234. .picker-item {
  235. height: 50px;
  236. align-items: center;
  237. justify-content: center;
  238. text-align: center;
  239. }
  240. .picker-view {
  241. width: 100%;
  242. height: 420rpx;
  243. text-align: center;
  244. }
  245. .topTxt{
  246. font-size: 30rpx;
  247. color: #666666;
  248. text-align: center;
  249. padding: 20rpx 0;
  250. }
  251. .blackTxt{
  252. font-size: 30rpx;
  253. font-family: PingFang SC;
  254. font-weight: bold;
  255. color: #333333;
  256. }
  257. .redTxt{
  258. font-size: 30rpx;
  259. font-family: PingFang SC;
  260. color: #FF2D55;
  261. margin-top: 13rpx;
  262. }
  263. .blue-box{
  264. background: #EBF5FF;
  265. }
  266. .white-box{
  267. width: 646rpx;
  268. height: 220rpx;
  269. border-radius: 24rpx;
  270. align-items: center;
  271. display: flex;
  272. padding-left: 15rpx;
  273. }
  274. .okBtn{
  275. width: 200rpx;
  276. height: 64rpx;
  277. background: linear-gradient(0deg, #015EEA, #00C0FA);
  278. border-radius: 32rpx;
  279. color: #FFFFFF;
  280. text-align: center;
  281. line-height: 64rpx;
  282. }
  283. .confrim-btn{
  284. height: 98rpx;
  285. width: 100%;
  286. display: flex;
  287. align-items: center;
  288. justify-content:center;
  289. }
  290. .grade{
  291. height: 23rpx;
  292. font-size: 24rpx;
  293. color: #999999;
  294. margin: 0 auto;
  295. margin-top: 15rpx;
  296. text-align: center;
  297. }
  298. .line1{
  299. width: 80rpx;
  300. height: 8rpx;
  301. background: #999999;
  302. border-radius: 4rpx;
  303. margin: 0 auto;
  304. margin-top: 15rpx;
  305. }
  306. .popup_box {
  307. height: 700rpx;
  308. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  309. border-radius: 32rpx 32rpx 0rpx 0rpx;
  310. }
  311. .item{
  312. width: 100%;
  313. background: #FFFFFF;
  314. border-radius: 16rpx;
  315. margin-bottom: 20rpx;
  316. padding: 15rpx;
  317. }
  318. .priceTag{
  319. font-size: 30rpx;
  320. font-family: PingFang SC;
  321. font-weight: bold;
  322. color: #FF2D55;
  323. display: flex;
  324. flex-direction: row-reverse;
  325. }
  326. .btn2{
  327. width: 200rpx;
  328. height: 64rpx;
  329. background: linear-gradient(0deg, #015EEA, #00C0FA);
  330. opacity: 0.6;
  331. border-radius: 32rpx;
  332. text-align: center;
  333. line-height: 64rpx;
  334. }
  335. .bottomBox{
  336. position: fixed;
  337. bottom: 0;
  338. width: 100%;
  339. left: 0;
  340. height:98rpx ;
  341. background-color: #FFFFFF;
  342. display: flex;
  343. justify-content: space-between;
  344. align-items: center;
  345. padding: 0 30rpx;
  346. }
  347. </style>