Browse Source

添加购买限制 修改bug

wenjie 9 months ago
parent
commit
1df4a9d56f

+ 0 - 3
App.vue

@@ -3,9 +3,6 @@
 		getGoodsTypeObj,
 		getUserDetail
 	} from '@/api/common.js';
-	// 腾讯地图
-	// var QQMapWX = require('@/libs/qqmap-wx-jssdk.min.js');
-	// var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
 	export default {
 
 		onLaunch: function() {

+ 20 - 2
api/common.js

@@ -233,7 +233,7 @@ export function getGoodsTypeObj(data) {
 //首页搜索
 export function homeSearch(data) {
 	return request({
-		url: '/productcenterserver/search/v1/list',
+		url: '/productcenterserver/search/v2/list',
 		data
 	})
 }
@@ -244,4 +244,22 @@ export function getCityList(data) {
     url: `/productcenterserver/region/list?name=${data.name}&type=City&page=${data.page}&size=${data.size}`,
     method: 'post',
   })
-}
+}
+
+//经纬度查区域
+export function queryFromLocation(data) {
+	return request({
+		url: `/productcenterserver/geo/queryFromLocation?coordType=${data.coordType}&lat=${data.lat}&lng=${data.lng}`,
+		method: 'post',
+		data
+	})
+}
+
+//查行政区列表
+export function getDistrict(data) {
+	return request({
+		url: `/productcenterserver/geo/api_region_search?boundary=1&keyword=${data.keyword }&sub_admin=${data.sub_admin}`,
+		method: 'post',
+		data
+	})
+}

+ 10 - 0
api/order.js

@@ -91,4 +91,14 @@ export function getReserve(orderNo) {
 		url: '/zswl-cloud-shop/goodsReserve/getReserve?orderNo='+orderNo,
 
 	})
+}
+
+
+// 取消订单
+export function closeOrder(orderNo) {
+	return request({
+		url: '/springbatchservice/pay/close/'+orderNo,
+		// method:'post',
+		// data
+	})
 }

+ 9 - 1
components/zs-list/index.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="zs-list" :style="{marginTop:mt}">
 			<slot></slot>
-		<zs-load-more class="more" :status="status"  />
+		<zs-load-more class="more" :status="status" :contentText="contentText" />
 	</view>
 </template>
 
@@ -17,6 +17,13 @@
 				type: String,
 				default: 'more'
 			},
+			contentText: {
+				type: Object,
+				default: ()=>{
+					return {contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"}
+				}
+			},
+			
 		},
 		data() {
 			return {
@@ -49,6 +56,7 @@
 	
 		.more{
 			width: 100%;
+			
 		}
 }
 </style>

+ 1 - 0
components/zs-load-more/index.vue

@@ -153,6 +153,7 @@
 		height: 40px;
 		align-items: center;
 		justify-content: center;
+		padding-top: 20rpx;
 	}
 
 	.uni-load-more__text {

+ 4 - 5
detail/discountsDetail/index.vue

@@ -35,7 +35,6 @@
 								{{i.realPrice}}
 							</view>
 							<view class="discount-tag" v-if="i.marketPrice">
-								<image class="icon" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/HZm0fGVdMht36ef982cd73bdd6733a803e1ba6a80fa2.png/1.png" mode=""></image>
 								<view class="discount-num">
 									{{((i.realPrice/i.marketPrice)*10).toFixed(1)}}折
 								</view>
@@ -180,8 +179,8 @@
 			chooseTab(val) {
 				this.query.range = val[2].id
 				if(val[0]){
-					this.query['location.lat'] = val[0].location.lat
-					this.query['location.lon'] = val[0].location.lng
+					// this.query['location.lat'] = val[0].location.lat
+					// this.query['location.lon'] = val[0].location.lng
 					this.query.range = 50
 					this.query.district = val[0].label
 				}else if(!val[0]){
@@ -372,7 +371,7 @@
 						font-size: 24rpx;
 						color: #222222;
 						margin-left: 18rpx;
-						width: 260rpx;
+						width: 250rpx;
 						white-space: nowrap;
 						overflow: hidden;
 						text-overflow: ellipsis;
@@ -395,7 +394,7 @@
 							.discount-tag{
 								display: flex;
 								align-items: center;
-								width: 92rpx;
+								width: 82rpx;
 								height: 28rpx;
 								line-height: 28rpx;
 								background: #FFF6F5;

+ 13 - 2
detail/goodsDetail/index.vue

@@ -73,6 +73,9 @@
 		</view>
 		
 		<view class="combo-content" v-if="info.services.length">
+			<view class="sub-title">
+				商品详情
+			</view>
 			<view class="item" v-for="(item,index) in info.services" :key="index">
 				<view class="item-title">
 					{{item.serviceName}}
@@ -518,7 +521,14 @@
 		padding: 24rpx 24rpx 24rpx 46rpx;
 		border-radius: 16rpx;
 		margin-bottom: 20rpx;
+		.sub-title{
+			font-size: 28rpx;
+			color: #222222;
+			font-weight: bold;
+			padding: 20rpx 0;
+		}
 		.item{
+			padding-bottom: 20rpx;
 			.item-title{
 				font-weight: 600;
 				font-size: 24rpx;
@@ -549,7 +559,8 @@
 				.left{
 					display: flex;
 					align-items: center;
-					justify-content: flex-end;
+					justify-content: space-between;
+					flex: 0 0 150rpx;
 					.unit{
 						font-size: 20rpx;
 						color: #AAAAAA;
@@ -564,7 +575,7 @@
 			}
 		}
 		.item+.item{
-			margin-top: 20rpx;
+			padding-top: 20rpx;
 			border-top: 1rpx solid #F0F0F0;
 		}
 	}

+ 2 - 2
detail/shopDetail/shopDetail.vue

@@ -60,7 +60,6 @@
 									{{item.realPrice}}
 								</view>
 								<view class="discount-tag" v-if="item.marketPrice">
-									<image class="icon" src="@/static/down.png" mode=""></image>
 									<view class="discount-num">
 										{{((item.realPrice/item.marketPrice)*10).toFixed(1)}}折
 									</view>
@@ -546,12 +545,13 @@
 								.discount-tag{
 									display: flex;
 									align-items: center;
-									width: 92rpx;
+									width: 82rpx;
 									height: 28rpx;
 									line-height: 28rpx;
 									background: #FFF6F5;
 									border-radius: 8rpx 8rpx 8rpx 8rpx;
 									border: 1rpx solid $uni-color-primary;
+									margin-left: 10rpx;
 									.icon{
 										width: 30.5rpx;
 										height: 28rpx;

+ 46 - 29
detail/virtualGoods/index.vue

@@ -115,37 +115,54 @@
 			// 创建订单
 			handleBuy() {
 				if (uni.getStorageSync('token')) {
-					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})
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+						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)
+										  }
+									})
 								}
-								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:'请登录',

+ 9 - 5
detail/virtualGoods/pay.vue

@@ -189,12 +189,16 @@
 													title: '取消支付',
 													icon: 'fail'
 												})
