Browse Source

演员页面,实名认证页面,其他页面调整

gcz 1 year ago
parent
commit
dac1753770
9 changed files with 327 additions and 21 deletions
  1. 137 0
      center/factorauth.vue
  2. 3 3
      center/memberinfo.vue
  3. 3 2
      center/order.vue
  4. 11 1
      common/apiurl.js
  5. 7 0
      pages.json
  6. 112 0
      pages/actors.vue
  7. 27 0
      pages/bookticket.vue
  8. 4 4
      pages/index/index.vue
  9. 23 11
      pages/ticketlist.vue

+ 137 - 0
center/factorauth.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="pages">
+		<u-navbar
+			title="实名认证"
+			:placeholder="true"
+			:autoBack="true"
+			@leftClick="leftClick"
+			 :safeAreaInsetTop="true"
+		>
+		</u-navbar>
+		<view class="page-wrap">
+			<view class="login-box">
+				<u--form labelPosition="left" labelWidth="200rpx" :model="form" :rules="rules" ref="uForm" >
+					<u-form-item label="真实姓名" prop="name" borderBottom ref="name" >
+						<u--input
+							v-model="form.name"
+							placeholder="真实姓名"
+							border="none"
+							:customStyle="inputCustomStyle"
+						></u--input>
+					</u-form-item>
+					<u-form-item label="身份证号码" prop="idcard" ref="idcard" >
+						<u--input
+							v-model="form.idcard"
+							border="none"
+							placeholder="身份证号码"
+							:customStyle="inputCustomStyle"
+						></u--input>
+					</u-form-item>
+				</u--form>
+				<u-button 
+					@click="submit"
+					text="提交认证" 
+					type="error" 
+					shape="circle" 
+					:customStyle="{'margin-top':'60rpx',height:'98rpx','box-sizing':'border-box'}">
+				</u-button>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				backUrl:'',
+				form:{
+					name:'',
+					idcard:''
+				},
+				rules: {
+					name: {
+						type: 'string',
+						required: true,
+						message: '请填写真实姓名',
+						trigger: ['blur', 'change']
+					},
+					idcard:[
+						{
+							type: 'string',
+							required: true,
+							message: '请填身份证号码',
+							trigger: ['blur', 'change']
+						},
+						{
+							validator: (rule, value, callback) => {
+								// 上面有说,返回true表示校验通过,返回false表示不通过
+								// uni.$u.test.mobile()就是返回true或者false的
+								return uni.$u.test.idCard(value);
+							},
+							message: '身份证号码不正确',
+							// 触发器可以同时用blur和change
+							trigger: ['change','blur'],
+						}
+					]
+				},
+				inputCustomStyle:{}
+			}
+		},
+		onShow() {
+		},
+		onReady() {
+			//onReady 为uni-app支持的生命周期之一
+			this.$refs.uForm.setRules(this.rules)
+		},
+		onLoad(page) {
+			console.log('page',page);
+			this.backUrl =  decodeURIComponent(page.backUrl)||'/center/center'
+		},
+		methods: {
+			leftClick(){
+				
+			},
+			submit(){
+				// console.log('form',this.form);
+				this.$refs.uForm.validate().then(res => {
+					// uni.$u.toast('校验通过')
+					this.$u.api.factorAuth(this.form).then(res=>{
+						this.getMemberInfo()
+						// console.log('res',res.data);
+					}).catch(err=>{
+						// this.$refs.uToast.show({
+						// 	type: 'error',
+						// 	icon: false,
+						// 	title: '认证失败',
+						// 	message: err.msg,
+						// })
+						console.log('login',err);
+					})
+				}).catch(errors => {
+					uni.$u.toast('请正确填写表单')
+				})
+			},
+			getMemberInfo(){
+				this.$u.api.memberInfo({id:this.vuex_user_info.userid}).then(res=>{
+					this.$u.vuex('vuex_member_info', res.data);
+					uni.showToast({
+						title:'认证成功',
+						icon:'success'
+					})
+					setTimeout(()=>{
+						uni.reLaunch({url: this.backUrl});
+					},2000)
+					// console.log('memberInfo',this.memberInfo);
+					}).catch(err=>{
+					// console.log('memberInfo',err.data);
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 3 - 3
center/memberinfo.vue

@@ -29,13 +29,13 @@
 						></u-upload>
 					</view>
 				</view>
-				<u-cell title="昵称" @click="nameShow=true" :value="memberInfo.name" :border="false"></u-cell>
+				<u-cell title="昵称" @click="nameShow=true" :value="memberInfo.name" :border="true"></u-cell>
 				<!-- <u-cell title="性别" @click="handleChangeSex" :value="memberInfo.sex|filterSex"></u-cell> -->
 				<!-- <u-cell title="生日" :value="memberInfo.birthdayTime||'未设置'" @click="handleChangeBirthday" :isLink="true"></u-cell> -->
 				<!-- <u-cell title="会员等级" :value="memberInfo.levelName"></u-cell> -->
-				<!-- <u-cell title="实名制认证" @click="factorAuth" :value="memberInfo.isAuth==1?'已认证':'去认证'"></u-cell> -->
+				<u-cell title="实名制认证" @click="factorAuth" :value="memberInfo.isAuth==1?'已认证':'去认证'"></u-cell>
 			</u-cell-group>
-			<u-button text="取消登录" type="warning" @click="logOut" :customStyle="{'margin-top': '120rpx'}"></u-button>
+			<u-button text="取消登录" type="error" @click="logOut" :customStyle="{'margin-top': '120rpx'}"></u-button>
 			<u-datetime-picker
 				:show="timeShow"
 				:minDate="new Date().getTime()-365*100*24*3600*1000"

+ 3 - 2
center/order.vue

@@ -13,8 +13,9 @@
 			:list="tabsList" 
 			lineColor="#EE0D0D" 
 			:current="tabsCurrent"
-			 :activeStyle="{color:'#EE0D0D','font-weight': '600','font-size':'30rpx'}"
-			 :inactiveStyle="{color:'#7F7F7F'}"
+			:activeStyle="{color:'#EE0D0D','font-weight': '600','font-size':'30rpx'}"
+			:inactiveStyle="{color:'#7F7F7F'}"
+			itemStyle="width:20%;box-sizing:border-box;padding:24rpx"
 			@click="tabsClick"></u-tabs>
 		</view>
 		<view class="page-wrap">

+ 11 - 1
common/apiurl.js

@@ -59,7 +59,7 @@ const apiurl = {
 	},
 	// 海报二维码
 	performQrcode: {
-		url: '/merchant/merchantPerform/performQrcode',
+		url: '/goods/performInfo/posterByPerformId',
 		type: 'get'
 	},
 	// 获取演艺厅列表
@@ -77,6 +77,16 @@ const apiurl = {
 		url: '/goods/performInfo/selectById',
 		type: 'get'
 	},
+	// 节目演员列表
+	actorsList: {
+		url: '/goods/performInfo/performerList',
+		type: 'get'
+	},
+	// 节目演员列表
+	performerNotice: {
+		url: '/goods/performInfo/performerNotice',
+		type: 'get'
+	},
 	
 	
 	

+ 7 - 0
pages.json

@@ -68,6 +68,13 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "factorauth",
+					"style": {
+						"navigationBarTitleText": "实名认证",
+						"navigationStyle": "custom"
+					}
+				},
 				{
 					"path": "memberinfo",
 					"style": {

+ 112 - 0
pages/actors.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="pages">
+		<view class="" :style="{height: navHeight+'px' }"></view>
+		<view class="navbar-box">
+			<u-navbar title="演职人员" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#000'}" leftIconColor="#000" bgColor="#fff"></u-navbar>
+		</view>
+		<view class="page-wrap">
+			<!-- <view class="title">演员信息</view> -->
+			<view class="list">
+				<view class="item" v-for="(item, index) in actorsArr" :key="index">
+					<image class="img" :src="item.performerHead||staticUrl+'/img/actors.png'"></image>
+					<view class="text">
+						<view class="name">{{item.performerName}}</view>
+						<view class="role u-line-1">{{item.performerRole}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { systemInfo } from "@/mixin.js";
+	export default {
+		mixins:[systemInfo],
+		data() {
+			return {
+				staticUrl:this.$commonConfig.staticUrl,
+				performId:'',
+				actorsArr:[],
+				params:{
+					
+				}
+				
+			}
+		},
+		onShow() {
+		},
+		onLoad(page) {
+			console.log('page',page);
+			this.performId = page.performId;
+			this.getActors();
+			this.getSystemInfo();
+		},
+		methods: {
+			leftClick(e){
+				let pages = getCurrentPages();
+				if(pages.length==1){
+					uni.$u.route('/pages/index/index')
+				}else{
+					uni.navigateBack()
+				};
+			},
+			getActors(){
+				this.$u.api.actorsList({performId:this.performId}).then(res=>{
+					console.log('actorsList',res.data);
+					this.actorsArr =  res.data.list;
+				}).catch(err=>{
+					console.log('actorsList',err);
+				})
+			},
+
+		}
+	}
+</script>
+<style>
+page{
+	background-color: #F7F8F9;
+}
+</style>
+<style lang="scss" scoped>
+.page-wrap{
+	margin-top: 44rpx;
+}
+.title{
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #7F7F7F;
+	line-height: 42rpx;
+	margin-bottom: 40rpx;
+}
+.list{
+	display: grid;
+	grid-template-columns: repeat(3, 1fr);
+	gap: 24rpx;
+	.item{
+		text-align: center;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		padding: 12rpx;
+	}
+	.img{
+		display: block;
+		width: 100%;
+		height: 200rpx;
+		margin-bottom: 16rpx;
+	}
+	.name{
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #2D2D2D;
+		line-height: 42rpx;
+		margin-bottom: 4rpx;
+	}
+	.role{
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #7F7F7F;
+		line-height: 36rpx;
+	}
+}
+</style>

+ 27 - 0
pages/bookticket.vue

@@ -26,6 +26,19 @@
 					</view>
 				</view>
 			</view>
+			<view class="block-wrap purchaser">
+				<view class="block-title u-flex">
+					<view class="name">购票人信息</view>
+					<!-- <text>用于入园身份验证</text> -->
+				</view>
+				<view class="" v-if="vuex_member_info.isAuth">
+					<view class="item">昵称:{{vuex_member_info.name}}</view>
+					<view class="item">手机号:{{vuex_member_info.mobile}}</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">
 				<view class="block-title u-flex">
 					<view class="name">观影人信息</view>
@@ -499,4 +512,18 @@
 		}
 	}
 }
+.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;
+	}
+}
 </style>

+ 4 - 4
pages/index/index.vue

@@ -30,12 +30,12 @@
 				<swiper-item :item-id="item.id" v-for="(item,index) in theatreList" :key="index">
 					<view class="programme-wrap">
 						<view class="programme">
-							<image class="img" :src="staticUrl+'/img/programme-01.png'" ></image>
+							<image class="img" :src="item.showImg" ></image>
 							<!-- <image class="img" :src="item.showImg" ></image> -->
 							<view class="text u-flex u-row-between">
 								<view class="left">
 									<view class="name">{{item.name}}</view>
-									<view class="addr">演出地点:{{item.address}}</view>
+									<!-- <view class="addr">演出地点:{{item.address}}</view> -->
 								</view>
 								<view class="btn" @click="bookticket(item)">立即预定</view>
 							</view>
@@ -75,7 +75,7 @@
 			</view>
 		</view>
 		<!-- content-wrap end -->
-		<image class="activity" :src="staticUrl+'/img/activity.png'" ></image>
+		<!-- <image class="activity" :src="staticUrl+'/img/activity.png'" ></image> -->
 		<!-- 分享选择弹出内容 -->
 		<view class="share-option" :class="{shareShow:shareShow}">
 			<view class="overlay" v-if="shareShow"  @click="shareShow=false"></view>
@@ -388,7 +388,7 @@ $pagegap:32rpx;
 				font-weight: bold;
 				color: #363636;
 				line-height: 42rpx;
-				margin-bottom: 18rpx;
+				// margin-bottom: 18rpx;
 			}
 			.addr{
 				font-size: 22rpx;

+ 23 - 11
pages/ticketlist.vue

@@ -41,7 +41,7 @@
 					</view>
 				</view>
 				<view class="date-block">
-					<view class="title">游玩日期</view>
+					<view class="title">演出日期</view>
 					<view class="date-list u-flex">
 						<view class="date-item" :class="{active:dateIndex==index}" @click="dateClick(index)" v-for="(date,index) in dateList" :key="index">
 							<view class="name">{{ date.name }}</view>
@@ -63,7 +63,7 @@
 							{{ $u.timeFormat(date.performTimeStart, 'hh:MM') }} - {{ $u.timeFormat(date.performTimeEnd, 'hh:MM') }}
 						</view>
 					</view>
-					<view class="empty" v-if="auditoriumList>=1&&sessionList.length<1">
+					<view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
 						当前日期暂无演出场次,请重新选择
 					</view>
 				</view>
@@ -74,14 +74,15 @@
 							<view class="name">{{item.goodsName}}</view>
 							<view class="prices">¥ {{item.salePrice}}</view>
 						</view>
-						<view class="ishave">
+						<!-- <view class="ishave">
 							<text class="text">{{(item.quantity>0&&sessionList.length>=1)?'有票':'无票'}}</text>
-						</view>
+						</view> -->
 						<view class="bottom u-flex u-row-between">
 							<view class="left u-flex">
-								购票须知
-								<u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
+								<!-- 购票须知
+								<u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon> -->
 							</view>
+							<view class="btn" @click="book(item)">预定</view>
 							<view class="btn" @click="book(item)" v-if="item.quantity>0&&sessionList.length>=1">预定</view>
 							<view class="btn disabled" v-else>暂无余票</view>
 						</view>
@@ -99,7 +100,7 @@
 				<view class="details-block actors">
 					<view class="title u-flex u-row-between">
 						演职人员
-						<view class="right u-flex" @click="$u.route('pages/actors')">
+						<view class="right u-flex" @click="$u.route('pages/actors',{performId:performId})">
 							<text>更多</text>
 							<u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
 						</view>
@@ -107,7 +108,7 @@
 					<view class="actor-list">
 						<u-scroll-list :indicator="false">
 							<view class="item" v-for="(item, index) in actorsArr" :key="index">
-								<image class="img" :src="item.performerHead"></image>
+								<image class="img" :src="item.performerHead||staticUrl+'/img/actors.png'"></image>
 								<view class="text">
 									<view class="name">{{item.performerName}}</view>
 									<view class="role u-line-1">{{item.performerRole}}</view>
@@ -118,14 +119,15 @@
 					</view>
 				</view>
 			</view>
-			<view class="viewingTips"  v-if="tabsIndex==2">
-				
+			<view class="viewingTips" v-if="tabsIndex==2">
+				<u-parse :content="formerNotice"></u-parse>
 			</view>
 		</view>
 		<u-calendar
 			ref="calendar"
 			:maxDate="maxDate"
 			:show="calendarShow" 
+			color="#EF1010"
 			:closeOnClickOverlay="true"
 			@close="closeCalendar"
 			@confirm="confirmCalendar">
@@ -181,7 +183,7 @@
 				dateList:[],
 				dateIndex:0,
 				calendarShow:false,//日历
-				maxDate:`${year}-${month}-${date + 10}`,
+				maxDate:`${year}-${month}-${date + 30}`,
 				auditoriumList:[],//演艺厅
 				auditoriumIndex:0,
 				sessionList:[],//演出场次
@@ -192,6 +194,7 @@
 				posterShow:false,
 				posterSrc:'',
 				performInfo:{},//节目详情
+				formerNotice:{},//节目观影须知
 				
 			}
 		},
@@ -205,6 +208,7 @@
 			let today = new Date();
 			this.setDate(today);
 			this.getPerformInfo();
+			this.getPerformerNotice();
 
 		},
 		methods: {
@@ -237,6 +241,14 @@
 					console.log('getPerformInfo',err);
 				})
 			},
+			getPerformerNotice(){
+				this.$u.api.performerNotice({performId:this.performId}).then(res=>{
+					console.log('getPerformerNotice',res.data);
+					this.formerNotice =  res.data.performNotice;
+				}).catch(err=>{
+					console.log('getPerformerNotice',err);
+				})
+			},
 			getTimes(){
 				let auditoriumId= this.auditoriumList[this.auditoriumIndex]?.id;
 				if(!auditoriumId){return}