Prechádzať zdrojové kódy

feat:页面样式修改,修改默认头像,地址增加搜索,地址增加复制粘贴获取地址详情

颜琼丽 11 hodín pred
rodič
commit
36413c1d3e

+ 6 - 0
jd_logistics-app/api/address.js

@@ -42,3 +42,9 @@ export function getLastAddress() {
   return request.get('system/front/book/getRecentAddresses')
 }
 
+/**
+ * 获取地址信息你
+ */
+export function getAddressInfo(data) {
+  return request.post('system/kd100/wxmini/queryIcrExpres',data)
+}

+ 3 - 3
jd_logistics-app/config/env.js

@@ -3,10 +3,10 @@
 // let domain = 'http://192.168.100.199:8081' // 晋守桦IP
 // let domain = 'http://192.168.100.14:8081' // 赵乔功IP
 // let domain = 'http://192.168.100.146:8079' // 马二勇
- // let domain = 'http://192.168.100.92:8080' // 朝龙
+    //let domain = 'http://192.168.100.92:8080' // 朝龙
   //let domain = 'http://192.168.101.213:8080' // 小明
- 
- let domain = 'https://rjsd.mychery.com/prod-api' //线上环境
+ let domain = 'http://192.168.101.39:8080' // 学富
+ //let domain = 'https://rjsd.mychery.com/prod-api' //线上环境
 
 const getBaseUrl = () => {
   // 获取小程序账户信息(包含环境版本)

+ 23 - 27
jd_logistics-app/pages.json

@@ -7,6 +7,13 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/order/index",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/mine/mine",
 			"style": {
@@ -46,6 +53,18 @@
 			"style": {
 				"navigationBarTitleText": "关于我们"
 			}
+		},
+		{
+			"path": "pages/order/create_order",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		},
+		{
+			"path": "pages/order/order_detail",
+			"style": {
+				"navigationBarTitleText": "订单详情"
+			}
 		}
 	],
 	"subPackages": [
@@ -59,29 +78,6 @@
 				}
 			}]
 		},
-		{
-			"root": "pages/order",
-			"name": "order",
-			"pages": [{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "订单列表"
-					}
-				},
-				{
-					"path": "order_detail",
-					"style": {
-						"navigationBarTitleText": "订单详情"
-					}
-				},
-				{
-					"path": "create_order",
-					"style": {
-						"navigationBarTitleText": "创建订单"
-					}
-				}
-			]
-		},
 		{
 			"root": "pages/address",
 			"name": "address",
@@ -118,10 +114,10 @@
 			"iconPath": "static/img/tabs/home.png",
 			"text": "首页"
 		}, {
-			"pagePath": "pages/search/search",
-			"selectedIconPath": "static/img/tabs/search_active.png",
-			"iconPath": "static/img/tabs/search.png",
-			"text": "查快递"
+			"pagePath": "pages/order/index",
+			"selectedIconPath": "/static/img/tabs/order_active.png",
+			"iconPath": "/static/img/tabs/order.png",
+			"text": "订单"
 		}, {
 			"pagePath": "pages/mine/mine",
 			"selectedIconPath": "static/img/tabs/user_active.png",

+ 90 - 2
jd_logistics-app/pages/address/address_list.vue

@@ -1,5 +1,30 @@
 <template>
 	<view class="address-page">
+		
+		<!-- 搜索框(原生 input 实现,兼容微信小程序) -->
+		<view class="search-section">
+			<view class="search-box">
+				<!-- 搜索图标 -->
+				<view class="search-icon">
+					<u-icon name="search" size="22" color="#999"></u-icon>
+				</view>
+				<!-- 输入框 -->
+				<input 
+					class="search-input" 
+					type="text" 
+					v-model="searchKeyword" 
+					placeholder="请输入姓名/手机号/地址"
+					placeholder-class="placeholder-style"
+					confirm-type="search"
+					@confirm="handleSearch"
+				/>
+				<!-- 自定义清除按钮 -->
+				<view v-if="searchKeyword" class="search-clear" @click.stop="handleClear">
+					<u-icon name="close-circle" size="22" color="#999"></u-icon>
+				</view>
+			</view>
+		</view>
+		
 		<!-- 地址列表 -->
 		<view class="address-list">
 			<!-- 地址项组件 -->
@@ -49,6 +74,7 @@
 		updateBook
 	} from '../../api/address'
 
+	const searchKeyword = ref('')
 	const pageNum = ref(1)
 	const pageSize = ref(10)
 	const recordTotal = ref(0)
@@ -211,6 +237,18 @@
 		})
 	}
 
