halllist.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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. name:'',//馆名字
  100. peoplename:'',//馆长名字
  101. price:'',//预约的价格
  102. id: '',//预约会场id
  103. page: 1,
  104. limit: 10,
  105. loadingType: 'more',
  106. list: []
  107. };
  108. },
  109. onLoad(option) {
  110. this.id = option.id;
  111. this.name = option.name;
  112. this.peoplename = option.peoplename
  113. this.loadData();
  114. },
  115. methods: {
  116. loadData() {
  117. const obj = this;
  118. if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
  119. return;
  120. }
  121. obj.loadingType = 'loading';
  122. auction_list({
  123. page: obj.page,
  124. limit: obj.limit,
  125. auction_gu_id: obj.id
  126. }).then(({ data }) => {
  127. console.log(data, '123456');
  128. data.forEach(e => {
  129. let now_time = timeComputed(e.time);
  130. console.log(e.time,now_time);
  131. e.hours = now_time.hours;
  132. e.minutes = now_time.minutes;
  133. e.seconds = now_time.seconds;
  134. let jcsj = e.radd_time.split(':')
  135. if(jcsj[0]*1 >= 8 && jcsj[0]*1 < 12){
  136. e.time_image = '../../static/img/morningicon.png'
  137. e.show = 'MORNING SHOWS'
  138. }else if(jcsj[0]*1 >= 12 && jcsj[0]*1 < 18){
  139. e.show = 'AFTERNOON SHOWS'
  140. e.time_image = '../../static/img/afternoonicon.png'
  141. }else {
  142. e.time_image = '../../static/img/eveningicon.png'
  143. e.show = 'EVENING SHOWS'
  144. }
  145. });
  146. obj.list = obj.list.concat(data);
  147. if (data.length != obj.limit) {
  148. obj.loadingType = 'more';
  149. obj.page++;
  150. } else {
  151. obj.loadingType = 'nomore';
  152. }
  153. });
  154. },
  155. open(item) {
  156. if(item.sta != 1) {
  157. this.id = item.id
  158. advance({id: item.id}).then(e =>{
  159. console.log(e,'success');
  160. this.nav()
  161. }).then(e =>{
  162. console.log(e,'fail');
  163. })
  164. }else {
  165. this.price = item.anticipate
  166. this.id = item.id
  167. this.$refs.popup.open();
  168. }
  169. },
  170. close() {
  171. this.price = ''
  172. this.id = ''
  173. this.$refs.popup.close();
  174. },
  175. nav() {
  176. uni.navigateTo({
  177. url:'/pages/hall/hallinfo?id=' + this.id + '&name=' + this.name + '&peoplename=' + this.peoplename
  178. });
  179. },
  180. toBack() {
  181. uni.navigateBack({});
  182. },
  183. appointment() {
  184. subscribe({id: this.id}).then(({data}) =>{
  185. this.$api.msg('预约成功')
  186. window.location.reload();
  187. console.log(data);
  188. this.price = ''
  189. this.id = ''
  190. this.$refs.popup.close();
  191. }).catch(e =>{
  192. this.price = ''
  193. this.id = ''
  194. this.$refs.popup.close();
  195. console.log(e);
  196. })
  197. }
  198. }
  199. };
  200. </script>
  201. <style lang="less">
  202. page,
  203. .center {
  204. height: auto;
  205. min-height: 100%;
  206. background: #f2f5f4;
  207. }
  208. .money-box {
  209. color: #ffffff;
  210. text-align: center;
  211. position: relative;
  212. .header {
  213. position: absolute;
  214. left: 0;
  215. top: 0;
  216. width: 100%;
  217. height: 80rpx;
  218. font-size: 32rpx;
  219. font-weight: 700;
  220. z-index: 99;
  221. display: flex;
  222. justify-content: center;
  223. align-items: center;
  224. }
  225. .goback-box {
  226. position: absolute;
  227. left: 18rpx;
  228. top: 0;
  229. height: 80rpx;
  230. display: flex;
  231. align-items: center;
  232. }
  233. .goback {
  234. z-index: 100;
  235. width: 34rpx;
  236. height: 34rpx;
  237. }
  238. .money_bg {
  239. width: 100%;
  240. height: 382rpx;
  241. display: block;
  242. }
  243. }
  244. .shingle-mmain {
  245. position: relative;
  246. z-index: 2;
  247. margin: -90rpx auto 0;
  248. width: 690rpx;
  249. height: 176rpx;
  250. background: #ffffff;
  251. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  252. border-radius: 20rpx;
  253. background-color: #ffffff;
  254. .smmain-item {
  255. width: 33%;
  256. display: flex;
  257. flex-direction: column;
  258. align-items: center;
  259. .red {
  260. color: #fd3b39 !important;
  261. }
  262. .smitem-top {
  263. font-size: 30rpx;
  264. font-family: PingFang SC;
  265. font-weight: bolder;
  266. color: #0c1732;
  267. }
  268. .smitem-bottom {
  269. margin-top: 10rpx;
  270. font-size: 30rpx;
  271. font-family: PingFang SC;
  272. font-weight: 500;
  273. color: #0c1732;
  274. }
  275. .people {
  276. justify-content: center;
  277. .peopleitem {
  278. width: 24rpx;
  279. height: 34rpx;
  280. image {
  281. width: 100%;
  282. height: 100%;
  283. }
  284. }
  285. }
  286. }
  287. .shu {
  288. width: 2rpx;
  289. height: 70rpx;
  290. background: #dcdcdc;
  291. }
  292. }
  293. .main {
  294. margin: 30rpx auto 0;
  295. padding: 50rpx 50rpx 36rpx 50rpx;
  296. width: 690rpx;
  297. background: #ffffff;
  298. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  299. border-radius: 20rpx;
  300. .mtitle-english {
  301. font-size: 30rpx;
  302. font-family: PingFang SC;
  303. font-weight: bold;
  304. color: #9ea6ba;
  305. }
  306. .mmain {
  307. margin-top: 24rpx;
  308. .mmain-info {
  309. .mmain-title {
  310. display: flex;
  311. justify-content: flex-start;
  312. align-items: center;
  313. .mmaint-left {
  314. width: 52rpx;
  315. height: 40rpx;
  316. }
  317. .mmaint-font {
  318. margin-left: 10rpx;
  319. font-size: 32rpx;
  320. font-family: PingFang SC;
  321. font-weight: bold;
  322. color: #0c1732;
  323. }
  324. .mmaint-time {
  325. margin-left: 20rpx;
  326. font-size: 28rpx;
  327. font-family: PingFang SC;
  328. font-weight: 500;
  329. color: #0c1732;
  330. }
  331. }
  332. .mmain-time {
  333. margin-top: 10rpx;
  334. font-size: 26rpx;
  335. font-family: PingFang SC;
  336. font-weight: 500;
  337. color: #0c1732;
  338. .lyy-b-jz {
  339. margin-left: 10rpx;
  340. }
  341. }
  342. }
  343. .mmain-image {
  344. padding-top: 14rpx;
  345. width: 182rpx;
  346. height: 182rpx;
  347. image {
  348. width: 100%;
  349. height: 100%;
  350. }
  351. }
  352. }
  353. .bottom {
  354. margin-top: 32rpx;
  355. width: 380rpx;
  356. height: 64rpx;
  357. background: #d13737;
  358. border-radius: 20rpx;
  359. display: flex;
  360. justify-content: center;
  361. align-items: center;
  362. .bottom-font {
  363. font-size: 28rpx;
  364. font-family: PingFang SC;
  365. font-weight: bold;
  366. color: #ffffff;
  367. }
  368. .bottom-image {
  369. margin-left: 12rpx;
  370. width: 24rpx;
  371. height: 22rpx;
  372. }
  373. }
  374. }
  375. .popup {
  376. width: 582rpx;
  377. background: #ffffff;
  378. border-radius: 20rpx;
  379. padding: 118rpx 20rpx 30rpx;
  380. .popup-title {
  381. text-align: center;
  382. font-size: 42rpx;
  383. font-family: PingFang SC;
  384. font-weight: 500;
  385. color: #0c1732;
  386. }
  387. .btn-box {
  388. padding-top: 90rpx;
  389. display: flex;
  390. align-items: center;
  391. justify-content: space-between;
  392. .btn-left {
  393. width: 248rpx;
  394. height: 78rpx;
  395. border: 2rpx solid #DC262B;
  396. border-radius: 10rpx;
  397. font-size: 34rpx;
  398. font-family: PingFang SC;
  399. font-weight: 500;
  400. color: #DC262B;
  401. text-align: center;
  402. line-height: 78rpx;
  403. }
  404. .btn-right {
  405. width: 248rpx;
  406. height: 78rpx;
  407. background: #DC262B;
  408. border-radius: 10rpx;
  409. font-size: 34rpx;
  410. font-family: PingFang SC;
  411. font-weight: 500;
  412. color: #ffffff;
  413. text-align: center;
  414. line-height: 78rpx;
  415. }
  416. }
  417. }
  418. .message {
  419. justify-content: space-around;
  420. margin: 20rpx auto 0;
  421. padding: 16rpx 40rpx 16rpx 50rpx;
  422. width: 690rpx;
  423. background: #ffffff;
  424. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  425. border-radius: 20rpx;
  426. .message-left {
  427. width: 52rpx;
  428. height: 52rpx;
  429. flex-shrink: 0;
  430. }
  431. .message-font {
  432. margin: 0 40rpx;
  433. font-size: 28rpx;
  434. font-family: PingFang SC;
  435. font-weight: 500;
  436. color: #0c1732;
  437. }
  438. .message-right {
  439. width: 18rpx;
  440. height: 30rpx;
  441. }
  442. }
  443. .hallist-bg {
  444. position: relative;
  445. z-index: 10;
  446. margin: -240rpx auto 0;
  447. width: 702rpx;
  448. height: 300rpx;
  449. border-radius: 14rpx;
  450. background-color: #2979FF;
  451. image {
  452. width: 100%;
  453. height: 100%;
  454. }
  455. }
  456. .navbar {
  457. display: flex;
  458. align-items: center;
  459. justify-content: space-around;
  460. width: 700rpx;
  461. background: #ffffff;
  462. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  463. border-radius: 20rpx;
  464. margin: 40rpx auto 0;
  465. padding: 40rpx 0 50rpx;
  466. .vvv {
  467. width: 2rpx;
  468. height: 74rpx;
  469. background: #dcdcdc;
  470. }
  471. .navbar-item {
  472. display: flex;
  473. flex-direction: column;
  474. align-items: center;
  475. .navbar-font {
  476. margin-bottom: 10rpx;
  477. display: flex;
  478. justify-content: center;
  479. align-items: center;
  480. image {
  481. margin-right: 10rpx;
  482. width: 40rpx;
  483. height: 40rpx;
  484. }
  485. .font {
  486. font-size: 30rpx;
  487. font-weight: bold;
  488. color: #0c1732;
  489. }
  490. }
  491. .navbar-num {
  492. font-size: 34rpx;
  493. font-weight: bold;
  494. color: #0c1732;
  495. }
  496. }
  497. }
  498. </style>