|
@@ -8,10 +8,8 @@
|
|
|
<image class="money_bg" src="../../static/img/hinfo-bg.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="hallist-bg">
|
|
|
- <image src="../../static/img/hallbanner.png" mode=""></image>
|
|
|
- </view>
|
|
|
- <view class="message flex" >
|
|
|
+ <view class="hallist-bg"><image src="../../static/img/hallbanner.png" mode=""></image></view>
|
|
|
+ <view class="message flex">
|
|
|
<image class="message-left" src="../../static/img/hinco.png" mode=""></image>
|
|
|
<u-notice-bar
|
|
|
style="width: 100%;"
|
|
@@ -62,10 +60,8 @@
|
|
|
<view class="mmain-time">入场时间:{{ item.radd_time }}-{{ item.rend_time }}</view>
|
|
|
<view class="mmain-time flex">
|
|
|
<view class="mmain-font">距预约结束:</view>
|
|
|
-
|
|
|
- <view class="lyy-b-jz flex" v-if="item.hours < 0 || item.minutes < 0 || item.minutes < 0" style="font-size: 30rpx; color: #d13737;">
|
|
|
- 已结束
|
|
|
- </view>
|
|
|
+
|
|
|
+ <view class="lyy-b-jz flex" v-if="item.hours < 0 || item.minutes < 0 || item.minutes < 0" style="font-size: 30rpx; color: #d13737;">已结束</view>
|
|
|
<view class="lyy-b-jz flex" v-else>
|
|
|
<uni-countdowns
|
|
|
color="#FFFFFF"
|
|
@@ -83,13 +79,13 @@
|
|
|
<view class="mmain-image"><image :src="item.image" mode=""></image></view>
|
|
|
</view>
|
|
|
<view class="bottom" @click="open(item)">
|
|
|
- <view class="bottom-font">立即{{item.str}}</view>
|
|
|
+ <view class="bottom-font">立即{{ item.str }}</view>
|
|
|
<image class="bottom-image" src="../../static/img/jt.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" type="center">
|
|
|
<view class="popup">
|
|
|
- <view class="popup-title">预约需要{{price}}预约券是否立即预约?</view>
|
|
|
+ <view class="popup-title">预约需要{{ price }}预约券是否立即预约?</view>
|
|
|
<view class="btn-box">
|
|
|
<view class="btn-left" @click="close()">取消</view>
|
|
|
<view class="btn-right" @click="appointment()">确定</view>
|
|
@@ -101,10 +97,11 @@
|
|
|
|
|
|
<script>
|
|
|
import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
|
|
|
-import { pay_list } from '../../api/wallet.js'
|
|
|
-import { article } from '@/api/user.js'
|
|
|
+import { pay_list } from '../../api/wallet.js';
|
|
|
+import { article } from '@/api/user.js';
|
|
|
+import { getUserInfo } from '@/api/user.js';
|
|
|
import { mapState, mapMutations } from 'vuex';
|
|
|
-import { auction_list,subscribe,advance } from '@/api/hall.js';
|
|
|
+import { auction_list, subscribe, advance } from '@/api/hall.js';
|
|
|
import { timeComputed } from '@/utils/rocessor.js';
|
|
|
export default {
|
|
|
components: {
|
|
@@ -112,42 +109,44 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- name:'',//馆名字
|
|
|
- peoplename:'',//馆长名字
|
|
|
- price:'',//预约的价格
|
|
|
- id: '',//预约会场id
|
|
|
+ name: '', //馆名字
|
|
|
+ peoplename: '', //馆长名字
|
|
|
+ price: '', //预约的价格
|
|
|
+ id: '', //预约会场id
|
|
|
+ oid:'',//馆id
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
loadingType: 'more',
|
|
|
text: [],
|
|
|
- article:[],
|
|
|
+ article: [],
|
|
|
list: [],
|
|
|
aliData: {},
|
|
|
bankData: {},
|
|
|
- wx:{},
|
|
|
+ wx: {}
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- this.id = option.id;
|
|
|
+ this.oid = option.id;
|
|
|
this.name = option.name;
|
|
|
- this.peoplename = option.peoplename
|
|
|
+ this.peoplename = option.peoplename;
|
|
|
this.loadData();
|
|
|
- article({},1).then(({data}) =>{
|
|
|
- data.forEach(e =>{
|
|
|
- this.text.push(e.synopsis)
|
|
|
- })
|
|
|
- this.article = data
|
|
|
- pay_list({}).then(({data}) =>{
|
|
|
- this.wx = data.wx
|
|
|
- this.aliData = data.zfb
|
|
|
- this.bankData = data.bank
|
|
|
- })
|
|
|
- })
|
|
|
+ article({}, 1).then(({ data }) => {
|
|
|
+ data.forEach(e => {
|
|
|
+ this.text.push(e.synopsis);
|
|
|
+ });
|
|
|
+ this.article = data;
|
|
|
+ pay_list({}).then(({ data }) => {
|
|
|
+ this.wx = data.wx;
|
|
|
+ this.aliData = data.zfb;
|
|
|
+ this.bankData = data.bank;
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
|
|
|
loadData() {
|
|
|
const obj = this;
|
|
|
if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
|
|
@@ -157,25 +156,25 @@ export default {
|
|
|
auction_list({
|
|
|
page: obj.page,
|
|
|
limit: obj.limit,
|
|
|
- auction_gu_id: obj.id
|
|
|
+ auction_gu_id: obj.oid
|
|
|
}).then(({ data }) => {
|
|
|
console.log(data, '123456');
|
|
|
data.forEach(e => {
|
|
|
let now_time = timeComputed(e.time);
|
|
|
- console.log(e.time,now_time);
|
|
|
+ console.log(e.time, now_time);
|
|
|
e.hours = now_time.hours;
|
|
|
e.minutes = now_time.minutes;
|
|
|
e.seconds = now_time.seconds;
|
|
|
- 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'
|
|
|
+ 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);
|
|
@@ -188,33 +187,35 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
open(item) {
|
|
|
- if(this.wx == '' && this.aliData =='' && this.bankData == ''){
|
|
|
+ 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('用户点击取消');
|
|
|
- }
|
|
|
+ content: '您未填写收款信息无法参与,是否前去填写收款信息?',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/collection/collection'
|
|
|
+ });
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
}
|
|
|
- })
|
|
|
- return
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
- if(item.sta != 1) {
|
|
|
- this.id = item.id
|
|
|
- advance({id: item.id}).then(e =>{
|
|
|
- console.log(e,'success');
|
|
|
- this.nav()
|
|
|
- }).then(e =>{
|
|
|
- console.log(e,'fail');
|
|
|
- })
|
|
|
- }else {
|
|
|
- this.price = item.anticipate
|
|
|
- this.id = item.id
|
|
|
+ if (item.sta != 1) {
|
|
|
+ this.id = item.id;
|
|
|
+ advance({ id: item.id })
|
|
|
+ .then(e => {
|
|
|
+ console.log(e, 'success');
|
|
|
+ this.nav();
|
|
|
+ })
|
|
|
+ .then(e => {
|
|
|
+ console.log(e, 'fail');
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.price = item.anticipate;
|
|
|
+ this.id = item.id;
|
|
|
this.$refs.popup.open();
|
|
|
}
|
|
|
},
|
|
@@ -225,37 +226,51 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
close() {
|
|
|
- this.price = ''
|
|
|
- this.id = ''
|
|
|
+ this.price = '';
|
|
|
+ this.id = '';
|
|
|
this.$refs.popup.close();
|
|
|
},
|
|
|
nav() {
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/hall/hallinfo?id=' + this.id + '&name=' + this.name + '&peoplename=' + this.peoplename
|
|
|
+ url: '/pages/hall/hallinfo?id=' + this.id + '&name=' + this.name + '&peoplename=' + this.peoplename
|
|
|
});
|
|
|
},
|
|
|
- navTo(url){
|
|
|
+ navTo(url) {
|
|
|
uni.navigateTo({
|
|
|
url
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
toBack() {
|
|
|
uni.navigateBack({});
|
|
|
},
|
|
|
appointment() {
|
|
|
- subscribe({id: this.id}).then(({data}) =>{
|
|
|
- this.$api.msg('预约成功')
|
|
|
- window.location.reload();
|
|
|
- console.log(data);
|
|
|
- this.price = ''
|
|
|
- this.id = ''
|
|
|
- this.$refs.popup.close();
|
|
|
- }).catch(e =>{
|
|
|
- this.price = ''
|
|
|
- this.id = ''
|
|
|
- this.$refs.popup.close();
|
|
|
- console.log(e);
|
|
|
- })
|
|
|
+ subscribe({ id: this.id })
|
|
|
+ .then(({ data }) => {
|
|
|
+ this.$api.msg('预约成功');
|
|
|
+ console.log(data);
|
|
|
+ this.price = '';
|
|
|
+ this.$refs.popup.close();
|
|
|
+ this.page = 1;
|
|
|
+ this.limit = 10;
|
|
|
+ this.loadingType = 'more';
|
|
|
+ this.list = [];
|
|
|
+ this.loadData();
|
|
|
+ this.updata();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.price = '';
|
|
|
+ this.$refs.popup.close();
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ updata() {
|
|
|
+ getUserInfo({})
|
|
|
+ .then(({ data }) => {
|
|
|
+ this.setUserInfo(data);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -456,19 +471,19 @@ page,
|
|
|
.btn-left {
|
|
|
width: 248rpx;
|
|
|
height: 78rpx;
|
|
|
- border: 2rpx solid #DC262B;
|
|
|
+ border: 2rpx solid #dc262b;
|
|
|
border-radius: 10rpx;
|
|
|
font-size: 34rpx;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 500;
|
|
|
- color: #DC262B;
|
|
|
+ color: #dc262b;
|
|
|
text-align: center;
|
|
|
line-height: 78rpx;
|
|
|
}
|
|
|
.btn-right {
|
|
|
width: 248rpx;
|
|
|
height: 78rpx;
|
|
|
- background: #DC262B;
|
|
|
+ background: #dc262b;
|
|
|
border-radius: 10rpx;
|
|
|
font-size: 34rpx;
|
|
|
font-family: PingFang SC;
|