+	// 搜索(点击键盘搜索或清除后调用)
+	const handleSearch = () => {
+		pageNum.value = 1
+		getAddressList()
+	}
+
+	// 清除按钮点击
+	const handleClear = () => {
+		searchKeyword.value = ''
+		handleSearch()
+	}
+
 	const loadMore = () => {
 		pageNum.value++
 		getAddressList(true)
@@ -220,7 +258,8 @@
 	const getAddressList = () => {
 		const params = {
 			pageNum: pageNum.value,
-			pageSize: pageSize.value
+			pageSize: pageSize.value,
+			searchKeyword:searchKeyword.value
 		}
 
 		uni.showLoading({
@@ -246,7 +285,7 @@
 	}
 </script>
 
-<style scoped>
+<style scoped lang="less">
 	.address-page {
 		display: flex;
 		flex-direction: column;
@@ -254,6 +293,55 @@
 		background-color: #F5F7FA;
 	}
 
+	.search-section {
+		background-color: #fff;
+		padding: 16rpx;
+		margin-left: 14rpx;
+	}
+
+	.search-box {
+		display: flex;
+		align-items: center;
+		background-color: #F5F7FA;
+		border-radius: 36rpx;
+		padding: 0 20rpx;
+		height: 72rpx; /* 与 u-search 高度一致 */
+	}
+
+	.search-icon {
+		margin-right: 16rpx;
+		display: flex;
+		align-items: center;
+	}
+
+	.search-input {
+		flex: 1;
+		height: 100%;
+		font-size: 28rpx;
+		color: #333;
+		background-color: transparent;
+		border: none;
+		outline: none;
+	}
+
+	.placeholder-style {
+		color: #999;
+		font-size: 28rpx;
+	}
+
+	.search-clear {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		margin-left: 16rpx;
+		padding: 8rpx;
+		
+		&:active {
+			opacity: 0.6;
+		}
+	}
+
+
 	.address-list {
 		padding: 20rpx 30rpx 152rpx;
 		box-sizing: border-box;

+ 242 - 45
jd_logistics-app/pages/address/edit.vue

@@ -1,9 +1,20 @@
 <template>
 	<view class="container">
+		<view class="form-card-textarea">
+			<view class="form-item">
+				<textarea class="input-field-textarea flex-item" placeholder="请输入文本,自动识别姓名、电话和地址"
+					placeholder-class="placeholder" v-model="textArea" maxlength="250" />
+			</view>
 
-		<!-- 物品信息 -->
-		<view class="form-card">
+			<view class="form-item">
+				<view class="search-btn" @click="handleSearch">
+					粘贴并识别
+				</view>
+			</view>
+		</view>
 
+		<!-- 物品信息 -->
+		<view class="form-card" style="margin-top: 20rpx;">
 			<!-- 姓名 + 电话 并排 -->
 			<view class="form-item row">
 				<input class="input-field flex-item" placeholder="姓名" placeholder-class="placeholder" maxlength="20"
@@ -40,18 +51,20 @@
 			</view>
 		</view>
 
-		<view class="section-title"  v-if="addressList.length > 0">最近使用地址</view>
+		<view class="section-title" v-if="addressList.length > 0">最近使用地址</view>
 
 		<!-- 最近使用地址 -->
-		<view class="recent-address"  v-if="addressList.length > 0">
+		<view class="recent-address" v-if="addressList.length > 0">
 			<view class="address-item" v-for="(item, index) in addressList" :key="item.id"
-			 @click="onSelectAddress(item)">
+				@click="onSelectAddress(item)">
 				<AddressInfo :address="item" />
 			</view>
 		</view>
 
 		<!-- 确定按钮 -->
-		<view class="submit-btn" @click="onConfirm">确定</view>
+		<view class="add-btn-container">
+			<view class="submit-btn" @click="onConfirm">确定</view>
+		</view>
 
 		<!-- 安全区域占位 -->
 		<view class="safe-area"></view>
@@ -70,22 +83,25 @@
 	import {
 		addBook,
 		updateBook,
-		getBook,getLastAddress
+		getBook,
+		getLastAddress,
+		getAddressInfo
 	} from '@/api/address.js'
 
 	const addType = ref('') // 'sender' 或 'receiver',表示从下单页面哪个字段进入
-	
+
 	const addressList = ref([])
 
+	const textArea = ref('')
+
 	// 表单数据
 	const formData = reactive({
-		addressId:undefined,
+		addressId: undefined,
 		contactName: '',
 		contactPhone: '',
 		provinceName: '',
 		cityName: '',
 		countyName: '',
-		addressId: null,
 		detailedAddress: '',
 		defaultFlag: 0
 	})
@@ -102,6 +118,102 @@
 		getAddressList()
 	});
 
+	// 粘贴并识别功能
+	const handleSearch = async () => {
+		try {
+			// 1. 读取剪贴板内容
+			const clipboardText = await new Promise((resolve, reject) => {
+				uni.getClipboardData({
+					success: res => resolve(res.data),
+					fail: err => reject(err)
+				});
+			});
+
+			if (!clipboardText) {
+				uni.showToast({
+					title: '剪贴板内容为空',
+					icon: 'none'
+				});
+				return;
+			}
+
+			// 可选:将剪贴板内容显示到文本域中,方便用户查看
+			textArea.value = clipboardText;
+
+			uni.showLoading({
+				title: '识别中...',
+				mask: true
+			});
+
+			// 2. 调用接口解析地址
+			const params = {
+				param: clipboardText
+			}; // 根据后端接口要求调整参数格式
+			const res = await getAddressInfo(params);
+			uni.hideLoading();
+
+			if (res.code === 200 && res.data?.result?.length > 0) {
+				const result = res.data.result[0];
+
+				// 填充姓名
+				if (result.name) {
+					formData.contactName = result.name;
+				}
+
+				// 填充电话(取第一个手机号)
+				if (result.mobile && result.mobile.length > 0) {
+					formData.contactPhone = result.mobile[0];
+				}
+
+				// 填充省市区
+				if (result.xzq) {
+					// 从 fullName 中拆分省市区
+					if (result.xzq.fullName) {
+						const parts = result.xzq.fullName.split(',').map(s => s.trim());
+						formData.provinceName = parts[0] || '';
+						formData.cityName = parts[1] || '';
+						formData.countyName = parts[2] || '';
+					} else {
+						// 兼容旧的字段
+						formData.provinceName = result.xzq.province || '';
+						formData.cityName = result.xzq.city || '';
+						formData.countyName = result.xzq.district || '';
+					}
+
+					// 填充详细地址:优先使用 subArea,否则尝试从完整地址中去除省市区前缀
+					if (result.xzq.subArea) {
+						formData.detailedAddress = result.xzq.subArea;
+					} else if (result.address) {
+						const fullAddr = result.address;
+						const prefix = `${formData.provinceName}${formData.cityName}${formData.countyName}`;
+						if (fullAddr.startsWith(prefix)) {
+							formData.detailedAddress = fullAddr.substring(prefix.length);
+						} else {
+							formData.detailedAddress = fullAddr; // 保底
+						}
+					}
+				}
+
+				uni.showToast({
+					title: '识别成功',
+					icon: 'success'
+				});
+			} else {
+				uni.showToast({
+					title: res.message || '识别失败,请重试',
+					icon: 'none'
+				});
+			}
+		} catch (error) {
+			uni.hideLoading();
+			uni.showToast({
+				title: '操作失败',
+				icon: 'none'
+			});
+			console.error('粘贴识别错误:', error);
+		}
+	};
+
 	// 获取地址详情
 	const getAddress = async () => {
 		let res = await getBook(formData.addressId);
@@ -158,34 +270,55 @@
 	const onConfirm = async () => {
 		// 姓名校验
 		if (!formData.contactName || formData.contactName.trim() === '') {
-			return uni.showToast({ title: '请输入姓名', icon: 'none' });
+			return uni.showToast({
+				title: '请输入姓名',
+				icon: 'none'
+			});
 		}
 		if (formData.contactName.length > 20) {
-			return uni.showToast({ title: '姓名不能超过20个字符', icon: 'none' });
+			return uni.showToast({
+				title: '姓名不能超过20个字符',
+				icon: 'none'
+			});
 		}
 
 		// 电话校验
 		if (!formData.contactPhone) {
-			return uni.showToast({ title: '请输入联系电话', icon: 'none' });
+			return uni.showToast({
+				title: '请输入联系电话',
+				icon: 'none'
+			});
 		}
 		if (!isValidPhone(formData.contactPhone)) {
-			return uni.showToast({ title: '请输入正确的手机号码', icon: 'none' });
+			return uni.showToast({
+				title: '请输入正确的手机号码',
+				icon: 'none'
+			});
 		}
 
 		// 省市区校验
 		if (!formData.provinceName) {
-			return uni.showToast({ title: '请选择省市区', icon: 'none' });
+			return uni.showToast({
+				title: '请选择省市区',
+				icon: 'none'
+			});
 		}
 
 		// 详细地址校验
 		if (!formData.detailedAddress || formData.detailedAddress.trim() === '') {
-			return uni.showToast({ title: '请输入详细地址', icon: 'none' });
+			return uni.showToast({
+				title: '请输入详细地址',
+				icon: 'none'
+			});
 		}
 		if (formData.detailedAddress.length > 100) {
-			return uni.showToast({ title: '详细地址不能超过100个字符', icon: 'none' });
+			return uni.showToast({
+				title: '详细地址不能超过100个字符',
+				icon: 'none'
+			});
 		}
 		uni.showLoading({
-			title:'正在保存',
+			title: '正在保存',
 			mask: true
 		})
 
@@ -194,18 +327,27 @@
 		let res = await api;
 
 		if (res.code === 200) {
-			uni.showToast({ title: '保存成功', icon: 'success' });
-			debugger
+			uni.showToast({
+				title: '保存成功',
+				icon: 'success'
+			});
+
 			// 如果接口返回了新地址数据,更新到formData(特别是新增时的ID)
 			if (!formData.addressId) {
 				formData.addressId = res.data
 			}
-			debugger
+			if (addType.value !== 'sender' && addType.value !== 'receiver') {
+				uni.navigateBack() // 返回上一页
+				return;
+			}
 			onSelectAddress(formData);
 			uni.hideLoading()
 		} else {
 			uni.hideLoading()
-			uni.showToast({ title: res.msg || '保存失败', icon: 'none' });
+			uni.showToast({
+				title: res.msg || '保存失败',
+				icon: 'none'
+			});
 		}
 	};
 
@@ -218,33 +360,55 @@
 			type: addType.value,
 			address
 		});
-		
+
 		uni.navigateBack() // 返回上一页
 	};
