ZZ 1 ヶ月 前
コミット
358bc1760b

+ 5 - 0
mer_uniapp/pages/goods/goods_list/index.vue

@@ -251,6 +251,11 @@
 			this.upPng = `${this.urlDomain}crmebimage/presets/up_red.png`;
 			this.merId = options.merId ? Number(options.merId) : 0;
 			this.cateId = options.cateId ? Number(options.cateId) : '';
+			if (this.cateId) {
+				uni.setNavigationBarTitle({
+					title: '精选商品'
+				});
+			}
 			this.$set(this, 'cid', Number(options.cid) || 0);
 			this.title = options.title || '';
 			this.$set(this, 'keyword', options.searchValue || '');

+ 1 - 1
mer_uniapp/pages/merchant/home/index.vue

@@ -17,7 +17,7 @@
 									<navigator :url="`/pages/merchant/detail/index?merId=${merId}`" hover-class="none">
 										<view class="flex-center">
 											<text style="font-weight: 600;font-size: 35rpx;color: #141414;">{{ merchanInfo.name }}</text>
-											<text class="iconfont icon-jiantou"></text>
+											<view class="iconfont icon-jiantou" style="font-size: 24rpx;"></view>
 										</view>
 									</navigator>
 									<button hover-class="none" class="merCollect" :class="!merchanInfo.isCollect ? 'care' : 'bg-color'" @click="followToggle">

+ 8 - 2
mer_uniapp/pages/merchant_search/index.vue

