Просмотр исходного кода

Merge branch 'master' of http://git.9026.com/gubai/IHG

yfso 2 лет назад
Родитель
Сommit
974c820386

+ 2 - 1
pages.json

xqd
@@ -263,7 +263,8 @@
 		{
 			"path": "pages/my/prize/exchangeDetail",
 			"style": {
-				"navigationBarTitleText": "兑换详情",
+				// "navigationBarTitleText": "兑换详情",
+				"navigationStyle": "custom",//隐藏系统导航栏
 				"enablePullDownRefresh": false
 			}
 		

+ 1 - 1
pages/index/vote-detail/index.vue

xqd
@@ -62,7 +62,7 @@
 			<view class="btn" @click="goVote(activity_project_id)">
 				<view v-if="spending || isStart" class="btn-vote"
 					:class="spending?'btn-vote': isStart?'btn-vote-fasle' :'' ">
-					<text>投票</text>
+					<text>{{voteDetail.activity.vote_name}}</text>
 				</view>
 				<view class="btn-vote-fasle" v-if="isEnd">
 					<text>投票结束</text>

+ 1 - 0
pages/login/youyue.vue

xqd
@@ -196,6 +196,7 @@
 					}
 				})
 			},
+			//登录
 			getCode() {
 				return new Promise((resolve, reject) => {
 					uni.getUserInfo({

+ 25 - 4
pages/msg/msg.vue

xqd xqd xqd
@@ -67,6 +67,8 @@
 		},
 		data() {
 			return {
+				//用户是否登录
+				admin:'',
 				//是否展示信息图标
 				isOpenMsg:false,
 				//自定义导航栏
@@ -90,16 +92,27 @@
 				},
 			};
 		},
-		onLoad() {
-			//获取消息列表
-			this.getMessageList()
+		
+		async onLoad() {
+			this.admin = this.$store.getters.userInfo
+			await this.isLogin()
+			
 		},
 		methods: {
 			
+			isLogin(){
+				//获取消息列表
+				if(this.admin != undefined ){
+					this.getMessageList()
+				}else{
+					this.messageList = ''
+				}
+			},
+			
+			
 			//打开或关闭是触发
 			change(){
 				this.isOpenMsg = !this.isOpenMsg
-				
 			},
 			
 			
@@ -125,14 +138,22 @@
 			//跳转消息详情页面
 			jumpPage(type,id,product_type){
 				if(type>2){
+					//实物奖品
 					if(product_type == 1){
 						uni.navigateTo({
 							url:'/pages/my/prize/prize?product_type='+product_type
 						})
 					}else if(product_type == 2 ){
+						//虚拟奖品
 						uni.navigateTo({
 							url:'/pages/my/prize/prize?product_type='+product_type
 						})
+					}else if(product_type == 3){
+						//积分奖品
+						uni.navigateTo({
+							url:'/pages/my/integral/integralRecord'
+						})
+						
 					}
 					
 				}else{

+ 4 - 3
pages/my/integral/integral.vue

xqd
@@ -86,10 +86,11 @@
 		onLoad() {
 			this.getProductList()
 			this.getInfo()
-			console.log(this.$store.getters.userInfo)
+			uni.$on('refreshData',()=>{
+				this.getInfo()
+			})
 		},
-		methods:{
-			
+		methods:{	
 			//用户信息
 			getInfo(){
 				this.$api.my.userInfo().then(res=>{

+ 3 - 3
pages/my/integral/integralOrder.vue

xqd xqd xqd
@@ -340,7 +340,7 @@
 									}).then(res => {
 										if (res.code == 0) {
 											uni.navigateTo({
-												url: '/pages/my/prize/exchangeDetail'
+												url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
 											})
 										} else {
 											uni.showToast({
@@ -362,7 +362,7 @@
 									}).then(res => {
 										if (res.code == 0) {
 											uni.navigateTo({
-												url: '/pages/my/prize/exchangeDetail'
+												url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
 											})
 										} else {
 											uni.showToast({
@@ -396,7 +396,7 @@
 								}).then(res => {
 									if (res.code == 0) {
 										uni.navigateTo({
-											url: '/pages/my/prize/exchangeDetail'
+											url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
 										})
 									} else {
 										uni.showToast({

+ 8 - 1
pages/my/myorders/orderDetail.vue

xqd
@@ -99,7 +99,14 @@
 				<view class="copyorder" @click="copyOrder(goodsDet.order_no)">复制</view>
 			</view>
 
-			<view class="myorder" style="margin-top: 68rpx;">
+			<view class="myorder" style="margin-top: 68rpx;" v-if="status == 4 && is_virtual == 1">
+				<view class="orderTitle">核销信息</view>
+				<view class="orderMsg"><text>核销员</text><text style="margin-left: 54rpx;">{{goodsDet.staff.user.nickname}}</text>
+				</view>
+				<view class="orderMsg"><text>核销时间</text><text style="margin-left: 26rpx;">{{goodsDet.complete_time}}</text>
+				</view>
+			</view>
+			<view class="myorder" style="margin-top: 68rpx;" v-if="status == 4 && is_virtual == 0 && express_type == 2 ">
 				<view class="orderTitle">核销信息</view>
 				<view class="orderMsg"><text>核销员</text><text style="margin-left: 54rpx;">{{goodsDet.staff.user.nickname}}</text>
 				</view>

+ 86 - 54
pages/my/prize/exchangeDetail.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,10 +1,20 @@
 <template>
 	<view class="exchangeDetail">
+		<!-- 自定义导航栏 -->
+		<u-navbar :leftText='title' fixed safeAreaInsetTop :placeholder='true' :bgColor="bgColor" @leftClick='back'>
+		</u-navbar>
 		<!-- 兑换状态 -->
-		<view class="detailCard">
+		<view class="detailCard" v-if="productType == 2 ">
 			<image src="/static/icon/success.png"></image>
 			<text>奖品兑换成功</text>
 		</view>
+
+		<view class="detailCard" v-if="productType == 1 ">
+			<image src="/static/icon/success.png"></image>
+			<text>商品兑换成功</text>
+			<text>-{{integral}}积分</text>
+		</view>
+
 		<!-- 按钮 -->
 		<view class="btn">
 			<view class="back" @click="goBack">
@@ -18,8 +28,10 @@
 		<view class="bottomCard">
 			<!-- 广告图 -->
 			<view class="home-banner">
-				<view class="home-banner-img" v-if="in_page==3 && type == 1" @click="goOtherPage(jump_type,jump_config)">
-					<image style="width: 100%; height: 492rpx; border-radius: 12rpx;" :src="advData.img" mode="" ></image>
+				<view class="home-banner-img" v-if="in_page==3 && type == 1"
+					@click="goOtherPage(jump_type,jump_config)">
+					<image style="width: 100%; height: 492rpx; border-radius: 12rpx;" :src="advData.img" mode="">
+					</image>
 				</view>
 				<view class="home-banner-img" v-if="in_page==3 && type == 2">
 					<image class="banner-img" v-if="!isOpenVideo" @click="openVideoPlay"
@@ -43,50 +55,68 @@
 	export default {
 		data() {
 			return {
-				admin:'',
-				isOpenVideo:false,
-				jump_type:'',
-				jump_config:'',
-				advData:'',
-				advertis:'',
-				in_page:'',
-				type:'',
-				videoCoverImg:'',
-				videoSrc:''
+				//自定义导航栏
+				bgColor: '#fff',
+				title: '兑换详情',
+				//积分商品1奖品2兑换
+				productType: '',
+				//积分
+				integral: '',
+
+				admin: '',
+				isOpenVideo: false,
+				jump_type: '',
+				jump_config: '',
+				advData: '',
+				advertis: '',
+				in_page: '',
+				type: '',
+				videoCoverImg: '',
+				videoSrc: ''
 			}
 		},
 		onReady: function(res) {
 			this.videoContext = uni.createVideoContext('myVideo')
 		},
-		onLoad() {
+		onLoad(o) {
 			this.getAdvertis()
 			this.admin = this.$store.getters.userInfo
+			if (o.productType == 1) {
+				this.productType = o.productType
+				this.integral = o.integral
+			}else if(o.productType == 2){
+				this.productType = o.productType
+			}
 		},
-		onBackPress(e){
-			console.log("监听返回按钮事件",e);
-			//正常返回页面
-			uni.navigateTo({
-			 	url:"/pages/my/integral/integral"
-			})
-			// 此处一定要return为true,否则页面不会返回到指定路径
-			return true;
-		},
-		
-
 		methods: {
+			//返回上一级
+			back() {
+				if(this.productType == 1){
+					uni.$emit('refreshData')
+					uni.navigateBack({
+						delta: 3,
+					})
+				}else if(this.productType == 2){
+					uni.$emit('refreshPrizeData')
+					uni.navigateBack({
+						delta: 2,
+					})
+				}
+				
+			},
 			//广告图
-			getAdvertis(){
+			getAdvertis() {
 				this.$api.document.allSet().then(res => {
 					this.advertis = res.data.advertises.filter(item => {
 						return item.in_page == 3
 					})
 					this.advData = this.advertis[0];
-					console.log(this.advData.img,'------>this.advData');
+					console.log(this.advData.img, '------>this.advData');
 					if (this.advertis[0].type == 1) {
 						this.in_page = 3
 						this.type = 1
-						this.jump_type= this.advData.jump_type
-						this.jump_config=this.advData.jump_config
+						this.jump_type = this.advData.jump_type
+						this.jump_config = this.advData.jump_config
 					} else if (this.advertis[0].type == 2) {
 						this.in_page = 3
 						this.type = 2
@@ -100,7 +130,7 @@
 				this.isOpenVideo = !this.isOpenVideo
 				this.videoContext.play()
 			},
-			
+
 			//跳转方法
 			jumpHAppID(id, urls) {
 				if (id == 1) {
@@ -136,7 +166,7 @@
 				} else if (id == 3) {
 					uni.redirectTo({
 						url: urls,
-						fail:(err)=>{
+						fail: (err) => {
 							uni.reLaunch({
 								url: urls
 							})
@@ -144,17 +174,17 @@
 					})
 				}
 			},
-			
+
 			//点击图片跳转
-			goOtherPage(id,url){
-				this.jumpHAppID(id,url)
+			goOtherPage(id, url) {
+				this.jumpHAppID(id, url)
 			},
-			
-			
+
+
 			// 返回首页
 			goBack() {
 				uni.reLaunch({
-					url: '/pages/my/my'
+					url: '/pages/index/index'
 				})
 			},
 			// 跳转订单详情
@@ -166,13 +196,13 @@
 			//获取当前页面路径
 			getPageUrl() {
 				const pages = getCurrentPages();
-				console.log(pages,'--------->pages')
-				if(pages.length==1){
+				console.log(pages, '--------->pages')
+				if (pages.length == 1) {
 					const currentPage = pages[0];
 					let pageUrl = `/${currentPage.route}`;
 					return pageUrl
 					console.log('当前页面url:', pageUrl);
-				}else{
+				} else {
 					const currentPage = pages[pages.length - 1];
 					let pageUrl = `/${currentPage.route}`;
 					return pageUrl
@@ -204,7 +234,7 @@
 						}).then(res => {
 							console.log(res.data);
 						})
-			
+
 						// 打开成功
 					},
 					fail(e) {
@@ -260,7 +290,8 @@
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
-		padding:0 32rpx;
+		padding: 0 32rpx;
+
 		.back {
 			width: 332rpx;
 			height: 76rpx;
@@ -311,14 +342,16 @@
 			height: 92rpx;
 			position: absolute;
 			bottom: 0;
-			margin-top:-9rpx;
-			border:1rpx solid;
+			margin-top: -9rpx;
+			border: 1rpx solid;
 			@include flexlayout();
+
 			image {
 				width: 12rpx;
-				height: 20rpx; 
+				height: 20rpx;
 				margin-left: 8rpx;
 			}
+
 			text {
 				font-size: 30rpx;
 				font-family: PingFang-SC-Medium, PingFang-SC;
@@ -328,38 +361,38 @@
 			}
 		}
 	}
-	
-	
+
+
 	.home-banner {
 		// height: 640rpx;
 		// padding: 0 30rpx;
 		// padding-top: 64rpx;
-	
+
 		.home-banner-img {
 			position: relative;
 			width: 100%;
-	
+
 			// height: 100%;
 			.baner-video {
 				position: absolute;
 				top: 0;
 				left: 0;
 			}
-	
+
 			.banner-img {
 				position: absolute;
 				top: 0;
 				left: 0;
 				z-index: 9;
 			}
-	
+
 			.img-clean {
 				position: absolute;
 				right: 28rpx;
 				top: 30rpx;
 				z-index: 99;
 			}
-	
+
 			.img-IHg {
 				width: 84rpx;
 				height: 84rpx;
@@ -373,9 +406,8 @@
 				top: 1030rpx;
 				right: 30rpx;
 				z-index: 99;
-	
+
 			}
 		}
 	}
-	
 </style>

+ 3 - 3
pages/my/prize/exchangePrize.vue

xqd xqd xqd
@@ -298,7 +298,7 @@
 						}).then(res => {
 							if (res.code == 0) {
 								uni.navigateTo({
-									url: '/pages/my/prize/exchangeDetail'
+									url: `/pages/my/prize/exchangeDetail?productType=2`
 								})
 							} else {
 								uni.showToast({
@@ -319,7 +319,7 @@
 						}).then(res => {
 							if (res.code == 0) {
 								uni.navigateTo({
-									url: '/pages/my/prize/exchangeDetail'
+									url: `/pages/my/prize/exchangeDetail?productType=2`
 								})
 							} else {
 								uni.showToast({
@@ -341,7 +341,7 @@
 					}).then(res => {
 						if (res.code == 0) {
 							uni.navigateTo({
-								url: '/pages/my/prize/exchangeDetail'
+								url: `/pages/my/prize/exchangeDetail?productType=2`
 							})
 						} else {
 							uni.showToast({

+ 77 - 44
pages/my/prize/prize.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -10,14 +10,14 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="msg-null" v-if="isActive == 0 && PhysicalPrizes.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
 				<text>暂无数据</text>
 			</view>
 		</view>
-		
+
 		<view class="msg-null" v-if="isActive == 1 && VirtualPrizes.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
@@ -30,11 +30,12 @@
 				<text>暂无数据</text>
 			</view>
 		</view>
-		
 
-		<view style="margin-bottom: 60rpx;" >
+
+		<view style="margin-bottom: 60rpx;">
 			<!-- 实物奖品 -->
-			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 0  && PhysicalPrizes.length > 0  ">
+			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
+				v-if="isActive == 0  && PhysicalPrizes.length > 0  ">
 				<view class="ListItem" v-for="(item,index) in PhysicalPrizes" :key="index">
 					<view class="title"><text>{{item.name}}</text></view>
 					<view class='data'><text>{{item.exchange_start_time}}--{{item.exchange_end_time}}</text></view>
@@ -44,14 +45,15 @@
 					<view class="instantBtn" v-if="item.status == 1" @click="goExchangePhy(item.id)">
 						<text>立即兑换</text>
 					</view>
-					<view class="alreadyBtn" v-if="item.status == 3" >
+					<view class="alreadyBtn" v-if="item.status == 3">
 						<text>已过期</text>
 					</view>
 				</view>
 			</view>
-			
+
 			<!-- 线下奖品 -->
-			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 1  && VirtualPrizes.length > 0 ">
+			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
+				v-if="isActive == 1  && VirtualPrizes.length > 0 ">
 				<view class="ListItem" v-for="(item,index) in VirtualPrizes" :key="index">
 					<view class="title"><text>{{item.name}}</text></view>
 					<view class='data'><text>{{item.exchange_start_time}}--{{item.exchange_end_time}}</text></view>
@@ -61,19 +63,20 @@
 					<view class="alreadyBtn" v-if="item.status == 2">
 						<text>已兑换</text>
 					</view>
-					<view class="alreadyBtn" v-if="item.status == 3" >
+					<view class="alreadyBtn" v-if="item.status == 3">
 						<text>已过期</text>
 					</view>
-					<view class="alreadyBtn" v-if="item.status == 4" >
+					<view class="alreadyBtn" v-if="item.status == 4">
 						<text>未开始</text>
 					</view>
-					
+
 				</view>
 			</view>
-			
+
 			<!-- 中奖记录 -->
-			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 2 && prizeRecord.length > 0 ">
-				<view class="ListItem" v-for="(item,index) in prizeRecord" :key="index"> 
+			<view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
+				v-if="isActive == 2 && prizeRecord.length > 0 ">
+				<view class="ListItem" v-for="(item,index) in prizeRecord" :key="index">
 					<view style="display: flex; justify-content: space-between;">
 						<view class="title"><text>{{item.name}}</text> </view>
 						<view class='data'><text>{{item.created_at}}</text></view>
@@ -82,11 +85,14 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 已经到底啦 -->
-		<uni-load-more v-if="isActive == 0  && PhysicalPrizes.length > 0  " :status="status" color="#CCCCCC" :content-text="contentText" />
-		<uni-load-more v-if="isActive == 1  && VirtualPrizes.length > 0  " :status="status" color="#CCCCCC" :content-text="contentText" />
-		<uni-load-more v-if="isActive == 2  && prizeRecord.length > 0  " :status="status" color="#CCCCCC" :content-text="contentText" />
+		<uni-load-more v-if="isActive == 0  && PhysicalPrizes.length > 0  " :status="status" color="#CCCCCC"
+			:content-text="contentText" />
+		<uni-load-more v-if="isActive == 1  && VirtualPrizes.length > 0  " :status="status" color="#CCCCCC"
+			:content-text="contentText" />
+		<uni-load-more v-if="isActive == 2  && prizeRecord.length > 0  " :status="status" color="#CCCCCC"
+			:content-text="contentText" />
 
 	</view>
 </template>
@@ -108,44 +114,67 @@
 					contentnomore: '—— 已经到底啦 ——'
 				},
 				// 实物奖品列表
-				PhysicalPrizes:[],
+				PhysicalPrizes: [],
 				// 虚拟奖品列表
-				VirtualPrizes:[],
+				VirtualPrizes: [],
 				// 中奖记录
-				prizeRecord:[]
+				prizeRecord: []
 			}
 		},
-		onLoad() {
-			// 中奖记录
-			this.getPrizeRecord()
-			//实物奖品
-			this.getPrizeList(0)
-			//虚拟奖品
-			this.getPrizeList(1)
+		onLoad(o) {
+			if (o.product_type == 2) {
+				//分段器标题切换
+				this.checked(o.product_type - 1)
+				// 中奖记录
+				this.getPrizeRecord()
+				//实物奖品
+				this.getPrizeList(0)
+				//虚拟奖品
+				this.getPrizeList(1)
+			} else {
+				// 中奖记录
+				this.getPrizeRecord()
+				//实物奖品
+				this.getPrizeList(0)
+				//虚拟奖品
+				this.getPrizeList(1)
+			}
+			
+			uni.$on('refreshPrizeData',()=>{
+				// 中奖记录
+				this.getPrizeRecord()
+				//实物奖品
+				this.getPrizeList(0)
+				//虚拟奖品
+				this.getPrizeList(1)
+			})
+
+
+
 		},
 		methods: {
 			// 获取奖品列表
-			getPrizeList(type){
+			getPrizeList(type) {
 				this.$api.lottery.getDrawRecord({
-					is_virtual:type,
-					page:0
-				}).then(res=>{
+					is_virtual: type,
+					page: 0
+				}).then(res => {
 					//实物奖品
-					if(type == 0){
+					if (type == 0) {
 						this.PhysicalPrizes = res.data.data
-					}else{
+					} else {
 						this.VirtualPrizes = res.data.data
 					}
 				})
 			},
 			// 获取中奖记录
-			getPrizeRecord(){
+			getPrizeRecord() {
 				this.$api.lottery.getDrawRecord({
-					page:0
-				}).then(res=>{
-					console.log(res,"中奖记录")
-					if(res.code==0){
-						this.prizeRecord=res.data.data
+					page: 0
+				}).then(res => {
+					console.log(res, "中奖记录")
+					if (res.code == 0) {
+						this.prizeRecord = res.data.data
 					}
 				})
 			},
@@ -184,14 +213,15 @@
 		height: 100%;
 		background: $pageColor;
 	}
-	
-	.msg-null{
+
+	.msg-null {
 		padding-top: 60rpx;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
-		.msg-null-text{
+
+		.msg-null-text {
 			margin-top: 40rpx;
 			font-size: 28rpx;
 			color: #333;
@@ -205,8 +235,9 @@
 		box-shadow: 0px 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
 		border-radius: 0rpx 0rpx 16rpx 16rpx;
 		margin-bottom: 24rpx;
-		padding:0rpx 30rpx;
+		padding: 0rpx 30rpx;
 		box-sizing: border-box;
+
 		//菜单切换
 		.tab_nav {
 			width: 690rpx;
@@ -215,6 +246,7 @@
 			align-items: center;
 			font-family: PingFang-SC-Heavy, PingFang-SC;
 		}
+
 		.tab_nav .navTitle {
 			margin-top: 20rpx;
 			width: 128rpx;
@@ -224,6 +256,7 @@
 			color: #666;
 			position: relative;
 		}
+
 		.active {
 			color: #D9A94D;
 			font-weight: bold;

+ 20 - 8
pages/my/verification/orderVerification.vue

xqd
@@ -83,14 +83,26 @@
 				this.$api.orders.confirmOrderDetail({
 					order_no:this.order_no
 				}).then(res=>{
-					this.items = res.data
-					this.FormData.name = res.data.receiver
-					this.FormData.contact = res.data.phone
-					this.FormData.date = res.data.created_at
-					this.order_no = res.data.order_no
-					this.productImg = JSON.parse(res.data.img_urls)
-					//酒店详情
-					this.hotelDetail(res.data.hotel_id)
+					if(res.code == 0){
+						this.items = res.data
+						this.FormData.name = res.data.receiver
+						this.FormData.contact = res.data.phone
+						this.FormData.date = res.data.created_at
+						this.order_no = res.data.order_no
+						this.productImg = JSON.parse(res.data.img_urls)
+						//酒店详情
+						this.hotelDetail(res.data.hotel_id)
+					}else{
+						uni.showToast({
+							icon:'none',
+							title:res.msg
+						})
+						setTimeout(()=>{
+							uni.redirectTo({
+								url:'/pages/my/verification/verification'
+							})
+						},500)
+					}
 				})
 			},
 			//酒店详情

+ 1 - 0
pages/my/verification/verification.vue

xqd
@@ -151,6 +151,7 @@
 			scanCode(){
 				uni.scanCode({
 					success: function (res) {
+						console.log(res,'res');
 						if(res.scanType == 'QR_CODE'){
 							uni.navigateTo({
 								url:'/pages/my/verification/orderVerification?order_no='+res.result