-	
+
 	// 获取地址列表
 	const getAddressList = () => {
 		getLastAddress().then(res => {
 			addressList.value = res.data
-		}, err => {
-		})
+		}, err => {})
 	}
-	
 </script>
 
 <style scoped lang="less">
 	.container {
 		background-color: #F5F7FA;
 		min-height: 100vh;
-		padding: 20rpx 20rpx 30rpx 20rpx;
+		padding: 20rpx 0rpx 30rpx 0rpx;
 	}
 
 	.form-card {
+		margin: 0rpx 20rpx;
 		background-color: #fff;
 		border-radius: 32rpx;
 		padding: 0 20rpx;
 	}
 
+	.form-card-textarea {
+		margin: 0rpx 20rpx;
+		background-color: #fff;
+		border-radius: 32rpx;
+		padding: 20rpx 20rpx;
+
+		.search-btn {
+			width: 204rpx;
+			height: 72rpx;
+			background: #1B64F0;
+			border-radius: 38rpx;
+			font-weight: 400;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			line-height: 72rpx;
+			text-align: center;
+			font-style: normal;
+			position: absolute;
+			right: 40rpx;
+
+		}
+	}
+
 	.form-item {
 		display: flex;
 		align-items: center;
@@ -256,11 +420,38 @@
 			gap: 20rpx;
 		}
 
+		&.column {
+			flex-direction: column;
+		}
+
 		&:last-child {
 			border-bottom: none;
 		}
 	}
 
+	.input-field-textarea {
+		height: 200rpx;
+		line-height: 48rpx;
+		font-size: 28rpx;
+		color: #333;
+		background: transparent;
+		padding: 20rxp 0rpx;
+
+		&.flex-item {
+			flex: 1;
+			width: auto;
+			min-width: 0; // 防止溢出
+		}
+
+		&.full-width {
+			width: 100%;
+		}
+
+		.placeholder {
+			color: #999;
+		}
+	}
+
 	/* 输入框通用样式 */
 	.input-field {
 		height: 100rpx;
@@ -332,11 +523,12 @@
 		font-size: 32rpx;
 		color: #333333;
 		line-height: 48rpx;
-		margin: 20rpx 0;
+		margin: 20rpx;
 		font-weight: bold;
 	}
 
 	.recent-address {
+		margin: 0rpx 20rpx;
 		background-color: #fff;
 		padding: 0 30rpx;
 	}
@@ -346,23 +538,28 @@
 		border-bottom: 1rpx solid #eee;
 	}
 
