Browse Source

no message

WIN-2CJ8FMUT9OF\Administrator 7 months ago
parent
commit
18755b55f8
76 changed files with 1896 additions and 7184 deletions
  1. 1 1
      components/en-utils/en-blank/en-blank.vue
  2. 11 3
      components/en-utils/new-nav/new-nav.vue
  3. 3 1
      manifest.json
  4. 0 121
      pages-address/address.vue
  5. 0 289
      pages-address/edit-add.vue
  6. 0 228
      pages-address/select-school.vue
  7. 0 178
      pages-my/rider-recruit.vue
  8. 0 623
      pages-order/express-info.vue
  9. 0 465
      pages-order/group-info.vue
  10. 0 428
      pages-order/laundry-info.vue
  11. 0 155
      pages-order/module/select-address.vue
  12. 0 577
      pages-order/run-errands-info.vue
  13. 22 10
      pages-order/takeout-info.vue
  14. 0 406
      pages-order/ticket-info.vue
  15. 3 3
      pages-school/school-circle.vue
  16. 1 38
      pages-takeout/goods-order.vue
  17. 1159 1144
      pages-takeout/new-shop.vue
  18. 436 430
      pages-takeout/new-specs-info.vue
  19. 0 920
      pages-takeout/shop-mod/new-menu.vue
  20. 5 175
      pages.json
  21. 0 438
      pages/chat/index.vue
  22. 0 408
      pages/chat/msg-item.vue
  23. 22 11
      pages/order/index.vue
  24. 136 130
      service/ajax.js
  25. BIN
      static/img/order-food/add-img.png
  26. BIN
      static/img/order-food/db-img.png
  27. BIN
      static/img/order-food/fx.png
  28. BIN
      static/img/order-food/gwc-img.png
  29. BIN
      static/img/order-food/order-bg.png
  30. BIN
      static/img/order-food/qd-bg.png
  31. BIN
      static/img/order-food/qk-icon.png
  32. BIN
      static/img/order-food/reduce-img.png
  33. BIN
      static/img/order-food/right-b.png
  34. BIN
      static/img/order-food/right-h.png
  35. BIN
      static/img/order-food/rm-img.png
  36. BIN
      static/img/order-food/shop-icon.png
  37. BIN
      static/img/order-food/shop-search.png
  38. BIN
      static/img/order-food/shop-top.png
  39. BIN
      static/img/order-food/shp-list.png
  40. BIN
      static/img/order-food/ss-bg.png
  41. BIN
      static/img/order-food/ss-icon.png
  42. BIN
      static/img/order-food/tj-img.png
  43. BIN
      static/img/order-food/ts-img.png
  44. BIN
      static/img/order-food/wx-icon.png
  45. BIN
      static/img/order-food/zh-icon.png
  46. BIN
      static/img/order-food/zh-img.png
  47. BIN
      static/img/order-food/zz-icon.png
  48. BIN
      static/img/order/bg.png
  49. BIN
      static/img/order/lxkf.png
  50. BIN
      static/img/order/lxsj.png
  51. BIN
      static/img/order/qxdd.png
  52. BIN
      static/img/order/qzf.png
  53. BIN
      static/img/order/tk.png
  54. BIN
      static/img/order/top.png
  55. BIN
      static/img/order/xgdd.png
  56. BIN
      static/img/order/yhq.png
  57. BIN
      static/img/order/zlyd.png
  58. BIN
      static/img/school/add.png
  59. BIN
      static/img/school/bg.png
  60. BIN
      static/img/school/dian.png
  61. BIN
      static/img/school/fs.png
  62. BIN
      static/img/school/fx.png
  63. BIN
      static/img/school/hot.png
  64. BIN
      static/img/school/icon.png
  65. BIN
      static/img/school/info.png
  66. BIN
      static/img/school/ts.png
  67. BIN
      static/img/takeout/add.png
  68. BIN
      static/img/takeout/all.png
  69. BIN
      static/img/takeout/buy-icon.png
  70. BIN
      static/img/takeout/ddd.png
  71. BIN
      static/img/takeout/dq-bg.png
  72. BIN
      static/img/takeout/info-class.png
  73. BIN
      static/img/takeout/j.png
  74. BIN
      static/img/takeout/qu-icon.png
  75. BIN
      static/img/takeout/quan-bg.png
  76. 97 2
      utils/cartStore.js

+ 1 - 1
components/en-utils/en-blank/en-blank.vue

