Browse Source

视频会员权益领取

wenjie 8 months ago
parent
commit
7245336e99

+ 22 - 1
api/combo.js

@@ -26,6 +26,27 @@ export function getH5url(data) {
   })
 }
 
+// 权益领取列表
+export function getLogList(data) {
+  return request({
+      url: '/zswl-cloud-shop/couponInfoLog/search',
+      data
+  })
+}
 
+// 权益领取
+export function getMediaVipCoupon(data) {
+  return request({
+      url: '/zswl-cloud-shop/couponInfoLog/getMediaVipCoupon',
+	  method:'post',
+      data
+  })
+}
 
-
+// 视频会员权益详情
+export function getVideoEquity(data) {
+  return request({
+      url: '/zswl-cloud-shop/equityInfo/getMediaVip',
+      data
+  })
+}

+ 19 - 0
api/common.js

@@ -263,3 +263,22 @@ export function getDistrict(data) {
 		data
 	})
 }
+
+
+//获取设置
+export function getSetting(data) {
+	return request({
+		url: '/rewardserver/miniAppSetting/getSetting',
+		data
+	})
+}
+
+
+//获取更新会员状态
+export function refreshVip(data) {
+	return request({
+		url: '/vipserver/queryVip/userInfo',
+		data
+	})
+}
+

+ 2 - 2
api/goods.js

