halllist.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. <template>
  2. <view class="center">
  3. <view class="content-money">
  4. <view class="status_bar"><!-- 这里是状态栏 --></view>
  5. <view class="money-box">
  6. <view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
  7. <view class="header">艺术品挂牌交易区</view>
  8. <image class="money_bg" src="../../static/img/hinfo-bg.png"></image>
  9. </view>
  10. </view>
  11. <view class="hallist-bg">
  12. <image src="" mode=""></image>
  13. </view>
  14. <view class="message flex" @click="nav('/pages/index/message')">
  15. <image class="message-left" src="../../static/img/hinco.png" mode=""></image>
  16. <view class="message-font clamp">全民动员,公告内容信息公告消息显123456789</view>
  17. <image class="message-right" src="../../static/img/backb.png" mode=""></image>
  18. </view>
  19. <view class="navbar">
  20. <view class="navbar-item" @click="navTo('/pages/money/qudou')">
  21. <view class="navbar-font">
  22. <image class="navbar-image" src="../../static/img/been.png" mode=""></image>
  23. <view class="font">趣豆</view>
  24. </view>
  25. <view class="navbar-num">200</view>
  26. </view>
  27. <view class="vvv"></view>
  28. <view class="navbar-item">
  29. <view class="navbar-font" @click="navTo('/pages/user/scoreAccumulate')">
  30. <image class="navbar-image" src="../../static/money/m03.png" mode=""></image>
  31. <view class="font">积分</view>
  32. </view>
  33. <view class="navbar-num">200</view>
  34. </view>
  35. <view class="vvv"></view>
  36. <view class="navbar-item">
  37. <view class="navbar-font">
  38. <image class="navbar-image" src="../../static/money/m04.png" mode=""></image>
  39. <view class="font">置换券</view>
  40. </view>
  41. <view class="navbar-num">200</view>
  42. </view>
  43. </view>
  44. <view class="main" v-for="(item, index) in list" :key="index">
  45. <view class="mtitle-english">{{ item.show }}</view>
  46. <view class="mmain flex">
  47. <view class="mmain-info">
  48. <view class="mmain-title">
  49. <image class="mmaint-left" :src="item.time_image" mode=""></image>
  50. <view class="mmaint-font">{{ item.nickname }}</view>
  51. <view class="mmaint-time">{{ item.radd_time }}开售</view>
  52. </view>
  53. <view class="mmain-time" style="margin-top: 28rpx;">预约时间:{{ item.add_time }}-{{ item.end_time }}</view>
  54. <view class="mmain-time">入场时间:{{ item.radd_time }}-{{ item.rend_time }}</view>
  55. <view class="mmain-time flex">
  56. <view class="mmain-font">距预约结束:</view>
  57. <view class="lyy-b-jz flex">
  58. <uni-countdowns
  59. color="#FFFFFF"
  60. splitor-color="#FECD57"
  61. background-color="#FECD57"
  62. border-color="#FECD57"
  63. :show-day="false"
  64. :hour="item.hours"
  65. :minute="item.minutes"
  66. :second="item.seconds"
  67. ></uni-countdowns>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="mmain-image"><image :src="item.image" mode=""></image></view>
  72. </view>
  73. <view class="bottom" @click="open(item)">
  74. <view class="bottom-font">立即{{item.str}}</view>
  75. <image class="bottom-image" src="../../static/img/jt.png" mode=""></image>
  76. </view>
  77. </view>
  78. <uni-popup ref="popup" type="center">
  79. <view class="popup">
  80. <view class="popup-title">预约需要{{price}}艺金券是否立即预约?</view>
  81. <view class="btn-box">
  82. <view class="btn-left" @click="close()">取消</view>
  83. <view class="btn-right" @click="appointment()">确定</view>
  84. </view>
  85. </view>
  86. </uni-popup>
  87. </view>
  88. </template>
  89. <script>
  90. import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
  91. import { auction_list,subscribe,advance } from '@/api/hall.js';
  92. import { timeComputed } from '@/utils/rocessor.js';
  93. export default {
  94. components: {
  95. uniCountdowns
  96. },
  97. data() {
  98. return {
  99. price:'',//预约的价格
  100. id: '',//预约会场id
  101. page: 1,
  102. limit: 10,
  103. loadingType: 'more',
  104. list: []
  105. };
  106. },
  107. onLoad(option) {
  108. this.id = option.id;
  109. this.loadData();
  110. },
  111. methods: {
  112. loadData() {
  113. const obj = this;
  114. if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
  115. return;
  116. }
  117. obj.loadingType = 'loading';
  118. auction_list({
  119. page: obj.page,
  120. limit: obj.limit,
  121. auction_gu_id: obj.id
  122. }).then(({ data }) => {
  123. console.log(data, '123456');
  124. data.forEach(e => {
  125. let now_time = timeComputed(e.time);
  126. console.log(e.time,now_time);
  127. e.hours = now_time.hours;
  128. e.minutes = now_time.minutes;
  129. e.seconds = now_time.seconds;
  130. let jcsj = e.radd_time.split(':')
  131. if(jcsj[0]*1 >= 8 && jcsj[0]*1 < 12){
  132. e.time_image = '../../static/img/morningicon.png'
  133. e.show = 'MORNING SHOWS'
  134. }else if(jcsj[0]*1 >= 12 && jcsj[0]*1 < 18){
  135. e.show = 'AFTERNOON SHOWS'
  136. e.time_image = '../../static/img/afternoonicon.png'
  137. }else {
  138. e.time_image = '../../static/img/eveningicon.png'
  139. e.show = 'EVENING SHOWS'
  140. }
  141. });
  142. obj.list = obj.list.concat(data);
  143. if (data.length != obj.limit) {
  144. obj.loadingType = 'more';
  145. obj.page++;
  146. } else {
  147. obj.loadingType = 'nomore';
  148. }
  149. });
  150. },
  151. open(item) {
  152. if(item.sta != 1) {
  153. this.id = item.id
  154. advance({id: item.id}).then(e =>{
  155. console.log(e,'success');
  156. this.nav()
  157. }).then(e =>{
  158. console.log(e,'fail');
  159. })
  160. }else {
  161. this.price = item.anticipate
  162. this.id = item.id
  163. this.$refs.popup.open();
  164. }
  165. },
  166. close() {
  167. this.price = ''
  168. this.id = ''
  169. this.$refs.popup.close();
  170. },
  171. nav() {
  172. uni.navigateTo({
  173. url:'/pages/hall/hallinfo?id=' + this.id
  174. });
  175. },
  176. toBack() {
  177. uni.navigateBack({});
  178. },
  179. appointment() {
  180. subscribe({id: this.id}).then(({data}) =>{
  181. this.$api.msg('预约成功')
  182. console.log(data);
  183. this.price = ''
  184. this.id = ''
  185. this.$refs.popup.close();
  186. }).catch(e =>{
  187. this.price = ''
  188. this.id = ''
  189. this.$refs.popup.close();
  190. console.log(e);
  191. })
  192. }
  193. }
  194. };
  195. </script>
  196. <style lang="less">
  197. page,
  198. .center {
  199. height: auto;
  200. min-height: 100%;
  201. background: #f2f5f4;
  202. }
  203. .money-box {
  204. color: #ffffff;
  205. text-align: center;
  206. position: relative;
  207. .header {
  208. position: absolute;
  209. left: 0;
  210. top: 0;
  211. width: 100%;
  212. height: 80rpx;
  213. font-size: 32rpx;
  214. font-weight: 700;
  215. z-index: 99;
  216. display: flex;
  217. justify-content: center;
  218. align-items: center;
  219. }
  220. .goback-box {
  221. position: absolute;
  222. left: 18rpx;
  223. top: 0;
  224. height: 80rpx;
  225. display: flex;
  226. align-items: center;
  227. }
  228. .goback {
  229. z-index: 100;
  230. width: 34rpx;
  231. height: 34rpx;
  232. }
  233. .money_bg {
  234. width: 100%;
  235. height: 382rpx;
  236. display: block;
  237. }
  238. }
  239. .shingle-mmain {
  240. position: relative;
  241. z-index: 2;
  242. margin: -90rpx auto 0;
  243. width: 690rpx;
  244. height: 176rpx;
  245. background: #ffffff;
  246. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  247. border-radius: 20rpx;
  248. background-color: #ffffff;
  249. .smmain-item {
  250. width: 33%;
  251. display: flex;
  252. flex-direction: column;
  253. align-items: center;
  254. .red {
  255. color: #fd3b39 !important;
  256. }
  257. .smitem-top {
  258. font-size: 30rpx;
  259. font-family: PingFang SC;
  260. font-weight: bolder;
  261. color: #0c1732;
  262. }
  263. .smitem-bottom {
  264. margin-top: 10rpx;
  265. font-size: 30rpx;
  266. font-family: PingFang SC;
  267. font-weight: 500;
  268. color: #0c1732;
  269. }
  270. .people {
  271. justify-content: center;
  272. .peopleitem {
  273. width: 24rpx;
  274. height: 34rpx;
  275. image {
  276. width: 100%;
  277. height: 100%;
  278. }
  279. }
  280. }
  281. }
  282. .shu {
  283. width: 2rpx;
  284. height: 70rpx;
  285. background: #dcdcdc;
  286. }
  287. }
  288. .main {
  289. margin: 30rpx auto 0;
  290. padding: 50rpx 50rpx 36rpx 50rpx;
  291. width: 690rpx;
  292. background: #ffffff;
  293. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  294. border-radius: 20rpx;
  295. .mtitle-english {
  296. font-size: 30rpx;
  297. font-family: PingFang SC;
  298. font-weight: bold;
  299. color: #9ea6ba;
  300. }
  301. .mmain {
  302. margin-top: 24rpx;
  303. .mmain-info {
  304. .mmain-title {
  305. display: flex;
  306. justify-content: flex-start;
  307. align-items: center;
  308. .mmaint-left {
  309. width: 52rpx;
  310. height: 40rpx;
  311. }
  312. .mmaint-font {
  313. margin-left: 10rpx;
  314. font-size: 32rpx;
  315. font-family: PingFang SC;
  316. font-weight: bold;
  317. color: #0c1732;
  318. }
  319. .mmaint-time {
  320. margin-left: 20rpx;
  321. font-size: 28rpx;
  322. font-family: PingFang SC;
  323. font-weight: 500;
  324. color: #0c1732;
  325. }
  326. }
  327. .mmain-time {
  328. margin-top: 10rpx;
  329. font-size: 26rpx;
  330. font-family: PingFang SC;
  331. font-weight: 500;
  332. color: #0c1732;
  333. .lyy-b-jz {
  334. margin-left: 10rpx;
  335. }
  336. }
  337. }
  338. .mmain-image {
  339. padding-top: 14rpx;
  340. width: 182rpx;
  341. height: 182rpx;
  342. image {
  343. width: 100%;
  344. height: 100%;
  345. }
  346. }
  347. }
  348. .bottom {
  349. margin-top: 32rpx;
  350. width: 380rpx;
  351. height: 64rpx;
  352. background: #d13737;
  353. border-radius: 20rpx;
  354. display: flex;
  355. justify-content: center;
  356. align-items: center;
  357. .bottom-font {
  358. font-size: 28rpx;
  359. font-family: PingFang SC;
  360. font-weight: bold;
  361. color: #ffffff;
  362. }
  363. .bottom-image {
  364. margin-left: 12rpx;
  365. width: 24rpx;
  366. height: 22rpx;
  367. }
  368. }
  369. }
  370. .popup {
  371. width: 582rpx;
  372. background: #ffffff;
  373. border-radius: 20rpx;
  374. padding: 118rpx 20rpx 30rpx;
  375. .popup-title {
  376. text-align: center;
  377. font-size: 42rpx;
  378. font-family: PingFang SC;
  379. font-weight: 500;
  380. color: #0c1732;
  381. }
  382. .btn-box {
  383. padding-top: 90rpx;
  384. display: flex;
  385. align-items: center;
  386. justify-content: space-between;
  387. .btn-left {
  388. width: 248rpx;
  389. height: 78rpx;
  390. border: 2rpx solid #DC262B;
  391. border-radius: 10rpx;
  392. font-size: 34rpx;
  393. font-family: PingFang SC;
  394. font-weight: 500;
  395. color: #DC262B;
  396. text-align: center;
  397. line-height: 78rpx;
  398. }
  399. .btn-right {
  400. width: 248rpx;
  401. height: 78rpx;
  402. background: #DC262B;
  403. border-radius: 10rpx;
  404. font-size: 34rpx;
  405. font-family: PingFang SC;
  406. font-weight: 500;
  407. color: #ffffff;
  408. text-align: center;
  409. line-height: 78rpx;
  410. }
  411. }
  412. }
  413. .message {
  414. justify-content: space-around;
  415. margin: 20rpx auto 0;
  416. padding: 16rpx 40rpx 16rpx 50rpx;
  417. width: 690rpx;
  418. background: #ffffff;
  419. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  420. border-radius: 20rpx;
  421. .message-left {
  422. width: 52rpx;
  423. height: 52rpx;
  424. flex-shrink: 0;
  425. }
  426. .message-font {
  427. margin: 0 40rpx;
  428. font-size: 28rpx;
  429. font-family: PingFang SC;
  430. font-weight: 500;
  431. color: #0c1732;
  432. }
  433. .message-right {
  434. width: 18rpx;
  435. height: 30rpx;
  436. }
  437. }
  438. .hallist-bg {
  439. position: relative;
  440. z-index: 10;
  441. margin: -240rpx auto 0;
  442. width: 702rpx;
  443. height: 300rpx;
  444. border-radius: 14rpx;
  445. background-color: #2979FF;
  446. image {
  447. width: 100%;
  448. height: 100%;
  449. }
  450. }
  451. .navbar {
  452. display: flex;
  453. align-items: center;
  454. justify-content: space-around;
  455. width: 700rpx;
  456. background: #ffffff;
  457. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  458. border-radius: 20rpx;
  459. margin: 40rpx auto 0;
  460. padding: 40rpx 0 50rpx;
  461. .vvv {
  462. width: 2rpx;
  463. height: 74rpx;
  464. background: #dcdcdc;
  465. }
  466. .navbar-item {
  467. display: flex;
  468. flex-direction: column;
  469. align-items: center;
  470. .navbar-font {
  471. margin-bottom: 10rpx;
  472. display: flex;
  473. justify-content: center;
  474. align-items: center;
  475. image {
  476. margin-right: 10rpx;
  477. width: 40rpx;
  478. height: 40rpx;
  479. }
  480. .font {
  481. font-size: 30rpx;
  482. font-weight: bold;
  483. color: #0c1732;
  484. }
  485. }
  486. .navbar-num {
  487. font-size: 34rpx;
  488. font-weight: bold;
  489. color: #0c1732;
  490. }
  491. }
  492. }
  493. </style>