Browse Source

bug 修改

17755135699 1 year ago
parent
commit
061e389c19

+ 72 - 9
pagesHouse/HotelMerchandise/index.vue

@@ -252,22 +252,69 @@
 				Selected: false,
 				Selected: false,
 				showPricing: false,
 				showPricing: false,
 				areaShow: false,
 				areaShow: false,
-				list1: [{
+				//餐饮
+				list: [{
 						name: '创建时间',
 						name: '创建时间',
-						id: 1,
+						key: 'createDate',
+						value: 1
+					},
+					{
+						name: '上架时间',
+						key: 'updateDate',
+						value: 1
+					},
+					{
+						name: '销量从高到低',
+						key: 'salesVolume',
+						value: 1
 					},
 					},
 					{
 					{
 						name: '价格从高到低',
 						name: '价格从高到低',
-						id: 2,
+						key: 'discountPrice',
+						value: 1
 					},
 					},
 					{
 					{
 						name: '价格从低到高',
 						name: '价格从低到高',
-						id: 4,
+						key: 'discountPrice',
+						value: 0
+					},
+					// {
+					// 	name: '库存从高到低',
+					// 	key: 'price',
+					// 	value: 1
+					// },
+					// {
+					// 	name: '库存从低到高',
+					// 	key: 'price',
+					// 	value: 0
+					// },
+				],
+				//渔家乐
+				list1: [{
+						name: '创建时间',
+						key: 'createDate',
+						value: 1
+					},
+					{
+						name: '上架时间',
+						key: 'updateDate',
+						value: 1
 					},
 					},
 					{
 					{
 						name: '销量从高到低',
 						name: '销量从高到低',
-						id: 2,
+						key: 'salesVolume',
+						value: 1
 					},
 					},
+					{
+						name: '价格从高到低',
+						key: 'discountPrice',
+						value: 1
+					},
+					{
+						name: '价格从低到高',
+						key: 'discountPrice',
+						value: 0
+					}
 				],
 				],
 				areaShowIndex: null,
 				areaShowIndex: null,
 				fromData: {
 				fromData: {
@@ -662,12 +709,28 @@
 			},
 			},
 			// 区域筛选
 			// 区域筛选
 			clickareaShow(e, i) {
 			clickareaShow(e, i) {
-
 				this.areaShowIndex = i;
 				this.areaShowIndex = i;
 				this.areaShow = false;
 				this.areaShow = false;
-				this.fromData.sortType = e.id;
-				this.fromData.page = 1;
-				this.getRepast();
+				// this.fromData.sortType = e.id;
+				// this.fromData.page = 1;
+				//this.getRepast();
+				this.sortPrice(e)
+
+			},
+			sortPrice(item) {
+				// if (item.val == 1) {
+				// 	this.pricesort = 1
+				// } else {
+				// 	this.pricesort = 2
+				// }
+				//let val = this.pricesort;
+				this.roomType.sort(function(a, b) {
+					if (item.value == 1) { //降序
+						return b[item.key] - a[item.key];
+					} else {
+						return a[item.key] - b[item.key]; //	升序
+					}
+				});
 			},
 			},
 			// 上架时间
 			// 上架时间
 			areaShowed() {
 			areaShowed() {

+ 54 - 25
pagesHouse/Mine/PersonalEditing/PersonalEditing.vue

@@ -7,7 +7,7 @@
 					店铺标志
 					店铺标志
 				</view>
 				</view>
 				<view class="image">
 				<view class="image">
-					<image :src="dto.shopSign">
+					<image :src="list.shopSign">
 					</image>
 					</image>
 					<u-icon @click="more()" name="arrow-right" color="#AAA"></u-icon>
 					<u-icon @click="more()" name="arrow-right" color="#AAA"></u-icon>
 				</view>
 				</view>
@@ -17,7 +17,7 @@
 					店铺名称
 					店铺名称
 				</view>
 				</view>
 				<view class="right">
 				<view class="right">
-					<input type="text" v-model="dto.name" border="none" placeholder="请输入手机号" style="height: 48rpx;" />
+					<input type="text" v-model="list.name" border="none" placeholder="请输入手机号" style="height: 48rpx;" />
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="one-mobile">
 			<view class="one-mobile">
@@ -25,7 +25,7 @@
 					联系电话
 					联系电话
 				</view>
 				</view>
 				<view class="right">
 				<view class="right">
-					<input type="text" v-model="dto.phone" border="none" placeholder="请输入手机号" style="height: 48rpx;" />
+					<input type="text" v-model="list.phone" border="none" placeholder="请输入手机号" style="height: 48rpx;" />
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="one-mobile">
 			<view class="one-mobile">
@@ -33,7 +33,7 @@
 					商家地址
 					商家地址
 				</view>
 				</view>
 				<view class="right">
 				<view class="right">
-					<input type="text" v-model="dto.areaDetail" border="none" placeholder="请输入" style="height: 48rpx;" />
+					<input type="text" v-model="list.areaDetail" border="none" placeholder="请输入" style="height: 48rpx;" />
 				</view>
 				</view>
 
 
 			</view>
 			</view>
@@ -65,7 +65,7 @@
 
 
 		</view> -->
 		</view> -->
 		<view class="from-content1">
 		<view class="from-content1">
-			<button class="tenant-button" @click="merchant">
+			<button class="tenant-button" @click="save">
 				立即保存
 				立即保存
 			</button>
 			</button>
 		</view>
 		</view>
@@ -87,6 +87,14 @@
 					idCode: '', // 证件号
 					idCode: '', // 证件号
 					id: '',
 					id: '',
 					areaDetail: ''
 					areaDetail: ''
+				},
+				list:{
+					name: '黄沙村渔家乐', //昵称
+					phone: '18755113256', //手机号
+					shopSign: '', // 头像
+					idCode: '', // 证件号
+					id: '',
+					areaDetail: ''
 				},
 				},
 				shopImgs: [],
 				shopImgs: [],
 			}
 			}