@@ -62,7 +62,7 @@
   @import url("../../static/css/en-common.css") ;
 	.blank-page {
 		// width: 100vw;
-		padding-top: 200rpx;
+		padding-top: 8%;
 		z-index: 2;
 		display: flex;
 		flex-direction: column;

+ 11 - 3
components/en-utils/new-nav/new-nav.vue

@@ -60,6 +60,7 @@
 </template>
 
 <script>
+	import tools from '@/service/tools'
 	const app = getApp()
 	import {
 		systemInfo
@@ -179,9 +180,16 @@
 		},
 		methods: {
 			backEvent() {
-				uni.navigateBack({
-					delta: 1
-				})
+				let pages = getCurrentPages();
+				if (pages.length > 1) {
+					uni.navigateBack({
+						delta: 1
+					})
+				} else {
+					uni.reLaunch({
+						url: '/pages-takeout/new-shop'
+					});
+				}
 			}
 		},
 		created() {

+ 3 - 1
manifest.json

@@ -65,7 +65,9 @@
         "appid" : "wx57e3dfdd696f1861",
         "setting" : {
             "urlCheck" : false,
-            "minified" : true
+            "minified" : true,
+            "postcss" : true,
+            "es6" : true
         },
         "optimization" : {
             "subPackages" : true

+ 0 - 121
pages-address/address.vue

@@ -1,121 +0,0 @@
-<template>
-	<view class="address-index flex-common-css box-border-box iPhone-bottom">
-		<Nav title="地址管理"></Nav>
-		
-		
-		<view v-if="list.length === 0" class="scroll-view-css">
-			<EnBlank :customSrc='true'>
-				<template v-slot:blankImg>
-					<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
-				</template>
-			</EnBlank>
-		</view>
-		<view v-else class="scroll-view-css box-border-box p-24">
-			<view class="list-box box-border-box p-24" v-for="(item,i) in list" :key="i" @click.stop="to(1,item)">
-				<view class=" mb-8 display-flex">
-					<view class="fs-34 fw-500 mr-10 w-556">
-						<span v-if="item.is_default == 1" class="list-box-only fs-24 fc-FF7F00 text-align-center">默认</span>
-						{{item.school_name}}{{item.dorm_name}}{{item.address}}
-					</view>
-				</view>
-				<view class="w-520 fs-26 fc-9 align-items-center">
-					<view class="fs-24 fc-9 mr-24">{{item.consignee}}</view>
-					<view class="fs-24 fc-9">{{item.phone}}</view>
-				</view>
-				
-				<image src="@/static/img/common/edit.png" mode=""></image>
-				
-			</view>
-		</view>
-		
-		<view class="box-border-box p-24 bgc-f" @click="to(2)">
-			<view class="add-box text-align-center fs-34 fc-f">新增地址</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {getAddressList} from '@/api/member.js'
-	import EnBlank from "@/components/en-utils/en-blank/en-blank";
-	import tools from "@/service/tools.js";
-	export default {
-		components:{EnBlank,},
-		data(){
-			return{
-				list:[],
-			}
-		},
-		onShow() {
-			this.list = [];
-			this.getList();
-		},
-		methods:{
-			getList(){
-				getAddressList().then((res)=>{
-					if(res.code === 1){
-						this.list = res.data;
-					}
-				})
-			},
-			
-			to(type,item){
-				if(type === 1){
-					uni.navigateTo({
-						url:"pages-address/edit-add?id=" + item.id
-					})
-				}else{
-					uni.navigateTo({
-						url:"pages-address/edit-add"
-					})
-				}
-			},
-		},
-	}
-</script>
-
-<style scoped lang="scss">
-	.address-index{
-		.w-556{
-			width: 556rpx;
-		}
-		.w-520{
-			width: 570rpx;
-		}
-		.add-box{
-			width: 100%;
-			height: 80rpx;
-			line-height: 80rpx;
-			background-color: #2F80ED;
-			border-radius: 200rpx;
-			
-		}
-		.list-box{
-			background: #FFFFFF;
-			border-radius: 20rpx;
-			margin-bottom: 24rpx;
-			position: relative;
-			
-			image{
-				width: 48rpx;
-				height: 48rpx;
-				position: absolute;
-				top: 42rpx;
-				right: 40rpx;
-			}
-			.del-icon{
-				position: absolute;
-				top: 45rpx;
-				right: 0;
-			}
-			.list-box-only{
-				padding: 0 8rpx;
-				height: 34rpx;
-				line-height: 34rpx;
-				border-radius: 8rpx;
-				border: 2rpx solid #FE9E11;
-				margin-right: 8rpx;
-			}
-		}
-		
-	}
-</style>

+ 0 - 289
pages-address/edit-add.vue

@@ -1,289 +0,0 @@
-<template>
-	<view class="edit-add-index flex-common-css box-border-box iPhone-bottom">
-		<Nav :title="fromData.id?'编辑地址':'新增地址'"></Nav>
-
-		<view class="scroll-view-css box-border-box p-24">
-
-			<view class="box-card box-border-box p-24 mb-20">
-				<EnInput label="收货人" placeholder="请输入收货人姓名" v-model="fromData.consignee"></EnInput>
-				<EnInput label="电话号码" type="number" placeholder="请输入电话号码" v-model="fromData.phone"></EnInput>
-
-				<EnSelect v-if="schoolList.length > 0" label="收货学校" placeholder="请选择收货学校"
-					v-model="fromData.dorm_school_id" :localData="schoolList" :valueType="'1'" @upValue=upValue>
-				</EnSelect>
-
-				<EnSelect label="楼栋" placeholder="请选择楼栋" v-if="isDorm" v-model="fromData.dorm_id" :localData="builList"
-					:valueType="'1'"></EnSelect>
-
-				<EnInput label="详细地址" placeholder="请输入详细地址" v-model="fromData.address"></EnInput>
-			</view>
-
-			<view class="box-card box-border-box p-24 flex-justify-space">
-				<view class="">
-					<view class="fs-30 mb-16">设为默认地址</view>
-					<view class="fs-24 fc-9">提醒:下单会优先使用该地址</view>
-				</view>
-				<view class="r-right" @click="fromData.is_default == 1?fromData.is_default=0:fromData.is_default=1"
-					:class="fromData.is_default == 0?'n-r':'s-r'">
-					<view class="r-y"></view>
-				</view>
-			</view>
-		</view>
-
-		<view class="box-border-box p-24 bgc-f ">
-			<view class="add-box text-align-center fs-34 fc-f mb-20" @click="save()">确定</view>
-			<view v-if="fromData.id" class="add-box-1 text-align-center fs-34 fc-41ABF5" @click="del()">删除</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		getAddressInfo,
-		saveAddress,
-		delAddress,
-		getAddressSchool,
-		getAddressDorm
-	} from '@/api/member.js'
-	import tools from "@/service/tools.js";
-	import EnSelect from "@/components/en-from/en-select/en-select";
-	import EnInput from "@/components/en-from/en-input/en-input";
-	export default {
-		components: {
-			EnInput,
-			EnSelect,
-		},
-		data() {
-			return {
-				radioData: [{
-						'id': '0',
-						'name': '否'
-					},
-					{
-						'id': '1',
-						'name': '是'
-					}
-				],
-				fromData: {
-					id: '',
-					address: '',
-					is_default: 0,
-					consignee: '',
-					phone: '',
-					dorm_id: '',
-					dorm_school_id: '',
-					school_name: '',
-				},
-				schoolList: [],
-				builList: [],
-				isAJAX: false,
-				isDorm: false,
-				time: '',
-				selectId: false,
-				a: 1
-			}
-		},
-		onLoad(e) {
-			if (e.id) {
-				this.selectId = true
-				this.getInfo(e.id)
-			} else {
-				this.fromData.id = '';
-				this.getAddressSchool();
-			}
-		},
-		watch: {
-			'fromData.dorm_school_id': {
-				handler(newval, old) {
-					console.log(old, 'old');
-					console.log(newval, 'newval');
-					if (newval != old && !this.selectId) {
-						this.fromData.dorm_id = ''
-					}
-					this.getAddressDorm()
-				},
-				immediate: true, // 立即执行
-			}
-		},
-		methods: {
-			upValue(val) {
-				// if (this.selectId) {
-				// this.fromData.dorm_id = ''
-				// this.fromData.dorm_id = val+ ''
-				// }
-				// this.getAddressDorm()
-			},
-			getInfo(id) {
-				getAddressInfo({
-					id: id
-				}).then((res) => {
-					if (res.code === 1) {
-						this.fromData.id = res.data.id;
-						this.fromData.address = res.data.address;
-						this.fromData.consignee = res.data.consignee;
-						this.fromData.is_default = res.data.is_default;
-						this.fromData.phone = res.data.phone;
-						this.fromData.school_name = res.data.school_name;
-						this.fromData.dorm_school_id = res.data.school_id + '';
-						this.fromData.dorm_id = res.data.dorm_id + '';
-						this.getAddressSchool();
-					}
-				})
-			},
-			getAddressSchool() {
-				let operate_id = uni.getStorageSync('operate_id');
-				getAddressSchool({
-					operate_id: operate_id
-				}).then((res) => {
-					if (res.code === 1) {
-						this.schoolList = res.data.map(obj => {
-							const {
-								school_id,
-								school_name
-							} = obj;
-							return {
-								value: school_id + '',
-								text: school_name
-							};
-						});
-					}
-				})
-			},
-			getAddressDorm() {
-				getAddressDorm({
-					dorm_school_id: this.fromData.dorm_school_id
-				}).then((res) => {
-					if (res.code === 1) {
-						this.builList = res.data.map(obj => {
-							const {
-								dorm_id,
-								name,
-								type_str
-							} = obj;
-							return {
-								value: dorm_id + '',
-								text: name + '(' + type_str + ')'
-							};
-						});
-						this.isDorm = true
-						this.selectId = false
-					}
-				})
-			},
-			save() {
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				saveAddress(this.fromData).then((res) => {
-					if (res.code === 1) {
-						tools.success('操作成功');
-						this.isAJAX = false;
-						setTimeout(() => {
-							uni.navigateBack({
-								delta: 1
-							});
-							let addressData = {
-								flag: true,
-								is_default: this.fromData.is_default,
-								id: this.fromData.id
-							}
-							uni.setStorageSync('isConfirmAddressFlag', addressData);
-						}, 1500)
-					} else {
-						tools.error(res.msg);
-						this.isAJAX = false;
-					}
-				})
-			},
-			del() {
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				delAddress({
-					id: this.fromData.id
-				}).then((res) => {
-					if (res.code === 1) {
-						tools.success('操作成功');
-						this.isAJAX = false;
-						setTimeout(() => {
-							uni.reLaunch({
-								url: '/pages-address/address'
-							})
-						}, 1500)
-					} else {
-						tools.error(res.msg);
-						this.isAJAX = false;
-					}
-				})
-			},
-		},
-	}
-</script>
-
-<style scoped lang="scss">
-	.edit-add-index {
-		.add-box {
-			width: 100%;
-			height: 80rpx;
-			line-height: 80rpx;
-			background-color: #2F80ED;
-			border-radius: 200rpx;
-		}
-
-		.add-box-1 {
-			width: 100%;
-			height: 88rpx;
-			line-height: 88rpx;
-			background: #FFFFFF;
-			border-radius: 200rpx 200rpx 200rpx 200rpx;
-			box-sizing: border-box;
-			border: 2rpx solid #41ABF5;
-		}
-
-		.box-card {
-			width: 1005;
-			min-height: 152rpx;
-			background: #FFFFFF;
-			border-radius: 20rpx;
-		}
-
-		.r-right {
-			margin-top: 24rpx;
-			width: 88rpx;
-			height: 52rpx;
-			border-radius: 200rpx;
-			position: relative;
-
-			.r-y {
-				width: 44rpx;
-				height: 44rpx;
-				background: #FFFFFF;
-				border-radius: 200rpx;
-				position: absolute;
-				top: 4rpx;
-			}
-		}
-
-		.s-r {
-			background-color: #41ABF5;
-			transition: all 1s;
-
-			.r-y {
-				right: 4rpx !important;
-				transition: all 1s;
-			}
-		}
-
-		.n-r {
-			background-color: #ccc;
-			transition: all 1s;
-
-			.r-y {
-				left: 4rpx !important;
-				transition: all 1s;
-			}
-		}
-	}
-</style>

+ 0 - 228
pages-address/select-school.vue

@@ -1,228 +0,0 @@
-<template>
-	<view class="select-school-index iPhone-bottom flex-common-css box-border-box">
-		<Nav  :leftShow='leftShow' title='选择学校'></Nav>
-		
-		<view class="bgc-f box-border-box p-24 mb-20">
-			<view class="head-search mb-32">
-				<input v-model="fromData.search" type="text" placeholder="搜索学校名称">
-				<view class="fs-28 fc-f index-search-box-buttom" @click="search()">搜索</view>
-			</view>
-			
-			<view class="head-address display-flex" v-if="schoolData.school_name">
-				<image class="wh-48" src="@/static/img/index/dw.png" mode=""></image>
-				<view class="ml-16">
-					<view class="fs-36 fw-600 mb-12">{{schoolData.school_name||''}}</view>
-				</view>
-			</view>
-		</view>
-		
-		<view class="box-border-box p-24 fs-28 fc-9 bgc-f">其他学校</view>
-		
-		<view class="scroll-view-css" v-if="list.length == 0">
-			<EnBlank message="没有找到你搜索的学校"></EnBlank>
-		</view>
-		<scroll-view v-else scroll-y="true" class="scroll-view-css bgc-f box-border-box plr-32" @scrolltolower="scrolltolower">
-			
-			<view class="item-box fs-32 fw-400" v-for="(item,i) in list" :key="i" @click="selectSchool(item)">
-				{{item.school_name}}
-			</view>
-		</scroll-view>
-		
-		<!-- <uni-popup ref="popup" type="bottom">
-			<view class="pop-coupon box-border-box p-24">
-				<view class="text-align-center fs-36 fw-600 box-title mb-32">
-					请选择楼栋
-					<uni-icons @click="closePop" class="box-close" type="closeempty" size="20"></uni-icons>
-				</view>
-				<view class="head-search mb-32">
-					<input type="text" placeholder="搜索楼栋名称">
-					<view class="fs-28 fc-f index-search-box-buttom">搜索</view>
-				</view>
-				
-				<view class="scroll-view-css">
-					<view class="item-box item-box-f fs-32 fw-400" 
-					v-for="(item,i) in 20" :key="i" :class="id == i?'fc-41ABF5':''">
-						<image src="@/static/img/common/y-select.png" mode=""></image>
-						楼栋1
-					</view>
-				</view>
-			</view>
-		</uni-popup> -->
-	</view>
-</template>
-
-<script>
-	import EnBlank from '@/components/en-utils/en-blank/en-blank.vue';
- 	import {getSchoolList} from '@/api/common.js';
-	import tools from "@/service/tools";
-	export default {
-		components:{EnBlank},
-		data(){
-			return{
-				indexType:1,//1首页 2校友圈
-				leftShow:true,
-				id:0,
-				
-				total:0,
-				list:[],
-				fromData:{
-					search:'',
-					page:1,
-				},
-				schoolData:{
-					school_name:'',
-				},
-			}
-		},
-		onLoad(e) {
-			this.indexType = Number(e.type);
-		},
-		onShow() {
-			let school_id = uni.getStorageSync('school_id');
-			let operate_id = uni.getStorageSync('operate_id');
-			let school_name = uni.getStorageSync('school_name');
-			let circleSchoolId = uni.getStorageSync('circleSchoolId');
-			let circleSchoolName = uni.getStorageSync('circleSchoolName');
-			
-			if(!school_id||!operate_id){
-				this.leftShow = false;
-			}else{
-				this.leftShow = true;
-				if(this.indexType == 1){
-					this.schoolData.school_name = school_name;
-				}else{
-					this.schoolData.school_name = circleSchoolId?circleSchoolName:school_name;
-				}
-				
-			}
-			this.list = [];
-			this.fromData.page = 1;
-			this.fromData.search = '';
-			this.getList();
-		},
-		methods:{
-			getList(){
-				getSchoolList(this.fromData).then((res)=>{
-					if(res.code === 1){
-						this.list = [...this.list,...res.data.items];
-						this.total = res.data.total;
-					}
-				})
-			},
-			scrolltolower(){
-				if(this.list.length < this.total){
-					this.fromData.page += 1;
-					this.getList();
-				}
-			},
-			
-			search(){
-				this.list = [];
-				this.fromData.page = 1;
-				this.getList();
-			},
-			
-			selectSchool(item){
-				if(this.indexType == 2){
-					uni.setStorageSync('circleSchoolId',item.school_id);
-					uni.setStorageSync('circleSchoolName',item.school_name);
-				}else{
-					uni.setStorageSync('school_id',item.school_id);
-					uni.setStorageSync('operate_id',item.operate_id);
-					uni.setStorageSync('school_name',item.school_name);
-					
-					uni.removeStorageSync('site_id')
-					uni.removeStorageSync('site_name')
-					uni.removeStorageSync('site_address')
-					uni.removeStorageSync('site_logo')
-				}
-				if(this.leftShow){
-					if(this.indexType == 1){
-						uni.switchTab({
-							url:'/pages/index/index'
-						})
-					}else{
-						// 跳转校友圈
-						uni.$emit('operateType', true);
-						uni.navigateBack({
-							delta: 1,
-						});
-					}
-				}else{
-					uni.switchTab({
-						url:'/pages/index/index'
-					})
-				}
-			},
-		},
-	}
-</script>
-
-
-<style scoped lang="scss">
-	.wh-48 {
-		width: 48rpx;
-		height: 48rpx;
-	}
-	.select-school-index{
-		.head-search{
-			position: relative;
-			input{
-				width: 100%;
-				height: 72rpx;
-				background: #F4F5F7;
-				border-radius: 200rpx;
-				font-size: 32rpx;
-				box-sizing: border-box;
-				padding: 0 130rpx 0 24rpx;
-			}
-			.index-search-box-buttom{
-				position: absolute;
-				right: 6rpx;
-				top: 6rpx;
-				width: 120rpx;
-				height: 60rpx;
-				background: linear-gradient( 90deg, #57CAFF 0%, #41ABF5 100%);
-				border-radius: 200rpx;
-				margin-left: auto;
-				line-height: 60rpx;
-				text-align: center;
-			}
-		}
-		.item-box{
-			box-sizing: border-box;
-			padding: 24rpx 0;
-			border-bottom: 1rpx solid #eee;
-		}
-		.item-box-f{
-			width: 100%;
-			position: absolute;
-			box-sizing: border-box;
-			padding-left: 60rpx;
-			image{
-				width: 40rpx;
-				height: 40rpx;
-				position: absolute;
-				left: 0;
-				top: 28rpx;
-			}
-		}
-		.pop-coupon{
-			width: 100%;
-			height: 70vh;
-			background-color: #fff;
-			border-radius: 24rpx 24rpx 0rpx 0rpx;
-			padding-top: 32rpx !important;
-			display: flex;
-			flex-direction: column;
-			.box-title{
-				position: relative;
-				.box-close{
-					position: absolute;
-					right: 22rpx;
-				}
-			}
-			
-		}
-	}
-</style>

+ 0 - 178
pages-my/rider-recruit.vue

@@ -1,178 +0,0 @@
-<template>
-	<view class="flex-common-css iPhone-bottom box-border-box">
-		<Nav title="骑手招聘" titleColor="#333" bgckgroundBox='#fff'></Nav>
-		<scroll-view :scroll-y="true" class="scroll-view-css content-box">
-			<image class="zp-bg" src="@/static/img/my/zp.png" mode=""></image>
-			<view class="info-box box-border-box">
-				<image class="sxnr mb-32" src="@/static/img/my/sxnr.png" mode=""></image>
-				<image class="jrlc mb-48" src="@/static/img/my/jrlc.png" mode=""></image>
-				<view class="title-box fs-36 fc-3 fw-b text-align-center mb-24">
-					校园实习生申请表
-				</view>
-				<view class="bgc-f b-rad-20 card-box box-border-box p-24">
-					<EnRadio label='性别' :radioData='radioData' v-model="fromData.sex"></EnRadio>
-					
-					<view class="box-input align-items-center box-border-box p-b-20">
-						<view class="fs-32 fw-400 w158">手机号</view>
-						<input v-model="fromData.phone" type="number" placeholder="请输入手机号">
-						
-					</view>
-					<view class="box-input align-items-center box-border-box p-b-20">
-						<view class="fs-32 fw-400 w158">验证码</view>
-						<input v-model="fromData.code" type="number" placeholder="请输入验证码">
-						<view class="fs-28 fc-41ABF5 code-box" @click="getCode()">{{codeText}}{{isCode?'s':''}}</view>
-					</view>
-				</view>
-				
-				
-			</view>
-		</scroll-view>
-		
-		<view class="bot-box bgc-f" @click="save()">
-			<view class="bot-but fc-f fs-32 text-align-center b-rad-200 bgc-4FB3EF">
-				提交
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import EnRadio from '@/components/en-from/en-radio/en-radio.vue';
-	import {getCode,setRiderApply} from '@/api/common.js';
-	import tools from "@/service/tools";
-	export default {
-		components: {EnRadio,},
-		data() {
-			return {
-				isCode:false,
-				isAJAX:false,
-				codeText:'获取验证码',
-				fromData:{
-					sex:'',
-					phone:'',
-					school_id:'',
-					code:'',
-				},
-				radioData:[{name:"男",id:1},{name:"女",id:2},],
-			};
-		},
-		
-		methods: {
-			getCode(){
-				if(!this.fromData.phone){
-					return tools.error('请输入手机号')
-				}
-				if (this.isCode) {
-					return
-				}
-				this.isCode = true;
-				getCode({phone:this.fromData.phone,send_type:'rider_apply'}).then((res)=>{
-					if(res.code === 1){
-						this.codeText = 60;
-						let timer = setInterval(() => {
-						  this.codeText -= 1;
-						  if (this.codeText <= 0) {
-						    clearInterval(timer);
-							this.isCode = false;
-							this.codeText = '获取验证码'
-						  }
-						}, 1000);
-					}else{
-						this.isCode = false;
-						tools.error('获取验证码失败,请稍后重试')
-					}
-				})
-			},
-			save(){
-				if(this.isAJAX){
-					return
-				}
-				this.isAJAX = true;
-				
-				this.fromData.school_id = uni.getStorageSync('school_id');
-				setRiderApply(this.fromData).then((res)=>{
-					if(res.code === 1){
-						this.isAJAX = false;
-						tools.success('提交成功');
-						setTimeout(()=>{
-							uni.reLaunch({
-								url:'/pages/me/index'
-							})
-						},1500)
-						
-					}else{
-						this.isAJAX = false;
-						tools.error(res.msg);
-					}
-				})
-			},
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.bot-box {
-		width: 100%;
-		padding: 12rpx 32rpx;
-		box-sizing: border-box;
-	
-		.bot-but {
-			width: 100%;
-			height: 92rpx;
-			line-height: 92rpx;
-		}
-	}
-	.card-box{
-		width: 100%;
-		min-height: 200rpx;
-	}
-	.box-input{
-		padding-top: 34rpx;
-		padding-bottom: 34rpx;
-		border-bottom: 2rpx solid #F0F0F0;
-		position: relative;
-		.w158{
-			width: 210rpx;
-		}
-		input{
-			font-size: 32rpx;
-		}
-		.code-box{
-			position: absolute;
-			right: 0;
-			top: 34rpx;
-		}
-	}
-	
-.content-box{
-	position: relative;
-}
-.zp-bg{
-	position: absolute;
-	left: 0;
-	top: 0;
-	width: 100%;
-	height: 1448rpx;
-	z-index: 0;
-}
-.info-box{
-	padding: 436rpx 32rpx 0;
-	position: relative;
-	z-index: 1;
-}
-.sxnr{
-	width: 448rpx;
-	height: 98rpx;
-}
-.jrlc{
-	width: 684rpx;
-	height: 142rpx;
-}
-.title-box{
-	width: 320rpx;
-	height: 72rpx;
-	line-height: 72rpx;
-	background: linear-gradient( 90deg, #43AFF6 0%, rgba(161,255,227,0.4) 26%, #DAE6FF 100%);
-	border-radius: 12rpx;
-}
-</style>

+ 0 - 623
pages-order/express-info.vue

@@ -1,623 +0,0 @@
-<template>
-	<view class="flex-common-css">
-		<Nav title=" " leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
-		<image class="bg-img" src="@/static/img/order/bg.png" mode=""></image>
-		<view class="p-24-24-0 box-border-box">
-			<view class="mb-24" v-if="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
-					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
-				</view>
-				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
-				</view>
-			</view>
-			<view class="mb-24" v-else>
-				<view class="fs-48 fc-3 fw-600">
-					{{infoData.order_status_str}}
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box">
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
-					请尽快支付
-				</view>
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 4">
-					感谢你对君子校园的信任,期待你再次光临
-				</view>
-				<view class="align-items-center flex-wrap-wrap">
-					<view class="w-33 flex-direction align-items-center" @click="pay"
-						v-show="infoData.order_status == 1">
-						<image class="mb-4 icon" src="@/static/img/order/qzf.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							去支付
-						</view>
-					</view>
-					<!-- 					<view @click="setAddress" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 1 || infoData.order_status == 2">
-						<image class="mb-4 icon" src="@/static/img/order/xgdd.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							修改收货地址
-						</view>
-					</view> -->
-					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 4 || infoData.order_status == 6 || infoData.order_status == 5">
-						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							再来一单
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center">
-						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							联系客服
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center" v-show="infoData.order_status == 2"
-						@click="cancelOrder">
-						<image class="mb-4 icon" src="@/static/img/order/qxdd.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							取消订单
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="p-24-24-0 box-border-box">
-			<view class="p-24 box-border-box bgc-f b-rad-20">
-				<view class="fs-28 fc-3 fw-600 mb-16">
-					取件码
-				</view>
-				<view class="b-rad-12 p-24 box-border-box bgc-F3F4F6 align-items-center flex-wrap-wrap">
-					<view class="item-code text-align-center" v-for="(item,index) in infoData.pickup_code">
-						{{item}}
-					</view>
-				</view>
-			</view>
-		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one mb-24">
-					{{infoData.site.name}}
-				</view>
-				<view class="goods-box" :class="infoData.item.length >= 4 && goodsShow?'goodsShowOne':'goodsShowTwo'">
-					<view class="align-items-center flex-justify-space mb-20" v-for="(item,index) in infoData.item">
-						<image class="goods-img mr-16" :src="item.goods_img" mode=""></image>
-						<view class="">
-							<view class="align-items-center flex-justify-space mb-2">
-								<view class="fs-28 fc-3 w-376 text-overflow-ellipsis-one mr-36">
-									{{item.goods_name}}
-								</view>
-								<view class="fs-32 fc-3 fw-600">
-									¥{{(Number(item.goods_price)*Number(item.goods_number)).toFixed(2)}}
-								</view>
-							</view>
-							<!-- 				<view class="mb-2 fs-24 fc-9">
-								{{item.goods_name}}
-							</view> -->
-							<view class="fs-24 fc-9">
-								x{{item.goods_number}}
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-center p-24 b-b-F9F9F9 mb-32" @click="openGoods"
-					v-if="infoData.item.length > 4">
-					<view class="fs-24 fc-9 mr-4">
-						{{goodsShow?'展开':'收起'}}{{infoData.item.length - 4}}件商品
-					</view>
-					<image v-if="goodsShow" class="icon-right" src="@/static/img/order/top.png" mode=""></image>
-					<image v-else class="icon-right" src="@/static/img/order/bottom.png" mode=""></image>
-				</view>
-				<!-- 				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						打包费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						配送费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view> -->
-				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
-					<view class="align-items-center">
-						<image class="mr-6 icon-right" src="@/static/img/order/yhq.png" mode=""></image>
-						<view class="fs-28 fc-3">
-							优惠券
-						</view>
-					</view>
-					<view class="fs-32 fc-FB3D03">
-						-¥{{infoData.coupon_money}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-end">
-					<view class="fs-28 fc-9">
-						共{{infoData.goods_number}}件,
-					</view>
-					<view class="fs-28 fc-3">
-						金额
-					</view>
-					<view class="fs-24 fw-600 fc-3">
-						¥
-					</view>
-					<view class="fs-36  fw-600 fc-3">
-						{{infoData.pay_money}}
-					</view>
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						配送地址
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.school_name}}{{infoData.dorm_name}}{{infoData.address}}{{infoData.consignee}}{{infoData.phone}}
-					</view>
-				</view>
-				<!-- 				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						配送时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						预约配送
-					</view>
-				</view> -->
-				<view class="display-flex flex-justify-space pb-20 b-b-F9F9F9 mb-26">
-					<view class="fs-28 fc-9">
-						骑手信息
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.rider.rider_name?infoData.rider.rider_name:'无'}}{{infoData.rider.phone}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space pb-20 b-b-F9F9F9 mb-26"
-					v-show="infoData.order_status == 5 || infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						退款金额
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.refund_money?infoData.refund_money:'无'}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space pb-20 b-b-F9F9F9 mb-26"
-					v-show="infoData.order_status == 5 || infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						退款原因
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.refund_msg?infoData.refund_msg:'无'}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						订单编号
-					</view>
-					<view class="align-items-center flex-justify-end">
-						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
-							{{infoData.order_sn}}
-						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)">
-						</image>
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						下单时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.created_at}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						支付方式
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26" v-if="infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						送达图片
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right fc-41ABF5" @click="lookFinishImage(infoData.finish_image)">
-						点击查看
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26" v-if="infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						完成时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.finish_time}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						备注
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.note?infoData.note:'无'}}
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-		<uni-popup ref="popupReason" type="bottom" :is-mask-click="false" background-color="#fff" border-radius="10px 10px 0 0">
-			<view class="popup-reason-box flex-direction">
-				<view class="text-align-center fs-38 fw-600 fc-3 mb-18">
-					选择取消原因
-				</view>
-				<picker-view @change="bindChange" class="picker-view flex-1" :immediate-change='true'>
-					<picker-view-column>
-						<view class="picker-view-item" v-for="(item,index) in refundReason" :key="index">
-							{{item.refund_msg}}
-						</view>
-					</picker-view-column>
-				</picker-view>
-				<view class="align-items-center flex-justify-space plr-24 box-border-box">
-					<view class="flex-1 mr-20 pop-b text-align-center fs-36 b-r-ccc" @click="popCancel">
-						取消
-					</view>
-					<view class="flex-1 pop-b text-align-center bgc-41ABF5 fc-f fs-36" @click="popSure">
-						确定
-					</view>
-				</view>
-			</view>
-		</uni-popup>
-		<SelectAddress ref="selectAddress" @giveAddress='giveAddress'></SelectAddress>
-	</view>
-</template>
-
-<script>
-	import {
-		commonRefundReason
-	} from "@/api/common.js"
-	import {
-		expressOrderInfo,
-		expressOrderCancel,
-		expressOrderAddress
-	} from "@/api/expressOrder.js"
-	import {
-		getExpressPay
-	} from "@/api/express.js"
-	import tools from "@/service/tools";
-	import SelectAddress from "./module/select-address.vue";
-	export default {
-		components: {
-			SelectAddress
-		},
-		data() {
-			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
-				goodsShow: true,
-				infoData: {},
-				time: {
-					day: '',
-					h: "",
-					m: '',
-					s: '',
-				},
-				isAJAX: false,
-				address_id: '',
-				refund_msg: '', // 退款理由
-				refundReason: [] //退款原因
-			};
-		},
-		onLoad(data) {
-			if (data) {
-				console.log(data);
-				this.expressOrderInfo(data.orderId)
-			}
-		},
-		mounted() {},
-		onUnload() {
-			const takeOutData = {}
-			expressOrderInfo({
-				order_id: this.infoData.id
-			}).then((res) => {
-				if (res.code == 1) {
-					takeOutData.id = this.infoData.id
-					takeOutData.order_status = res.data.order_status
-					takeOutData.order_status_str = res.data.order_status_str
-					uni.$emit('takeOutData', takeOutData)
-				}
-			})
-		},
-		methods: {
-			lookFinishImage(img) {
-				tools.lookBigImg(1,img)
-			},
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			goToUrl() {
-				// 再来一单
-				uni.navigateTo({
-					url: '/pages-takeout/replace-take'
-				})
-			},
-			setAddress() {
-				this.$refs.selectAddress.getList();
-			},
-			giveAddress(e) {
-				this.address_id = e;
-				this.expressOrderAddress()
-			},
-			expressOrderAddress() {
-				expressOrderAddress({
-					order_id: this.infoData.id,
-					address_id: this.address_id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.expressOrderInfo(this.infoData.id)
-					} else {
-						tools.error(res.msg)
-					}
-				})
-			},
-			pay() {
-				this.getExpressPay(this.infoData.id)
-			},
-			getExpressPay(id) {
-				// 代取支付
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				getExpressPay({
-					order_id: id
-				}).then((ret) => {
-					if (ret.code === 1) {
-						uni.requestPayment({
-							provider: "wxpay", //支付类型-固定值
-							timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-							nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-							package: ret.data.wx_pay.package, // 固定值
-							signType: ret.data.wx_pay.signType, //固定值
-							paySign: ret.data.wx_pay.paySign, //签名
-							success: (ren) => {
-								tools.success("支付成功");
-								this.isAJAX = false;
-								this.expressOrderInfo(this.infoData.id)
-							},
-							fail: (err) => {
-								this.isAJAX = false;
-								tools.error("支付失败");
-							},
-						});
-					} else {
-						this.isAJAX = false;
-						tools.error("支付失败");
-					}
-				})
-			},
-			popCancel() {
-				// 退款取消
-				this.$refs.popupReason.close()
-			},
-			popSure() {
-				// 退款确认
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				expressOrderCancel({
-					order_id: this.infoData.id,
-					refund_msg: this.refund_msg
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.$refs.popupReason.close()
-						setTimeout(() => {
-							this.expressOrderInfo(this.infoData.id)
-						}, 1500)
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
-					}
-				})
-			},
-			bindChange(e) {
-				let num = e.detail.value[0]
-				this.refund_msg = this.refundReason[num].refund_msg
-			},
-			cancelOrder() {
-				// 代取取消订单
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = res.data[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-			},
-			openGoods() {
-				this.goodsShow = !this.goodsShow
-			},
-			scrolltolower() {
-				// console.log('触底');
-			},
-			expressOrderInfo(id) {
-				expressOrderInfo({
-					order_id: id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.infoData = res.data
-						if (this.infoData.order_status == 1) {
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
-							this.setCountDown(createDate)
-						}
-					}
-				})
-			},
-			setCountDown(sTime) {
-				let end = new Date(sTime).getTime();
-				let now = new Date().getTime();
-				let msec = end - now;
-				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);
-				let h = parseInt(msec / 1000 / 60 / 60 % 24);
-				let m = parseInt(msec / 1000 / 60 % 60);
-				let s = parseInt(msec / 1000 % 60);
-				this.time.h = h > 9 ? h : '0' + h;
-				this.time.m = m > 9 ? m : '0' + m;
-				this.time.s = s > 9 ? s : '0' + s;
-				msec -= 1000;
-				if (this.time.day >= 1) {
-					this.showTime = true;
-				} else {
-					this.showTime = false;
-				};
-				if (msec >= 0) {
-					setTimeout(() => {
-						this.setCountDown(sTime);
-					}, 1000);
-				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
-					this.time.h = '--';
-					this.time.m = '--';
-					this.time.s = '--';
-				};
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.popup-reason-box {
-		width: 100%;
-		height: 45vh;
-		overflow: auto;
-		border-radius: 20rpx 20rpx 0 0;
-		background: #fff;
-		padding: 24rpx 0 0;
-		box-sizing: border-box;
-	}
-	
-	.picker-view {
-		width: 100%;
-		// height: 70%;
-	}
-	
-	.picker-view-item {
-		// height: 90rpx;
-		line-height: 68rpx;
-		text-align: center;
-		background: #F5F5F5;
-	}
-	
-	.pop-b {
-		height: 80rpx;
-		line-height: 80rpx;
-		border-radius: 20rpx;
-	}
-	.finish_image {
-		width: 34rpx;
-		height: 34rpx;
-	}
-
-	.item-code {
-		min-width: 30%;
-		padding: 8rpx
-	}
-
-	.bg-img {
-		position: fixed;
-		left: 0;
-		top: 0;
-		z-index: -1;
-		width: 100%;
-		height: 320rpx;
-	}
-
-	.w-33 {
-		width: 33%;
-		position: relative;
-	}
-
-	.item-box-button {
-		position: absolute;
-		width: 100%;
-		height: 88rpx;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		background-color: transparent;
-		border: none !important;
-	}
-
-	button::after {
-		border: none !important;
-	}
-
-	.p-24-24-0 {
-		padding: 24rpx 24rpx 0;
-	}
-
-	.icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.w-420 {
-		width: 420rpx;
-	}
-
-	.goods-img {
-		width: 108rpx;
-		height: 108rpx;
-		border-radius: 8rpx;
-	}
-
-	.w-376 {
-		width: 376rpx;
-	}
-
-	.icon-right {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.w-480 {
-		width: 480rpx;
-	}
-
-	.icon-fz {
-		width: 24rpx;
-		height: 24rpx;
-	}
-
-	.goods-box {
-		overflow: hidden;
-	}
-
-	.goodsShowOne {
-		max-height: 508rpx;
-		transition: all .5s linear;
-	}
-
-	.goodsShowTwo {
-		height: auto;
-		transition: all .5s linear;
-	}
-</style>

+ 0 - 465
pages-order/group-info.vue

@@ -1,465 +0,0 @@
-<template>
-	<view class="flex-common-css">
-		<Nav title=" " leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
-		<image class="bg-img" src="@/static/img/order/bg.png" mode=""></image>
-		<view class="p-24-24-0 box-border-box">
-			<view class="mb-24" v-show="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
-					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
-				</view>
-				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
-				</view>
-			</view>
-			<view class="mb-24">
-				<view class="fs-48 fc-3 fw-600 mb-16">
-					{{infoData.order_status_str}}
-				</view>
-				<view class="fs-30 fc-9" v-show="infoData.order_status == 2">
-					请在{{infoData.end_time}}前到店消费
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box">
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
-					请尽快支付
-				</view>
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 4">
-					感谢你对君子校园的信任,期待你再次光临
-				</view>
-				<view class="align-items-center flex-wrap-wrap">
-					<view @click="pay" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 1">
-						<image class="mb-4 icon" src="@/static/img/order/qzf.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							去支付
-						</view>
-					</view>
-					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 2 || infoData.order_status == 3 || infoData.order_status == 4">
-						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							再来一单
-						</view>
-					</view>
-					<view @click="goRefund" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 2">
-						<image class="mb-4 icon" src="@/static/img/order/tk.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							极速退款
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center">
-						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							联系客服
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="goods-box" @click="goGoodsInfo">
-					<view class="align-items-center mb-20">
-						<image class="goods-img mr-16 flex-shrink0" :src="infoData.goods_img" mode=""></image>
-						<view class="flex-1">
-							<view class="align-items-center flex-justify-space mb-2">
-								<view class="fs-28 fc-3 w-300 text-overflow-ellipsis-one mr-36">
-									{{infoData.goods_name}}
-								</view>
-								<view class="fs-32 fc-3 fw-600">
-									¥{{(Number(infoData.goods_price)*Number(infoData.goods_number)).toFixed(2)}}
-								</view>
-							</view>
-							<view class="align-items-center flex-justify-space">
-								<view class="fs-24 fc-9">
-									购买数量:{{infoData.goods_number}}
-								</view>
-								<view class="fs-24 fc-9">
-									使用数量:{{infoData.finish_number}}
-								</view>
-								<view class="fs-24 fc-9">
-									退款数量:{{infoData.refund_number}}
-								</view>
-							</view>
-
-						</view>
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-end">
-					<view class="fs-28 fc-9">
-						共{{infoData.goods_number}}件,
-					</view>
-					<view class="fs-28 fc-3">
-						合计
-					</view>
-					<view class="fs-24 fw-600 fc-3">
-						¥
-					</view>
-					<view class="fs-36  fw-600 fc-3">
-						{{infoData.pay_money}}
-					</view>
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20 align-items-center flex-justify-space">
-				<view class="fs-32 fc-3 fw-600">
-					券码信息({{infoData.code_num}}张可用)
-				</view>
-				<view class="goBut text-align-center fs-26 b-r-ccc b-rad-200" @click="goCode" v-show="infoData.code_num != 0">
-					查看券码
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="align-items-center flex-justify-space mb-20">
-					<view class="text-overflow-ellipsis-one fs-32 fc-3 fw-600">
-						{{infoData.shop.shop_name}}
-					</view>
-					<view class="align-items-center flex-shrink0" @click="contactShop(infoData.shop.shop_phone)">
-						<uni-icons type="phone-filled" size="15" class="mr-12"></uni-icons>
-						<view class="fs-24">
-							联系商家
-						</view>
-					</view>
-				</view>
-				<view class="fs-26 fc-9 mb-20">
-					营业时间:{{timeData}}
-				</view>
-				<view class="fs-26 fc-9">
-					店铺地址:{{infoData.shop.city_name}} {{infoData.shop.address}}
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						订单编号
-					</view>
-					<view class="align-items-center flex-justify-end">
-						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
-							{{infoData.order_sn}}
-						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)">
-						</image>
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						下单时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.created_at}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						支付方式
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space">
-					<view class="fs-28 fc-9">
-						备注
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.note?infoData.note:'无'}}
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		groupOrderInfo,
-		groupPay
-	} from "@/api/groupOrder.js"
-	import tools from "@/service/tools";
-	export default {
-		components: {},
-		data() {
-			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
-				infoData: {},
-				time: {
-					day: '',
-					h: "",
-					m: '',
-					s: '',
-				},
-				timeData: '',
-				isAJAX: false
-			};
-		},
-		onShow() {
-			uni.$on('groupRefund', (data) => {
-				console.log(data, '^^^^^^^^^^^^^^^^^^^^^^^^^');
-				this.groupOrderInfo(data)
-			})
-		},
-		onLoad(data) {
-			if (data) {
-				this.groupOrderInfo(data.orderId)
-			}
-		},
-		mounted() {},
-		onUnload() {
-			const takeOutData = {}
-			groupOrderInfo({
-				order_id: this.infoData.id
-			}).then((res) => {
-				if (res.code == 1) {
-					takeOutData.id = this.infoData.id
-					takeOutData.order_status = res.data.order_status
-					takeOutData.order_status_str = res.data.order_status_str
-					uni.$emit('takeOutData', takeOutData)
-				}
-			})
-		},
-		methods: {
-			goGoodsInfo() {
-				uni.navigateTo({
-					url: '/pages-buy/group-goods-info?shop_id=' + this.infoData.shop_id + '&goods_id=' + this.infoData.goods_id +
-						'&shop_name=' + this.infoData.shop.shop_name
-				});
-			},
-			goRefund() {
-				uni.navigateTo({
-					url: '/pages-buy/group-refund?order_id=' + this.infoData.id
-				})
-			},
-			goCode() {
-				uni.navigateTo({
-					url: '/pages-buy/group-code?order_id=' + this.infoData.id
-				})
-			},
-			contactShop(phone) {
-				uni.makePhoneCall({
-					phoneNumber: phone, // 电话号码
-					success: function() {
-						console.log('拨打电话成功');
-					},
-					fail: function() {
-						console.log('拨打电话失败');
-					}
-				});
-			},
-			setTimeData(timeData) {
-				let time = ''
-				let array = ''
-				console.log(timeData, '11111');
-				timeData.forEach((v, k) => {
-					v.forEach((i, j) => {
-						let timeTwo = ''
-						if (j == 0 || j == 3) {
-							timeTwo = i + '-'
-						} else {
-							timeTwo = i
-						}
-						array = array + timeTwo
-					})
-					if (timeData.length === k + 1) {
-						time = time + array + ''
-					} else {
-						time = time + array + ' / '
-					}
-					array = ''
-				})
-				console.log(time);
-				return time
-			},
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			goToUrl() {
-				uni.navigateTo({
-					url: '/pages-buy/group-shop?shop_id=' + this.infoData.shop_id
-				})
-			},
-			pay() {
-				this.groupPay(this.infoData.id)
-			},
-			groupPay(id) {
-				// 团购支付
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				groupPay({
-					order_id: id
-				}).then((ret) => {
-					if (ret.code === 1) {
-						uni.requestPayment({
-							provider: "wxpay", //支付类型-固定值
-							timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-							nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-							package: ret.data.wx_pay.package, // 固定值
-							signType: ret.data.wx_pay.signType, //固定值
-							paySign: ret.data.wx_pay.paySign, //签名
-							success: (ren) => {
-								tools.success("支付成功");
-								this.isAJAX = false;
-								this.groupOrderInfo(this.infoData.id)
-							},
-							fail: (err) => {
-								this.isAJAX = false;
-								tools.error("支付失败");
-							},
-						});
-					} else {
-						this.isAJAX = false;
-						tools.error("支付失败");
-					}
-				})
-			},
-			scrolltolower() {
-				// console.log('触底');
-			},
-			groupOrderInfo(id) {
-				groupOrderInfo({
-					order_id: id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.timeData = this.setTimeData(res.data.shop.business_hours)
-						this.infoData = res.data
-						if (this.infoData.order_status == 1) {
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
-							this.setCountDown(createDate)
-						}
-					}
-				})
-			},
-			setCountDown(sTime) {
-				let end = new Date(sTime).getTime();
-				let now = new Date().getTime();
-				let msec = end - now;
-				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);
-				let h = parseInt(msec / 1000 / 60 / 60 % 24);
-				let m = parseInt(msec / 1000 / 60 % 60);
-				let s = parseInt(msec / 1000 % 60);
-				this.time.h = h > 9 ? h : '0' + h;
-				this.time.m = m > 9 ? m : '0' + m;
-				this.time.s = s > 9 ? s : '0' + s;
-				msec -= 1000;
-				if (this.time.day >= 1) {
-					this.showTime = true;
-				} else {
-					this.showTime = false;
-				};
-				if (msec >= 0) {
-					setTimeout(() => {
-						this.setCountDown(sTime);
-					}, 1000);
-				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
-					this.time.h = '--';
-					this.time.m = '--';
-					this.time.s = '--';
-				};
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.goBut {
-		padding: 10rpx 15rpx;
-		box-sizing: border-box;
-	}
-
-	.bg-img {
-		position: fixed;
-		left: 0;
-		top: 0;
-		z-index: -1;
-		width: 100%;
-		height: 320rpx;
-	}
-
-	.w-33 {
-		width: 33%;
-		position: relative;
-	}
-
-	.p-24-24-0 {
-		padding: 24rpx 24rpx 0;
-	}
-
-	.icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.w-420 {
-		width: 420rpx;
-	}
-
-	.goods-img {
-		width: 108rpx;
-		height: 108rpx;
-		border-radius: 8rpx;
-	}
-
-	.w-300 {
-		width: 300rpx;
-	}
-
-	.item-box-button {
-		position: absolute;
-		width: 100%;
-		height: 88rpx;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		background-color: transparent;
-		border: none !important;
-	}
-
-	button::after {
-		border: none !important;
-	}
-
-	.icon-right {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.w-480 {
-		width: 480rpx;
-	}
-
-	.icon-fz {
-		width: 24rpx;
-		height: 24rpx;
-	}
-
-	.goods-box {
-		overflow: hidden;
-	}
-
-	.goodsShowOne {
-		max-height: 508rpx;
-		transition: all .5s linear;
-	}
-
-	.goodsShowTwo {
-		height: auto;
-		transition: all .5s linear;
-	}
-</style>

+ 0 - 428
pages-order/laundry-info.vue

@@ -1,428 +0,0 @@
-<template>
-	<view class="flex-common-css">
-		<Nav title=" " leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
-		<image class="bg-img" src="@/static/img/order/bg.png" mode=""></image>
-		<view class="p-24-24-0 box-border-box">
-			<view class="mb-24" v-if="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
-					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
-				</view>
-				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
-				</view>
-			</view>
-			<view class="mb-24" v-else>
-				<view class="fs-48 fc-3 fw-600">
-					{{infoData.order_status_str}}
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box">
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
-					请尽快支付
-				</view>
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3"
-					v-show="infoData.order_status == 5 || infoData.order_status == 6">
-					感谢你对君子校园的信任,期待你再次光临
-				</view>
-				<view class="align-items-center flex-wrap-wrap">
-					<view class="w-33 flex-direction align-items-center" @click="pay"
-						v-show="infoData.order_status == 1">
-						<image class="mb-4 icon" src="@/static/img/order/qzf.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							去支付
-						</view>
-					</view>
-					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 5 || infoData.order_status == 6 || infoData.order_status == 7">
-						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							再来一单
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center">
-						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							联系客服
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center" v-show="infoData.order_status == 2"
-						@click="cancelOrder">
-						<image class="mb-4 icon" src="@/static/img/order/qxdd.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							取消订单
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one mb-24">
-					{{infoData.site_name}}
-				</view>
-				<view class="goods-box" :class="infoData.item.length >= 4 && goodsShow?'goodsShowOne':'goodsShowTwo'">
-					<view class="align-items-center flex-justify-space mb-20" v-for="(item,index) in infoData.item">
-						<image class="goods-img mr-16" :src="item.goods_img" mode=""></image>
-						<view class="">
-							<view class="align-items-center flex-justify-space mb-2">
-								<view class="fs-28 fc-3 w-376 text-overflow-ellipsis-one mr-36">
-									{{item.goods_name}}
-								</view>
-								<view class="fs-32 fc-3 fw-600">
-									¥{{(Number(item.price)*Number(item.goods_num)).toFixed(2)}}
-								</view>
-							</view>
-							<view class="fs-24 fc-9">
-								x{{item.goods_num}}
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-center p-24 b-b-F9F9F9 mb-32" @click="openGoods"
-					v-if="infoData.item.length > 4 && infoData.item">
-					<view class="fs-24 fc-9 mr-4">
-						{{goodsShow?'展开':'收起'}}{{infoData.item.length - 4}}件商品
-					</view>
-					<image v-if="goodsShow" class="icon-right" src="@/static/img/order/top.png" mode=""></image>
-					<image v-else class="icon-right" src="@/static/img/order/bottom.png" mode=""></image>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						配送费
-					</view>
-					<view class="fs-32 fc-3">
-						¥{{infoData.delivery_money}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-end">
-					<view class="fs-28 fc-9">
-						共{{infoData.goods_number}}件,
-					</view>
-					<view class="fs-28 fc-3">
-						金额
-					</view>
-					<view class="fs-24 fw-600 fc-3">
-						¥
-					</view>
-					<view class="fs-36  fw-600 fc-3">
-						{{infoData.pay_money}}
-					</view>
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						订单编号
-					</view>
-					<view class="align-items-center flex-justify-end">
-						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
-							{{infoData.order_sn}}
-						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)">
-						</image>
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						识别码
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.only_code}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						下单时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.created_at}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						支付方式
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space">
-					<view class="fs-28 fc-9">
-						备注
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.note?infoData.note:'无'}}
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		laundryOrderInfo,
-		laundryOrderCancel,
-		laundryPay
-	} from "@/api/laundryOrder.js"
-	import tools from "@/service/tools";
-	export default {
-		components: {},
-		data() {
-			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
-				goodsShow: true,
-				infoData: {},
-				time: {
-					day: '',
-					h: "",
-					m: '',
-					s: '',
-				},
-				isAJAX: false
-			};
-		},
-		onLoad(data) {
-			if (data) {
-				// console.log(data);
-				this.laundryOrderInfo(data.orderId)
-			}
-		},
-		mounted() {},
-		onUnload() {
-			const takeOutData = {}
-			laundryOrderInfo({
-				order_id: this.infoData.id
-			}).then((res) => {
-				if (res.code == 1) {
-					takeOutData.id = this.infoData.id
-					takeOutData.order_status = res.data.order_status
-					takeOutData.order_status_str = res.data.order_status_str
-					uni.$emit('takeOutData', takeOutData)
-				}
-			})
-		},
-		methods: {
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			goToUrl() {
-				uni.navigateTo({
-					url: '/pages-buy/dry-clean'
-				})
-			},
-			pay() {
-				this.getExpressPay(this.infoData.id)
-			},
-			getExpressPay(id) {
-				// 干洗支付
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				laundryPay({
-					order_id: id
-				}).then((ret) => {
-					if (ret.code === 1) {
-						uni.requestPayment({
-							provider: "wxpay", //支付类型-固定值
-							timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-							nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-							package: ret.data.wx_pay.package, // 固定值
-							signType: ret.data.wx_pay.signType, //固定值
-							paySign: ret.data.wx_pay.paySign, //签名
-							success: (ren) => {
-								tools.success("支付成功");
-								this.isAJAX = false;
-								this.laundryOrderInfo(this.infoData.id)
-							},
-							fail: (err) => {
-								this.isAJAX = false;
-								tools.error("支付失败");
-							},
-						});
-					} else {
-						this.isAJAX = false;
-						tools.error("支付失败");
-					}
-				})
-			},
-			cancelOrder() {
-				// 干洗取消订单
-				uni.showModal({
-					title: '提示',
-					content: '是否取消订单?',
-					confirmText: '确定',
-					confirmColor: '#FB3D03',
-					success: (res) => {
-						if (res.confirm === true) {
-							if (this.isAJAX) {
-								return
-							}
-							this.isAJAX = true;
-							laundryOrderCancel({
-								order_id: this.infoData.id
-							}).then((res) => {
-								if (res.code == 1) {
-									tools.success(res.msg)
-									setTimeout(() => {
-										this.laundryOrderInfo(this.infoData.id)
-									}, 1500)
-									this.isAJAX = false;
-								} else {
-									tools.error(res.msg)
-									this.isAJAX = false;
-								}
-							})
-						}
-					}
-				});
-
-			},
-			openGoods() {
-				this.goodsShow = !this.goodsShow
-			},
-			scrolltolower() {
-				// console.log('触底');
-			},
-			laundryOrderInfo(id) {
-				laundryOrderInfo({
-					order_id: id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.infoData = res.data
-						if (this.infoData.order_status == 1) {
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
-							this.setCountDown(createDate)
-						}
-					}
-				})
-			},
-			setCountDown(sTime) {
-				let end = new Date(sTime).getTime();
-				let now = new Date().getTime();
-				let msec = end - now;
-				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);
-				let h = parseInt(msec / 1000 / 60 / 60 % 24);
-				let m = parseInt(msec / 1000 / 60 % 60);
-				let s = parseInt(msec / 1000 % 60);
-				this.time.h = h > 9 ? h : '0' + h;
-				this.time.m = m > 9 ? m : '0' + m;
-				this.time.s = s > 9 ? s : '0' + s;
-				msec -= 1000;
-				if (this.time.day >= 1) {
-					this.showTime = true;
-				} else {
-					this.showTime = false;
-				};
-				if (msec >= 0) {
-					setTimeout(() => {
-						this.setCountDown(sTime);
-					}, 1000);
-				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
-					this.time.h = '--';
-					this.time.m = '--';
-					this.time.s = '--';
-				};
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.bg-img {
-		position: fixed;
-		left: 0;
-		top: 0;
-		z-index: -1;
-		width: 100%;
-		height: 320rpx;
-	}
-
-	.w-33 {
-		width: 33%;
-		position: relative;
-	}
-
-	.item-box-button {
-		position: absolute;
-		width: 100%;
-		height: 88rpx;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		background-color: transparent;
-		border: none !important;
-	}
-
-	button::after {
-		border: none !important;
-	}
-
-	.p-24-24-0 {
-		padding: 24rpx 24rpx 0;
-	}
-
-	.icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.w-420 {
-		width: 420rpx;
-	}
-
-	.goods-img {
-		width: 108rpx;
-		height: 108rpx;
-		border-radius: 8rpx;
-	}
-
-	.w-376 {
-		width: 376rpx;
-	}
-
-	.icon-right {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.w-480 {
-		width: 480rpx;
-	}
-
-	.icon-fz {
-		width: 24rpx;
-		height: 24rpx;
-	}
-
-	.goods-box {
-		overflow: hidden;
-	}
-
-	.goodsShowOne {
-		max-height: 508rpx;
-		transition: all .5s linear;
-	}
-
-	.goodsShowTwo {
-		height: auto;
-		transition: all .5s linear;
-	}
-</style>

+ 0 - 155
pages-order/module/select-address.vue

@@ -1,155 +0,0 @@
-<template>
-	<view>
-		<uni-popup ref="popupAddress" type="bottom">
-			<view class="pop-address box-border-box p-24">
-				<view class="text-align-center fs-36 fw-600 box-title mb-32">
-					选择收货地址
-					<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
-				</view>
-				
-				
-				<view v-if="list.length === 0" class="scroll-view-css">
-					<EnBlank :customSrc='true'>
-						<template v-slot:blankImg>
-							<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
-						</template>
-					</EnBlank>
-				</view>
-				
-				<view v-else class="scroll-view-css">
-					<view class="item-box flex-justify-space align-items-center mb-20" v-for="(item,index) in list" :key="index" @click.stop="select(item)">
-						<image v-if="id==item.id" class="s-icon" src="@/static/img/common/y-select.png" mode=""></image>
-						<image v-else class="s-icon"src="@/static/img/common/n-select.png" mode=""></image>
-						
-						
-						<view class="">
-							<view class="fs-34 fw-600 w556 mb-12">
-								<span v-if="item.is_default == 1" class="list-box-only fs-24 fc-FE9E11 text-align-center mr-8">默认</span>
-								{{item.address}}{{item.school_name}}{{item.dorm_name}}
-							</view>
-							<view class="p-b-20">
-								<span class="mr-24 fs-28 fc-9">{{item.consignee}}</span><span class="fs-28 fc-9">{{item.phone}}</span>
-							</view>
-						</view>
-						
-						<image class="edit-img" src="@/static/img/common/edit.png" mode="" @click.stop="toEdit(1,item)"></image>
-					</view>
-				</view>
-				
-				<view class="box-border-box p-24 bgc-f" @click="toEdit(2)">
-					<view class="add-box text-align-center fs-34 fc-f">新增地址</view>
-				</view>
-			</view>
-			
-			
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {getAddressList} from '@/api/member.js'
-	import EnBlank from "@/components/en-utils/en-blank/en-blank";
-	import tools from "@/service/tools.js";
-	
-	export default {
-		components:{EnBlank,},
-		data(){
-			return{
-				id:'',
-				list:[],
-			}
-		},
-		onShow() {
-			this.list = [];
-			getAddressList().then((res)=>{
-				if(res.code === 1){
-					this.list = res.data;
-				}
-			})
-		},
-		methods:{
-			getList(){
-				getAddressList().then((res)=>{
-					if(res.code === 1){
-						this.list = res.data;
-						this.openPop();
-					}
-				})
-			},
-			select(item){
-				if(item.id != this.id){
-					this.$emit('giveAddress',item);
-					this.closeCoupon();
-				}
-			},
-			openPop(){
-				this.$refs.popupAddress.open();
-			},
-			closeCoupon(){
-				this.list = [];
-				this.$refs.popupAddress.close();
-			},
-			toEdit(type,item){
-				if(type === 1){
-					uni.navigateTo({
-						url:"pages-address/edit-add?id=" + item.id
-					})
-				}else{
-					uni.navigateTo({
-						url:"pages-address/edit-add"
-					})
-				}
-			},
-		},
-	}
-</script>
-
-<style scoped lang="scss">
-	.add-box{
-		width: 100%;
-		height: 80rpx;
-		line-height: 80rpx;
-		background-color: #2F80ED;
-		border-radius: 200rpx;
-		
-	}
-	.w556{
-		width: 556rpx;
-	}
-	.list-box-only{
-		width: 64rpx;
-		height: 34rpx;
-		line-height: 34rpx;
-		border-radius: 8rpx;
-		border: 2rpx solid #FE9E11;
-	}
-	
-	.item-box{
-		border-bottom: 1rpx solid #f9f9f9;
-		.s-icon{
-			width: 32rpx;
-			height: 32rpx;
-		}
-		.edit-img{
-			width: 48rpx;
-			height: 48rpx;
-		}
-	}
-	
-	.pop-address{
-		width: 100%;
-		height: 50vh;
-		background-color: #fff;
-		border-radius: 24rpx 24rpx 0rpx 0rpx;
-		padding-top: 32rpx !important;
-		display: flex;
-		flex-direction: column;
-		.box-title{
-			position: relative;
-			.box-close{
-				position: absolute;
-				right: 22rpx;
-			}
-		}
-	}
-</style>

+ 0 - 577
pages-order/run-errands-info.vue

@@ -1,577 +0,0 @@
-<template>
-	<view class="flex-common-css iPhone-bottom box-border-box">
-		<Nav title=" " leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
-		<image class="bg-img" src="@/static/img/order/bg.png" mode=""></image>
-		<view class="p-24-24-0 box-border-box">
-			<view class="mb-24" v-if="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
-					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
-				</view>
-				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
-				</view>
-			</view>
-			<view class="mb-24" v-else>
-				<view class="fs-48 fc-3 fw-600">
-					{{infoData.order_status_str}}
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box">
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
-					请尽快支付
-				</view>
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3"
-					v-if="infoData.order_status == 4 || infoData.order_status == 5 || infoData.order_status == 6">
-					感谢你对君子校园的信任,期待你再次光临
-				</view>
-				<view class="align-items-center flex-wrap-wrap">
-					<view class="w-33 flex-direction align-items-center" @click="pay"
-						v-show="infoData.order_status == 1">
-						<image class="mb-4 icon" src="@/static/img/order/qzf.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							去支付
-						</view>
-					</view>
-					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 4 || infoData.order_status == 5 || infoData.order_status == 6">
-						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							再来一单
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center">
-						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							联系客服
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center" v-show="infoData.order_status == 2"
-						@click="cancelOrder">
-						<image class="mb-4 icon" src="@/static/img/order/qxdd.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							取消订单
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="align-items-center mb-24">
-					<image class="shops-img" :src="infoData.errands.img" mode="aspectFit"></image>
-					<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one">
-						{{infoData.errands.name}}
-					</view>
-				</view>
-				<view class="mb-24">
-					<view class="content-b b-rad-20 fs-28 fc-0 bgc-F6F6F6 p-24 box-border-box">
-						{{infoData.serve_desc}}
-					</view>
-				</view>
-				<view class="align-items-center mb-24">
-					<view class="fs-32 fw-600 fc-3 mr-12 flex-shrink0 w-64">
-						服务地址
-					</view>
-					<view class="fs-28 fc-3">
-						{{infoData.serve_address}}
-					</view>
-				</view>
-				<view class="align-items-center mb-24 p-b-20 b-b-999">
-					<view class="fs-32 fw-600 fc-3 mr-12 flex-shrink0 w-64">
-						送达地址
-					</view>
-					<view class="fs-28 fc-3">
-						{{infoData.address_id>0?infoData.school_name + infoData.dorm_name + infoData.address:'无'}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						基础服务费
-					</view>
-					<view class="fs-32 fc-3">
-						¥ {{infoData.serve_money}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24" v-if="infoData.item">
-					<view class="fs-28 fc-3">
-						{{infoData.item.goods_name}}({{infoData.item.goods_attr}})
-					</view>
-					<view class="fs-32 fc-3">
-						¥ {{infoData.item.goods_price}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24" v-if="infoData.is_up === 1">
-					<view class="fs-28 fc-3">
-						上楼加价
-					</view>
-					<view class="fs-32 fc-3">
-						¥ {{infoData.up_money}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						打赏金额
-					</view>
-					<view class="fs-32 fc-3">
-						¥ {{infoData.reward_money?(Number(infoData.reward_money)).toFixed(2):'0.00'}}
-					</view>
-				</view>
-				<!-- 				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
-					<view class="align-items-center">
-						<image class="mr-6 icon-right" src="@/static/img/order/yhq.png" mode=""></image>
-						<view class="fs-28 fc-3">
-							优惠券
-						</view>
-					</view>
-					<view class="fs-32 fc-FB3D03">
-						-¥{{infoData.coupon_money}}
-					</view>
-				</view> -->
-				<view class="align-items-center flex-justify-end">
-					<view class="fs-28 fc-3">
-						金额
-					</view>
-					<view class="fs-24 fw-600 fc-3">
-						¥
-					</view>
-					<view class="fs-36  fw-600 fc-3">
-						{{infoData.pay_money}}
-					</view>
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						期望时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.serve_time}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9 flex-shrink0">
-						图片介绍
-					</view>
-					<view class="align-items-center images-box flex-wrap-wrap" v-if="infoData.images.length>0">
-						<image class="images-img" v-for="(item,index) in infoData.images" :src="item" mode="aspectFit"
-							@click="lookFinishImage(1,infoData.images,index)"></image>
-					</view>
-					<view v-else class="">
-						无
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space pb-20 mb-26">
-					<view class="fs-28 fc-9">
-						骑手信息
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.rider.rider_name?infoData.rider.rider_name:'无'}}{{infoData.rider.phone || ''}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						订单编号
-					</view>
-					<view class="align-items-center flex-justify-end">
-						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
-							{{infoData.order_sn}}
-						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)">
-						</image>
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						下单时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.created_at}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						支付方式
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26" v-if="infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						送达图片
-					</view>
-					<view class="align-items-center images-box flex-wrap-wrap" v-if="infoData.finish_image.length>0">
-						<image class="images-img" v-for="(item,index) in infoData.finish_image" :src="item" mode="aspectFit"
-							@click="lookFinishImage(2,infoData.finish_image,index)"></image>
-					</view>
-					<view v-else class="">
-						无
-					</view>
-<!-- 					<view class="fs-28 fc-3 w-480 text-align-right fc-41ABF5"
-						@click="lookFinishImage(2,infoData.finish_image)">
-						点击查看
-					</view> -->
-				</view>
-				<view class="display-flex flex-justify-space mb-26" v-if="infoData.order_status == 4">
-					<view class="fs-28 fc-9">
-						完成时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.finish_time}}
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-		<uni-popup ref="popupReason" type="bottom" :is-mask-click="false" background-color="#fff"
-			border-radius="10px 10px 0 0">
-			<view class="popup-reason-box flex-direction">
-				<view class="text-align-center fs-38 fw-600 fc-3 mb-18">
-					选择取消原因
-				</view>
-				<picker-view @change="bindChange" class="picker-view flex-1" :immediate-change='true'>
-					<picker-view-column>
-						<view class="picker-view-item" v-for="(item,index) in refundReason" :key="index">
-							{{item.refund_msg}}
-						</view>
-					</picker-view-column>
-				</picker-view>
-				<view class="align-items-center flex-justify-space plr-24 box-border-box">
-					<view class="flex-1 mr-20 pop-b text-align-center fs-36 b-r-ccc" @click="popCancel">
-						取消
-					</view>
-					<view class="flex-1 pop-b text-align-center bgc-41ABF5 fc-f fs-36" @click="popSure">
-						确定
-					</view>
-				</view>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		commonRefundReason
-	} from "@/api/common.js"
-	import {
-		errandsOrderInfo,
-		errandsOrderCancel
-	} from "@/api/errandsOrder.js"
-	import tools from "@/service/tools";
-	export default {
-		components: {},
-		data() {
-			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
-				goodsShow: true,
-				infoData: {},
-				time: {
-					day: '',
-					h: "",
-					m: '',
-					s: '',
-				},
-				isAJAX: false,
-				address_id: '',
-				refund_msg: '', // 退款理由
-				refundReason: [] //退款原因
-			};
-		},
-		onLoad(data) {
-			if (data) {
-				// console.log(data);
-				this.errandsOrderInfo(data.orderId)
-			}
-		},
-		mounted() {},
-		onUnload() {
-			const takeOutData = {}
-			errandsOrderInfo({
-				order_id: this.infoData.id
-			}).then((res) => {
-				if (res.code == 1) {
-					takeOutData.id = this.infoData.id
-					takeOutData.order_status = res.data.order_status
-					takeOutData.order_status_str = res.data.order_status_str
-					uni.$emit('takeOutData', takeOutData)
-				}
-			})
-		},
-		methods: {
-			popCancel() {
-				// 退款取消
-				this.$refs.popupReason.close()
-			},
-			popSure() {
-				// 退款确认
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				errandsOrderCancel({
-					order_id: this.infoData.id,
-					refund_msg: this.refund_msg
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.$refs.popupReason.close()
-						setTimeout(() => {
-							this.errandsOrderInfo(this.infoData.id)
-						}, 1500)
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
-					}
-				})
-			},
-			bindChange(e) {
-				let num = e.detail.value[0]
-				this.refund_msg = this.refundReason[num].refund_msg
-			},
-			lookFinishImage(type, img, index) {
-				if (type === 1) {
-					tools.lookBigImg(index, img)
-				} else {
-					tools.lookBigImg(1, img)
-				}
-			},
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			goToUrl() {
-				// 再来一单
-				uni.redirectTo({
-					url: '/pages-takeout/run-errands'
-				})
-			},
-			setAddress() {
-				this.$refs.selectAddress.getList();
-			},
-			giveAddress(e) {
-				this.address_id = e;
-				this.expressOrderAddress()
-			},
-			expressOrderAddress() {
-				expressOrderAddress({
-					order_id: this.infoData.id,
-					address_id: this.address_id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.errandsOrderInfo(this.infoData.id)
-					} else {
-						tools.error(res.msg)
-					}
-				})
-			},
-			pay() {
-				uni.redirectTo({
-					url: `/pages-takeout/run-errands-mod/pay-page?orderId=${this.infoData.id}`
-				});
-			},
-			cancelOrder() {
-				// 跑腿取消订单
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = res.data[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-			},
-			openGoods() {
-				this.goodsShow = !this.goodsShow
-			},
-			scrolltolower() {
-				// console.log('触底');
-			},
-			errandsOrderInfo(id) {
-				errandsOrderInfo({
-					order_id: id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.infoData = res.data
-						if (this.infoData.order_status == 1) {
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
-							this.setCountDown(createDate)
-						}
-					}
-				})
-			},
-			setCountDown(sTime) {
-				let end = new Date(sTime).getTime();
-				let now = new Date().getTime();
-				let msec = end - now;
-				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);
-				let h = parseInt(msec / 1000 / 60 / 60 % 24);
-				let m = parseInt(msec / 1000 / 60 % 60);
-				let s = parseInt(msec / 1000 % 60);
-				this.time.h = h > 9 ? h : '0' + h;
-				this.time.m = m > 9 ? m : '0' + m;
-				this.time.s = s > 9 ? s : '0' + s;
-				msec -= 1000;
-				if (this.time.day >= 1) {
-					this.showTime = true;
-				} else {
-					this.showTime = false;
-				};
-				if (msec >= 0) {
-					setTimeout(() => {
-						this.setCountDown(sTime);
-					}, 1000);
-				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
-					this.time.h = '--';
-					this.time.m = '--';
-					this.time.s = '--';
-				};
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.images-box {
-		max-width: 60%;
-	}
-
-	.images-img {
-		width: 50rpx;
-		height: 50rpx;
-		margin: 0 10rpx 10rpx 0;
-	}
-
-	.w-64 {
-		width: 64rpx;
-	}
-
-	.popup-reason-box {
-		width: 100%;
-		height: 45vh;
-		overflow: auto;
-		border-radius: 20rpx 20rpx 0 0;
-		background: #fff;
-		padding: 24rpx 0 0;
-		box-sizing: border-box;
-	}
-
-	.picker-view {
-		width: 100%;
-		// height: 70%;
-	}
-
-	.picker-view-item {
-		// height: 90rpx;
-		line-height: 68rpx;
-		text-align: center;
-		background: #F5F5F5;
-	}
-
-	.pop-b {
-		height: 80rpx;
-		line-height: 80rpx;
-		border-radius: 20rpx;
-	}
-
-	.shops-img {
-		width: 48rpx;
-		height: 48rpx;
-		margin: 0 8rpx 0 0;
-		border-radius: 50%;
-	}
-
-	.bg-img {
-		position: fixed;
-		left: 0;
-		top: 0;
-		z-index: -1;
-		width: 100%;
-		height: 320rpx;
-	}
-
-	.w-33 {
-		width: 33%;
-		position: relative;
-	}
-
-	.item-box-button {
-		position: absolute;
-		width: 100%;
-		height: 88rpx;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		background-color: transparent;
-		border: none !important;
-	}
-
-	button::after {
-		border: none !important;
-	}
-
-	.p-24-24-0 {
-		padding: 24rpx 24rpx 0;
-	}
-
-	.icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.w-420 {
-		width: 420rpx;
-	}
-
-	.goods-img {
-		width: 108rpx;
-		height: 108rpx;
-		border-radius: 8rpx;
-	}
-
-	.w-376 {
-		width: 376rpx;
-	}
-
-	.icon-right {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.w-480 {
-		width: 480rpx;
-	}
-
-	.icon-fz {
-		width: 24rpx;
-		height: 24rpx;
-	}
-
-	.goods-box {
-		overflow: hidden;
-	}
-
-	.goodsShowOne {
-		max-height: 508rpx;
-		transition: all .5s linear;
-	}
-
-	.goodsShowTwo {
-		height: auto;
-		transition: all .5s linear;
-	}
-</style>

+ 22 - 10
pages-order/takeout-info.vue

@@ -147,7 +147,7 @@
 			</view>
 		</scroll-view>
 		<view class="bot-box box-border-box align-items-center flex-justify-end bgc-f">
-			<view class="item-but fc-f fs-28 text-align-center b-rad-200">
+			<view class="item-but fc-f fs-28 text-align-center b-rad-200" @click="goToUrl()">
 				再来一单
 			</view>
 		</view>
@@ -155,6 +155,7 @@
 </template>
 
 <script>
+	import cartStore from '@/utils/cartStore';
 	import {
 		commonRefundReason
 	} from "@/api/common.js"
@@ -189,6 +190,26 @@
 		mounted() {},
 		onUnload() {},
 		methods: {
+			goToUrl(item) {
+				// 再来一单
+				tools.showLoading()
+				const success = cartStore.reorderFromOrderData(
+					uni.getStorageSync('shop_id'),
+					this.infoData.shopping_cart
+				);
+				if (success) {
+					// 延迟跳转,让用户看到成功提示
+					setTimeout(() => {
+						// 跳转到店铺页面
+						tools.hideLoading()
+						uni.redirectTo({
+							url: '/pages-takeout/new-shop'
+						})
+					}, 1500);
+				} else {
+					tools.error('再来一单失败');
+				}
+			},
 			lookFinishImage(img) {
 				tools.lookBigImg(1, img)
 			},
@@ -214,15 +235,6 @@
 					}
 				})
 			},
