Browse Source

加入购物车弹窗,图片拉伸问题
订单详情-点击商家头像跳转店铺
订单详情-留言板展示3条
留言板上传图片5张限制
评价上传图片3张限制
填写订单页面背景颜色统一
地址信息过长把编辑按钮顶没
新增地址失败要显示原因

zhaoxw 4 years ago
parent
commit
e1f854e9ba

+ 1 - 1
pagesGood/goodDetails.vue

@@ -70,7 +70,7 @@
 		<uni-popup ref="popup" type="bottom">
 			<view class="popup-box">
 				<view class="popup-good-info-box">
-					<image class="popup-good-img" v-if="goodData.imgs.length" :src="goodData.imgs[0].imgPath"></image>
+					<image mode="aspectFill" class="popup-good-img" v-if="goodData.imgs.length" :src="goodData.imgs[0].imgPath"></image>
 					<view class="popup-good-data">
 						<view class="popup-good-price"><text style="font-size: 14px;">¥</text>{{goodData.bizPrice}}</view>
 						<view class="popup-good-number">库存{{goodData.stock}}件</view>

+ 3 - 2
pagesGood/orderPay.vue

@@ -23,7 +23,7 @@
 			</view>
 			<view class="goods-list">
 				<view class="goods-row" v-for="(item, index) in orderData.goodsList" :key="index">
-					<image class="goods-img" :src="item.imgUrl"></image>
+					<image class="goods-img" mode="aspectFill" :src="item.imgUrl"></image>
 					<view class="goods-info">
 						<view class="goods-name">{{item.productName}}</view>
 						<view class="goods-type">
