Browse Source

大牌点餐添加首页 店铺列表页 添加多规格商品订单

wenjie 7 months ago
parent
commit
f4388b7aff
10 changed files with 1764 additions and 625 deletions
  1. 18 0
      api/orderFood.js
  2. 12 4
      hotel/cityList.vue
  3. 3 1
      my/memberCenter/index.vue
  4. 64 16
      my/order/foodOrder/detail.vue
  5. 73 597
      orderFood/index.vue
  6. 6 6
      orderFood/pay.vue
  7. 1273 0
      orderFood/shopDetail.vue
  8. 301 0
      orderFood/shopList.vue
  9. 12 0
      pages.json
  10. 2 1
      pages/index/index.vue

+ 18 - 0
api/orderFood.js

@@ -31,3 +31,21 @@ export function createOrder(data) {
 	})
 }
 
+// 点餐门店查询
+export function getFoodShopList(data) {
+	return request({
+		url: `/productcenterserver/search/v3/list`,
+		data
+	})
+}
+
+
+// 点餐商品详情
+export function foodGoodsDetail(data) {
+	return request({
+		url: `/springbatchservice/ypp/kfc/goodsDetail`,
+		method:'post',
+		data
+	})
+}
+

+ 12 - 4
hotel/cityList.vue

@@ -79,14 +79,22 @@
 				
 				let city = name.replace('市','')
 				if(this.backUrl){
-					if(this.backUrl == '/pages/index/index'){
-						uni.setStorageSync('HomeCity',city)
+					// if(this.backUrl == '/pages/index/index'){
+					// 	uni.setStorageSync('HomeCity',city)
+					// 	uni.reLaunch({
+					// 		url:`${this.backUrl}?&regionCode=${code}`
+					// 	})
+					// }
+					// else 
+					if(this.backUrl == '/hotel/search'){
 						uni.reLaunch({
-							url:`${this.backUrl}?&regionCode=${code}`
+							url:`${this.backUrl}?cityName=${city}&key=${this.key}&checkInDate=${this.checkInDate}&checkOutDate=${this.checkOutDate}`
 						})
 					}else{
+						uni.setStorageSync('HomeCity',city)
+						// uni.setStorageSync('regionCode',code)
 						uni.reLaunch({
-							url:`${this.backUrl}?cityName=${city}&key=${this.key}&checkInDate=${this.checkInDate}&checkOutDate=${this.checkOutDate}`
+							url:`${this.backUrl}?&regionCode=${code}`
 						})
 					}
 				}else{

+ 3 - 1
my/memberCenter/index.vue

@@ -188,7 +188,7 @@
 					    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 class="btn" :loading="btnLoading1" :disabled="btnLoading1" @click="getMediaVipCoupon">
 						确认
 					</button>
 				</view>
@@ -372,6 +372,7 @@
 				
 			},
 			getMediaVipCoupon(){
+				this.btnLoading1 = true
 				let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
 				getMediaVipCoupon({
 					productId:this.productId,
@@ -381,6 +382,7 @@
 				  "userId": userInfo.userId,
 					userMobile:userInfo.phoneNum,
 					mobile:this.form.account}).then(res=>{
+						this.btnLoading1 = false
 					if(res.state == 'Success'){
 						this.show1 = false
 						uni.showToast({

+ 64 - 16
my/order/foodOrder/detail.vue

@@ -9,6 +9,9 @@
 					<view class="status" v-else>
 						{{info.goodsList[0] |filterType }}
 					</view>
+					<view class="notice" v-if="info.goodsList[0].goodsState == 'APPLY_REFUNDING'">
+						3个工作日内自动退款到您付款账户
+					</view>
 				</view>
 			</view>
 
@@ -36,13 +39,19 @@
 						</view>
 					</view>
 					
+					
 					<view class="right">
-						¥{{item.selPrice}}
+						<view class="">
+						¥{{item.sellPrice}}
+						</view>
+						<view class="refund">
+							{{  isRefund(item.productId)?'已退款':''}} 
+						</view>
 					</view>
 				</view>
 				<view class="total-box">
 					<view class="num">
-						共{{info.goodsList[0].goodsInfo.products.length}}件 
+						共{{totalNum}}件 
 					</view>
 					<view class="price">
 						小计¥{{info.payAmount}}
@@ -50,16 +59,21 @@
 				</view>
 			</view>
 			
-			<view class="content code-box"  v-if="info.goodsList[0].goodsState == 'WAIT_USE'">
+			<view class="content code-box"  v-if="info.goodsList[0].goodsState == 'USED'">
+			<!-- <view class="content code-box" v-if="info.goodsList[0].goodsState == 'WAIT_USE'"> -->
 					<view class="title">
-						券码信息
+						取餐码
+					</view>
+					
+					<view class="qrCodes">
+						{{info.goodsList[0].extend.sync.qrCodes}}
 					</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>
+					</uqrcode> -->
 			</view>
 			
 			
@@ -103,7 +117,7 @@
 					</view>
 				</view>
 				
-				<view class="item" v-if="info.goodsList[0].goodsState == 'WAIT_USE'">
+				<view class="item" v-if="info.goodsList[0].goodsState !== 'WAIT_PAYMENT'">
 					<view class="label">
 						付款方式
 					</view>
@@ -211,6 +225,13 @@
 			}
 		},
 		computed: {
+			totalNum(){
+				let total = 0
+				this.info.goodsList[0].goodsInfo.products.map(item=>{
+					total+=item.quantity
+				})
+				return total
+			},
 			closeTime() {
 				return (this.info.createTime + 1000*60*15) - new Date().getTime()
 			},
@@ -223,7 +244,18 @@
 			}
 		},
 		methods: {
-
+			isRefund(id){
+				let flag = false
+				if(this.info.goodsList[0].extend.sync&&this.info.goodsList[0].extend.sync.refundProducts){
+					this.info.goodsList[0].extend.sync.refundProducts.map(item=>{
+						if(item.productId == id){
+							flag = true
+						}
+					})
+				}
+				return flag
+				
+			},
 			finish(){
 				this.isNotTime = true
 				this.payDetails(this.info.orderNo)
@@ -256,12 +288,12 @@
 					}
 					if(this.info.goodsList[0].goodsState == 'WAIT_USE'){
 					
-						qrCode(this.info.goodsList[0].id).then(res=>{
-							this.loading = false
-							if(res.state == 'Success'){
-								this.codeData = res.content
-							}
-						})
+						// qrCode(this.info.goodsList[0].id).then(res=>{
+						// 	this.loading = false
+						// 	if(res.state == 'Success'){
+						// 		this.codeData = res.content
+						// 	}
+						// })
 					}
 			
 				})
@@ -408,7 +440,7 @@
 					font-size: 28rpx;
 					color: #222222;
 					margin-left: 20rpx;
-					max-width: 400rpx;
+					max-width: 330rpx;
 					white-space: nowrap;
 					overflow: hidden;
 					text-overflow: ellipsis;
@@ -423,6 +455,13 @@
 			.right{
 				font-size: 28rpx;
 				color: #222222;
+				display: flex;
+				align-items: center;
+				.refund{
+					font-size: 24rpx;
+					color: red;
+					margin-left: 6rpx;
+				}
 			}
 		}
 		
@@ -519,6 +558,14 @@
 			}
 		}
 		
+		.qrCodes{
+			font-size: 36rpx;
+			font-weight: bold;
+			text-align: center;
+			color: $uni-color-primary;
+			padding: 30rpx 0;
+		}
+		
 	}
 	
 	.input-box{
@@ -552,7 +599,7 @@
 		}
 		.item{
 			display: flex;
-			align-items: center;
+			align-items: flex-start;
 			justify-content: space-between;
 			margin-top: 28rpx;
 			.label{
@@ -562,6 +609,7 @@
 			.value{
 				font-size: 28rpx;
 				color: #222222;
+				max-width: 450rpx;
 			}
 		}
 	}

+ 73 - 597
orderFood/index.vue

@@ -1,323 +1,66 @@
 <template>
-	<view class="orderFood">
-		<view class="shop-info">
-			<view class="shop-name">
-				{{shopInfo.shopName}}
-			</view>
-			<view class="address">
-				{{shopInfo.address}}
-			</view>
-		</view>
-		
+	<view class="orderFood-index">
 		<view class="content">
