123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813 |
- <template>
- <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">CBB利润前置抢货区</view>
- <!-- #ifndef APP-PLUS -->
- <image class="money_bg" src="http://yiqugo.oss-cn-hangzhou.aliyuncs.com/87a32202304061420101468.png">
- </image>
- <!-- #endif -->
- <!-- #ifdef APP-PLUS -->
- <image class="money_bg" src="../../static/img/hinfo-bg1.png"></image>
- <!-- #endif -->
- </image>
- </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 :src="item" />
- </swiper-item>
- </swiper>
- <!-- <view class="message flex">
- <image class="message-left" src="../../static/img/hinco.png" mode=""></image>
- <u-notice-bar style="width: 100%;" mode="vertical" type="none" :volume-icon="false" :more-icon="true"
- :list="text" @click="goDetails" @getMore="navTo('/pages/index/message?type = 1')"></u-notice-bar>
- </view> -->
- <view class="navbar">
- <view class="navbar-item" @click="navTo('/pages/money/qudou')">
- <view class="navbar-font">
- <image class="navbar-image" src="../../static/img/been.png" mode=""></image>
- <view class="font">趣豆</view>
- </view>
- <view class="navbar-num">{{ userInfo.integral || '0.00' }}</view>
- </view>
- <view class="vvv"></view>
- <view class="navbar-item">
- <view class="navbar-font" @click="navTo('/pages/user/mygs')">
- <image class="navbar-image" src="../../static/money/m03.png" mode=""></image>
- <view class="font">我的收益</view>
- </view>
- <view class="navbar-num">{{ userInfo.profit > 0 ? userInfo.profit : '0' }}</view>
- </view>
- <view class="vvv"></view>
- <view class="navbar-item">
- <view class="navbar-font" @click="navTo('/pages/user/myAppointment')">
- <image class="navbar-image" src="../../static/money/m04.png" mode=""></image>
- <view class="font">易趣卷</view>
- </view>
- <view class="navbar-num">{{ userInfo.anticipate }}</view>
- </view>
- </view>
- <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="#FFFFFF" splitor-color="#FECD57" background-color="#FECD57"
- border-color="#FECD57" :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 class="bottom" @click="open(item)">
- <view class="bottom-font" v-if="item.str == '预约'">立即{{ item.str }}</view>
- <view class="bottom-font" v-else>{{ item.daotime == 1 ? '立即进入' : '您已预约' }}</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="btn-box">
- <view class="btn-left" @click="close()">取消</view>
- <view class="btn-right" @click="appointment()">确定</view>
- </view>
- </view>
- </uni-popup>
- <uni-popup ref="rule" :mask-click="false">
- <view class="regulation">
- <view class="regulation_close" @click="$refs.rule.close()">
- <image src="../../static/icon/guanbi@2x.png" mode=""></image>
- </view>
- <view class="regulation_name">会员须知及寄售协议</view>
- <view class="regulation_main">
- <scroll-view scroll-y="true" class="scroll-view">
- <view class="html" v-html="hyxy"></view>
- </scroll-view>
- </view>
- <view class="regulation_btn" @click="xyqd()">已阅读并同意</view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
- import {
- pay_list
- } from '../../api/wallet.js';
- import {
- article
- } from '@/api/user.js';
- import {
- getUserInfo,
- rate,
- details
- } from '@/api/user.js';
- import {
- mapState,
- mapMutations
- } from 'vuex';
- import {
- auction_list,
- subscribe,
- advance
- } from '@/api/hall.js';
- import {
- timeComputed
- } from '@/utils/rocessor.js';
- export default {
- components: {
- uniCountdowns
- },
- data() {
- return {
- hyxy: '',
- images: [], //轮播图
- name: '', //馆名字
- peoplename: '', //馆长名字
- price: '', //预约的价格
- id: '', //预约会场id
- oid: '', //馆id
- page: 1,
- limit: 10,
- loadingType: 'more',
- // text: [],
- article: [],
- list: [],
- aliData: {},
- bankData: {},
- wx: {},
- sm: 0,
- sbly: ''
- };
- },
- 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) {
- this.oid = option.id;
- this.name = option.name;
- this.peoplename = option.peoplename;
- this.gethyxy();
- this.isSm();
- pay_list({}).then(({
- data
- }) => {
- this.wx = data.wx;
- this.aliData = data.zfb;
- this.bankData = data.bank;
- });
- },
- onShow() {
- this.list = [];
- this.page = 1;
- this.limit = 10;
- this.loadingType = 'more';
- this.loadData();
- },
- computed: {
- ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
- },
- methods: {
- ...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
- gethyxy() {
- details({}, 2).then(({
- data
- }) => {
- data.content = data.content.replace(/nowrap/gi, 'wrap');
- this.hyxy = data.content;
- });
- },
- isSm() {
- rate({}).then(e => {
- this.sm = e.data.is_auth;
- if (e.data.is_auth == 3) {
- this.sbly = e.data.off;
- }
- });
- },
- loadData() {
- const obj = this;
- if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
- return;
- }
- obj.loadingType = 'loading';
- auction_list({
- page: obj.page,
- limit: obj.limit,
- auction_gu_id: obj.oid
- }).then(({
- data
- }) => {
- obj.images = data.slider_image;
- console.log(data);
- data.data.forEach(e => {
- let now_time = timeComputed(e.time);
- 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);
- if (data.data.length == obj.limit) {
- obj.loadingType = 'more';
- obj.page++;
- } else {
- obj.loadingType = 'nomore';
- }
- });
- },
- open(item) {
- if (this.sm == 0) {
- uni.showModal({
- title: '提示',
- content: '您未实名认证无法参与,是否前去实名认证?',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/user/approve'
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- return;
- }
- if (this.sm == 1) {
- return this.$api.msg('实名认证正在审核中请耐心等待');
- }
- if (this.sm == 3) {
- uni.showModal({
- title: '提示',
- content: '申请失败,原因' + this.sbly + '是否重新申请',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/user/approve'
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- return;
- }
- 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;
- }
- // 场次是否已经预约sta=1未预约
- if (item.sta != 1) {
- this.id = item.id;
- advance({
- id: item.id
- })
- .then(e => {
- console.log(e, 'success');
- this.nav();
- })
- .catch(e => {
- console.log(e, 'fail');
- });
- } else {
- this.price = item.anticipate;
- this.id = item.id;
- // this.$refs.popup.open();
- this.$refs.rule.open();
- }
- },
- xyqd() {
- this.$refs.rule.close();
- this.$refs.popup.open();
- },
- goDetails(e) {
- console.log(e, '123456');
- uni.navigateTo({
- url: '/pages/index/messageInfo?id=' + this.article[e].id
- });
- },
- close() {
- this.price = '';
- this.id = '';
- this.$refs.popup.close();
- },
- nav() {
- uni.navigateTo({
- url: '/pages/hall/hallinfo?id=' + this.id + '&name=' + this.name + '&peoplename=' + this
- .peoplename
- });
- },
- navTo(url) {
- uni.navigateTo({
- url
- });
- },
- toBack() {
- uni.navigateBack({});
- },
- appointment() {
- 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);
- });
- },
- isTime(index) {
- console.log(index, '123');
- this.list[index].daotime = 1;
- }
- }
- };
- </script>
- <style lang="less">
- page,
- .center {
- height: auto;
- min-height: 100%;
- background: #f2f5f4;
- }
- .status_bar {
- height: var(--status-bar-height);
- width: 100%;
- }
- .money-box {
- color: #ffffff;
- text-align: center;
- position: relative;
- .header {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 80rpx;
- font-size: 32rpx;
- font-weight: 700;
- z-index: 99;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .goback-box {
- position: absolute;
- left: 18rpx;
- top: 0;
- height: 80rpx;
- display: flex;
- align-items: center;
- }
- .goback {
- z-index: 100;
- width: 34rpx;
- height: 34rpx;
- }
- .money_bg {
- width: 100%;
- height: 382rpx;
- display: block;
- }
- }
- .shingle-mmain {
- position: relative;
- z-index: 2;
- margin: -90rpx auto 0;
- width: 690rpx;
- height: 176rpx;
- background: #ffffff;
- box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- border-radius: 20rpx;
- background-color: #ffffff;
- .smmain-item {
- width: 33%;
- display: flex;
- flex-direction: column;
- align-items: center;
- .red {
- color: #fd3b39 !important;
- }
- .smitem-top {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bolder;
- color: #0c1732;
- }
- .smitem-bottom {
- margin-top: 10rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0c1732;
- }
- .people {
- justify-content: center;
- .peopleitem {
- width: 24rpx;
- height: 34rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- .shu {
- width: 2rpx;
- height: 70rpx;
- background: #dcdcdc;
- }
- }
- .main {
- margin: 30rpx auto 0;
- padding: 50rpx 50rpx 36rpx 50rpx;
- width: 690rpx;
- background: #ffffff;
- box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- border-radius: 20rpx;
- .mtitle-english {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #9ea6ba;
- }
- .mmain {
- margin-top: 24rpx;
- .mmain-info {
- .mmain-title {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .mmaint-left {
- width: 52rpx;
- height: 40rpx;
- }
- .mmaint-font {
- margin-left: 10rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #0c1732;
- }
- .mmaint-time {
- margin-left: 20rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0c1732;
- }
- }
- .mmain-time {
- justify-content: flex-start;
- margin-top: 10rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0c1732;
- .lyy-b-jz {
- margin-left: 10rpx;
- }
- }
- }
- .mmain-image {
- padding-top: 14rpx;
- width: 182rpx;
- height: 182rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .bottom {
- margin-top: 32rpx;
- width: 380rpx;
- height: 64rpx;
- background: #d13737;
- border-radius: 20rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- .bottom-font {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #ffffff;
- }
- .bottom-image {
- margin-left: 12rpx;
- width: 24rpx;
- height: 22rpx;
- }
- }
- }
- .popup {
- width: 582rpx;
- background: #ffffff;
- border-radius: 20rpx;
- padding: 118rpx 20rpx 30rpx;
- .popup-title {
- text-align: center;
- font-size: 42rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0c1732;
- }
- .btn-box {
- padding-top: 90rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .btn-left {
- width: 248rpx;
- height: 78rpx;
- border: 2rpx solid #dc262b;
- border-radius: 10rpx;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #dc262b;
- text-align: center;
- line-height: 78rpx;
- }
- .btn-right {
- width: 248rpx;
- height: 78rpx;
- background: #dc262b;
- border-radius: 10rpx;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #ffffff;
- text-align: center;
- line-height: 78rpx;
- }
- }
- }
- .message {
- justify-content: space-around;
- margin: 20rpx auto 0;
- padding: 16rpx 40rpx 16rpx 50rpx;
- width: 690rpx;
- background: #ffffff;
- box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- border-radius: 20rpx;
- .message-left {
- width: 52rpx;
- height: 52rpx;
- flex-shrink: 0;
- }
- .message-font {
- margin: 0 40rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0c1732;
- }
- .message-right {
- width: 18rpx;
- height: 30rpx;
- }
- }
- .hallist-bg {
- position: relative;
- z-index: 10;
- margin: -280rpx auto 0;
- width: 702rpx;
- height: 300rpx;
- border-radius: 14rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .navbar {
- display: flex;
- align-items: center;
- justify-content: space-around;
- width: 700rpx;
- background: #ffffff;
- box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- border-radius: 20rpx;
- margin: 40rpx auto 0;
- padding: 40rpx 0 50rpx;
- .vvv {
- width: 2rpx;
- height: 74rpx;
- background: #dcdcdc;
- }
- .navbar-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- .navbar-font {
- margin-bottom: 10rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- image {
- margin-right: 10rpx;
- width: 40rpx;
- height: 40rpx;
- }
- .font {
- font-size: 30rpx;
- font-weight: bold;
- color: #0c1732;
- }
- }
- .navbar-num {
- font-size: 34rpx;
- font-weight: bold;
- color: #0c1732;
- }
- }
- }
- .regulation {
- width: 650rpx;
- padding: 30rpx;
- background: #ffffff;
- border-radius: 20rpx;
- position: relative;
- .regulation_close {
- position: absolute;
- width: 44rpx;
- height: 44rpx;
- top: 30rpx;
- right: 30rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .regulation_name {
- padding: 40rpx 0;
- text-align: center;
- font-size: 30rpx;
- font-weight: bold;
- }
- .scroll-view {
- height: 735rpx;
- }
- .regulation_btn {
- margin: 20rpx auto 0;
- width: 496rpx;
- height: 78rpx;
- background: #dc262b;
- border-radius: 10rpx;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #ffffff;
- text-align: center;
- line-height: 78rpx;
- }
- }
- </style>
|