@@ -181,6 +181,7 @@
 		},
 		methods: {
 			getMatchedData() {
+				if (this.loading) return;
 				this.loading = true
 				getMerchantSearchList({
 					latitude: uni.getStorageSync('user_latitude'),
@@ -191,10 +192,15 @@
 					limit: 10
 				}).then(res => {
 					let list = res.data.list || [];
-					this.loadTitle = list.length < 10 ? "我也是有底线的~" : '';
 					this.merchantList = this.$util.SplitArray(list, this.merchantList);
+					if (this.merchantList.length == 0) {
+						this.loadTitle = ''
+						this.noDataTip = ' 暂无外卖商家 ';
+					} else {
+						this.noDataTip = ''
+						this.loadTitle = list.length < 10 ? "我也是有底线的~" : '';
+					}
 					this.loading = false
-					this.noDataTip = this.merchantList.length ? '' : ' 暂无外卖商家 ';
 					console.log('商品信息:', this.merchantList);
 					this.page += 1;
 				}).catch(err => {

+ 78 - 49
mer_uniapp/pages/order/index.vue

@@ -3,31 +3,31 @@
 		<view class="top-1">
 			<!-- 状态栏高度 -->
 			<view :style="{ height: `${statusBarHeight}px` }"></view>
-			
-			
-				<!-- 导航栏 -->
-				<view :style="{ height: `${navigationBarHeight}px`,lineHeight: `${navigationBarHeight}px`}" class="order-nav">订单
-				</view>
 
-				<!-- 进行中/历史订单 -->
-				<view class="status-bar">
-					<view>
-						<text :class="isShow==0? 'status-true': 'status-false'" @click="statusClick(0)">进行中</text>
-						<text :class="isShow==1? 'status-true': 'status-false'" @click="statusClick(1)">历史订单</text>
 
-					</view>
+			<!-- 导航栏 -->
+			<view :style="{ height: `${navigationBarHeight}px`,lineHeight: `${navigationBarHeight}px`}" class="order-nav">订单
+			</view>
+
+			<!-- 进行中/历史订单 -->
+			<view class="status-bar">
+				<view>
+					<text :class="isShow==0? 'status-true': 'status-false'" @click="statusClick(0)">进行中</text>
+					<text :class="isShow==1? 'status-true': 'status-false'" @click="statusClick(1)">历史订单</text>
+
 				</view>
 			</view>
-		
+		</view>
+
 		<!-- 列表数据 -->
-		<view class="nbox-1">	
+		<view class="nbox-1">
 			<view class="nbox-2" v-for="(item,index) in list" :key="index">
 				<view class="container">
 					<text class="left-text">{{item.merName}}</text>
 					<view class="right-group">
 						<text v-if="item.status==1||item.status==2||item.status==3" style="color: #0FBA42;font-size: 23rpx;">制作中</text>
 						<text v-if="item.status==4" style="color: #FF5500;font-size: 23rpx;">待取餐</text>
-				
+
 						<image src="/static/img/ic-yx.png" class="image" />
 					</view>
 				</view>
@@ -48,26 +48,30 @@
 				<view class="container2">
 					<text v-if="item.status==1||item.status==2||item.status==3" class="left-text2">商家正在备餐中</text>
 					<text v-if="item.status==4" class="left-text2">商家备餐完成</text>
-					<view class="right-group" >
+					<view class="right-group">
 						<image src="/static/img/ic-iphone1.png" class="image2" />
-						<text  @click="makePhoneCall(item)" style="color: #141414;font-size: 21rpx;">联系商家</text>
-						
+						<text @click="makePhoneCall(item)" style="color: #141414;font-size: 21rpx;">联系商家</text>
+
 						<view style="display: inline-block; width: 2rpx; height: 42rpx;border: 2rpx solid #D5D6DC;"></view>
-						
-						
+
+
 						<!-- 留言字段 -->
 						<image src="/static/img/ic-message1.png" class="image2" />
 						<text style="color: #141414;font-size: 21rpx;">留言</text>
 					</view>
 				</view>
 			</view>
+			<view class='loadingicon flex-center' :hidden='!loading'>
+				<text class='loading iconfont icon-jiazai' style="width: auto;"></text>加载更多
+			</view>
+			<view class="flex-center no-data-tip" v-if="loadTitle">{{loadTitle}}</view>
 		</view>
 	</view>
 </template>
 
 <script>
 	import {
-	
+
 		getOrderList
 	} from '@/api/order.js';
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
@@ -78,7 +82,11 @@
 				statusBarHeight: app.globalData.statusBarHeight,
 				navigationBarHeight: 0,
 				isShow: 0,
-				list:[],//订单数据
+				loading: false,
+				noDataTip: '',
+				loadTitle: '',
+				page: 1,
+				list: [], //订单数据
 			}
 		},
 		//下拉刷新
@@ -96,7 +104,7 @@
 			this.navigationBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
 			// console.log("导航栏高度:"+this.globalData.navigationBarHeight)
 			// #endif
-			this.getOrderList()//订单列表
+			this.getOrderList() //订单列表
 
 		},
 		onShow() {
@@ -104,34 +112,49 @@
 		},
 		methods: {
 			// 拨打电话
-			 makePhoneCall(item) {
-			      const phoneNumber = item.merPhone; // 替换为商家的电话号码
-			      uni.makePhoneCall({
-			        phoneNumber: phoneNumber,
-			        success() {
-			          console.log('拨打电话成功');
-			        },
-			        fail() {
-			          console.log('拨打电话失败');
-			        }
-			      });
+			makePhoneCall(item) {
+				const phoneNumber = item.merPhone; // 替换为商家的电话号码
+				uni.makePhoneCall({
+					phoneNumber: phoneNumber,
+					success() {
+						console.log('拨打电话成功');
+					},
+					fail() {
+						console.log('拨打电话失败');
+					}
+				});
 			},
 			// 头部切换
 			statusClick(index) {
 				this.isShow = index;
-				this.getOrderList()	// 订单列表
+				this.list = []
+				this.page = 1
+				this.getOrderList() // 订单列表
 			},
 			// 订单列表
-			getOrderList(){
+			getOrderList() {
+				this.loading = true
 				getOrderList({
-					limit:9999,//条数
-					page:1,//页码
-					orderType:this.isShow,  //类型订单类型:0-进行中,1-完成
-				}).then(res=>{
-					console.log('订单列表',res)
-					if(res.code==200){
-						this.list=res.data.list
+					limit: 20, //条数
+					page: this.page, //页码
+					orderType: this.isShow, //类型订单类型:0-进行中,1-完成
+				}).then(res => {
+					console.log('订单列表', res)
+					if (res.code == 200) {
+						const list = res.data.list
+						this.list = this.$util.SplitArray(list, this.list);
+						if (this.list.length == 0) {
+							this.loadTitle = ''
+							this.noDataTip = ' 暂无外卖商家 ';
+						} else {
+							this.noDataTip = ''
+							this.loadTitle = list.length < 20 ? "我也是有底线的~" : '';
+						}
+						this.loading = false
+						this.page += 1
 					}
+				}).catch(err => {
+					this.loading = false
 				})
 			}
 		},
@@ -148,7 +171,11 @@
 		color: #FFFFFF;
 		background-color: #FF6702;
 		text-align: center;
-		
+
+	}
+
+	.no-data-tip {
+		color: #CCC;
 	}
 
 	.status-bar {
@@ -278,22 +305,24 @@
 		/* 控制线条高度 */
 		margin: 0 40rpx 18rpx 40rpx;
 	}
-	
-	.nbox-1{
+
+	.nbox-1 {
 		padding: 20rpx;
 		box-sizing: border-box;
 		display: flex;
 		flex-direction: column;
 		gap: 20rpx;
 	}
-	.nbox-2{
+
+	.nbox-2 {
 		background: #FFF;
-		padding:15rpx;
+		padding: 15rpx;
 		box-sizing: border-box;
 	}
-	.top-1{
+
+	.top-1 {
 		background-color: #FF6702;
 		position: sticky;
 		top: 0;
 	}
-</style>
+</style>

+ 3 - 3
mer_uniapp/pages/rider_index/components/rider_me/index.vue

@@ -33,17 +33,17 @@
 				riderInfo: [{
 					id: 1,
 					name: '跑腿记录',
-					img: '/statis/img/run-errands.png',
+					img: '/static/img/run-errands.png',
 					pagePath: ''
 				}, {
 					id: 2,
 					name: '提现',
-					img: '/statis/img/withdrawal.png',
+					img: '/static/img/withdrawal.png',
 					pagePath: ''
 				}, {
 					id: 3,
 					name: '返回用户端',
-					img: '/statis/img/run-errands.png',
+					img: '/static/img/run-errands.png',
 					pagePath: ''
 				}],
 			}

+ 30 - 10
mer_uniapp/pages/rider_index/components/rider_shipping/index.vue

@@ -5,10 +5,20 @@
 				<text :class="item.id === riderStatus ? 'active-dom-top' : ''">{{item.name}}</text>
 			</view>
 		</view>
-		<scroll-view scroll-y style="overflow: hidden;">
+		<view class="flex-center flex-col noCommodity" v-if="noDataTip">
+			<view class='pictrue'>
+				<image :src="urlDomain+'crmebimage/presets/noSearch.png'"></image>
+			</view>
+			<text class="text-ccc">{{noDataTip}}</text>
+		</view>
+		<scroll-view scroll-y @scrolltolower="onScrollBottom" style="overflow: hidden;">
 			<view v-for="(item, index) in riderData" :key="index" style="margin: 10rpx 0;">
 				<rider-order :orderInfo="item" @orderCilck="goOrderClick" :statusId="riderStatus"></rider-order>
 			</view>
+			<view class='loadingicon flex-center' :hidden='!loading'>
+				<text class='loading iconfont icon-jiazai' style="width: auto;"></text>加载更多
+			</view>
+			<view class="flex-center no-data-tip" v-if="loadTitle">{{loadTitle}}</view>
 		</scroll-view>
 	</view>
 </template>
@@ -26,12 +36,12 @@
 		},
 		data() {
 			return {
+				urlDomain: this.$Cache.get("imgHost"),
 				riderData: [], // 订单数组
 				loading: false, //是否加载中
-				loadend: false, //是否加载完毕
-				loadTitle: '加载更多', //提示语
+				loadTitle: '', //提示语
 				page: 1,
-				limit: 20,
+				limit: 2,
 				isReceiveId: null,
 				riderStatus: 1,
 				domTopData: [{
@@ -64,7 +74,6 @@
 				if (status == this.riderStatus) return;
 				this.page = 1;
 				this.riderStatus = status;
-				this.loadend = false;
 				this.getRiderDataList();
 			},
 			/**
@@ -72,22 +81,24 @@
 			 */
 			getRiderDataList: function() {
 				let that = this;
-				if (that.loadend) return;
 				if (that.loading) return;
 				that.loading = true;
-				that.loadTitle = "加载更多";
 				getRiderList({
 					status: that.riderStatus,
 					page: that.page,
 					limit: that.limit
 				}).then(res => {
 					let list = res.data.list || [];
-					let loadend = list.length < that.limit;
 					that.riderData = that.$util.SplitArray(list, that.riderData);
 					that.$set(that, 'riderData', that.riderData);
-					that.loadend = loadend;
 					that.loading = false;
-					that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
+					if (that.riderData.length == 0) {
+						that.loadTitle = ''
+						that.noDataTip = ' 暂无订单~ ';
+					} else {
+						that.noDataTip = ''
+						that.loadTitle = list.length < that.limit ? "我也是有底线的~" : '';
+					}
 					that.page = that.page + 1;
 				}).catch(err => {
 					that.loading = false;
@@ -97,6 +108,12 @@
 			goOrderClick(id) {
 				this.isReceiveId = id
 				console.log(id)
+			},
+			onScrollBottom() {
+				if (this.loading) return;
+				if (!this.loadTitle) {
+					this.getRiderDataList()
+				}
 			}
 		},
 		mounted() {
@@ -113,6 +130,9 @@
 		flex-direction: column;
 		overflow: hidden;
 	}
+	.no-data-tip {
+		color: #CCC;
+	}
 
 	.dom-top {
 		width: 100%;