1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261 |
- <template>
- <view class="pages">
- <view class="" :style="{height: navHeight+'px' }"></view>
- <view class="navbar-box">
- <u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}"
- leftIconColor="#fff" bgColor="transparent"></u-navbar>
- </view>
- <view class="page-wrap">
- <view class="base-info">
- <view class="up u-flex">
- <image class="img" :src="pageContent.performImg" mode="aspectFill" alt="" />
- <view class="text">
- <view class="name text-item">{{pageContent.performName}}</view>
- <view class="time text-item">日期 {{pageContent.timeDate}}({{pageContent.timeWeek}})</view>
- <view class="time text-item">场次 {{pageContent.performTimeStart}} -
- {{pageContent.performTimeEnd}}</view>
- {{pageContent.goodsName}}{{pageContent.seatTypeName}}
- <view class=" text-item">{{pageContent.auditoriumName}}</view>
- {{performInfo.name}}
-
- </view>
- </view>
- <view class="down">
- <view class="num-wrap u-flex u-row-between">
- <view class="title">选购数量</view>
- <view class="num">{{totalVisitor}}</view>
- </view>
- </view>
- </view>
- <view class="block-wrap purchaser">
- <view class="block-title u-flex">
- <view class="name">购票人信息</view>
-
- </view>
- <view class="" v-if="vuex_member_info.isAuth">
- <view class="item">姓名:{{pageContent.purchaser.name}}</view>
- <view class="item">手机号:{{pageContent.purchaser.mobile|hidePhoneNumber}}</view>
- <view class="item">身份证:{{pageContent.purchaser.idcard|maskID}}</view>
- </view>
- <view class="un-auth" v-else @click="$u.route('center/factorauth',{from:'bookticket'})">
- 请先<text style="color: #ED0000;">实名认证</text>
- </view>
- </view>
- <view class="block-wrap visitors" v-for="(goods, goodsIndex) in pageContent.goodsList" :key="goodsIndex">
- <view class="block-title u-flex">
- <view class="name">{{goods.goodsName}}({{goods.saleNum}}张)</view>
- <text v-if="goods.realList && goods.realList[0]">需要{{goods.realList[0].realNum}}张身份证</text>
-
- </view>
-
- <view class="people-list u-flex u-flex-wrap">
-
- <view class="people btn" v-for="(visitor,index) in goods.visitors" :key="index">
- {{visitor.name}}
- </view>
-
-
- <view v-if="goods.realList && goods.realList[0]" class="btn u-flex u-row-center" @click="showVisitorSelect(goodsIndex)">
- <u-icon name="plus-circle" color="#2D2D2D" size="32rpx"></u-icon>
- <text class="text">新增/更换</text>
- </view>
- </view>
-
- <view class="peoples" v-if="goods.visitors && goods.visitors.length>0">
- <view class="peoples-item u-flex u-row-between" v-for="(visitor,index) in goods.visitors" :key="index">
- <view class="left u-flex u-row-center u-flex-col">
- <view style="margin-bottom: 5px;">观影人{{ index + 1 }}</view>
- <u-icon @click="delVisitor(goodsIndex, visitor)" name="close-circle" color="#2D2D2D" size="32rpx"></u-icon>
- </view>
- <view class="center">
- <view class="center-item name">{{visitor.name}}</view>
- <view class="center-item mobile">手机号 {{visitor.mobile}}</view>
- <view class="center-item idcard">身份证 {{visitor.idcard}}</view>
- </view>
- <view class="right" @click="editVisitor(visitor)">编辑</view>
- </view>
- </view>
- </view>
- <view class="coupon u-flex u-row-between block-wrap" @click="selectCoupon">
- <view class="left">优惠券</view>
- <view class="right u-flex">
- <text v-if="couponList.length<1||Number(this.totalPrice)<=0">暂无可用</text>
- <text v-if="coupon.quota" style="color: #EF2929;">已选1张优惠券</text>
- <text v-if="couponList.length>0&&!coupon.quota&&Number(this.totalPrice)>0">未选择优惠券</text>
- <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
- </view>
- </view>
- <view class="notice">
- <view class="title u-flex u-row-between u-border-bottom">
- <text>购票须知</text>
- </view>
- <view class="notice-item parse-content">
- <u-parse :content="pageContent.ticketNotice"></u-parse>
- </view>
-
- </view>
- </view>
- <u-popup :show="visitorShow">
- <view class="people-show-content">
- <view class="title">
- <view class="cancel" @click="visitorShow=false">取消</view>
- 选择观影人
- </view>
- <view class="add-btn u-flex u-row-center" @click="addVisitor">
-
- 添加观影人信息
- </view>
- <view class="list">
- <u-checkbox-group v-model="selectedVisitor[currentGoodsIndex]" iconPlacement="left">
- <view class="people u-flex u-row-between"
- v-for="(item,index) in visitorList"
- :key="index"
- :class="{'disabled': selectedVisitors.includes(item.idcard) && !selectedVisitor[currentGoodsIndex].includes(item.idcard)}">
- <u-checkbox
- activeColor="#ED0303"
- :label="item.name"
- :name="item.idcard"
- :disabled="selectedVisitors.includes(item.idcard) && !selectedVisitor[currentGoodsIndex].includes(item.idcard)"
- ></u-checkbox>
- <u-icon
- name="edit-pen-fill"
- color="#7F7F7F"
- size="32rpx"
- @click="editVisitor(item)"
- ></u-icon>
- </view>
- </u-checkbox-group>
- </view>
- <view class="full-btn" @click="confirmVisitor">确定</view>
- </view>
- </u-popup>
- <view class="page-bottom">
- <view class="inner u-flex u-row-between">
- <view class="left u-flex u-col-top">
- <text>实付金额:</text>
- <view class="total-price">
- ¥{{pageContent.salePrice}}
- <view class="original-price">
- 原价¥{{pageContent.originalPrice}}
- </view>
-
- {{couponAmount}}
- </view>
- </view>
- <view class="right">
- <view class="btn active" v-if="pageContent.salePrice>=0&&cansubmit&&vuex_member_info.isAuth"
- @click="setTemplate">立即支付</view>
-
- <view class="btn" v-else>立即支付</view>
- </view>
- </view>
- </view>
- <u-modal
- :show="umodal.show"
- :title="umodal.title"
- :content='umodal.content'
- confirmColor="#ED0303"
- @confirm="modalConfirm"
- ></u-modal>
- </view>
- </template>
- <script>
- import { locale } from "moment/moment";
- import {
- systemInfo
- } from "@/mixin.js";
-
- import wxH5 from "weixin-jsapi";
-
- export default {
- mixins: [systemInfo],
- data() {
- return {
- performId: '',
- performInfo: {},
- pageData: {},
- pageContent: {
- performName: '',
- goodsName: '',
- timeDate: '',
- timeWeek: '',
- seatTypeName: '',
- auditoriumName: '',
- performTimeEnd: '',
- performTimeStart: '',
- purchaser: {
- mobile: '',
- idcard: ''
- },
- ticketNotice: '',
- viewerList: [],
- goodsList:[],
- },
- ticketNotice: '',
- cansubmit: true,
- staticUrl: this.$commonConfig.staticUrl,
- visitors: [],
- visitorShow: false,
- visitorList: [],
- selectedVisitor: {},
- params: {},
- orderId: '',
- payResult: {},
- paysuccess: false,
- templateIdList: [],
- umodal:{
- show:false,
- title:'温馨提示',
- content:''
- },
- scene:null,
- retailId:null,
- label:null,
- retailId:null,
- couponList:[],
- latitude:null,
- longitude:null,
- selectGoodsList:[],
- currentGoodsIndex: '',
- selectedVisitors: [],
- }
- },
- watch: {
- visitors: {
- handler: function(newValue, oldValue) {
- this.findOrderCoupons();
- console.log(`The value changed to ${newValue.length}`);
- },
- immediate: false
- }
- },
- computed: {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- totalVisitor() {
-
- return this.pageContent.goodsList.reduce((total, goods) => {
- return total + goods.saleNum;
- }, 0);
- },
- couponAmount() {
- let amount = 0;
- if (this.coupon.type == 1) {
- amount = this.coupon.quota || 0;
- } else if (this.coupon.type == 2) {
-
- const totalPrice = Math.round(this.totalPrice * 100);
- const discountRate = this.coupon.quota;
- const discountAmount = totalPrice * (discountRate / 100);
- const finalAmount = totalPrice - discountAmount;
- amount = finalAmount / 100;
-
-
-
- }
- return amount.toFixed(2);
- },
- },
- onShow() {
- this.getSettlement();
-
- if(this.totalPrice>0){
- this.findOrderCoupons()
- }
-
- },
- onLoad(page) {
- console.log('bookticket page', page);
- this.pageData = page;
- this.performId = page.performId;
- this.pageData.performTimeId = page.performTimeId;
- this.pageData.seatTypeId = page.seatTypeId;
- const selectGoodsList = uni.getStorageSync('selectGoodsList');
- if(selectGoodsList.length>0){
- this.selectGoodsList = JSON.parse(selectGoodsList);
- uni.removeStorage({
- key:'selectGoodsList'
- })
- }
- console.log('selectGoodsList',this.selectGoodsList);
- this.getSystemInfo();
-
- this.getTemplateIdList();
- },
- onUnload() {
- this.$u.vuex('coupon', {});
- },
- methods: {
- leftClick(e) {
- let pages = getCurrentPages();
- if (pages.length == 1) {
- uni.$u.route('/pages/index/index')
- } else {
- uni.navigateBack()
- };
- },
- getSettlement() {
- this.pageData.goodsList = this.selectGoodsList;
- this.$u.api.getSettlementV2(this.pageData).then(res => {
-
- this.pageContent = res.data;
- this.getMemberAll();
- }).catch(err => {
- console.log('getSettlement', err);
- })
- },
- getMemberAll() {
- let that = this;
-
- const userId = this.pageContent.viewerList[0]?.id;
- this.$u.api.selectMemberAll({
- userid: userId
- }).then(res => {
-
- this.visitorList = res.data.list;
-
-
- this.selectedVisitor = [];
- this.visitorList.forEach(visitor => {
- if (this.visitors.find(item => item.idcard === visitor.idcard)) {
- this.selectedVisitor.push(visitor.idcard);
- }
- });
- this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.idcard));
- console.log('this.visitorList',this.visitorList);
- console.log('this.selectedVisitor',this.selectedVisitor);
- console.log('this.visitors',this.visitors);
- }).catch(err => {
- console.log('getMemberAll', err);
- })
- },
- showVisitorSelect(goodsIndex) {
- this.currentGoodsIndex = goodsIndex;
- this.visitorShow = true;
-
-
- if(!this.selectedVisitor[goodsIndex]) {
- this.selectedVisitor[goodsIndex] = [];
- }
-
-
- const currentGoods = this.pageContent.goodsList[goodsIndex];
- if(currentGoods.visitors) {
- this.selectedVisitor[goodsIndex] = currentGoods.visitors.map(v => v.idcard);
- }
-
- this.selectedVisitors = this.pageContent.goodsList.reduce((acc, goods, index) => {
- if(index !== goodsIndex && goods.visitors) {
- acc.push(...goods.visitors.map(v => v.idcard));
- }
- return acc;
- }, []);
- },
- delVisitor(goodsIndex, visitor) {
- console.log('goodsIndex', goodsIndex);
- console.log('visitor', visitor);
-
-
- const goods = this.pageContent.goodsList[goodsIndex];
- if(goods) {
-
- this.$set(goods, 'visitors', (goods.visitors || []).filter(v => v.idcard !== visitor.idcard));
- }
-
-
- if(this.selectedVisitor[goodsIndex]) {
-
- this.$set(this.selectedVisitor, goodsIndex,
- this.selectedVisitor[goodsIndex].filter(id => id !== visitor.idcard)
- );
- }
-
- this.selectedVisitors = this.pageContent.goodsList.reduce((acc, goods, index) => {
- if(index !== goodsIndex && goods.visitors) {
- acc.push(...goods.visitors.map(v => v.idcard));
- }
- return acc;
- }, []);
- },
- addVisitor() {
- uni.$u.route('/center/people', {
- type: 'addVisitor',
- fromPage: 'bookticket'
- });
- },
- editVisitor(item) {
- uni.$u.route('/center/people', {
- type: 'editVisitor',
- fromPage: 'bookticket',
- id: item.id,
- name: item.name,
- mobile: item.mobile,
- idcard: item.idcard,
- });
- },
- getTemplateIdList() {
- this.$u.api.templateIdList({
- templateLabel: 'order_pay'
- }).then(res => {
-
- this.templateIdList = res.data.list.map(item => {
- return item.templateId
- });
-
-
-
- }).catch(err => {
- console.log('getTemplateIdList', err);
- })
- },
- async submitorder() {
- let _this = this;
- let retailId = null;
- try {
- retailId = await new Promise((resolve, reject) => {
- uni.getStorage({
- key: 'retailId',
- success: function (res) {
- console.log('getPositionData retailId====', res.data);
- resolve(res.data);
- },
- fail: function (error) {
- reject(error);
- }
- });
- });
- console.log('getPositionData retailId', retailId);
- } catch (error) {
- console.error('获取retailId失败', error);
-
- }
- this.retailId = retailId;
- console.log('submitorder retailId',this.retailId);
- console.log('this.pageContent',this.pageContent);
-
- let params = {
- performId: this.pageContent.performId,
- goodsList: this.pageContent.goodsList.map(goods => {
- return {
- goodsId: goods.goodsId,
- saleNum: goods.saleNum,
- tourists: (goods.visitors ?? []).map(visitor => {
- return {
- realType: goods.realList[0].realType,
- name: visitor.name,
- mobile: visitor.mobile,
- idcard: visitor.idcard
- }
- })
- }
- }),
- auditoriumId: this.pageContent.auditoriumId,
- performTimeId: this.pageContent.performTimeId,
- seatTypeId: this.pageContent.seatTypeId,
- purchaser: {
- name: this.pageContent.purchaser.name,
- mobile: this.pageContent.purchaser.mobile,
- idcard: this.pageContent.purchaser.idcard
- },
- label: this.label,
- retailId: this.retailId,
- coupon: {
- memberCouponId: this.coupon.quota ? this.coupon.id : null
- },
- longitude: this.longitude,
- latitude: this.latitude
- }
-
-
- this.$u.api.submitOrderV2(params, {custom:{toast:false}})
- .then(res => {
- this.orderId = res.data.orderId;
- this.gotoPay();
- })
- .catch(err => {
- this.cansubmit = true;
- this.umodal.title = '';
- this.umodal.content = err.msg;
- this.umodal.show = true;
- }).finally(()=>{
- uni.hideLoading()
- })
- },
- modalConfirm(){
- this.umodal.show = false;
- },
-
- templateEven() {
- let that = this
- wx.showModal({
- title: '温馨提示',
- content: '为更好的促进与您的交流,服务号需要实时向您发送消息',
- confirmText: "同意",
- cancelText: "拒绝",
- success: function(res) {
- if (res.confirm) {
-
-
-
- that.setTemplate();
- } else if (res.cancel) {
-
-
- wx.showModal({
- title: '温馨提示',
- content: '拒绝后您将无法获取实时的消息',
- confirmText: "知道了",
- showCancel: false,
- success: function(res) {
- that.gotoPay();
-
-
- }
- });
- }
- }
- });
- },
- showOpenLocationSettings() {
- uni.showModal({
- title: '提示',
- content: '需要获取您的地理位置,请前往设置中开启',
- confirmText: '去设置',
- success: (res) => {
- if (res.confirm) {
- uni.openSetting({
- success: (res) => {
- if (res.authSetting['scope.userLocation']) {
- this.setTemplate();
- }
- }
- });
- }
- }
- });
- },
- getUserLocation() {
- return new Promise((resolve, reject) => {
- uni.getLocation({
- type: 'gcj02',
- success: (res) => {
- resolve(res);
- },
- fail: (err) => {
- reject(err);
- }
- });
- });
- },
-
- async setTemplate() {
- if(this.needIdcardNumber&&this.needIdcardNumber!==this.visitors.length){
- uni.showToast({
- title:'观影人信息不正确',
- icon:'none'
- })
- return false
- }
-
- try {
- const location = await this.getUserLocation();
- this.longitude = location.longitude;
- this.latitude = location.latitude;
- if (!this.longitude || !this.latitude) {
- uni.showToast({
- title: '无法获取地理位置',
- icon: 'none'
- });
- return;
- }
- console.log('location', location);
- } catch (err) {
- if (err.errMsg === 'getLocation:fail auth deny') {
-
- this.showOpenLocationSettings();
- } else {
- uni.showToast({
- title: '获取地理位置失败',
- icon: 'none'
- });
- }
- return
- }
-
- let that = this;
-
-
- uni.requestSubscribeMessage({
- tmplIds: that.templateIdList,
- success(res) {
-
- console.log("设置小程序订阅消息 success:", res);
- },
- fail(res) {
- console.log("设置小程序订阅消息 fail:", res);
- },
- complete(res) {
-
- that.submitorder();
- console.log("设置小程序订阅消息 complete:", res);
- }
- })
-
-
- that.gotoPay()
-
- },
- gotoPay() {
- this.$u.api.gotoPayV2({
- orderId: this.orderId,
- openid: ''
- }).then(res => {
-
-
-
-
- if(!res.data.needPay){
-
- uni.$u.route('/center/orderdetails', {
- type:'redirectTo',
- id: this.orderId
- });
- }else {
- this.payResult = res.data.payInfo;
- this.payResult.package = res.data.payInfo.packageValue;
-
- this.initConfig(this.payResult)
-
-
- this.wxPay()
-
- }
-
-
-
-
-
-
-
- }).catch(err => {
- this.cansubmit = true;
-
-
- console.log('gotoPay', err);
- })
- },
- wxPay() {
- let that = this;
- uni.requestPayment({
- ...this.payResult,
- "provider": "wxpay",
- "orderInfo": {
-
-
-
-
-
-
-
- },
- success(res) {
- that.payQuery();
- },
- fail(e) {
- uni.$u.route('/center/order', {
- status: 0
- });
- console.log('wxPayfail', e);
- },
- complete() {
- this.cansubmit = true;
- }
- })
- },
- payQuery() {
- let that = this;
- let retryCount = 0;
- let maxRetryCount = 5;
- let interval = 2000;
- let timeout = 10000;
- let timer;
- uni.showLoading({
- title: '支付结果查询中'
- })
- timer = setInterval(() => {
- retryCount++;
- if (retryCount > maxRetryCount || retryCount * interval > timeout) {
- clearInterval(timer);
- uni.hideLoading();
- console.log("支付查询超时或达到最大重试次数");
-
- uni.redirectTo({
- url: '/center/order'
- });
- } else {
- console.log("第" + retryCount + "次查询");
-
-
-
- this.$u.api.payQueryV2({
- orderId: this.orderId
- }).then(res => {
-
- let payStatus = res.data.payStatus;
- if (payStatus === 1) {
-
-
-
-
- uni.redirectTo({
- url: '/center/order?status=3'
- });
-
- } else if (payStatus === 0 || payStatus === 2) {
- this.payQuery()
- } else if (payStatus === 3) {
- uni.toast('支付失败')
- }
- clearInterval(timer);
- }).catch(err => {
- console.log('payQuery', err);
- }).finally(() => {
- uni.hideLoading()
- this.cansubmit = true;
- })
- }
- }, interval);
- },
-
- initConfig() {
-
- let that = this
- wxH5.config({
- debug: false,
- appId: that.payResult.appId,
- timestamp: that.payResult.timeStamp,
- nonceStr: that.payResult.nonceStr,
- signature: that.payResult.paySign,
- jsApiList: ['chooseWXPay', 'checkJsApi']
- })
- wxH5.ready(() => {
- wxH5.chooseWXPay({
- timestamp: that.payResult.timeStamp,
- nonceStr: that.payResult.nonceStr,
- package: that.payResult.packageValue,
- signType: 'SHA1',
- paySign: that.payResult.paySign,
- success: () => {
- that.payQuery();
- },
- fail: (e) => {
- uni.$u.route('/center/order', {
- status: 0
- });
- console.log('wxPayfail', e);
- },
- cancel: () => {
- uni.$u.route('/center/order', {
- status: 0
- });
- that.cansubmit = true;
- }
- })
- })
-
- },
- selectCoupon(){
- if(Number(this.totalPrice)<=0){
- return
- }
- this.$u.route('/center/couponselect',{
- salePrice:this.totalPrice,
- performId:this.performId,
- goodsId: this.pageContent.goodsId
- })
- },
- findOrderCoupons() {
- let param = {
- salePrice: this.totalPrice,
- performId: this.performId,
- goodsId: this.pageContent.goodsId
- };
-
- this.$u.api.findOrderCoupons(param)
- .then(res => {
- this.couponList = res.data.list || [];
- console.log('this.couponList',this.couponList);
- console.log('this.coupon.id',this.coupon.id);
- if (this.couponList.length < 1 || !this.couponList.some(obj => obj.id === this.coupon.id)) {
- this.$u.vuex('coupon', {});
- }
- })
- .catch(err => {
-
- });
- },
-
- confirmVisitor() {
- const goods = this.pageContent.goodsList[this.currentGoodsIndex];
-
-
- if(goods.realList[0] && this.selectedVisitor[this.currentGoodsIndex].length !== goods.realList[0].realNum) {
- uni.showToast({
- title: `请选择${goods.realList[0].realNum}位观影人`,
- icon: 'none'
- })
- return false;
- }
-
- goods.visitors = this.visitorList
- .filter(obj => this.selectedVisitor[this.currentGoodsIndex].includes(obj.idcard))
- .map(item => ({
- name: item.name,
- mobile: item.mobile,
- idcard: item.idcard
- }));
- this.visitorShow = false;
- },
-
- setTemplate() {
-
- const isValid = this.pageContent.goodsList.every(goods => {
-
- if(!goods.realList || !goods.realList[0]) return true;
-
-
- if(!goods.visitors) return false;
-
-
- return goods.visitors.length === goods.realList[0].realNum;
- });
- if(!isValid) {
- uni.showToast({
- title: '请为需要实名认证的票种选择足够的观影人',
- icon: 'none'
- });
- return;
- }
-
- this.submitorder();
- }
- }
- }
- </script>
- <style>
- page {
- background: linear-gradient(180deg, #ED0000 0%, #F9FBFD 50%, #fff 100%);
- background-repeat: no-repeat;
- }
- </style>
- <style lang="scss" scoped>
- .base-info {
- border-radius: 30rpx;
- overflow: hidden;
- background: radial-gradient(circle at -26rpx 294rpx, transparent 8%, #fff 4%) left, radial-gradient(circle at calc(100% + 26rpx) 294rpx, transparent 8%, #fff 4%) right;
- background-size: 50% 100%;
- background-repeat: no-repeat;
- padding: 34rpx 36rpx;
- box-sizing: border-box;
- margin: 30rpx 0 40rpx;
- .up {
- margin-bottom: 36rpx;
- .img {
- display: block;
- width: 172rpx;
- height: 230rpx;
- border-radius: 20rpx;
- margin-right: 32rpx;
- }
- .text {
- flex: 1;
- font-size: 22rpx;
- font-weight: 400;
- color: #606060;
- line-height: 1;
- }
- .text-item {
- margin-bottom: 18rpx;
- }
- .name {
- font-size: 32rpx;
- line-height: 1.5;
- font-weight: bold;
- color: #2D2D2D;
- }
- .addr {
- font-size: 24rpx;
- font-weight: 500;
- color: #2D2D2D;
- }
- }
- .down {
- position: relative;
- &:before {
- content: '';
- width: calc(100% + 26rpx);
- height: 1px;
- position: absolute;
- left: -13rpx;
- top: -2rpx;
- border-top: 4rpx dashed #F39FA0;
- }
- .num-wrap {
- padding-top: 36rpx;
- .title {
- font-size: 14px;
- color: #4E4E4E;
- }
- }
- }
- }
- .block-wrap {
- background: #FFFFFF;
- box-shadow: 0rpx 0rpx 20rpx 2rpx rgba(221, 221, 221, 0.5);
- border-radius: 20rpx;
- margin-bottom: 28rpx;
- padding: 32rpx 30rpx 34rpx;
- .block-title {
- // padding-left: 16rpx;
- position: relative;
- margin-bottom: 22rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #CACACA;
- // &:before{
- // content: '';
- // width: 6rpx;
- // height: 32rpx;
- // background: #1677FF;
- // border-radius: 4rpx;
- // position: absolute;
- // left: 0;
- // top: 50%;
- // margin-top: -16rpx;
- // }
- .name {
- font-size: 32rpx;
- font-weight: bold;
- color: #2D2D2D;
- margin-right: 20rpx;
- }
- }
- .no-people {
- font-size: 28rpx;
- font-weight: 400;
- color: #7F7F7F;
- .right {
- margin-left: 20rpx;
- color: #1677FF;
- }
- }
- .peoples {
- font-size: 28rpx;
- font-weight: 400;
- color: #7F7F7F;
- margin-bottom: 24rpx;
-
- .left{
- text-align: center;
- }
- .center{
- .center-item{
- & ~ .center-item{
- margin-top: 3px;
- }
- }
- }
- .peoples-item {
- margin-bottom: 10rpx;
- }
- // .name {
- // margin-left: 20rpx;
- // margin-right: 28rpx;
- // font-size: 28rpx;
- // font-weight: bold;
- // color: #363636;
- // }
- .people-id {
- font-size: 20rpx;
- font-weight: 400;
- color: #606060;
- }
- .right {
- font-size: 28rpx;
- font-weight: 400;
- color: #ED0303;
- }
- }
- }
- .people-list {
- margin-bottom: 20rpx;
- .btn {
- width: 185rpx;
- height: 60rpx;
- line-height: 60rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #2D2D2D;
- background-color: #F1F1F1;
- border: 1px solid #F1F1F1;
- border-radius: 8rpx;
- margin-bottom: 12rpx;
- .text {
- margin-left: 16rpx;
- }
- &.people {
- margin-right: 16rpx;
- text-align: center;
- background-color: #FFF2F2;
- border-color: #ED0303;
- }
- }
- }
- .visitors {
- margin-bottom: 20rpx;
- }
- .people-show-content {
- background: #FFFFFF;
- border-radius: 40rpx 40rpx 0rpx 0rpx;
- padding: 30rpx 40rpx;
- .title {
- position: relative;
- font-size: 32rpx;
- font-weight: 500;
- color: #606060;
- margin-bottom: 46rpx;
- text-align: center;
- .cancel {
- position: absolute;
- left: 0;
- top: 0;
- }
- }
- .add-btn {
- margin-bottom: 28rpx;
- background: #ffdee1;
- border-radius: 44rpx;
- padding: 26rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #ff1616;
- .img {
- width: 28rpx;
- height: 36rpx;
- margin-right: 36rpx;
- }
- }
- .list {
- /deep/ .u-radio-group {
- flex-wrap: wrap;
- }
- /deep/ .u-checkbox-group {
- flex-wrap: wrap;
- }
- overflow-y: auto;
- height: 40vh;
- .people {
- width: 100%;
- margin-bottom: 24rpx;
- }
- }
- .btn {}
- }
- .coupon {
- .left{
- font-weight: bold;
- font-size: 28rpx;
- color: #2D2D2D;
- }
- .right{
- font-weight: 400;
- font-size: 24rpx;
- color: #606060;
- }
- /deep/ .u-icon{
- top: 1px;
- margin-left: 5px;
- position: relative;
-
- }
- }
- .notice {
- background: #FFFFFF;
- box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(232, 232, 232, 0.5);
- border-radius: 16rpx;
- padding: 44rpx 36rpx;
- margin-bottom: 24rpx;
- .title {
- font-size: 28rpx;
- font-weight: bold;
- color: #2D2D2D;
- padding-bottom: 20rpx;
- margin-bottom: 26rpx;
- border-bottom-style: dashed;
- }
- .notice-item {
- font-size: 24rpx;
- font-weight: 400;
- color: #7F7F7F;
- line-height: 36rpx;
- margin-bottom: 8rpx;
- }
- }
- .page-bottom {
- position: relative;
- z-index: 1001;
- height: 98rpx;
- padding: 24rpx 20rpx 50rpx;
- .inner {
- position: fixed;
- background-color: #fff;
- height: 98rpx;
- left: 0;
- right: 0;
- bottom: 0;
- padding: 24rpx 20rpx 50rpx;
- box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(215, 215, 215, 0.5);
- .total-price {
- font-size: 40rpx;
- font-weight: bold;
- color: #ED0000;
- .bottom-coupon{
- font-size: 24rpx;
- }
- .original-price{
- font-size: 24rpx;
- color: #7F7F7F;
- text-decoration: line-through;
- }
- }
- .btn {
- font-size: 28rpx;
- height: 80rpx;
- line-height: 80rpx;
- border-radius: 50rpx;
- padding: 0 50rpx;
- background-color: #eee;
- color: #333;
- text-align: center;
- &.active {
- background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
- color: #fff;
- }
- }
- }
- }
- .purchaser {
- .item {
- margin-bottom: 10rpx;
- font-size: 26rpx;
- color: #333;
- }
- .un-auth {
- padding: 26rpx;
- background-color: #eee;
- color: #333;
- text-align: center;
- border-radius: 8rpx;
- }
- }
- .list {
- .people {
- &.disabled {
- opacity: 0.5;
- }
- }
- }
- </style>
|