-			goToUrl() {
-				// 再来一单
-				// uni.navigateTo({
-				// 	url: '/pages-takeout/takeout'
-				// })
-				uni.redirectTo({
-					url: '/pages-takeout/shop?shop_id=' + this.infoData.shop_id
-				})
-			},
 			setAddress() {
 				this.$refs.selectAddress.getList();
 			},

+ 0 - 406
pages-order/ticket-info.vue

@@ -1,406 +0,0 @@
-<template>
-	<view class="flex-common-css">
-		<Nav title=" " leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
-		<image class="bg-img" src="@/static/img/order/bg.png" mode=""></image>
-		<view class="p-24-24-0 box-border-box">
-			<view class="mb-24" v-show="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
-					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
-				</view>
-				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
-				</view>
-			</view>
-			<view class="mb-24">
-				<view class="fs-48 fc-3 fw-600">
-					{{infoData.order_status_str}}
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box">
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
-					请尽快支付
-				</view>
-				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 4">
-					感谢你对君子校园的信任,期待你再次光临
-				</view>
-				<view class="align-items-center flex-wrap-wrap">
-					<view @click="pay" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 1">
-						<image class="mb-4 icon" src="@/static/img/order/qzf.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							去支付
-						</view>
-					</view>
-					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 3 || infoData.order_status == 2 || infoData.order_status == 4">
-						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
-						<view class="fs-24 fc-41ABF5">
-							再来一单
-						</view>
-					</view>
-					<view class="w-33 flex-direction align-items-center">
-						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
-						<view class="fs-24 fc-3">
-							联系客服
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<!-- 				<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one mb-24">
-					{{infoData.site_name}}
-				</view> -->
-				<view class="goods-box">
-					<view class="display-flex flex-justify-space mb-20">
-						<view class="align-items-center">
-							<image class="goods-img mr-16 flex-shrink0" :src="infoData.goods_img" mode=""></image>
-							<view class="">
-								<view class="fs-28 fc-3 w-300 text-overflow-ellipsis-one mr-36 mb-8">
-									{{infoData.goods_name}}
-								</view>
-								<view class="fs-32 fc-3 fw-600">
-									x{{infoData.goods_number}}
-								</view>
-							</view>
-						</view>
-						<view class="fs-24 fc-9 p-t-10">
-							¥{{infoData.goods_price}}
-						</view>
-					</view>
-				</view>
-				<!-- 				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						打包费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						配送费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view> -->
-				<!-- 				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
-					<view class="align-items-center">
-						<image class="mr-6 icon-right" src="@/static/img/order/yhq.png" mode=""></image>
-						<view class="fs-28 fc-3">
-							优惠券
-						</view>
-					</view>
-					<view class="fs-32 fc-FB3D03">
-						-¥{{infoData.coupon_money}}
-					</view>
-				</view> -->
-				<view class="align-items-center flex-justify-end">
-					<view class="fs-28 fc-9">
-						共{{infoData.goods_number}}件,
-					</view>
-					<view class="fs-28 fc-3">
-						金额
-					</view>
-					<view class="fs-24 fw-600 fc-3">
-						¥
-					</view>
-					<view class="fs-36  fw-600 fc-3">
-						{{infoData.pay_money}}
-					</view>
-				</view>
-			</view>
-			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						联系地址
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.address?infoData.address:'无'}}
-					</view>
-				</view>
-				<!-- 				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						配送时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						预约配送
-					</view>
-				</view> -->
-				<!-- 				<view class="display-flex flex-justify-space pb-20 b-b-F9F9F9 mb-26" v-show="infoData.order_status == 3">
-					<view class="fs-28 fc-9">
-						骑手信息
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.rider.rider_name}}{{infoData.rider.phone}}
-					</view>
-				</view> -->
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						订单编号
-					</view>
-					<view class="align-items-center flex-justify-end">
-						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
-							{{infoData.order_sn}}
-						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)"></image>
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						下单时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.created_at}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						支付方式
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
-					</view>
-				</view>
-				<view class="display-flex flex-justify-space">
-					<view class="fs-28 fc-9">
-						备注
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.note?infoData.note:'无'}}
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		ticketPay
-	} from '@/api/ticket.js';
-	import {
-		ticketOrderInfo
-	} from "@/api/ticketOrder.js"
-	import tools from '@/service/tools';
-	export default {
-		components: {},
-		data() {
-			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
-				infoData: {},
-				time: {
-					day: '',
-					h: "",
-					m: '',
-					s: '',
-				},
-			};
-		},
-		onLoad(data) {
-			if (data) {
-				this.ticketOrderInfo(data.orderId)
-			}
-		},
-		mounted() {},
-		onUnload() {
-			const takeOutData = {}
-			ticketOrderInfo({
-				order_id: this.infoData.id
-			}).then((res) => {
-				if (res.code == 1) {
-					takeOutData.id = this.infoData.id
-					takeOutData.order_status = res.data.order_status
-					takeOutData.order_status_str = res.data.order_status_str
-					uni.$emit('takeOutData', takeOutData)
-				}
-			})
-		},
-		methods: {
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			goToUrl() {
-				uni.navigateTo({
-					url: '/pages-buy/ticket'
-				})
-			},
-			pay() {
-				this.ticketPay(this.infoData.id)
-			},
-			ticketPay(id) {
-				// 票务支付
-				ticketPay({
-					order_id: id
-				}).then((ret) => {
-					if (ret.code === 1) {
-						uni.requestPayment({
-							provider: "wxpay", //支付类型-固定值
-							timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-							nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-							package: ret.data.wx_pay.package, // 固定值
-							signType: ret.data.wx_pay.signType, //固定值
-							paySign: ret.data.wx_pay.paySign, //签名
-							success: (ren) => {
-								tools.success("支付成功");
-								this.isAJAX = false;
-								this.ticketOrderInfo(this.infoData.id)
-							},
-							fail: (err) => {
-								this.isAJAX = false;
-								tools.error("支付失败");
-							},
-						});
-					} else {
-						this.isAJAX = false;
-						tools.error("支付失败");
-					}
-				})
-			},
-			scrolltolower() {
-				// console.log('触底');
-			},
-			ticketOrderInfo(id) {
-				ticketOrderInfo({
-					order_id: id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.infoData = res.data
-						if (this.infoData.order_status == 1) {
-							let currentDate = new Date(); //获取当前时间
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
-							this.setCountDown(createDate)
-						}
-					}
-				})
-			},
-			setCountDown(sTime) {
-				let end = new Date(sTime).getTime();
-				let now = new Date().getTime();
-				let msec = end - now;
-				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);
-				let h = parseInt(msec / 1000 / 60 / 60 % 24);
-				let m = parseInt(msec / 1000 / 60 % 60);
-				let s = parseInt(msec / 1000 % 60);
-				this.time.h = h > 9 ? h : '0' + h;
-				this.time.m = m > 9 ? m : '0' + m;
-				this.time.s = s > 9 ? s : '0' + s;
-				msec -= 1000;
-				if (this.time.day >= 1) {
-					this.showTime = true;
-				} else {
-					this.showTime = false;
-				};
-				if (msec >= 0) {
-					setTimeout(() => {
-						this.setCountDown(sTime);
-					}, 1000);
-				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
-					this.time.h = '--';
-					this.time.m = '--';
-					this.time.s = '--';
-				};
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.bg-img {
-		position: fixed;
-		left: 0;
-		top: 0;
-		z-index: -1;
-		width: 100%;
-		height: 320rpx;
-	}
-
-	.w-33 {
-		width: 33%;
-		position: relative;
-	}
-
-	.item-box-button {
-		position: absolute;
-		width: 100%;
-		height: 88rpx;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		background-color: transparent;
-		border: none !important;
-	}
-
-	button::after {
-		border: none !important;
-	}
-
-	.p-24-24-0 {
-		padding: 24rpx 24rpx 0;
-	}
-
-	.icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.w-420 {
-		width: 420rpx;
-	}
-
-	.goods-img {
-		width: 108rpx;
-		height: 108rpx;
-		border-radius: 8rpx;
-	}
-
-	.w-300 {
-		width: 300rpx;
-	}
-
-	.icon-right {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.w-480 {
-		width: 480rpx;
-	}
-
-	.icon-fz {
-		width: 24rpx;
-		height: 24rpx;
-	}
-
-	.goods-box {
-		overflow: hidden;
-	}
-
-	.goodsShowOne {
-		max-height: 508rpx;
-		transition: all .5s linear;
-	}
-
-	.goodsShowTwo {
-		height: auto;
-		transition: all .5s linear;
-	}
-</style>

+ 3 - 3
pages-school/school-circle.vue

@@ -413,9 +413,9 @@
 				tools.leftClick()
 			},
 			toSelectSchool() {
-				uni.navigateTo({
-					url: '/pages-address/select-school?type=2'
-				})
+				// uni.navigateTo({
+				// 	url: '/pages-address/select-school?type=2'
+				// })
 			},
 			getTopic() {
 				getTopic().then((res) => {

+ 1 - 38
pages-takeout/goods-order.vue

@@ -88,7 +88,7 @@
 
 			<view class="p-24 box-border-box bgc-f mb-20 b-rad-20 flex-justify-space">
 				<view class="fs-28 fw-600">备注</view>
-				<input v-model="fromData.note" class="flex-1 text-align-right fs-28" type="text" placeholder="请填写你的需求">
+				<input v-model="cartData.note" class="flex-1 text-align-right fs-28" type="text" placeholder="请填写你的需求">
 			</view>
 			<view class="p-24 box-border-box bgc-f mb-20 b-rad-20 flex-justify-space">
 				<view class="fs-28 fw-600">支付方式</view>
@@ -143,9 +143,6 @@
 	import {
 		getShopIngList
 	} from '@/api/shopping.js'
-	import {
-		getDeliveryMoney
-	} from '@/api/common.js'
 	import {
 		orderCreateVtwo,
 		orderCreate,
@@ -201,9 +198,6 @@
 					return
 				}
 				this.$refs.popup.close()
-				// if(this.customizeType) {
-				// 	this.cartData.diner_number = this.customize_diner_number
-				// }
 			},
 			input(e) {
 				this.cartData.diner_number = e.detail.value
@@ -225,14 +219,6 @@
 				cartStore.setShopId();
 				const shopCart = cartStore.getShopCart();
 				this.cartData.shopping_cart = shopCart
-				console.log(this.cartData, '11111111');
-			},
-			orderCreateVtwo() {
-				orderCreateVtwo(shopCart).then((res) => {
-					if (res.code === 1) {
-						console.log(res, '11111');
-					}
-				})
 			},
 			openPop() {
 				if (this.cartData.diner_number > 10) {
@@ -247,30 +233,7 @@
 					this.cartData.order_type = type
 				}
 			},
-			getDeliveryMoney(shop_id) {
-				// 获取外卖配送费
-				this.fromData.school_id = uni.getStorageSync('school_id');
-				getDeliveryMoney({
-					shop_id: shop_id,
-					school_id: this.fromData.school_id
-				}).then((res) => {
-					if (res.code == 1) {
-						this.delivery_money = res.data.delivery_money
-						this.total_price = (Number(this.total_price) + Number(this.delivery_money)).toFixed(2)
-					}
-				})
-			},
-			giveCouPon(e) {
-				if (e.id) {
-					this.quanMoney = Number(e.money);
-					this.fromData.coupon_id = e.id;
-				} else {
-					this.quanMoney = ''
-					this.fromData.coupon_id = 0
-				}
-			},
 			toSave() {
-				console.log(this.cartData, "111111");
 				if (this.isAJAX) {
 					return
 				}

+ 1159 - 1144
pages-takeout/new-shop.vue

@@ -1,1151 +1,1166 @@
 <template>
-  <view class="shop-index iPhone-bottom flex-direction box-border-box">
-
-    <image v-show="!navBgType" class="bg-img" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
-      :class="scrollTop > newNavHeight?'z-4':'z-3'"></image>
-    <image v-show="navBgType" class="bg-img-type z-4" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
-      :style="{height:newNavHeight+'rpx',opacity:opacity}"></image>
-
-    <newNav :leftShow="false" :textType='false' class="z-4 mb-32" @navHeight='navHeight'>
-      <view slot="textContentSlot" class="align-items-center flex-justify-end">
-        <view class="ss-box b-rad-50 mr-24 align-items-center flex-justify-center z-4" @click.stop="goSearch">
-          <image class="shop-search" src="@/static/img/order-food/shop-search.png" mode=""></image>
-        </view>
-        <view class="dd-box align-items-center flex-justify-center b-rad-200 mr-24 z-4" @click="goToOrder">
-          <image class="shp-list-img mr-8" src="@/static/img/order-food/shp-list.png" mode=""></image>
-          <view class="fs-28 fc-f">
-            订单
-          </view>
-        </view>
-      </view>
-    </newNav>
-
-    <view class="bgc-f box-border-box plr-32 mb-32 shop-info">
-      <view class="shop-info-box bgc-f box-border-box p-24 z-3 b-rad-20">
-        <view class="fs-40 fw-600 text-overflow-ellipsis">
-          {{shopsInfo.shop_name}}
-        </view>
-        <view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15" v-if="shopsInfo.notice">
-          公告:{{shopsInfo.notice || '暂无公告'}}
-        </view>
-      </view>
-    </view>
-
-    <view class="b-b-eee bgc-f box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
-      <view class="align-items-center shop-type-list">
-        <view class="shop-item fs-36 mb-8 mr-64" @click="seletShopType(item)"
-          :class="shopType === item.id?'fc-3 fw-600':'fc-6'" v-for="(item,i) in shopTypeList" :key="i">
-          {{item.name}}
-        </view>
-        <view class="shop-item-bs bgc-FF3333" :style="{left:shopTypeBsLeft+'rpx'}"></view>
-      </view>
-      <view class="align-items-center">
-        <image class="zh-icon mr-8" src="@/static/img/order-food/zh-icon.png" mode="aspectFill"></image>
-        <view class="fw-600 fs-32 fc-3">
-          桌号:{{table_number}}
-        </view>
-      </view>
-    </view>
-
-    <!-- <view class="bgc-f sticky-nav" :style="{ height: navBgType?`calc(100vh - ${newNavHeight}rpx - ${48}rpx)`:'auto'}"> -->
-    <view class="bgc-F7F8FA">
-      <view class="menu-box box-border-box align-items-flex-start" v-if="shopType === 1">
-
-        <view class="menu-box-left" :style="{top: newNavHeight + 'rpx'}">
-          <view class="menu-box-left-box pb-130 box-border-box"
-            :style="{height: menuLeftType?`calc(100vh - ${newNavHeight}rpx - ${68}rpx)`:''}">
-            <view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
-              v-for="(item,i) in categoryList" :key="i" @click="selectType(item)"
-              :class="type ===  item.category_id?'bgc-f fc-3 fw-600':'fc-6 fw-400'"
-              :id="'left-scroll'+ item.category_id">
-              {{item.name}}
-              <view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}
-              </view>
-            </view>
-          </view>
-        </view>
-
-        <view class="menu-box-only bgc-f pb-130 box-border-box">
-          <view class="" v-for="(item,i) in goodsList" :key="i" :id="'scroll'+ item.type">
-            <view class="fs-28 fw-600 fc-3 sticky-nav bgc-f p-20 box-border-box" :style="{top: newNavHeight + 'rpx'}">
-              {{item.name}}
-            </view>
-            <view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
-              :id="'goods_id'+ info.goods_id">
-              <image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
-              <view class="menu-list-right flex-direction flex-justify-space">
-                <view class="mb-8">
-                  <view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
-                    {{info.goods_name}}
-                  </view>
-                  <view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name" v-if="info.spec_type == 1">
-                    {{info.goods_desc?info.goods_desc:''}}
-                  </view>
-                </view>
-                <view class="flex-justify-space align-items-flex-end">
-                  <view class="">
-                    <span class="fs-24 fw-400 fc-FB3D03">¥</span>
-                    <span class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
-                  </view>
-                  <view class="display-flex align-items-center" v-if="info.spec_type == 1">
-                    <image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
-                      src="@/static/img/order-food/reduce-img.png" mode=""></image>
-                    <view v-show="info.num > 0" class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}
-                    </view>
-                    <image class="wh-44" src="@/static/img/order-food/add-img.png" @click="addred(2,info)" mode="">
-                    </image>
-                  </view>
-                  <view v-else class="right-only-right text-align-center b-rad-200" @click="addred(3,info)">
-                    <view class="fw-600 fs-28 fc-f">
-                      选规格
-                    </view>
-                    <view class="selectedNum" v-if="info.num>0">
-                      {{info.num}}
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-
-      <ShopInfo style="height: 100%;" v-else-if="shopType === 2"></ShopInfo>
-
-    </view>
-
-    <view v-if="shopType === 1" class="shop-buttom-money box-border-box" @click="openBuyCrad()">
-      <view class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-        <view class="align-items-center">
-          <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
-          <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}</view>
-          <view class="align-items-baseline">
-            <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-            <view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
-          </view>
-        </view>
-
-        <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-          :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-        </view>
-      </view>
-    </view>
-
-    <uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
-      <view class="buy-card flex-index-css">
-        <view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
-          <view class="">
-            <span class="fs-32 fc-3 mr-12">已选商品</span>
-          </view>
-          <view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
-            <view class="">
-              <uni-icons type="trash" size="18" color="#999"></uni-icons>
-            </view>
-            <view class="fs-28 fw-400 fc-9">清空</view>
-          </view>
-        </view>
-        <view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
-          <view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
-            v-for="(goods,i) in cartData.goods_list" :key="i">
-            <image class="goods_img flex-shrink0" :src="goods.goods_image" mode="scaleToFill"></image>
-            <view class="flex-1 flex-direction flex-justify-space">
-              <view class="">
-                <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
-                  {{goods.goods_name}}都算iOS对哦哎对哦哎对哦啊速度iOS
-                </view>
-                <view class="fc-6" v-show="goods.goods_attr">
-                  {{goods.goods_attr}}
-                </view>
-              </view>
-              <view class="flex-justify-space">
-                <view class="">
-                  <span class="fs-24 fc-FB3D03 fw-400">¥</span>
-                  <span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
-                </view>
-                <view class="display-flex align-items-center">
-                  <image class="wh-44" @click.stop="setShoppingSave(goods,2)"
-                    src="@/static/img/order-food/reduce-img.png" mode="">
-                  </image>
-                  <view class="right-only-right-2 text-align-center fs-28 fw-400">
-                    {{goods.goods_number}}
-                  </view>
-                  <image class="wh-44" src="/static/img/order-food/add-img.png" @click.stop="setShoppingSave(goods,1)"
-                    mode=""></image>
-                </view>
-              </view>
-            </view>
-          </view>
-          <en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0" message="快去选购商品吧!~"></en-blank>
-        </view>
-        <view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
-          <view
-            class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-            <view class="align-items-center">
-              <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
-              </image>
-              <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
-              </view>
-              <view class="align-items-baseline">
-                <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-                <view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
-              </view>
-            </view>
-
-            <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-              :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-            </view>
-          </view>
-        </view>
-      </view>
-    </uni-popup>
-  </view>
+	<view class="shop-index iPhone-bottom flex-direction box-border-box">
+
+		<image v-show="!navBgType" class="bg-img" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
+			:class="scrollTop > newNavHeight?'z-4':'z-3'"></image>
+		<image v-show="navBgType" class="bg-img-type z-4" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
+			:style="{height:newNavHeight+'rpx',opacity:opacity}"></image>
+
+		<newNav :leftShow="false" :textType='false' class="z-4 mb-32" @navHeight='navHeight'>
+			<view slot="textContentSlot" class="align-items-center flex-justify-end">
+				<view class="ss-box b-rad-50 mr-24 align-items-center flex-justify-center z-4" @click.stop="goSearch">
+					<image class="shop-search" src="@/static/img/order-food/shop-search.png" mode=""></image>
+				</view>
+				<view class="dd-box align-items-center flex-justify-center b-rad-200 mr-24 z-4" @click="goToOrder">
+					<image class="shp-list-img mr-8" src="@/static/img/order-food/shp-list.png" mode=""></image>
+					<view class="fs-28 fc-f">
+						订单
+					</view>
+				</view>
+			</view>
+		</newNav>
+
+		<view class="bgc-f box-border-box plr-32 mb-32 shop-info">
+			<view class="shop-info-box bgc-f box-border-box p-24 z-3 b-rad-20">
+				<view class="fs-40 fw-600 text-overflow-ellipsis">
+					{{shopsInfo.shop_name || ''}}
+				</view>
+				<view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15" v-if="shopsInfo.notice">
+					公告:{{shopsInfo.notice || '暂无公告'}}
+				</view>
+			</view>
+		</view>
+
+		<view class="b-b-eee bgc-f box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
+			<view class="align-items-center shop-type-list">
+				<view class="shop-item fs-36 mb-8 mr-64" @click="seletShopType(item)"
+					:class="shopType === item.id?'fc-3 fw-600':'fc-6'" v-for="(item,i) in shopTypeList" :key="i">
+					{{item.name}}
+				</view>
+				<view class="shop-item-bs bgc-FF3333" :style="{left:shopTypeBsLeft+'rpx'}"></view>
+			</view>
+			<view class="align-items-center">
+				<image class="zh-icon mr-8" src="@/static/img/order-food/zh-icon.png" mode="aspectFill"></image>
+				<view class="fw-600 fs-32 fc-3">
+					桌号:{{table_number}}
+				</view>
+			</view>
+		</view>
+
+		<!-- <view class="bgc-f sticky-nav" :style="{ height: navBgType?`calc(100vh - ${newNavHeight}rpx - ${48}rpx)`:'auto'}"> -->
+		<view class="bgc-F7F8FA">
+			<view class="menu-box box-border-box align-items-flex-start" v-if="shopType === 1">
+
+				<view class="menu-box-left" :style="{top: newNavHeight + 'rpx'}">
+					<view class="menu-box-left-box pb-130 box-border-box"
+						:style="{height: menuLeftType?`calc(100vh - ${newNavHeight}rpx - ${68}rpx)`:''}">
+						<view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
+							v-for="(item,i) in categoryList" :key="i" @click="selectType(item)"
+							:class="type ===  item.category_id?'bgc-f fc-3 fw-600':'fc-6 fw-400'"
+							:id="'left-scroll'+ item.category_id">
+							{{item.name}}
+							<view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<view class="menu-box-only bgc-f pb-130 box-border-box">
+					<view class="" v-for="(item,i) in goodsList" :key="i" :id="'scroll'+ item.type">
+						<view class="fs-28 fw-600 fc-3 sticky-nav bgc-f p-20 box-border-box"
+							:style="{top: newNavHeight + 'rpx'}">
+							{{item.name}}
+						</view>
+						<view class="" v-if="item.list <= 0">
+							<EnBlank message='暂无商品' :customSrc='true'>
+								<template v-slot:blankImg>
+									<image class="<strong>black-custom-img</strong>" src="@/static/img/common/no-order.png" mode="">
+									</image>
+								</template>
+							</EnBlank>
+						</view>
+						<view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
+							:id="'goods_id'+ info.goods_id">
+							<image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
+							<view class="menu-list-right flex-direction flex-justify-space">
+								<view class="mb-8">
+									<view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
+										{{info.goods_name}}
+									</view>
+									<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
+										v-if="info.spec_type == 1">
+										{{info.goods_desc?info.goods_desc:''}}
+									</view>
+								</view>
+								<view class="flex-justify-space align-items-flex-end">
+									<view class="">
+										<span class="fs-24 fw-400 fc-FB3D03">¥</span>
+										<span
+											class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
+									</view>
+									<view class="display-flex align-items-center" v-if="info.spec_type == 1">
+										<image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
+											src="@/static/img/order-food/reduce-img.png" mode=""></image>
+										<view v-show="info.num > 0"
+											class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}
+										</view>
+										<image class="wh-44" src="@/static/img/order-food/add-img.png"
+											@click="addred(2,info)" mode="">
+										</image>
+									</view>
+									<view v-else class="right-only-right text-align-center b-rad-200"
+										@click="addred(3,info)">
+										<view class="fw-600 fs-28 fc-f">
+											选规格
+										</view>
+										<view class="selectedNum" v-if="info.num>0">
+											{{info.num}}
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<ShopInfo style="height: 100%;" v-else-if="shopType === 2"></ShopInfo>
+
+		</view>
+
+		<view v-if="shopType === 1" class="shop-buttom-money box-border-box" @click="openBuyCrad()">
+			<view
+				class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+				<view class="align-items-center">
+					<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
+					<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}</view>
+					<view class="align-items-baseline">
+						<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+						<view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
+					</view>
+				</view>
+
+				<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+					:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+				</view>
+			</view>
+		</view>
+
+		<uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
+			<view class="buy-card flex-index-css">
+				<view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
+					<view class="">
+						<span class="fs-32 fc-3 mr-12">已选商品</span>
+					</view>
+					<view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
+						<view class="">
+							<uni-icons type="trash" size="18" color="#999"></uni-icons>
+						</view>
+						<view class="fs-28 fw-400 fc-9">清空</view>
+					</view>
+				</view>
+				<view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
+					<view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
+						v-for="(goods,i) in cartData.goods_list" :key="i">
+						<image class="goods_img flex-shrink0" :src="goods.goods_image" mode="scaleToFill"></image>
+						<view class="flex-1 flex-direction flex-justify-space">
+							<view class="">
+								<view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
+									{{goods.goods_name}}都算iOS对哦哎对哦哎对哦啊速度iOS
+								</view>
+								<view class="fc-6" v-show="goods.goods_attr">
+									{{goods.goods_attr}}
+								</view>
+							</view>
+							<view class="flex-justify-space">
+								<view class="">
+									<span class="fs-24 fc-FB3D03 fw-400">¥</span>
+									<span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
+								</view>
+								<view class="display-flex align-items-center">
+									<image class="wh-44" @click.stop="setShoppingSave(goods,2)"
+										src="@/static/img/order-food/reduce-img.png" mode="">
+									</image>
+									<view class="right-only-right-2 text-align-center fs-28 fw-400">
+										{{goods.goods_number}}
+									</view>
+									<image class="wh-44" src="/static/img/order-food/add-img.png"
+										@click.stop="setShoppingSave(goods,1)" mode=""></image>
+								</view>
+							</view>
+						</view>
+					</view>
+					<en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0"
+						message="快去选购商品吧!~"></en-blank>
+				</view>
+				<view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
+					<view
+						class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+						<view class="align-items-center">
+							<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
+							</image>
+							<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
+							</view>
+							<view class="align-items-baseline">
+								<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+								<view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
+							</view>
+						</view>
+
+						<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+							:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
 <script>
