瀏覽代碼

第一次现场使用回来后提交

gcz 1 年之前
父節點
當前提交
83fb3c4e7f
共有 10 個文件被更改,包括 139 次插入51 次删除
  1. 3 3
      center/center.vue
  2. 6 2
      center/orderdetails.vue
  3. 4 1
      center/refund.vue
  4. 10 0
      common/apiurl.js
  5. 1 2
      common/config.js
  6. 38 26
      common/request.js
  7. 1 1
      package.json
  8. 30 10
      pages/login/login.vue
  9. 35 4
      pages/ticketlist.vue
  10. 11 2
      static/css/common.scss

+ 3 - 3
center/center.vue

@@ -107,9 +107,9 @@
 					});
 					this.$u.vuex('vuex_member_info', res.data);
 					const isExist = this.tools.some(item => item.name === '实名认证');
-					if(!res.data.memberInfo.isAuth&&!isExist){
-						this.tools.push({name:'实名认证',url:'center/factorauth',ico:this.$commonConfig.staticUrl+'/img/center-ticket.png',checkauth:true})
-					}
+					// if(!res.data.memberInfo.isAuth&&!isExist){
+					// 	this.tools.push({name:'实名认证',url:'center/factorauth',ico:this.$commonConfig.staticUrl+'/img/center-ticket.png',checkauth:true})
+					// }
 					// console.log('memberInfo',this.memberInfo);
 					}).catch(err=>{
 					console.log('memberInfo',err.data);

+ 6 - 2
center/orderdetails.vue

@@ -8,8 +8,8 @@
 		<view class="page-wrap">
 			<view class="status-content">
 				<view class="status-item" v-if="orderDetails.status==0">
-					<view class="text"><text v-if="orderDetails.cancelDateTime&&countdown!='支付超期'"> 请尽快完成付款,还剩 </text>{{countdown}}</view>
-					<view class="btn-wrap u-flex u-row-center" v-if="orderDetails.cancelDateTime&&countdown!='支付超期'">
+					<view class="text"><text v-if="countdown&&countdown!='支付超期'"> 请尽快完成付款,还剩 </text>{{countdown}}</view>
+					<view class="btn-wrap u-flex u-row-center">
 						<view class="btn cancel" @click="cancelOrder">取消订单</view>
 						<view class="btn" @click="gotoPay(orderDetails.id)">立即支付</view>
 					</view>
@@ -225,6 +225,10 @@
 			// 每秒更新倒计时时间
 			this.countdownTimer = setInterval(() => {
 			  const now = new Date().getTime();
+			  if(!this.deadline){
+				  this.countdown = null;
+				  return
+			  }
 			  const distance = this.deadline - now;
 			  // console.log('distance',distance);
 			  if(this.orderDetails.status==0 && distance<0){

+ 4 - 1
center/refund.vue

@@ -122,7 +122,10 @@
 					uni.$u.toast(res.msg)
 					// uni.navigateBack()
 					setTimeout(()=>{
-						uni.$u.route('/center/order');
+						uni.redirectTo({
+							url: '/center/order'
+						});
+						// uni.$u.route('/center/order');
 					},1500)
 					console.log('res',res.data);
 				}).catch(err=>{

+ 10 - 0
common/apiurl.js

@@ -152,6 +152,11 @@ const apiurl = {
 		url: '/order/orderInfo/selectById',
 		type: 'get'
 	},
+	// 查询订单观影人信息
+	getViewers: {
+		url: '/order/orderInfo/getViewers',
+		type: 'get'
+	},
 	// 提交退款
 	refundSubmit: {
 		url: '/order/orderInfo/refundSubmit',
@@ -208,6 +213,11 @@ const apiurl = {
 		url: '/member/marketTeamApply/teamApplyClose',
 		type: 'post'
 	},
+	// 团队账号检测
+	teamLoginCheck: {
+		url: '/member/auth/teamLoginCheck',
+		type: 'get'
+	},
 	
 	
 	/**

+ 1 - 2
common/config.js

@@ -8,10 +8,9 @@ let baseUrl = '/api/serviceapi',
   redirectUri = encodeURIComponent('https://greath5.dev.gztjy.top/greatgroup/pages/login/login'),
   authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppid}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`,
   upFileUrl = 'https://serviceapi.wdzzgs.com/thirdapi/upload/single/minio';
-console.log('node_dev',node_dev);
 if (node_dev) {
 	if(process.env.H_NODE_ENV=='production'){
-		redirectUri = encodeURIComponent('https://h5.wdzzgs.com/pages/login/login')
+		redirectUri = encodeURIComponent('https://h5.wdzzgs.com/greatgroup/pages/login/login')
 	};
   (baseUrl = process.env.H_BASE_URL), (upFileUrl = process.env.H_UP_FILE_URL), (authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppid}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`);
 }

+ 38 - 26
common/request.js

@@ -67,35 +67,47 @@ module.exports = (vm) => {
 					// console.log('setStorage success');
 				}
 			});
+			// console.log('commonConfig.authUrl',commonConfig.authUrl);
 			tryHideFullScreenLoading()
 			if(showModal){return}
 			showModal = true;
-			uni.showModal({
-			  title: '提示',
-			  content: '你需要登录后,才可使用此功能!',
-			  success: res => {
-			    if (res.confirm) {
-					window.location.href = commonConfig.authUrl;
-			      // uni.$u.route(commonConfig.authUrl);
-			    }else{
-					uni.removeStorage({
-						key: 'backUrl',
-						success: function (res) {
-							// console.log('success');
-						}
-					});
-					let pages = getCurrentPages();
-					// console.log('pages',pages);
-					if(pages.length>1){
-						uni.navigateBack()
-					}
+			uni.showToast({
+				title: '你需要登录后,才可使用!',
+				icon:'none',
+				duration: 2000,
+				complete:function(){
+					showModal = false;
+					uni.$u.vuex('vuex_member_info', {});
+					 window.location.href = commonConfig.authUrl
+					// uni.$u.route(commonConfig.authUrl);
 				}
-			  },
-			  complete() {
-			  	showModal = false
-				uni.$u.vuex('vuex_member_info', {});
-			  }
-			})
+			});
+			// uni.showModal({
+			//   title: '提示',
+			//   content: '你需要登录后,才可使用此功能!',
+			//   success: res => {
+			//     if (res.confirm) {
+			// 		window.location.href = commonConfig.authUrl;
+			//       // uni.$u.route(commonConfig.authUrl);
+			//     }else{
+			// 		uni.removeStorage({
+			// 			key: 'backUrl',
+			// 			success: function (res) {
+			// 				// console.log('success');
+			// 			}
+			// 		});
+			// 		let pages = getCurrentPages();
+			// 		// console.log('pages',pages);
+			// 		if(pages.length>1){
+			// 			uni.navigateBack()
+			// 		}
+			// 	}
+			//   },
+			//   complete() {
+			//   	showModal = false
+			// 	uni.$u.vuex('vuex_member_info', {});
+			//   }
+			// })
 
 		}
 	}
@@ -121,7 +133,7 @@ module.exports = (vm) => {
 				unlogin()
 			}
 			
-			if(data.msg == "用户不存在!"||data.msg == "用户未注册"){
+			if(data.msg == "用户不存在!"||data.msg == "用户未注册"||data.msg == "用户信息不能为空"||data.msg == "团队用户信息不能为空"){
 				uni.clearStorage();
 				unlogin()
 			}

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
         "env": {
           "UNI_PLATFORM": "h5",
           "H_NODE_ENV": "production",
-          "H_BASE_URL": "https://greath5.dev.gztjy.top/serviceapi",
+          "H_BASE_URL": "https://h5.wdzzgs.com/serviceapi",
           "H_UP_FILE_URL": "https://serviceapi.wdzzgs.com/thirdapi/upload/single/minio"
         }
       }

+ 30 - 10
pages/login/login.vue

@@ -89,16 +89,6 @@
 		},
 		onLoad(e) {
 			let that = this;
-			if(!e.code) { // 微信第三方登录失败
-				this.redirectToAuth()
-			}else {
-				this.code = e.code
-			}
-			// 测试环境填充用户名密码
-			if(process.env.NODE_ENV=='development'){
-				this.form.mobile = '13682277062';
-				this.form.password = '123456';
-			}
 			uni.getStorage({
 				key: 'backUrl',
 				success: function (res) {
@@ -113,6 +103,36 @@
 					console.log('backUrl',that.backUrl);
 				}
 			});
+			console.log('accessToken=====',this.vuex_user_info.accessToken);
+			let accessToken = this.vuex_user_info.accessToken;
+			if(accessToken){
+				this.$u.api.teamLoginCheck().then(res=>{
+					if(this.backUrl.includes('login/login')){
+						 this.backUrl = '/pages/index/index'
+					}
+					uni.reLaunch({url: this.backUrl});				
+				}).catch(err=>{
+					console.log('teamLoginCheck',err);
+					uni.$u.vuex('vuex_member_info', {});
+					this.$u.toast(err.msg)
+					this.redirectToAuth()
+				})
+			}else{
+				if(!e.code) { // 微信第三方登录失败
+					this.redirectToAuth()
+				}else {
+					this.code = e.code
+				}
+			}
+			
+			
+			
+			// 测试环境填充用户名密码
+			if(process.env.NODE_ENV=='development'){
+				this.form.mobile = '13682277062';
+				this.form.password = '123456';
+			}
+			
 
 		},
 		onShow() {

+ 35 - 4
pages/ticketlist.vue

@@ -13,14 +13,15 @@
 				:indicatorStyle="{bottom:'100rpx'}"
 				keyName="imageUrl"
 				radius="0"
+				@click="previewBanner"
 				:indicator="false"
 				circular
 			></u-swiper>
-			<view class="content">
+			<!-- <view class="content">
 				<view class="share" @click="openShare()">
 					<image class="icon" :src="staticUrl+'/img/share-ico.png'" ></image>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		<view class="base-info">
 			<view class="inner">
@@ -36,6 +37,10 @@
 							<image class="icon" :src="staticUrl+'/img/phone-call-ico.png'" ></image>
 							<text>电话</text>
 						</view>
+						<view class="item"  @click="openShare()">
+							<image class="icon" :src="staticUrl+'/img/share-ico-v2.png'" ></image>
+							<text>分享</text>
+						</view>
 					<!-- 	<u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon>
 						<u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon> -->
 					</view>
@@ -91,7 +96,18 @@
 						</view>
 					</view>
 				</view>
-				<view class="date-block session-wrap">
+				<view class="date-block session-wrap generic-block">
+					<view class="title">演出场次</view>
+					<view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
+						当前日期暂无演出场次,请重新选择
+					</view>
+					<view class="date-list u-flex u-flex-wrap" v-else>
+						<view class="date-item" :class="{active:sessionIndex==index}" @click="sessionClick(index)" v-for="(date,index) in sessionList" :key="index">
+							<view class="name">{{ date.performTimeStart}} - {{date.performTimeEnd}}</view>
+						</view>
+					</view>
+				</view>
+	<!-- 			<view class="date-block session-wrap">
 					<view class="title">演出场次</view>
 					<view class="session">
 						<view class="session-item" :class="{active:sessionIndex==index}" @click="sessionClick(index)" v-for="(date,index) in sessionList" :key="index">
@@ -101,7 +117,7 @@
 					<view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
 						当前日期暂无演出场次,请重新选择
 					</view>
-				</view>
+				</view> -->
 				<view class="date-block ticket-type generic-block">
 					<view class="title">票务信息</view>
 					<view class="empty" v-if="ticketTypeList.length<1">
@@ -662,6 +678,11 @@
 				// 前端生成海报结束
 			},
 			saveImage() {
+				const systemInfo = uni.getSystemInfoSync(); // 调用 getSystemInfoSync() 函数获取系统信息
+				if (systemInfo.ua.indexOf('MicroMessenger') != -1 ){
+					uni.$u.toast('请长按图片下载');
+					return
+				}
 				let that = this;
 					uni.showLoading({
 						title: '保存中'
@@ -774,6 +795,16 @@
 				uni.previewImage({
 					urls: urls,
 				})
+			},
+			previewBanner(index){
+				let urls = this.performInfo.photoList.map(item=>{
+					return item.imageUrl
+				});
+				// console.log('urls',urls);
+				uni.previewImage({
+					urls: urls,
+					current:index
+				})
 			}
 
 		}

+ 11 - 2
static/css/common.scss

@@ -116,7 +116,7 @@ $pagegap:32rpx;
 		flex: 1;
 		background: #FFFFFF;
 		border-radius: 16rpx;
-		border: 2rpx solid #EEEEEE;
+		border: 1rpx solid #7F7F7F;
 		text-align: center;
 		margin: 0 8rpx;
 		box-sizing: border-box;
@@ -176,9 +176,18 @@ $pagegap:32rpx;
 	}
 }
 .date-block.generic-block{
+	.date-list{
+		display: grid;
+		grid-template-columns: repeat(3, 1fr);
+		gap: 10rpx;
+	}
 	.name{
+		padding-top: 0;
 		margin-bottom: 0;
-		padding: 34rpx 0;
+		display: grid;
+		align-content: center;
+		height: 52px;
+		// padding: 34rpx 0;
 	}
 }
 // 分享 海报