halllist.vue 13 KB

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