-												// 取消支付后,获取支付信息以备再次支付
-												payDetails(that.query.orderNo).then(r => {
-													if (r.state == 'Success') {
-													that.payData = JSON.parse(r.content.miniPayRequest)
-													}
+												// 取消支付后
+												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)
+												// 	}
+												// })
 											}
 										})
 

+ 10 - 18
hotel/cityList.vue

@@ -22,10 +22,7 @@
 
 <script>
 	import {debounce} from '@/utils/tool.js'
-	import {getCityList} from '@/api/common'
-	// 腾讯地图
-	var QQMapWX = require('../libs/qqmap-wx-jssdk.min.js');
-	var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
+	import {getCityList,queryFromLocation} from '@/api/common'
 	export default {
 		data() {
 			return {
@@ -129,21 +126,16 @@
 								// that.query['location.lon'] = res.longitude
 								// 存储经纬度
 								uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
-								qqmapsdk.reverseGeocoder({
-									location: {
-										latitude: res.latitude,
-										longitude: res.longitude
-									},
-									success: function(res) {
-										// that.address = res.result.formatted_addresses.recommend
-										that.city = res.result.address_component.city.replace('市','')
-										console.log(9999,res);
-									},
-									fail: function(res) {
-										that.city = '定位失败'
-									},
+								queryFromLocation({
+											coordType:'gcj02ll',
+											lat: res.latitude,
+											lng: res.longitude
+										}).then(res=>{
+									console.log('解析结果',res);
+									if(res.state == 'Success'){
+										that.city = res.content.geoAddressComponent.city.replace('市','')
+									}
 								})
-								  
 								
 							},
 							fail: () => {

+ 43 - 27
hotel/hotelDetail.vue

@@ -93,7 +93,7 @@
 			</view>
 			
 			<!-- 列表 -->
-			<zs-list class="store-box" mt="0" @load="loadMore" :status="status">
+			<zs-list class="store-box" mt="0" @load="loadMore" :status="status" :contentText="contentText">
 				<view class="hotel-item" v-for="(item,index) in roomList" :key="index">
 					<template v-if="item.roomId">
 						<view class="box">
@@ -281,6 +281,7 @@
 				show1:false,
 				showNum1:false,
 				showNum2:false,
+				contentText:{contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"},
 				info:{pictures:[]},
 				columns:[
 					[
@@ -419,29 +420,44 @@
 				uni.setStorageSync('hotelImgList',JSON.stringify(this.pictures))
 			},
 			handleBuy(i,item){
-				let that = this
-				uni.navigateTo({
-					url:`./makeOut?checkInDate=${this.query.checkIn}&checkOutDate=${this.query.checkOut}&day=${this.day}`,
-					success: function(res) {
-					  // 通过eventChannel向被打开页面传送数据
-					  let obj = {
-						  manNum:that.query.manNum,
-						  childNum:that.query.childNum,
-						  hotelId:that.query.hotelId,
-						  ratePlanId:i.id,
-						  averagePrice:i.averagePrice,
-						  roomPic:item.pictures[0].path,
-						  hotelPic:that.info.pictures[0].path,
-						  roomNameCn:item.roomNameCn,
-						  area:item.area,
-						  window:item.window,
-						  meal:i.meal.breakfast.desc || i.mealInfo.substr(3),
-						  cancel:i.cancel.name,
-						  
-					  }
-					  res.eventChannel.emit('pay', obj)
-					}
-				})
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					let that = this
+					uni.navigateTo({
+						url:`./makeOut?checkInDate=${this.query.checkIn}&checkOutDate=${this.query.checkOut}&day=${this.day}`,
+						success: function(res) {
+						  // 通过eventChannel向被打开页面传送数据
+						  let obj = {
+							  manNum:that.query.manNum,
+							  childNum:that.query.childNum,
+							  hotelId:that.query.hotelId,
+							  ratePlanId:i.id,
+							  averagePrice:i.averagePrice,
+							  roomPic:item.pictures[0].path,
+							  hotelPic:that.info.pictures[0].path,
+							  roomNameCn:item.roomNameCn,
+							  area:item.area,
+							  window:item.window,
+							  meal:i.meal.breakfast.desc || i.mealInfo.substr(3),
+							  cancel:i.cancel.name,
+							  
+						  }
+						  res.eventChannel.emit('pay', obj)
+						}
+					})
+				}else{
+					uni.showModal({
+						title:'此商品需要开通会员才能购买',
+						cancelText:'下次再说',
+						confirmText:'立即开通',
+						success(res) {
+							if(res.confirm){
+								uni.navigateTo({
+									url:'/my/memberCenter/index'
+								})
+							}
+						}
+					})
+				}
 			},
 			goIntroduce(){
 				uni.navigateTo({
@@ -468,7 +484,6 @@
 				console.log(111111111,list);
 				this.roomFacilities = list
 			},
-			loadMore(){},
 			handleNavigation() {
 				let {latitude,longitude} = transformFromWGSToGCJ(this.info.latitudeGoogle,this.info.longitudeGoogle)
 				uni.openLocation({
@@ -531,8 +546,9 @@
 					uni.hideLoading()
 					if(res.state == 'Success'){
 						this.roomList = res.content.data.roomInfo
-						console.log(this.roomList);
-						
+						if(!this.roomList.length){
+							this.contentText.contentnomore = '酒店可能太抢手,暂无符合条件的报价。请搜索其他酒店或调整入住时间'
+						}
 					}
 				})
 			}

+ 11 - 17
hotel/index.vue

@@ -160,9 +160,7 @@
 
 <script>
 	import {getHotelList} from '@/api/hotel.js'
-	// 腾讯地图
-	var QQMapWX = require('../libs/qqmap-wx-jssdk.min.js');
-	var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
+	import {queryFromLocation} from '@/api/common'
 	export default {
 		data() {
 			return {
@@ -233,22 +231,18 @@
 								// that.query['location.lon'] = res.longitude
 								// 存储经纬度
 								uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
-								qqmapsdk.reverseGeocoder({
-									location: {
-										latitude: res.latitude,
-										longitude: res.longitude
-									},
-									success: function(res) {
-										that.address = res.result.formatted_addresses.recommend
-										console.log(9999,res);
-										resolve()
-									},
-									fail: function(res) {
-										that.city = '定位失败'
-									},
+								queryFromLocation({
+											coordType:'gcj02ll',
+											lat: res.latitude,
+											lng: res.longitude
+										}).then(res=>{
+									if(res.state == 'Success'){
+										that.address = res.content.formatted_address
+									}else{
+										that.address = '定位失败'
+									}
 								})
 								
-								
 							},
 							fail: () => {
 								console.log("获取经纬度失败");

+ 0 - 1
hotel/search.vue

@@ -278,7 +278,6 @@
 				  "sortKey": "recommend",
 				  "start": 0
 				},
-				districtList:JSON.parse(uni.getStorageSync('districtList')),
 				currentLabel:'推荐排序',
 				sortList:[
 					{

+ 31 - 16
my/order/detail.vue

@@ -258,15 +258,18 @@
 			</template>
 			
 			
-			<view class="btn-box" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'&&info.goodsList[0].jobFlowMap == 'XiaoJu'">
-				<button class="cancel-btn" @click="cancel" :loading="btnLoading">
+			<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>
-			<button type="default" :loading="btnLoading" class="pay-btn" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'&&info.goodsList[0].jobFlowMap !== 'XiaoJu'" @click="pay" >立即支付</button>
+	<!-- 		<button type="default" :loading="btnLoading" class="pay-btn" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'&&info.goodsList[0].jobFlowMap !== 'XiaoJu'" @click="pay" >立即支付</button> -->
 			
 			
 			<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">
@@ -278,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'" @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>
@@ -315,7 +318,7 @@
 </template>
 
 <script>
-	import {qrCode} from '@/api/order.js'
+	import {qrCode,closeOrder} from '@/api/order.js'
 	import {payDetails,queryPayOrder,unRefund,refundIntervene} from '@/api/payment.js';
 	import {cancelOrder} from '@/api/refuel.js'
 	export default {
@@ -532,20 +535,32 @@
 				})
 			},
 			// 取消支付
-			cancel(){
+			cancel(type){
 				uni.showLoading({
 					title: '取消中'
 				})
-				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)
-					}
-				})
+				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(){

+ 4 - 30
my/order/foodOrder/detail.vue

@@ -144,7 +144,7 @@
 </template>
 
 <script>
-	import {qrCode} from '@/api/order.js'
+	import {qrCode,closeOrder} from '@/api/order.js'
 	import {payDetails,queryPayOrder,unRefund,refundIntervene} from '@/api/payment.js';
 	import {cancelOrder} from '@/api/refuel.js'
 	export default {
@@ -212,7 +212,7 @@
 		},
 		computed: {
 			closeTime() {
-				return (this.info.createTime + 1000*60*30) - new Date().getTime()
+				return (this.info.createTime + 1000*60*15) - new Date().getTime()
 			},
 			payTime(){
 					if(this.info.payment && this.info.payment.paymentTime){
@@ -245,22 +245,6 @@
 					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=>{
@@ -270,7 +254,7 @@
 					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!='二维码支付'){
+					if(this.info.goodsList[0].goodsState == 'WAIT_USE'){
 					
 						qrCode(this.info.goodsList[0].id).then(res=>{
 							this.loading = false
@@ -287,8 +271,7 @@
 				uni.showLoading({
 					title: '取消中'
 				})
-				let obj = this.info.goodsList[0].extend
-				cancelOrder(obj).then(res=>{
+				closeOrder(this.info.orderNo).then(res=>{
 					if(res.state == 'Success'){
 						uni.showToast({
 							title: '取消成功',
@@ -301,14 +284,6 @@
 			// 支付
 			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({
@@ -351,7 +326,6 @@
 							console.log('err', e,this);
 						}
 					})
-				}
 			},
 			// 取消退款申请
 			cancelReply(){

+ 7 - 4
my/order/hotel/detail.vue

@@ -230,10 +230,10 @@
 			</template> -->
 			
 			<view class="btn-box" v-if="info.goodsList[0].extend.orderInfo.orderStatus == '待付款'">
-				<!-- <button class="cancel-btn" @click="cancel" :loading="btnLoading">
+				<button class="cancel-btn" @click="cancel" :loading="btnLoading">
 					取消订单
-				</button> -->
-				<button class="book-btn" @click="pay" :loading="btnLoading">
+				</button>
+				<button class="btn" @click="pay" :loading="btnLoading">
 					立即支付
 				</button>
 			</view>
@@ -253,7 +253,7 @@
 				</button>
 			</view>
 			
-			<!-- <view class="content apply-box" v-if="(JSON.parse(info.goodsList[0].extend).orderInfo.orderStatus == '已确认'||JSON.parse(info.goodsList[0].extend).orderInfo.orderStatus == '已完成')&&isRefund()" @click="apply">
+			<!-- <view class="content apply-box" v-if="(JSON.parse(info.goodsList[0].extend).orderInfo.orderStatus == '已确认'||JSON.parse(info.goodsList[0].extend).orderInfo.orderStatus == '已完成')" @click="apply">
 				<view class="label">
 					退款申请
 				</view>
@@ -468,6 +468,9 @@
 						}
 					})
 				}else{
+					uni.showLoading({
+						title: '取消中'
+					})
 					cancelOrder(obj).then(res=>{
 						if(res.state == 'Success'){
 							uni.showToast({

+ 11 - 2
my/order/index.vue

@@ -96,11 +96,20 @@
 				}else if(val.goodsState == 'APPLY_REFUNDING'){
 					return '退款中'
 				}else if(val.goodsState == 'USED'){
-					return '订单已完成'
+					if(val.jobFlowMap == 'YPP'){
+						return '已出票'
+					}else{
+						return '订单已完成'
+					}
+					
 				}else if(val.goodsState == 'WAIT_PAYMENT'){
 					return '待付款'
 				}else if(val.goodsState == 'WAIT_USE'){
-					return '待使用'
+					if(val.jobFlowMap == 'YPP'){
+						return '出票中'
+					}else{
+						return '待使用'
+					}
 				}else{
 					return ''
 				}

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

@@ -198,9 +198,9 @@
 			
 			
 			<view class="btn-box" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'">
-				<!-- <button class="cancel-btn" @click="cancel" :loading="btnLoading">
+				<button class="cancel-btn" @click="cancel" :loading="btnLoading">
 					取消订单
-				</button> -->
+				</button>
 				<button class="btn" @click="pay" :loading="btnLoading">
 					立即支付
 				</button>
@@ -244,7 +244,7 @@
 </template>
 
 <script>
-	import {qrCode} from '@/api/order.js'
+	import {qrCode,closeOrder} from '@/api/order.js'
 	import {payDetails,queryPayOrder,unRefund,refundIntervene} from '@/api/payment.js';
 	// import {cancelOrder} from '@/api/refuel.js'
 	export default {
@@ -437,8 +437,7 @@
 				uni.showLoading({
 					title: '取消中'
 				})
-				let obj = JSON.parse(this.info.goodsList[0].extend)
-				cancelOrder(obj).then(res=>{
+				closeOrder(this.info.orderNo).then(res=>{
 					if(res.state == 'Success'){
 						uni.showToast({
 							title: '取消成功',

+ 4 - 1
my/order/scenic/detail.vue

@@ -265,7 +265,7 @@
 				</button>
 			</view>
 			
-			<view class="content apply-box" v-else-if="(info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED')&&isRefund()" @click="apply">
+			<view class="content apply-box" v-else-if="info.goodsList[0].goodsState == 'WAIT_USE'||info.goodsList[0].goodsState == 'USED'" @click="apply">
 					<!-- <view class="content apply-box" @click="apply"> -->
 				<view class="label">
 					退款申请
@@ -477,10 +477,13 @@
 			},
 			isRefund(){
 				if(!this.info.goodsList[0].verifyModel){//没核销
+				console.log(1111111);
 					return true
 				}else if(this.info.goodsList[0].verifyModel && (new Date().getTime() < (this.info.goodsList[0].verifyModel.checkTime + 1000*60*60*48))){// 已核销 并且没超过48小时
+				console.log(22222222);
 					return true
 				}else{
+									console.log(333333333);
 					return false
 				}
 			},

+ 65 - 2
my/order/signUp/signUpDetail.vue

@@ -159,6 +159,8 @@
 				
 			</view>
 			
+			
+			
 			<template v-if="info.goodsList[0].goodsState == 'APPLY_REFUND'">
 				<view class="content refund-box">
 					<view class="title">
@@ -174,7 +176,15 @@
 				</template>
 			</template>
 			
-			<button type="default" :loading="btnLoading" class="pay-btn" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'" @click="pay" >立即支付</button>
+			<view class="btn-box" v-else-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'">
+				<button class="cancel-btn" @click="cancel" :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')&&isRefund()" @click="apply">
 				<view class="label">
 					退款申请
@@ -200,7 +210,7 @@
 </template>
 
 <script>
-	import {qrCode} from '@/api/order.js'
+	import {qrCode,closeOrder} from '@/api/order.js'
 	import {payDetails,queryPayOrder,unRefund} from '@/api/payment.js'
 	import {getOrderDetail} from '@/api/activity.js'
 	
@@ -289,6 +299,21 @@
 			},
 		},
 		methods: {
+			// 取消支付
+			cancel(){
+				uni.showLoading({
+					title: '取消中'
+				})
+				closeOrder(this.info.orderNo).then(res=>{
+					if(res.state == 'Success'){
+						uni.showToast({
+							title: '取消成功',
+							icon: 'success'
+						})
+						this.payDetails(this.info.orderNo)
+					}
+				})
+			},
 			isRefund(){
 				if(!this.info.goodsList[0].verifyModel){//没核销
 					return true
@@ -687,6 +712,44 @@
 			line-height: 40rpx;
 		}
 	}
+	.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;
+		}
+	}
 	.apply-box{
 		position: relative;
 		.label{

+ 50 - 17
orderFood/index.vue

@@ -159,6 +159,7 @@
 	export default {
 		data() {
 			return {
+				shopId:"63836999-5117-4980-8632-497f007808ef",
 				show:false,
 				active:0,
 				list:[],
@@ -245,7 +246,7 @@
 				console.log('当前',val);
 			},
 			menuList(){
-				menuList('63836999-5117-4980-8632-497f007808ef').then(res=>{
+				menuList(this.shopId).then(res=>{
 					if(res.state = 'Success'){
 						this.list = res.content.data
 						this.$nextTick(()=>{
@@ -261,7 +262,7 @@
 				})
 			},
 			shopDetail(){
-				shopDetail({  "id": "63836999-5117-4980-8632-497f007808ef",
+				shopDetail({"id": this.shopId,
 				  "lat": "",
 				  "lon": ""}).then(res=>{
 					if(res.state = 'Success'){
@@ -272,24 +273,56 @@
 			},
 			
 			buy() {
-				console.log(this.carList);
-				let info ={
-					shopName:this.shopInfo.shopName,
-					address:this.shopInfo.address,
-					shopId:'63836999-5117-4980-8632-497f007808ef',
-					products:this.carList,
-					total:this.total
+				let that = this
+				if (uni.getStorageSync('token')) {
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+						let info ={
+							shopName:this.shopInfo.shopName,
+							address:this.shopInfo.address,
+							shopId:this.shopId,
+							products:this.carList,
+							total:this.total
+						}
+						uni.navigateTo({
+							url:`/orderFood/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=/orderFood/index&shopId=${that.shopId}`
+								})
+							}
+						}
+					})
 				}
-				uni.navigateTo({
-					url:`/orderFood/pay`,
-					  success: function(res) {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit('pay', info)
-					  }
-				})
+				
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			this.shopId = options.shopId || "63836999-5117-4980-8632-497f007808ef"
 			this.shopDetail()
 			this.menuList()
 		},

+ 88 - 43
pages/index/index.vue

@@ -165,7 +165,9 @@
 		getUserDetail,
 		getMenu,
 		getAdv,
-		homeSearch
+		homeSearch,
+		queryFromLocation,
+		getDistrict
 	} from '@/api/common.js'
 	import {cityList} from '@/api/movie.js'
 	import {getCityList} from '@/api/common'
@@ -191,12 +193,21 @@
 				list1: [],
 				copyList1: [],
 				query:{
-					distance:5000,
+					distance:1000000000,
 					latitude:0,
 					longitude:0,
 					regionCode:'',
 					page:0,
 					size:10
+				},
+				imgUrl:{
+					Kfc:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xgJrwD0vChsW012ac1e138a0aa5a970e8f8c59dab926.png/1.png',
+					MDL:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/K64jffEqRIDr487e8cab971c3b890d4066a26f5856d2.png/1.png',
+					XBK:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xMwtPkICBcam5513c4ac644054e60009cb8b1eb52e8f.png/1.png',
+					NXDC:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/U9j6fgVmKeAt522ed50aa1a72f798260e0e30138d4c6.png/1.png',
+					RXKF:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zS5Q8sC9AAQca76eef36da2bd5a2ec234d75d8dcc044.png/1.png',
+					XC:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/fA95my16Qunf967a9d992fc41134332926bcb5665881.png/1.png',
+					KD:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/wk5eyuvhighG206a7ea081e3f0b783ff2a9555375e85.png/1.png',
 				}
 				// query:{
 				// 	queryName:'',
@@ -218,6 +229,15 @@
 			}
 		},
 		methods: {
+			formatImg(item){
+				if(item.productType == 'Kfc'){
+					// if(){
+						
+					// }
+				}else{
+				 	return item.cover[0]
+				}
+			},
 			chooseCity(){
 				uni.navigateTo({
 					url:`/hotel/cityList?backUrl=/pages/index/index`
@@ -279,42 +299,66 @@
 										resolve()
 									}else{//没选择城市
 									console.log('没选择城市',that.city);
-										qqmapsdk.reverseGeocoder({
-											location: {
-												latitude: res.latitude,
-												longitude: res.longitude
-											},
-											success: function(res) {
-												// 市
-												that.city = res.result.address_component.city
-												
-												if(uni.setStorageSync('districtList')&&uni.getStorageSync('city')==that.city) return
-												uni.setStorageSync('city',res.result.address_component.city)
-												// 获取市区的行政区
-												qqmapsdk.getDistrictByCityId({
-												  // 传入对应省份ID获得城市数据,传入城市ID获得区县数据,依次类推
-												  id: res.result.ad_info.city_code.substr(3), //对应接口getCityList返回数据的Id,如:北京是'110000'
-												  success: function(res) {//成功后的回调
-													console.log('对应城市ID下的区县数据:', res.result[0]);
-													let data = res.result[0]
-													data.map(item=>{
-														item.label = item.fullname
+									queryFromLocation({
+												coordType:'gcj02ll',
+												lat: res.latitude,
+												lng: res.longitude
+											}).then(res=>{
+										console.log('解析结果',res);
+										if(res.state == 'Success'){
+											that.query.regionCode = res.content.geoAddressComponent.adcode.substr(0,4) +'00'
+											that.city = res.content.geoAddressComponent.city
+											uni.setStorageSync('city',res.content.geoAddressComponent.city)
+											getDistrict({boundary:1,keyword:'成都',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))
-												  },
-												  fail: function(error) {
-													console.error(error);
-												  },
-												  complete: function(res) {
-													console.log(res);
-												  }
-												});
+												})
+												uni.setStorageSync('districtList',JSON.stringify(data))
 												resolve()
-											},
-											fail: function(res) {
-												that.city = '定位失败'
-											},
-										})
+											})
+										}
+									})
+										// qqmapsdk.reverseGeocoder({
+										// 	location: {
+										// 		latitude: res.latitude,
+										// 		longitude: res.longitude
+										// 	},
+										// 	success: function(res) {
+										// 		// 市
+										// 		that.city = res.result.address_component.city
+												
+										// 		if(uni.setStorageSync('districtList')&&uni.getStorageSync('city')==that.city) return
+										// 		uni.setStorageSync('city',res.result.address_component.city)
+										// 		// 获取市区的行政区
+										// 		qqmapsdk.getDistrictByCityId({
+										// 		  // 传入对应省份ID获得城市数据,传入城市ID获得区县数据,依次类推
+										// 		  id: res.result.ad_info.city_code.substr(3), //对应接口getCityList返回数据的Id,如:北京是'110000'
+										// 		  success: function(res) {//成功后的回调
+										// 			console.log('对应城市ID下的区县数据:', res.result[0]);
+										// 			let data = res.result[0]
+										// 			data.map(item=>{
+										// 				item.label = item.fullname
+										// 			})
+										// 			uni.setStorageSync('districtList',JSON.stringify(data))
+										// 		  },
+										// 		  fail: function(error) {
+										// 			console.error(error);
+										// 		  },
+										// 		  complete: function(res) {
+										// 			console.log(res);
+										// 		  }
+										// 		});
+										// 		resolve()
+										// 	},
+										// 	fail: function(res) {
+										// 		that.city = '定位失败'
+										// 	},
+										// })
 									}
 									
 							},
@@ -607,13 +651,14 @@
 			this.query.regionCode = query.regionCode || ''
 			this.getDialogAdv()
 			Promise.all([this.getMenu(),this.getCity()]).then(res=>{
-				if(query.regionCode){
-					this.search()
-				}else{
-					this.getCityList().then(()=>{
-						this.search()
-					})
-				}
+				this.search()
+				// if(query.regionCode){
+				// 	this.search()
+				// }else{
+				// 	this.getCityList().then(()=>{
+				// 		this.search()
+				// 	})
+				// }
 				this.cityList()
 			})
 		},

+ 2 - 2
pages/index/searchResult.vue

@@ -139,8 +139,8 @@
 				console.log(val);
 				this.query.range = val[2].id
 				if(val[0]){
-					this.query['location.lat'] = val[0].location.lat
-					this.query['location.lon'] = val[0].location.lng
+					// this.query['location.lat'] = val[0].location.lat
+					// this.query['location.lon'] = val[0].location.lng
 					this.query.range = 50
 					this.query.district = val[0].label
 				}else if(!val[0]){

+ 75 - 57
refuel/refuelDetail.vue

@@ -175,9 +175,6 @@
 <script>
 	import { queryStoreDetail,queryCalPrice,queryNewOrder,queryOrderPromotionList } from '@/api/refuel.js';
 	import {debounce} from '@/utils/tool.js'
-	// 腾讯地图
-	var QQMapWX = require('@/libs/qqmap-wx-jssdk.min.js');
-	var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
 	export default {
 		data() {
 			return {
@@ -465,10 +462,12 @@
 			},
 			getDistance(){
 				let location = JSON.parse(uni.getStorageSync('location'))
-				qqmapsdk.calculateDistance({from:{latitude:location.latitude,longitude:location.longitude},to:[{latitude:this.info.location[1],longitude:this.info.location[0]}],success:(res)=>{
-					console.log(res);
-					this.distance = res.result.elements[0].distance
-				}})
+				this.distance =this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)
+				//驾车距离
+				// qqmapsdk.calculateDistance({from:{latitude:location.latitude,longitude:location.longitude},to:[{latitude:this.info.location[1],longitude:this.info.location[0]}],success:(res)=>{
+				// 	console.log(res);
+				// 	this.distance = res.result.elements[0].distance
+				// }})
 			
 			},
 			getRad(d) {
@@ -488,61 +487,80 @@
 			    return s
 			},
 			handlePay(){
-				let that = this
-				let location = JSON.parse(uni.getStorageSync('location'))
-				console.log('不能超过(米):',this.amount*1000,'距离加油站(米):',this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon))
-				// if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>100000000){
-				if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>1000){
-					return uni.showModal({
-						title:'提示',
-						content:'您当前距离加油站较远,请到达加油站后与加油员确定信息',
-						confirmText:'刷新位置',
-						success: function (res) {
-							if (res.confirm) {
-								uni.showLoading({
-									title:'刷新中'
-								})
-								uni.getLocation({
-										type: 'gcj02',
-										success: (res) => {
-											// 存储经纬度
-											uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
-											uni.hideLoading()
-											that.getDistance()
-										}
+				
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					let that = this
+					let location = JSON.parse(uni.getStorageSync('location'))
+					
+					// if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>100000000){
+					if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>1000){
+						return uni.showModal({
+							title:'提示',
+							content:'您当前距离加油站较远,请到达加油站后与加油员确定信息',
+							confirmText:'刷新位置',
+							success: function (res) {
+								if (res.confirm) {
+									uni.showLoading({
+										title:'刷新中'
+									})
+									uni.getLocation({
+											type: 'gcj02',
+											success: (res) => {
+												// 存储经纬度
+												uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
+												uni.hideLoading()
+												that.getDistance()
+											}
+									})
+								}
+							}
+						})
+					}
+					this.loading = true
+					let query = {
+						"channel":'ZhongShu',
+						  "epId": this.epId,
+						  "itemName":this.num,
+						  "gunNo": this.gun,
+						  "itemId": this.itemId,
+						  "litre": this.payInfo.litre,
+						  "openExtra": "",
+						  "originalAmount": this.payInfo.totalPrice,
+						  "outNewUserFlag": "",
+						  "paymentAmount":  this.payInfo.realPrice,
+						  "promotionInfo": this.query.allowanceinfo,
+						  "serviceFee": this.payInfo.serviceFee,
+						  "storeId":this.storeId,
+						  "storePrice": this.price.storePrice,
+						  "vipPrice": this.price.vipPrice
+					}
+					queryNewOrder(query).then(res=>{
+						this.loading = false
+						if(res.state == 'Success'){
+							uni.navigateToMiniProgram({
+								 appId:"wx0d252f6ed9755862", // 滴滴加油小程序appId
+								   path: `packageA/pages/open-energy-pay/index?orderId=${res.content.xjOrderId}&tradeId=${res.content.tradeId}`, // 滴滴加油收银台页面地址,需要拼接orderId和tradeId
+								   envVersion: 'release' // 固定release
+							})
+						}
+					})
+					
+				}else{
+					uni.showModal({
+						title:'此商品需要开通会员才能购买',
+						cancelText:'下次再说',
+						confirmText:'立即开通',
+						success(res) {
+							if(res.confirm){
+								uni.navigateTo({
+									url:'/my/memberCenter/index'
 								})
 							}
 						}
 					})
 				}
-				this.loading = true
-				let query = {
-					"channel":'ZhongShu',
-					  "epId": this.epId,
-					  "itemName":this.num,
-					  "gunNo": this.gun,
-					  "itemId": this.itemId,
-					  "litre": this.payInfo.litre,
-					  "openExtra": "",
-					  "originalAmount": this.payInfo.totalPrice,
-					  "outNewUserFlag": "",
-					  "paymentAmount":  this.payInfo.realPrice,
-					  "promotionInfo": this.query.allowanceinfo,
-					  "serviceFee": this.payInfo.serviceFee,
-					  "storeId":this.storeId,
-					  "storePrice": this.price.storePrice,
-					  "vipPrice": this.price.vipPrice
-				}
-				queryNewOrder(query).then(res=>{
-					this.loading = false
-					if(res.state == 'Success'){
-						uni.navigateToMiniProgram({
-							 appId:"wx0d252f6ed9755862", // 滴滴加油小程序appId
-							   path: `packageA/pages/open-energy-pay/index?orderId=${res.content.xjOrderId}&tradeId=${res.content.tradeId}`, // 滴滴加油收银台页面地址,需要拼接orderId和tradeId
-							   envVersion: 'release' // 固定release
-						})
-					}
-				})
+				
+				
 			}
 		},
 		onReady() {

+ 27 - 11
scenic/detail.vue

@@ -264,17 +264,33 @@
 				});
 			},
 			handleBtn(){
-				let that = this
-				uni.navigateTo({
-					url:'/scenic/makeOut?id='+this.scenicId,
-					success: function(res) {
-					  // 通过eventChannel向被打开页面传送数据
-					  let obj = that.ticketInfo
-					  obj.epId = that.epId
-					  obj.shopName = that.info.scenicName
-					  res.eventChannel.emit('pay', obj)
-					}
-				})
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					let that = this
+					uni.navigateTo({
+						url:'/scenic/makeOut?id='+this.scenicId,
+						success: function(res) {
+						  // 通过eventChannel向被打开页面传送数据
+						  let obj = that.ticketInfo
+						  obj.epId = that.epId
+						  obj.shopName = that.info.scenicName
+						  res.eventChannel.emit('pay', obj)
+						}
+					})
+				}else{
+					uni.showModal({
+						title:'此商品需要开通会员才能购买',
+						cancelText:'下次再说',
+						confirmText:'立即开通',
+						success(res) {
+							if(res.confirm){
+								uni.navigateTo({
+									url:'/my/memberCenter/index'
+								})
+							}
+						}
+					})
+				}
+				
 			},
 			getScenicDetail(scenicId){
 				this.loading = true

+ 12 - 3
scenic/makeOut.vue

@@ -443,7 +443,8 @@
 					"subOpenId": "",
 					"userId": ""
 				},
-				payData:null
+				payData:null,
+				price:0
 			}
 		},
 		filters: {
@@ -498,7 +499,11 @@
 		},
 		computed: {
 			total() {
-				return this.ticketInfo.salePrice*this.form.bookNumber
+				if(this.price){
+					return this.price*this.form.bookNumber
+				}else{
+					return this.ticketInfo.salePrice*this.form.bookNumber
+				}
 			}
 		},
 		methods: {
@@ -509,6 +514,11 @@
 				})
 				this.show = false
 				this.form.startTime = val[0]
+				this.ticketInfo.priceCalendar.forEach(item=>{
+					if(item.departDate == val[0]){
+						this.price = item.salePrice
+					}
+				})
 				this.$refs.uForm.validateField('startTime')
 			},
 			confirm(val){
@@ -714,7 +724,6 @@
 					delete that.form.contact.psptId
 				}
 				
-				console.log('数据:',data,that.form);
 			})
 		}
 	}

+ 19 - 4
signUp/index.vue

@@ -88,10 +88,25 @@
 				}
 				
 				if (uni.getStorageSync('token')) {
-					uni.setStorageSync('activity',JSON.stringify(obj) )
-					uni.navigateTo({
-						url:'/signUp/makeOut?id='+this.info.dataCollectId
-					})
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+						uni.setStorageSync('activity',JSON.stringify(obj) )
+						uni.navigateTo({
+							url:'/signUp/makeOut?id='+this.info.dataCollectId
+						})
+					}else{
+						uni.showModal({
+							title:'此商品需要开通会员才能购买',
+							cancelText:'下次再说',
+							confirmText:'立即开通',
+							success(res) {
+								if(res.confirm){
+									uni.navigateTo({
+										url:'/my/memberCenter/index'
+									})
+								}
+							}
+						})
+					}
 					
 				} else {
 					uni.showModal({

+ 20 - 4
special/water.vue

@@ -40,10 +40,26 @@
 		methods: {
 			handleBtn() {
 				if(uni.getStorageSync('token')){
-					uni.navigateToMiniProgram({
-						appId:'wx63342614cf0af2f7',
-						path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
-					})
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+						uni.navigateToMiniProgram({
+							appId:'wx63342614cf0af2f7',
+							path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
+						})
+					}else{
+						uni.showModal({
+							title:'此商品需要开通会员才能购买',
+							cancelText:'下次再说',
+							confirmText:'立即开通',
+							success(res) {
+								if(res.confirm){
+									uni.navigateTo({
+										url:'/my/memberCenter/index'
+									})
+								}
+							}
+						})
+					}
+					
 				}else{
 					return uni.showModal({
 						title:'请登录',

BIN
static/level0.png


+ 24 - 7
study/studyGoodsDetail.vue

@@ -195,13 +195,30 @@ export default {
 			if (!this.info.realStockNum) return
 			let that = this
 			if (uni.getStorageSync('token')) {
-				uni.navigateTo({
-					url: `/study/pay/order`,
-					success: function (res) {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit('pay', that.info)
-					}
-				})
+				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
+					uni.navigateTo({
+						url: `/study/pay/order`,
+						success: function (res) {
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('pay', that.info)
+						}
+					})
+				}else{
+					uni.showModal({
+						title:'此商品需要开通会员才能购买',
+						cancelText:'下次再说',
+						confirmText:'立即开通',
+						success(res) {
+							if(res.confirm){
+								uni.navigateTo({
+									url:'/my/memberCenter/index'
+								})
+							}
+						}
+					})
+				}
+				
+				
 			} else {
 				uni.showModal({
 					title: '请登录',