-  import newMenu from './shop-mod/new-menu.vue';
-  import ShopInfo from './shop-mod/info.vue';
-  import tools from "@/service/tools";
-  import EnBlank from "@/components/en-utils/en-blank/en-blank";
-  import cartStore from '@/utils/cartStore.js';
-  import {
-    getGoodsCategory,
-    getGoodsGoods
-  } from '@/api/goods.js'
-  import {
-    receiveCoupon
-  } from "@/api/coupon.js"
-  import {
-    shopInfo
-  } from "@/api/shop.js"
-  import {
-    getDeliveryMoney
-  } from "@/api/common";
-  import {
-    getShopIngList,
-    setShopIngDel,
-    shoppingSave
-  } from "@/api/shopping";
-  export default {
-    components: {
-      newMenu,
-      ShopInfo,
-      EnBlank
-    },
-    data() {
-      return {
-        domHeigjt: 0,
-        shopTypeList: [{
-          name: "点单",
-          id: 1
-        }, {
-          name: "商家",
-          id: 2
-        }],
-        table_number: '',
-        shopType: 1, //组件类型
-        shopTypeBsLeft: 12,
-        shop_id: '',
-        operate_id: '',
-        shopsInfo: {},
-        // cartData: {
-        // 	total_price: 0,
-        // 	total_num: 0,
-        // 	total_goods_money: 0,
-        // 	pack_price: 0,
-        // 	must_category: 0,
-        // 	is_place_order: 0,
-        // 	err_msg: 0,
-        // 	goods_list: [],
-        // },
-        isAjax: false,
-        newNavHeight: '',
-        navBgType: false,
-        menuLeftType: false,
-        scrollTop: 0,
-        opacity: 0,
-        heightOne: '',
-        heightTwo: '',
-        topHeight: '',
-        idMark: '', //滚动自适应参数
-        idMarkTwo: '', //滚动自适应参数
-        type: '', //默认分类标识
-        categoryList: [],
-        goodsList: [],
-        cartData: {
-          total_price: 0,
-          total_num: 0,
-          pack_price: 0,
-          total_goods_money: 0,
-          goods_list: [],
-        }
-      }
-    },
-    onShow() {
-      this.getShopIngList();
-    },
-    onLoad(e) {
-      cartStore.setShopId();
-      this.getshopInfo();
-    },
-    mounted() {},
-    onReachBottom(e) {},
-    // 监听页面滚动
-    onPageScroll(e) {
-      // e.scrollTop 获取滚动条距离页面顶部的距离
-      this.scrollTop = e.scrollTop
-      this.opacity = (Number(this.scrollTop) - 30)
-      // 可以根据滚动位置执行相应逻辑
-      if (e.scrollTop > 25) {
-        this.navBgType = true
-      } else {
-        this.navBgType = false
-      }
-      if (e.scrollTop > (Number(this.newNavHeight) - 4)) {
-        this.menuLeftType = true
-      } else {
-        this.menuLeftType = false
-      }
-    },
-    methods: {
-      shopInfo() {
-        // 获取商家详情
-        shopInfo().then((res) => {
-          if (res.code === 1) {
-            this.shopsInfo = res.data
-          }
-        })
-      },
-      getGoodsCategory() {
-        //获取商家分类
-        getGoodsCategory().then((res) => {
-          if (res.code === 1) {
-            this.categoryList = res.data
-            this.type = res.data[0].category_id
-          }
-        })
-      },
-      getGoodsGoods() {
-        //获取商家商品列表
-        getGoodsGoods().then((res) => {
-          if (res.code === 1) {
-            // 初始化商品列表
-            this.goodsList = res.data
-            // 从购物车数据中回显每个商品的数量
-            this.updateGoodsNumFromCart()
-          }
-        })
-      },
-      getShopIngList() {
-        // 获取购物车列表
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (shopCart) {
-          this.cartData = {
-            ...this.cartData,
-            total_price: shopCart.total_price,
-            total_num: shopCart.total_num,
-            pack_price: shopCart.pack_price, //配送费总额
-            total_goods_money: shopCart.total_goods_money, //商品价格总额
-            goods_list: shopCart.goods_list
-          };
-          // 同步更新商品列表中的数量
-          this.updateGoodsNumFromCart();
-        }
-      },
-      getshopInfo() {
-        this.table_number = uni.getStorageSync('table_number')
-        this.shopInfo()
-        this.getGoodsCategory()
-        this.getGoodsGoods()
-      },
-      updateGoodsNumFromCart() {
-        // 从购物车数据同步商品数量
-        if (!this.goodsList) return;
-
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (!shopCart) return;
-
-        // 创建商品数量映射
-        const goodsQuantityMap = {};
-        const cartGoodsPackPriceMap = {}; // 存储商品配送费信息
-
-        shopCart.goods_list.forEach(item => {
-          if (!goodsQuantityMap[item.goods_id]) {
-            goodsQuantityMap[item.goods_id] = 0;
-            cartGoodsPackPriceMap[item.goods_id] = 0;
-          }
-          // 累加同一个商品不同规格的数量
-          goodsQuantityMap[item.goods_id] += item.goods_number;
-          // 累加同一个商品不同规格的配送费(按数量计算)
-          cartGoodsPackPriceMap[item.goods_id] += parseFloat(item.pack_price || 0) * (item
-            .goods_number || 0);
-        });
-
-        // 更新商品列表数量
-        this.goodsList.forEach(category => {
-          if (category.list && category.list.length > 0) {
-            category.list.forEach(goods => {
-              goods.num = goodsQuantityMap[goods.goods_id] || 0;
-            });
-          }
-        });
-
-        // 更新分类列表中的商品数量
-        this.updateCategoryNum()
-      },
-      updateCategoryNum() {
-        // 更新分类的商品总数
-        if (!this.categoryList || !this.goodsList) {
-          return
-        }
-
-        this.categoryList.forEach(categoryItem => {
-          // 找到对应的商品分类
-          const goodsCategory = this.goodsList.find(
-            category => category.type === categoryItem.category_id
-          )
-
-          if (goodsCategory && goodsCategory.list) {
-            // 计算该分类下所有商品的总数量
-            const totalNum = goodsCategory.list.reduce((sum, goods) => {
-              return sum + (goods.num || 0)
-            }, 0)
-            categoryItem.num = totalNum
-          } else {
-            categoryItem.num = 0
-          }
-        })
-      },
-      goToOrder() {
-        uni.navigateTo({
-          url: 'pages/order/index'
-        })
-      },
-      goSearch() {
-        uni.navigateTo({
-          url: 'pages/index/search-record'
-        })
-      },
-      selectType(item, itemTwo) {
-        if (this.type != item.category_id) {
-          this.type = item.category_id;
-          this.idMark = 'scroll' + item.category_id
-
-          // 立即更新
-          this.$forceUpdate();
-
-          // 延迟执行滚动
-          setTimeout(() => {
-            this.scrollToCategorySimple(item.category_id);
-          }, 100);
-        }
-      },
-
-      // 滚动方法
-      scrollToCategorySimple(type) {
-        const query = uni.createSelectorQuery();
-        const selector = `#scroll${type}`;
-        uni.pageScrollTo({
-          selector: selector,
-          duration: 300,
-        });
-        return
-        let targetScrollTop = 0
-        query.select('.shop-info').boundingClientRect(rect => {
-          console.log('商家详情', rect);
-          targetScrollTop += rect.height
-        })
-        query.select('.shop-type-box').boundingClientRect(rect => {
-          console.log('详情切换', rect);
-          targetScrollTop += rect.height + this.newNavHeight
-          console.log('固定上部分位置', targetScrollTop);
-        })
-        query.select(selector).boundingClientRect(rect => {
-          console.log('id找到元素,top:', rect);
-          uni.pageScrollTo({
-            scrollTop: targetScrollTop,
-            duration: 300,
-            success: () => {
-              console.log('滚动完成');
-            }
-          });
-        }).exec();
-      },
-      addred(type, item) {
-        if (type === 1) {
-          // 减
-          --item.num;
-          if (item.num >= 0) {
-            this.shoppingSave(item, item.num)
-          }
-        } else if (type === 2) {
-          // 加
-          ++item.num;
-          this.shoppingSave(item, item.num)
-        } else if (type === 3) {
-          // 选规格
-          uni.navigateTo({
-            url: `pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}&shop_id=${this.shop_id}`
-          })
-        }
-      },
-      shoppingSave(item, num) {
-        // 前端处理购物车
-        // const goodsData = {
-        // 	goods_id: item.goods_id,
-        // 	goods_name: item.goods_name,
-        // 	goods_image: item.goods_image,
-        // 	category_id: item.category_id,
-        // 	seckill_money: item.seckill_money || 0,
-        // 	price: item.price || 0,
-        // 	pack_price: item.pack_price || 0, // 添加配送费
-        // 	spec_type: item.spec_type || 1,
-        // 	goods_desc: item.goods_desc || '',
-        // 	line_price: item.line_price || '',
-        // 	sales: item.sales || 0
-        // };
-        if (num <= 0) {
-          // 数量为0,移除商品
-          cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-        } else {
-          // 更新商品数量
-          const success = cartStore.updateQuantity(
-            item.goods_id,
-            item.goods_spec || [],
-            num
-          );
-          if (!success) {
-            // 如果更新失败,尝试添加新商品
-            cartStore.addToCart(item, item.goods_spec || [], num);
-          }
-        }
-        // 更新页面数据
-        this.getShopIngList();
-        this.$forceUpdate();
-      },
-      findGoodsInList(goodsId) {
-        // 在商品列表中查找指定商品
-        for (let category of this.goodsList) {
-          if (category.list) {
-            const goods = category.list.find(item => item.goods_id === goodsId)
-            if (goods) {
-              return goods
-            }
-          }
-        }
-        return null
-      },
-      navHeight(e) {
-        this.newNavHeight = e
-      },
-      setShopIngDel() {
-        uni.showModal({
-          title: '提示',
-          content: '是否清除购物车商品?',
-          success: (res) => {
-            if (res.confirm) {
-              cartStore.clearCurrentShopCart();
-              this.getShopIngList();
-              this.$refs.popupBuy.close();
-              uni.showToast({
-                title: '已清空购物车',
-                icon: 'success'
-              });
-            }
-          }
-        });
-      },
-      setShoppingSave(item, type) {
-        if (type === 1) {
-          // 加
-          item.goods_number = item.goods_number + 1
-        } else {
-          // 减
-          item.goods_number = item.goods_number - 1
-        }
-
-        if (item.goods_number <= 0) {
-          // 数量为0,移除商品
-          cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-        } else {
-          // 更新商品数量
-          cartStore.updateQuantity(
-            item.goods_id,
-            item.goods_spec || [],
-            item.goods_number
-          );
-        }
-        // 更新页面数据
-        this.getShopIngList();
-      },
-      setCartData(cartData) {
-        this.cartData = cartData
-        this.getDeliveryMoney()
-      },
-      getDeliveryMoney() {
-        getDeliveryMoney({
-          'school_id': this.operate_id,
-          'shop_id': this.shop_id,
-        }).then(res => {
-          if (res.code === 1) {
-            this.delivery_money = res.data.delivery_money * 1
-          }
-        })
-      },
-      toBack() {
-        tools.leftClick()
-      },
-      getDomH(num) {
-        this.$nextTick(() => {
-          let info = uni.createSelectorQuery().select('#shopInfoBox');
-          info.boundingClientRect((data) => {
-            if (num === 1) {
-              this.domHeigjt = data.height + 72
-            } else {
-              this.domHeigjt = data.height + 72 + 48
-            }
-          }).exec()
-        })
-      },
-      seletShopType(item) {
-        if (this.shopType != item.id) {
-          this.shopType = item.id;
-          if (this.shopType == 1) {
-            this.shopTypeBsLeft = 12
-          } else if (this.shopType == 2) {
-            this.shopTypeBsLeft = 150
-          } else {
-            this.shopTypeBsLeft = 160 * 2
-          }
-        }
-      },
-      openBuyCrad() {
-        this.$refs.popupBuy.open()
-      },
-      createOrder() {
-        this.$refs.popupBuy.close()
-      },
-      toConfirmOrder() {
-        uni.navigateTo({
-          url: '/pages-takeout/goods-order'
-        })
-      },
-      shopInfo() {
-        const operate_id = uni.getStorageSync('operate_id')
-        shopInfo({
-          operate_id: operate_id,
-          shop_id: this.shop_id
-        }).then((res) => {
-          if (res.code == 1) {
-            this.shopsInfo = res.data
-          } else {
-            tools.error(res.msg)
-            setTimeout(() => {
-              uni.navigateBack({
-                delta: 1
-              })
-            }, 1500)
-          }
-        })
-      }
-    },
-  }
+	import ShopInfo from './shop-mod/info.vue';
+	import tools from "@/service/tools";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
+	import cartStore from '@/utils/cartStore.js';
+	import {
+		getGoodsCategory,
+		getGoodsGoods
+	} from '@/api/goods.js'
+	import {
+		receiveCoupon
+	} from "@/api/coupon.js"
+	import {
+		shopInfo
+	} from "@/api/shop.js"
+	import {
+		getDeliveryMoney
+	} from "@/api/common";
+	import {
+		getShopIngList,
+		setShopIngDel,
+		shoppingSave
+	} from "@/api/shopping";
+	export default {
+		components: {
+			ShopInfo,
+			EnBlank
+		},
+		data() {
+			return {
+				domHeigjt: 0,
+				shopTypeList: [{
+					name: "点单",
+					id: 1
+				}, {
+					name: "商家",
+					id: 2
+				}],
+				table_number: '',
+				shopType: 1, //组件类型
+				shopTypeBsLeft: 12,
+				shop_id: '',
+				operate_id: '',
+				shopsInfo: {},
+				// cartData: {
+				// 	total_price: 0,
+				// 	total_num: 0,
+				// 	total_goods_money: 0,
+				// 	pack_price: 0,
+				// 	must_category: 0,
+				// 	is_place_order: 0,
+				// 	err_msg: 0,
+				// 	goods_list: [],
+				// },
+				isAjax: false,
+				newNavHeight: '',
+				navBgType: false,
+				menuLeftType: false,
+				scrollTop: 0,
+				opacity: 0,
+				heightOne: '',
+				heightTwo: '',
+				topHeight: '',
+				idMark: '', //滚动自适应参数
+				idMarkTwo: '', //滚动自适应参数
+				type: '', //默认分类标识
+				categoryList: [],
+				goodsList: [],
+				cartData: {
+					total_price: 0,
+					total_num: 0,
+					pack_price: 0,
+					total_goods_money: 0,
+					goods_list: [],
+				}
+			}
+		},
+		onShow() {
+			this.getShopIngList();
+		},
+		onLoad(e) {
+			cartStore.setShopId();
+			this.getshopInfo();
+			console.log();
+		},
+		mounted() {},
+		onReachBottom(e) {},
+		// 监听页面滚动
+		onPageScroll(e) {
+			// e.scrollTop 获取滚动条距离页面顶部的距离
+			this.scrollTop = e.scrollTop
+			this.opacity = (Number(this.scrollTop) - 30)
+			// 可以根据滚动位置执行相应逻辑
+			if (e.scrollTop > 25) {
+				this.navBgType = true
+			} else {
+				this.navBgType = false
+			}
+			if (e.scrollTop > (Number(this.newNavHeight) - 4)) {
+				this.menuLeftType = true
+			} else {
+				this.menuLeftType = false
+			}
+		},
+		methods: {
+			shopInfo() {
+				// 获取商家详情
+				shopInfo().then((res) => {
+					if (res.code === 1) {
+						this.shopsInfo = res.data
+					}
+				})
+			},
+			getGoodsCategory() {
+				//获取商家分类
+				getGoodsCategory().then((res) => {
+					if (res.code === 1) {
+						this.categoryList = res.data
+						this.type = res.data[0].category_id
+					}
+				})
+			},
+			getGoodsGoods() {
+				//获取商家商品列表
+				getGoodsGoods().then((res) => {
+					if (res.code === 1) {
+						// 初始化商品列表
+						this.goodsList = res.data
+						// 从购物车数据中回显每个商品的数量
+						this.updateGoodsNumFromCart()
+					}
+				})
+			},
+			getShopIngList() {
+				// 获取购物车列表
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (shopCart) {
+					this.cartData = {
+						...this.cartData,
+						total_price: shopCart.total_price,
+						total_num: shopCart.total_num,
+						pack_price: shopCart.pack_price, //配送费总额
+						total_goods_money: shopCart.total_goods_money, //商品价格总额
+						goods_list: shopCart.goods_list
+					};
+					// 同步更新商品列表中的数量
+					this.updateGoodsNumFromCart();
+				}
+			},
+			getshopInfo() {
+				this.table_number = uni.getStorageSync('table_number')
+				this.shopInfo()
+				this.getGoodsCategory()
+				this.getGoodsGoods()
+			},
+			updateGoodsNumFromCart() {
+				// 从购物车数据同步商品数量
+				if (!this.goodsList) return;
+
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (!shopCart) return;
+
+				// 创建商品数量映射
+				const goodsQuantityMap = {};
+				const cartGoodsPackPriceMap = {}; // 存储商品配送费信息
+
+				shopCart.goods_list.forEach(item => {
+					if (!goodsQuantityMap[item.goods_id]) {
+						goodsQuantityMap[item.goods_id] = 0;
+						cartGoodsPackPriceMap[item.goods_id] = 0;
+					}
+					// 累加同一个商品不同规格的数量
+					goodsQuantityMap[item.goods_id] += item.goods_number;
+					// 累加同一个商品不同规格的配送费(按数量计算)
+					cartGoodsPackPriceMap[item.goods_id] += parseFloat(item.pack_price || 0) * (item
+						.goods_number || 0);
+				});
+
+				// 更新商品列表数量
+				this.goodsList.forEach(category => {
+					if (category.list && category.list.length > 0) {
+						category.list.forEach(goods => {
+							goods.num = goodsQuantityMap[goods.goods_id] || 0;
+						});
+					}
+				});
+
+				// 更新分类列表中的商品数量
+				this.updateCategoryNum()
+			},
+			updateCategoryNum() {
+				// 更新分类的商品总数
+				if (!this.categoryList || !this.goodsList) {
+					return
+				}
+
+				this.categoryList.forEach(categoryItem => {
+					// 找到对应的商品分类
+					const goodsCategory = this.goodsList.find(
+						category => category.type === categoryItem.category_id
+					)
+
+					if (goodsCategory && goodsCategory.list) {
+						// 计算该分类下所有商品的总数量
+						const totalNum = goodsCategory.list.reduce((sum, goods) => {
+							return sum + (goods.num || 0)
+						}, 0)
+						categoryItem.num = totalNum
+					} else {
+						categoryItem.num = 0
+					}
+				})
+			},
+			goToOrder() {
+				uni.navigateTo({
+					url: 'pages/order/index'
+				})
+			},
+			goSearch() {
+				uni.navigateTo({
+					url: 'pages/index/search-record'
+				})
+			},
+			selectType(item, itemTwo) {
+				if (this.type != item.category_id) {
+					this.type = item.category_id;
+					this.idMark = 'scroll' + item.category_id
+
+					// 立即更新
+					this.$forceUpdate();
+
+					// 延迟执行滚动
+					setTimeout(() => {
+						this.scrollToCategorySimple(item.category_id);
+					}, 100);
+				}
+			},
+
+			// 滚动方法
+			scrollToCategorySimple(type) {
+				const query = uni.createSelectorQuery();
+				const selector = `#scroll${type}`;
+				uni.pageScrollTo({
+					selector: selector,
+					duration: 300,
+				});
+				return
+				let targetScrollTop = 0
+				query.select('.shop-info').boundingClientRect(rect => {
+					console.log('商家详情', rect);
+					targetScrollTop += rect.height
+				})
+				query.select('.shop-type-box').boundingClientRect(rect => {
+					console.log('详情切换', rect);
+					targetScrollTop += rect.height + this.newNavHeight
+					console.log('固定上部分位置', targetScrollTop);
+				})
+				query.select(selector).boundingClientRect(rect => {
+					console.log('id找到元素,top:', rect);
+					uni.pageScrollTo({
+						scrollTop: targetScrollTop,
+						duration: 300,
+						success: () => {
+							console.log('滚动完成');
+						}
+					});
+				}).exec();
+			},
+			addred(type, item) {
+				if (type === 1) {
+					// 减
+					--item.num;
+					if (item.num >= 0) {
+						this.shoppingSave(item, item.num)
+					}
+				} else if (type === 2) {
+					// 加
+					++item.num;
+					this.shoppingSave(item, item.num)
+				} else if (type === 3) {
+					// 选规格
+					uni.navigateTo({
+						url: `pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}&shop_id=${this.shop_id}`
+					})
+				}
+			},
+			shoppingSave(item, num) {
+				// 前端处理购物车
+				// const goodsData = {
+				// 	goods_id: item.goods_id,
+				// 	goods_name: item.goods_name,
+				// 	goods_image: item.goods_image,
+				// 	category_id: item.category_id,
+				// 	seckill_money: item.seckill_money || 0,
+				// 	price: item.price || 0,
+				// 	pack_price: item.pack_price || 0, // 添加配送费
+				// 	spec_type: item.spec_type || 1,
+				// 	goods_desc: item.goods_desc || '',
+				// 	line_price: item.line_price || '',
+				// 	sales: item.sales || 0
+				// };
+				if (num <= 0) {
+					// 数量为0,移除商品
+					cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+				} else {
+					// 更新商品数量
+					const success = cartStore.updateQuantity(
+						item.goods_id,
+						item.goods_spec || [],
+						num
+					);
+					if (!success) {
+						// 如果更新失败,尝试添加新商品
+						cartStore.addToCart(item, item.goods_spec || [], num);
+					}
+				}
+				// 更新页面数据
+				this.getShopIngList();
+				this.$forceUpdate();
+			},
+			findGoodsInList(goodsId) {
+				// 在商品列表中查找指定商品
+				for (let category of this.goodsList) {
+					if (category.list) {
+						const goods = category.list.find(item => item.goods_id === goodsId)
+						if (goods) {
+							return goods
+						}
+					}
+				}
+				return null
+			},
+			navHeight(e) {
+				this.newNavHeight = e
+			},
+			setShopIngDel() {
+				uni.showModal({
+					title: '提示',
+					content: '是否清除购物车商品?',
+					success: (res) => {
+						if (res.confirm) {
+							cartStore.clearCurrentShopCart();
+							this.getShopIngList();
+							this.$refs.popupBuy.close();
+							uni.showToast({
+								title: '已清空购物车',
+								icon: 'success'
+							});
+						}
+					}
+				});
+			},
+			setShoppingSave(item, type) {
+				if (type === 1) {
+					// 加
+					item.goods_number = item.goods_number + 1
+				} else {
+					// 减
+					item.goods_number = item.goods_number - 1
+				}
+
+				if (item.goods_number <= 0) {
+					// 数量为0,移除商品
+					cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+				} else {
+					// 更新商品数量
+					cartStore.updateQuantity(
+						item.goods_id,
+						item.goods_spec || [],
+						item.goods_number
+					);
+				}
+				// 更新页面数据
+				this.getShopIngList();
+			},
+			setCartData(cartData) {
+				this.cartData = cartData
+				this.getDeliveryMoney()
+			},
+			getDeliveryMoney() {
+				getDeliveryMoney({
+					'school_id': this.operate_id,
+					'shop_id': this.shop_id,
+				}).then(res => {
+					if (res.code === 1) {
+						this.delivery_money = res.data.delivery_money * 1
+					}
+				})
+			},
+			toBack() {
+				tools.leftClick()
+			},
+			getDomH(num) {
+				this.$nextTick(() => {
+					let info = uni.createSelectorQuery().select('#shopInfoBox');
+					info.boundingClientRect((data) => {
+						if (num === 1) {
+							this.domHeigjt = data.height + 72
+						} else {
+							this.domHeigjt = data.height + 72 + 48
+						}
+					}).exec()
+				})
+			},
+			seletShopType(item) {
+				if (this.shopType != item.id) {
+					this.shopType = item.id;
+					if (this.shopType == 1) {
+						this.shopTypeBsLeft = 12
+					} else if (this.shopType == 2) {
+						this.shopTypeBsLeft = 150
+					} else {
+						this.shopTypeBsLeft = 160 * 2
+					}
+				}
+			},
+			openBuyCrad() {
+				this.$refs.popupBuy.open()
+			},
+			createOrder() {
+				this.$refs.popupBuy.close()
+			},
+			toConfirmOrder() {
+				uni.navigateTo({
+					url: '/pages-takeout/goods-order'
+				})
+			},
+			shopInfo() {
+				const operate_id = uni.getStorageSync('operate_id')
+				shopInfo({
+					operate_id: operate_id,
+					shop_id: this.shop_id
+				}).then((res) => {
+					if (res.code == 1) {
+						this.shopsInfo = res.data
+					} else {
+						tools.error(res.msg)
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 1500)
+					}
+				})
+			}
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-  .car-scroll-box {
-    padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
-  }
-
-  .zh-icon {
-    width: 32rpx;
-    height: 32rpx;
-  }
-
-  .shp-list-img {
-    width: 40rpx;
-    height: 40rpx;
-  }
-
-  .dd-box {
-    width: 144rpx;
-    padding: 12rpx 0;
-    background: rgba(0, 0, 0, 0.14);
-  }
-
-  .ss-box {
-    width: 64rpx;
-    height: 64rpx;
-    background: rgba(0, 0, 0, 0.14);
-  }
-
-  .shop-search {
-    width: 40rpx;
-    height: 40rpx;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .blank-text {
-    line-height: 32vh;
-  }
-
-  .box-title {
-    position: relative;
-  }
-
-  .box-close {
-    position: absolute;
-    right: 22rpx;
-  }
-
-  .pop-coupon {
-    width: 100%;
-    height: 42vh;
-    background-color: #F5F4F9;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-    padding-top: 32rpx !important;
-    display: flex;
-    flex-direction: column;
-  }
-
-  .item-right {
-    padding: 24rpx;
-    box-sizing: border-box;
-    border-radius: 20rpx 0 0 20rpx;
-    position: relative;
-  }
-
-  .item-hr {
-    width: 0px;
-    height: auto;
-    border-right: 1rpx dashed #FB7850;
-  }
-
-  .item-hr-two {
-    width: 0px;
-    height: auto;
-    border-right: 1rpx dashed #999;
-  }
-
-  .item-left {
-    width: 220rpx;
-    height: auto;
-    padding: 20rpx 24rpx;
-    box-sizing: border-box;
-    position: relative;
-    border-radius: 0 20rpx 20rpx 0;
-  }
-
-  .but-box {
-    width: 152rpx;
-    height: 52rpx;
-    line-height: 52rpx;
-    text-align: center;
-    background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
-    border-radius: 200rpx;
-  }
-
-  .ball {
-    width: 24rpx;
-    height: 24rpx;
-    border-radius: 50%;
-    position: absolute;
-    top: -12rpx;
-    left: -12rpx;
-    background: #F5F5F5;
-    z-index: 2;
-  }
-
-  .ball-two {
-    width: 24rpx;
-    height: 24rpx;
-    border-radius: 50%;
-    position: absolute;
-    background: #F5F5F5;
-    z-index: 10;
-    bottom: -12rpx;
-    left: -12rpx;
-  }
-
-  .shop-index {
-    width: 100%;
-    min-height: 100vh;
-    height: auto;
-    position: relative;
-  }
-
-  .right-only-right-red {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    border-radius: 12rpx;
-    border: 1rpx solid #41ABF5;
-    color: #41ABF5;
-  }
-
-  .right-only-right-add {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-    border-radius: 12rpx;
-  }
-
-  .right-only-right-2 {
-    min-width: 50rpx;
-  }
-
-  .w-514 {
-    width: 480rpx;
-  }
-
-  .bg-img {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 300rpx;
-    transition: linear .3s all;
-    // height: 300rpx;
-  }
-
-  .bg-img-type {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    // opacity: 100;
-    transition: linear .3s all;
-  }
-
-  .mb-box {
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 300rpx;
-    z-index: -1;
-  }
-
-
-  .nav-img {
-    width: 56rpx;
-    height: 56rpx;
-  }
-
-  .shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-    background: rgba(255, 255, 255, 0.8);
-    padding-left: 24rpx;
-    padding-right: 24rpx;
-    padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
-    padding-top: 22rpx;
-    // padding: 20rpx 24rpx;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 5;
-  }
-
-  .pop-shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-    background: #ECECEC;
-    padding-left: 24rpx;
-    padding-right: 24rpx;
-    padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
-    padding-top: 22rpx;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 5;
-  }
-
-  .shop-buttom-num {
-    width: 32rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    border-radius: 50%;
-    position: absolute;
-    top: 0rpx;
-    left: 85rpx;
-    border: 1rpx solid #FFFFFF;
-  }
-
-  .shop-buttom-money-2 {
-    width: 200rpx;
-    height: 80rpx;
-    line-height: 80rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-  }
-
-  .info-box-top {}
-
-  .box-top-right {
-    width: 100rpx;
-    height: 100rpx;
-    border-radius: 12rpx;
-  }
-
-  .box-top-left {}
-
-  .top-left-1 {
-    width: 480rpx;
-    margin-bottom: 8rpx;
-  }
-
-  .img-x {
-    width: 24rpx;
-    height: 24rpx;
-  }
-
-  .buy-card {
-    height: 60vh;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .buy-card-top {
-    width: 100%;
-    height: 92rpx;
-    background: #FCF5DB;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .buy-card-item {
-    width: 100%;
-    // height: 176rpx;
-    margin-bottom: 32rpx;
-  }
-
-  .goods_img {
-    width: 152rpx;
-    height: 152rpx;
-    border-radius: 12rpx;
-    margin-right: 20rpx;
-  }
-
-  .shop-buttom-money-1 {
-    width: 100%;
-    height: 96rpx;
-    position: relative;
-  }
-
-  .gwc-img {
-    width: 88rpx;
-    height: 88rpx;
-  }
-
-  .head-box {
-    width: 100%;
-    position: relative;
-  }
-
-  .shop-info-box {
-    box-shadow: 0rpx 8rpx 56rpx 0rpx rgba(154, 152, 152, 0.34);
-  }
-
-  .info-box-quan-list {
-    width: 164rpx;
-    height: 48rpx;
-    margin: 0 8rpx 8rpx 0;
-    position: relative;
-
-    image {
-      width: 164rpx;
-      height: 48rpx;
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 1;
-    }
-  }
-
-  .quan-list-1 {
-    position: absolute;
-    top: 3rpx;
-    left: 8rpx;
-    z-index: 2;
-  }
-
-  .quan-list-2 {
-    position: absolute;
-    top: 8rpx;
-    right: 22rpx;
-    z-index: 2;
-  }
-
-  .shop-type-list {
-    // height: 88rpx;
-    position: relative;
-  }
-
-  .shop-item {
-    position: relative;
-  }
-
-  .pj-num {
-    position: absolute;
-    right: -80rpx;
-    top: 0;
-    text-align: left;
-    width: 80rpx;
-  }
-
-  .shop-item-bs {
-    position: absolute;
-    bottom: 0;
-    width: 40rpx;
-    height: 6rpx;
-    border-radius: 20rpx;
-    transition: left 0.5s;
-  }
-
-  .sticky-nav {
-    width: 100%;
-    position: sticky;
-    z-index: 3;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .menu-box-left-f {
-    position: sticky;
-    // transition: all .3s ease;
-    // overflow: auto;
-  }
-
-  .menu-box-left {
-    width: 160rpx;
-    height: auto;
-    position: sticky;
-    overflow: auto;
-    // transition: all .3s ease;
-    // height: 100%;
-    // background-color: #F7F8FA;
-    // position: absolute;
-    // left: 0;
-    // top: 0;
-    // border-radius: 0rpx 20rpx 0 0rpx;
-  }
-
-  .menu-box-left-box {
-    overflow-y: auto;
-
-  }
-
-  .menu-type-list {
-    width: 160rpx;
-    min-height: 108rpx;
-    padding: 18rpx 28rpx;
-    position: relative;
-    z-index: 10;
-    border-radius: 0rpx 20rpx 20rpx 0rpx;
-
-    .menu-type-num {
-      position: absolute;
-      top: 2rpx;
-      right: 8rpx;
-      padding: 0 6rpx;
-      min-width: 20rpx;
-      height: 32rpx;
-      text-align: center;
-      line-height: 32rpx;
-      background: #FE6B2C;
-      border-radius: 50%;
-    }
-  }
-
-  .menu-type-list-f {
-    // width: 160rpx;
-    background-color: #007AFF;
-    width: 100%;
-    height: 100%;
-    overflow-y: auto;
-    /* 如果分类项很多,允许内部滚动 */
-    -webkit-overflow-scrolling: touch;
-    /* 改善移动端滚动体验 */
-    // height: 100%;
-  }
-
-  .menu-box-only {
-    // flex: 1;
-    width: calc(100% - 160rpx);
-  }
-
-  .menu-box-right {
-    // flex: 1;
-    width: 100%;
-    height: 100%;
-    // padding: 16rpx 0;
-    // box-sizing: border-box;
-    // position: relative;
-  }
-
-  .menu-list {
-    width: 100%;
-    padding: 0 20rpx 40rpx;
-    // height: 200rpx;
-    // margin-bottom: 40rpx;
-
-    .goods_img {
-      width: 200rpx;
-      height: 200rpx;
-      border-radius: 12rpx;
-      margin-right: 16rpx;
-    }
-
-    .menu-list-right {
-      flex: 1;
-
-      .right-only-right {
-        width: 116rpx;
-        height: 44rpx;
-        background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-        line-height: 44rpx;
-        position: relative;
-
-        .selectedNum {
-          position: absolute;
-          right: -10rpx;
-          top: -22rpx;
-          font-size: 24rpx;
-          color: #fff;
-          width: 32rpx;
-          height: 32rpx;
-          line-height: 32rpx;
-          background: #FE6B2C;
-          border-radius: 50%;
-          border: 1rpx solid #FFFFFF;
-        }
-      }
-
-      .right-only-right-red {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        border-radius: 12rpx;
-        border: 1rpx solid #41ABF5;
-        color: #41ABF5;
-      }
-
-      .right-only-right-add {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-        border-radius: 12rpx;
-      }
-
-      .right-only-right-2 {
-        min-width: 50rpx;
-      }
-    }
-  }
-</style>
+	.car-scroll-box {
+		padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
+	}
+
+	.zh-icon {
+		width: 32rpx;
+		height: 32rpx;
+	}
+
+	.shp-list-img {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.dd-box {
+		width: 144rpx;
+		padding: 12rpx 0;
+		background: rgba(0, 0, 0, 0.14);
+	}
+
+	.ss-box {
+		width: 64rpx;
+		height: 64rpx;
+		background: rgba(0, 0, 0, 0.14);
+	}
+
+	.shop-search {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.blank-text {
+		line-height: 32vh;
+	}
+
+	.box-title {
+		position: relative;
+	}
+
+	.box-close {
+		position: absolute;
+		right: 22rpx;
+	}
+
+	.pop-coupon {
+		width: 100%;
+		height: 42vh;
+		background-color: #F5F4F9;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+		padding-top: 32rpx !important;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.item-right {
+		padding: 24rpx;
+		box-sizing: border-box;
+		border-radius: 20rpx 0 0 20rpx;
+		position: relative;
+	}
+
+	.item-hr {
+		width: 0px;
+		height: auto;
+		border-right: 1rpx dashed #FB7850;
+	}
+
+	.item-hr-two {
+		width: 0px;
+		height: auto;
+		border-right: 1rpx dashed #999;
+	}
+
+	.item-left {
+		width: 220rpx;
+		height: auto;
+		padding: 20rpx 24rpx;
+		box-sizing: border-box;
+		position: relative;
+		border-radius: 0 20rpx 20rpx 0;
+	}
+
+	.but-box {
+		width: 152rpx;
+		height: 52rpx;
+		line-height: 52rpx;
+		text-align: center;
+		background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
+		border-radius: 200rpx;
+	}
+
+	.ball {
+		width: 24rpx;
+		height: 24rpx;
+		border-radius: 50%;
+		position: absolute;
+		top: -12rpx;
+		left: -12rpx;
+		background: #F5F5F5;
+		z-index: 2;
+	}
+
+	.ball-two {
+		width: 24rpx;
+		height: 24rpx;
+		border-radius: 50%;
+		position: absolute;
+		background: #F5F5F5;
+		z-index: 10;
+		bottom: -12rpx;
+		left: -12rpx;
+	}
+
+	.shop-index {
+		width: 100%;
+		min-height: 100vh;
+		height: auto;
+		position: relative;
+	}
+
+	.right-only-right-red {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		border-radius: 12rpx;
+		border: 1rpx solid #41ABF5;
+		color: #41ABF5;
+	}
+
+	.right-only-right-add {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
+		border-radius: 12rpx;
+	}
+
+	.right-only-right-2 {
+		min-width: 50rpx;
+	}
+
+	.w-514 {
+		width: 480rpx;
+	}
+
+	.bg-img {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 300rpx;
+		transition: linear .3s all;
+		// height: 300rpx;
+	}
+
+	.bg-img-type {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		// opacity: 100;
+		transition: linear .3s all;
+	}
+
+	.mb-box {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 300rpx;
+		z-index: -1;
+	}
+
+
+	.nav-img {
+		width: 56rpx;
+		height: 56rpx;
+	}
+
+	.shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+		background: rgba(255, 255, 255, 0.8);
+		padding-left: 24rpx;
+		padding-right: 24rpx;
+		padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
+		padding-top: 22rpx;
+		// padding: 20rpx 24rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 5;
+	}
+
+	.pop-shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+		background: #ECECEC;
+		padding-left: 24rpx;
+		padding-right: 24rpx;
+		padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
+		padding-top: 22rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 5;
+	}
+
+	.shop-buttom-num {
+		width: 32rpx;
+		height: 32rpx;
+		line-height: 32rpx;
+		border-radius: 50%;
+		position: absolute;
+		top: 0rpx;
+		left: 85rpx;
+		border: 1rpx solid #FFFFFF;
+	}
+
+	.shop-buttom-money-2 {
+		width: 200rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+	}
+
+	.info-box-top {}
+
+	.box-top-right {
+		width: 100rpx;
+		height: 100rpx;
+		border-radius: 12rpx;
+	}
+
+	.box-top-left {}
+
+	.top-left-1 {
+		width: 480rpx;
+		margin-bottom: 8rpx;
+	}
+
+	.img-x {
+		width: 24rpx;
+		height: 24rpx;
+	}
+
+	.buy-card {
+		height: 60vh;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.buy-card-top {
+		width: 100%;
+		height: 92rpx;
+		background: #FCF5DB;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.buy-card-item {
+		width: 100%;
+		// height: 176rpx;
+		margin-bottom: 32rpx;
+	}
+
+	.goods_img {
+		width: 152rpx;
+		height: 152rpx;
+		border-radius: 12rpx;
+		margin-right: 20rpx;
+	}
+
+	.shop-buttom-money-1 {
+		width: 100%;
+		height: 96rpx;
+		position: relative;
+	}
+
+	.gwc-img {
+		width: 88rpx;
+		height: 88rpx;
+	}
+
+	.head-box {
+		width: 100%;
+		position: relative;
+	}
+
+	.shop-info-box {
+		box-shadow: 0rpx 8rpx 56rpx 0rpx rgba(154, 152, 152, 0.34);
+	}
+
+	.info-box-quan-list {
+		width: 164rpx;
+		height: 48rpx;
+		margin: 0 8rpx 8rpx 0;
+		position: relative;
+
+		image {
+			width: 164rpx;
+			height: 48rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+	}
+
+	.quan-list-1 {
+		position: absolute;
+		top: 3rpx;
+		left: 8rpx;
+		z-index: 2;
+	}
+
+	.quan-list-2 {
+		position: absolute;
+		top: 8rpx;
+		right: 22rpx;
+		z-index: 2;
+	}
+
+	.shop-type-list {
+		// height: 88rpx;
+		position: relative;
+	}
+
+	.shop-item {
+		position: relative;
+	}
+
+	.pj-num {
+		position: absolute;
+		right: -80rpx;
+		top: 0;
+		text-align: left;
+		width: 80rpx;
+	}
+
+	.shop-item-bs {
+		position: absolute;
+		bottom: 0;
+		width: 40rpx;
+		height: 6rpx;
+		border-radius: 20rpx;
+		transition: left 0.5s;
+	}
+
+	.sticky-nav {
+		width: 100%;
+		position: sticky;
+		z-index: 3;
+	}
+
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.menu-box-left-f {
+		position: sticky;
+		// transition: all .3s ease;
+		// overflow: auto;
+	}
+
+	.menu-box-left {
+		width: 160rpx;
+		height: auto;
+		position: sticky;
+		overflow: auto;
+		// transition: all .3s ease;
+		// height: 100%;
+		// background-color: #F7F8FA;
+		// position: absolute;
+		// left: 0;
+		// top: 0;
+		// border-radius: 0rpx 20rpx 0 0rpx;
+	}
+
+	.menu-box-left-box {
+		overflow-y: auto;
+
+	}
+
+	.menu-type-list {
+		width: 160rpx;
+		min-height: 108rpx;
+		padding: 18rpx 28rpx;
+		position: relative;
+		z-index: 10;
+		border-radius: 0rpx 20rpx 20rpx 0rpx;
+
+		.menu-type-num {
+			position: absolute;
+			top: 2rpx;
+			right: 8rpx;
+			padding: 0 6rpx;
+			min-width: 20rpx;
+			height: 32rpx;
+			text-align: center;
+			line-height: 32rpx;
+			background: #FE6B2C;
+			border-radius: 50%;
+		}
+	}
+
+	.menu-type-list-f {
+		// width: 160rpx;
+		background-color: #007AFF;
+		width: 100%;
+		height: 100%;
+		overflow-y: auto;
+		/* 如果分类项很多,允许内部滚动 */
+		-webkit-overflow-scrolling: touch;
+		/* 改善移动端滚动体验 */
+		// height: 100%;
+	}
+
+	.menu-box-only {
+		// flex: 1;
+		width: calc(100% - 160rpx);
+	}
+
+	.menu-box-right {
+		// flex: 1;
+		width: 100%;
+		height: 100%;
+		// padding: 16rpx 0;
+		// box-sizing: border-box;
+		// position: relative;
+	}
+
+	.menu-list {
+		width: 100%;
+		padding: 0 20rpx 40rpx;
+		// height: 200rpx;
+		// margin-bottom: 40rpx;
+
+		.goods_img {
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 12rpx;
+			margin-right: 16rpx;
+		}
+
+		.menu-list-right {
+			flex: 1;
+
+			.right-only-right {
+				width: 116rpx;
+				height: 44rpx;
+				background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+				line-height: 44rpx;
+				position: relative;
+
+				.selectedNum {
+					position: absolute;
+					right: -10rpx;
+					top: -22rpx;
+					font-size: 24rpx;
+					color: #fff;
+					width: 32rpx;
+					height: 32rpx;
+					line-height: 32rpx;
+					background: #FE6B2C;
+					border-radius: 50%;
+					border: 1rpx solid #FFFFFF;
+				}
+			}
+
+			.right-only-right-red {
+				width: 44rpx;
+				height: 44rpx;
+				line-height: 40rpx;
+				border-radius: 12rpx;
+				border: 1rpx solid #41ABF5;
+				color: #41ABF5;
+			}
+
+			.right-only-right-add {
+				width: 44rpx;
+				height: 44rpx;
+				line-height: 40rpx;
+				background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
+				border-radius: 12rpx;
+			}
+
+			.right-only-right-2 {
+				min-width: 50rpx;
+			}
+		}
+	}
+</style>

+ 436 - 430
pages-takeout/new-specs-info.vue

@@ -1,456 +1,462 @@
 <template>
-  <view class="flex-common-css iPhone-bottom box-border-box bgc-f">
-    <newNav :leftShow="false" :textType='false' class="z-4" @navHeight='navHeight'>
-      <view slot="leftContent" class="align-items-center nav-left-box pl-32 box-border-box">
-        <view class="nav-left box-border-box b-rad-32 align-items-center flex-justify-space">
-          <uni-icons type="left" size="25" :color="leftIconColor" @click="goBack"></uni-icons>
-          <view class="align-items-center">
-            <view class="hr mr-16"></view>
-            <image class="fx-icon" src="/static/img/order-food/fx.png" mode=""></image>
-          </view>
-        </view>
-      </view>
-    </newNav>
-    <image class="goods-img" :src="infoData.goods_image" mode="aspectFill"></image>
-    <view class="image-box" :style="{height: `calc(41vh - ${newNavHeight}rpx)`}"></view>
-    <view class="goods-name-box">
-      <view class="goods-name b-rad-24-24-0-0 p-32-32-0 box-border-box bgc-f">
-        <view class="fs-36 fw-600 fc-3">
-          {{infoData.goods_name || ''}}
-        </view>
-        <view class="pt-20 fs-28 fc-6" v-if="infoData.goods_desc">
-          {{infoData.goods_desc}}
-        </view>
-      </view>
-    </view>
-    <view class="scroll-view-css plr-32 box-border-box">
-      <view class="b-t-eee ptb-30">
-        <view class="mb-16" v-for="(item,i) in specsData" :key="i">
-          <view class="fs-28 fc-7 mb-16">
-            {{item.sku_name}}
-          </view>
-          <view class="align-items-center flex-wrap-wrap w-add-16">
-            <view class="specs-item b-rad-12 align-items-center flex-justify-evenly mr-16 mb-16 plr-12 box-border-box"
-              :class="spec_key.indexOf(info.spec_id)>=0?'s-item bgc-FAE9E9 b-FF3333':'n-item bgc-F5F5F5'"
-              v-for="(info,index_two) in item.spec_list" :key="index_two" @click="selectSpec(item,info)">
-              <view class="count-box b-rad-50 bgc-FE6B2C fs-22 fc-f text-align-center"
-                v-if="item.affect_quantity === 1 && info.spec_num > 0">
-                {{info.spec_num}}
-              </view>
-              <image v-if="spec_key.indexOf(info.spec_id)>=0 && info.spec_num > 0" class="set-num-img mr-30"
-                src="@/static/img/order-food/reduce-img.png" @click.stop="setNum(item,info,0)" mode="">
-              </image>
-              <view class="align-items-center info-text">
-                <view class="" :class="spec_key.indexOf(info.spec_id)>=0?'fc-FF3333':'fc-0'">
-                  {{info.spec_name}}
-                </view>
-                <view class="" :class="spec_key.indexOf(info.spec_id)>=0?'fc-FF3333':'fc-0'"
-                  v-if="info.spec_price && item.affect_quantity != 0">
-                  ¥{{info.spec_price}}
-                </view>
-              </view>
-              <image v-if="spec_key.indexOf(info.spec_id)>=0 && info.spec_num > 0" class="set-num-img ml-30"
-                src="@/static/img/order-food/add-img.png" @click.stop="setNum(item,info,1)" mode=""></image>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="bot-box box-border-box">
-      <view class="align-items-center flex-justify-space mb-20">
-        <view class="">
-          <view class="align-items-baseline">
-            <view class="fs-32 fc-3 fw-600 mr-4">
-              ¥
-            </view>
-            <view class="fs-48 fc-3 fw-600">
-              {{total_price.toFixed(2)}}
-            </view>
-          </view>
-          <view class="fs-24 fc-9">
-            {{spec_text}}
-          </view>
-        </view>
-        <view class="align-items-center">
-          <image class="cz-img" src="@/static/img/order-food/reduce-img.png" mode="" @click="changeGoodsNum(0)"></image>
-          <view class="plr-16 fs-32 fc-3 fw-400">
-            {{postData.number}}
-          </view>
-          <image class="cz-img" src="@/static/img/order-food/add-img.png" mode="" @click="changeGoodsNum(1)">
-          </image>
-        </view>
-      </view>
-      <view class="but-box text-align-center fs-32 fc-f fw-600 b-rad-200" @click="addShoppingCart">
-        加入购物车
-      </view>
-    </view>
-  </view>
+	<view class="flex-common-css iPhone-bottom box-border-box bgc-f">
+		<newNav :leftShow="false" :textType='false' class="z-4" @navHeight='navHeight'>
+			<view slot="leftContent" class="align-items-center nav-left-box pl-32 box-border-box">
+				<view class="nav-left box-border-box b-rad-32 align-items-center flex-justify-space">
+					<uni-icons type="left" size="25" :color="leftIconColor" @click="goBack"></uni-icons>
+					<view class="align-items-center">
+						<view class="hr mr-16"></view>
+						<image class="fx-icon" src="/static/img/order-food/fx.png" mode=""></image>
+					</view>
+				</view>
+			</view>
+		</newNav>
+		<image class="goods-img" :src="infoData.goods_image" mode="aspectFill"></image>
+		<view class="image-box" :style="{height: `calc(41vh - ${newNavHeight}rpx)`}"></view>
+		<view class="goods-name-box">
+			<view class="goods-name b-rad-24-24-0-0 p-32-32-0 box-border-box bgc-f">
+				<view class="fs-36 fw-600 fc-3">
+					{{infoData.goods_name || ''}}
+				</view>
+				<view class="pt-20 fs-28 fc-6" v-if="infoData.goods_desc">
+					{{infoData.goods_desc}}
+				</view>
+			</view>
+		</view>
+		<view class="scroll-view-css plr-32 box-border-box">
+			<view class="b-t-eee ptb-30">
+				<view class="mb-16" v-for="(item,i) in specsData" :key="i">
+					<view class="fs-28 fc-7 mb-16">
+						{{item.sku_name}}
+					</view>
+					<view class="align-items-center flex-wrap-wrap w-add-16">
+						<view
+							class="specs-item b-rad-12 align-items-center flex-justify-evenly mr-16 mb-16 plr-12 box-border-box"
+							:class="spec_key.indexOf(info.spec_id)>=0?'s-item bgc-FAE9E9 b-FF3333':'n-item bgc-F5F5F5'"
+							v-for="(info,index_two) in item.spec_list" :key="index_two" @click="selectSpec(item,info)">
+							<view class="count-box b-rad-50 bgc-FE6B2C fs-22 fc-f text-align-center"
+								v-if="item.affect_quantity === 1 && info.spec_num > 0">
+								{{info.spec_num}}
+							</view>
+							<image v-if="spec_key.indexOf(info.spec_id)>=0 && info.spec_num > 0"
+								class="set-num-img mr-30" src="@/static/img/order-food/reduce-img.png"
+								@click.stop="setNum(item,info,0)" mode="">
+							</image>
+							<view class="align-items-center info-text">
+								<view class="" :class="spec_key.indexOf(info.spec_id)>=0?'fc-FF3333':'fc-0'">
+									{{info.spec_name}}
+								</view>
+								<view class="" :class="spec_key.indexOf(info.spec_id)>=0?'fc-FF3333':'fc-0'"
+									v-if="info.spec_price && item.affect_quantity != 0">
+									¥{{info.spec_price}}
+								</view>
+							</view>
+							<image v-if="spec_key.indexOf(info.spec_id)>=0 && info.spec_num > 0"
+								class="set-num-img ml-30" src="@/static/img/order-food/add-img.png"
+								@click.stop="setNum(item,info,1)" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="bot-box box-border-box">
+			<view class="align-items-center flex-justify-space mb-20">
+				<view class="">
+					<view class="align-items-baseline">
+						<view class="fs-32 fc-3 fw-600 mr-4">
+							¥
+						</view>
+						<view class="fs-48 fc-3 fw-600">
+							{{total_price.toFixed(2)}}
+						</view>
+					</view>
+					<view class="fs-24 fc-9">
+						{{spec_text}}
+					</view>
+				</view>
+				<view class="align-items-center">
+					<image class="cz-img" src="@/static/img/order-food/reduce-img.png" mode=""
+						@click="changeGoodsNum(0)"></image>
+					<view class="plr-16 fs-32 fc-3 fw-400">
+						{{postData.number}}
+					</view>
+					<image class="cz-img" src="@/static/img/order-food/add-img.png" mode="" @click="changeGoodsNum(1)">
+					</image>
+				</view>
+			</view>
+			<view class="but-box text-align-center fs-32 fc-f fw-600 b-rad-200" @click="addShoppingCart">
+				加入购物车
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-  import cartStore from '@/utils/cartStore.js';
-  import {
-    getGoodsGoodsSpec
-  } from "@/api/goods.js"
-  import {
-    shoppingSave
-  } from "@/api/shopping.js"
-  import tools from "@/service/tools"
-  export default {
-    components: {},
-    data() {
-      return {
-        infoData: {},
-        newNavHeight: '',
-        specsData: [],
-        spec_key: [],
-        total_price: 0,
-        spec_text: '请选择规格',
-        postData: {
-          goods_id: '',
-          category_id: '',
-          goods_spec: [],
-          number: 1
-        }
-      }
-    },
-    watch: {
-      // 监听相关数据变化,自动计算总价和拼接规格文字
-      'postData.goods_spec': {
-        handler() {
-          this.updatePriceAndText();
-        },
-        deep: true
-      },
-      'postData.number': {
-        handler() {
-          this.updatePriceAndText();
-        }
-      }
-    },
-    onLoad(data) {
-      if (data) {
-        this.postData.goods_id = data.goods_id
-        this.postData.category_id = data.category_id
-        cartStore.setShopId();
-        this.getGoodsGoodsSpec(data.goods_id)
-      }
-    },
-    mounted() {},
-    methods: {
-      // 添加商品数量
-      changeGoodsNum(type) {
-        if (type === 0) {
-          // 减少数量
-          if (this.postData.number > 1) {
-            this.postData.number--;
-          }
-        } else {
-          // 增加数量
-          this.postData.number++;
-        }
-      },
-      // 更新总价和规格文字
-      updatePriceAndText() {
-        let basePrice = 0; // 假设商品基础价格,可以从接口获取
-        let specPrice = 0;
-        let specArray = [];
-        // 遍历所有规格组
-        this.specsData.forEach(group => {
-          group.spec_list.forEach(spec => {
-            // 检查规格是否被选中
-            if (this.spec_key.includes(spec.spec_id)) {
-              // 获取规格数量
-              let specNum = group.affect_quantity === 1 ? spec.spec_num : 1;
-              // 累加价格
-              specPrice += spec.spec_price * specNum;
-              // 构建规格文字
-              let specName = spec.spec_name;
-              if (group.sku_type === 2 && specNum > 1) {
-                // 多选且数量大于1,显示 ×数量
-                specName += `×${specNum}`;
-              }
-              specArray.push(specName);
-            }
-          });
-        });
-        // 计算总价:基础价格 + 规格价格 × 商品数量
-        this.total_price = ((basePrice + specPrice) * this.postData.number) + Number(this.infoData.price);
-        // 拼接规格文字
-        if (specArray.length > 0) {
-          this.spec_text = specArray.join('、');
-        } else {
-          this.spec_text = '请选择规格';
-        }
-        // this.$forceUpdate();
-      },
-      addShoppingCart() {
-        // 构建商品对象
-        const goodsData = {
-          goods_id: this.postData.goods_id,
-          goods_name: this.infoData.goods_name,
-          goods_image: this.infoData.goods_image,
-          goods_attr: this.spec_text,
-          category_id: this.postData.category_id,
-          seckill_money: this.infoData.seckill_money || 0,
-          price: this.infoData.price || 0,
-          pack_price: this.infoData.pack_price || 0, // 添加配送费
-          spec_type: 2, // 多规格商品
-          goods_desc: this.infoData.goods_desc || ''
-        };
-        // 计算单价
-        const unitPrice = this.total_price / this.postData.number;
+	import cartStore from '@/utils/cartStore.js';
+	import {
+		getGoodsGoodsSpec
+	} from "@/api/goods.js"
+	import {
+		shoppingSave
+	} from "@/api/shopping.js"
+	import tools from "@/service/tools"
+	export default {
+		components: {},
+		data() {
+			return {
+				infoData: {},
+				newNavHeight: '',
+				specsData: [],
+				spec_key: [],
+				total_price: 0,
+				spec_text: '请选择规格',
+				postData: {
+					goods_id: '',
+					category_id: '',
+					goods_spec: [],
+					number: 1
+				}
+			}
+		},
+		watch: {
+			// 监听相关数据变化,自动计算总价和拼接规格文字
+			'postData.goods_spec': {
+				handler() {
+					this.updatePriceAndText();
+				},
+				deep: true
+			},
+			'postData.number': {
+				handler() {
+					this.updatePriceAndText();
+				},
+				deep: true
+			}
+		},
+		onLoad(data) {
+			if (data) {
+				this.postData.goods_id = data.goods_id
+				this.postData.category_id = data.category_id
+				cartStore.setShopId();
+				this.getGoodsGoodsSpec(data.goods_id)
+			}
+		},
+		mounted() {},
+		methods: {
+			// 添加商品数量
+			changeGoodsNum(type) {
+				if (type === 0) {
+					// 减少数量
+					if (this.postData.number > 1) {
+						this.postData.number--;
+					}
+				} else {
+					// 增加数量
+					this.postData.number++;
+				}
+			},
+			// 更新总价和规格文字
+			updatePriceAndText() {
+				let basePrice = 0; // 假设商品基础价格,可以从接口获取
+				let specPrice = 0;
+				let specArray = [];
+				// 遍历所有规格组
+				this.specsData.forEach(group => {
+					group.spec_list.forEach(spec => {
+						// 检查规格是否被选中
+						if (this.spec_key.includes(spec.spec_id)) {
+							// 获取规格数量
+							let specNum = group.affect_quantity === 1 ? spec.spec_num : 1;
+							// 累加价格
+							specPrice += spec.spec_price * specNum;
+							// 构建规格文字
+							let specName = spec.spec_name;
+							if (group.sku_type === 2 && specNum > 1) {
+								// 多选且数量大于1,显示 ×数量
+								specName += `×${specNum}`;
+							}
+							specArray.push(specName);
+						}
+					});
+				});
+				specPrice = specPrice === 0 ? 1 : specPrice
+				// 计算总价:基础价格 + 规格价格 × 商品数量
+				this.total_price = ((basePrice + specPrice + Number(this.infoData.price)) * this.postData.number);
+				// 拼接规格文字
+				if (specArray.length > 0) {
+					this.spec_text = specArray.join('、');
+				} else {
+					this.spec_text = '请选择规格';
+				}
+				this.$forceUpdate();
+			},
+			addShoppingCart() {
+				// 构建商品对象
+				const goodsData = {
+					goods_id: this.postData.goods_id,
+					goods_name: this.infoData.goods_name,
+					goods_image: this.infoData.goods_image,
+					goods_attr: this.spec_text,
+					category_id: this.postData.category_id,
+					seckill_money: this.infoData.seckill_money || 0,
+					price: this.infoData.price || 0,
+					pack_price: this.infoData.pack_price || 0, // 添加配送费
+					spec_type: 2, // 多规格商品
+					goods_desc: this.infoData.goods_desc || ''
+				};
+				// 计算单价
+				const unitPrice = this.total_price / this.postData.number;
 
-        // 构建规格数组
-        const specs = this.postData.goods_spec.map(spec => {
-          return {
-            id: spec.id,
-            number: spec.number,
-            // 这里需要从规格数据中获取规格名称和价格
-            name: this.getSpecNameById(spec.id),
-            price: this.getSpecPriceById(spec.id)
-          };
-        });
+				// 构建规格数组
+				const specs = this.postData.goods_spec.map(spec => {
+					return {
+						id: spec.id,
+						number: spec.number,
+						// 这里需要从规格数据中获取规格名称和价格
+						name: this.getSpecNameById(spec.id),
+						price: this.getSpecPriceById(spec.id)
+					};
+				});
 
-        // 添加到购物车
-        const success = cartStore.addToCart(
-          goodsData,
-          specs,
-          this.postData.number
-        );
+				// 添加到购物车
+				const success = cartStore.addToCart(
+					goodsData,
+					specs,
+					this.postData.number
+				);
 
-        if (success) {
-          uni.showToast({
-            title: '加入购物车成功',
-            icon: 'success'
-          });
+				if (success) {
+					uni.showToast({
+						title: '加入购物车成功',
+						icon: 'success'
+					});
 
-          setTimeout(() => {
-            // 返回时传递成功信息
-            const eventChannel = this.getOpenerEventChannel();
-            if (eventChannel) {
-              eventChannel.emit('cartUpdated', {
-                success: true
-              });
-            }
-            uni.navigateBack({
-              delta: 1
-            });
-          }, 1000);
-        } else {
-          uni.showToast({
-            title: '加入购物车失败',
-            icon: 'error'
-          });
-        }
-      },
-      getSpecNameById(specId) {
-        // 根据规格ID获取规格名称
-        for (let group of this.specsData) {
-          for (let spec of group.spec_list) {
-            if (spec.spec_id === specId) {
-              return spec.spec_name;
-            }
-          }
-        }
-        return '';
-      },
-      getSpecPriceById(specId) {
-        // 根据规格ID获取规格价格
-        for (let group of this.specsData) {
-          for (let spec of group.spec_list) {
-            if (spec.spec_id === specId) {
-              return spec.spec_price || 0;
-            }
-          }
-        }
-        return 0;
-      },
-      shoppingSave() {
-        shoppingSave(this.postData).then((res) => {
-          if (res.code === 1) {
-            tools.success(res.msg)
-            this.isAjax = false
-            setTimeout(() => {
-              uni.navigateBack({
-                delta: 1
-              })
-            }, 1000)
-          } else {
-            this.isAjax = false
-            tools.error(res.msg)
-          }
-        })
-      },
-      setNum(item, info, type) {
-        if (type === 0) {
-          info.spec_num -= 1;
-          if (info.spec_num <= 0) {
-            const infoKey = this.spec_key.indexOf(info.spec_id)
-            if (infoKey != -1) {
-              this.spec_key.splice(infoKey, 1)
-              this.postData.goods_spec.splice(infoKey, 1)
-            }
-          }
-        } else {
-          info.spec_num += 1;
-        }
-        const targetSpec = this.postData.goods_spec.find(e => e.id === info.spec_id);
-        if (targetSpec) {
-          targetSpec.number = info.spec_num;
-        }
-        this.$forceUpdate();
-      },
-      getGoodsGoodsSpec(goods_id) {
-        getGoodsGoodsSpec({
-          goods_id: goods_id
-        }).then((res) => {
-          if (res.code * 1 === 1) {
-            this.specsData = res.data.sku
-            this.infoData = res.data.goods
-            this.addSpecNum()
-          }
-        })
-      },
-      addSpecNum() {
-        this.specsData.forEach((v, k) => {
-          if (v.affect_quantity === 1) {
-            v.spec_list.forEach(spec => {
-              spec.spec_num = 0;
-            });
-          } else {
-            this.addSpec(v.spec_list[0])
-          }
-        })
-      },
-      navHeight(e) {
-        this.newNavHeight = e
-      },
-      goBack() {
-        uni.navigateBack({
-          delta: 1
-        })
-      },
-      selectSpec(item, info) {
-        let specKey = this.spec_key.indexOf(info.spec_id)
-        if (item.sku_type === 1) {
-          //单选
-          item.spec_list.forEach((e, i) => {
-            let infoKey = this.spec_key.indexOf(e.spec_id)
-            if (infoKey >= 0) {
-              this.spec_key.splice(infoKey, 1)
-              this.postData.goods_spec.splice(infoKey, 1)
-            }
-          })
-          this.addSpec(info)
+					setTimeout(() => {
+						// 返回时传递成功信息
+						const eventChannel = this.getOpenerEventChannel();
+						if (eventChannel) {
+							eventChannel.emit('cartUpdated', {
+								success: true
+							});
+						}
+						uni.navigateBack({
+							delta: 1
+						});
+					}, 1000);
+				} else {
+					uni.showToast({
+						title: '加入购物车失败',
+						icon: 'error'
+					});
+				}
+			},
+			getSpecNameById(specId) {
+				// 根据规格ID获取规格名称
+				for (let group of this.specsData) {
+					for (let spec of group.spec_list) {
+						if (spec.spec_id === specId) {
+							return spec.spec_name;
+						}
+					}
+				}
+				return '';
+			},
+			getSpecPriceById(specId) {
+				// 根据规格ID获取规格价格
+				for (let group of this.specsData) {
+					for (let spec of group.spec_list) {
+						if (spec.spec_id === specId) {
+							return spec.spec_price || 0;
+						}
+					}
+				}
+				return 0;
+			},
+			shoppingSave() {
+				shoppingSave(this.postData).then((res) => {
+					if (res.code === 1) {
+						tools.success(res.msg)
+						this.isAjax = false
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 1000)
+					} else {
+						this.isAjax = false
+						tools.error(res.msg)
+					}
+				})
+			},
+			setNum(item, info, type) {
+				if (type === 0) {
+					info.spec_num -= 1;
+					if (info.spec_num <= 0) {
+						const infoKey = this.spec_key.indexOf(info.spec_id)
+						if (infoKey != -1) {
+							this.spec_key.splice(infoKey, 1)
+							this.postData.goods_spec.splice(infoKey, 1)
+						}
+					}
+				} else {
+					info.spec_num += 1;
+				}
+				const targetSpec = this.postData.goods_spec.find(e => e.id === info.spec_id);
+				if (targetSpec) {
+					targetSpec.number = info.spec_num;
+				}
+				this.$forceUpdate();
+			},
+			getGoodsGoodsSpec(goods_id) {
+				getGoodsGoodsSpec({
+					goods_id: goods_id
+				}).then((res) => {
+					if (res.code * 1 === 1) {
+						this.specsData = res.data.sku
+						this.infoData = res.data.goods
+						this.addSpecNum()
+					}
+				})
+			},
+			addSpecNum() {
+				this.specsData.forEach((v, k) => {
+					if (v.affect_quantity === 1) {
+						v.spec_list.forEach(spec => {
+							spec.spec_num = 0;
+						});
+					} else {
+						this.addSpec(v.spec_list[0])
+					}
+				})
+			},
+			navHeight(e) {
+				this.newNavHeight = e
+			},
+			goBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			selectSpec(item, info) {
+				let specKey = this.spec_key.indexOf(info.spec_id)
+				if (item.sku_type === 1) {
+					//单选
+					item.spec_list.forEach((e, i) => {
+						let infoKey = this.spec_key.indexOf(e.spec_id)
+						if (infoKey >= 0) {
+							this.spec_key.splice(infoKey, 1)
+							this.postData.goods_spec.splice(infoKey, 1)
+						}
+					})
+					this.addSpec(info)
 
-        } else {
-          //多选
-          if (specKey < 0) {
-            if (info.spec_num === 0) {
-              info.spec_num += 1
-              this.addSpec(info)
-            }
-          }
-        }
-      },
-      addSpec(info) {
-        this.spec_key.push(info.spec_id);
-        this.postData.goods_spec.push({
-          id: info.spec_id,
-          number: info.spec_num || 1
-        });
-      }
-    }
-  }
+				} else {
+					//多选
+					if (specKey < 0) {
+						if (info.spec_num === 0) {
+							info.spec_num += 1
+							this.addSpec(info)
+						}
+					}
+				}
+			},
+			addSpec(info) {
+				this.spec_key.push(info.spec_id);
+				this.postData.goods_spec.push({
+					id: info.spec_id,
+					number: info.spec_num || 1
+				});
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-  .nav-left-box {
-    width: 100%;
-    height: 100%;
-  }
+	.nav-left-box {
+		width: 100%;
+		height: 100%;
+	}
 
-  .nav-left {
-    width: 174rpx;
-    height: 100%;
-    background: rgba(255, 255, 255, 0.45);
-    border: 1rpx solid #E3E6EB;
-    padding: 0 20rpx 0 14rpx;
-  }
+	.nav-left {
+		width: 174rpx;
+		height: 100%;
+		background: rgba(255, 255, 255, 0.45);
+		border: 1rpx solid #E3E6EB;
+		padding: 0 20rpx 0 14rpx;
+	}
 
-  .goods-img {
-    width: 100%;
-    height: 41vh;
-    position: absolute;
-    top: 0;
-    left: 0;
-  }
+	.goods-img {
+		width: 100%;
+		height: 41vh;
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
 
-  .fx-icon {
-    width: 48rpx;
-    height: 48rpx;
-  }
+	.fx-icon {
+		width: 48rpx;
+		height: 48rpx;
+	}
 
-  .hr {
-    width: 1rpx;
-    height: 36rpx;
-    background: #e7e7e7;
-  }
+	.hr {
+		width: 1rpx;
+		height: 36rpx;
+		background: #e7e7e7;
+	}
 
-  .goods-name-box {
-    position: relative;
-  }
+	.goods-name-box {
+		position: relative;
+	}
 
-  .goods-name {
-    width: 100%;
-    position: relative;
-    top: -32rpx;
-    left: 0;
-  }
+	.goods-name {
+		width: 100%;
+		position: relative;
+		top: -32rpx;
+		left: 0;
+	}
 
-  .bot-box {
-    padding: 20rpx 32rpx 12rpx;
-    box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
-  }
+	.bot-box {
+		padding: 20rpx 32rpx 12rpx;
+		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
+	}
 
-  .cz-img {
-    width: 44rpx;
-    height: 44rpx;
-  }
+	.cz-img {
+		width: 44rpx;
+		height: 44rpx;
+	}
 
-  .but-box {
-    width: 100%;
-    height: 96rpx;
-    line-height: 96rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-  }
+	.but-box {
+		width: 100%;
+		height: 96rpx;
+		line-height: 96rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+	}
 
-  .specs-item {
-    position: relative;
-    min-width: 218rpx;
-    height: 72rpx;
-  }
+	.specs-item {
+		position: relative;
+		min-width: 218rpx;
+		height: 72rpx;
+	}
 
-  .w-add-16 {
-    width: calc(100% + 22rpx);
-  }
+	.w-add-16 {
+		width: calc(100% + 22rpx);
+	}
 
-  .item-box {
-    position: relative;
-  }
+	.item-box {
+		position: relative;
+	}
 
-  .count-box {
-    width: 28rpx;
-    height: 28rpx;
-    line-height: 28rpx;
-    position: absolute;
-    right: -8rpx;
-    top: -8rpx;
-  }
+	.count-box {
+		width: 28rpx;
+		height: 28rpx;
+		line-height: 28rpx;
+		position: absolute;
+		right: -8rpx;
+		top: -8rpx;
+	}
 
-  .set-num-img {
-    width: 44rpx;
-    height: 44rpx;
-  }
-</style>
+	.set-num-img {
+		width: 44rpx;
+		height: 44rpx;
+	}
+</style>

+ 0 - 920
pages-takeout/shop-mod/new-menu.vue

@@ -1,920 +0,0 @@
-<template>
-  <view class="menu-box box-border-box align-items-flex-start">
-
-    <view class="menu-box-left" :style="{top: newNavHeight + 'rpx'}">
-      <view class="menu-box-left-box" :style="{height: menuLeftType?`calc(100vh - ${newNavHeight}rpx - ${68}rpx)`:''}">
-        <view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
-          v-for="(item,i) in categoryData" :key="i" @click="selectType(item)"
-          :class="type ===  item.type?'bgc-f fc-3 fw-600':'fc-6 fw-400'" :id="'scroll'+ item.type">
-          {{item.name}}
-          <view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}</view>
-        </view>
-      </view>
-    </view>
-
-    <view class="menu-box-only">
-      <view class="" v-for="(item,i) in categoryData" :key="i" :id="'scroll'+ item.type">
-        <view class="fs-28 fw-600 fc-3 sticky-nav bgc-f p-20 box-border-box" :style="{top: newNavHeight + 'rpx'}">
-          {{item.name}}
-        </view>
-        <view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
-          :id="'goods_id'+ info.goods_id">
-          <image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
-          <view class="menu-list-right flex-direction flex-justify-space">
-            <view class="mb-8">
-              <view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">{{info.goods_name}}
-              </view>
-              <view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name" v-if="info.spec_type == 1">
-                {{info.goods_desc?info.goods_desc:''}}
-              </view>
-              <view class="fw-400 fc-9 fs-24">月销{{info.sales}}</view>
-            </view>
-            <view class="flex-justify-space align-items-flex-end">
-              <view class="">
-                <span class="fs-24 fw-400 fc-FB3D03">¥</span>
-                <span class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
-              </view>
-              <view class="display-flex align-items-center" v-if="info.spec_type == 1">
-                <image v-show="info.num > 0" class="wh-44" @click="addred(1,i,k,info)" src="@/static/img/takeout/j.png"
-                  mode=""></image>
-                <view v-show="info.num > 0" class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}
-                </view>
-                <image class="wh-44" src="@/static/img/takeout/add.png" @click="addred(2,i,k,info)" mode=""></image>
-              </view>
-              <view v-else class="right-only-right text-align-center" @click="addred(3,i,k,info)">
-                <view class="fw-600 fs-28 fc-f">
-                  选规格
-                </view>
-                <view class="selectedNum" v-if="info.num>0">
-                  {{info.num}}
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-
-  </view>
-</template>
-
-<script>
-  import tools from "@/service/tools";
-  import {
-    shopCategory,
-    shopGoods,
-    shopGoodsSpec
-  } from "@/api/shop";
-  import {
-    shoppingSave,
-    getShopIngList,
-    setShopIngAdd,
-    setShopIngDel,
-    setShopIngNumber
-  } from "@/api/shopping";
-  export default {
-    name: 'menu-box',
-    props: {
-      'shop_id': {
-        default: 0
-      },
-      'newNavHeight': {
-        default: 0
-      },
-      'menuLeftType': {
-        default: false
-      }
-    },
-    data() {
-      return {
-        idMark: '', //滚动自适应参数
-        idMarkTwo: '', //滚动自适应参数
-        type: 0, //分类标识
-        typeList: [],
-        categoryData: [{
-            type: 0,
-            name: '测试1',
-            list: [{
-              goods_id: 1,
-              goods_name: '测试商品1-1',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }, {
-              goods_id: 2,
-              goods_name: '测试商品1-2',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }, {
-              goods_id: 3,
-              goods_name: '测试商品1-3',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          }, {
-            type: 1,
-            name: '测试2',
-            list: [{
-              goods_id: 4,
-              goods_name: '测试商品2-1',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }, {
-              goods_id: 5,
-              goods_name: '测试商品2-2',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }, {
-              goods_id: 6,
-              goods_name: '测试商品2-3',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          }, {
-            type: 2,
-            name: '测试3',
-            list: [{
-              goods_id: 7,
-              goods_name: '测试商品3',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          }, {
-            type: 3,
-            name: '测试4',
-            list: [{
-              goods_id: 8,
-              goods_name: '测试商品4',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          }, {
-            type: 4,
-            name: '测试5',
-            list: [{
-              goods_id: 9,
-              goods_name: '测试商品5',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          },
-          {
-            type: 5,
-            name: '测试6',
-            list: [{
-              goods_id: 10,
-              goods_name: '测试商品6',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          },
-          {
-            type: 6,
-            name: '测试7',
-            list: [{
-              goods_id: 11,
-              goods_name: '测试商品7',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          },
-          {
-            type: 7,
-            name: '测试8',
-            list: [{
-              goods_id: 12,
-              goods_name: '测试商品8',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          },
-          {
-            type: 8,
-            name: '测试9',
-            list: [{
-              goods_id: 13,
-              goods_name: '测试商品9',
-              price: '10',
-              goods_image: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg'
-            }]
-          },
-        ],
-        menuList: [],
-        cartData: {
-          total_price: 0,
-          total_num: 0,
-          total_goods_money: 0,
-          pack_price: 0,
-          must_category: 0,
-          is_place_order: 0,
-          err_msg: 0,
-          goods_list: [],
-        },
-        isAjax: false,
-        operate_id: '',
-        popData: {
-          goodsItem: {},
-          price: '0.00',
-          line_price: '',
-          num: 0,
-          goods_id: '',
-          is_quota: 0,
-          is_infinite: 0,
-          quota_num: 0,
-          payNum: 0,
-          stock: 0,
-          spec_key: '',
-          goods_spec_id: '',
-          spec_name: [],
-          spec_ids: [],
-          spec_list: [],
-          spec_attr: [],
-        },
-        selectedNum: 1,
-        selectedSpecification: [],
-        scrollType: true
-      }
-    },
-    watch: {},
-    mounted() {},
-    methods: {
-      setSpecNum(type) {
-        // this.popData.spec_ids
-        if (!this.popData.spec_key) {
-          console.log('被阻挡');
-          tools.error('请选择规格')
-          return;
-        }
-        if (type === 1) {
-          // 减
-          console.log('减');
-          if (this.popData.num > 1) {
-            --this.popData.num;
-            this.$forceUpdate()
-          } else {
-            this.isAjax = false
-          }
-        } else {
-          console.log('加');
-          if (this.popData.is_infinite === 0 && this.popData.payNum > this.popData.stock) {
-            console.log('加1');
-            tools.error('商品库存' + this.popData.stock + '件')
-          } else if (this.popData.is_quota > 0 && this.popData.payNum > this.popData.quota_num) {
-            console.log('加2');
-            tools.error('限购' + this.popData.quota_num + '件')
-          } else {
-            // 加
-            console.log('加3');
-            ++this.popData.num;
-            this.$forceUpdate()
-          }
-        }
-
-      },
-      getShopGoodsSpec(item) {
-        console.log(item, this.cartData, 'item');
-        shopGoodsSpec({
-          'goods_id': item.goods_id
-        }).then(res => {
-          console.log(item, 'item');
-          this.popData.goodsItem = item
-          if (this.popData.goods_id !== item.goods_id) {
-            this.popData.goods_id = item.goods_id
-            this.popData.spec_name = []
-            // this.popData.price = '0.00'
-            this.popData.price = item.price
-            this.popData.line_price = ''
-            this.popData.spec_key = ''
-            this.popData.num = 1
-            this.popData.spec_ids = []
-            console.log(this.popData, '走if');
-            this.$forceUpdate()
-          } else {
-            console.log(this.popData, '无');
-            this.popData.num = 1;
-            // this.popData.price = item.price
-            if (this.cartData.goods_list.length > 0) {
-              this.cartData.goods_list.forEach(item => {
-                if (item.goods_spec_id === this.popData.spec_key) {
-                  // this.popData.num = this.selectedSpecification.goods_number
-                  this.popData.num = this.popData.payNum
-                  console.log(this.popData, '走else');
-                  this.$forceUpdate()
-                }
-              })
-            }
-          }
-          this.popData.spec_list = res.data
-          this.popData.spec_attr = res.data
-          console.log(this.selectedSpecification, 'this.selectedSpecification');
-          this.selectedSpecification.forEach((v, k) => {
-            if (v.goods_id === item.goods_id) {
-              v.goodsItem = item
-              v.spec_list = res.data
-              v.spec_attr = res.data
-              v.num = v.goods_number
-              let data = JSON.parse(JSON.stringify(v))
-              this.popData = data
-            }
-          })
-          console.log(this.popData, 'this.popData');
-          this.$refs.popupGG.open();
-          this.setGoodsSpecPrice()
-          this.isAjax = false
-        }).catch(() => {
-          tools.error('规格信息异常')
-          this.isAjax = false
-        })
-      },
-      setGoodsSpecPrice() {
-        console.log(this.popData.spec_ids)
-        if (this.popData.spec_ids.length > 0) {
-          let spec_ids = JSON.parse(JSON.stringify(this.popData.spec_ids))
-          spec_ids.sort((a, b) => a - b);
-          let spec_key = spec_ids.join('_')
-          this.popData.spec_key = spec_key
-        } else {
-          this.popData.num = 1
-          this.popData.goods_spec_id = ''
-        }
-      },
-      setShopIngList(cartData) {
-        this.cartData = cartData
-        this.selectedSpecification = []
-        this.setGoodsNum()
-      },
-      getShopIngList(isStart) {
-        getShopIngList({
-          'shop_id': this.shop_id,
-        }).then(res => {
-          if (res.code === 1) {
-            this.cartData = res.data
-            let data = res.data
-            data.goods_list.forEach((v, k) => {
-              let ge = JSON.parse(JSON.stringify(v))
-              ge.spec_ids = ge.goods_spec_id.split('_').map(item => Number(item.trim()))
-              ge.spec_name = ge.goods_attr.split(',').map(item => item.trim())
-              this.selectedSpecification.push(ge)
-            })
-            console.log(this.selectedSpecification, '初始回显已选数据');
-            this.$emit('setCartData', this.cartData)
-            this.setGoodsNum()
-          }
-        })
-      },
-      setGoodsNum() {
-        if (this.cartData.goods_list.length > 0) {
-          let goodsIds = []
-          this.categoryData.forEach(categoryItem => {
-            categoryItem.list.forEach(goodsItem => {
-              goodsItem.num = 0
-              this.cartData.goods_list.forEach(item => {
-                if (item.goods_id === goodsItem.goods_id) {
-                  if (goodsIds.indexOf(item.goods_id) < 0) {
-                    goodsIds.push(item.goods_id)
-                    goodsItem.num = item.goods_number * 1
-                  } else {
-                    goodsItem.num += item.goods_number * 1
-                  }
-                }
-              })
-            })
-          })
-        } else {
-          //购物车数据清除
-          this.categoryData.forEach(categoryItem => {
-            categoryItem.list.forEach(goodsItem => {
-              goodsItem.num = 0
-            })
-          })
-        }
-      },
-      getShopGoods() {
-        if (this.shop_id < 0 || !this.operate_id) {
-          return;
-        }
-        shopGoods({
-          'shop_id': this.shop_id,
-          operate_id: this.operate_id,
-        }).then(res => {
-          if (res.code === 1) {
-            this.categoryData = res.data
-            const category_id = uni.getStorageSync('category_id')
-            const goods_id = uni.getStorageSync('goods_id')
-            if (category_id.type && category_id.type != 'undefined') {
-              this.selectType(category_id, goods_id)
-            } else {
-              this.selectType(this.categoryData[0])
-            }
-            this.categoryData.forEach(categoryItem => {
-              categoryItem.list.forEach(goodsItem => {
-                goodsItem.payNum = 0
-                goodsItem.spec = []
-              })
-            })
-            setTimeout(() => {
-              this.setGoodsNum()
-            }, 1000)
-          }
-        })
-      },
-      selectType(item, itemTwo) {
-        if (this.type != item.type) {
-          this.type = item.type;
-          this.idMark = 'scroll' + item.type
-          
-          // 触发事件通知父组件需要滚动
-          this.$emit('scrollToCategory', {
-            type: item.type,
-            selector: `#scroll${item.type}`
-          });
-
-          this.$forceUpdate()
-        }
-      },
-      menuScroll(e) {
-        let _this = this;
-        let query = uni.createSelectorQuery().in(this);
-        const goods_id = uni.getStorageSync('goods_id')
-        if (goods_id.goodsId && goods_id.goodsId != 'undefined') {
-          query.selectAll(".menu-list").boundingClientRect(data => {
-            data.forEach((v) => {
-              if (data[this.categoryData.length - 1].top <= 392) {
-                return
-              }
-              if (v.top < 332 && v.top > 0) {
-                // _this.idMark = v.id;
-                let arr = v.id.split('scroll');
-              }
-            })
-            uni.setStorageSync('category_id', '')
-            uni.setStorageSync('goods_id', '')
-          }).exec();
-        } else {
-          query.selectAll(".menu-box-only").boundingClientRect(data => {
-            data.forEach((v) => {
-              if (data[this.categoryData.length - 1].top <= 392) {
-                return
-              }
-              if (v.top < 332 && v.top > 0) {
-                // _this.idMark = v.id;
-                let arr = v.id.split('scroll');
-                _this.type = Number(arr[1]);
-              }
-              this.$forceUpdate()
-            })
-          }).exec();
-        }
-      },
-      addred(type, i, k, item) {
-        if (this.isAjax) {
-          return
-        }
-        this.isAjax = true
-        if (type === 1) {
-          // 减
-          --item.num;
-          if (item.num >= 0) {
-            this.addShoppingSave(item, item.num, type)
-          } else {
-            this.isAjax = false
-          }
-        } else if (type === 2) {
-          // 加
-          ++item.num;
-          if (item.is_infinite === 0 && item.num > item.stock) {
-            tools.error('商品库存' + item.stock + '件')
-              --item.num
-            this.isAjax = false
-          } else if (item.is_quota > 0 && item.num > item.quota_num) {
-            tools.error('限购' + item.quota_num + '件')
-              --item.num
-            this.isAjax = false
-          } else {
-            this.addShoppingSave(item, item.num, type)
-          }
-
-        } else if (type === 3) {
-          // 选规格
-          console.log(item, '000000000')
-          console.log(this.selectedSpecification, '1111111111111');
-          this.selectedSpecification.forEach((v, k) => {
-            if (v.goods_id === item.goods_id) {
-              v.quota_num = item.quota_num
-              v.payNum = item.num
-              v.stock = item.stock
-            }
-          })
-          this.popData.is_quota = item.is_quota
-          this.popData.quota_num = item.quota_num
-          this.popData.is_infinite = item.is_infinite
-          this.popData.payNum = item.num
-          this.popData.stock = item.stock
-          this.getShopGoodsSpec(item)
-        } else {
-          let data = JSON.parse(JSON.stringify(this.popData))
-          this.selectedSpecification.push(data)
-          console.log(this.popData, "666666666666666666")
-          console.log('1', this.popData.goods_id, this.shop_id, this.popData.goodsItem.category_id, this.popData
-            .spec_key, this.popData.num);
-          this.setShoppingSave()
-          this.isAjax = false
-        }
-      },
-      addShoppingSave(item, num, type) {
-        shoppingSave({
-          type: 1,
-          goods_id: item.goods_id,
-          shop_id: this.shop_id,
-          category_id: item.category_id,
-          goods_spec_id: '',
-          number: num
-        }).then((res) => {
-          if (res.code === 1) {
-            if (type === 1) {
-              tools.success('操作成功')
-            } else {
-              tools.success(res.msg)
-            }
-            this.isAjax = false
-            this.getShopIngList()
-          } else {
-            this.isAjax = false
-            tools.error(res.msg)
-          }
-        })
-      },
-      gbPop() {
-        this.$refs.popupGG.close();
-      },
-      setSub(item, type) {
-        let cartKey = this.cartData.goods_list.findIndex(row => row.goods_id === item.goods_id)
-        if (type === 2 && cartKey < 0) {
-          this.setShopIngAdd(item.goods_id, item.category_id, '', 1, item)
-        } else {
-          this.setShopIngNumber(item.goods_id, item.category_id, type, '', 1, item)
-        }
-      },
-      setShoppingSave() {
-        shoppingSave({
-          type: 1,
-          goods_id: this.popData.goods_id,
-          shop_id: this.shop_id,
-          category_id: this.popData.goodsItem.category_id,
-          goods_spec_id: this.popData.spec_key,
-          number: this.popData.num
-        }).then((res) => {
-          if (res.code === 1) {
-            tools.success(res.msg)
-            this.$refs.popupGG.close();
-            this.getShopIngList()
-          } else {
-            tools.error(res.msg)
-          }
-        })
-      },
-      setShopIngAdd(goodsId, categoryId, goodsSpecId, number, item) {
-        setShopIngAdd({
-          'type': 1,
-          'goods_id': goodsId,
-          'shop_id': this.shop_id,
-          'category_id': categoryId,
-          'goods_spec_id': goodsSpecId,
-          'number': number,
-        }).then(res => {
-          this.isAjax = false
-          if (res.code === 1) {
-            if (item) {
-              ++item.num;
-            }
-            this.getShopIngList()
-          } else if (res.code === 2) {
-            tools.error(res.msg)
-            if (item) {
-              ++item.num;
-            }
-            this.getShopIngList()
-          } else {
-            tools.error(res.msg)
-          }
-
-        }).catch(() => {
-          this.isAjax = false
-        })
-      },
-      setShopIngNumber(goodsId, categoryId, operation, goodsSpecId, number, item) {
-        setShopIngNumber({
-          'type': 1,
-          'goods_id': goodsId,
-          'shop_id': this.shop_id,
-          'category_id': categoryId,
-          'goods_spec_id': goodsSpecId,
-          'number': number,
-          'operation': operation === 2 ? 1 : 2,
-        }).then(res => {
-          this.isAjax = false
-          if (res.code === 1) {
-            if (item) {
-              if (operation === 2) {
-                ++item.num;
-              } else {
-                --item.num;
-              }
-            }
-            this.getShopIngList()
-          } else if (res.code === 2) {
-            tools.error(res.msg)
-            if (item) {
-              if (operation === 2) {
-                ++item.num;
-              } else {
-                --item.num;
-              }
-            }
-            this.getShopIngList()
-          } else {
-            tools.error(res.msg)
-          }
-
-        }).catch(() => {
-          this.isAjax = false
-        })
-      },
-
-      setShopIngDel() {},
-      // -------弹窗选择规格-----------
-      selectSpec(info, groupKey) {
-        let specKey = this.popData.spec_ids.indexOf(info.spec_id)
-        if (specKey >= 0) {
-          this.popData.spec_ids.splice(specKey, 1)
-          this.popData.spec_name.splice(specKey, 1)
-          if (Number(info.spec_price) > 0) {
-            this.popData.price = Number(this.popData.price) - Number(info.spec_price)
-          }
-        } else {
-          this.popData.spec_ids.push(info.spec_id)
-          this.popData.spec_name.push(info.spec_name)
-          if (Number(info.spec_price) > 0) {
-            this.popData.price = Number(this.popData.price) + Number(info.spec_price)
-          }
-          for (const attrKey in this.popData.spec_attr[groupKey].spec_list) {
-            if (this.popData.spec_attr[groupKey].spec_list[attrKey].spec_id !== info.spec_id) {
-              let oldKey = this.popData.spec_ids.indexOf(this.popData.spec_attr[groupKey].spec_list[attrKey]
-                .spec_id)
-              if (oldKey >= 0) {
-                this.popData.spec_ids.splice(oldKey, 1)
-                this.popData.spec_name.splice(oldKey, 1)
-                this.popData.price = Number(this.popData.price) - Number(this.popData.spec_attr[groupKey]
-                  .spec_list[attrKey].spec_price)
-              }
-            }
-          }
-        }
-        // this.spec_ids = this.popData.spec_list.join('_')
-        this.setGoodsSpecPrice()
-      },
-    },
-  }
-</script>
-
-<style scoped lang="scss">
-  .sticky-nav {
-    width: 100%;
-    position: sticky;
-    z-index: 3;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .menu-box-left-f {
-    position: sticky;
-    // transition: all .3s ease;
-    // overflow: auto;
-  }
-
-  .menu-box-left {
-    width: 160rpx;
-    height: auto;
-    position: sticky;
-    overflow: auto;
-    // transition: all .3s ease;
-    // height: 100%;
-    // background-color: #F7F8FA;
-    // position: absolute;
-    // left: 0;
-    // top: 0;
-    // border-radius: 0rpx 20rpx 0 0rpx;
-  }
-
-  .menu-box-left-box {
-    overflow-y: auto;
-  }
-
-  .menu-type-list {
-    width: 160rpx;
-    min-height: 108rpx;
-    padding: 18rpx 28rpx;
-    position: relative;
-    z-index: 10;
-
-    .menu-type-num {
-      position: absolute;
-      top: 2rpx;
-      right: 8rpx;
-      padding: 0 6rpx;
-      min-width: 20rpx;
-      height: 32rpx;
-      text-align: center;
-      line-height: 32rpx;
-      background: #FB3D03;
-      border-radius: 50%;
-    }
-  }
-
-  .menu-type-list-f {
-    // width: 160rpx;
-    background-color: #007AFF;
-
-    width: 100%;
-    height: 100%;
-    overflow-y: auto;
-    /* 如果分类项很多,允许内部滚动 */
-    -webkit-overflow-scrolling: touch;
-    /* 改善移动端滚动体验 */
-    // height: 100%;
-  }
-
-  .menu-box-only {
-    // flex: 1;
-    width: calc(100% - 160rpx);
-  }
-
-  .menu-box-right {
-    // flex: 1;
-    width: 100%;
-    height: 100%;
-    // padding: 16rpx 0;
-    // box-sizing: border-box;
-    // position: relative;
-  }
-
-  .menu-list {
-    width: 100%;
-    padding: 0 20rpx 40rpx;
-    // height: 200rpx;
-    // margin-bottom: 40rpx;
-
-    .goods_img {
-      width: 200rpx;
-      height: 200rpx;
-      border-radius: 12rpx;
-      margin-right: 16rpx;
-    }
-
-    .menu-list-right {
-      flex: 1;
-
-      .right-only-right {
-        width: 100rpx;
-        height: 44rpx;
-        background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-        border-radius: 12rpx;
-        line-height: 44rpx;
-        position: relative;
-
-        .selectedNum {
-          position: absolute;
-          right: 2rpx;
-          top: -22rpx;
-          font-size: 24rpx;
-          color: #fff;
-          width: 32rpx;
-          height: 32rpx;
-          line-height: 32rpx;
-          background: #FB3D03;
-          border-radius: 50%;
-        }
-      }
-
-      .right-only-right-red {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        border-radius: 12rpx;
-        border: 1rpx solid #41ABF5;
-        color: #41ABF5;
-      }
-
-      .right-only-right-add {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-        border-radius: 12rpx;
-      }
-
-      .right-only-right-2 {
-        min-width: 50rpx;
-      }
-    }
-  }
-
-  .menu-box {
-    width: 100%;
-    height: 100%;
-    // padding-bottom: 140rpx;
-
-    .gg-box {
-      width: 750rpx;
-      height: 1208rpx;
-      background: #FFFFFF;
-      border-radius: 24rpx 24rpx 0rpx 0rpx;
-
-      .goods-info {
-        border-bottom: 1rpx solid #EEEEEE;
-
-        image {
-          width: 170rpx;
-          height: 160rpx;
-          border-radius: 8rpx;
-          margin-right: 22rpx;
-          margin-bottom: 32rpx;
-        }
-      }
-
-      .pop-buttom {
-        width: 100%;
-        // height: 250rpx;
-        box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
-
-        .pop-buttom-left {
-          padding-top: 12rpx;
-        }
-
-        .pop-buttom-2 {
-          width: 100%;
-          height: 96rpx;
-          line-height: 96rpx;
-          background: #41ABF5;
-          border-radius: 200rpx
-        }
-
-        .right-only-right-red {
-          width: 44rpx;
-          height: 44rpx;
-          line-height: 40rpx;
-          border-radius: 12rpx;
-          border: 1rpx solid #41ABF5;
-          color: #41ABF5;
-        }
-
-        .right-only-right-add {
-          width: 44rpx;
-          height: 44rpx;
-          line-height: 40rpx;
-          background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-          border-radius: 12rpx;
-        }
-
-        .right-only-right-2 {
-          min-width: 50rpx;
-        }
-      }
-
-      .w-m {
-        width: calc(100% + 30rpx);
-      }
-
-      .spec-item {
-        min-width: 210rpx;
-        height: 66rpx;
-        line-height: 66rpx;
-        box-sizing: border-box;
-        border-radius: 12rpx;
-        margin: 0 26rpx 26rpx 0;
-        padding: 0 10rpx;
-      }
-
-      // .spec-item:nth-child(3) {
-      // 	margin-right: 0rpx !important;
-      // }
-
-      .s-item {
-        background-color: #ECF7FE;
-        border: 2rpx solid #41ABF5;
-        color: #41ABF5;
-      }
-
-      .n-item {
-        border: 2rpx solid #EEEEEE;
-        color: #000;
-      }
-    }
-  }
-
-  .goods-name {
-    max-width: 310rpx;
-  }
-</style>

+ 5 - 175
pages.json

@@ -17,12 +17,6 @@
 			}
 		},
 		// {
-		// 	"path": "pages/chat/index",
-		// 	"style": {
-		// 		"navigationBarTitleText": "Al助手"
-		// 	}
-		// },
-		// {
 		// 	"path": "pages/me/index",
 		// 	"style": {
 		// 		"navigationBarTitleText": "我的"
@@ -42,127 +36,6 @@
 		}
 	],
 	"subPackages": [{
-			"root": "pages-address",
-			"pages": [{
-					"path": "select-school",
-					"style": {
-						"navigationBarTitleText": "选择学校"
-					}
-				},
-				{
-					"path": "address",
-					"style": {
-						"navigationBarTitleText": "地址管理"
-					}
-				},
-				{
-					"path": "edit-add",
-					"style": {
-						"navigationBarTitleText": "地址管理"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages-buy",
-			"pages": [{
-					"path": "group",
-					"style": {
-						"navigationBarTitleText": "团购",
-						"disableScroll": true
-					}
-				},
-				{
-					"path": "group-shop",
-					"style": {
-						"navigationBarTitleText": "团购商家"
-					}
-				},
-				{
-					"path": "group-goods-info",
-					"style": {
-						"navigationBarTitleText": "团购商品详情"
-					}
-				},
-				{
-					"path": "group-det",
-					"style": {
-						"navigationBarTitleText": "团购详情"
-					}
-				},
-				{
-					"path": "group-pay",
-					"style": {
-						"navigationBarTitleText": "团购支付订单"
-					}
-				},
-				{
-					"path": "group-pay-page",
-					"style": {
-						"navigationBarTitleText": "团购支付"
-					}
-				},
-				{
-					"path": "group-refund",
-					"style": {
-						"navigationBarTitleText": "团购申请退款"
-					}
-				},
-				{
-					"path": "group-code",
-					"style": {
-						"navigationBarTitleText": "团购申请退款"
-					}
-				},
-				{
-					"path": "save-order",
-					"style": {
-						"navigationBarTitleText": "团购券码"
-					}
-				},
-				{
-					"path": "dry-clean",
-					"style": {
-						"navigationBarTitleText": "干洗"
-					}
-				},
-				{
-					"path": "save-dry",
-					"style": {
-						"navigationBarTitleText": "干洗提交订单"
-					}
-				},
-				{
-					"path": "dry-mod/select-shop",
-					"style": {
-						"navigationBarTitleText": "切换门店"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages-school",
-			"pages": [{
-					"path": "school-circle",
-					"style": {
-						"navigationBarTitleText": "校友圈"
-					}
-				},
-				{
-					"path": "add-circle",
-					"style": {
-						"navigationBarTitleText": "发圈子"
-					}
-				},
-				{
-					"path": "circle-info",
-					"style": {
-						"navigationBarTitleText": "校友圈"
-					}
-				}
-			]
-		},
-		{
 			"root": "pages-takeout",
 			"pages": [{
 					"path": "takeout",
@@ -281,42 +154,11 @@
 		{
 			"root": "pages-order",
 			"pages": [{
-					"path": "takeout-info",
-					"style": {
-						"navigationBarTitleText": "外卖详情"
-					}
-				},
-				{
-					"path": "express-info",
-					"style": {
-						"navigationBarTitleText": "代取详情"
-					}
-				},
-				{
-					"path": "group-info",
-					"style": {
-						"navigationBarTitleText": "团购详情"
-					}
-				},
-				{
-					"path": "run-errands-info",
-					"style": {
-						"navigationBarTitleText": "跑腿详情"
-					}
-				},
-				{
-					"path": "ticket-info",
-					"style": {
-						"navigationBarTitleText": "票务详情"
-					}
-				},
-				{
-					"path": "laundry-info",
-					"style": {
-						"navigationBarTitleText": "干洗详情"
-					}
+				"path": "takeout-info",
+				"style": {
+					"navigationBarTitleText": "订单详情"
 				}
-			]
+			}]
 		},
 		{
 			"root": "pages-my",
@@ -422,12 +264,6 @@
 						"navigationBarTitleText": "商务合作"
 					}
 				},
-				{
-					"path": "rider-recruit",
-					"style": {
-						"navigationBarTitleText": "骑手招聘"
-					}
-				},
 				{
 					"path": "feedback",
 					"style": {
@@ -476,13 +312,7 @@
 	"preloadRule": {
 		"pages/index/index": {
 			"network": "all",
-			"packages": ["pages-address", "pages-buy", "pages-school", "pages-takeout", "pages-position", "pages-order",
-				"pages-my"
-			]
-		},
-		"pages/login/index": {
-			"network": "all",
-			"packages": ["pages-address"]
+			"packages": ["pages-takeout", "pages-position", "pages-order", "pages-my"]
 		}
 	},
 	"globalStyle": {

+ 0 - 438
pages/chat/index.vue

@@ -1,438 +0,0 @@
-<template>
-	<view class="box">
-		<view class="flex-common-css iPhone-bottom box-border-box">
-			<Nav title="AI助手" titleColor="#333" bgckgroundBox='#fff' :leftShow='false'></Nav>
-			<scroll-view :scroll-y="true" id="scroll-view-css" class="scroll-view-css" :scroll-top="scrollTop"
-				:scroll-with-animation="true" @scroll="scrolll">
-				<view v-if="total > chatData.length" class="text-align-center fs-24 fc-9" @click="lookHistory">
-					查看历史消息
-				</view>
-				<view class="chat-box" id="chat-box">
-					<!-- <msgItem v-for="(item,index) in chatData" :key="index" :item="item" :showType="item.showType"
-						:msgText="item.content" @selectStyle="selectStyle" @refresh="refresh"></msgItem> -->
-				</view>
-			</scroll-view>
-			<view class="bottom-box">
-				<view class="input-box">
-					<input type="text" v-model="chatText" placeholder="有问题尽管问我" class="input" cursor-spacing="20"
-						@confirm="confirm" :disabled='!sendControl'>
-				</view>
-			</view>
-		</view>
-	</view>
-
-</template>
-
-<script>
-	import tools from "@/service/tools.js";
-	// import msgItem from "./msg-item.vue";
-	// import {
-	// 	qianfanSend,
-	// 	qianfanMsg_list,
-	// } from "@/api/qianfan.js"
-	import {
-		aiSend,
-		aiMsgList
-	} from "@/api/ai.js"
-	export default {
-		components: {
-			// msgItem
-		},
-		data() {
-			return {
-				total: 0,
-				page: 1,
-				chatText: '',
-				chatType: 1,
-				scrollTop: 20,
-				chatData: [],
-				initialData: [],
-				// loadingStyle: false,
-				Ajax: false,
-				timer: null, //settimeout
-				showText: "",
-				typeName: '',
-				isScrolll: false,
-				scrolllTimeServe: null,
-				imgUrl: '',
-				fileUrl: '',
-				voiceUrl: '',
-				inputHeadShow: true,
-				sendControl: true
-			};
-		},
-		onShow() {
-			this.page = 1
-			this.scrollTop = 20
-			this.chatData = []
-			this.sendControl = true
-			this.aiMsgList()
-		},
-		onLoad() {},
-		mounted() {},
-		methods: {
-			selectStyle(e) {
-				this.chatType = e
-				this.initialData.forEach((item) => {
-					if (this.chatType === item.type) {
-						this.typeName = item.name
-						let data = {
-							msg_type: 2,
-							content: '您好,我是' + this.typeName + 'AI小助手,有什么能帮助您吗?',
-							created_at: tools.getDate(),
-						}
-						this.chatData.push(data)
-					}
-				})
-				// console.log(e);
-			},
-			aiSend() {
-				let that = this
-				let data = {
-					msg_type: 2,
-					content: '',
-					created_at: tools.getDate(),
-					showType: true,
-				}
-				this.chatData.push(data)
-				let key = this.chatData.length - 1
-				aiSend({
-					content: this.chatText,
-				}).then((res) => {
-					if (res.code == 1) {
-						this.imgUrl = ''
-						this.fileUrl = ''
-						this.voice_url = ''
-						this.chatText = ''
-						this.sendControl = true
-						// this.chatData[key].voice_url = res.data.voice_url
-						this.chatData[key].content = res.data.content
-						this.$nextTick(() => {
-							this.scrollToBottom()
-						})
-					} else {
-						this.chatData[key].content = msg
-					}
-				})
-			},
-			refresh(num) {
-				// this.$nextTick(() => {
-				if (num) {
-					// console.log("高度");
-					// this.scrollTop = 99999
-					console.log('最终')
-					setTimeout(() => {
-						this.scrollToBottom(50)
-					}, 50)
-				} else {
-					console.log('回调执行')
-					this.scrollToBottom(0)
-					// setTimeout(()=>{
-					//   this.scrollToBottom()
-					// },10)
-				}
-				// })
-			},
-			lookHistory() {
-				if (this.total > this.chatData.length) {
-					++this.page
-					this.aiMsgList()
-				}
-			},
-			// aiMsgList() {
-			// 	aiMsgList({
-			// 		page: this.page
-			// 	}).then((res) => {
-			// 		if (res.code == 1) {
-			// 			this.total = res.data.total
-			// 			let data = res.data.items.reverse()
-			// 			data.forEach((itm) => {
-			// 				itm.showType = false
-			// 			})
-			// 			this.chatData.unshift(...data)
-			// 			let that = this
-			// 			// this.$nextTick(() => {
-			// 			// 	this.scrollToBottom()
-			// 			// })
-			// 			setTimeout(() => {
-			// 				that.scrollToBottom()
-			// 			}, 50)
-			// 		}
-			// 	})
-			// },
-			aiMsgList() {
-				aiMsgList({
-					page: this.page
-				}).then((res) => {
-					if (res.code == 1) {
-						this.total = res.data.total;
-						let data = res.data.items.reverse();
-						if (data.length === 0) {
-							console.log('没有新数据加载');
-							return;
-						}
-						if (data.length > 0) {
-							data.forEach((itm) => {
-								itm.showType = false;
-							});
-							if (this.page === 1) {
-								this.chatData.unshift(...data);
-								setTimeout(() => {
-									this.scrollToBottom()
-								}, 50)
-							} else {
-								// 记录当前 chat-box 的高度
-								let lodQuery = uni.createSelectorQuery().in(this);
-								lodQuery.select('#chat-box').boundingClientRect((rect) => {
-									console.log(rect, 'rect');
-									if (rect) {
-										let oldHeight = rect.height; // 记录旧高度
-										// 插入新数据
-										this.chatData.unshift(...data);
-										// 计算新高度并滚动到正确位置
-										this.$nextTick(() => {
-											lodQuery.select('#chat-box').boundingClientRect((newRect) => {
-												if (newRect) {
-													let newHeight = newRect.height;
-													let scrollTop = newHeight - oldHeight; // 计算需要滚动的距离
-													// 设置 scrollTop
-													this.scrollTop = scrollTop;
-													console.log(scrollTop,'???????????');
-													this.$forceUpdate();
-												}
-											})
-										});
-									}
-								}).exec()
-							}
-						}
-					}
-				})
-			},
-			leftClick() {
-				uni.switchTab({
-					url: 'pages/index/index'
-				})
-				// uni.showTabBar()
-			},
-			confirm(event) {
-				if (this.sendControl) {
-					if (event.target.value) {
-						let timeData = tools.getDate()
-						let text = {
-							created_at: timeData,
-							msg_type: 1,
-							content: event.target.value,
-							img_url: this.imgUrl,
-							file_url: this.fileUrl
-						}
-						this.chatData.push(text)
-						this.inputHeadShow = false
-						this.sendControl = false
-						this.$nextTick(() => {
-							this.scrollToBottom()
-						})
-						this.aiSend()
-						// this.lading()
-						this.chatText = ''
-					} else {
-						uni.showToast({
-							title: '请输入问题',
-							icon: 'none',
-							duration: 1000
-						});
-					}
-				}
-			},
-			scrolll(e) {
-				// console.log(e, 'eeee');
-			},
-			// scrollToBottom(num) {
-			// 	let query = uni.createSelectorQuery().in(this)
-			// 	query.select('#scroll-view-css').boundingClientRect()
-			// 	query.select('#chat-box').boundingClientRect()
-			// 	query.exec((res) => {
-			// 		console.log(res[1].height, res[0].height, 'res[0].height');
-			// 		//如果子元素高度大于父元素高度(显示高度)
-			// 		if (res[1].height > res[0].height) {
-			// 			//计算出二者差值就是需要滚动的距离
-			// 			let scrollTop = res[1].height - res[0].height
-			// 			let differenceNum = scrollTop - this.scrollTop
-			// 			console.log(differenceNum, 'differenceNum');
-			// 			console.log(scrollTop, 'scrollTop');
-			// 			console.log(num, 'num');
-			// 			if (differenceNum > 50) {
-			// 				this.scrollTop = scrollTop + 50
-			// 				console.log('differenceNum > 50 1111111111', this.scrollTop);
-			// 			} else if (num > 0) {
-			// 				this.scrollTop = scrollTop + num
-			// 				console.log('num > 0');
-			// 			} else {
-			// 				this.scrollTop = scrollTop
-			// 				console.log('differenceNum > 50 33333333333333', this.scrollTop);
-			// 			}
-			// 		} else {
-			// 			this.scrollTop = 9999999999999
-			// 		}
-			// 	})
-			// }
-			scrollToBottom(num) {
-				let query = uni.createSelectorQuery().in(this);
-				query.select('#scroll-view-css').boundingClientRect();
-				query.select('#chat-box').boundingClientRect();
-				query.exec((res) => {
-					if (res[1].height > res[0].height) {
-						let scrollTop = res[1].height - res[0].height;
-						let differenceNum = scrollTop - this.scrollTop;
-						if (differenceNum > 50) {
-							let topNUm = scrollTop
-							this.scrollTop = topNUm + 50;
-							console.log(scrollTop, 'scrollTop1111111111');
-						} else if (num > 0) {
-							let topNUm = scrollTop
-							this.scrollTop = topNUm + num;
-							console.log(scrollTop, 'scrollTop122222222');
-						} else {
-							let topNUm = scrollTop
-							this.scrollTop = topNUm + 50;
-							console.log(scrollTop, 'scrollTop333333333');
-						}
-						this.$forceUpdate();
-					} else {
-						this.scrollTop = 9999999999999;
-					}
-				});
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.box {
-		background: #fff;
-		position: relative;
-
-		.popup-block {
-			border-radius: 20rpx 20rpx 0rpx 0rpx;
-			overflow: hidden;
-			background-color: #f5f5f5;
-
-			.popup-row {
-				height: 100rpx;
-				background-color: #fff;
-				text-align: center;
-				line-height: 100rpx;
-				border-bottom: 2rpx solid #f5f5f5;
-
-				&:nth-child(4) {
-					margin-bottom: 20rpx;
-				}
-
-				&:last-child {
-					height: 112rpx;
-					border: none;
-					line-height: 112rpx;
-				}
-
-				&:active {
-					background-color: rgb(244, 244, 244);
-				}
-			}
-		}
-
-		.chat-box {
-			padding: 22rpx 32rpx 1rpx;
-			box-sizing: border-box;
-
-			.dialogue-box {
-				// width: 100%;
-				height: auto;
-				margin: 0 0 40rpx 0;
-				display: flex;
-				flex-direction: column;
-
-				.time {
-					font-size: 24rpx;
-					color: #999999;
-					margin: 0 0 8rpx 0;
-				}
-
-				.dialogue {
-					padding: 24rpx;
-					box-sizing: border-box;
-					word-break: break-all;
-					font-size: 30rpx;
-
-					.dialogue-text {}
-
-					.dialogue-text-one {
-						color: #333333;
-					}
-
-					.dialogue-text-two {
-						color: #FFFFFF;
-					}
-
-					.initial-box {
-
-						.initial-title {
-							font-size: 30rpx;
-							font-weight: 600;
-							color: #333333;
-							margin: 0 0 12rpx 0;
-						}
-
-						.initial-style {
-							font-size: 30rpx;
-							color: #2F80ED;
-							margin: 0 0 12rpx 0;
-						}
-
-						.initial-style:last-child {
-							margin: 0;
-						}
-					}
-				}
-
-				.dialogue-one {
-					background: #F7F8FC;
-					border-radius: 10rpx 10rpx 10rpx 0;
-				}
-
-				.dialogue-two {
-					background: #FDAB26;
-					border-radius: 10rpx 10rpx 0 10rpx;
-				}
-			}
-
-			.dialogue-box-one {
-				align-items: flex-start;
-			}
-
-		}
-
-		.bottom-box {
-			position: relative;
-
-			.input-box {
-				width: 100%;
-				height: 100rpx;
-				height: auto;
-				background: #fff;
-				padding: 10rpx 32rpx;
-				box-sizing: border-box;
-				border-top: 1rpx solid #EEEEEE;
-				transition: all .1s linear;
-			}
-		}
-	}
-
-	.input {
-		background: #F2F2F2;
-		border-radius: 200rpx;
-		width: 100%;
-		height: 100%;
-		padding: 20rpx 170rpx 20rpx 24rpx;
-		box-sizing: border-box;
-	}
-</style>

+ 0 - 408
pages/chat/msg-item.vue

@@ -1,408 +0,0 @@
-<template>
-	<view class="">
-		<view class="dialogue-box"
-			:class="item.msg_type == 2 ||item.msg_type == 3 ?'dialogue-box-one':'dialogue-box-two'">
-			<view class="time">
-				{{item.created_at}}
-			</view>
-			<view class="dialogue">
-				<view class="dialogue-text" :class="item.msg_type == 2 ?'dialogue-text-one':'dialogue-text-two'"
-					v-if="(item.msg_type == 1 ||item.msg_type == 2) && showText">
-					<!-- {{item.content}} -->
-					<!--					{{showText}}-->
-					<view class="" :class="item.msg_type == 2?'showText-color-one':'showText-color-two'"
-						v-html="showText"></view>
-					<view class="align-items-center flex-justify-end" v-if="item.msg_type == 2">
-						<view class="fs-28 fc-9 fz-class" @click="copy(showText)">
-							复制
-						</view>
-					</view>
-					<view class="voice-box" v-if="item.voice_url">
-						<view class="voice-box-left" v-if="item.msg_type == 1">
-							<image @click="voiceTwo" v-if="!voiceShwo" class="voice-img"
-								src="@/static/img/chat/voice-n.png" mode="">
-							</image>
-							<image @click="voice(true,item)" v-else class="voice-img"
-								src="@/static/img/chat/voice-y.png" mode="">
-							</image>
-						</view>
-						<view class="voice-box-left" v-else-if="item.msg_type == 2">
-							<image @click="voiceTwo" v-if="!voiceShwo" class="voice-img"
-								src="@/static/img/chat/voice-n-two.png" mode=""></image>
-							<image @click="voice(true,item)" v-else class="voice-img"
-								src="@/static/img/chat/voice-y-two.png" mode="">
-							</image>
-						</view>
-						<image v-if="item.msg_type == 2" class="voice-box-right"
-							src="../../static/img/chat/voice-img.png" mode="">
-						</image>
-						<image v-else class="voice-box-right" src="../../static/img/chat/voice-two-img.png" mode="">
-						</image>
-					</view>
-				</view>
-				<view class="dialogue-text dialogue-text-one loading " v-if="item.msg_type == 2 && showText ==''">
-					<text></text>
-					<text></text>
-					<text></text>
-					<text></text>
-				</view>
-				<view class="initial-box dialogue-text-one" v-if="item.msg_type == 3">
-					<view class="initial-title">
-						{{item.title}}
-					</view>
-					<view class="initial-style" v-for="(itemTwo,indexTwo) in item.text" :key="indexTwo"
-						@click="selectStyle(itemTwo.type)">
-						{{itemTwo.msg}}
-					</view>
-				</view>
-			</view>
-			<view class="dialogue">
-				<view class="diaologue-img-box" v-if="item.img_url">
-					<image class="diaologue-img" @click="lookImg(item.img_url)" :src="item.img_url" mode="aspectFill">
-					</image>
-				</view>
-			</view>
-			<view class="dialogue">
-				<view class="diaologue-file-box" v-if="item.file_url">
-					<image class="diaologue-file-img" src="@/static/img/chat/wj-img.png" mode="aspectFill"></image>
-					<view class="diaologue-file-name-box">
-						<view class="diaologue-file-name">
-							{{fileName(item.file_url)}}
-						</view>
-						<!-- <view class="diaologue-file-time">
-							2023-12-15
-						</view> -->
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-
-</template>
-
-<script>
-	import tools from '@/service/tools'
-	export default {
-		props: {
-			item: {
-				default: function() {
-					return ''
-				}
-			},
-			msgText: {
-				default: function() {
-					return ''
-				}
-			},
-			showType: {
-				default: function() {
-					return false
-				}
-			}
-		},
-		data() {
-			return {
-				showText: '',
-				num: 1,
-				id: '',
-				voiceShwo: true,
-				voiceUrl: '',
-				voiceStyle: true,
-			};
-		},
-		watch: {
-			'msgText': function() {
-				if (this.msgText !== '') {
-					this.setText()
-				}
-			}
-		},
-		mounted() {
-			this.setText()
-		},
-		methods: {
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success() {
-						tools.success('复制成功')
-					},
-					fail() {
-						tools.error("复制失败")
-					}
-				})
-			},
-			voice(bur, id) {
-				if (this.voiceStyle) {
-					this.voiceUrl = uni.createInnerAudioContext();
-					this.voiceUrl.autoplay = true;
-					this.voiceUrl.src = this.item.voice_url;
-					this.voiceUrl.play();
-					this.voiceShwo = false;
-				} else {
-					this.voiceUrl.play();
-					this.voiceShwo = false;
-				};
-				this.voiceUrl.onEnded((res) => {
-					this.voiceShwo = true;
-					this.voiceStyle = true
-				})
-			},
-			voiceTwo() {
-				this.voiceUrl.pause();
-				this.voiceShwo = true;
-				this.voiceStyle = false
-			},
-			fileName(item) {
-				let fileName = item.match(/\/([^\/]+)$/)[1];
-				return fileName
-			},
-			lookImg(item) {
-				let imgList = []
-				imgList.push(item)
-				uni.previewImage({
-					current: 0,
-					urls: imgList,
-				});
-			},
-			selectStyle(type) {
-				this.$emit('selectStyle', type)
-			},
-			setText() {
-				if (this.showType) {
-					this.appear(this.msgText)
-				} else {
-					// console.log('---------------------------------'+this.msgText)
-					// this.showText = this.msgText.replace(/\/n/g, 'aaaaa');
-					this.showText = this.msgText;
-					// console.log(this.showText)
-				}
-			},
-			appear(content) {
-				if (content === '') {
-					return
-				}
-				const _this = this;
-				this.showText = "";
-				clearTimeout(this.timer);
-				let speed = 50; //设置定时的速度 越来越快
-				let count = 1;
-				content = content.replace(/\/n/g, '<br/>');
-				// console.log(content)
-				let num = 1;
-
-				function changeContent() {
-					_this.showText = content.substring(0, count); //截取字符串
-					count++;
-					if (count !== content.length + 1) {
-						speed -= 1;
-						if (speed < 5) speed = 5;
-
-						_this.timer = setTimeout(changeContent, speed);
-						if (_this.showText.length % 100 === 0) _this.$emit('refresh', false)
-					} else {
-						console.log("执行");
-						_this.$emit('refresh', true)
-					}
-				}
-				changeContent();
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.fz-class {
-		padding: 5rpx 0 0;
-	}
-
-	.loading {
-		width: auto;
-		height: 15rpx;
-		display: flex;
-		align-items: center;
-		padding: 17rpx 30rpx;
-	}
-
-	.loading text {
-		// display: inline-block;
-		width: 15rpx;
-		height: 15rpx;
-		margin-right: 5px;
-		border-radius: 50%;
-		background: #F2BA0B;
-		-webkit-animation: load 1.04s ease infinite;
-	}
-
-	.loading text:last-child {
-		margin-right: 0px;
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0;
-		}
-	}
-
-	.loading text:nth-child(1) {
-		-webkit-animation-delay: 0.13s;
-	}
-
-	.loading text:nth-child(2) {
-		-webkit-animation-delay: 0.26s;
-	}
-
-	.loading text:nth-child(3) {
-		-webkit-animation-delay: 0.39s;
-	}
-
-	.loading text:nth-child(4) {
-		-webkit-animation-delay: 0.52s;
-	}
-
-	.dialogue-box {
-		// width: 100%;
-		height: auto;
-		margin: 0 0 40rpx 0;
-		display: flex;
-		flex-direction: column;
-
-		.time {
-			font-size: 24rpx;
-			color: #999999;
-			margin: 0 0 8rpx 0;
-		}
-
-		.dialogue {
-			// word-break: break-all;
-			// font-size: 30rpx;
-
-			.dialogue-text {
-				padding: 24rpx;
-				box-sizing: border-box;
-				white-space: pre-wrap;
-
-				.voice-box {
-					padding: 20rpx 0 0 0;
-					display: flex;
-					align-items: center;
-
-					.voice-box-left {
-						.voice-img {
-							width: 48rpx;
-							height: 48rpx;
-							margin: 0 16rpx 0 0;
-						}
-					}
-
-					.voice-box-right {
-						width: 120rpx;
-						height: 26rpx;
-					}
-				}
-			}
-
-			.showText-color-one {
-				color: #333333;
-			}
-
-			.showText-color-two {
-				color: #FFFFFF;
-			}
-
-			.diaologue-img-box {
-				max-width: 638rpx;
-				height: auto;
-				background: #fff;
-				margin: 8rpx 0 0 0;
-
-				.diaologue-img {
-					border-radius: 20rpx;
-				}
-			}
-
-			.diaologue-file-box {
-				display: flex;
-				align-items: center;
-				padding: 24rpx;
-				box-sizing: border-box;
-				// background: #fff;
-				border: 2rpx solid #EEEEEE;
-				border-radius: 10rpx;
-				margin: 8rpx 0 0 0;
-
-				.diaologue-file-img {
-					width: 63rpx;
-					height: 77rpx;
-					margin: 0 16rpx 0 0;
-				}
-
-				.diaologue-file-name-box {
-					.diaologue-file-name {
-						max-width: 534rpx;
-						font-size: 30rpx;
-						color: #323333;
-						margin: 0 0 4rpx 0;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-						overflow: hidden;
-						word-break: break-all;
-					}
-
-					.diaologue-file-time {
-						font-size: 24rpx;
-						color: #999999;
-					}
-				}
-			}
-
-
-
-			.dialogue-text-one {
-				background: #F7F8FC;
-				border-radius: 10rpx 10rpx 10rpx 0;
-			}
-
-			.dialogue-text-two {
-				background: #5CC2FF;
-				border-radius: 10rpx 10rpx 0 10rpx;
-				max-width: 592rpx;
-			}
-
-			.initial-box {
-				padding: 24rpx;
-				box-sizing: border-box;
-
-				.initial-title {
-					font-size: 30rpx;
-					font-weight: 600;
-					color: #333333;
-					// margin: 0 0 12rpx 0;
-					padding: 0 0 12rpx 0;
-				}
-
-				.initial-style {
-					font-size: 30rpx;
-					color: #2F80ED;
-					margin: 0 0 12rpx 0;
-				}
-
-				.initial-style:last-child {
-					margin: 0;
-				}
-			}
-		}
-	}
-
-	.dialogue-box-one {
-		align-items: flex-start;
-	}
-
-	.dialogue-box-two {
-		align-items: flex-end;
-	}
-</style>

+ 22 - 11
pages/order/index.vue

@@ -65,7 +65,8 @@
 						</view>
 					</view>
 					<view class="align-items-center flex-justify-end">
-						<view v-if="item.order_status === 1" @click.stop="orderPay(item)" class="item-but but-class-one fs-28">
+						<view v-if="item.order_status === 1" @click.stop="orderPay(item)"
+							class="item-but but-class-one fs-28">
 							立即支付
 						</view>
 						<view v-else @click.stop="goToUrl(item)" class="item-but but-class-one fs-28">
@@ -81,6 +82,7 @@
 <script>
 	// import UniQrcode from 'uniapp-qrcode'
 	import tools from '@/service/tools';
+	import cartStore from '@/utils/cartStore';
 	import EnBlank from "@/components/en-utils/en-blank/en-blank";
 	import {
 		commonRefundReason
@@ -110,16 +112,10 @@
 				page: 1,
 				list: [],
 				total: 0,
-				navTypeData: [],
-				navTypeKey: 0,
 				isAjax: false,
-				qrcodeData: '',
-				options2: {},
-				onlyCode: '',
 				refundReason: [],
 				order_id: 0,
-				refund_msg: '', // 退款理由
-				sureType: 0
+				orderData: {}
 			};
 		},
 		onShow() {},
@@ -132,9 +128,24 @@
 		methods: {
 			goToUrl(item) {
 				// 再来一单
-				// uni.navigateTo({
-				// 	url: '/pages-takeout/shop?shop_id=' + item.shop_id
-				// })
+				tools.showLoading()
+				this.orderData = item.shopping_cart
+				const success = cartStore.reorderFromOrderData(
+					uni.getStorageSync('shop_id'),
+					this.orderData
+				);
+				if (success) {
+					// 延迟跳转,让用户看到成功提示
+					setTimeout(() => {
+						// 跳转到店铺页面
+						tools.hideLoading()
+						uni.redirectTo({
+							url: '/pages-takeout/new-shop'
+						})
+					}, 1500);
+				} else {
+					tools.error('再来一单失败');
+				}
 			},
 			goToInfo(item) {
 				uni.navigateTo({

+ 136 - 130
service/ajax.js

@@ -2,74 +2,80 @@ import tools from "@/service/tools";
 
 
 let BASE_URL = process.uniEnv.baseUrl;
-
+// let BASE_URL = '';
+// // #ifdef MP-WEIXIN
+// let BASE_URL = 'https://' + process.uniEnv.baseUrl;
+// // #endif
+// // #ifndef MP-WEIXIN
+// let BASE_URL = process.uniEnv.baseUrl;
+// // #endif
 
 /**
  * post请求封装
  */
 export const request = (url, method, data, show = false) => {
-  let token = uni.getStorageSync('token')
-  data.token = token;
-  data.m_id = uni.getStorageSync('m_id')
-  data.shop_id = uni.getStorageSync('shop_id')
-  // data.school_id = uni.getStorageSync('school_id');
-  // data.operate_id = uni.getStorageSync('operate_id');
-  // data.system_type = uni.getStorageSync('system_type');
-  if (show) {
-    tools.showLoading();
-  }
-  if (data === undefined) {
-    data = {};
-  }
-  return new Promise((resolve, reject) => {
-    // 封装主体:网络请求
-    uni.request({
-      url: BASE_URL + url,
-      data: data,
-      method: method || 'post',
-      header: {
-        'content-type': 'application/json',
-        'hversion': '1.0',
-        'Authorization': token
-      },
-      success: (res) => {
-        if (res.statusCode === 200) {
-          tools.hideLoading();
-          if (res.data.code * 1 === 401) {
-            // uni.clearStorageSync()
-            uni.removeStorageSync('token')
-            uni.removeStorageSync('m_id')
-            setTimeout(() => {
-              uni.reLaunch({
-                url: '/pages/login/index'
-              });
-            }, 500)
-          } else if (res.data.code * 1 === 403) {
-            resolve(res.data)
-            tools.error('请求过快!!')
-          } else {
-            resolve(res.data)
-          }
-        } else if (res.statusCode === 401) {
-          // uni.clearStorageSync()
-          uni.removeStorageSync('token')
-          uni.removeStorageSync('m_id')
-          uni.reLaunch({
-            url: '/pages/login/index'
-          });
-        } else {
-          resolve(res.data)
-          tools.error('网络错误!!')
-        }
-      },
-      fail: (err) => {
-        tools.error('网络错误!!')
-        // 返回错误消息
-        reject(err)
-        tools.hideLoading();
-      }
-    })
-  })
+	let token = uni.getStorageSync('token')
+	data.token = token;
+	data.m_id = uni.getStorageSync('m_id')
+	data.shop_id = uni.getStorageSync('shop_id')
+	// data.school_id = uni.getStorageSync('school_id');
+	// data.operate_id = uni.getStorageSync('operate_id');
+	// data.system_type = uni.getStorageSync('system_type');
+	if (show) {
+		tools.showLoading();
+	}
+	if (data === undefined) {
+		data = {};
+	}
+	return new Promise((resolve, reject) => {
+		// 封装主体:网络请求
+		uni.request({
+			url: BASE_URL + url,
+			data: data,
+			method: method || 'post',
+			header: {
+				'content-type': 'application/json',
+				'hversion': '1.0',
+				'Authorization': token
+			},
+			success: (res) => {
+				if (res.statusCode === 200) {
+					tools.hideLoading();
+					if (res.data.code * 1 === 401) {
+						// uni.clearStorageSync()
+						uni.removeStorageSync('token')
+						uni.removeStorageSync('m_id')
+						setTimeout(() => {
+							uni.reLaunch({
+								url: '/pages/login/index'
+							});
+						}, 500)
+					} else if (res.data.code * 1 === 403) {
+						resolve(res.data)
+						tools.error('请求过快!!')
+					} else {
+						resolve(res.data)
+					}
+				} else if (res.statusCode === 401) {
+					// uni.clearStorageSync()
+					uni.removeStorageSync('token')
+					uni.removeStorageSync('m_id')
+					uni.reLaunch({
+						url: '/pages/login/index'
+					});
+				} else {
+					resolve(res.data)
+					tools.error(res.msg)
+				}
+			},
+			fail: (err) => {
+				tools.error('网络错误!!')
+				// 返回错误消息
+				reject(err)
+				tools.hideLoading();
+			}
+		})
+	})
 }
 
 /**
@@ -77,76 +83,76 @@ export const request = (url, method, data, show = false) => {
  */
 
 export const uploadImage = (filePath, imageName, data) => {
-  tools.showLoading();
-  return new Promise((resolve, reject) => {
-    uni.uploadFile({
-      url: BASE_URL + '/api/common/upload',
-      // header: {
-      // 	'Authorization': JSON.parse(uni.getStorageSync('userInfo')).token
-      // },
-      filePath: filePath,
-      name: imageName,
-      formData: data,
-      success: (res) => {
-        tools.hideLoading();
-        resolve(res)
-      },
-      fail(err) {
-        tools.hideLoading();
-        reject(err)
-      }
-    });
-  })
+	tools.showLoading();
+	return new Promise((resolve, reject) => {
+		uni.uploadFile({
+			url: BASE_URL + '/api/common/upload',
+			// header: {
+			// 	'Authorization': JSON.parse(uni.getStorageSync('userInfo')).token
+			// },
+			filePath: filePath,
+			name: imageName,
+			formData: data,
+			success: (res) => {
+				tools.hideLoading();
+				resolve(res)
+			},
+			fail(err) {
+				tools.hideLoading();
+				reject(err)
+			}
+		});
+	})
 }
 
 
 export const uploadFile = (url, file) => {
-  tools.showLoading();
-  let token = uni.getStorageSync('token') || '';
-  // data.app_version = plus.runtime.version;
-  // console.log('请求地址-----------------------')
-  // console.log(BASE_URL + url)
-  // console.log('请求参数-----------------------')
-  // console.log(data)
-  console.log(file)
-  return new Promise((resolve, reject) => {
-    // 封装主体:网络请求
-    console.log(BASE_URL + url)
-    uni.uploadFile({
-      url: BASE_URL + url, //仅为示例,非真实的接口地址
-      filePath: file,
-      name: 'file',
-      header: {
-        'content-type': 'application/json',
-        'apikey': '01ABA77B8BA6F26243D85B5A50FFB88624951C7B3A4078B3F9971983E667D5B8',
-        'hversion': '1.0',
-        'Authorization': token
-      },
-      success: (res) => {
-        tools.hideLoading();
-        if (res.statusCode === 200) {
-          // console.log('应答信息-----------------------')
-          res.data = JSON.parse(res.data)
-          // console.log(res.data); // 控制台显示数据信息
-          if (res.data.code * 1 === 401) {
-            uni.reLaunch({
-              url: '/pages/login/login'
-            });
-          } else {
-            resolve(res.data)
-          }
-        } else {
-          tools.error('网络错误!!')
-        }
-      },
-      fail: (err) => {
-        tools.error('网络错误!!')
-        // 返回错误消息
-        reject(err)
-        tools.hideLoading();
-      }
-    });
+	tools.showLoading();
+	let token = uni.getStorageSync('token') || '';
+	// data.app_version = plus.runtime.version;
+	// console.log('请求地址-----------------------')
+	// console.log(BASE_URL + url)
+	// console.log('请求参数-----------------------')
+	// console.log(data)
+	console.log(file)
+	return new Promise((resolve, reject) => {
+		// 封装主体:网络请求
+		console.log(BASE_URL + url)
+		uni.uploadFile({
+			url: BASE_URL + url, //仅为示例,非真实的接口地址
+			filePath: file,
+			name: 'file',
+			header: {
+				'content-type': 'application/json',
+				'apikey': '01ABA77B8BA6F26243D85B5A50FFB88624951C7B3A4078B3F9971983E667D5B8',
+				'hversion': '1.0',
+				'Authorization': token
+			},
+			success: (res) => {
+				tools.hideLoading();
+				if (res.statusCode === 200) {
+					// console.log('应答信息-----------------------')
+					res.data = JSON.parse(res.data)
+					// console.log(res.data); // 控制台显示数据信息
+					if (res.data.code * 1 === 401) {
+						uni.reLaunch({
+							url: '/pages/login/login'
+						});
+					} else {
+						resolve(res.data)
+					}
+				} else {
+					tools.error('网络错误!!')
+				}
+			},
+			fail: (err) => {
+				tools.error('网络错误!!')
+				// 返回错误消息
+				reject(err)
+				tools.hideLoading();
+			}
+		});
 
-  })
+	})
 
-}
+}

BIN
static/img/order-food/add-img.png


BIN
static/img/order-food/db-img.png


BIN
static/img/order-food/fx.png


BIN
static/img/order-food/gwc-img.png


BIN
static/img/order-food/order-bg.png


BIN
static/img/order-food/qd-bg.png


BIN
static/img/order-food/qk-icon.png


BIN
static/img/order-food/reduce-img.png


BIN
static/img/order-food/right-b.png


BIN
static/img/order-food/right-h.png


BIN
static/img/order-food/rm-img.png


BIN
static/img/order-food/shop-icon.png


BIN
static/img/order-food/shop-search.png


BIN
static/img/order-food/shop-top.png


BIN
static/img/order-food/shp-list.png


BIN
static/img/order-food/ss-bg.png


BIN
static/img/order-food/ss-icon.png


BIN
static/img/order-food/tj-img.png


BIN
static/img/order-food/ts-img.png


BIN
static/img/order-food/wx-icon.png


BIN
static/img/order-food/zh-icon.png


BIN
static/img/order-food/zh-img.png


BIN
static/img/order-food/zz-icon.png


BIN
static/img/order/bg.png


BIN
static/img/order/lxkf.png


BIN
static/img/order/lxsj.png


BIN
static/img/order/qxdd.png


BIN
static/img/order/qzf.png


BIN
static/img/order/tk.png


BIN
static/img/order/top.png


BIN
static/img/order/xgdd.png


BIN
static/img/order/yhq.png


BIN
static/img/order/zlyd.png


BIN
static/img/school/add.png


BIN
static/img/school/bg.png


BIN
static/img/school/dian.png


BIN
static/img/school/fs.png


BIN
static/img/school/fx.png


BIN
static/img/school/hot.png


BIN
static/img/school/icon.png


BIN
static/img/school/info.png


BIN
static/img/school/ts.png


BIN
static/img/takeout/add.png


BIN
static/img/takeout/all.png


BIN
static/img/takeout/buy-icon.png


BIN
static/img/takeout/ddd.png


BIN
static/img/takeout/dq-bg.png


BIN
static/img/takeout/info-class.png


BIN
static/img/takeout/j.png


BIN
static/img/takeout/qu-icon.png


BIN
static/img/takeout/quan-bg.png


+ 97 - 2
utils/cartStore.js

@@ -59,7 +59,6 @@ class CartStore {
 			console.error('未设置店铺ID');
 			return false;
 		}
-
 		const cart = this.getCart();
 		if (!cart[this.currentShopId]) {
 			cart[this.currentShopId] = {
@@ -106,7 +105,7 @@ class CartStore {
 				pack_price: packPrice, // 单个商品配送费
 				goods_number: quantity,
 				// goods_attr: this.getSpecAttr(goodsSpec),
-        goods_attr: goods.goods_attr,
+				goods_attr: goods.goods_attr,
 				goods_spec: goodsSpec,
 				category_id: goods.category_id,
 				goods_desc: goods.goods_desc || '',
@@ -164,6 +163,102 @@ class CartStore {
 		return this.updateQuantity(goodsId, goodsSpec, 0);
 	}
 
+	// 再来一单 - 从订单数据重建购物车
+	reorderFromOrderData(shopId, orderData) {
+		if (!shopId) {
+			console.error('店铺ID为空');
+			return false;
+		}
+
+		// 处理订单数据
+		const processedData = this.processOrderData(orderData);
+		if (!processedData) {
+			return false;
+		}
+
+		// 设置当前店铺
+		this.currentShopId = shopId;
+		const cart = this.getCart();
+
+		// 直接替换购物车数据
+		cart[shopId] = processedData;
+
+		console.log('处理后的购物车数据:', cart[shopId]);
+
+		// 保存到本地存储
+		this.saveCart(cart);
+
+		// 触发购物车更新事件
+		if (typeof uni.$emit === 'function') {
+			uni.$emit('cartUpdated', {
+				shop_id: shopId
+			});
+		}
+
+		return true;
+	}
+
+	// 处理订单数据格式转换
+	processOrderData(orderData) {
+		if (!orderData) return null;
+
+		// 构建标准购物车数据结构
+		const processedData = {
+			total_price: parseFloat(orderData.total_price) || 0,
+			total_num: parseInt(orderData.total_num) || 0,
+			goods_list: [],
+			pack_price: parseFloat(orderData.pack_price) || 0,
+			total_goods_money: parseFloat(orderData.total_goods_money) || 0,
+			shop_info: orderData.shop_info || null
+		};
+
+		// 处理商品列表
+		if (orderData.goods_list && Array.isArray(orderData.goods_list)) {
+			processedData.goods_list = orderData.goods_list.map(item => {
+				// 处理规格属性
+				let goods_attr = '';
+				let goods_spec = [];
+
+				if (item.goods_attr) {
+					goods_attr = item.goods_attr;
+				}
+
+				if (item.goods_spec && Array.isArray(item.goods_spec)) {
+					goods_spec = item.goods_spec.map(spec => ({
+						id: spec.id || spec.spec_id || 0,
+						number: spec.number || 1,
+						name: spec.name || spec.spec_name || '',
+						price: spec.price || 0
+					}));
+
+					// 如果没有goods_attr,从规格生成
+					if (!goods_attr && goods_spec.length > 0) {
+						goods_attr = goods_spec.map(spec =>
+							spec.number > 1 ? `${spec.name}×${spec.number}` : spec.name
+						).join('、');
+					}
+				}
+
+				return {
+					goods_id: item.goods_id,
+					goods_name: item.goods_name || '',
+					goods_image: item.goods_image || '',
+					price: parseFloat(item.price) || 0,
+					pack_price: parseFloat(item.pack_price) || 0,
+					goods_number: parseInt(item.goods_number) || 1,
+					goods_attr: goods_attr,
+					goods_spec: goods_spec,
+					category_id: item.category_id || 0,
+					goods_desc: item.goods_desc || '',
+					spec_type: item.spec_type || 1
+				};
+			});
+		}
+
+		return processedData;
+	}
+
+
 	// 清空当前店铺购物车
 	clearCurrentShopCart() {
 		if (!this.currentShopId) return false;