halllist.vue 13 KB

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