halllist.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  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. }
  204. if(item.sta != 1) {
  205. this.id = item.id
  206. advance({id: item.id}).then(e =>{
  207. console.log(e,'success');
  208. this.nav()
  209. }).then(e =>{
  210. console.log(e,'fail');
  211. })
  212. }else {
  213. this.price = item.anticipate
  214. this.id = item.id
  215. this.$refs.popup.open();
  216. }
  217. },
  218. goDetails(e) {
  219. console.log(e, '123456');
  220. uni.navigateTo({
  221. url: '/pages/index/messageInfo?id=' + this.article[e].id
  222. });
  223. },
  224. close() {
  225. this.price = ''
  226. this.id = ''
  227. this.$refs.popup.close();
  228. },
  229. nav() {
  230. uni.navigateTo({
  231. url:'/pages/hall/hallinfo?id=' + this.id + '&name=' + this.name + '&peoplename=' + this.peoplename
  232. });
  233. },
  234. navTo(url){
  235. uni.navigateTo({
  236. url
  237. })
  238. },
  239. toBack() {
  240. uni.navigateBack({});
  241. },
  242. appointment() {
  243. subscribe({id: this.id}).then(({data}) =>{
  244. this.$api.msg('预约成功')
  245. window.location.reload();
  246. console.log(data);
  247. this.price = ''
  248. this.id = ''
  249. this.$refs.popup.close();
  250. }).catch(e =>{
  251. this.price = ''
  252. this.id = ''
  253. this.$refs.popup.close();
  254. console.log(e);
  255. })
  256. }
  257. }
  258. };
  259. </script>
  260. <style lang="less">
  261. page,
  262. .center {
  263. height: auto;
  264. min-height: 100%;
  265. background: #f2f5f4;
  266. }
  267. .money-box {
  268. color: #ffffff;
  269. text-align: center;
  270. position: relative;
  271. .header {
  272. position: absolute;
  273. left: 0;
  274. top: 0;
  275. width: 100%;
  276. height: 80rpx;
  277. font-size: 32rpx;
  278. font-weight: 700;
  279. z-index: 99;
  280. display: flex;
  281. justify-content: center;
  282. align-items: center;
  283. }
  284. .goback-box {
  285. position: absolute;
  286. left: 18rpx;
  287. top: 0;
  288. height: 80rpx;
  289. display: flex;
  290. align-items: center;
  291. }
  292. .goback {
  293. z-index: 100;
  294. width: 34rpx;
  295. height: 34rpx;
  296. }
  297. .money_bg {
  298. width: 100%;
  299. height: 382rpx;
  300. display: block;
  301. }
  302. }
  303. .shingle-mmain {
  304. position: relative;
  305. z-index: 2;
  306. margin: -90rpx auto 0;
  307. width: 690rpx;
  308. height: 176rpx;
  309. background: #ffffff;
  310. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  311. border-radius: 20rpx;
  312. background-color: #ffffff;
  313. .smmain-item {
  314. width: 33%;
  315. display: flex;
  316. flex-direction: column;
  317. align-items: center;
  318. .red {
  319. color: #fd3b39 !important;
  320. }
  321. .smitem-top {
  322. font-size: 30rpx;
  323. font-family: PingFang SC;
  324. font-weight: bolder;
  325. color: #0c1732;
  326. }
  327. .smitem-bottom {
  328. margin-top: 10rpx;
  329. font-size: 30rpx;
  330. font-family: PingFang SC;
  331. font-weight: 500;
  332. color: #0c1732;
  333. }
  334. .people {
  335. justify-content: center;
  336. .peopleitem {
  337. width: 24rpx;
  338. height: 34rpx;
  339. image {
  340. width: 100%;
  341. height: 100%;
  342. }
  343. }
  344. }
  345. }
  346. .shu {
  347. width: 2rpx;
  348. height: 70rpx;
  349. background: #dcdcdc;
  350. }
  351. }
  352. .main {
  353. margin: 30rpx auto 0;
  354. padding: 50rpx 50rpx 36rpx 50rpx;
  355. width: 690rpx;
  356. background: #ffffff;
  357. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  358. border-radius: 20rpx;
  359. .mtitle-english {
  360. font-size: 30rpx;
  361. font-family: PingFang SC;
  362. font-weight: bold;
  363. color: #9ea6ba;
  364. }
  365. .mmain {
  366. margin-top: 24rpx;
  367. .mmain-info {
  368. .mmain-title {
  369. display: flex;
  370. justify-content: flex-start;
  371. align-items: center;
  372. .mmaint-left {
  373. width: 52rpx;
  374. height: 40rpx;
  375. }
  376. .mmaint-font {
  377. margin-left: 10rpx;
  378. font-size: 32rpx;
  379. font-family: PingFang SC;
  380. font-weight: bold;
  381. color: #0c1732;
  382. }
  383. .mmaint-time {
  384. margin-left: 20rpx;
  385. font-size: 28rpx;
  386. font-family: PingFang SC;
  387. font-weight: 500;
  388. color: #0c1732;
  389. }
  390. }
  391. .mmain-time {
  392. justify-content: flex-start;
  393. margin-top: 10rpx;
  394. font-size: 26rpx;
  395. font-family: PingFang SC;
  396. font-weight: 500;
  397. color: #0c1732;
  398. .lyy-b-jz {
  399. margin-left: 10rpx;
  400. }
  401. }
  402. }
  403. .mmain-image {
  404. padding-top: 14rpx;
  405. width: 182rpx;
  406. height: 182rpx;
  407. image {
  408. width: 100%;
  409. height: 100%;
  410. }
  411. }
  412. }
  413. .bottom {
  414. margin-top: 32rpx;
  415. width: 380rpx;
  416. height: 64rpx;
  417. background: #d13737;
  418. border-radius: 20rpx;
  419. display: flex;
  420. justify-content: center;
  421. align-items: center;
  422. .bottom-font {
  423. font-size: 28rpx;
  424. font-family: PingFang SC;
  425. font-weight: bold;
  426. color: #ffffff;
  427. }
  428. .bottom-image {
  429. margin-left: 12rpx;
  430. width: 24rpx;
  431. height: 22rpx;
  432. }
  433. }
  434. }
  435. .popup {
  436. width: 582rpx;
  437. background: #ffffff;
  438. border-radius: 20rpx;
  439. padding: 118rpx 20rpx 30rpx;
  440. .popup-title {
  441. text-align: center;
  442. font-size: 42rpx;
  443. font-family: PingFang SC;
  444. font-weight: 500;
  445. color: #0c1732;
  446. }
  447. .btn-box {
  448. padding-top: 90rpx;
  449. display: flex;
  450. align-items: center;
  451. justify-content: space-between;
  452. .btn-left {
  453. width: 248rpx;
  454. height: 78rpx;
  455. border: 2rpx solid #DC262B;
  456. border-radius: 10rpx;
  457. font-size: 34rpx;
  458. font-family: PingFang SC;
  459. font-weight: 500;
  460. color: #DC262B;
  461. text-align: center;
  462. line-height: 78rpx;
  463. }
  464. .btn-right {
  465. width: 248rpx;
  466. height: 78rpx;
  467. background: #DC262B;
  468. border-radius: 10rpx;
  469. font-size: 34rpx;
  470. font-family: PingFang SC;
  471. font-weight: 500;
  472. color: #ffffff;
  473. text-align: center;
  474. line-height: 78rpx;
  475. }
  476. }
  477. }
  478. .message {
  479. justify-content: space-around;
  480. margin: 20rpx auto 0;
  481. padding: 16rpx 40rpx 16rpx 50rpx;
  482. width: 690rpx;
  483. background: #ffffff;
  484. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  485. border-radius: 20rpx;
  486. .message-left {
  487. width: 52rpx;
  488. height: 52rpx;
  489. flex-shrink: 0;
  490. }
  491. .message-font {
  492. margin: 0 40rpx;
  493. font-size: 28rpx;
  494. font-family: PingFang SC;
  495. font-weight: 500;
  496. color: #0c1732;
  497. }
  498. .message-right {
  499. width: 18rpx;
  500. height: 30rpx;
  501. }
  502. }
  503. .hallist-bg {
  504. position: relative;
  505. z-index: 10;
  506. margin: -240rpx auto 0;
  507. width: 702rpx;
  508. height: 300rpx;
  509. border-radius: 14rpx;
  510. image {
  511. width: 100%;
  512. height: 100%;
  513. }
  514. }
  515. .navbar {
  516. display: flex;
  517. align-items: center;
  518. justify-content: space-around;
  519. width: 700rpx;
  520. background: #ffffff;
  521. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  522. border-radius: 20rpx;
  523. margin: 40rpx auto 0;
  524. padding: 40rpx 0 50rpx;
  525. .vvv {
  526. width: 2rpx;
  527. height: 74rpx;
  528. background: #dcdcdc;
  529. }
  530. .navbar-item {
  531. display: flex;
  532. flex-direction: column;
  533. align-items: center;
  534. .navbar-font {
  535. margin-bottom: 10rpx;
  536. display: flex;
  537. justify-content: center;
  538. align-items: center;
  539. image {
  540. margin-right: 10rpx;
  541. width: 40rpx;
  542. height: 40rpx;
  543. }
  544. .font {
  545. font-size: 30rpx;
  546. font-weight: bold;
  547. color: #0c1732;
  548. }
  549. }
  550. .navbar-num {
  551. font-size: 34rpx;
  552. font-weight: bold;
  553. color: #0c1732;
  554. }
  555. }
  556. }
  557. </style>