halllist.vue 12 KB

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