py 2 роки тому
батько
коміт
e003d3e1c0

+ 5 - 2
pages-address/select-school.vue

@@ -130,9 +130,12 @@
 					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({

+ 12 - 4
pages-buy/dry-clean.vue

@@ -181,8 +181,10 @@
 		methods: {
 			cardAllDel() {
 				if (this.cardData.goods_list.length > 0) {
+					let school_id = uni.getStorageSync('school_id');
 					setShopIngDel({
-						type: 3
+						type: 3,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.cardData.goods_list = [];
@@ -203,8 +205,10 @@
 				this.getCardList();
 			},
 			getCardList() {
+				let school_id = uni.getStorageSync('school_id');
 				getShopIngList({
-					type: 3
+					type: 3,
+					school_id: school_id
 				}).then((res) => {
 					if (res.code === 1) {
 						this.cardData = res.data;
@@ -243,11 +247,13 @@
 				this.isAJAX = true;
 				if (type === 1) {
 					// 减
+					let school_id = uni.getStorageSync('school_id');
 					setShopIngNumber({
 						type: 3,
 						goods_id: info.goods_id,
 						category_id: info.category_id,
-						operation: 2
+						operation: 2,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;
@@ -262,10 +268,12 @@
 
 				} else if (type === 2) {
 					// 加
+					let school_id = uni.getStorageSync('school_id');
 					setShopIngAdd({
 						type: 3,
 						goods_id: info.goods_id,
-						category_id: info.category_id
+						category_id: info.category_id,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;

+ 8 - 3
pages-buy/dry-mod/menu.vue

@@ -108,7 +108,8 @@
 							if (res.code === 1) {
 								this.menuList = res.data
 								getShopIngList({
-									type: 3
+									type: 3,
+									school_id: school_id
 								}).then((res) => {
 									if (res.code === 1) {
 										this.cardData = res.data;
@@ -175,11 +176,13 @@
 				this.isAJAX = true;
 				if (type === 1) {
 					// 减
+					let school_id = uni.getStorageSync('school_id');
 					setShopIngNumber({
 						type: 3,
 						goods_id: info.goods_id,
 						category_id: item.type,
-						operation: 2
+						operation: 2,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;
@@ -194,10 +197,12 @@
 
 				} else if (type === 2) {
 					// 加
+					let school_id = uni.getStorageSync('school_id');
 					setShopIngAdd({
 						type: 3,
 						goods_id: info.goods_id,
-						category_id: item.type
+						category_id: item.type,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;

+ 8 - 3
pages-buy/save-dry.vue

@@ -137,8 +137,10 @@
 		},
 		methods: {
 			getCardList() {
+				let school_id = uni.getStorageSync('school_id');
 				getShopIngList({
-					type: 3
+					type: 3,
+					school_id: school_id
 				}).then((res) => {
 					if (res.code === 1) {
 						this.cardData = res.data;
@@ -232,6 +234,7 @@
 			},
 
 			addred(type, info) {
+				let school_id = uni.getStorageSync('school_id');
 				if (this.isAJAX) {
 					return
 				}
@@ -245,7 +248,8 @@
 							type: 3,
 							goods_id: info.goods_id,
 							category_id: info.category_id,
-							operation: 2
+							operation: 2,
+							school_id: school_id
 						}).then((res) => {
 							if (res.code === 1) {
 								this.isAJAX = false;
@@ -262,7 +266,8 @@
 					setShopIngAdd({
 						type: 3,
 						goods_id: info.goods_id,
-						category_id: info.category_id
+						category_id: info.category_id,
+						school_id: school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;

+ 11 - 4
pages-takeout/confirm-mod/select-address.vue

@@ -7,7 +7,6 @@
 					<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>
@@ -21,7 +20,6 @@
 						<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>
@@ -41,7 +39,6 @@
 				</view>
 			</view>
 			
-			
 		</uni-popup>
 	</view>
 </template>
@@ -68,10 +65,20 @@
 			})
 		},
 		methods:{
-			getList(){
+			getList(AddressId){
 				getAddressList().then((res)=>{
 					if(res.code === 1){
 						this.list = res.data;
+						let isConfirmAddressFlag = uni.getStorageSync('isConfirmAddressFlag');
+						if (isConfirmAddressFlag && AddressId) {
+							let item = ''
+							res.data.forEach((v,k) => {
+								if(v.id == AddressId){
+									item = v
+								}
+							})
+							this.$emit('giveAddress',item);
+						}
 						this.openPop();
 					}
 				})

+ 4 - 2
pages-takeout/confirm-order.vue

@@ -172,8 +172,10 @@
 		methods: {
 			// 获取购物车
 			getCard() {
+				let school_id = uni.getStorageSync('school_id');
 				getShopIngList({
-					type: this.type
+					type: this.type,
+					school_id: school_id
 				}).then((res) => {
 					if (res.code === 1) {
 						this.cardData = res.data;
@@ -202,7 +204,7 @@
 					if (this.addressData.id) {
 						this.$refs.selectAddress.id = this.addressData.id;
 					}
-					this.$refs.selectAddress.getList();
+					this.$refs.selectAddress.getList(this.addressData.id);
 				} else if (type === 3) {
 					// 选择时间
 					this.$refs.selectTime.getList();

+ 9 - 5
pages-takeout/replace-take.vue

@@ -208,7 +208,7 @@
 					total_num: 0,
 					total_price: 0,
 				},
-				this.schoolData.school_id = uni.getStorageSync('school_id');
+			this.schoolData.school_id = uni.getStorageSync('school_id');
 			this.schoolData.school_name = uni.getStorageSync('school_name');
 			this.addressData.site_id = uni.getStorageSync('site_id');
 			this.addressData.site_name = uni.getStorageSync('site_name');
@@ -240,7 +240,8 @@
 			},
 			getCard() {
 				getShopIngList({
-					type: 2
+					type: 2,
+					school_id: this.schoolData.school_id 
 				}).then((res) => {
 					if (res.code === 1) {
 						this.cardData = res.data;
@@ -341,7 +342,8 @@
 				let id = type == 1 ? item.id : item.goods_id;
 				setShopIngAdd({
 					type: 2,
-					goods_id: id
+					goods_id: id,
+					school_id: this.schoolData.school_id
 				}).then((res) => {
 					if (res.code === 1) {
 						this.isAJAX = false;
@@ -370,7 +372,8 @@
 					setShopIngNumber({
 						type: 2,
 						goods_id: id,
-						operation: 2
+						operation: 2,
+						school_id: this.schoolData.school_id
 					}).then((res) => {
 						if (res.code === 1) {
 							this.isAJAX = false;
@@ -390,7 +393,8 @@
 			},
 			cardAllDel() {
 				setShopIngDel({
-					type: 2
+					type: 2,
+					school_id: this.schoolData.school_id
 				}).then((res) => {
 					if (res.code === 1) {
 						this.pickup_code = [];

+ 0 - 12
pages/index/index.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="index-box">
 		<image class="bg-img" src="@/static/img/index/index-bg.png" mode="scaleToFill"></image>
-
 		<view class="nav-z">
 			<Nav class="" :leftShow='false' :customNav='true' :bgckgroundBox='bgckgroundBox'>
 				<template>
@@ -16,7 +15,6 @@
 				</template>
 			</Nav>
 		</view>
-
 		<!-- 搜索 -->
 		<view class="index-search box-border-box mt-4" @click="toUrl(1)"
 			:style="[{'top': BarH + 'px','background':bgckgroundSearch}]">
@@ -27,8 +25,6 @@
 				<view class="fs-28 fc-f index-search-box-buttom">搜索</view>
 			</view>
 		</view>
-
-
 		<view class="index-box-1 ">
 			<!-- 轮播 -->
 			<view class="box-border-box plr-24 mb-32">
@@ -40,8 +36,6 @@
 					</swiper>
 				</uni-swiper-dot>
 			</view>
-
-
 			<!-- 导航 -->
 			<view class="box-border-box plr-24">
 				<view class="nav-list flex-wrap-wrap box-border-box mb-22">
@@ -51,8 +45,6 @@
 					</view>
 				</view>
 			</view>
-
-
 			<!-- 通知 -->
 			<view class="box-border-box plr-24">
 				<view class="msg-box align-items-center box-border-box mb-32">
@@ -67,8 +59,6 @@
 					<!-- <image class="image-2" src="@/static/img/toRight.png" mode="scaleToFill"></image> -->
 				</view>
 			</view>
-
-
 			<!-- 限时秒杀 -->
 			<view class="box-border-box plr-24" v-if="seckillGoodsList.length > 0">
 				<view class="xsms-box mb-32">
@@ -92,8 +82,6 @@
 					</view>
 				</view>
 			</view>
-
-
 			<!-- 类型选择 -->
 			<view class="type-list-box display-flex" :style="[{'background':bgckgroundType}]">
 				<view class="type-item-box view-nowrap" :class="category_id==item.id?'s-type':'n-type'"