py 2 lat temu
rodzic
commit
f6013fdd75

+ 4 - 0
components/en-from/en-upload/en-upload.vue

@@ -425,6 +425,7 @@
 				this.addProperties(image)
 			},
 			delImage(item, index) {
+				tools.showLoading()
 				this.imageList.splice(index, 1)
 				for (let obj of this.imageList) {
 					if (obj.index > item.index) {
@@ -456,6 +457,9 @@
 				for (let i = 0; i < list.length; i++) {
 					list[i] = list[i].src
 				}
+				setTimeout(() => {
+					tools.hideLoading()
+				}, 500)
 				// this.$emit('update:list', list)
 				this.$emit('input', list)
 			},

+ 15 - 6
pages-my/comment.vue

@@ -3,8 +3,8 @@
 		<Nav :title="navTitle" titleColor="#333" bgckgroundBox='#fff'></Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
 			<view class="content-box box-border-box">
-				<view class="item-box display-flex mb-26" v-for="(item,index) in listData">
-					<image class="item-img mr-16 flex-shrink0" :src="item.head_img" mode=""></image>
+				<view class="item-box display-flex mb-26" v-for="(item,index) in listData" @click="toDet(item)">
+					<image class="item-img mr-16 flex-shrink0" :src="item.head_img" mode="aspectFill"></image>
 					<view class="item-right flex-justify-space">
 						<view class="common-view-css mr-46">
 							<view class="mb-4 fc-3 fs-28">
@@ -17,7 +17,7 @@
 								{{item.msg}}
 							</view>
 						</view>
-						<image class="right-img" :src="item.image[0]" mode=""></image>
+						<image class="right-img" :src="item.image[0]" mode="aspectFill"></image>
 					</view>
 				</view>
 			</view>
@@ -38,13 +38,15 @@
 		messageList
 	} from "@/api/message.js"
 	export default {
-		components: {EnBlank},
+		components: {
+			EnBlank
+		},
 		data() {
 			return {
 				navTitle: '',
 				listData: [],
 				page: 1,
-				total:0
+				total: 0
 			};
 		},
 		onLoad(data) {
@@ -61,8 +63,15 @@
 		},
 		mounted() {},
 		methods: {
+			toDet(item) {
+				if (item.news_id > 0) {
+					uni.navigateTo({
+						url: "/pages-school/circle-info?news_id=" + item.news_id
+					})
+				}
+			},
 			scrolltolower() {
-				if(this.listData.length < this.total){
+				if (this.listData.length < this.total) {
 					this.page += 1;
 					this.messageList();
 				}

+ 2 - 2
pages-my/my-ticket.vue

@@ -28,7 +28,7 @@
 							<view class="fs-30 fw-600" :class="status == 1?'fc-FB3D03':'fc-9'">¥</view>
 							<view class="fs-48 fw-600" :class="status == 1?'fc-FB3D03':'fc-9'">{{item.money}}</view>
 						</view>
-						<view class="fs-24" :class="status == 1?'fc-6':'fc-9'">{{item.desc}}</view>
+						<view class="fs-24" :class="status == 1?'fc-6':'fc-9'">需满{{item.full_money}}元</view>
 						<view class="ball"></view>
 						<view class="ball-two"></view>
 					</view>
@@ -44,7 +44,7 @@
 							<view class="fs-24" :class="status == 1?'fc-3':'fc-9'">
 								券类型:{{item.scene == 1?'外卖券':'代取券'}}
 							</view>
-							<view class="align-items-center" @click="goToUrl(1,item)">
+							<view class="align-items-center" @click="goToUrl(1,item)" v-if="status == 1">
 								<view class="fs-24 fc-9">规则</view>
 								<image class="toRight" src="@/static/img/toRight.png" mode=""></image>
 							</view>

+ 3 - 3
pages-my/rule-info.vue

@@ -11,7 +11,7 @@
 							<view class="fs-48 fw-600" :class="ticketData.status == 1?'fc-FB3D03':'fc-9'">{{ticketData.money||''}}</view>
 						</view>
 						<view class="fs-24" :class="ticketData.status == 1?'fc-6':'fc-9'">
-							{{ticketData.desc||''}}
+							需满{{ticketData.full_money || ''}}元
 						</view>
 						<view class="ball"></view>
 						<view class="ball-two"></view>
@@ -23,7 +23,7 @@
 							{{ticketData.name||''}}
 						</view>
 						<view class="fs-24 mb-12" :class="ticketData.status == 1?'fc-FB3D03':'fc-9'">
-							{{ticketData.start_time||''}}
+							{{ticketData.time_str||''}}
 						</view>
 						<view class="flex-justify-space">
 							<view class="fs-24" :class="ticketData.status == 1?'fc-3':'fc-9'">
@@ -105,7 +105,7 @@
 	.item-left {
 		width: 200rpx;
 		height: auto;
-		padding: 34rpx 36rpx 44rpx;
+		padding: 34rpx 32rpx 44rpx;
 		box-sizing: border-box;
 		position: relative;
 		border-radius: 20rpx 0 0 20rpx;

+ 45 - 17
pages-order/express-info.vue

@@ -31,7 +31,7 @@
 							去支付
 						</view>
 					</view>
-<!-- 					<view @click="setAddress" class="w-33 flex-direction align-items-center"
+					<!-- 					<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">
@@ -62,6 +62,18 @@
 				</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">
@@ -278,7 +290,7 @@
 			},
 			getExpressPay(id) {
 				// 代取支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
@@ -311,22 +323,34 @@
 			},
 			cancelOrder() {
 				// 代取取消订单
-				if (!this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				expressOrderCancel({
-					order_id: this.infoData.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.expressOrderInfo(this.infoData.id)
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
+				uni.showModal({
+					title: '提示',
+					content: '是否取消订单?',
+					confirmText: '确定',
+					confirmColor: '#FB3D03',
+					success: (res) => {
+						if (res.confirm === true) {
+							if (this.isAJAX) {
+								return
+							}
+							this.isAJAX = true;
+							expressOrderCancel({
+								order_id: this.infoData.id
+							}).then((res) => {
+								if (res.code == 1) {
+									tools.success(res.msg)
+									setTimeout(() =>{
+										this.expressOrderInfo(this.infoData.id)
+									}, 1500)
+									this.isAJAX = false;
+								} else {
+									tools.error(res.msg)
+									this.isAJAX = false;
+								}
+							})
+						}
 					}
-				})
+				});
 			},
 			openGoods() {
 				this.goodsShow = !this.goodsShow
@@ -382,6 +406,10 @@
 </script>
 
 <style lang="scss" scoped>
+	.item-code{
+		min-width: 30%;
+		padding: 8rpx
+	}
 	.bg-img {
 		position: fixed;
 		left: 0;

+ 5 - 1
pages-order/group-info.vue

@@ -224,7 +224,11 @@
 				this.groupPay(this.infoData.id)
 			},
 			groupPay(id) {
-				// 代取支付
+				// 团购支付
+				if (this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				groupPay({
 					order_id: id
 				}).then((ret) => {

+ 38 - 13
pages-order/laundry-info.vue

@@ -20,7 +20,8 @@
 				<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 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">
@@ -79,7 +80,7 @@
 					</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">
+					v-if="infoData.item.length > 4 && infoData.item">
 					<view class="fs-24 fc-9 mr-4">
 						{{goodsShow?'展开':'收起'}}{{infoData.item.length - 4}}件商品
 					</view>
@@ -148,6 +149,7 @@
 		laundryOrderCancel,
 		laundryPay
 	} from "@/api/laundryOrder.js"
+	import tools from "@/service/tools";
 	export default {
 		components: {},
 		data() {
@@ -178,7 +180,7 @@
 		methods: {
 			goToUrl() {
 				uni.navigateTo({
-					url:'/pages-buy/dry-clean'
+					url: '/pages-buy/dry-clean'
 				})
 			},
 			pay() {
@@ -186,7 +188,11 @@
 			},
 			getExpressPay(id) {
 				// 干洗支付
-				getExpressPay({
+				if (this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
+				laundryPay({
 					order_id: id
 				}).then((ret) => {
 					if (ret.code === 1) {
@@ -215,16 +221,35 @@
 			},
 			cancelOrder() {
 				// 干洗取消订单
-				laundryOrderCancel({
-					order_id: this.infoData.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.laundryOrderInfo(infoData.id)
-					} else {
-						tools.error(res.msg)
+				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

+ 39 - 13
pages-order/takeout-info.vue

@@ -20,7 +20,11 @@
 				<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 == 3 || infoData.order_status == 7 || infoData.order_status == 8 || infoData.order_status == 9 || infoData.order_status == 10">
+				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-if="infoData.order_status == 8 && infoData.refund_status == 1">
+					申请成功,请及时联系商家退款,避免已出餐
+				</view>
+				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3"
+					v-else-if="infoData.order_status == 3 || infoData.order_status == 7 || infoData.order_status == 8 || infoData.order_status == 9 || infoData.order_status == 10">
 					感谢你对君子校园的信任,期待你再次光临
 				</view>
 				<view class="align-items-center flex-wrap-wrap">
@@ -52,8 +56,8 @@
 							联系客服
 						</view>
 					</view>
-					<view class="w-33 flex-direction align-items-center" v-show="infoData.order_status == 2 || infoData.order_status == 4"
-						@click="cancelOrder">
+					<view class="w-33 flex-direction align-items-center"
+						v-show="infoData.order_status == 2 || infoData.order_status == 4" @click="cancelOrder">
 						<image class="mb-4 icon" src="@/static/img/order/qxdd.png" mode=""></image>
 						<view class="fs-24 fc-3">
 							取消订单
@@ -277,7 +281,11 @@
 				this.orderPay(this.infoData.id)
 			},
 			orderPay(id) {
-				// 支付
+				// 票务支付
+				if (this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				orderPay({
 					order_id: id
 				}).then((ret) => {
@@ -307,16 +315,34 @@
 			},
 			cancelOrder() {
 				// 外卖取消订单
-				orderCancel({
-					order_id: this.infoData.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.orderInfo(this.infoData.id)
-					} else {
-						tools.error(res.msg)
+				uni.showModal({
+					title: '提示',
+					content: '是否取消订单?',
+					confirmText: '确定',
+					confirmColor: '#FB3D03',
+					success: (res) => {
+						if (res.confirm === true) {
+							if (this.isAJAX) {
+								return
+							}
+							this.isAJAX = true;
+							orderCancel({
+								order_id: this.infoData.id
+							}).then((res) => {
+								if (res.code == 1) {
+									tools.success(res.msg)
+									setTimeout(() =>{
+										this.orderInfo(this.infoData.id)
+									}, 1500)
+									this.isAJAX = false;
+								} else {
+									tools.error(res.msg)
+									this.isAJAX = false;
+								}
+							})
+						}
 					}
-				})
+				});
 			},
 			openGoods() {
 				this.goodsShow = !this.goodsShow

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

@@ -74,7 +74,7 @@
 						{{item.content}}
 					</view>
 					<view class="card-3 flex-wrap-wrap mb-32" style="width: 560rpx;">
-						<image class="card-3-img" :src="item" v-for="(item,i) in item.image" mode="scaleToFill"></image>
+						<image class="card-3-img" :src="item" v-for="(item,i) in item.image" mode="aspectFill"></image>
 					</view>
 					<view class="align-items-center mb-40">
 						<view class="label-box align-items-center mr-20 b-rad-200 bgc-F2F2F2">

+ 8 - 4
pages-takeout/shop-mod/menu.vue

@@ -74,7 +74,7 @@
 						</view>
 					</view>
 				</scroll-view>
-<!-- 				<view class="scroll-view-css box-border-box plr-32">
+				<!-- 				<view class="scroll-view-css box-border-box plr-32">
 					<view class="" v-for="(item,i) in popData.spec_attr" :key="i">
 						<view class="fs-32 fw-500 fc-0 mb-32">{{item.group_name}}</view>
 						<view class="flex-wrap-wrap">
@@ -324,11 +324,15 @@
 			menuScroll(e) {
 				let _this = this;
 				let query = uni.createSelectorQuery().in(this);
-				console.log(e.detail,'%%%%%%%%%%');
+				// console.log(e.detail, '%%%%%%%%%%');
 				query.selectAll(".menu-box-only").boundingClientRect(data => {
 					data.forEach((v) => {
-						console.log(v.top, '^^^^^^^^^^^^^^');
-						if (v.top < 330 && v.top > 0) {
+						if (data[this.categoryData.length - 1].top <= 392) {
+							return
+						}
+						// console.log(data[this.categoryData.length - 1].top, '^^^^^^^^^^^^^^');
+						// console.log(v.top, '^^^^^^^^^^^^^^');
+						if (v.top < 332 && v.top > 0) {
 							_this.idMark = v.id;
 							let arr = v.id.split('scroll');
 							_this.type = Number(arr[1]);

+ 14 - 0
pages/me/index.vue

@@ -68,6 +68,7 @@
 								{{userInfoData.msg_count}}条未读消息
 							</view>
 							<image class="to-right" src="@/static/img/toRight.png" mode=""></image>
+							<!-- <view class="red-point"></view> -->
 						</view>
 					</view>
 
@@ -257,6 +258,19 @@
 </script>
 
 <style lang="scss" scoped>
+	.item-right{
+		position: relative;
+	}
+	.red-point{
+		position: absolute;
+		right: 32rpx;
+		top: 0;
+		width: 14rpx;
+		height: 14rpx;
+		border-radius: 50%;
+		background: red;
+		opacity: 0.5;
+	}
 	.item-box {
 		position: relative;
 

+ 92 - 56
pages/order/index.vue

@@ -381,66 +381,102 @@
 			},
 			tackOut(item) {
 				// 外卖取消订单
-				if (!this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				orderCancel({
-					order_id: item.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.page = 1;
-						this.list = [];
-						this.orderList()
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
+				uni.showModal({
+					title: '提示',
+					content: '是否取消订单?',
+					confirmText: '确定',
+					confirmColor: '#FB3D03',
+					success: (res) => {
+						if (res.confirm === true) {
+							if (this.isAJAX) {
+								return
+							}
+							this.isAJAX = true;
+							orderCancel({
+								order_id: item.id
+							}).then((res) => {
+								if (res.code == 1) {
+									tools.success(res.msg)
+									setTimeout(() =>{
+										this.page = 1;
+										this.list = [];
+										this.orderList()
+									}, 1500)
+									this.isAJAX = false;
+								} else {
+									tools.error(res.msg)
+									this.isAJAX = false;
+								}
+							})
+						}
 					}
-				})
+				});
 			},
 			expressCancel(item) {
 				// 代取取消订单
-				if (!this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				expressOrderCancel({
-					order_id: item.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.page = 1;
-						this.list = [];
-						this.expressOrderList()
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
+				uni.showModal({
+					title: '提示',
+					content: '是否取消订单?',
+					confirmText: '确定',
+					confirmColor: '#FB3D03',
+					success: (res) => {
+						if (res.confirm === true) {
+							if (this.isAJAX) {
+								return
+							}
+							this.isAJAX = true;
+							expressOrderCancel({
+								order_id: item.id
+							}).then((res) => {
+								if (res.code == 1) {
+									tools.success(res.msg)
+									setTimeout(() =>{
+										this.page = 1;
+									this.list = [];
+									this.expressOrderList()
+									}, 1500)
+									this.isAJAX = false;
+								} else {
+									tools.error(res.msg)
+									this.isAJAX = false;
+								}
+							})
+						}
 					}
-				})
+				});
 			},
 			cancel(item) {
 				// 干洗取消订单
-				if (!this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				laundryOrderCancel({
-					order_id: item.id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.page = 1;
-						this.list = [];
-						this.laundryOrderList()
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
+				uni.showModal({
+					title: '提示',
+					content: '是否取消订单?',
+					confirmText: '确定',
+					confirmColor: '#FB3D03',
+					success: (res) => {
+						if (res.confirm === true) {
+							if (this.isAJAX) {
+								return
+							}
+							this.isAJAX = true;
+							laundryOrderCancel({
+								order_id: item.id
+							}).then((res) => {
+								if (res.code == 1) {
+									tools.success(res.msg)
+									setTimeout(() =>{
+										this.page = 1;
+									this.list = [];
+									this.laundryOrderList()
+									}, 1500)
+									this.isAJAX = false;
+								} else {
+									tools.error(res.msg)
+									this.isAJAX = false;
+								}
+							})
+						}
 					}
-				})
+				});
 			},
 			scrolltolower() {
 				++this.page
@@ -582,7 +618,7 @@
 			},
 			takeawayPay(id) {
 				// 外卖支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
@@ -617,7 +653,7 @@
 			},
 			getExpressPay(id) {
 				// 代取支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
@@ -652,7 +688,7 @@
 			},
 			groupPay(id) {
 				// 团购支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
@@ -687,7 +723,7 @@
 			},
 			ticketPay(id) {
 				// 票务支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
@@ -722,7 +758,7 @@
 			},
 			laundryPay(id) {
 				// 干洗支付
-				if (!this.isAJAX) {
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;

+ 5 - 1
service/tools.js

@@ -91,9 +91,13 @@ tools.error = function (msg) {
  * @param msg
  */
 tools.success = function (msg) {
+	let type = 'success'
+	if(msg.length > 7){
+		type = 'none'
+	}
     uni.showToast({
         'title': msg,
-        'icon': 'success',
+        'icon': type,
         'mask': true,
         'duration': 1500
     })