@@ -62,8 +62,8 @@ export function getCouponType(data) {
 // 获取虚拟商品列表
 export function getVirtuallist(data) {
 	return request({
-		// url: '/zswl-cloud-shop/yqd/getCatalogList',
-		url: '/springbatchservice/video2/rechargeProduct',
+		url: '/zswl-cloud-shop/yqd/getCatalogList',
+		// url: '/springbatchservice/video2/rechargeProduct',
 		data
 	})
 }

+ 2 - 2
components/zs-banner/index.vue

@@ -6,10 +6,10 @@
 				<image class="position-icon" src="../../static/black-position.png" mode=""></image>
 				<text class="city">{{city}}</text>
 			</view>
-			<view class="search-box" @click="handleSearch">
+			<!-- <view class="search-box" @click="handleSearch">
 				<input class="search"  :style="{height:height+'px'}" type="text" placeholder="搜索" v-model="search" />
 				<image class="icon" src="../../static/search.png" mode=""></image>
-			</view>
+			</view> -->
 		</view>
 		<view class="top-box" :style="{'--bg':theme}">
 				

+ 3 - 3
detail/goodsDetail/index.vue

@@ -17,7 +17,7 @@
 						</view>
 					</view>
 					<view class="discount-tag" v-if="info.marketPrice">
-						<image class="icon" src="@/static/down.png" mode=""></image>
+						<!-- <image class="icon" src="@/static/down.png" mode=""></image> -->
 						<view class="discount-num">
 							{{((info.realPrice/info.marketPrice)*10).toFixed(1)}}折
 						</view>
@@ -242,7 +242,7 @@
 				if(!this.info.realStockNum || this.loading) return
 					let that = this
 				if (uni.getStorageSync('token')) {
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						// this.loading = true
 						// valid({goodsId:that.info.goodsId,userId:JSON.parse(uni.getStorageSync('userInfo')).userId}).then(res=>{
 						// 	this.loading = false
@@ -424,7 +424,7 @@
 				.discount-tag{
 					display: flex;
 					align-items: center;
-					width: 92rpx;
+					width: 82rpx;
 					height: 28rpx;
 					line-height: 28rpx;
 					background: #FFF6F5;

+ 4 - 5
detail/shopDetail/shopDetail.vue

@@ -131,7 +131,7 @@
 		data() {
 			return {
 				open:999,
-				info: null,
+				info: {},
 				status: 'more',
 				status1: 'more',
 				_mapContext: null,
@@ -145,7 +145,6 @@
 				},
 				freeList:[],
 				buyList:[],
-				goodsTypeObj:{},
 				showDesc:false,
 				show:false,
 				currentPage:1
@@ -223,7 +222,8 @@
 				}else{
 					userInfo = {setMealId:0,userId:''}
 				}
-				this.info = JSON.parse(uni.getStorageSync('shopInfo'))
+				let shopInfo = uni.getStorageSync('shopInfo')?JSON.parse(uni.getStorageSync('shopInfo')):''
+				this.info = {...this.info,...shopInfo}
 				this.shopDetail(this.info.shopId)
 				this.query.shopId = this.info.shopId
 				this.query.setMealId = userInfo.setMealId
@@ -317,7 +317,7 @@
 						this.info.mapLat = res.content.mapLat
 						this.info.mapLon = res.content.mapLon
 						this.info.detailContent = res.content.detailContent
-						
+						this.info.shopName = res.content.shopName
 						uni.setNavigationBarTitle({
 							title:res.content.shopName
 						})
@@ -344,7 +344,6 @@
 		},
 		onLoad(options) {
 			console.log(66666);
-			this.goodsTypeObj = JSON.parse(uni.getStorageSync('goodsTypeObj')) 
 			this.info.shopId = options.id
 			// this.init()
 		},

+ 11 - 1
detail/virtualGoods/detail.vue

@@ -42,6 +42,16 @@
 			<button class="btn" type="default" :loading="loading" @click="handleBuy">确认</button>
 		</view>
 		
+		<!-- 商品说明
+		充值方式:自动充值,填写登录时绑定的手机号/邮箱号等对应账号;
+		有效期说明:有效期自购买之日算起,过期即失效。
+		温馨提示
+		1、仅支持在中国境内使用。
+		2、本产品为虚拟商品,一经付款,无法办理退款退货;
+		3、充值前请核对充值账号,切勿填错,如因用户个人原因充错,责任自行承担;
+		4、充值成功后,请登录官方网站/APP查询您的会员状态和有效期;
+		5、如有其他限制,以所充值会员的官方规定为准。 -->
+		
 		<u-modal :show="iosShow" content='暂不提供IOS用户进行充值业务' @confirm="iosShow = false"></u-modal>
 		
 		<!-- 选择账号类型 -->
@@ -94,7 +104,7 @@
 			// 创建订单
 			handleBuy() {
 				if (uni.getStorageSync('token')) {
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode == 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						if(!this.form.account) return uni.showToast({
 							title:'请输入充值账号',
 							icon:'none'

+ 172 - 28
detail/virtualGoods/index.vue

@@ -1,19 +1,23 @@
 <template>
 	<view class="virtual">
 		
-		<view class="box" :key="index">
-			<view class="goods-item" v-for="(item,index) in goodsData" :key="index" @click="handleItem(item,item.name)">
+		<view class="box" v-for="(item,index) in goodsData" :key="index">
+			<view class="goods-item" v-for="i in item.goods" :key="i.mainId" @click="handleItem(i,item.name)">
+			<!-- <view class="goods-item" v-for="(item,index) in goodsData" :key="index" @click="handleItem(item,item.name)"> -->
 				<image class="icon" :src="i.mainImg" mode=""></image>
 				<view class="goods-info">
 					<view class="goods-title">
-						{{item.item_name}}
+						{{i.name}}
+						<!-- {{item.item_name}} -->
 					</view>
 					<view class="goods-desc">
-						{{item.item_name}}
+						{{item.name}}
+						<!-- {{item.item_name}} -->
 					</view>
 				</view>
 				<view class="price">
-					¥{{Number(item.channel_price).toFixed(2)}}
+					¥{{i.calcPrice}}
+					<!-- ¥{{Number(item.channel_price).toFixed(2)}} -->
 				</view>
 			</view>
 		</view>
@@ -25,7 +29,8 @@
 					<image class="icon" :src="chooseInfo.mainImg" mode=""></image>
 					<view class="goods-info">
 						<view class="goods-title">
-							{{chooseInfo.item_name}}
+							{{chooseInfo.name}}
+							<!-- {{chooseInfo.item_name}} -->
 						</view>
 						<view class="goods-desc">
 							{{chooseInfo.catalogName}}
@@ -34,7 +39,8 @@
 					<view class="price">
 						<u-loading-icon v-if="loadingPrice" text="获取价格中"></u-loading-icon>
 						<template v-else>
-							¥{{chooseInfo.channel_price}}
+							¥{{chooseInfo.price}}
+							<!-- ¥{{chooseInfo.channel_price}} -->
 						</template>
 					</view>
 				</view>
@@ -83,17 +89,21 @@
 			handleItem(item,catalogName) {
 				console.log(item,catalogName);
 				this.chooseInfo = JSON.parse(JSON.stringify(item) ) 
-				this.chooseInfo.catalogName = catalogName ||'无'
-				// this.show = true
-				let that = this
-				uni.navigateTo({
-					url:`/detail/virtualGoods/detail`,
-					  success: function(res) {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit('data', that.chooseInfo)
-					  }
-				})
-				// this.getVirtualInfo(item.mainId)
+				this.chooseInfo.catalogName = catalogName
+				this.show = true
+				this.getVirtualInfo(item.mainId)
+				
+				// console.log(item,catalogName);
+				// this.chooseInfo = JSON.parse(JSON.stringify(item) ) 
+				// this.chooseInfo.catalogName = catalogName ||'无'
+				// let that = this
+				// uni.navigateTo({
+				// 	url:`/detail/virtualGoods/detail`,
+				// 	  success: function(res) {
+				// 		// 通过eventChannel向被打开页面传送数据
+				// 		res.eventChannel.emit('data', that.chooseInfo)
+				// 	  }
+				// })
 			},
 			 open() {
 			},
@@ -107,19 +117,89 @@
 				getVirtuallist().then(res=>{
 					uni.hideLoading()
 					if(res.state == 'Success'){
-						this.goodsData = res.content.products
+						// this.goodsData = res.content.products
+						this.goodsData = res.content
+					}
+				})
+			},
+			getVirtualInfo(commodityId){
+				this.loadingPrice = true
+				getVirtualInfo({commodityId}).then(res=>{
+					this.loadingPrice = false
+					if(res.state == 'Success'){
+						this.chooseInfo.price = res.content.realPrice
 					}
 				})
 			},
-			// getVirtualInfo(commodityId){
-			// 	this.loadingPrice = true
-			// 	getVirtualInfo({commodityId}).then(res=>{
-			// 		this.loadingPrice = false
-			// 		if(res.state == 'Success'){
-			// 			this.chooseInfo.price = res.content.realPrice
-			// 		}
-			// 	})
-			// },
+			// 创建订单
+			handleBuy() {
+				if (uni.getStorageSync('token')) {
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
+						if(!this.form.account) return uni.showToast({
+							title:'请输入充值账号',
+							icon:'none'
+						})
+						let that = this
+						uni.getSystemInfo({
+							success(res){
+								console.log(res.osName);
+								if(res.osName == 'ios'){
+									that.show = false
+									that.iosShow = true
+								}else{
+									let info = {
+										goodsId:that.chooseInfo.mainId,
+										goodsName:that.chooseInfo.name,
+										realPrice:that.chooseInfo.calcPrice,
+										goodsImg:that.chooseInfo.mainImg,
+										goodsDescribe:that.chooseInfo.catalogName,
+										shopId:SHOP_ID,
+										extend:JSON.stringify({account:that.form.account})
+									}
+									uni.navigateTo({
+										url:`/detail/virtualGoods/pay`,
+										  success: function(res) {
+											// 通过eventChannel向被打开页面传送数据
+											res.eventChannel.emit('pay', info)
+										  }
+									})
+								}
+							}
+						})
+					}else{
+						uni.showModal({
+							title:'此商品需要开通会员才能购买',
+							cancelText:'下次再说',
+							confirmText:'立即开通',
+							success(res) {
+								if(res.confirm){
+									uni.navigateTo({
+										url:'/my/memberCenter/index'
+									})
+								}
+							}
+						})
+					}
+					
+					
+				} else {
+					uni.showModal({
+						title:'请登录',
+						confirmText:'去登录',
+						success(res){
+							console.log(res);
+							if(res.confirm){
+								uni.navigateTo({
+									url:'/login/login/login?redirect=/detail/virtualGoods/index'
+								})
+							}
+						}
+					})
+				}
+				
+			
+			}
+			
 		
 		},
 		created() {
@@ -221,5 +301,69 @@
 			}
 		}
 		
+		
+		.content{
+					padding: 24rpx;
+					.popup-title{
+						font-size: 32rpx;
+						font-weight: bold;
+						color: #222222;
+					}
+					.goods-box{
+						display: flex;
+						margin-top: 28rpx;
+						.icon{
+							width: 160rpx;
+							height: 160rpx;
+							border-radius: 16rpx;
+							background: #F0F0F0;
+						}
+						.goods-info{
+							display: flex;
+							flex-direction: column;
+							justify-content: space-around;
+							flex: 1;
+							margin-left: 20rpx;
+							.goods-title{
+								color: #222222;
+								font-weight: bold;
+								font-size: 36rpx;
+							}
+							.goods-desc{
+								font-size: 28rpx;
+								color: #AAAAAA;
+							}
+						}
+						.price{
+							color: $uni-color-primary;
+							font-size: 36rpx;
+							font-weight: bold;
+							align-self: center;
+						}
+					}
+					.notice{
+						font-size: 24rpx;
+						color: #AAAAAA;
+						padding: 26rpx 0;
+						border-bottom: 2rpx solid #F0F0F0;
+					}
+					.goods-describe{
+						color: #222222;
+						font-size: 24rpx;
+						max-height: 480rpx;
+						padding-top: 28rpx;
+						overflow: auto;
+					}
+					.btn{
+						width: 688rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						background: linear-gradient(283deg, #F8D48C 0%, #FBDDA6 100%);
+						border-radius: 46rpx;
+						margin-top: 54rpx;
+						font-size: 28rpx;
+					}
+				}
+		
 	}
 </style>

+ 484 - 4
detail/virtualGoods/pay.vue

@@ -1,6 +1,18 @@
+
+
+
 <template>
 	<view class="pay">
 
+		<!-- <view class="shop-info" v-if="!isVisual">
+			<view class="shop-name">
+				{{info.shopName}}
+			</view>
+			<view class="address">
+				{{info.address}}
+			</view>
+		</view> -->
+
 		<view class="pay-info">
 			<view class="goods-info">
 				<image class="goods-img" :src="info.goodsImg" mode=""></image>
@@ -12,14 +24,14 @@
 						{{info.goodsDescribe}}
 					</view>
 					<view class="price">
-						¥{{info.price}}
+						¥{{info.realPrice}}
 					</view>
 				</view>
 			</view>
 
 			
 
-<!-- 			<view class="coupon">
+			<view class="coupon">
 				<view class="label">
 					优惠券
 				</view>
@@ -27,7 +39,475 @@
 					暂无可用
 					<image class="icon" src="@/static/jiantou-icon.png" mode=""></image>
 				</view>
-			</view> -->
+			</view>
+
+		</view>
+		
+		<view class="input-box" v-if="isVisual">
+			
+			<view class="label">
+				充值账号
+			</view>
+			<view class="value">
+				{{form.account}}
+			</view>
+		</view>
+
+
+		<view class="btn-box">
+			<view class="total-price">
+				<view class="label">
+					合计:
+				</view>
+				<view class="price">
+					¥ {{info.realPrice}}
+				</view>
+			</view>
+
+			<button class="btn" type="default" :loading="loading" @click="creat">提交订单</button>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		calculate
+	} from '@/api/order.js';
+	import {
+		creat
+	} from '@/api/goods.js'
+	import {
+		creatPayOrder,
+		queryPayOrder,
+		payDetails
+	} from '@/api/payment.js'
+	import guid from '@/utils/guid.js'
+	export default {
+		data() {
+			return {
+				isVisual:false,//是否是虚拟商品
+				loading: false,
+				info: {},
+				form:{
+					account:''
+				},
+				query: {
+					"msgType": "wx.unifiedOrder",
+					"orderDesc": "测试",
+					"orderNo": "",
+					"subOpenId": "",
+					"userId": ""
+				},
+				// 支付信息
+				payData: {
+
+				}
+			}
+		},
+		computed: {
+			
+		},
+		methods: {
+			choose() {
+				let that = this
+				uni.navigateTo({
+					url: '/pay/coupon?couponId=' + this.info.couponId,
+					success: function(res) {
+						// 通过eventChannel向被打开页面传送数据
+						res.eventChannel.emit('pay', that.info)
+					}
+				})
+			},
+			//创建订单
+			creat() {
+				if (this.loading) return
+					
+					this.loading = true
+					uni.showLoading({
+						title: '支付中'
+					})
+					let that = this
+					if (!this.payData.timeStamp) {
+						// 处理扩展字段  暂时只有研学商品和视频会员  视频会员是字符串的JSON  研学是字符串
+						let extend 
+						try{
+							if(JSON.parse(this.info.extend)){
+								extend = this.info.extend
+							}
+						}catch(e){
+							extend = this.info.reservationTime || ''
+						}
+						
+						creat({
+							discountId: (this.info.couponId || this.info.couponId == -1) ? [this.info.couponId
+							] : [],
+							extend,
+							channel:'ZhongShu',
+							goodsList: this.info.goodsId ? [this.info.goodsId] : [],
+							idempotent: guid(),
+							shopId: this.info.shopId
+						}).then(res => {
+							this.loading = false
+							if (res.state == 'Success') {
+								if (!this.info.realPrice) { //价格为0
+									uni.hideLoading()
+									uni.reLaunch({
+										url: '/my/order/index'
+									})
+								} else {
+									this.query.orderNo = res.content.orderNo
+									this.query.subOpenId = JSON.parse(uni.getStorageSync('userInfo')).openId
+									this.query.orderDesc = this.info.goodsName
+									creatPayOrder(this.query).then(data => {
+										that.payData = JSON.parse(data.content.miniPayRequest)
+										if (data.content.miniPayRequest == null) return uni.hideLoading()
+										uni.requestPayment({
+											"provider": "wxpay",
+											"orderInfo": that.payData,
+											"appid": that.payData
+											.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
+											"paySign": that.payData.paySign,
+											"nonceStr": that.payData.nonceStr, // 随机字符串
+											"package": that.payData.package, // 固定值
+											// "prepayid":  that.payData.package, // 统一下单订单号 
+											"timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
+											"signType": that.payData.signType, //签名算法
+											success(msg) {
+												console.log('msg', msg, res);
+												queryPayOrder(that.query.orderNo).then(res1 => {
+													if (res1.state == 'Success') {
+														uni.hideLoading()
+														uni.reLaunch({
+															url: '/my/order/index'
+														})
+													}
+												})
+											},
+											fail(e) {
+												console.log('err', e);
+												that.loading = false
+												uni.hideLoading()
+												uni.showToast({
+													title: '取消支付',
+													icon: 'fail'
+												})
+												// 取消支付后
+												uni.reLaunch({
+													url:'/my/order/detail?id='+that.query.orderNo
+												})
+												// // 取消支付后,获取支付信息以备再次支付
+												// payDetails(that.query.orderNo).then(r => {
+												// 	if (r.state == 'Success') {
+												// 	that.payData = JSON.parse(r.content.miniPayRequest)
+												// 	}
+												// })
+											}
+										})
+
+									})
+								}
+
+							}
+						})
+					} else { // 取消支付后再次支付
+						uni.requestPayment({
+							"provider": "wxpay",
+							"orderInfo": that.payData,
+							"appid": that.payData.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
+							"paySign": that.payData.paySign,
+							"nonceStr": that.payData.nonceStr, // 随机字符串
+							"package": that.payData.package, // 固定值
+							// "prepayid":  that.payData.package, // 统一下单订单号 
+							"timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
+							"signType": that.payData.signType, //签名算法
+							success(msg) {
+								console.log('msg', msg);
+								queryPayOrder(that.query.orderNo).then(res1 => {
+									if (res1.state == 'Success') {
+										uni.hideLoading()
+										uni.reLaunch({
+											url: '/my/order/index'
+										})
+									}
+								})
+							},
+							fail(e) {
+								that.loading = false
+								uni.hideLoading()
+								uni.showToast({
+									title: '取消支付',
+									icon: 'fail'
+								})
+								// 取消支付后,获取支付信息以备再次支付
+								payDetails(that.query.orderNo).then(r => {
+									if (r.state == 'Success') {
+										that.payData = JSON.parse(r.content.miniPayRequest)
+									}
+								})
+								console.log('err', e);
+							}
+						})
+					}
+			}
+
+		},
+		onReady() {
+			
+		},
+		onLoad() {
+			let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+			this.query.userId = userInfo.userId
+			let that = this
+			const eventChannel = this.getOpenerEventChannel();
+			eventChannel.on('pay', function(data) {
+				that.info = data
+				try{
+					let extend = JSON.parse(that.info.extend)
+					if(extend.account){
+						that.isVisual = true
+						that.form.account = extend.account
+					}
+				}catch(e){
+					//TODO handle the exception
+				}
+				console.log('data', data);
+			})
+		}
+	}
+</script>
+
+<style lang="scss">
+	.pay {
+		background: #F9F9F9;
+		min-height: 100vh;
+		padding-top: 20rpx;
+
+		.shop-info {
+			margin: 0 30rpx 20rpx;
+			width: 690rpx;
+			padding: 24rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+			.shop-name {
+				color: #181818;
+				font-size: 32rpx;
+			}
+
+			.address {
+				color: #999999;
+				font-size: 24rpx;
+				margin-top: 12rpx;
+			}
+		}
+
+		.pay-info {
+			margin: 0 30rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			padding: 28rpx 24rpx;
+
+			.goods-info {
+				display: flex;
+				margin-bottom: 30rpx;
+
+				.goods-img {
+					width: 164rpx;
+					height: 164rpx;
+					border-radius: 16rpx;
+				}
+
+				.info {
+					margin-left: 28rpx;
+					flex: 1;
+
+					.goods-name {
+						font-weight: bold;
+						color: #181818;
+						font-size: 32rpx;
+						width: 100%;
+						word-break: break-all;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						/* 这里是超出几行省略 */
+					}
+
+					.num {
+						color: #999999;
+						font-size: 24rpx;
+						margin-top: 16rpx;
+					}
+
+					.price {
+						font-weight: bold;
+						color: #181818;
+						font-size: 32rpx;
+						margin-top: 26rpx;
+					}
+				}
+			}
+			
+			
+
+			.coupon {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 2rpx dashed #f3f3f3;
+				padding: 28rpx 0;
+
+				.label {
+					color: #222222;
+					font-size: 28rpx;
+				}
+				
+				.choose-coupon.none{
+					color: #AAAAAA;
+				}
+				.choose-coupon {
+					color: #FF4848;
+					font-size: 28rpx;
+					display: flex;
+					align-items: center;
+
+					.icon {
+						width: 28rpx;
+						height: 28rpx;
+						display: block;
+						margin-left: 10rpx;
+					}
+				}
+			}
+
+			.explain {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding-top: 28rpx;
+
+				.label {
+					color: #AAAAAA;
+					font-size: 28rpx;
+				}
+
+				.right {
+					display: flex;
+					align-items: center;
+					font-size: 24rpx;
+
+					.red {
+						font-weight: 500;
+						color: #FF4848;
+						margin: 0 10rpx;
+					}
+
+					.fs28 {
+						font-size: 28rpx !important;
+					}
+				}
+			}
+		}
+		
+		.input-box{
+			margin: 20rpx 30rpx;
+			padding: 28rpx 24rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.label {
+				color: #222;
+				font-size: 28rpx;
+			}
+			
+			.value {
+				font-size: 28rpx;	
+				color: #AAAAAA;
+			}
+		}
+
+		.btn-box {
+			position: fixed;
+			bottom: 0%;
+			left: 0%;
+			width: 100%;
+			height: 98rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			border-top: 1rpx solid #EEEEEE;
+
+			.total-price {
+				display: flex;
+				align-items: center;
+
+				.label {
+					color: #181818;
+					font-size: 28rpx;
+				}
+
+				.price {
+					font-size: 36rpx;
+					font-weight: 800;
+					color: #FF4848;
+					margin-left: 10rpx;
+				}
+			}
+
+			.btn {
+				width: 280rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				text-align: center;
+				background: $uni-color-primary;
+				box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
+				border-radius: 46rpx 46rpx 46rpx 46rpx;
+				font-weight: 800;
+				color: #FFFFFF;
+				font-size: 28rpx;
+				margin: 0;
+			}
+		}
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+<!-- <template>
+	<view class="pay">
+
+		<view class="pay-info">
+			<view class="goods-info">
+				<image class="goods-img" :src="info.goodsImg" mode=""></image>
+				<view class="info">
+					<view class="goods-name">
+						{{info.goodsName}}
+					</view>
+					<view class="num">
+						{{info.goodsDescribe}}
+					</view>
+					<view class="price">
+						¥{{info.price}}
+					</view>
+				</view>
+			</view>
+
+		
 
 		</view>
 		
@@ -449,4 +929,4 @@
 			}
 		}
 	}
