|
@@ -1,85 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<view class="center">
|
|
<view class="center">
|
|
- <view class="content-money">
|
|
|
|
- <view class="status_bar"><!-- 这里是状态栏 --></view>
|
|
|
|
- <view class="money-box">
|
|
|
|
- <view class="goback-box" @click="toBack">
|
|
|
|
- <image class="goback" src="../../static/img/fanhui.png" mode=""></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="header">会馆场次</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <swiper class="hallist-bg" autoplay="true" duration="400" interval="5000">
|
|
|
|
- <swiper-item v-for="(item, index) in images" :key="index" class="carousel-item">
|
|
|
|
- <image class="swimage" :src="item" />
|
|
|
|
- </swiper-item>
|
|
|
|
- </swiper>
|
|
|
|
- <view class="main" v-for="(item, index) in list" :key="index">
|
|
|
|
- <view class="mtitle-english">{{ item.show }}</view>
|
|
|
|
- <view class="mmain flex">
|
|
|
|
- <view class="mmain-info">
|
|
|
|
- <view class="mmain-title">
|
|
|
|
- <image class="mmaint-left" :src="item.time_image" mode=""></image>
|
|
|
|
- <view class="mmaint-font">{{ item.nickname }}</view>
|
|
|
|
- <view class="mmaint-time">{{ item.radd_time }}开售</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="mmain-time" style="margin-top: 28rpx;">预约时间:{{ item.add_time }}-{{ item.end_time }}
|
|
|
|
- </view>
|
|
|
|
- <view class="mmain-time">入场时间:{{ item.radd_time | ahead }}-{{ item.rend_time }}</view>
|
|
|
|
- <view class="mmain-time flex">
|
|
|
|
- <view class="mmain-font">距预约结束:</view>
|
|
|
|
-
|
|
|
|
- <view class="lyy-b-jz flex" v-if="item.daotime == 1" style="font-size: 30rpx; color: #d13737;">
|
|
|
|
- 已结束</view>
|
|
|
|
- <view class="lyy-b-jz flex" v-else>
|
|
|
|
- <uni-countdowns color="#702400" splitor-color="#faf1e6" background-color="#faf1e6"
|
|
|
|
- border-color="#faf1e6" :show-day="false" :hour="item.hours" :minute="item.minutes"
|
|
|
|
- :second="item.seconds" :index="index" @timeover="isTime"></uni-countdowns>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="mmain-image">
|
|
|
|
- <image :src="item.image" mode=""></image>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="item.str == '预约'" class="bottom" @click="open(item)">
|
|
|
|
- <view class="bottom-font">立即{{ item.str }}</view>
|
|
|
|
- <image v-if="item.str == '预约'" class="bottom-image" src="../../static/img/jt.png" mode=""></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom" v-else>
|
|
|
|
- <view class="bottom-font">{{ item.daotime == 1 ? '立即进入' : '您已预约' }}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <uni-popup ref="popup" type="center">
|
|
|
|
- <view class="popup">
|
|
|
|
- <view class="popup-title">
|
|
|
|
- <view class="title">
|
|
|
|
- 请选择价格档次
|
|
|
|
- </view>
|
|
|
|
- <view class="flex-center">
|
|
|
|
- <view class="pirice" @click="actionPay=ind" :class="{action:actionPay==ind}" v-for="(item,ind) in price_cate">
|
|
|
|
- {{item}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="btn-box">
|
|
|
|
- <view class="btn-left" @click="close()">取消</view>
|
|
|
|
- <view class="btn-right" @click="appointment()">确定</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </uni-popup>
|
|
|
|
- <u-tabbar activeColor="#333333" inactive-color='#999999' :list="tabbar"></u-tabbar>
|
|
|
|
|
|
+ <u-tabbar activeColor="#01A6A8" inactive-color='#666666' :list="tabbar"></u-tabbar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
|
|
|
|
- import {
|
|
|
|
- pay_list
|
|
|
|
- } from '../../api/wallet.js';
|
|
|
|
- import {
|
|
|
|
- article
|
|
|
|
- } from '@/api/user.js';
|
|
|
|
import {
|
|
import {
|
|
getUserInfo,
|
|
getUserInfo,
|
|
rate,
|
|
rate,
|
|
@@ -89,62 +14,17 @@
|
|
mapState,
|
|
mapState,
|
|
mapMutations
|
|
mapMutations
|
|
} from 'vuex';
|
|
} from 'vuex';
|
|
- import {
|
|
|
|
- auction_list,
|
|
|
|
- subscribe,
|
|
|
|
- advance
|
|
|
|
- } from '@/api/hall.js';
|
|
|
|
- import {
|
|
|
|
- timeComputed
|
|
|
|
- } from '@/utils/rocessor.js';
|
|
|
|
import {
|
|
import {
|
|
tabbar1
|
|
tabbar1
|
|
} from '@/utils/tabbar.js';
|
|
} from '@/utils/tabbar.js';
|
|
export default {
|
|
export default {
|
|
- components: {
|
|
|
|
- uniCountdowns
|
|
|
|
- },
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- actionPay:0,
|
|
|
|
tabbar: tabbar1,
|
|
tabbar: tabbar1,
|
|
- images: [], //轮播图
|
|
|
|
- name: '', //馆名字
|
|
|
|
- peoplename: '', //馆长名字
|
|
|
|
- id: '', //预约会场id
|
|
|
|
- price_cate: [],
|
|
|
|
- page: 1,
|
|
|
|
- limit: 10,
|
|
|
|
- loadingType: 'more',
|
|
|
|
- list: [],
|
|
|
|
- aliData: {},
|
|
|
|
- bankData: {},
|
|
|
|
- wx: {},
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- filters: {
|
|
|
|
- ahead(provider) {
|
|
|
|
- let time = provider.split(':');
|
|
|
|
- console.log(time);
|
|
|
|
- if (time[1] * 1 - 6 < 0) {
|
|
|
|
- time[1] = time[1] * 1 + 54;
|
|
|
|
- if (time[0] * 1 == 0) {
|
|
|
|
- time[0] = '23';
|
|
|
|
- } else {
|
|
|
|
- time[0] = time[0] * 1 - 1;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- time[1] = time[1] * 1 - 6;
|
|
|
|
- if (time[1] < 10) {
|
|
|
|
- time[1] = '0' + time[1];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return time[0] + ':' + time[1] + ':' + time[2];
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
- this.name = option.name;
|
|
|
|
- this.peoplename = option.peoplename;
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.list = [];
|
|
this.list = [];
|
|
@@ -178,31 +58,6 @@
|
|
data
|
|
data
|
|
}) => {
|
|
}) => {
|
|
obj.images = data.slider_image;
|
|
obj.images = data.slider_image;
|
|
- console.log(data);
|
|
|
|
- data.data.forEach(e => {
|
|
|
|
- let now_time = timeComputed(e.time);
|
|
|
|
- this.price_cate = data.price_cate;
|
|
|
|
- console.log(e.time, now_time);
|
|
|
|
- e.hours = now_time.hours;
|
|
|
|
- e.minutes = now_time.minutes;
|
|
|
|
- e.seconds = now_time.seconds;
|
|
|
|
- if (now_time.hours < 0 || now_time.minutes < 0 || now_time.seconds < 0) {
|
|
|
|
- e.daotime = 1;
|
|
|
|
- } else {
|
|
|
|
- e.daotime = 0;
|
|
|
|
- }
|
|
|
|
- let jcsj = e.radd_time.split(':');
|
|
|
|
- if (jcsj[0] * 1 >= 8 && jcsj[0] * 1 < 12) {
|
|
|
|
- e.time_image = '../../static/img/morningicon.png';
|
|
|
|
- e.show = 'MORNING SHOWS';
|
|
|
|
- } else if (jcsj[0] * 1 >= 12 && jcsj[0] * 1 < 18) {
|
|
|
|
- e.show = 'AFTERNOON SHOWS';
|
|
|
|
- e.time_image = '../../static/img/afternoonicon.png';
|
|
|
|
- } else {
|
|
|
|
- e.time_image = '../../static/img/eveningicon.png';
|
|
|
|
- e.show = 'EVENING SHOWS';
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
obj.list = obj.list.concat(data.data);
|
|
obj.list = obj.list.concat(data.data);
|
|
if (data.data.length == obj.limit) {
|
|
if (data.data.length == obj.limit) {
|
|
obj.loadingType = 'more';
|
|
obj.loadingType = 'more';
|
|
@@ -212,79 +67,11 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- open(item) {
|
|
|
|
- if (this.wx == '' && this.aliData == '' && this.bankData == '') {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '您未填写收款信息无法参与,是否前去填写收款信息?',
|
|
|
|
- success: function(res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/collection/collection'
|
|
|
|
- });
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
- console.log('用户点击取消');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- this.id = item.id;
|
|
|
|
- this.$refs.popup.open();
|
|
|
|
- // 场次是否已经预约sta=1未预约
|
|
|
|
- },
|
|
|
|
- goDetails(e) {
|
|
|
|
- console.log(e, '123456');
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/index/messageInfo?id=' + this.article[e].id
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- close() {
|
|
|
|
- this.id = '';
|
|
|
|
- this.$refs.popup.close();
|
|
|
|
- },
|
|
|
|
navTo(url) {
|
|
navTo(url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url
|
|
url
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- toBack() {
|
|
|
|
- uni.navigateBack({});
|
|
|
|
- },
|
|
|
|
- appointment() {
|
|
|
|
- subscribe({
|
|
|
|
- id: this.id,
|
|
|
|
- price: this.price_cate[this.actionPay]
|
|
|
|
- })
|
|
|
|
- .then(({
|
|
|
|
- data
|
|
|
|
- }) => {
|
|
|
|
- this.$api.msg('预约成功');
|
|
|
|
- console.log(data);
|
|
|
|
- this.$refs.popup.close();
|
|
|
|
- this.page = 1;
|
|
|
|
- this.limit = 10;
|
|
|
|
- this.loadingType = 'more';
|
|
|
|
- this.list = [];
|
|
|
|
- this.loadData();
|
|
|
|
- this.updata();
|
|
|
|
- })
|
|
|
|
- .catch(e => {
|
|
|
|
- this.$refs.popup.close();
|
|
|
|
- console.log(e);
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- updata() {
|
|
|
|
- getUserInfo({})
|
|
|
|
- .then(({
|
|
|
|
- data
|
|
|
|
- }) => {
|
|
|
|
- this.setUserInfo(data);
|
|
|
|
- })
|
|
|
|
- .catch(e => {
|
|
|
|
- console.log(e);
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
isTime(index) {
|
|
isTime(index) {
|
|
console.log(index, '123');
|
|
console.log(index, '123');
|
|
this.list[index].daotime = 1;
|
|
this.list[index].daotime = 1;
|