@@ -366,7 +366,8 @@
 
 	.container {
 		width: 100%;
-		height: 100%;
+		// height: 100%; // 100%不行,屏幕长时底下有留白
+		height: 100vh;
 		float: left;
 		background-color: #f7f7f7;
 		box-sizing: border-box;

+ 29 - 15
pagesMain/addressForm.vue

@@ -96,13 +96,20 @@
 						...this.addressData,
 						mid: uni.getStorageSync("userData").userId
 					}, 'POST').then(res => {
-						this.$refs.uTips.show({
-							title: '新增地址成功',
-							type: 'success',
-						})
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 1000)
+						if (res.isSuccess) {
+						    this.$refs.uTips.show({
+						    	title: '新增地址成功',
+						    	type: 'success',
+						    })
+						    setTimeout(() => {
+						    	uni.navigateBack()
+						    }, 1000)	
+						} else {
+							this.$refs.uTips.show({
+								title: res.msg,
+								type: 'warning',
+							})
+						}
 					}).catch(res => {
 						this.$refs.uTips.show({
 							title: '新增地址失败',
@@ -115,16 +122,23 @@
 						mid: uni.getStorageSync("userData").userId,
 						id: this.addressId
 					}, 'POST').then(res => {
-						this.$refs.uTips.show({
-							title: '编辑地址成功',
-							type: 'success',
-						})
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 1000)
+						if (res.isSuccess) {
+							this.$refs.uTips.show({
+								title: '编辑地址成功',
+								type: 'success',
+							})
+							setTimeout(() => {
+								uni.navigateBack()
+							}, 1000)
+						} else {
+							this.$refs.uTips.show({
+								title: res.msg,
+								type: 'warning',
+							})
+						}
 					}).catch(res => {
 						this.$refs.uTips.show({
-							title: '新增地址失败',
+							title: '编辑地址失败',
 							type: 'warning',
 						})
 					})

+ 16 - 10
pagesMain/addressList.vue

@@ -3,14 +3,14 @@
 		<view class="address-list">
 			<u-swipe-action v-for="(item, index) in addressList" :key="index" :index="index" @click="deleteAddress" :options="options">
 				<view class="address-row" @click="setAddress(item)">
-					<view class="address-first-name" :class="item.isDefault == 1 ? 'address-first-name-active' : ''">{{item.username ? item.username.slice(0,1) : ''}}</view>
+					<view class="address-first-name" :class="item.isDefault ? 'address-first-name-active' : ''">{{item.username ? item.username.slice(0,1) : ''}}</view>
 					<view class="address-info">
 						<view class="address-name-phone">
 							<text class="address-name">{{item.username}}</text>
 							<text class="address-phone">{{item.phone}}</text>
 						</view>
 						<view class="address-type-text">
-							<view class="address-type" :class="item.isDefault == 1 ? 'address-type-active' : ''">{{item.isDefault == 1 ? '默认' : item.tag}}</view>
+							<view v-if="item.isDefault || item.tag" class="address-type" :class="item.isDefault? 'address-type-active' : ''">{{item.isDefault ? '默认' : item.tag}}</view>
 							<text class="address-text">{{item.province}},{{item.city}},{{item.area}},{{item.address}}</text>
 						</view>
 					</view>
@@ -139,11 +139,12 @@
 
 			.address-row {
 				width: 100%;
-				height: 77px;
+				// height: 77px;
 				float: left;
 				border-bottom: 1px solid #DBDBDB;
 				box-sizing: border-box;
 				padding: 20px 15px;
+				position: relative;
 
 				.address-first-name {
 					width: 36px;
@@ -156,6 +157,9 @@
 					font-family: PingFang SC;
 					text-align: center;
 					line-height: 36px;
+					top: 50%;
+					position: absolute;
+					transform: translateY(-50%);
 				}
 
 				.address-first-name-active {
@@ -164,13 +168,13 @@
 
 				.address-info {
 					width: calc(100% - 103px);
-					height: 36px;
+					// height: 36px;
 					float: left;
-					margin: 0 10px 0 15px;
+					margin: 0 10px 0 51px;
 
 					.address-name-phone {
 						width: 100%;
-						height: 16px;
+						// height: 16px;
 						float: left;
 						line-height: 16px;
 						font-family: PingFang SC;
@@ -189,14 +193,11 @@
 
 					.address-type-text {
 						width: 100%;
-						height: 16px;
+						// height: 16px;
 						margin-top: 4px;
 						float: left;
 						line-height: 16px;
 						font-family: PingFang SC;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-						overflow: hidden;
 
 						.address-type {
 							height: 16px;
@@ -216,6 +217,7 @@
 						.address-text {
 							font-size: 12px;
 							color: #333333;
+							word-break:break-all;
 						}
 					}
 				}
@@ -231,6 +233,10 @@
 					font-size: 12px;
 					font-family: PingFang SC;
 					color: #656565;
+					top: 50%;
+					right: 15px;
+					position: absolute;
+					transform: translateY(-50%);
 				}
 			}
 		}

+ 1 - 1
pagesMain/evaluateForm.vue

@@ -7,7 +7,7 @@
 				</u-cell-item>
 				<u-field type="textarea" placeholder="请对商品进行评价" v-model="formData.evaluateContent" label-width="0"></u-field>
 			</u-cell-group>
-			<u-upload :action="uploadUrl" :form-data="uploadData" @on-success="uploadSuccess" @on-error="uploadError" @on-remove="uploadRemove"></u-upload>
+			<u-upload :action="uploadUrl" max-count="3" :form-data="uploadData" @on-success="uploadSuccess" @on-error="uploadError" @on-remove="uploadRemove"></u-upload>
 		</view>
 		<view class="form-handle">
 			<u-button type="success" shape="circle" :ripple="true" @click="submitData" class="handle-custom">提交</u-button>

+ 1 - 1
pagesMain/messageForm.vue

@@ -4,7 +4,7 @@
 			<u-cell-group :border="false">
 				<u-field type="textarea" placeholder="请输入留言" v-model="formData.leaMsgContent" label-width="0"></u-field>
 			</u-cell-group>
-			<u-upload :action="uploadUrl" :form-data="uploadData" @on-success="uploadSuccess" @on-error="uploadError" @on-remove="uploadRemove"></u-upload>
+			<u-upload :action="uploadUrl" max-count="5" :form-data="uploadData" @on-success="uploadSuccess" @on-error="uploadError" @on-remove="uploadRemove"></u-upload>
 		</view>
 		<view class="form-handle">
 			<u-button type="success" shape="circle" :ripple="true" @click="submitData" class="handle-custom">发布</u-button>

+ 13 - 5
pagesMain/orderDetail.vue

@@ -18,7 +18,7 @@
 			</view>
 		</view>
 		<view class="goods-info-box">
-			<view class="shop-info">
+			<view class="shop-info" @click.stop="gotoShop()">
 				<text class="iconfont icondianpu"></text>
 				<text class="shop-name">{{orderData.merchantInfoResVO.supplierName}}</text>
 				<text class="iconfont iconfangxiang"></text>
@@ -61,14 +61,14 @@
 			</view>
 			<view class="info-content-box">
 				<view class="message-row" v-for="(item, index1) in orderData.leas" :key="index1">
-					<image class="message-head" :src="orderData.merchantInfoResVO.headImg" mode="aspectFill"></image>
+					<image class="message-head" :src="item.headImg" mode="aspectFill"></image>
 					<view class="message-info-box">
-						<view class="message-name">{{item.leaMsgType}}</view>
+						<view class="message-name">{{item.name}}</view>
 						<view class="message-date">{{item.leaMsgTime}}</view>
 						<view class="message-text">{{item.leaMsgContent}}</view>
-						<view class="message-img-box" v-for="(site, index2) in item.orderLeaImgResVOs" :key="index2">
+						<!-- <view class="message-img-box" v-for="(site, index2) in item.orderLeaImgResVOs" :key="index2">
 							<image class="message-img" :src="site.imgUrl" mode="aspectFill"></image>
-						</view>
+						</view> -->
 					</view>
 				</view>
 			</view>
@@ -479,6 +479,14 @@
 				uni.navigateTo({
 					url: '/pagesMain/messageList?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
 				});
+			},
+			//  跳转商铺
+			gotoShop() {
+				if (this.orderData.merchantInfoResVO.products.length) {
+					uni.navigateTo({
+						url: '/pagesGood/shopDetails?goodId=' + this.orderData.merchantInfoResVO.products[0].productId
+					});
+				}
 			}
 		}
 	}