@@ -100,13 +108,11 @@
 				this.$api.get('/api/merchant/food/merchant/' + uni.getStorageSync('merchantId')).then(res => {
 				this.$api.get('/api/merchant/food/merchant/' + uni.getStorageSync('merchantId')).then(res => {
 					console.log(res)
 					console.log(res)
 					if (res.data.code == 0) {
 					if (res.data.code == 0) {
-						this.dto = res.data.data;
+						this.list = res.data.data;
 						if (!res.data.data.shopSign) {
 						if (!res.data.data.shopSign) {
-							this.dto.shopSign =
+							this.list.shopSign =
 								'https://i.ringzle.com/file/20240225/26feb8cc8f744123a980211ebdfb8d40.png';
 								'https://i.ringzle.com/file/20240225/26feb8cc8f744123a980211ebdfb8d40.png';
 						}
 						}
-						//this.shopImgs = res.data.data.split(',');
-						console.log(this.shopImgs)
 					}
 					}
 				})
 				})
 			},
 			},
@@ -136,9 +142,26 @@
 				});
 				});
 
 
 			},
 			},
-			save() {
-				this.$api.put('/merchant/merchantFisherman/home', this.dto).then(res => {
-
+			save() {
+				this.dto.idCardFront = this.list.idCardFront
+				this.dto.name = this.list.name
+				this.dto.companyName = this.list.companyName
+				this.dto.merchantType = this.list.merchantType
+				this.dto.companyType = this.list.companyType
+				this.dto.legalPerson = this.list.legalPerson
+				this.dto.idCard = this.list.idCard
+				this.dto.creditCode = this.list.creditCode
+				this.dto.idCardReverse = this.list.idCardReverse
+				this.dto.licensePic = this.list.licensePic
+				// this.dto.usccl = this.list.usccl
+				this.dto.storeFrontPic = this.list.storeFrontPic
+				this.dto.shopImgs = this.list.shopImgs
+				this.dto.linkName = this.list.linkName
+				this.dto.phone = this.list.phone
+				this.dto.areaDetail = this.list.areaDetail
+				this.dto.id = uni.getStorageSync('merchantId')
+				this.dto.id = uni.getStorageSync('merchantId')
+				this.$api.put('/api/merchant/food/updateMerchantInfo',this.dto).then(res => {
 				})
 				})
 			}
 			}
 		}
 		}
@@ -146,19 +169,25 @@
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-	//保存样式
-	.tenant-button {
-		position: fixed;
-		bottom: 0;
-		background: #007A69;
-		border-radius: 40rpx;
-		font-weight: bold;
-		font-size: 28rpx;
-		color: #FFFFFF;
-		width: 92%;
-		box-sizing: border-box;
-		// padding-bottom: 30rpx;
-		margin-bottom: 30rpx;
+	//保存样式
+	.from-content1{
+		position: fixed;
+		bottom: 30rpx;
+		padding: 0 24rpx;
+		left: 0;
+		z-index: 10;
+		    width: 100%;
+		    box-sizing: border-box;
+	}
+	.tenant-button {
+		background: #007A69;
+		border-radius: 40rpx;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #FFFFFF;
+		height: 88rpx;
+		line-height: 88rpx;
+		
 	}
 	}
 
 
 	.page {
 	.page {