-			<scroll-view :scroll-y="true"  class="left" :scroll-into-view="scrollTo1" scroll-with-animation>
-			<!-- <view class="left"> -->
-				<view class="item" :class="[active == index?'active':'']" v-for="(item,index) in list" :id="'tab'+index" :key="index" @click="handleTab(index)">
-					<image class="icon" :src="item.imageCnUrl" mode=""></image>
-					<view class="name">
-						{{item.topName}}
-					</view>
-				</view>
-			<!-- </view> -->
-			</scroll-view>
-			<scroll-view :scroll-y="true"  class="right" :scroll-into-view="scrollTo" scroll-with-animation @scroll="scroll">
-	<!-- 			<view class="test">
-					
-				</view> -->
-				<!-- <view class="right"> -->
-					<view class="section" v-for="(item,index) in list" :key="index">
-						<view class="section-name" :class="'title'+index" :id="'title'+index" >
-							{{item.topName}}
-						</view>
-					<!-- 	<zs-title :title="item.topName" :value="index" :class="'title'+index" :id="'title'+index" @changeTag="chooseTag"></zs-title> -->
-						<view class="item" v-for="(i,d) in item.menuVoList" :key="d">
-							<image class="img" :src="i.imageUrl" mode=""></image>
-							<view class="info">
-								<view class="title">
-									{{i.nameCn}}
-								</view>
-								<view class="btn-box">
-									<view class="price-box">
-										<view class="price">
-											<view class="unit">
-												¥
-											</view>
-											<view class="num">
-												{{i.priceHead}}
-											</view>
-										</view>
-										<view class="old-price">
-											¥{{i.price}}
-										</view>
-									</view>
-									<image class="btn" @click="add(i,1)" src="../static/add-active.png" mode=""></image>
-								</view>
-							</view>
-						</view>
-					</view>
-				<!-- </view> -->
-			</scroll-view>
-		</view>
-		
-		<view class="total-box">
-			<view class="price-box" @click="handleCar">
-				<view class="car-box">
-					<image class="icon" src="../static/shop-car.png" mode=""></image>
-					<view class="num" v-if="totalNum">
-						{{totalNum}}
-					</view>
-				</view>
-				<view class="price">
-					<view class="unit">
-						¥
-					</view>
-					<view class="num">
-						{{total}}
-					</view>
+			<view class="item" v-for="(item,index) in list" :key="index" @click="jump(item.type)">
+				<image class="icon" :src="item.src" mode=""></image>
+				<view class="name">
+					{{item.name}}
 				</view>
 			</view>
-			
-			<button class="buy" :class="[!carList.length?'disabled':'']" :disabled="!carList.length" type="default" @click="buy">{{carList.length?'选好了':'未选择商品'}}</button>
 		</view>
-		
-		
-		<u-popup :show="show" round="32rpx" mode="bottom" @close="show = false">
-			<view class="popup-title-box" >
-				<view class="title">
-					已选商品
-				</view>
-				<view class="clear" v-if="carList.length" @click="clear">
-					清空
-				</view>
-			</view>
-			<u-empty
-			        mode="car"
-			        icon="http://cdn.uviewui.com/uview/empty/car.png"
-					v-if="!carList.length"
-			>
-			</u-empty>
-			<view class="car-content" v-else>
-				<view class="item" v-for="(item,index) in carList" :key="index">
-					<image class="img" :src="item.imageUrl" mode=""></image>
-					<view class="info">
-						<view class="title">
-							{{item.nameCn}}
-						</view>
-						<view class="btn-box">
-							<view class="price-box">
-								<view class="price">
-									<view class="unit">
-										¥
-									</view>
-									<view class="num">
-										{{item.selPrice}}
-									</view>
-								</view>
-								<view class="old-price">
-									¥{{item.orgPrice}}
-								</view>
-							</view>
-							<view class="count-box">
-							<image class="btn" src="../static/remove.png" v-if="item.quantity" @click="add(item,-1)" mode=""></image>
-								<view class="num">
-									{{item.quantity}}
-								</view>
-							<image class="btn" src="../static/add-active.png" @click="add(item,1)" mode=""></image>
-							</view>
-						</view>
-					</view>
-				</view>
-				
-			</view>
-			<view class="total-box total-box1">
-				<view class="price-box" @click="handleCar">
-					<view class="car-box">
-						<image class="icon" src="../static/shop-car.png" mode=""></image>
-						<view class="num" v-if="totalNum">
-							{{totalNum}}
-						</view>
-					</view>
-					<view class="price">
-						<view class="unit">
-							¥
-						</view>
-						<view class="num">
-							{{total}}
-						</view>
-					</view>
-				</view>
-				
-				<button class="buy" :class="[!carList.length?'disabled':'']" :disabled="!carList.length" type="default" @click="buy">{{carList.length?'选好了':'未选择商品'}}</button>
-			</view>
-		</u-popup>
-		
 	</view>
 </template>
 
 <script>
-	import {shopDetail,menuList} from '@/api/orderFood.js'
 	export default {
 		data() {
 			return {
-				shopId:"63836999-5117-4980-8632-497f007808ef",
-				show:false,
-				active:0,
-				list:[],
-				shopInfo:{
-					shopName:'',
-					address:'',
-				},
-				carList:[],
-				scrollTo:'title0',
-				scrollTo1:'',
-				topList:[],
-				offsetTop:0,//顶部距离
-				cateName:'',//跳转过来携带的分类名称
-			};
-		},
-		computed: {
-			totalNum(){
-				let total = 0
-				this.carList.map(item=>{
-					total+=item.quantity
-				})
-				return total
-			},
-			total() {
-				let total = 0
-				this.carList.map(item=>{
-					total+=(item.selPrice*10000*item.quantity)
-				})
-				return total/10000
+				list: [
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xgJrwD0vChsW012ac1e138a0aa5a970e8f8c59dab926.png/1.png',
+						name:'肯德基KFC',
+						type:'Kfc'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/K64jffEqRIDr487e8cab971c3b890d4066a26f5856d2.png/1.png',
+						name:'麦当劳',
+						type:'MDL'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xMwtPkICBcam5513c4ac644054e60009cb8b1eb52e8f.png/1.png',
+						name:'星巴克',
+						type:'XBK'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/U9j6fgVmKeAt522ed50aa1a72f798260e0e30138d4c6.png/1.png',
+						name:'奈雪的茶',
+						type:'NXDC'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zS5Q8sC9AAQca76eef36da2bd5a2ec234d75d8dcc044.png/1.png',
+						name:'瑞幸咖啡',
+						type:'RXKF'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/fA95my16Qunf967a9d992fc41134332926bcb5665881.png/1.png',
+						name:'喜茶',
+						type:'XC'
+					},
+					{
+						src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/wk5eyuvhighG206a7ea081e3f0b783ff2a9555375e85.png/1.png',
+						name:'库迪咖啡',
+						type:'KD'
+					}
+				]
 			}
 		},
 		methods: {
-			scroll(val){
-				if(!this.offsetTop){
-					this.offsetTop = val.currentTarget.offsetTop
-				}
-				this.topList.map((item,index)=>{
-					if(index!=this.topList.length-1){
-						
-						if(val.detail.scrollTop>= (item-this.offsetTop)&&(val.detail.scrollTop <=this.topList[index+1]-this.offsetTop)){
-							this.scrollTo1 = 'tab'+index
-							this.active = index
-						}
-					}else{
-						if(val.detail.scrollTop>= (item-this.offsetTop)){
-							this.scrollTo1 = 'tab'+index
-							this.active = index
-						}
-					}
-				})
-			},
-			clear(){
-				this.carList = []
-			},
-			add(item,num){
-				if(this.carList.some(i=>item.productId == i.productId)){
-					this.carList.forEach((row,index)=>{
-						if(item.productId == row.productId){
-							row.quantity+=num
-							if(row.quantity == 0){
-								this.carList.splice(index,1)
-							}
-						}
-					})
-				}else{
-					let obj ={
-					  "imageUrl": item.imageUrl,
-					  "nameCn": item.nameCn,
-					  "productId": item.productId,
-					  "quantity": 1,
-					  "selPrice": item.priceHead,
-					  "orgPrice": item.basePrice,
-					}
-					this.carList.push(obj)
-				}
-			},
-			handleCar(){
-				this.show = true
-			},
-			handleTab(index){
-				this.active = index
-				this.scrollTo = 'title'+index
-			},
-			chooseTag(val){
-				console.log('当前',val);
-			},
-			menuList(){
-				menuList(this.shopId).then(res=>{
-					if(res.state = 'Success'){
-						this.list = res.content.data
-						if(this.cateName){
-							this.list.map((item,index)=>{
-								if(item.topName == this.cateName){
-									this.handleTab(index)
-								}
-							})
-						}
-						
-						this.$nextTick(()=>{
-							let query = uni.createSelectorQuery().in(this);
-							query.selectAll('.section-name').boundingClientRect(data=>{
-								console.log(data);
-								this.topList =data.map(item=>{
-									return item.top
-								})
-							}).exec();
-							
-							
-						})
-					}
-				})
-			},
-			shopDetail(){
-				shopDetail({"id": this.shopId,
-				  "lat": "",
-				  "lon": ""}).then(res=>{
-					if(res.state = 'Success'){
-						this.shopInfo.shopName = res.content.data.shopName
-						this.shopInfo.address = res.content.data.address
-					}
-				})
-			},
-			
-			buy() {
-				let that = this
+			jump(type) {
 				if (uni.getStorageSync('token')) {
-					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
-						let info ={
-							shopName:this.shopInfo.shopName,
-							address:this.shopInfo.address,
-							shopId:this.shopId,
-							products:this.carList,
-							total:this.total,
-							openTime:this.shopInfo.openTime,
-							closeTime:this.shopInfo.closeTime,
-							totalNum:this.totalNum
-						}
-						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'
-									})
-								}
-							}
-						})
-					}
+					uni.setStorageSync('ot',type)
+					uni.navigateTo({
+						url:'./shopList'
+					})
 				}else{
 					uni.showModal({
 						title:'请登录',
@@ -326,316 +69,49 @@
 							console.log(res);
 							if(res.confirm){
 								uni.navigateTo({
-									url:`/login/login/login?redirect=/orderFood/index&shopId=${that.shopId}`
+									url:`/login/login/login?redirect=/orderFood/index`
 								})
 							}
 						}
 					})
 				}
 				