-	/* 确定按钮 */
-	.submit-btn {
+	.add-btn-container {
+		width: 100%;
 		position: fixed;
-		bottom: 40rpx;
-		left: 30rpx;
-		right: 30rpx;
-		width: 686rpx;
-		height: 88rpx;
-		background: #1B64F0;
-		border-radius: 44rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 32rpx;
-		color: #FFFFFF;
-		line-height: 88rpx;
-		z-index: 10;
+		bottom: 0rpx;
+		padding: 32rpx;
+		background-color: #fff;
+		border-top: 1rpx solid #eee;
+		box-sizing: border-box;
+
+		/* 确定按钮 */
+		.submit-btn {
+			height: 88rpx;
+			background: #1B64F0;
+			border-radius: 44rpx;
+			color: #fff;
+			font-size: 32rpx;
+			font-weight: 500;
+			height: 88rpx;
+			line-height: 88rpx;
+			text-align: center
+		}
+
 	}
 
 	.safe-area {

+ 12 - 12
jd_logistics-app/pages/index/components/PersonalExpressDialog.vue

@@ -10,20 +10,20 @@
 
 			<!-- 物流选项 -->
 			<view class="express-options">
+				<!-- 京东选项 -->
+				<view class="express-option jd-option" :class="{ 'selected': selectedExpress === '京东' }"
+					@click="selectExpress('京东')">
+					<image class="option-icon" src="/static/img/icon-logo-jd.png" mode="aspectFit" />
+					<text class="option-text">京东物流</text>
+				</view>
+				
 				<!-- 顺丰选项 -->
 				<view class="express-option sf-option" :class="{ 'selected': selectedExpress === '顺丰' }"
 					@click="selectExpress('顺丰')">
 					<image class="option-icon" src="/static/img/icon-logo-sf.png" mode="aspectFit" />
 					<text class="option-text">顺丰物流</text>
-
 				</view>
 
-				<!-- 京东选项 -->
-				<view class="express-option jd-option" :class="{ 'selected': selectedExpress === '京东' }"
-					@click="selectExpress('京东')">
-					<image class="option-icon" src="/static/img/icon-logo-jd.png" mode="aspectFit" />
-					<text class="option-text">京东物流</text>
-				</view>
 			</view>
 
 			<!-- 取消按钮 -->
@@ -84,12 +84,12 @@
 		// 延时关闭并传递选择结果
 		setTimeout(() => {
 			// const url = encodeURIComponent(company == '京东' ? "https://rjsd.mychery.com/jd.html" : "https://rjsd.mychery.com/sf.html")
-			const url = encodeURIComponent(company == '京东' ? "https://rjsd.mychery.com/jd" : "https://rjsd.mychery.com/sf")
-			uni.navigateTo({
-				url: '/pages/webView/webView?title=个人寄件&url=' + url
-			})
+			// const url = encodeURIComponent(company == '京东' ? "https://rjsd.mychery.com/jd/" : "https://rjsd.mychery.com/sf/")
+			// uni.navigateTo({
+			// 	url: '/pages/webView/webView?title=个人寄件&url=' + url
+			// })
 			
-			return
+			// return
 
 			const appId = company == '京东' ? "wx73247c7819d61796" : "wxd4185d00bf7e08ac"
 			wx.navigateToMiniProgram({

+ 115 - 17
jd_logistics-app/pages/index/index.vue

@@ -13,8 +13,20 @@
 			</swiper>
 		</view>
 
+		<view class="search-section">
+			<view class="search-input-wrapper">
+				<image class="search-icon" src="@/static/img/search.png" />
+				<input class="search-input" placeholder="请输入要查询的运单号" placeholder-class="placeholder-style"
+					@focus="onInputFocus" @blur="onInputBlur" v-model="trackingNumber" />
+				<view class="search-btn" @click="handleSearch">
+					搜索
+				</view>
+			</view>
+
+		</view>
+
 		<view class="btn-container">
-			
+
 			<view class="btn-item" @click="handleExpress('1')">
 				<image class="button-icon" src="/static/img/index-un-time.png" />
 				<view class="button-right">
@@ -22,8 +34,8 @@
 					<view class="button-desc">下单当日取件</view>
 				</view>
 			</view>
-			
-	<!-- 		<view class="btn-item" @click="handleExpress('2')">
+
+			<!-- 		<view class="btn-item" @click="handleExpress('2')">
 				<image class="button-icon" src="/static/img/index-time.png" />
 				<view class="button-right">
 					<view class="button-title">瑞鲸速达(顺丰)</view>
@@ -31,7 +43,7 @@
 				</view>
 
 			</view> -->
-			
+
 			<view class="btn-item" @click="showExpressDialog">
 				<image class="button-icon" src="/static/img/index-personal.png" />
 				<view class="button-right">
@@ -71,6 +83,10 @@
 
 	// 轮播图数据
 	const swiperList = ref([])
+	
+	
+	const trackingNumber = ref('')
+	const isInputFocused = ref(false)
 
 	onShow(() => {
 		getBannerList()
@@ -103,20 +119,45 @@
 			url: `/pages/order/create_order?product=${company}`
 		})
 	}
-	
+
 	const handleBannerClick = (item) => {
-	  if (!item.linkUrl) {
-	    // uni.showToast({ title: '暂无跳转链接', icon: 'none' });
-	    return;
-	  }
-	 if (item.linkUrl.startsWith('http://') || item.linkUrl.startsWith('https://')) {
+		//  if (!item.linkUrl) {
+		//    // uni.showToast({ title: '暂无跳转链接', icon: 'none' });
+		//    return;
+		//  }
+		// if (item.linkUrl.startsWith('http://') || item.linkUrl.startsWith('https://')) {
+		// uni.navigateTo({
+		//   url: `/pages/webView/webView?url=${encodeURIComponent(item.linkUrl)}`
+		// })
+		//  } else {
+		// uni.showToast({ title: '链接格式不支持', icon: 'none' })
+		//  }
+	};
+	
+	
+	const onInputFocus = () => {
+		isInputFocused.value = true
+	}
+	
+	const onInputBlur = () => {
+		isInputFocused.value = false
+	}
+	
+	const handleSearch = async () => {
+		if (!await checkLoginShowModal()) return;
+		if (!trackingNumber.value.trim()) {
+			uni.showToast({
+				title: '请输入运单号',
+				icon: 'none'
+			})
+			return
+		}
 		uni.navigateTo({
-		  url: `/pages/webView/webView?url=${encodeURIComponent(item.linkUrl)}`
+			url:'/pages/logistics/index?orderNo=' + trackingNumber.value.trim()
 		})
-	  } else {
-		uni.showToast({ title: '链接格式不支持', icon: 'none' })
-	  }
-	};
+		return
+	}
+	
 </script>
 
 <style lang="scss" scoped>
@@ -216,12 +257,69 @@
 		border-radius: 4rpx;
 	}
 
+
+	/* 搜索区域 */
+	.search-section {
+		position: relative;
+		top: -40rpx;
+		width: 100%;
+		padding: 0 20rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+		.search-input-wrapper {
+			width: 100%;
+			height: 88rpx;
+			background: #FFFFFF;
+			border-radius: 44rpx;
+			font-size: 28rpx;
+			color: #333;
+			border: 4rpx solid #1B64F0;
+			padding: 6rpx;
+			display: flex;
+			justify-content: center;
+			justify-items: center;
+			align-items: center;
+
+			.search-icon {
+				width: 40rpx;
+				height: 40rpx;
+				margin-left: 18rpx;
+			}
+
+			.search-input {
+				flex: 1;
+				margin-left: 8rpx;
+				margin-right: 8rpx;
+			}
+
+
+			.placeholder-style {
+				color: #999999;
+			}
+
+			.search-btn {
+				width: 160rpx;
+				height: 76rpx;
+				background: #1B64F0;
+				border-radius: 38rpx;
+				font-weight: 400;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				line-height: 76rpx;
+				text-align: center;
+				font-style: normal;
+			}
+
+		}
+
+	}
+
 	.btn-container {
 		display: flex;
 		flex-wrap: wrap;
 		justify-content: space-between;
-		position: relative;
-		top: -40rpx;
 		padding: 0rpx 20rpx;
 
 		.btn-item {

+ 1 - 1
jd_logistics-app/pages/mine/login.vue

@@ -10,7 +10,7 @@
 		<template v-if="loginMode === 'password'">
 			<!-- 手机号输入框 -->
 			<view class="input-wrapper">
-				<input v-model="phone" type="number" maxlength="11" class="input-field" placeholder="请输入帐号"
+				<input v-model="phone" maxlength="11" class="input-field" placeholder="请输入帐号"
 					placeholder-style="color: #999;" confirm-type="done" />
 			</view>
 

+ 18 - 3
jd_logistics-app/pages/mine/mine.vue

@@ -13,7 +13,15 @@
 						:src="userAvatar"
 						mode="aspectFill"
 						:show-level="false"
-					></u-avatar>
+						default-url="/static/img/default-avatar.png"
+						></u-avatar>
+					
+					<!-- <image
+						@click="toUser"
+						:src="userAvatar"
+						mode="aspectFill"
+						class="avatar"
+					></image> -->
 					<view class="user-text-info">
 						<view class="user-name-section">
 							<view v-if="isLoggedIn">
@@ -47,13 +55,13 @@
 		<view class="menu-section">
 			<view class="menu-card">
 				<!-- 订单列表 -->
-				<view class="menu-item" @click="toOrderList">
+	<!-- 			<view class="menu-item" @click="toOrderList">
 					<view class="menu-item-left">
 						<image src="/static/img/mine/icon-mine-order.png" class="menu-icon"></image>
 						<text class="menu-text">订单列表</text>
 					</view>
 					<image src="/static/img/arrow-right.png" class="arrow-icon"></image>
-				</view>
+				</view> -->
 
 				<!-- 地址簿 -->
 				<view class="menu-item" @click="toAddressBook">
@@ -148,6 +156,7 @@ const userAvatar = computed(() => {
 	return appStore.userInfo?.avatar || '/static/img/default-avatar.png';
 });
 
+
 const displayName = computed(() => {
 	return appStore.userInfo?.nickName || appStore.userInfo?.userName;
 });
@@ -290,6 +299,12 @@ function userLogoutFn() {
 				display: flex;
 				align-items: center;
 				min-height: 144rpx;
+				
+				.avatar {
+					width: 144rpx;
+					height: 144rpx;
+					border-radius: 50%;
+				}
 
 				.user-text-info {
 					flex: 1;

+ 1 - 1
jd_logistics-app/pages/order/components/OrderItem.vue

@@ -16,7 +16,7 @@
 				<view class="status">{{ getStatusText(orderDetail.orderStatus) }}</view>
 
 				<image v-if="orderDetail.orderStatus == 5" src="/static/img/translte-1.png"></image>
-				<image v-if="orderDetail.orderStatus == 6" src="/static/img/translte-3.png"></image>
+				<image v-else-if="orderDetail.orderStatus == 6" src="/static/img/translte-3.png"></image>
 				<image v-else src="/static/img/translte-2.png"></image>
 			</view>
 

+ 29 - 19
jd_logistics-app/pages/order/components/TimePopup.vue

@@ -20,14 +20,14 @@
         <!-- 左侧日期选择 -->
         <scroll-view class="date-sidebar" scroll-y>
           <view 
-            v-for="date in dateList" 
+            v-for="(date,index) in dateList" 
             :key="date.value"
             class="date-item"
             :class="{ 
               active: selectedDate === date.value,
               today: date.isToday
             }"
-            @tap="selectDate(date.value)"
+            @tap="selectDate(date.value,index)"
           >
             <view class="date-content">
               <text class="date-name" 
@@ -50,7 +50,7 @@
             </view>
             <view 
               class="recommend-time"
-              :class="{ active: selectedTime === withinOneHourSlot.value }"
+              :class="{ active: selectedTime === withinOneHourSlot.value && selectedDay ===  selectedCurrentDay}"
               @tap="selectTime(withinOneHourSlot.value, true)"
             >
               <text class="time-value">{{ withinOneHourSlot.label }}</text>
@@ -67,7 +67,7 @@
                 :key="timeSlot.value"
                 class="time-item"
                 :class="{ 
-                  active: selectedTime === timeSlot.value,
+                  active: selectedTime === timeSlot.value && selectedDay ===  selectedCurrentDay,
                   disabled: timeSlot.disabled,
                   night: timeSlot.night
                 }"
@@ -89,7 +89,7 @@
       </view>
       
       <!-- 操作按钮 -->
-      <view class="action-bar">
+ <!--     <view class="action-bar">
         <button 
           class="confirm-btn" 
           :class="{ active: selectedTime }"
@@ -97,7 +97,7 @@
         >
           {{ buttonText }}
         </button>
-      </view>
+      </view> -->
     </view>
   </u-popup>
 </template>
@@ -108,7 +108,7 @@ import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
 const props = defineProps({
   visible: { type: Boolean, default: false },
   days: { type: Number, default: 3 },
-  startTime: { type: Number, default: 8 },
+  startTime: { type: Number, default: 9 },
   endTime: { type: Number, default: 20 },
   autoSelect: { type: Boolean, default: true }
 })
@@ -119,6 +119,9 @@ const emit = defineEmits(['update:visible', 'close', 'confirm'])
 const currentTime = ref(new Date())
 const selectedDate = ref('')
 const selectedTime = ref('')
+const selectedDay = ref('')
+const selectedCurrentDayPosition = ref(0)
+const selectedCurrentDay = ref('')
 const loading = ref(false)
 const isWithinOneHour = ref(false)
 
@@ -162,7 +165,7 @@ const withinOneHourSlot = computed(() => {
   return {
     start: startHour + startMinute / 60,
     end: endHour + endMinute / 60,
-    label: `(${startStr}-${endStr})`,
+    label: `${startStr}-${endStr}`,
     value: `immediate:${startStr}-${endStr}`, // ✅ 唯一标识
     startHour, startMinute, endHour, endMinute
   }
@@ -242,24 +245,28 @@ const timeSlots = computed(() => {
 const buttonText = computed(() => selectedTime.value ? '确定' : '请选择上门时间')
 
 // ----- 核心:切换日期(自动根据 autoSelect 选中第一个可用时段)-----
-const selectDate = (date) => {
+const selectDate = (date,index) => {
   selectedDate.value = date
-  selectedTime.value = ''
-  isWithinOneHour.value = false
+  selectedCurrentDayPosition.value = index
+  selectedCurrentDay.value = dateList.value[index].label
+  
+  // selectedTime.value = ''
+  // isWithinOneHour.value = false
 
   // 若开启自动选择,立即为该日期选择一个合适的时间
   if (props.autoSelect) {
     // 1. 如果是今天且有推荐时段,优先选中推荐
-    if (date === todayDate.value && withinOneHourSlot.value) {
+    if (selectedTime.value == '' && !isWithinOneHour.value) {
       selectedTime.value = withinOneHourSlot.value.value
       isWithinOneHour.value = true
     } else {
-      // 2. 否则选中该日期下第一个可用普通时段
-      const firstSlot = timeSlots.value[0]
-      if (firstSlot) {
-        selectedTime.value = firstSlot.value
-        isWithinOneHour.value = false
-      }
+	  isWithinOneHour.value = false
+      // // 2. 否则选中该日期下第一个可用普通时段
+      // const firstSlot = timeSlots.value[0]
+      // if (firstSlot) {
+      //   selectedTime.value = firstSlot.value
+      //   isWithinOneHour.value = false
+      // }
     }
   }
 }
@@ -268,13 +275,16 @@ const selectDate = (date) => {
 const selectTime = (time, isImmediate = false) => {
   selectedTime.value = time
   isWithinOneHour.value = isImmediate
+  selectedDay.value = selectedCurrentDay.value
+  confirm()
 }
 
 // ----- 初始化弹窗(打开时)-----
 const initSelection = () => {
   if (dateList.value.length) {
     // 直接调用 selectDate,复用自动选择逻辑
-    selectDate(dateList.value[0].value)
+    selectDate(dateList.value[selectedCurrentDayPosition.value].value,selectedCurrentDayPosition.value)	
+	selectedDay.value = selectedCurrentDay.value
   }
 }
 

+ 151 - 140
jd_logistics-app/pages/order/create_order.vue

@@ -9,7 +9,7 @@
 				<view class="user-info">
 					<AddressInfo v-if="addressSend.addressId" :address="addressSend" />
 					<view v-else class="create-btn" @click="handleAddAddress('sender')">新建寄件人</view>
-					
+
 				</view>
 				<view class="img-status-text right" @click="openAddressBook('sender')">
 					<image src="/static/img/create-order-address.png" mode="" class="address-image"></image>
@@ -112,68 +112,85 @@
 			</view>
 		</view>
 
-		<view class="pickup-title">增值服务</view>
+		<!-- 增值服务标题(带折叠箭头) -->
+		<view class="pickup-title" style="display: flex; justify-content: space-between; align-items: center;">
+			<text>增值服务</text>
+			<u-icon :name="showValueAdded ? 'arrow-up' : 'arrow-down'" size="18" color="#999" @click="showValueAdded = !showValueAdded"></u-icon>
+		</view>
 
-		<!-- 增值服务卡片 -->
+		<!-- 增值服务卡片(折叠内容) -->
 		<view class="goods-card">
-			<view class="goods-item" v-if="product === '1'">
-				<view class="item-label">包装服务</view>
-				<view class="item-control">
-					<switch color="#007AFF" :checked="valueServices.isPack" @change="onPackagingChange" />
+			<block v-if="showValueAdded">
+				<!-- 展开状态:显示所有增值服务项 -->
+				<view class="goods-item" v-if="product === '1'">
+					<view class="item-label">包装服务</view>
+					<view class="item-control">
+						<switch color="#007AFF" :checked="valueServices.isPack" @change="onPackagingChange" />
+					</view>
 				</view>
-			</view>
 
-			<view class="goods-item">
-				<view class="item-label">保价</view>
-				<view class="item-control">
-					<switch color="#007AFF" :checked="insuranceAmountChecked" @change="onInsuranceChange" />
+				<view class="goods-item">
+					<view class="item-label">保价</view>
+					<view class="item-control">
+						<switch color="#007AFF" :checked="insuranceAmountChecked" @change="onInsuranceChange" />
+					</view>
 				</view>
-			</view>
 
-			<view v-if="insuranceAmountChecked" class="goods-item">
-				<view class="item-label">保价金额(元)</view>
-				<view class="item-control">
-					<input class="input-field" placeholder="请输入保价金额" placeholder-class="placeholder"
-						v-model="insuranceAmount" type="digit" maxlength="10" @input="validateInsuranceAmount" />
+				<view v-if="insuranceAmountChecked" class="goods-item">
+					<view class="item-label">保价金额(元)</view>
+					<view class="item-control">
+						<input class="input-field" placeholder="请输入保价金额" placeholder-class="placeholder"
+							v-model="insuranceAmount" type="digit" maxlength="10" @input="validateInsuranceAmount" />
+					</view>
 				</view>
-			</view>
 
-			<!-- 超长超重(顺丰/京东) -->
-		<!-- 	<view class="goods-item" v-if="product === '2'">
-				<view class="item-label">超长超重</view>
-				<view class="item-control">
-					<switch color="#007AFF" :checked="valueServices.isOverLongWeight" @change="onOverweightChange" />
-				</view>
-			</view> -->
+				<!-- 超长超重(顺丰/京东) -->
+				<!-- 	<view class="goods-item" v-if="product === '2'">
+					<view class="item-label">超长超重</view>
+					<view class="item-control">
+						<switch color="#007AFF" :checked="valueServices.isOverLongWeight" @change="onOverweightChange" />
+					</view>
+				</view> -->
 
-			<!-- 签单返还 -->
-			<view class="goods-item"  v-if="product === '1'">
-				<view class="item-label">签单返还</view>
-				<view class="item-control">
-					<switch color="#007AFF" :checked="valueServices.isReceiptCollect" @change="onSignReturnChange" />
+				<!-- 签单返还 -->
+				<view class="goods-item" v-if="product === '1'">
+					<view class="item-label">签单返还</view>
+					<view class="item-control">
+						<switch color="#007AFF" :checked="valueServices.isReceiptCollect" @change="onSignReturnChange" />
+					</view>
 				</view>
-			</view>
 
-			<!-- 顺丰:签单返还类型选择 -->
-			<view v-if="product === '2' && valueServices.isReceiptCollect" class="goods-item">
-				<view class="item-label">返还类型</view>
-				<view class="item-control">
-					<picker :range="receiptReturnTypes" :range-key="'label'" @change="onReceiptReturnTypeChange"
-						:value="receiptReturnTypeIndex">
-						<view class="picker-text">{{ receiptReturnTypes[receiptReturnTypeIndex]?.label || '请选择返还类型' }}
-						</view>
-					</picker>
-					<u-icon class="arrow" name='arrow-right' size="18"></u-icon>
+				<!-- 顺丰:签单返还类型选择 -->
+				<view v-if="product === '2' && valueServices.isReceiptCollect" class="goods-item">
+					<view class="item-label">返还类型</view>
+					<view class="item-control">
+						<picker :range="receiptReturnTypes" :range-key="'label'" @change="onReceiptReturnTypeChange"
+							:value="receiptReturnTypeIndex">
+							<view class="picker-text">{{ receiptReturnTypes[receiptReturnTypeIndex]?.label || '请选择返还类型' }}
+							</view>
+						</picker>
+						<u-icon class="arrow" name='arrow-right' size="18"></u-icon>
+					</view>
 				</view>
-			</view>
 
-			<!-- 打木架(仅顺丰) -->
-		<!-- 	<view v-if="product === '2'" class="goods-item">
-				<view class="item-label">打木架</view>
-				<view class="item-control">
-					<switch color="#007AFF" :checked="valueServices.isWoodenCrate" @change="onWoodenFrameChange" />
+				<!-- 打木架(仅顺丰) -->
+				<!-- 	<view v-if="product === '2'" class="goods-item">
+					<view class="item-label">打木架</view>
+					<view class="item-control">
+						<switch color="#007AFF" :checked="valueServices.isWoodenCrate" @change="onWoodenFrameChange" />
+					</view>
+				</view> -->
+			</block>
+			<block v-else>
+				<!-- 折叠状态:显示一个可点击的展开提示行 -->
+				<view class="goods-item" @click="showValueAdded = true">
+					<view class="item-label">增值服务</view>
+					<view class="item-control">
+						<text class="picker-text">点击展开</text>
+						<u-icon name="arrow-down" size="18" color="#999"></u-icon>
+					</view>
 				</view>
-			</view> -->
+			</block>
 		</view>
 
 		<!-- 协议同意 -->
@@ -187,9 +204,12 @@
 			</view>
 		</view>
 
-		<!-- 下单按钮 -->
-		<view class="submit-btn" :class="{ disabled: !agreed }" :disabled="!agreed" @click="submitOrder">
-			提交订单
+
+		<view class="add-btn-container">
+			<!-- 下单按钮 -->
+			<view class="submit-btn" :class="{ disabled: !agreed }" :disabled="!agreed" @click="submitOrder">
+				提交订单
+			</view>
 		</view>
 
 		<!-- 安全区域占位 -->
@@ -256,9 +276,12 @@
 
 	// ==================== 时间选择 ====================
 	const showTimePicker = ref(false)
-	const selectedTimeData = ref(null)
+	const selectedTimeData = ref({
+		startTime:undefined,
+		endTime:undefined
+	})
 	const selectedTimeLabel = computed(() => {
-		if (!selectedTimeData.value) return '请选择时间'
+		if (!selectedTimeData.value.startTime) return '一小时内'
 		const {
 			dateLabel,
 			timeLabel,
@@ -346,6 +369,9 @@
 		}
 	])
 
+	// ==================== 折叠控制 ====================
+	const showValueAdded = ref(false) // 默认折叠
+
 	// ==================== 协议 ====================
 	const agreed = ref(true)
 
@@ -514,71 +540,32 @@
 			});
 			return false
 		}
-		// // 寄件人信息完整性
-		// if (!addressSend.value.contactName || !addressSend.value.contactPhone) {
-		// 	uni.showToast({
-		// 		title: '寄件人信息不完整',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (!/^1[3-9]\d{9}$/.test(addressSend.value.contactPhone)) {
-		// 	uni.showToast({
-		// 		title: '寄件人手机号格式错误',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (addressSend.value.contactName.length < 1 || addressSend.value.contactName.length > 20) {
-		// 	uni.showToast({
-		// 		title: '寄件人姓名长度1-20字符',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (!addressSend.value.detailedAddress) {
-		// 	uni.showToast({
-		// 		title: '请填写寄件人人详细地址',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-
-		// if (!addressReceive.value.contactName || !addressReceive.value.contactPhone) {
-		// 	uni.showToast({
-		// 		title: '收件人信息不完整',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (!/^1[3-9]\d{9}$/.test(addressReceive.value.contactPhone)) {
-		// 	uni.showToast({
-		// 		title: '收件人手机号格式错误',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (addressReceive.value.contactName.length < 1 || addressReceive.value.contactName.length > 20) {
-		// 	uni.showToast({
-		// 		title: '收件人姓名长度1-20字符',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
-		// if (!addressReceive.value.detailedAddress) {
-		// 	uni.showToast({
-		// 		title: '请填写收件人详细地址',
-		// 		icon: 'none'
-		// 	});
-		// 	return false
-		// }
 
 		// 时间
-		if (!selectedTimeData.value) {
+		if (!selectedTimeData.value.startTime) {
+			// 这没有数据的时候  默认一个小时内 获取当前时间
+			selectedTimeData.value.startTime = twentyMinutesLater()
+			selectedTimeData.value.endTime = oneHourLater()
+		}
+
+		if (isBeforeNineAM(selectedTimeData.value.startTime) || isAfterEightPM(selectedTimeData.value.startTime)) {
+			// 不在工作时间内
+			uni.showToast({
+				title: '请选择合适的寄件时间',
+				icon: 'none'
+			});
+			selectedTimeData.value.startTime = undefined
+			selectedTimeData.value.endTime = undefined
+			return false
+		}
+
+		if (isAfterEightPM(selectedTimeData.value.endTime)) {
 			uni.showToast({
-				title: '请选择期望上门时间',
+				title: '请选择合适的寄件时间',
 				icon: 'none'
 			});
+			selectedTimeData.value.startTime = undefined
+			selectedTimeData.value.endTime = undefined
 			return false
 		}
 
@@ -670,6 +657,25 @@
 		return true
 	}
 
+
+	const oneHourLater = () => {
+		const now = new Date()
+		return now.getHours() + now.getMinutes() / 60 + 1
+	}
+
+	const twentyMinutesLater = () => {
+		const now = new Date()
+		now.setMinutes(now.getMinutes() + 1)
+		return now
+	}
+
+	function isBeforeNineAM(date) {
+		return date.getHours() < 9;
+	}
+
+	function isAfterEightPM(date) {
+		return date.getHours() > 20 || (date.getHours() === 20 && date.getMinutes() > 0);
+	}
 	const isSubmit = ref(false)
 	// ==================== 提交订单 ====================
 	const submitOrder = async () => {
@@ -684,8 +690,7 @@
 				.value) : null,
 			isReceiptCollect: product.value === '2' ?
 				(valueServices.value.isReceiptCollect ? receiptReturnTypes.value[receiptReturnTypeIndex.value]
-					?.value : null) :
-				(valueServices.value.isReceiptCollect ? true : null),
+					?.value : null) : (valueServices.value.isReceiptCollect ? true : null),
 			isOverLongWeight: valueServices.value.isOverLongWeight || null,
 			isWoodenCrate: valueServices.value.isWoodenCrate || null
 		}
@@ -723,7 +728,7 @@
 
 		uni.showLoading({
 			title: '提交中...',
-			mask:true
+			mask: true
 		})
 		try {
 			const res = await createOrder(orderData)
@@ -734,7 +739,7 @@
 					icon: 'success',
 					mask: true
 				})
-				uni.redirectTo({
+				uni.switchTab({
 					url: '/pages/order/index'
 				})
 			} else {
@@ -751,7 +756,7 @@
 				icon: 'none'
 			})
 			console.error('订单提交失败', error)
-		} finally{
+		} finally {
 			// uni.hideLoading()
 		}
 	}
@@ -790,7 +795,7 @@
 				saveAddressToStorage('receiverAddress', data.address)
 			}
 		})
-		if(!addressSend.addressId){
+		if (!addressSend.addressId) {
 			fetchDefaultSenderAddress()
 		}
 	})