-</style>
+</style> -->

+ 1 - 1
hotel/cityList.vue

@@ -51,7 +51,7 @@
 		},
 		methods: {
 			handleCurrent(){
-				let code 
+				let code = ''
 				this.list.map(item=>{
 					if(item.name.indexOf(this.city) != -1){
 						code = item.code

+ 1 - 1
hotel/hotelDetail.vue

@@ -420,7 +420,7 @@
 				uni.setStorageSync('hotelImgList',JSON.stringify(this.pictures))
 			},
 			handleBuy(i,item){
-				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 					let that = this
 					uni.navigateTo({
 						url:`./makeOut?checkInDate=${this.query.checkIn}&checkOutDate=${this.query.checkOut}&day=${this.day}`,

+ 1 - 1
movie/movieDetail.vue

@@ -233,7 +233,7 @@
 			},
 			goChooseSeat(sessionId){
 				if(uni.getStorageSync('token')){
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						uni.navigateTo({
 							url:`./chooseSeat?movieId=${this.query.movieId}&cinemaId=${this.cinemaId}&sessionId=${sessionId}`
 						})

+ 1 - 0
my/coupon/index.vue

@@ -162,6 +162,7 @@
 		width: 100%;
 		top: 0%;
 		left: 0%;
+		z-index: 5;
 		.tab{
 			flex: 1;
 			text-align: center;

+ 0 - 2
my/edit/edit.vue

@@ -110,11 +110,9 @@
 			loginOut() {
 				// 保存部分信息
 				let location = uni.getStorageSync('location')
-				let goodsTypeObj = uni.getStorageSync('goodsTypeObj')
 				let inviteCode = uni.getStorageSync('inviteCode')
 				uni.clearStorageSync()
 				uni.setStorageSync('location',location)
-				uni.setStorageSync('goodsTypeObj',goodsTypeObj)
 				uni.setStorageSync('inviteCode',inviteCode)
 				uni.switchTab({
 					url: '/pages/index/index'

+ 208 - 18
my/memberCenter/index.vue

@@ -87,7 +87,7 @@
 
 
 
-		<view class="fixed-box" v-show="userInfo.setMealCode != currentMeal">
+		<view class="fixed-box">
 			<view class="btn-box">
 				<view class="left-box" @click="handleCall">
 					<image class="icon" src="../../static/phone.png" mode=""></image>
@@ -100,16 +100,16 @@
 						</view>
 					</view>
 				</view>
-				<button class="btn" :loading="btnLoading" @click="goOrder">
+				<button class="btn" v-if="cmVipEnable&&userInfo.setMealCode != currentMeal" :loading="btnLoading" @click="goOrder">
 					立即开通
 				</button>
 			</view>
-			<view class="agreement-box">
+			<view class="agreement-box" v-if="cmVipEnable&&userInfo.setMealCode != currentMeal">
 				<u-checkbox-group size="28rpx" v-model="checked" @change="choose">
 					<u-checkbox  activeColor="#EE4320" shape="circle" name="1" ></u-checkbox>
 				</u-checkbox-group>
 				<view class="text">
-					已阅读并同意 <text class="color" @click="jump">《慧研学惠生活基础会员服务协议》</text>
+					已阅读并同意 <text class="color" @click="jump('/agreement/member')">《慧研学惠生活基础会员服务协议》</text>
 				</view>
 			</view>
 			
@@ -121,7 +121,7 @@
 					权益领取
 				</view>
 				<view class="discounts">
-					<view class="discounts-item" >
+					<view class="discounts-item" v-if="type == 2">
 							<view class="type-box">
 								<view class="price">
 									{{item | filterPrice}}
@@ -147,31 +147,69 @@
 							</view>
 					</view>
 					
-					<view class="sub-title" v-if="item.equityMsg">
-						权益领取
+					<view class="box" v-else-if="type == 4">
+						<view class="item" v-for="(i,d) in item.equityContent" :key="d">
+							<image class="icon" :src="i.icon" mode=""></image>
+							<view class="title">
+								{{i.equityName}}
+							</view>
+							<view class="btn" @click="handle(i)">
+								{{i.canClaim?'领取':'查看'}}
+							</view>
+						</view>
 					</view>
-					<!-- <rich-text class="desc" :nodes="item.equityMsg"></rich-text> -->
-					<view class="desc" v-html="item.equityMsg">
-						{{item.equityMsg}}
+					
+					<view class="desc-box">
+						
+						<view class="sub-title" v-if="item.equityMsg">
+							权益说明
+						</view>
+						<!-- <rich-text class="desc" :nodes="item.equityMsg"></rich-text> -->
+						<view class="desc" v-html="item.equityMsg">
+							{{item.equityMsg}}
+						</view>
 					</view>
 					
+					
 				
 				</view>
 			</u-popup>
-		
-		
+			
+			<u-popup :show="show1" round="32rpx" mode="bottom" @close="show1 = false">
+				<view class="discounts-title">
+					权益领取手机号
+				</view>
+				<view class="account-box">
+				<!-- 	<u--input
+						class="account-input"
+					    placeholder="请输入充值账号"
+					    border="none"
+						cursorSpacing="150rpx"
+					    v-model.trim="form.account"
+					  ></u--input> -->
+					<input  class="account-input" v-model.trim="form.account" placeholder="请输入充值账号" border="none" />
+					<button class="btn" :loading="btnLoading1" @click="getMediaVipCoupon">
+						确认
+					</button>
+				</view>
+				
+			</u-popup>
+			
 		<web-view v-if="H5url" :src="H5url"></web-view>
 
 	</view>
 </template>
 
 <script>
-	import {mealList,equityList,getH5url} from '@/api/combo.js'
+	import {getSetting} from '@/api/common.js'
+	import {mealList,equityList,getH5url,getVideoEquity,getMediaVipCoupon} from '@/api/combo.js'
 	import {getXiaojuCoupon,getCouponDetail} from '@/api/coupon.js'
 	
 	export default {
 		data() {
 			return {
+				type:0,
+				cmVipEnable:false,
 				checked:'',
 				current: 0,//轮播套餐index
 				currentMeal: 0,//套餐id
@@ -200,11 +238,18 @@
 				    "phone": "",
 				    "saleModalId": ""
 				},
+				form:{
+					account:JSON.parse(uni.getStorageSync('userInfo')).phoneNum
+				},
 				H5url:'',
 				btnLoading:false,
+				btnLoading1:false,
 				currentMealCode:0,
 				show:false,
-				item:{}
+				show1:false,
+				item:{},
+				equityId:0,
+				equityContentId:0
 			}
 		},
 		computed: {
@@ -254,6 +299,18 @@
 			},
 		},
 		methods: {
+			handle(item){
+				if(item.canClaim){
+					this.show = false
+					this.show1 = true
+					this.equityContentId = item.id
+					this.form.account = JSON.parse(uni.getStorageSync('userInfo')).phoneNum
+				}else{
+					uni.navigateTo({
+						url:'./logList'
+					})
+				}
+			},
 			handleCall() {
 				uni.makePhoneCall({
 					phoneNumber: '10086' //仅为示例
@@ -261,6 +318,7 @@
 				
 			},
 			openPop(item){
+				this.type = item.bindService
 				if(item.bindService == 2){//加油券
 					this.show = true
 					getCouponDetail({id:item.bindContent}).then(res=>{
@@ -269,11 +327,29 @@
 							this.item.equityMsg = item.equityMsg.replaceAll('\n','<br/>')
 						}
 					})
+				}else if(item.bindService == 4){//视频会员
+					this.show = true
+					this.equityId = item.id
+					getVideoEquity({equityId:item.id}).then(res=>{
+						if(res.state == 'Success'){
+							this.item = res.content
+							this.item.equityContent = JSON.parse(this.item.equityContent)
+							this.item.equityMsg = item.equityMsg.replaceAll('\n','<br/>')
+						}
+					})
+				}else if(item.equityName.indexOf('领水')!=-1){
+					uni.navigateTo({
+						url:'/special/water'
+					})
 				}
 			},
 			// 点击领取
 			handleBuy() {
+				uni.showLoading({
+					title:'领取中'
+				})
 				getXiaojuCoupon({activityXiaojuId:this.item.activityXiaojuId,userId:JSON.parse(uni.getStorageSync('userInfo')).userId,mobile:JSON.parse(uni.getStorageSync('userInfo')).phoneNum}).then(res=>{
+					uni.hideLoading()
 					if(res.state == 'Success'){
 						uni.showToast({
 							title:'领取成功',
@@ -281,10 +357,29 @@
 						})
 					}
 				})
+				
+				
 			},
-			jump(){
+			getMediaVipCoupon(){
+				let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+				getMediaVipCoupon({
+				   equityContentId:this.equityContentId,
+				  "equityId": this.equityId,
+				  "userId": userInfo.userId,
+					userMobile:userInfo.phoneNum,
+					mobile:this.form.account}).then(res=>{
+					if(res.state == 'Success'){
+						this.show1 = false
+						uni.showToast({
+							title:'领取成功',
+							icon:'success'
+						})
+					}
+				})
+			},
+			jump(url){
 				uni.navigateTo({
-					url:'/agreement/member'
+					url
 				})
 			},
 			choose(val){
@@ -313,8 +408,14 @@
 					mealList({currentPage:1,pageSize:99,status:1}).then(res=>{
 						if (res.state == 'Success') {
 							this.list = res.content.records
-							this.currentMeal = this.list[0].setMealCode
-							this.query.discount = this.list[0].discount
+							this.list.map((item,index)=>{
+								if(this.userInfo.setMealCode == item.setMealCode){
+									this.current = index
+								}
+							})
+							
+							this.currentMeal = this.list[this.current].setMealCode
+							this.query.discount = this.list[this.current].discount
 							resolve(this.currentMeal)
 						}
 					})
@@ -345,6 +446,13 @@
 						this.H5url = res.content
 					}
 				})
+			},
+			getSetting(){
+				getSetting().then(res=>{
+					if(res.state == 'Success'){
+						this.cmVipEnable = res.content.cmVipEnable
+					}
+				})
 			}
 			
 		},
@@ -364,6 +472,7 @@
 			this.getData()
 		},
 		onLoad(options) {
+			this.getSetting()
 			console.log('onload',options);
 		}
 	}
@@ -604,6 +713,10 @@
 			}
 		}
 		
+		.u-popup__content{
+			background: #F6F6F6!important;
+		}
+		
 		.discounts-title {
 			font-weight: bold;
 			font-size: 32rpx;
@@ -674,6 +787,59 @@
 							background: none;
 						}
 			}
+			.box{
+				border-radius: 16rpx;
+				background: #fff;
+				.item{
+					display: flex;
+					align-items: center;
+					padding: 28rpx 24rpx;
+					.icon{
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 16rpx;
+					}
+					.title{
+						font-weight: 600;
+						font-size: 32rpx;
+						color: #222222;
+						flex: 1;
+						margin-left: 20rpx;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+					.btn{
+						width: 120rpx;
+						height: 52rpx;
+						text-align: center;
+						line-height: 52rpx;
+						font-size: 28rpx;
+						color: #EE4320;
+						background: rgba(238,67,32,0.1);
+						border-radius: 26rpx 26rpx 26rpx 26rpx;
+					}
+					.btn.disable{
+						background: #F0F0F0;
+						color: #AAAAAA;
+					}
+				}
+			}
+			.desc-box{
+				border-radius: 16rpx;
+				background: #fff;
+				padding: 24rpx;
+				margin-top: 20rpx;
+				.sub-title{
+					font-weight: bold;
+					font-size: 26rpx;
+					color: #222222;
+					padding: 0rpx;
+				}
+				.desc{
+					margin-top: 20rpx;
+				}
+			}
 			.sub-title{
 				font-weight: bold;
 				font-size: 26rpx;
@@ -687,6 +853,30 @@
 				line-height: 40rpx;
 			}
 		}
+		
+		.account-box{
+			.account-input,.u-input__content{
+				width: 702rpx;
+				height: 96rpx;
+				background: #FFFFFF;
+				border-radius: 16rpx 16rpx 16rpx 16rpx;
+				margin:0 auto 20rpx;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				
+			}
+			.btn{
+				width: 702rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				text-align: center;
+				background: #EE4320;
+				border-radius: 40rpx;
+				font-weight: 600;
+				font-size: 28rpx;
+				color: #FFFFFF;
+			}
+		}
 
 	}
 </style>

+ 104 - 0
my/memberCenter/logList.vue

@@ -0,0 +1,104 @@
+<template>
+	<view class="log-list">
+		<zs-list class="store-box" mt="0" @load="loadMore" :status="status">
+			<view class="item" v-for="(item,index) in list" :key="index">
+				<image class="icon" :src="JSON.parse(item.equityContent).icon" mode=""></image>
+				<view class="info">
+					<view class="title">
+						{{JSON.parse(item.equityContent).equityName}}
+					</view>
+					<view class="time">
+						领取时间:{{JSON.parse(item.equityContent).createTime}}
+					</view>
+				</view>
+				<view class="status" :class="[item.status == 1?'':'used']">
+					 {{item.status == 1?'待充值':'已充值'}}
+				</view>
+			</view>
+		</zs-list>
+	</view>
+</template>
+
+<script>
+	import {getLogList} from '@/api/combo.js'
+	export default {
+		data() {
+			return {
+				list:[],
+				status:'more',
+				query:{
+					currentPage:1,
+					pageSize:10,
+				}
+			}
+		},
+		methods: {
+			loadMore(){
+				this.getLogList()
+			},
+			getLogList(){
+				if(this.status == 'noMore' || this.status == 'loading') return
+				this.status = 'loading'
+				getLogList(this.query).then(res=>{
+					if(res.state == 'Success'){
+						this.list = this.list.concat(res.content.records)
+						if(this.list.length >= res.content.total){
+							this.status = 'noMore'
+						}else{
+							this.status = 'more'
+						}
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+.log-list{
+	background: #F9F9F9;
+	padding: 20rpx 24rpx;
+	min-height: 100vh;
+	.zs-list {
+		.item {
+			padding: 24rpx 0;
+			border-bottom: 2rpx solid #F0F0F0;
+			display: flex;
+			align-items: center;
+			.icon{
+				width: 160rpx;
+				height: 160rpx;
+				border-radius: 16rpx;
+			}
+			.info{
+				flex: 1;
+				margin-left: 20rpx;
+				.title{
+					font-weight: 600;
+					font-size: 32rpx;
+					color: #222222;
+				}
+				.time{
+					font-size: 24rpx;
+					color: #AAAAAA;
+					margin-top: 20rpx;
+				}
+			}
+			.status{
+				width: 120rpx;
+				height: 52rpx;
+				line-height: 52rpx;
+				text-align: center;
+				background: #EE4320;
+				border-radius: 26rpx 26rpx 26rpx 26rpx;
+				font-size: 28rpx;
+				color: #FFFFFF;
+			}
+			.status.used{
+				background: rgba(238,67,32,0.1);
+				color: #EE4320;
+			}
+		}
+	}
+}
+</style>

+ 951 - 4
my/order/detail.vue

@@ -82,7 +82,7 @@
 				</view>
 			</view>
 			
-			<view class="content code-box"  v-if="info.goodsList[0].jobFlowMap != 'video2'&&info.goodsList[0].jobFlowMap != 'P802'&&info.goodsList[0].goodsState == 'WAIT_USE'&&info.goodsList[0].goodsName!='二维码支付'">
+			<view class="content code-box"  v-if="info.goodsList[0].jobFlowMap != 'P802'&&info.goodsList[0].goodsState == 'WAIT_USE'&&info.goodsList[0].goodsName!='二维码支付'">
 					<view class="title">
 						券码信息
 					</view>
@@ -240,7 +240,7 @@
 					充值账号
 				</view>
 				<view class="value">
-					{{info.goodsList[0].extend.rechargeAccount}}
+					{{info.goodsList[0].extend.account}}
 				</view>
 			</view>
 			
@@ -281,7 +281,7 @@
 				</view>
 			</view>
 			
-			<view class="content apply-box" v-else-if="(info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED')&&info.goodsList[0].refundLog.refund != 'REFUSAL_REFUND'&&isRefund()&&info.goodsList[0].jobFlowMap !== 'XiaoJu'&&info.goodsList[0].jobFlowMap != 'video2'&&info.goodsList[0].jobFlowMap != 'P802'" @click="apply">
+			<view class="content apply-box" v-else-if="(info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED')&&info.goodsList[0].refundLog.refund != 'REFUSAL_REFUND'&&isRefund()&&info.goodsList[0].jobFlowMap !== 'XiaoJu'&&info.goodsList[0].jobFlowMap != 'P802'" @click="apply">
 				<view class="label">
 					退款申请
 				</view>
@@ -430,6 +430,953 @@
 					}
 				});
 				
+			},
+			isRefund(){
+				if(!this.info.goodsList[0].verifyModel){//没核销
+					return true
+				}else if(this.info.goodsList[0].verifyModel && (new Date().getTime() < (this.info.goodsList[0].verifyModel.checkTime + 1000*60*60*48))){// 已核销 并且没超过48小时
+					return true
+				}else{
+					return false
+				}
+			},
+			finish(){
+				this.isNotTime = true
+				this.payDetails(this.info.orderNo)
+			},
+			refundDetail(){
+				uni.navigateTo({
+					url:`/my/order/refundDetail?id=${this.info.orderNo}`
+				})
+			},
+			checkCode() {
+				this.codeData = ''
+				this.$nextTick(()=>{
+					
+					this.show = true
+					this.loading = true
+					let that = this
+					// uni.getScreenBrightness({
+					// 	success(res) {
+					// 		// 获取用户手机亮度 保存起来 
+					// 		that.oldBright = res.value
+					// 		setTimeout(()=>{
+					// 			uni.setScreenBrightness({
+					// 				value:1
+					// 			})
+					// 		},200)
+					// 	}
+					// })
+				
+					qrCode(this.info.goodsList[0].id).then(res=>{
+						this.loading = false
+						if(res.state == 'Success'){
+							this.codeData = res.content
+						}
+					})
+					
+				})
+			},
+			close(){
+				this.show = false
+				// uni.setScreenBrightness({
+				// 	value:this.oldBright
+				// })
+			},
+			handleCall(){
+				uni.makePhoneCall({
+					phoneNumber: '4000016553'//仅为示例
+				});
+			},
+			apply(){
+				let that = this
+				if(this.info.goodsList[0].jobFlowMap == 'XiaoJu'){
+					uni.navigateTo({
+						url:'./webView'
+					})
+				}else{
+					uni.navigateTo({
+						url:'./refund',
+						success: function(res) {
+						  // 通过eventChannel向被打开页面传送数据
+						  res.eventChannel.emit('orderInfo', that.info)
+						}
+					})
+				}
+			},
+			// 获取订单详情
+			payDetails(orderNo){
+				payDetails(orderNo).then(res=>{
+					this.pageLoading = false
+					this.info = res.content
+					if(this.info.goodsList[0].jobFlowMap == 'P802'){
+						this.isVisual = true
+					}
+					if(!this.info.goodsList[0].refundLog){
+						this.info.goodsList[0].refundLog = {}
+					}
+					if(this.info.goodsList[0].jobFlowMap != 'P802'&&this.info.goodsList[0].goodsState == 'WAIT_USE'&&this.info.goodsList[0].goodsName!='二维码支付'){
+					
+						qrCode(this.info.goodsList[0].id).then(res=>{
+							this.loading = false
+							if(res.state == 'Success'){
+								this.codeData = res.content
+							}
+						})
+					}
+					// try{
+					// 	let extend = JSON.parse(this.info.goodsList[0].extend)
+					// 	if(extend.account){
+					// 		this.isVisual = true
+					// 	}
+					// }catch(e){
+					// 	//TODO handle the exception
+					// }
+				})
+			},
+			// 取消支付
+			cancel(type){
+				uni.showLoading({
+					title: '取消中'
+				})
+				if(type == 'XiaoJu'){
+					let obj = this.info.goodsList[0].extend
+					cancelOrder(obj).then(res=>{
+						if(res.state == 'Success'){
+							uni.showToast({
+								title: '取消成功',
+								icon: 'success'
+							})
+							this.payDetails(this.info.orderNo)
+						}
+					})
+				}else{
+					closeOrder(this.info.orderNo).then(res=>{
+						if(res.state == 'Success'){
+							uni.showToast({
+								title: '取消成功',
+								icon: 'success'
+							})
+							this.payDetails(this.info.orderNo)
+						}
+					})
+				}
+			},
+			// 支付
+			pay(){
+				let that = this
+				if(this.info.goodsList[0].jobFlowMap == 'XiaoJu'){
+					let {xjOrderId,tradeId} = this.info.goodsList[0].extend
+					uni.navigateToMiniProgram({
+					   appId:"wx0d252f6ed9755862", // 滴滴加油小程序appId
+					   path: `packageA/pages/open-energy-pay/index?orderId=${xjOrderId}&tradeId=${tradeId}`, // 滴滴加油收银台页面地址,需要拼接orderId和tradeId
+					   envVersion: 'release', // 固定release
+					})
+				}else{
+					if (this.btnLoading) return
+					this.btnLoading = true
+					uni.showLoading({
+						title: '支付中'
+					})
+					let miniPayRequest = JSON.parse(this.info.payment.miniPayRequest)
+					uni.requestPayment({
+						"provider": "wxpay",
+						"orderInfo": miniPayRequest,
+						"appid": miniPayRequest.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
+						"paySign": miniPayRequest.paySign,
+						"nonceStr": miniPayRequest.nonceStr, // 随机字符串
+						"package": miniPayRequest.package, // 固定值
+						// "prepayid":  miniPayRequest.package, // 统一下单订单号 
+						"timeStamp": miniPayRequest.timeStamp, // 时间戳(单位:秒)
+						"signType": miniPayRequest.signType, //签名算法
+						success(msg) {
+							console.log('msg', msg);
+							queryPayOrder(that.info.orderNo).then(res1 => {
+								if (res1.state == 'Success') {
+									uni.hideLoading()
+									uni.showToast({
+										title: '支付成功',
+										icon: 'success'
+									})
+									that.btnLoading = false
+									that.payDetails(that.info.orderNo)
+								}
+							})
+						},
+						fail(e) {
+							that.btnLoading = false
+							uni.hideLoading()
+							uni.showToast({
+								title: '取消支付',
+								icon: 'fail'
+							})
+							// 取消支付后,获取支付信息以备再次支付
+							that.payDetails(that.info.orderNo)
+							console.log('err', e,this);
+						}
+					})
+				}
+			},
+			// 取消退款申请
+			cancelReply(){
+				if (this.btnLoading) return
+				this.btnLoading = true
+				uni.showLoading({
+					title: '取消中'
+				})
+				unRefund({id:this.info.goodsList[0].id}).then(res=>{
+					this.btnLoading = false
+					uni.hideLoading()
+					
+					if (res.state == 'Success') {
+						this.payDetails(this.info.orderNo)
+						uni.showToast({
+							title:'取消成功',
+							icon:'success'
+						})
+					}
+				})
+			}
+		},
+		onReady() {
+			
+		},
+		onLoad(options) {
+			this.info.orderNo = options.id
+		},
+		onShow() {
+			this.pageLoading = true
+			this.payDetails(this.info.orderNo)
+		},
+		created() {
+			// this.info = JSON.parse(uni.getStorageSync('order'))
+		}
+	}
+</script>
+
+<style lang="scss">
+.order-detail{
+	background: #F9F9F9;
+	min-height: 100vh;
+	padding-bottom: 100rpx;
+	.status-box{
+		padding: 24rpx 24rpx 4rpx;
+		display: flex;
+		justify-content: space-between;
+		.text-box{
+			color: #181818;
+			.status{
+				font-weight: bold;
+				font-size: 32rpx;
+				display: flex;
+				.u-count-down__text{
+					color: $uni-color-primary!important;
+				}
+			}
+			.notice{
+				font-size: 24rpx;
+				margin-top: 20rpx;
+			}
+		}
+	}
+	
+	.progress{
+		.progress-title{
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #181818;
+		}
+		
+		.progress-desc{
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			margin-top: 15rpx;
+		}
+	}
+	
+	.shop-box{
+		width: 690rpx;
+		// margin: 0 30rpx;
+		// padding: 24rpx 24rpx 30rpx;
+		background: #fff;
+		border-radius: 16rpx;
+		margin-top: -30rpx;
+		box-sizing: border-box;
+		.shop-name{
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #181818;
+			width: 100%;
+			white-space: nowrap;
+			overflow: hidden;
+			text-overflow: ellipsis;
+		}
+		.address{
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			margin-top: 20rpx;
+			width: 100%;
+			white-space: nowrap;
+			overflow: hidden;
+			text-overflow: ellipsis;
+		}
+	}
+	
+	.black{
+		color: #222222!important;
+	}
+	
+	.red{
+		color: red!important;
+	}
+	.fs28{
+		font-size: 28rpx!important;
+		font-weight: bold;
+	}
+	
+	.code-box{
+	
+		// .left{
+		// 	.title{
+		// 		font-weight: 500;
+		// 		font-size: 28rpx;
+		// 		color: #222222;
+		// 	}
+		// 	.codeNum{
+		// 		font-weight: 300;
+		// 		font-size: 24rpx;
+		// 		color: #AAAAAA;
+		// 		margin-top: 15rpx;
+		// 	}
+		// }
+	
+		.qrcode{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-top: 20rpx;
+		}
+		.code-btn{
+			display: flex;
+			align-items: center;
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			.jiantou{
+				width: 24rpx;
+				height: 24rpx;
+			}
+		}
+		
+	}
+	
+	.input-box{
+		margin: 20rpx 30rpx;
+		padding: 28rpx 24rpx;
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.label {
+			color: #222;
+			font-size: 28rpx;
+		}
+		
+		.value {
+			font-size: 28rpx;	
+			color: #AAAAAA;
+		}
+	}
+	
+	.content{
+		margin: 20rpx 30rpx;
+		padding: 28rpx 24rpx;
+		border-radius: 16rpx;
+		background: #fff;
+		.title{
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #222222;
+		}
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 28rpx;
+			.label{
+				font-size: 28rpx;
+				color: #AAAAAA;
+			}
+			.value{
+				font-size: 28rpx;
+				color: #222222;
+			}
+		}
+	}
+	.pay-btn{
+		background: $uni-color-primary;
+		width: 688rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		border-radius: 46rpx;
+		color: #fff;
+		margin-top: 50rpx;
+	}
+	.refund-box{
+		.refund-msg{
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #222222;
+			margin-top: 15rpx;
+			line-height: 40rpx;
+		}
+	}
+	.apply-box{
+		position: relative;
+		.label{
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #222222;
+		}
+		.value{
+			color: #999999;
+			font-size: 24rpx;
+			margin-top: 15rpx;
+		}
+		
+		.jiantou{
+			position: absolute;
+			top: 50%;
+			right: 24rpx;
+			transform: translateY(-50%);
+			width: 24rpx;
+			height: 24rpx;
+		}
+	}
+	.btn-box {
+		position: fixed;
+		bottom: 0%;
+		left: 0%;
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		box-sizing: border-box;
+		padding: 10rpx 24rpx env(safe-area-inset-bottom);
+		background: #fff;
+		border-top: 1rpx solid #EEEEEE;
+		.cancel-btn{
+			width: 240rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			border-radius: 40rpx;
+			border: 2rpx solid #EE4320;
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #EE4320;
+			margin: 0;
+		}
+		.btn {
+			width: 240rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			background: $uni-color-primary;
+			border-radius: 40rpx;
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #FFFFFF;
+			margin: 0;
+			margin-left: 20rpx;
+		}
+	}
+	.info{
+		.order-info{
+			display: flex;
+			.icon{
+				width: 164rpx;
+				height: 164rpx;
+				border-radius: 16rpx;
+				flex-shrink: 0;
+			}
+			.shop-info{
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				padding-left: 24rpx;
+				flex: 1;
+				box-sizing: border-box;
+				.title{
+					color: #181818;
+					font-size: 28rpx;
+					width: 450rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+				.price-box{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.price{
+						color: #181818;
+						color: $uni-color-primary;
+						font-size: 32rpx;
+						font-weight: bold;
+					}
+					
+				}
+				.start-time,.goods-desc{
+					font-size: 24rpx;
+					color: #AAAAAA;
+					width: 450rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+			}
+		}
+		
+		
+	}
+	
+	.wrap{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100vh;
+		overflow: hidden;
+	}
+	
+}
+</style>
+
+
+
+
+
+
+
+
+
+
+<!-- <template>
+	<view class="order-detail">
+		<zs-skeleton type="orderDetail" :loading="pageLoading"></zs-skeleton>
+			<view class="status-box">
+				<view class="text-box">
+					<view class="status" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'&&!isNotTime">
+						等待支付,剩余<u-count-down :time="closeTime" format="mm:ss" @finish="finish"></u-count-down>
+					</view>
+					<view class="status" v-else>
+						{{info.goodsList[0] |filterType }}
+					</view>
+				</view>
+			</view>
+			
+			<view class="content progress"  v-if="info.goodsList[0].goodsState == 'APPLY_REFUND' || info.goodsList[0].goodsState == 'REFUNDED'||info.goodsList[0].goodsState == 'APPLY_REFUNDING'"  @click="refundDetail">
+				<view class="progress-title">
+					退款进度
+				</view>
+				
+				<view class="progress-desc">
+					查看退款详情
+				</view>
+			</view>
+			
+			<view class="content shop-box"  v-if="!isVisual">
+				<view class="shop-name">
+					{{info.shopInfo.shopName}}
+				</view>
+				<view class="address">
+					{{info.shopInfo.address}}
+				</view>
+			</view>
+			
+			<view class="content" v-if="info.goodsList[0].jobFlowMap == 'XiaoJu'">
+				<view class="title">
+					加油明细
+				</view>
+				<view class="item">
+					<view class="label">
+						油号
+					</view>
+					<view class="value">
+						{{info.goodsList[0].goodsInfo.itemName || '-'}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						油枪号
+					</view>
+					<view class="value">
+						{{info.goodsList[0].goodsInfo.gunNo}}号
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						加油升数
+					</view>
+					<view class="value">
+						{{(info.goodsList[0].goodsInfo.litre/1000).toFixed(2)}}升
+					</view>
+				</view>
+			</view>
+			
+			<view class="content info" v-if="info.goodsList[0].jobFlowMap !== 'XiaoJu'">
+				<view class="order-info">
+					<image class="icon" :src="info.goodsList[0].goodsInfo.goodsPath" mode=""></image>
+					<view class="shop-info">
+						<view class="title">
+							{{info.goodsList[0].goodsInfo.goodsName}}
+						</view>
+						<template v-if="!isVisual">
+							<view class="goods-desc">
+								{{info.goodsList[0].goodsInfo.goodsDescribe}}
+							</view>
+							<view class="price-box">
+								<view class="price">
+									¥{{info.goodsList[0].goodsInfo.realPrice}}
+								</view>
+							</view>
+						</template>
+						<view class="price-box" v-else>
+							<view class="price">
+								¥{{info.payAmount}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			
+			<view class="content code-box"  v-if="info.goodsList[0].jobFlowMap != 'video2'&&info.goodsList[0].jobFlowMap != 'P802'&&info.goodsList[0].goodsState == 'WAIT_USE'&&info.goodsList[0].goodsName!='二维码支付'">
+					<view class="title">
+						券码信息
+					</view>
+
+					
+					<uqrcode class="qrcode" ref="uqrcode" type="2d" auto canvas-id="qrcode" :value="codeData" :loading="loading" :options="{ margin: 20 }">
+						 <template v-slot:loading>
+							<text style="color: black;">拼命加载中...</text>
+						  </template>
+					</uqrcode>
+			</view>
+			
+			
+			<view class="content">
+				<view class="title">
+					订单信息
+				</view>
+				<view class="item">
+					<view class="label">
+						订单编号
+					</view>
+					<view class="value">
+						{{info.orderNo}}
+					</view>
+				</view>
+				
+				<view class="item" v-if="info.goodsList[0].goodsState == 'WAIT_USE'">
+					<view class="label">
+						付款方式
+					</view>
+					<view class="value">
+						{{info.payment | filterPay}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						下单时间
+					</view>
+					<view class="value">
+						{{$u.timeFormat(info.createTime,'yyyy-mm-dd hh:MM:ss')}}
+					</view>
+				</view>
+				
+				<view class="item" v-if="info.goodsList[0].goodsState != 'WAIT_PAYMENT' && info.goodsList[0].goodsState != 'CLOSE'">
+					<view class="label">
+						支付时间
+					</view>
+					<view class="value" >
+						{{payTime}}
+					</view>
+				</view>
+			</view>
+			
+			<view class="content" v-if="info.goodsList[0].jobFlowMap == 'XiaoJu'">
+				<view class="title">
+					交易信息
+				</view>
+				
+				<view class="item">
+					<view class="label">
+						订单金额
+					</view>
+					<view class="value">
+						¥{{info.totalAmount}}
+					</view>
+				</view>
+				
+				
+				<view class="item">
+					<view class="label">
+						服务费
+					</view>
+					<view class="value">
+						¥{{(info.goodsList[0].goodsInfo.serviceFee/100).toFixed(2)}}
+					</view>
+				</view>
+				<view class="item" >
+					<view class="label">
+						优惠减免金额
+					</view>
+					<view class="value ">
+						-¥{{info.discountAmount}}
+					</view>
+				</view>
+				
+				
+				<view class="item">
+					<view class="label">
+						支付金额
+					</view>
+					<view class="value">
+						¥{{info.payAmount}}
+					</view>
+				</view>
+			</view>
+			
+			<view class="content" v-else>
+				<view class="title">
+					交易信息
+				</view>
+				
+				<view class="item">
+					<view class="label">
+						商品金额
+					</view>
+					<view class="value black">
+						¥{{info.payAmount}}
+					</view>
+				</view>
+				<view class="item" >
+					<view class="label">
+						优惠券
+					</view>
+					<view class="value red">
+						-¥{{info.discountAmount}}
+					</view>
+				</view>
+				
+				<view class="item">
+					<view class="label">
+						合计
+					</view>
+					<view class="value">
+						<text class="red fs28">¥{{info.payAmount}}</text>
+					</view>
+				</view>
+			</view>
+			
+			<view class="input-box" v-if="isVisual">
+				<view class="label">
+					充值账号
+				</view>
+				<view class="value">
+					{{info.goodsList[0].goodsInfo.rechargeAccount}}
+				</view>
+			</view>
+			
+			<template>
+				<view class="content refund-box" v-if="info.goodsList[0].goodsState == 'APPLY_REFUND'||(info.goodsList[0].refundLog&&info.goodsList[0].refundLog.remark)">
+					<view class="title">
+						退款原因
+					</view>
+					
+					<view class="refund-msg">
+						{{info.goodsList[0].refundLog.remark}}
+					</view>
+				</view>
+				<button type="default" :loading="btnLoading" v-if="info.goodsList[0].goodsState == 'APPLY_REFUND'" class="pay-btn" @click="cancelReply" >取消退款</button>
+			</template>
+			
+			
+			<view class="btn-box" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'">
+				<button class="cancel-btn" v-if="info.goodsList[0].jobFlowMap == 'XiaoJu'" @click="cancel('XiaoJu')" :loading="btnLoading">
+					取消订单
+				</button>
+				<button class="cancel-btn" v-else @click="cancel('other')" :loading="btnLoading">
+					取消订单
+				</button>
+				<button class="btn" @click="pay" :loading="btnLoading">
+					立即支付
+				</button>
+			</view>
+
+			
+			
+			<view class="content apply-box" v-else-if="(info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED')&&info.goodsList[0].jobFlowMap == 'XiaoJu'" @click="handleCall">
+				<view class="label">
+					如有申请退款,请联系滴滴客服
+				</view>
+				<view class="value">
+					滴滴客服电话:4000016553
+				</view>
+			</view>
+			
+			<view class="content apply-box" v-else-if="(info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED')&&info.goodsList[0].refundLog.refund != 'REFUSAL_REFUND'&&isRefund()&&info.goodsList[0].jobFlowMap !== 'XiaoJu'&&info.goodsList[0].jobFlowMap != 'video2'&&info.goodsList[0].jobFlowMap != 'P802'" @click="apply">
+				<view class="label">
+					退款申请
+				</view>
+				<view class="value">
+					如引发商品争议,可申请平台介入处理
+				</view>
+				<image class="jiantou" src="../../static/jiantou-icon.png" mode=""></image>
+			</view>
+			
+				<view class="content apply-box" v-if="info.goodsList[0].refundLog&&info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND'">
+					<view class="title">
+						已拒绝
+					</view>
+					<view class="value">
+						拒绝理由:{{info.goodsList[0].refundLog.conclusion}}
+					</view>
+				</view>
+				<button type="default" :loading="btnLoading1" v-if="info.goodsList[0].refundLog&&info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND'&&!info.goodsList[0].refundLog.platInter" class="pay-btn" @click="refundIntervene" >申请介入处理</button>
+			
+			
+			
+			
+			<u-overlay :show="show" v-if="show" :opacity="0.6">
+				<view class="wrap"  @click.stop="close">
+					<uqrcode ref="uqrcode" type="2d" auto canvas-id="qrcode" :value="codeData" :loading="loading" :options="{ margin: 20 }">
+						 <template v-slot:loading>
+							<text style="color: black;">拼命加载中...</text>
+						  </template>
+					</uqrcode>
+				</view>
+			</u-overlay>
+		
+	</view>
+</template>
+
+<script>
+	import {qrCode,closeOrder} from '@/api/order.js'
+	import {payDetails,queryPayOrder,unRefund,refundIntervene} from '@/api/payment.js';
+	import {cancelOrder} from '@/api/refuel.js'
+	export default {
+		data() {
+			return {
+				isVisual:false,//是否是虚拟商品
+				codeData:'123',
+				show:false,
+				loading:false,
+				pageLoading:true,
+				btnLoading:false,
+				btnLoading1:false,
+				oldBright:0,
+				info:{
+					// goodsList:[{goodsState:'CLOSE'}]
+				},
+				isNotTime:false
+			}
+		},
+		watch: {
+			// isNotTime(val) {
+			// 	if(this.isNotTime){
+			// 		this.payDetails(this.info.orderNo)
+			// 	}
+			// }
+		},
+		filters: {
+			filterType: function(val) {
+				if(val.refundLog&&val.refundLog.refund == 'REFUSAL_REFUND'&&!val.change){
+					return '拒绝退款'
+				}
+				else if(val.goodsState == 'APPLY_REFUND'){
+					return '退款审核中'
+				}else if(val.goodsState == 'CLOSE'){
+					return '关闭订单'
+				}else if(val.goodsState == 'REFUNDED'){
+					return '已退款'
+				}else if(val.goodsState == 'REFUSAL_REFUND'){
+					return '拒绝退款'
+				}else if(val.goodsState == 'APPLY_REFUNDING'){
+					return '退款中'
+				}else if(val.goodsState == 'USED'){
+					return '订单已完成'
+				}else if(val.goodsState == 'WAIT_PAYMENT'){
+					return '待付款'
+				}else if(val.goodsState == 'WAIT_USE'){
+					return '待使用'
+				}else{
+					return ''
+				}
+			},
+			filterPay(val){
+				if(val){
+					if(val.paymentWay == 'wx.unifiedOrder'){
+						return '微信支付'
+					}else if(val.paymentWay == 'trade.create'){
+						return '支付宝支付'
+					}else if(val.paymentWay == 'uac.miniOrder'){
+						return '云闪付支付'
+					}
+				}
+				else{
+					return '-'
+				}
+			}
+		},
+		computed: {
+			closeTime() {
+				return (this.info.createTime + 1000*60*30) - new Date().getTime()
+			},
+			payTime(){
+				// if(this.info.goodsList[0].extend&&!this.info.goodsList[0].extend.hasOwnProperty('account')){
+				if(this.info.goodsList[0].extend&&this.info.goodsList[0].jobFlowMap == 'XiaoJu'){
+					console.log(1);
+					if(this.info.goodsList[0].extend.hasOwnProperty('notifyOrderInfo')){
+						return this.info.goodsList[0].extend.notifyOrderInfo.payTime
+					}else{
+						return '-'
+					}
+				}else{
+					console.log(2);
+					if(this.info.payment && this.info.payment.paymentTime){
+						return uni.$u.timeFormat(this.info.payment.paymentTime,'yyyy-mm-dd hh:MM:ss') 
+					}else{
+						return '-'
+					}
+				}
+			}
+		},
+		methods: {
+			// 申请客服介入
+			refundIntervene(){
+				let that = this
+				uni.showModal({
+					title: '提示',
+					content: '确认申请客服介入吗?',
+					success: function (res) {
+						if (res.confirm) {
+							that.btnLoading1 = true
+							refundIntervene(that.info.goodsList[0].id).then(res=>{
+								that.btnLoading1 = false
+								if(res.state == 'Success'){
+									that.payDetails(that.info.orderNo)
+								}
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+				
 			},
 			isRefund(){
 				if(!this.info.goodsList[0].verifyModel){//没核销
@@ -953,4 +1900,4 @@
 	}
 	
 }
-</style>
+</style> -->

+ 72 - 4
my/order/movie/detail.vue

@@ -57,15 +57,34 @@
 				<!-- <view class="code-btn"  @click="checkCode">
 					查看券码 <image class="jiantou" src="../../static/jiantou-icon.png" mode=""></image>
 				</view> -->
+				
+				
+				<view class="swiper-box">
+					<swiper class="swiper" @change="swiperChange" disable-programmatic-animation skip-hidden-item-layout :indicator-dots="codeData.length>1" indicator-color="#666" indicator-active-color="#FF4D3A">
+						<swiper-item v-for="(item,index) in codeData" :key="item.id">
+							<view class="swiper-item">
+								<uqrcode class="qrcode" sizeUnit="rpx" :ref="'uqrcode'+index" v-if="current == index" type="2d" canvas-id="qrcode" :value="item" :loading="loading" >
+									 <template v-slot:loading>
+										<text style="color: black;">拼命加载中...</text>
+									  </template>
+								</uqrcode>
+									<view class="code" v-if="item != '123'">
+										{{item}}
+									</view>
+							</view>
+						</swiper-item>
+							
+					</swiper>
+				</view>
 					
-					<uqrcode class="qrcode" ref="uqrcode" type="2d" auto canvas-id="qrcode" :value="codeData" :loading="loading" :options="{ margin: 20 }">
+				<!-- 	<uqrcode class="qrcode" ref="uqrcode" type="2d" auto canvas-id="qrcode" :value="codeData" :loading="loading" :options="{ margin: 20 }">
 						 <template v-slot:loading>
 							<text style="color: black;">拼命加载中...</text>
 						  </template>
 					</uqrcode>
 					<view class="code">
 						{{codeData}}
-					</view>
+					</view> -->
 			</view>
 			
 			<view class="content">
@@ -250,8 +269,9 @@
 	export default {
 		data() {
 			return {
+				current:0,
 				isVisual:false,//是否是虚拟商品
-				codeData:'123',
+				codeData:["123"],
 				show:false,
 				loading:false,
 				pageLoading:true,
@@ -320,6 +340,25 @@
 			}
 		},
 		methods: {
+			swiperChange(val){
+				this.current = val.detail.current
+				// qrcode为组件的ref名称
+				this.$nextTick(()=>{
+					this.loading = true
+				setTimeout(()=>{
+					this.$refs[`uqrcode${this.current}`][0].remake({
+					  success: () => {
+						  this.loading = false
+						console.log('生成成功');
+					  },
+					  fail: err => {
+						  this.loading = false
+						console.log(err)
+					  }
+					});
+				},500)
+				})
+			},
 			// 申请客服介入
 			refundIntervene(){
 				let that = this
@@ -418,7 +457,7 @@
 				payDetails(orderNo).then(res=>{
 					this.pageLoading = false
 					this.info = res.content
-					this.codeData = JSON.parse(this.info.goodsList[0].extend).sync.ticketCode
+					this.codeData = this.info.goodsList[0].extend.sync.ticketCode.split(',')
 					if(this.info.goodsList[0].jobFlowMap == 'P802'){
 						this.isVisual = true
 					}
@@ -564,6 +603,34 @@
 			}
 		}
 	}
+	.swiper-box{
+		position: relative;
+		width: 100%;
+		height: 330rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.progress{
+			position: absolute;
+			top: 38rpx;
+			right: 20rpx;
+			z-index: 2;
+			color: #FFFFFF;
+			font-size: 16rpx;
+			background: rgba(255, 255, 255, 0.3);
+			padding: 2rpx 10rpx;
+			border-radius: 14rpx;
+		}
+		.swiper {
+			position: relative;
+			height: 100%;
+			.swiper-item {
+				// width: 690rpx;
+				height: 300rpx;
+				border-radius: 16rpx;
+				object-fit: cover;
+			}
+		}
+	}
 	
 	.progress{
 		.progress-title{
@@ -643,6 +710,7 @@
 			font-size: 28rpx;
 			color: #222222;
 			text-align: center;
+			margin-top: 20rpx;
 		}
 		
 	}

+ 1 - 1
orderFood/index.vue

@@ -275,7 +275,7 @@
 			buy() {
 				let that = this
 				if (uni.getStorageSync('token')) {
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						let info ={
 							shopName:this.shopInfo.shopName,
 							address:this.shopInfo.address,

+ 6 - 0
pages.json

@@ -298,6 +298,12 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "memberCenter/logList",
+					"style": {
+						"navigationBarTitleText": "会员权益"
+					}
+				},
 				{
 					"path": "service/index",
 					"style": {

+ 28 - 4
pages/index/index.vue

@@ -170,7 +170,7 @@
 		getDistrict
 	} from '@/api/common.js'
 	import {cityList} from '@/api/movie.js'
-	import {getCityList} from '@/api/common'
+	import {getCityList,refreshVip} from '@/api/common'
 	import { search } from '@/api/shop.js';
 	// 腾讯地图
 	var QQMapWX = require('../../libs/qqmap-wx-jssdk.min.js');
@@ -296,7 +296,18 @@
 									if(that.query.regionCode){//选择了城市
 									console.log('选择了城市',that.city);
 										that.city = uni.getStorageSync('HomeCity') || uni.getStorageSync('city')
-										resolve()
+										getDistrict({boundary:1,keyword:that.city,sub_admin:1}).then(r=>{
+											console.log('区域',r);
+											let data = []
+											r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
+												data.push({
+													label:item.name,
+													id:index
+												})
+											})
+											uni.setStorageSync('districtList',JSON.stringify(data))
+											resolve()
+										})
 									}else{//没选择城市
 									console.log('没选择城市',that.city);
 									queryFromLocation({
@@ -466,7 +477,7 @@
 			},
 			loadMore() {
 				// if(this.query['location.lat']&&this.query['location.lon']){
-				if(this.query.latitude&&this.query.longitude){
+				if(this.query.latitude&&this.query.longitude&&this.query.regionCode){
 					this.search()
 				}
 			},
@@ -496,7 +507,8 @@
 						
 						// this.list = JSON.parse(JSON.stringify(this.copyList))
 						// this.list1 = JSON.parse(JSON.stringify(this.copyList1))
-						if(this.query.page+1 == res.content.totalPages || res.content.totalPages == 0){
+						let total = this.list.length + this.list1.length
+						if(total >= res.content.totalElements){
 							this.status = 'noMore'
 						}else{
 							this.status = 'more'
@@ -627,6 +639,14 @@
 		onShow() {
 			if (uni.getStorageSync('token')&&!uni.getStorageSync('userInfo')) {
 				this.getUserDetail()
+				
+			}
+			if(uni.getStorageSync('token')){
+				refreshVip().then(res=>{
+					if(res.state == 'Success'){
+						this.getUserDetail()
+					}
+				})
 			}
 		},
 		onHide() {
@@ -650,6 +670,10 @@
 			
 			this.query.regionCode = query.regionCode || ''
 			this.getDialogAdv()
+			this.status = 'more'
+			this.list = []
+			this.list1 = []
+			this.query.page = 0
 			Promise.all([this.getMenu(),this.getCity()]).then(res=>{
 				this.search()
 				// if(query.regionCode){

+ 15 - 0
pay/pay1.vue

@@ -36,6 +36,8 @@
 					<image class="icon" src="../static/jiantou-icon.png" mode=""></image>
 				</view>
 			</view>
+			
+			
 
 			<!-- <view class="explain">
 				<view class="label">
@@ -49,6 +51,10 @@
 			</view> -->
 
 		</view>
+		
+		<view class="notice">
+			购买须知:取票码10-30分钟左右出票,请提前购票
+		</view>
 
 		<view class="btn-box">
 			<view class="total-price">
@@ -386,6 +392,13 @@
 				margin-top: 12rpx;
 			}
 		}
+		
+		.notice{
+			
+			padding: 28rpx 30rpx;
+			font-size: 24rpx;
+			color: #FF4D3A;
+		}
 
 		.pay-info {
 			margin: 0 30rpx;
@@ -471,6 +484,8 @@
 					}
 				}
 			}
+			
+			
 
 			.explain {
 				display: flex;

+ 6 - 2
refuel/coupon.vue

@@ -110,13 +110,17 @@
 					}
 				})
 			},
-			save(id){
+			save(){
+				console.log(999,this.query.storeId,this.info.epId);
 				let that = this
 				uni.navigateTo({
-					url:`./refuelDetail?storeId=${this.query.storeId}&epId=${this.info.epId}`,
+					url:`/refuel/refuelDetail?id=${this.query.storeId}&epId=${this.info.epId}`,
 					success: function(res) {
 					  // 通过eventChannel向被打开页面传送数据
 					  res.eventChannel.emit('pay', that.info)
+					},
+					complete() {
+						console.log('跳转完成');
 					}
 				})
 			},

+ 16 - 0
refuel/refuelDetail.vue

@@ -322,6 +322,22 @@
 		},
 		methods: {
 			chooseCoupon(){
+				if(this.amount&&this.amount<10){
+					return uni.showToast({
+							title:'加油金额不能小于10',
+							icon:'none'
+						})
+				}else if(!this.num||!this.gun){
+					return uni.showToast({
+								title:'请选择油号/油枪',
+								icon:'none'
+							})
+				}else if(!this.amount){
+					return uni.showToast({
+								title:'请输入加油金额',
+								icon:'none'
+							})
+				}
 				if(this.couponList.length){
 					let that = this
 					uni.navigateTo({

+ 1 - 1
scenic/detail.vue

@@ -264,7 +264,7 @@
 				});
 			},
 			handleBtn(){
-				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 					let that = this
 					uni.navigateTo({
 						url:'/scenic/makeOut?id='+this.scenicId,

+ 1 - 1
signUp/index.vue

@@ -88,7 +88,7 @@
 				}
 				
 				if (uni.getStorageSync('token')) {
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						uni.setStorageSync('activity',JSON.stringify(obj) )
 						uni.navigateTo({
 							url:'/signUp/makeOut?id='+this.info.dataCollectId

+ 1 - 1
special/water.vue

@@ -40,7 +40,7 @@
 		methods: {
 			handleBtn() {
 				if(uni.getStorageSync('token')){
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
 						uni.navigateToMiniProgram({
 							appId:'wx63342614cf0af2f7',
 							path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'

+ 1 - 1
study/studyGoodsDetail.vue

@@ -200,7 +200,7 @@ export default {
 			if (!this.info.realStockNum) return
 			let that = this
 			if (uni.getStorageSync('token')) {
-				if (JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0) {
+				if (JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode) {
 					uni.navigateTo({
 						url: `/study/pay/order`,
 						success: function (res) {

+ 1 - 1
utils/request.js

@@ -30,7 +30,7 @@ export let request = (options) => {
 						} else if (res.data.msg != '成功') { //接口返回报错
 							setTimeout(()=>{
 								uni.showToast({
-									title: res.data.content || res.data.msg || '请求失败',
+									title: res.data.content || res.data.msg ||(res.data.exception && res.data.exception.message) || '请求失败',
 									icon: 'none',
 									duration:3000
 								})