+				
+				
 			}
 		},
-		onLoad(options) {
-			this.cateName = options.cateName
-			this.shopId = options.id || "63836999-5117-4980-8632-497f007808ef"
-			// this.shopId = "63836999-5117-4980-8632-497f007808ef"
-			this.shopDetail()
-			this.menuList()
-		},
-		onReady () {
-			// this.Observer = uni.createIntersectionObserver(this)
-			
-			// this.Observer.relativeTo('.test',{bottom: 0}).observe('.title0', (res) => {
-			// 	console.log(12312);
-			// 	// this.$emit('changeTag',this.value)
-			// })
-		}
 	}
 </script>
 
-<style lang="scss" >
-.orderFood{
-	.shop-info{
-		width: 100%;
-		height: 130rpx;
-		padding: 20rpx 24rpx;
-		box-sizing: border-box;
-		border-bottom: 2rpx solid #F0F0F0;
-		// position: fixed;
-		// top: 0%;
-		// left: 0%;
-		// z-index: 9;
-		background: #fff;
-		.shop-name{
-			font-weight: bold;
-			font-size: 32rpx;
-			color: #222222;
-		}
-		.address{
-			font-size: 24rpx;
-			color: #AAAAAA;
-			margin-top: 16rpx;
-		}
-	}
+<style lang="scss" scoped>
+.orderFood-index{
+	background: #F9F9F9;
+	padding: 24rpx;
+	min-height: 100vh;
 	.content{
-		height: calc(100vh - 130rpx);
-		display: flex;
-		overflow: auto;
-		box-sizing: border-box;
-		padding-bottom: calc(98rpx + env(safe-area-inset-bottom)) ;
-		.left{
-			flex: 0 0 176rpx;
-			background: #F7F7F7;
-			.item{
-				text-align: center;
-				padding: 16rpx 0;
-				.icon{
-					width: 76rpx;
-					height: 76rpx;
-				}
-				.name{
-					font-size: 24rpx;
-					color: #AAAAAA;
-				}
-			}
-			.item.active{
-				background: #FFFFFF;
-				.name{
-					color: #222222;
-				}
-			}
-		}
-		.right{
-			flex: 1;
-			padding: 0 24rpx;
-			overflow: auto;
-			position: relative;
-			.test{
-				width: 100%;
-				height: 60rpx;
-				background: red;
-				position: fixed;
-			}
-			.section{
-				.section-name{
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-					padding-top: 30rpx;
-				}
-				.item{
-					display: flex;
-					margin-top: 28rpx;
-					.img{
-						width: 160rpx;
-						height: 160rpx;
-						border-radius: 8rpx 8rpx 8rpx 8rpx;
-					}
-					.info{
-						flex: 1;
-						margin-left: 26rpx;
-						display: flex;
-						flex-direction: column;
-						justify-content: space-around;
-						.title{
-							font-weight: bold;
-							font-size: 32rpx;
-							color: #222222;
-						}
-						.btn-box{
-							display: flex;
-							justify-content: space-between;
-							.price-box{
-								display: flex;
-								align-items: center;
-								.price{
-									display: flex;
-									align-items: flex-end;
-									color: #FF4D3A;
-									.unit{
-										font-size: 20rpx; 
-									}
-									.num{
-										font-weight: bold;
-										font-size: 36rpx;
-									}
-								}
-								.old-price{
-									font-weight: normal;
-									font-size: 24rpx;
-									color: #AAAAAA;
-									text-decoration: line-through;
-									margin-left: 16rpx;
-								}
-							}
-							.btn{
-								width: 40rpx;
-								height: 40rpx;
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-	
-	.total-box1{
-		position: inherit!important;
-		padding-bottom: 0!important;
-	}
-	.total-box{
-		position: fixed;
-		left: 0%;
-		bottom: 0;
-		width: 100%;
-		padding: 10rpx 24rpx env(safe-area-inset-bottom);
-		box-sizing: border-box;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		border-top: 1rpx solid #EEEEEE;
-		.price-box{
-			display: flex;
-			.car-box{
-				position: relative;
-				display: flex;
-				align-items: center;
-				.icon{
-					width: 48rpx;
-					height: 48rpx;
-				}
-				.num{
-					position: absolute;
-					top: -18rpx;
-					right: -18rpx;
-					min-width: 36rpx;
-					height: 36rpx;
-					line-height: 36rpx;
-					text-align: center;
-					border-radius: 18rpx;
-					background: #222222;
-					font-weight: bold;
-					font-size: 24rpx;
-					color: #FFFFFF;
-					margin-left: 20rpx;
-				}
-			}
-			.price{
-				display: flex;
-				align-items: flex-end;
-				color: #FF4D3A;
-				.unit{
-					font-size: 20rpx; 
-				}
-				.num{
-					font-weight: bold;
-					font-size: 36rpx;
-				}
-			}
-		}
-		
-		.buy{
-			width: 200rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			text-align: center;
-			background: #EE4320;
-			border-radius: 40rpx 40rpx 40rpx 40rpx;
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #FFFFFF;
-			margin: 0;
-		}
-		.buy.disabled{
-			background: #F6F6F6;
-			color: #AAAAAA;
-		}
-	}
-	.popup-title-box{
 		display: flex;
+		flex-wrap: wrap;
 		justify-content: space-between;
-		padding: 24rpx;
-		.title{
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #222222;
-		}
-		.clear{
-			font-size: 28rpx;
-			color: #AAAAAA;
-		}
-	}
-	.u-empty{
-		padding: 30rpx 0;
-	}
-	
-	.car-content{
-		padding-bottom: 30rpx;
-		max-height: 700rpx;
-		overflow: auto;
 		.item{
-			display: flex;
-			margin-top: 28rpx;
-			padding: 0 24rpx;
-			.img{
-				width: 160rpx;
-				height: 160rpx;
-				border-radius: 8rpx 8rpx 8rpx 8rpx;
+			width: 224rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			padding: 24rpx;
+			box-sizing: border-box;
+			text-align: center;
+			margin-bottom: 16rpx;
+			.icon{
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 50%;
 			}
-			.info{
-				flex: 1;
-				margin-left: 26rpx;
-				display: flex;
-				flex-direction: column;
-				justify-content: space-around;
-				.title{
-					font-weight: bold;
-					font-size: 32rpx;
-					color: #222222;
-				}
-				.btn-box{
-					display: flex;
-					justify-content: space-between;
-					.price-box{
-						display: flex;
-						align-items: center;
-						.price{
-							display: flex;
-							align-items: flex-end;
-							color: #FF4D3A;
-							.unit{
-								font-size: 20rpx; 
-							}
-							.num{
-								font-weight: bold;
-								font-size: 36rpx;
-							}
-						}
-						.old-price{
-							font-weight: normal;
-							font-size: 24rpx;
-							color: #AAAAAA;
-							text-decoration: line-through;
-							margin-left: 16rpx;
-						}
-					}
-					.count-box{
-						display: flex;
-						align-items: center;
-						.num{
-							width: 100rpx;
-							text-align: center;
-							font-size: 28rpx;
-							color: #222222;
-						}
-						.btn{
-							width: 40rpx;
-							height: 40rpx;
-						}
-					}
-				}
+			.name{
+				font-size: 32rpx;
+				color: #222222;
+				text-align: center;
+				margin-top: 28rpx;
 			}
 		}
 	}
 }
-</style>
+</style>

+ 6 - 6
orderFood/pay.vue

@@ -25,7 +25,7 @@
 				</view>
 				
 				<view class="right">
-					¥{{item.selPrice}}
+					¥{{item.sellPrice}}
 				</view>
 			</view>
 			<view class="total-box">
@@ -77,17 +77,17 @@
 				温馨提示
 			</view>
 			<view class="notice">
-				1.付款成功后1-10分钟为您出餐
+				1.付款成功后预计5-10分钟为您出餐(具体出餐时间以门店实际出餐时间为准)
 			</view>
 			<view class="notice">
 				2.此订单为特价产品,付款成功后将无法退款。请确认后购买
 			</view>
 			<view class="notice">
 				3.由于门店餐品库存不稳定等因素,存在少量出餐失败的情况,
-				会进行退款
+				会自动退款
 			</view>
 			<view class="notice">
-				4.出餐失败,3个工作日内自动退款到您微信钱包
+				4.出餐失败,3个工作日内自动退款到您付款账户
 			</view>
 		</view>
 		
@@ -165,7 +165,7 @@
 					  "pid": "",
 					  "productId": "",
 					  "quantity": 0,
-					  "selPrice": 0,
+					  "sellPrice": 0,
 					}
 				  ],
 				 //  "recAddr": {
@@ -296,7 +296,7 @@
 .food-pay{
 	background: #F9F9F9;
 	min-height: 100vh;
-	padding: 20rpx 24rpx;
+	padding: 20rpx 24rpx 100rpx;
 	.content{
 		margin-bottom: 20rpx;
 		padding: 24rpx;

+ 1273 - 0
orderFood/shopDetail.vue

@@ -0,0 +1,1273 @@
+<template>
+	<view class="orderFood">
+		<view class="shop-info">
+			<view class="shop-name">
+				{{shopInfo.shopName}}
+			</view>
+			<view class="address">
+				{{shopInfo.address}}
+			</view>
+		</view>
+		
+		<view class="content">
+			<scroll-view :scroll-y="true"  class="left" :scroll-into-view="scrollTo1" scroll-with-animation>
+			<!-- <view class="left"> -->
+				<view class="item" :class="[active == index?'active':'']" v-for="(item,index) in list" :id="'tab'+index" :key="index" @click="handleTab(index)">
+					<image class="icon" :src="item.imageCnUrl" mode=""></image>
+					<view class="name">
+						{{item.topName}}
+					</view>
+				</view>
+			<!-- </view> -->
+			</scroll-view>
+			<scroll-view :scroll-y="true"  class="right" :scroll-into-view="scrollTo" scroll-with-animation @scroll="scroll">
+	<!-- 			<view class="test">
+					
+				</view> -->
+				<!-- <view class="right"> -->
+					<view class="section" v-for="(item,index) in list" :key="index">
+						<view class="section-name" :class="'title'+index" :id="'title'+index" >
+							{{item.topName}}
+						</view>
+					<!-- 	<zs-title :title="item.topName" :value="index" :class="'title'+index" :id="'title'+index" @changeTag="chooseTag"></zs-title> -->
+						<view class="item" v-for="(i,d) in item.menuVoList" :key="d" >
+							<image class="img" :src="i.imageUrl" mode=""></image>
+							<view class="info">
+								<view class="title">
+									{{i.nameCn}}
+								</view>
+								<view class="btn-box">
+									<view class="price-box">
+										<view class="price">
+											<view class="unit">
+												¥
+											</view>
+											<view class="num">
+												{{i.priceHead}}
+											</view>
+										</view>
+										<view class="old-price">
+											¥{{i.price}}
+										</view>
+									</view>
+									<image class="btn" @click.stop="add(i,1,item)" src="../static/add-active.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+					</view>
+				<!-- </view> -->
+			</scroll-view>
+		</view>
+		
+		<view class="total-box">
+			<view class="price-box" @click="handleCar">
+				<view class="car-box">
+					<image class="icon" src="../static/shop-car.png" mode=""></image>
+					<view class="num" v-if="totalNum">
+						{{totalNum}}
+					</view>
+				</view>
+				<view class="price">
+					<view class="unit">
+						¥
+					</view>
+					<view class="num">
+						{{total}}
+					</view>
+				</view>
+			</view>
+			
+			<button class="buy" :class="[!carList.length?'disabled':'']" :disabled="!carList.length" type="default" @click="buy">{{carList.length?'选好了':'未选择商品'}}</button>
+		</view>
+		
+		
+		<!-- 购物车 -->
+		<u-popup :show="show" round="32rpx" mode="bottom" @close="show = false">
+			<view class="popup-title-box" >
+				<view class="title">
+					已选商品
+				</view>
+				<view class="clear" v-if="carList.length" @click="clear">
+					清空
+				</view>
+			</view>
+			<u-empty
+			        mode="car"
+			        icon="http://cdn.uviewui.com/uview/empty/car.png"
+					v-if="!carList.length"
+			>
+			</u-empty>
+			<view class="car-content" v-else>
+				<view class="item" v-for="(item,index) in carList" :key="index">
+					<image class="img" :src="item.imageUrl" mode=""></image>
+					<view class="info">
+						<view class="title">
+							{{item.nameCn}}
+						</view>
+						<view class="type" v-if="item.config">
+							{{item.config}}
+						</view>
+						<view class="btn-box">
+							<view class="price-box">
+								<view class="price">
+									<view class="unit">
+										¥
+									</view>
+									<view class="num">
+										{{item.sellPrice}}
+									</view>
+								</view>
+								<view class="old-price">
+									¥{{item.orgPrice}}
+								</view>
+							</view>
+							<view class="count-box">
+							<image class="btn" src="../static/remove.png" v-if="item.quantity" @click="add(item,-1,{},index)" mode=""></image>
+								<view class="num">
+									{{item.quantity}}
+								</view>
+							<image class="btn" src="../static/add-active.png" @click="add(item,1,{},index)" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+				
+			</view>
+			<view class="total-box total-box1">
+				<view class="price-box" @click="handleCar">
+					<view class="car-box">
+						<image class="icon" src="../static/shop-car.png" mode=""></image>
+						<view class="num" v-if="totalNum">
+							{{totalNum}}
+						</view>
+					</view>
+					<view class="price">
+						<view class="unit">
+							¥
+						</view>
+						<view class="num">
+							{{total}}
+						</view>
+					</view>
+				</view>
+				
+				<button class="buy" :class="[!carList.length?'disabled':'']" :disabled="!carList.length" type="default" @click="buy">{{carList.length?'选好了':'未选择商品'}}</button>
+			</view>
+		</u-popup>
+		
+		
+		<!-- 商品详情 -->
+		<u-popup :show="show2" round="32rpx" mode="bottom" @close="show2 = false">
+			<view class="popup-goodsDetail">
+				<view class="box">
+					
+					<image class="img" :src="goodsInfo.product_img" mode="aspectFit"></image>
+					<view class="popup-content">
+						<view class="title">
+							{{goodsInfo.product_name}}
+						</view>
+						<view class="desc" v-if="goodsInfo.product_description">
+							{{goodsInfo.product_description}}
+						</view>
+						
+						<view class="choose-box" v-if="ot == 'NXDC'">
+							<view class="choose-item" v-for="item in goodsInfo.details.spu_specs" :key="item.code">
+								<view class="choose-title">
+									{{item.name}}
+								</view>
+								<view class="item-box">
+									<view class="item" :class="[i.code == chooseInfo[item.code].code?'active':'']" v-for="i in item.values" :key="i.code" @click="choose(i,item.code)">
+										{{i.name}} {{i.price?`¥${i.price}`:''}}
+									</view>
+								</view>
+							</view>
+						</view>
+						
+						<view class="choose-box" v-else-if="ot == 'MDL'">
+							<view class="choose-item" v-for="item in goodsInfo.details.optional" :key="item.code">
+								<view class="choose-title">
+									{{item.name}}
+								</view>
+								<view class="item-box">
+									<view class="item" :class="[i.id == chooseInfo[item.name+'-'+item.id].id?'active':'']" v-for="i in item.sku_infos" :key="i.id" @click="()=>choose(i,item.name+'-'+item.id)">
+										{{i.name}} {{i.price?`¥${i.price}`:''}}
+									</view>
+								</view>
+							</view>
+							
+							<view class="choose-item" >
+								<view class="choose-title">
+									套餐内容
+								</view>
+								<view class="item-box">
+									<view class="item active"  v-for="i in goodsInfo.details.required" :key="i.id">
+										{{i.product_name}}x{{i.amount}}
+									</view>
+								</view>
+							</view>
+						</view>
+						
+						
+						<view class="choose-box" v-else-if="ot == 'XBK'">
+							<view class="choose-item" v-for="item in goodsInfo.details.optional" :key="item.code">
+								<view class="choose-title">
+									{{item.name}}
+								</view>
+								<view class="item-box">
+									<view class="item" :class="[i.id == chooseInfo[item.id].id?'active':'']" v-for="i in item.sku_infos" :key="i.id" @click="()=>choose(i,item.id)">
+										{{i.name}} {{i.price?`¥${i.price}`:''}}
+									</view>
+								</view>
+							</view>
+						</view>							
+						
+						<view class="choose-box" v-else-if="ot == 'XC'">
+							<view class="choose-item" v-for="item in goodsInfo.details.specifications" :key="item.code">
+								<view class="choose-title">
+									{{item.name}}
+								</view>
+								<view class="item-box">
+									<view class="item" :class="[i.id == chooseInfo[item.id].id?'active':'']" v-for="i in item.values" :key="i.id" @click="()=>choose(i,item.id,item)">
+										{{i.name}} {{i.price?`¥${i.price}`:''}}
+									</view>
+								</view>
+							</view>
+						</view>
+						
+						
+						
+					</view>
+				</view>
+				
+				<view class="btn-box">
+					<view class="order-info">
+						<view class="left">
+							<view class="price-box">
+								<view class="price">
+									¥{{(itemPrice.price*10000)*num/10000}}
+								</view>
+								<view class="old-price">
+									¥{{ (itemPrice.oldPrice*10000)*num/10000}}
+								</view>
+							</view>
+							<view class="choose">
+								{{config}}
+							</view>
+						</view>
+						<view class="count-box">
+							<image class="btn1" src="../static/remove.png" v-if="num" @click="add1(-1)" mode=""></image>
+								<view class="num">
+									{{num}}
+								</view>
+							<image class="btn1" src="../static/add-active.png" @click="add1(1)" mode=""></image>
+						</view>
+					</view>
+					<button class="btn" type="default" @click="handleAdd">加入购物车</button>
+				</view>
+				
+			</view>
+		</u-popup>
+		
+		<u-modal :show="show1" :title="shopInfo.shopName"  confirmColor="#FF4D3A" confirmText="更换门店" @confirm="confirm">
+			<view class="modal-box">
+				<view class="shopName">
+					店铺暂未营业或已暂停营业
+				</view>
+				
+				<view class="notice">
+					请尝试更换门店~
+				</view>
+			</view>
+			
+		</u-modal>
+		
+	</view>
+</template>
+
+<script>
+	import {shopDetail,menuList,foodGoodsDetail} from '@/api/orderFood.js'
+	export default {
+		data() {
+			return {
+				shopId:"63836999-5117-4980-8632-497f007808ef",
+				show:false,
+				show1:false,
+				show2:false,
+				active:0,
+				list:[],
+				shopInfo:{
+					shopName:'',
+					address:'',
+				},
+				carList:[],
+				scrollTo:'title0',
+				scrollTo1:'',
+				topList:[],
+				offsetTop:0,//顶部距离
+				cateName:'',//跳转过来携带的分类名称
+				ot:uni.getStorageSync('ot'),
+				goodsInfo:{},
+				num:1,
+				chooseInfo:{},
+				item:{},//弹窗内商品信息
+				productId:'',
+				itemPrice:{//弹窗内商品价格
+					price:0,
+					oldPrice:0
+				}
+			};
+		},
+		computed: {
+			totalNum(){
+				let total = 0
+				this.carList.map(item=>{
+					total+=item.quantity
+				})
+				return total
+			},
+			total() {
+				let total = 0
+				this.carList.map(item=>{
+					total+=(item.sellPrice*10000*item.quantity)
+				})
+				return total/10000
+			},
+			// 选择的规格文字 同时计算当前选择的价格
+			config(){
+				let str = ''
+				for (let key in this.chooseInfo) {
+					 str +=this.chooseInfo[key].name +'/'
+				}
+				if(this.goodsInfo.details&&this.goodsInfo.details.sku_infos){
+					let {productId,price,oldPrice} = this.findData()
+					this.productId = productId
+					this.itemPrice = {
+						price,
+						oldPrice
+					}
+				}else if(this.goodsInfo.details&&this.goodsInfo.details.specifications){
+					let addPrice = 0
+					for (let key in this.chooseInfo) {
+						addPrice += this.chooseInfo[key].price
+					}
+					this.itemPrice = {
+						price:this.item.priceHead+addPrice,
+						oldPrice:this.item.price+addPrice
+					}
+					
+				}else if(this.ot == 'MDL'){
+					this.itemPrice = {
+						price:this.item.priceHead,
+						oldPrice:this.item.price
+					}
+				}else if(this.ot == 'XBK'){
+					let addPrice = 0
+					for (let key in this.chooseInfo) {
+						addPrice += this.chooseInfo[key].price
+					}
+					this.itemPrice = {
+						price:this.item.priceHead+addPrice,
+						oldPrice:this.item.price+addPrice
+					}
+				}
+				console.log('jiage',this.itemPrice);
+				return str
+			}
+		},
+		methods: {
+			// 选择规格
+			choose(item,key,data){
+				console.log(item,key);
+				if(this.ot == 'XC'){
+					if(this.chooseInfo[key]&&this.chooseInfo[key].id == item.id &&!data.mandatory){
+						this.$delete(this.chooseInfo,key)
+					}else{
+						this.$set(this.chooseInfo,key,item)
+					}
+				}else if(this.ot == 'MDL'){
+					if(this.chooseInfo[key]&&this.chooseInfo[key].id == item.id){//麦当劳不能不选择
+						// this.$delete(this.chooseInfo,key)
+					}else{
+						this.$set(this.chooseInfo,key,item)
+					}
+				}
+				else if(this.ot == 'XBK'){
+					if(this.chooseInfo[key]&&this.chooseInfo[key].id == item.id){//星巴克不能不选择
+						// this.$delete(this.chooseInfo,key)
+					}else{
+						this.$set(this.chooseInfo,key,item)
+					}
+				}
+				else{//奈雪的茶
+					this.$set(this.chooseInfo,key,item)
+				}
+			},
+			confirm(){
+				this.show1 = false
+				uni.navigateTo({
+					url:'./shopList'
+				})
+			},
+			// 滚动的选择商品
+			scroll(val){
+				if(!this.offsetTop){
+					this.offsetTop = val.currentTarget.offsetTop
+				}
+				this.topList.map((item,index)=>{
+					if(index!=this.topList.length-1){
+						
+						if(val.detail.scrollTop>= (item-this.offsetTop)&&(val.detail.scrollTop <=this.topList[index+1]-this.offsetTop)){
+							this.scrollTo1 = 'tab'+index
+							this.active = index
+						}
+					}else{
+						if(val.detail.scrollTop>= (item-this.offsetTop)){
+							this.scrollTo1 = 'tab'+index
+							this.active = index
+						}
+					}
+				})
+			},
+			clear(){
+				this.carList = []
+			},
+			// 购物车内添加数量 商品添加数量 选择规格时不走这里 但是选择规格的购物车内数量操作走这里
+			add(item,num,data={},idx){//item:当前操作item num:增加或者减少 data:当前item的上层栏目,idx:购物车内当前操作商品index 方便删除
+				// 如果需要选择规格
+				if(data.childClassList) return this.handleItem(item,data)
+				
+				// 肯德基
+				if(this.ot == 'Kfc'){
+					if(this.carList.some(i=>item.productId == i.productId)){
+						this.carList.forEach((row,index)=>{
+							if(item.productId == row.productId){
+								row.quantity+=num
+								if(row.quantity == 0){
+									this.carList.splice(index,1)
+								}
+							}
+						})
+					}else{
+						let obj ={
+						  "imageUrl": item.imageUrl,
+						  "nameCn": item.nameCn,
+						  "productId": item.productId,
+						  "quantity": 1,
+						  "sellPrice": item.priceHead,
+						  "orgPrice": item.price,
+						}
+						this.carList.push(obj)
+					}
+				// }else if(this.ot == 'NXDC'){//奈雪的茶 购物车内没有的商品不会从这里添加 所以只处理有的情况
+				}else{
+					if(this.carList.some((i,d)=>item.productId == i.productId)){
+						this.carList.forEach((row,index)=>{
+							if(index == idx){
+								row.quantity+=num
+								if(row.quantity == 0){
+									this.carList.splice(index,1)
+								}
+							}
+						})
+					}
+				}
+			},
+			// 商品详情内数量操作
+			add1(num){
+				this.num+=num
+			},
+			// 计算当前选择规格价格和code
+			findData(){
+				let productId = ''
+				let cur = {}
+				let price = 0
+				let oldPrice = 0
+				let addPrice = 0
+				for (let key in this.chooseInfo) {
+					cur[key] = this.chooseInfo[key].code
+					addPrice += this.chooseInfo[key].price
+				}
+				 this.goodsInfo.details.sku_infos.map(item=>{
+						let obj = {}
+						item.specs.map(i=>{
+							obj[i.code] = i.spec_code
+							
+						})
+						if(this.areObjectsEqual(cur,obj)){
+							price = item.salePrice
+							oldPrice = item.price
+							return productId = item.code
+						}
+				})
+				console.log('找到对应的',productId,price);
+				return {
+					productId,
+					price:price+addPrice,
+					oldPrice:oldPrice+addPrice
+				}
+			},
+			// 选择规格后,加入购物车
+			handleAdd(){
+				this.show2 = false
+				// let {productId,price,addPrice} = this.findData()
+				let obj = {}
+				if(this.ot == 'NXDC'){
+					obj ={
+					  "imageUrl": this.item.imageUrl,
+					  "nameCn": this.item.nameCn,
+					  "productId": this.item.productId,
+					  "quantity": this.num,
+					  "sellPrice": this.itemPrice.price,//市场价(如果存在套餐选项加价,这里的金额需要计算加价)
+					  "orgPrice": this.itemPrice.oldPrice,
+					  "config": JSON.parse(JSON.stringify(this.config)) , //这里只是为了直观展示套餐选项,实际下单可以传空
+					  "selected": [
+					    {
+					      "round": 0, //奈雪产品round目前没有使用,传0
+					      "products": [
+					        {
+					          "linkId": "",
+					          "productId": this.productId, //套餐选项skuID,商品详情的sku列表里面已经包含所有选项组合
+					          "quantity": 1
+					        }
+					      ]
+					    }
+					  ]
+					}
+				}else if(this.ot == 'XC'){
+					let products = []
+					for (let key in this.chooseInfo) {
+						products.push(
+							{ "linkId": key, "productId": this.chooseInfo[key].id, "quantity": 1 }
+						)
+					}
+					obj ={
+					  "imageUrl": this.item.imageUrl,
+					  "nameCn": this.item.nameCn,
+					  "productId": this.item.productId,
+					  "quantity": this.num,
+					  "sellPrice": this.itemPrice.price,//市场价(如果存在套餐选项加价,这里的金额需要计算加价)
+					  "orgPrice": this.itemPrice.oldPrice,
+					  "config": JSON.parse(JSON.stringify(this.config)) , //这里只是为了直观展示套餐选项,实际下单可以传空
+					  "selected": [
+					    {
+					      "round": 0,//喜茶产品round目前没有使用,传0
+					      "products": products
+					    }
+					  ]
+					}
+				}else if(this.ot == 'MDL'){
+					let products = []
+					for (let key in this.chooseInfo) {
+						products.push(
+							{
+							    "linkId": key.split('-')[1],//下单参数linkId(有时会和主商品id相同)
+							    "productId": this.chooseInfo[key].id,//套餐选项商品id
+							    "quantity": 1
+							}
+						)
+					}
+					obj ={
+					  "imageUrl": this.item.imageUrl,
+					  "nameCn": this.item.nameCn,
+					  "productId": this.item.productId,
+					  "quantity": this.num,
+					  "sellPrice": this.itemPrice.price,//市场价(如果存在套餐选项加价,这里的金额需要计算加价)
+					  "orgPrice": this.itemPrice.oldPrice,
+					  "config": JSON.parse(JSON.stringify(this.config)) , //这里只是为了直观展示套餐选项,实际下单可以传空
+					  "selected": [
+					    {
+					      "round": 0,//喜茶产品round目前没有使用,传0
+					      "products": products
+					    }
+					  ]
+					}
+				}
+				else if(this.ot == 'XBK'){
+					let products = []
+					for (let key in this.chooseInfo) {
+						products.push(
+							{
+							    "linkId": key,
+							    "productId": this.chooseInfo[key].id,//套餐选项商品id
+							    "quantity": 1
+							}
+						)
+					}
+					obj ={
+					  "imageUrl": this.item.imageUrl,
+					  "nameCn": this.item.nameCn,
+					  "productId": this.item.productId,
+					  "quantity": this.num,
+					  "sellPrice": this.itemPrice.price,//市场价(如果存在套餐选项加价,这里的金额需要计算加价)
+					  "orgPrice": this.itemPrice.oldPrice,
+					  "config": JSON.parse(JSON.stringify(this.config)) , //这里只是为了直观展示套餐选项,实际下单可以传空
+					  "selected": [
+					    {
+					      "round": 0,//喜茶产品round目前没有使用,传0
+					      "products": products
+					    }
+					  ]
+					}
+				}
+				
+				this.carList.push(obj)
+			},
+			// 对比两个对象是否内容相同
+		   areObjectsEqual(obj1, obj2) {
+			 const keys1 = Object.keys(obj1);
+			 const keys2 = Object.keys(obj2);
+		
+			 if (keys1.length!== keys2.length) {
+			   return false;
+			 }
+		
+			 for (const key in obj1) {
+			   if (obj1.hasOwnProperty(key)) {
+				 if (obj1[key]!== obj2[key]) {
+				   return false;
+				 }
+			   }
+			 }
+		
+			 return true;
+		   },
+			handleItem(i,item){
+				console.log(item);
+				this.num = 1
+				this.item = i
+				if(!item.childClassList) return
+				this.show2 = true
+				foodGoodsDetail({productId:i.productId,shopId:this.shopId}).then(res=>{
+					if(res.state = 'Success'){
+						this.goodsInfo = res.content.data
+						this.chooseInfo = {}
+						if(this.goodsInfo.details.spu_specs){//奈雪的茶
+							this.goodsInfo.details.spu_specs.map(item=>{
+								this.$set(this.chooseInfo,item.code,item.values[0])
+							})
+						}else if(this.goodsInfo.details.specifications){//喜茶
+							this.goodsInfo.details.specifications.map(item=>{
+								this.$set(this.chooseInfo,item.id,item.values[0])
+							})
+						}else if(this.goodsInfo.details.optional&&this.goodsInfo.details.optional.length&&this.ot=='XBK'){//星巴克
+							this.goodsInfo.details.optional.map(item=>{
+								this.$set(this.chooseInfo,item.id,item.sku_infos[0])
+							})
+						}else if(this.goodsInfo.details.optional&&this.goodsInfo.details.optional.length){//麦当劳
+							this.goodsInfo.details.optional.map(item=>{
+								// id可能相同 所以加上类目的name 方便创建订单时能取到id
+								this.$set(this.chooseInfo,item.name+'-'+item.id,item.sku_infos[0])
+							})
+						}
+						console.log(this.chooseInfo);
+					}
+				})
+			},
+			handleCar(){
+				this.show = true
+			},
+			handleTab(index){
+				this.active = index
+				this.scrollTo = 'title'+index
+			},
+			chooseTag(val){
+				console.log('当前',val);
+			},
+			menuList(){
+				uni.showLoading({
+					title:'加载中'
+				})
+				menuList(this.shopId).then(res=>{
+					uni.hideLoading()
+					if(res.state = 'Success'){
+						this.list = res.content.data
+						this.list.map((item,index)=>{
+							if(this.ot != 'Kfc'&&item.childClassList){
+								item.menuVoList = JSON.parse(JSON.stringify(item.childClassList[0].menuVoList))
+								// delete item.childClassList
+							}
+							// 滚动到对应栏目
+							if(this.cateName&&(item.topName == this.cateName)){
+								this.handleTab(index)
+							}
+						})
+					
+						
+						this.$nextTick(()=>{
+							let query = uni.createSelectorQuery().in(this);
+							query.selectAll('.section-name').boundingClientRect(data=>{
+								console.log(data);
+								this.topList =data.map(item=>{
+									return item.top
+								})
+							}).exec();
+							
+							
+						})
+					}
+				})
+			},
+			shopDetail(){
+				shopDetail({"id": this.shopId,
+				  "lat": "",
+				  "lon": ""}).then(res=>{
+					if(res.state = 'Success'){
+						this.shopInfo.shopName = res.content.data.shopName
+						this.shopInfo.address = res.content.data.address
+						//是否在营业时间内
+						if(res.content.data.openTime&&res.content.data.closeTime&&!this.isInBusinessHours(res.content.data.openTime,res.content.data.closeTime)){
+							this.show1 = true
+						}
+						
+						
+						
+					}
+				})
+			},
+			
+			buy() {
+				let that = this
+				if (uni.getStorageSync('token')) {
+					if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
+						let info ={
+							shopName:this.shopInfo.shopName,
+							address:this.shopInfo.address,
+							shopId:this.shopId,
+							products:this.carList,
+							total:this.total,
+							openTime:this.shopInfo.openTime,
+							closeTime:this.shopInfo.closeTime,
+							totalNum:this.totalNum
+						}
+						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/shopDetail&id=${that.shopId}`
+								})
+							}
+						}
+					})
+				}
+				
+			},
+			 isInBusinessHours(openTimeStr, closeTimeStr) {
+				let open = openTimeStr
+				let close = closeTimeStr
+				if(open.indexOf('.') != -1){
+					let index = open.indexOf('.')
+					open = open.substr(0,index)
+				}
+				if(close.indexOf('.') != -1){
+					let index = close.indexOf('.')
+					close = close.substr(0,index)
+				}
+			   const now = new Date();
+			   const openTime = new Date(open);
+			   const closeTime = new Date(close);
+			 
+			   // 获取当前时间的时分秒
+			   const nowHours = now.getHours();
+			   const nowMinutes = now.getMinutes();
+			   const nowSeconds = now.getSeconds();
+			 
+			   // 获取开店时间的时分秒
+			   const openHours = openTime.getHours();
+			   const openMinutes = openTime.getMinutes();
+			   const openSeconds = openTime.getSeconds();
+			 
+			   // 获取关店时间的时分秒
+			   const closeHours = closeTime.getHours();
+			   const closeMinutes = closeTime.getMinutes();
+			   const closeSeconds = closeTime.getSeconds();
+			 
+			   // 将当前时间、开店时间和关店时间转换为秒数
+			   const nowSecondsTotal = nowHours * 3600 + nowMinutes * 60 + nowSeconds;
+			   const openSecondsTotal = openHours * 3600 + openMinutes * 60 + openSeconds;
+			   const closeSecondsTotal = closeHours * 3600 + closeMinutes * 60 + closeSeconds;
+				
+				console.log(openSecondsTotal,closeSecondsTotal,nowSecondsTotal);
+			  if ( openSecondsTotal <nowSecondsTotal && nowSecondsTotal<closeSecondsTotal  ) {
+			    return true
+			  } else {
+			    return false
+			  }
+			}
+		},
+		onLoad(options) {
+			console.log(this.isInBusinessHours("2019-08-24T09:15:22.123Z","2019-08-24T14:15:22.123"));
+			
+			this.cateName = options.cateName
+			this.shopId = options.id || "63836999-5117-4980-8632-497f007808ef"
+			// this.shopId = "63836999-5117-4980-8632-497f007808ef"
+			this.shopDetail()
+			this.menuList()
+		},
+		onReady () {
+			// this.Observer = uni.createIntersectionObserver(this)
+			
+			// this.Observer.relativeTo('.test',{bottom: 0}).observe('.title0', (res) => {
+			// 	console.log(12312);
+			// 	// this.$emit('changeTag',this.value)
+			// })
+		}
+	}
+</script>
+
+<style lang="scss" >
+.orderFood{
+	.shop-info{
+		width: 100%;
+		height: 130rpx;
+		padding: 20rpx 24rpx;
+		box-sizing: border-box;
+		border-bottom: 2rpx solid #F0F0F0;
+		// position: fixed;
+		// top: 0%;
+		// left: 0%;
+		// z-index: 9;
+		background: #fff;
+		.shop-name{
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #222222;
+		}
+		.address{
+			font-size: 24rpx;
+			color: #AAAAAA;
+			margin-top: 16rpx;
+		}
+	}
+	.content{
+		height: calc(100vh - 130rpx);
+		display: flex;
+		overflow: auto;
+		box-sizing: border-box;
+		padding-bottom: calc(98rpx + env(safe-area-inset-bottom)) ;
+		.left{
+			flex: 0 0 176rpx;
+			background: #F7F7F7;
+			.item{
+				text-align: center;
+				padding: 16rpx 0;
+				.icon{
+					width: 76rpx;
+					height: 76rpx;
+				}
+				.name{
+					font-size: 24rpx;
+					color: #AAAAAA;
+				}
+			}
+			.item.active{
+				background: #FFFFFF;
+				.name{
+					color: #222222;
+				}
+			}
+		}
+		.right{
+			flex: 1;
+			padding: 0 24rpx;
+			overflow: auto;
+			position: relative;
+			.test{
+				width: 100%;
+				height: 60rpx;
+				background: red;
+				position: fixed;
+			}
+			.section{
+				.section-name{
+					font-weight: bold;
+					font-size: 28rpx;
+					color: #222222;
+					padding-top: 30rpx;
+				}
+				.item{
+					display: flex;
+					margin-top: 28rpx;
+					.img{
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 8rpx 8rpx 8rpx 8rpx;
+					}
+					.info{
+						flex: 1;
+						margin-left: 26rpx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-around;
+						.title{
+							font-weight: bold;
+							font-size: 32rpx;
+							color: #222222;
+						}
+						.btn-box{
+							display: flex;
+							justify-content: space-between;
+							.price-box{
+								display: flex;
+								align-items: center;
+								.price{
+									display: flex;
+									align-items: flex-end;
+									color: #FF4D3A;
+									.unit{
+										font-size: 20rpx; 
+									}
+									.num{
+										font-weight: bold;
+										font-size: 36rpx;
+									}
+								}
+								.old-price{
+									font-weight: normal;
+									font-size: 24rpx;
+									color: #AAAAAA;
+									text-decoration: line-through;
+									margin-left: 16rpx;
+								}
+							}
+							.btn{
+								width: 40rpx;
+								height: 40rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+	.total-box1{
+		position: inherit!important;
+		padding-bottom: 0!important;
+	}
+	.total-box{
+		position: fixed;
+		left: 0%;
+		bottom: 0;
+		width: 100%;
+		padding: 10rpx 24rpx env(safe-area-inset-bottom);
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		border-top: 1rpx solid #EEEEEE;
+		.price-box{
+			display: flex;
+			.car-box{
+				position: relative;
+				display: flex;
+				align-items: center;
+				.icon{
+					width: 48rpx;
+					height: 48rpx;
+				}
+				.num{
+					position: absolute;
+					top: -18rpx;
+					right: -18rpx;
+					min-width: 36rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					text-align: center;
+					border-radius: 18rpx;
+					background: #222222;
+					font-weight: bold;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					margin-left: 20rpx;
+				}
+			}
+			.price{
+				display: flex;
+				align-items: flex-end;
+				color: #FF4D3A;
+				.unit{
+					font-size: 20rpx; 
+				}
+				.num{
+					font-weight: bold;
+					font-size: 36rpx;
+				}
+			}
+		}
+		
+		.buy{
+			width: 200rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			background: #EE4320;
+			border-radius: 40rpx 40rpx 40rpx 40rpx;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #FFFFFF;
+			margin: 0;
+			
+		}
+		.buy::after{
+			border: none;
+			outline: none;
+		}
+		.buy.disabled{
+			background: #F6F6F6;
+			color: #AAAAAA;
+			
+		}
+	}
+	.popup-title-box{
+		display: flex;
+		justify-content: space-between;
+		padding: 24rpx;
+		.title{
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
+		.clear{
+			font-size: 28rpx;
+			color: #AAAAAA;
+		}
+	}
+	.u-empty{
+		padding: 30rpx 0;
+	}
+	
+	.car-content{
+		padding-bottom: 30rpx;
+		max-height: 700rpx;
+		overflow: auto;
+		.item{
+			display: flex;
+			margin-top: 28rpx;
+			padding: 0 24rpx;
+			.img{
+				width: 160rpx;
+				height: 160rpx;
+				border-radius: 8rpx 8rpx 8rpx 8rpx;
+			}
+			.info{
+				flex: 1;
+				margin-left: 26rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #222222;
+				}
+				.type{
+					font-weight: normal;
+					font-size: 24rpx;
+					color: #AAAAAA;
+				}
+				.btn-box{
+					display: flex;
+					justify-content: space-between;
+					.price-box{
+						display: flex;
+						align-items: center;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							color: #FF4D3A;
+							.unit{
+								font-size: 20rpx; 
+							}
+							.num{
+								font-weight: bold;
+								font-size: 36rpx;
+							}
+						}
+						.old-price{
+							font-weight: normal;
+							font-size: 24rpx;
+							color: #AAAAAA;
+							text-decoration: line-through;
+							margin-left: 16rpx;
+						}
+					}
+					.count-box{
+						display: flex;
+						align-items: center;
+						.num{
+							width: 100rpx;
+							text-align: center;
+							font-size: 28rpx;
+							color: #222222;
+						}
+						.btn{
+							width: 40rpx;
+							height: 40rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+	.modal-box{
+		.shop-name{
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #181818;
+			width: 100%;
+			text-align: center;
+		
+		}
+		.address{
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			margin-top: 4rpx;
+			width: 100%;
+			text-align: center;
+		}
+		
+		.notice{
+			margin-top: 20rpx;
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			text-align: center;
+		}
+	}
+	
+	.popup-goodsDetail{
+		padding-bottom: env(safe-area-inset-bottom);
+		.img{
+			width: 750rpx;
+			height: 400rpx;
+			vertical-align: bottom;
+		}
+		.box{
+			max-height: 60vh;
+			overflow: auto;
+		}
+		.popup-content{
+			padding: 0 24rpx;
+			.title{
+				font-weight: 800;
+				font-size: 32rpx;
+				color: #222222;
+				margin-top: 24rpx;
+			}
+			.desc{
+				font-size: 24rpx;
+				color: #222222;
+				margin: 24rpx 0;
+			}
+			.choose-box{
+				.choose-item{
+					.choose-title{
+						font-size: 28rpx;
+						color: #222222;
+					}
+					.item-box{
+						display: flex;
+						flex-wrap: wrap;
+						padding: 20rpx 0;
+						.item{
+							font-size: 24rpx;
+							color: #222222;
+							padding: 0 20rpx;
+							line-height: 44rpx;
+							height: 44rpx;
+							background: #fff;
+							border-radius: 8rpx 8rpx 8rpx 8rpx;
+							border: 2rpx solid #F0F0F0;
+							margin-right: 20rpx;
+							margin-bottom: 10rpx;
+						}
+						.item.active{
+							border: 2rpx solid #EE4320;
+							background: #FEECE8;
+						}
+					}
+				}
+			}
+		}
+		.btn-box{
+			padding: 20rpx 24rpx;
+			border-top: 1rpx solid #EEEEEE;
+			.order-info{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.left{
+					.price-box{
+						display: flex;
+						align-items: center;
+						.price{
+							font-weight: bold;
+							font-size: 28rpx;
+							color: #222222;
+						}
+						.old-price{
+							font-size: 22rpx;
+							color: #AAAAAA;
+							text-decoration: line-through;
+						}
+					}
+					.choose{
+						font-size: 20rpx;
+						color: #AAAAAA;
+						margin-top: 8rpx;
+					}
+				}
+				.count-box{
+					display: flex;
+					align-items: center;
+					.num{
+						width: 100rpx;
+						text-align: center;
+						font-size: 28rpx;
+						color: #222222;
+					}
+					.btn1{
+						width: 40rpx;
+						height: 40rpx;
+					}
+				}
+			}
+			.btn{
+				width: 702rpx;
+				height: 80rpx;
+				background: #EE4320;
+				font-weight: bold;
+				font-size: 28rpx;
+				color: #FFFFFF;
+				margin-top: 24rpx;
+			}
+		}
+	}
+}
+</style>

+ 301 - 0
orderFood/shopList.vue

@@ -0,0 +1,301 @@
+<template>
+	<view class="shopList">
+		<view class="step-box">
+			<view class="step-item" v-for="(item,index) in iconList" :key="index">
+				<view class="step-content">
+					<image class="icon" :src="item.icon" mode=""></image>
+					<view class="title">
+						{{item.title}}
+					</view>
+				</view>
+				<image v-if="index<3" class="arrow" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/raTdgnQlHfUu9455bbfe63b68d3de6aac3f0ace0f0fa.png/1.png" mode=""></image>
+			</view>
+		</view>
+		
+		<view class="search-box">
+			<view class="city" @click="chooseCity">
+				{{city}}
+				<image class="arrow" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zxcYhNinF6bA08f2a8a2c1cfcf4953f9f58d9e01fb65.png/1.png" mode=""></image>
+			</view>
+			<input class="search-input" @input="input" type="text" placeholder="请输入关键字搜索" v-model="query.jsonString['shop.shopName']" />
+		</view>
+		
+		<view class="tab-box">
+			<view class="tab-item" :class="[active == 1?'active':'']" @click="handleTab(1)">
+				<view class="title">
+					附近餐厅
+				</view>
+				<view class="num">
+					{{total}}
+				</view>
+			</view>
+			<!-- <view class="tab-item" :class="[active == 2?'active':'']" @click="handleTab(2)">
+				<view class="title">
+					收藏的餐厅
+				</view>
+				<view class="num">
+					99
+				</view>
+			</view> -->
+		</view>
+		
+		<zs-list mt="0" @load="loadMore" :status="status">
+			
+			<view class="shop-item" v-for="item in list" :key="item.id" @click="handleItem(item.pid)">
+				<view class="title">
+					{{item.title}}
+				</view>
+				
+				<view class="address">
+					{{item.address}}
+				</view>
+				<view class="distance-box">
+					<image class="icon" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/dcVu4aDpGqtEb448adf2015d6df676865bae8811712f.png/1.png" mode=""></image>
+					<view class="distance">
+						{{item.distance.toFixed(2)}}km
+					</view>
+				</view>
+			</view>
+		</zs-list>
+		
+		
+	</view>
+</template>
+
+<script>
+	import {debounce} from '@/utils/tool.js'
+	import {getFoodShopList} from '@/api/orderFood';
+	export default {
+		
+		data() {
+			return {
+				query:{
+					latitude: 30.57447,
+					longitude: 103.92377,
+					distance: 1000000000,
+					regionCode:'',
+					productType:'Restaurant',
+					jsonString:{ot:"XBK",'shop.shopName': ""},
+					page:0,
+					size:10
+				},
+				total:0,
+				search:'',
+				city:uni.getStorageSync('HomeCity')||uni.getStorageSync('city'),
+				status: 'more',
+				active:1,
+				list:[],
+				iconList:[
+					{
+						icon:'https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/i2UtMJa19SdPa7c5a75ed573099d17655f14438bca4a.png/1.png',
+						title:'选择门店'
+					},
+					{
+						icon:'https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/0z35goC7xh0k36fdd6deed90b8d46f37f4a28c399c48.png/1.png',
+						title:'选择饮品'
+					},
+					{
+						icon:'https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/GouemYUdFFqx399dd566771ccef15fe744ad8629b19c.png/1.png',
+						title:'等待取餐码'
+					},
+					{
+						icon:'https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zsWQBVQJo8DOe5778c87a4e22e574ad51e9c4a3ac0ed.png/1.png',
+						title:'到点取餐'
+					}
+				]
+			}
+		},
+		methods: {
+			input:debounce(function(val) {
+				this.status = 'more'
+				this.query.page = 0
+				this.list = []
+				this.getFoodShopList()
+			}),
+			loadMore() {
+				this.getFoodShopList()
+			},
+			handleTab(val ){
+				this.active = val
+			},
+			chooseCity(){
+				uni.navigateTo({
+					url:`/hotel/cityList?backUrl=/orderFood/shopList`
+				})
+			},
+			handleItem(id){
+				uni.navigateTo({
+					url:'/orderFood/shopDetail?id='+id
+				})
+			},
+			getFoodShopList(){
+				this.status = 'loading'
+				let query = JSON.parse(JSON.stringify(this.query))
+				if(!query.jsonString['shop.shopName']){
+					console.log(query);
+					delete query.jsonString['shop.shopName']
+				}
+				query.jsonString = JSON.stringify(query.jsonString)
+				getFoodShopList(query).then(res=>{
+					if(res.state = 'Success'){
+						console.log(res);
+						this.list = this.list.concat(res.content.content)
+						this.total = res.content.totalElements
+						if(this.list.length >= res.content.totalElements){
+							this.status = 'noMore'
+						}else{
+							this.status = 'more'
+							this.query.page++
+						}
+					}
+				})
+			}
+		},
+		onLoad(options){
+			// this.query.regionCode = options.regionCode||uni.getStorageSync('regionCode')
+			if(options.regionCode){
+				this.city = uni.getStorageSync('HomeCity')
+				this.query.regionCode = options.regionCode
+			}else{
+				this.query.regionCode = uni.getStorageSync('regionCode')
+				this.city = uni.getStorageSync('city')
+			}
+			this.query.jsonString.ot = uni.getStorageSync('ot')
+			
+			let location = JSON.parse(uni.getStorageSync('location')) 
+			this.query.latitude = location.latitude
+			this.query.longitude = location.longitude
+			
+		}
+	}
+</script>
+
+<style lang="scss" >
+.shopList{
+	background: #F9F9F9;
+	min-height: 100vh;
+	.step-box{
+		display: flex;
+		justify-content: space-between;
+		background: #FFFFFF;
+		border-radius: 0rpx 0rpx 40rpx 40rpx;
+		padding: 28rpx 60rpx;
+		.step-item{
+			display: flex;
+			align-items: center;
+			.step-content{
+				text-align: center;
+				.icon{
+					width: 80rpx;
+					height: 80rpx;
+				}
+				.title{
+					font-size: 24rpx;
+					color: #222222;
+					margin-top: 20rpx;
+				}
+			}
+			.arrow{
+				width: 70rpx;
+				height: 6rpx;
+				margin-top: -55rpx;
+			}
+		}
+	}
+	.search-box{
+		display: flex;
+		align-items: center;
+		height: 72rpx;
+		background: #FFFFFF;
+		border-radius: 40rpx 40rpx 40rpx 40rpx;
+		margin: 0 24rpx;
+		padding: 12rpx 24rpx;
+		box-sizing: border-box;
+		margin-top: 32rpx;
+		.city{
+			display: flex;
+			align-items: center;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+			padding-right: 14rpx;
+			border-right:2rpx solid #F0F0F0;
+			.arrow{
+				width: 48rpx;
+				height: 48rpx;
+			}
+		}
+		.search-input{
+			flex: 1;
+			padding: 0 20rpx;
+		}
+	}
+	.tab-box{
+		display: flex;
+		align-items: center;
+		.tab-item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex: 1;
+			padding: 28rpx 0;
+			.title{
+				font-weight: bold;
+				font-size: 36rpx;
+				color: #222222;
+			}
+			.num{
+				color: #fff;
+				font-size: 24rpx;
+				min-width: 28rpx;
+				text-align: center;
+				height: 28rpx;
+				line-height: 28rpx;
+				padding: 2rpx 6rpx;
+				border-radius: 14rpx;
+				background: #AAAAAA;
+				box-sizing: border-box;
+			}
+		}
+		.tab-item.active{
+			.num{
+				background: #FF4D3A;
+			}
+		}
+	}
+	
+	.zs-list{
+		margin: 0 24rpx;
+		.shop-item{
+			padding: 28rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			margin-bottom: 20rpx;
+			.title{
+				font-weight: 800;
+				font-size: 32rpx;
+				color: #222222;
+			}
+			.address{
+				font-size: 24rpx;
+				color: #AAAAAA;
+				margin-top: 16rpx;
+			}
+			.distance-box{
+				display: flex;
+				align-items: center;
+				margin-top: 16rpx;
+				.icon{
+					width: 28rpx;
+					height: 28rpx;
+				}
+				.distance{
+					font-size: 24rpx;
+					color: #222222;
+					margin-left: 4rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 12 - 0
pages.json

@@ -717,6 +717,18 @@
 			"pages": [
 				{
 					"path": "index",
+					"style": {
+						"navigationBarTitleText": "特惠点餐"
+					}
+				},
+				{
+					"path": "shopList",
+					"style": {
+						"navigationBarTitleText": "特惠点餐"
+					}
+				},
+				{
+					"path": "shopDetail",
 					"style": {
 						"navigationBarTitleText": "点餐"
 					}

+ 2 - 1
pages/index/index.vue

@@ -428,9 +428,10 @@
 					url = '/detail/virtualGoods/index'
 				    console.log('餐厅');
 				} else if (item.productType === 'RestaurantFood') {
-					url = '/orderFood/index'
+					url = '/orderFood/shopDetail'
 					id = item.meta.menus.shop.id
 					cateName = item.meta.menus.cate_name
+					uni.setStorageSync('ot',item.meta.ot)
 				    console.log('大牌点餐');
 				} else if (item.productType === 'CarMaintain') {
 					url = '/detail/discountsDetail/index'