@@ -806,12 +811,12 @@
 	.order-container {
 		min-height: 100vh;
 		background-color: #F5F7FA;
-		padding: 20rpx;
 		padding-bottom: 180rpx;
 		box-sizing: border-box;
 	}
 
 	.info-card {
+		margin: 0rpx 20rpx;
 		background: #fff;
 		border-radius: 32rpx;
 		padding: 20rpx;
@@ -882,6 +887,7 @@
 	}
 
 	.pickup-title {
+		margin: 0rpx 20rpx;
 		font-size: 32rpx;
 		font-weight: 600;
 		color: #333;
@@ -889,6 +895,7 @@
 	}
 
 	.goods-card {
+		margin: 0rpx 20rpx;
 		background-color: #fff;
 		border-radius: 32rpx;
 		padding: 0rpx 20rpx;
@@ -1023,6 +1030,7 @@
 	}
 
 	.agreement-card {
+		margin: 0rpx 20rpx;
 		background-color: #fff;
 		border-radius: 32rpx;
 		padding: 30rpx 20rpx;
@@ -1047,30 +1055,33 @@
 		}
 	}
 
-	.submit-btn {
+	.add-btn-container {
+		width: 100%;
 		position: fixed;
-		bottom: 40rpx;
-		left: 30rpx;
-		right: 30rpx;
-		width: 686rpx;
-		height: 88rpx;
-		background: #1B64F0;
-		border-radius: 44rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 32rpx;
-		color: #FFFFFF;
-		line-height: 88rpx;
-		text-align: center;
-		z-index: 10;
+		bottom: 0rpx;
+		padding: 32rpx;
+		background-color: #fff;
+		border-top: 1rpx solid #eee;
+		box-sizing: border-box;
 
-		&.disabled {
-			background: #f5f5f5;
-			color: #999;
+		/* 确定按钮 */
+		.submit-btn {
+			height: 88rpx;
+			background: #1B64F0;
+			border-radius: 44rpx;
+			color: #fff;
+			font-size: 32rpx;
+			font-weight: 500;
+			height: 88rpx;
+			line-height: 88rpx;
+			text-align: center
 		}
+
 	}
 
+
+
+
 	.safe-area {
 		height: 140rpx;
 	}

+ 11 - 3
jd_logistics-app/pages/order/index.vue

@@ -27,7 +27,7 @@
 		<!-- 订单列表(保持不变) -->
 		<view class="order-list" @scrolltolower="loadMore">
 			<view v-if="ordersList.length" v-for="order in ordersList" :key="order.id">
-				<OrderItem :order-detail="order" @success="getOrderList()"></OrderItem>
+				<OrderItem :order-detail="order" @success="getOrderList()"/>
 			</view>
 			<view class="empty-state" v-else>
 				<u-icon class="empty-icon" name="list" size="60" color="#ccc"></u-icon>
@@ -142,10 +142,18 @@
 </script>
 
 <style lang="scss" scoped>
+	.container {
+		width: 100%;
+		min-height: 100vh;
+		background: linear-gradient( 135deg, #CFE9FF 0%, #F5F7FA 50.86%);
+		display: flex;
+		flex-direction: column;
+	}
+	
 	.search-section {
-		background-color: #fff;
-		padding: 16rpx;
 		margin-left: 14rpx;
+		margin-top: 96rpx;
+		margin-right: 210rpx;
 	}
 
 	.search-box {

+ 1 - 0
jd_logistics-app/pages/search/search.vue

@@ -66,6 +66,7 @@
 		})
 		return
 	}
+
 </script>
 
 <style lang="scss" scoped>

BIN
jd_logistics-app/static/img/default-avatar.png


BIN
jd_logistics-app/static/img/tabs/order.png


BIN
jd_logistics-app/static/img/tabs/order_active.png


+ 1 - 0
jd_logistics-app/stores/app.js

@@ -44,6 +44,7 @@ export const useAppStore = defineStore("app", {
       this.userInfo = undefined;
       Cache.clear(USER_INFO);
       Cache.clear(TOKEN);
+
     },
     UPDATE_USERINFO(userInfo) {
       this.userInfo = userInfo;

+ 10 - 4
jd_logistics-app/utils/request.js

@@ -21,7 +21,8 @@ function baseRequest(url, method, data, {
 	const appStore = useAppStore();
   const { Toast } = useToast();
 	let Url = HTTP_REQUEST_URL,header = HEADER
-	const TOKEN = 'Bearer ' + appStore.token
+	
+	const tempToken = 'Bearer ' + appStore.token
 	if (params != undefined) {
 		header = HEADERPARAMS;
 	}
@@ -35,7 +36,7 @@ function baseRequest(url, method, data, {
 	// 		});
 	// 	}
 	// }
-	if (TOKEN) header[TOKENNAME] = TOKEN;
+	if (appStore.token) header[TOKENNAME] = tempToken;
 	return new Promise((reslove, reject) => {
 		Url=HTTP_REQUEST_URL || 'http://api.front.hdq.xbdzz.cn'
 		uni.request({
@@ -52,9 +53,14 @@ function baseRequest(url, method, data, {
 					reslove(res.data, res);
 				else if ([410000, 410001, 410002, 401,403].indexOf(res.data.code) !== -1) {
 					// toLogin();
-					appStore.LOGOUT();
-					Toast({title: res.data.msg || '登录过期,请重新登录'});
+					Toast({title: '登录过期,请重新登录' });
 					reject(res.data);
+					appStore.LOGOUT();
+					setTimeout(()=>{
+						uni.switchTab({
+							url:'/pages/mine/mine'
+						})
+					},800)
 				} else
           Toast({title: res.data.msg || '系统错误'})
 					reject(res.data.msg || '系统错误');