Browse Source

新增相应的数据和页面

lyy@qq.com 1 year ago
parent
commit
f5bada8021

+ 5 - 7
main.js

@@ -63,13 +63,11 @@ Vue.prototype.$request = function(method, url, data, isJSON, hideLoading, showEr
 			method,
 			data,
 			header: {
-				//"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
-				'Content-Type': isJSON ? '' : 'application/x-www-form-urlencoded',
-				// 'Authorization': `Bearer ${token}`,
-				'Authorization': 'Bearer ' + token,
-				'clientId': '8871d05eacc4406083d3bb0a085b6999',
-				// 'tenantId': Vue.prototype.tenantId
-				// 'tenantId': `${tenantId}`
+			  'Content-Type': isJSON ? 'application/json' : 'application/x-www-form-urlencoded',
+			  'Authorization': 'Bearer ' + token,
+			  'clientId': '8871d05eacc4406083d3bb0a085b6999',
+			  // 'tenantId': Vue.prototype.tenantId 或者 'tenantId': `${tenantId}`
+			  // application/x-www-form-urlencoded application/json
 			},
 			success: (res) => {
 				uni.hideLoading();

+ 37 - 16
pages.json

@@ -1,5 +1,6 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		
 		{
 			"path" : "pages/classify/classify",
 			"style" : 
@@ -9,25 +10,41 @@
 			}
 		},
 		{
-			"path" : "pages/order/orderPaid/orderPaid",
+			"path" : "pages/login/login",
 			"style" : 
 			{
-				"navigationBarTitleText" : "订单详情"
+				"navigationBarTitleText" : "登录"
 			}
 		},
 		{
-			"path" : "pages/order/submitOrder/submitOrder",
+			"path" : "pages/user/user",
 			"style" : 
 			{
-				"navigationBarTitleText" : "提交订单",
+				"navigationBarTitleText" : "我的",
 				"enablePullDownRefresh" : false
 			}
 		},
 		{
-			"path" : "pages/login/login",
+			"path" : "pages/user/myInfo",
 			"style" : 
 			{
-				"navigationBarTitleText" : "登录"
+				"navigationBarTitleText" : "个人中心",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "pages/order/orderPaid/orderPaid",
+			"style" : 
+			{
+				"navigationBarTitleText" : "订单详情"
+			}
+		},
+		{
+			"path" : "pages/order/submitOrder/submitOrder",
+			"style" : 
+			{
+				"navigationBarTitleText" : "提交订单",
+				"enablePullDownRefresh" : false
 			}
 		},
 		{
@@ -86,15 +103,6 @@
 				"enablePullDownRefresh" : false
 			}
 		},
-		{
-			"path" : "pages/user/user",
-			"style" : 
-			{
-				"navigationBarTitleText" : "我的",
-				"enablePullDownRefresh" : false
-			}
-		},
-		
 		{
 			"path" : "pages/goodDetail/goodDetail",
 			"style" : 
@@ -108,6 +116,19 @@
 			"style": {
 				"navigationBarTitleText": "首页"
 			}
+		},
+		{
+			"path": "pages/index/home",
+			"style": {
+				"navigationBarTitleText": "我的"
+			}
+		},
+		{
+			"path" : "pages/order/orderDetails/orderDetails",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
 		}
 	],
 	"easycom": {
@@ -132,7 +153,7 @@
 			// 	"text": "分类"
 			// },
 			{
-				"pagePath": "pages/user/user",
+				"pagePath": "pages/index/home",
 				"iconPath": "static/ic_hone.png",
 				"selectedIconPath": "static/ic_hone.png",
 				"text": "我的"

+ 19 - 5
pages/classify/classify.vue

@@ -3,7 +3,7 @@
 		<view>
 			<u-row justify="space-between" customStyle="margin-bottom: 10px">
 				<u-col span="3">
-					<view class="icon-container-l">
+					<view class="icon-container-l" @click="onOrder">
 						<uni-badge size="normal" :text="txts" absolute="rightTop">
 							<u-icon :name="iconCooking" label="自提" labelPos="bottom" size="32"></u-icon>
 						</uni-badge>
@@ -161,7 +161,7 @@
 			}
 		},
 		created() {
-
+			this.fatchDate()
 		},
 		methods: {
 			// 加购
@@ -174,7 +174,12 @@
 			handleSelectedChanged(selectedItems) {
 				console.log('选中的数据:', selectedItems)
 				this.carList = selectedItems
-				// this.buyCount = this.carList.length
+				if(selectedItems.length > 0){
+					this.buyCount = this.carList.length
+				} else {
+					this.buyCount = 0
+				}
+				
 				this.totalPrice();
 			},
 			handleUpdateShopMsg(shopMsg) {
@@ -199,7 +204,7 @@
 						newItem.goods_type = specString;
 						this.carList.push(newItem);
 					}
-
+					this.buyCount = this.carList.length
 					// 您可以在这里执行其他逻辑,比如保存到本地存储或发送到服务器
 				}
 				
@@ -262,10 +267,19 @@
 					url: `/pages/order/submitOrder/submitOrder`
 				})
 			},
-			onMyInfo() {
+			onOrder() {
 				uni.navigateTo({
 					url: `/pages/order/myOrder/myOrder`
 				})
+			},
+			onMyInfo() {
+				uni.navigateTo({
+					url: `/pages/user/user`
+				})
+			},
+			// 获取餐车列表
+			fatchDate() {
+				
 			}
 		}
 	}

+ 17 - 5
pages/diningCar/diningCar.vue

@@ -1,8 +1,9 @@
 <template>
 	<view>
 		<view class="boxWarp mb20px">
-			<view class="box linear2" style="height:100vh;">
-				<view class="boxContent2" style="margin-top:50%;">
+			<view class="box" style="height:100vh;">
+				<my-swiper :datas="swiperDatas" />
+				<view class="boxContent2" style="margin-top:-10%;">
 					<view class="clearfix" style="margin-bottom: 10px;">
 						<text class="fz26px" style="font-weight: bold;">{{dinList.name ? dinList.name : '无'}}</text>
 						<u-line dashed></u-line>
@@ -31,7 +32,13 @@
 				dinList: {
 					name: '23333',
 					openState: 1,
+					imageUrl:''
 				},
+				swiperDatas: [{
+					img:'../../static/banner1.jpg'
+				},{
+					img:'../../static/banner2.png'
+				}],
 			}
 		},
 		onLoad(e) {
@@ -53,15 +60,17 @@
 					})
 				}
 			},
-			fatchDate(e) {
+			async fatchDate(e) {
 				console.log('e===========================e', e)
 				var queryParmas = {
 					id : e.id
 				}
 				console.log('idididididid', queryParmas)
-				const result = this.$request('post', '/sale/diningCar/queryDiningCarById', queryParmas)
+				const result = await this.$request('post', '/sale/diningCar/queryDiningCarById', queryParmas, true)
 				if (result) {
+					console.log("result",result)
 					this.dinList = result.data
+					console.log('this.dinList', this.dinList)
 				}
 			}
 
@@ -106,7 +115,8 @@
 
 	.linear2 {
 		// background-image: linear-gradient(#00a551 20%, #fff 50%);
-		background-image: url('https://cdn.uviewui.com/uview/album/1.jpg');
+		background-image: url('{{dinList.imageUrl}}');
+		// background-image: url('https://cdn.uviewui.com/uview/album/1.jpg');
 	}
 
 	.boxText {
@@ -166,6 +176,8 @@
 		border-radius: 60rpx;
 		background-color: #fff;
 		padding: 40rpx;
+		position: relative; // 确保它相对于其父元素定位
+		z-index: 2;
 	}
 
 	.carList {

+ 18 - 15
pages/diningList/diningList.vue

@@ -2,23 +2,25 @@
 	<view>
 		<view class="btnS">
 			<view style="width: 90%;">
-				<u-search :clearabled="true" shape="round" :showAction="false" v-model="seaName" @search= "searchClick"></u-search>
+				<u-search :clearabled="true" shape="round" :showAction="false" v-model="seaName"
+					@search="searchClick"></u-search>
 			</view>
 		</view>
-		
+
 		<view class="contain" style="margin: 10px 0;" v-for="(item, index)  in tableData" :key="index">
-			<view class="box" :class="{ 'boxed-border': item.isAsc }" >
+			<view class="box" :class="{ 'boxed-border': item.defaultState == 2 }">
 				<view class="container" @click="carList">
 					<view class="text-container">
 						<view class="flex-item">{{item.name ? item.name : '无' }}</view>
-						<u-tag plain :text="item.openState ? '营业中' : '离线'" :type="item.openState ? 'success' : 'error'" size="mini"></u-tag>
+						<u-tag plain :text="item.openState ? '营业中' : '离线'" :type="item.openState ? 'success' : 'error'"
+							size="mini"></u-tag>
 					</view>
 				</view>
 				<view class="icon-container">
-						<u-icon name="phone" size="28" @click.stop="call"></u-icon>
-						<u-icon style="margin-left: 10px;" name="info-circle" size="28" @click.stop="btnIC(item)"></u-icon>
-					</view>
-				<view :class="{ 'btnbor': item.isAsc }" v-if="item.isAsc">
+					<u-icon name="phone" size="28" @click.stop="call"></u-icon>
+					<u-icon style="margin-left: 10px;" name="info-circle" size="28" @click.stop="btnIC(item)"></u-icon>
+				</view>
+				<view :class="{ 'btnbor': item.defaultState==2 }" v-if="item.defaultState==2">
 					<!-- <u-tag text="当前" bgColor='#FF6D20' borderColor='#FF6D20' icon="checkmark-circle"></u-tag> -->
 					<image src="../../static/danqian.png" class="img-ding"></image>
 				</view>
@@ -31,10 +33,9 @@
 	export default {
 		data() {
 			return {
-				seaName:'',
+				seaName: '',
 				orderinfo: {},
-				tableData: [
-					{
+				tableData: [{
 						name: '23333',
 						tags: 1,
 						showBorder: true,
@@ -65,14 +66,15 @@
 		methods: {
 			searchClick(e) {
 				this.seaName = e
+				this.fatchDate()
 				console.log('==============================', e)
 			},
 			async call() {
-				const query= {
+				const query = {
 					id: this.tableData.customerId
 				}
 				const response = await this.$request('post', '/sale/customer/queryCustomerById', query);
-				
+
 				if (this.orderinfo.shopCall) {
 					uni.makePhoneCall({
 						phoneNumber: this.orderinfo.shopCall
@@ -104,7 +106,7 @@
 				try {
 					const response = await this.$request('post', '/sale/diningCar/queryDiningCar', queryParams);
 					console.log('response', response)
-				
+
 					const data = response.rows; // 假设 res.rows 是一个数组
 					console.log('response.rows', response.rows);
 					if (response.code === 200) {
@@ -145,7 +147,7 @@
 		.btnbor {
 			margin: -32rpx -20rpx 0;
 			// margin-right: -11px;
-			// margin-top: -15px;
+			margin-top: 12px;
 			float: right;
 			position: relative; // 设置为相对定位
 
@@ -234,6 +236,7 @@
 		top: 0;
 		margin: 0; // 清除 margin 属性,以避免与边框重叠
 	}
+
 	.btnS {
 		display: flex;
 		justify-content: center;

+ 37 - 35
pages/login/login.vue

@@ -155,45 +155,47 @@
 						wx.login({
 							success: async (loginRes) => {
 								console.log('数据:', loginRes)
-								try {
-									// 发送code到开发者服务器换取用户信息
-									const result = await this.$request('post',
-										'/auth/miniLogin', {
-											tenantId: '000000',
-											clientId: '8871d05eacc4406083d3bb0a085b6999',
-											code: loginRes.code
-										})
-									console.log('登录成功:', result);
-									if (result && result.data !== false) {
-										// 保存token
-										uni.setStorageSync("token", result.data.accessToken);
-										uni.setStorageSync("openId", result.data.openId);
-										uni.setStorageSync("tenantId", result.data.tenantId);
-										uni.setStorageSync("appUserId", result.data.appUserId);
-										// 跳转到下一个页面
-										uni.navigateTo({
-											url: `/pages/diningList/diningList`
-										});
-									} else {
-										// 处理错误情况
-									}
-								} catch (error) {
-									// 处理请求失败的情况
-									console.error('登录失败:', error);
+								// 发送code到开发者服务器换取用户信息
+								const result = await this.$request('post', '/auth/miniLogin', {
+									tenantId: '000000',
+									clientId: '8871d05eacc4406083d3bb0a085b6999',
+									code: loginRes.code
+								})
+								console.log('登录成功:', result);
+								if (result && result.data !== false) {
+									// 保存token
+									uni.setStorageSync("token", result.data.accessToken);
+									uni.setStorageSync("openId", result.data.openId);
+									uni.setStorageSync("tenantId", result.data.tenantId);
+									uni.setStorageSync("appUserId", result.data.appUserId);
+									// 跳转到下一个页面
+									uni.navigateTo({
+										url: `/pages/diningList/diningList`
+									});
+								} else {
+									// 处理错误情况
+								}
+								// 更新用户信息
+								const id = uni.getStorageSync('appUserId');
+								console.log('id', id)
+
+								const userInfo = {
+									"id": id,
+									"nickName": res.userInfo.nickName,
+									"profilePhoto": res.userInfo.avatarUrl,
 								}
+								console.log('userInfo', userInfo)
+								this.$request('post', '/system/appUser/editAppUser',
+									userInfo, true)
+							},
+							fail: (error) => {
+								console.error('登录失败:', error);
 							}
 						})
-						//更新用户信息
-						const id = uni.getStorageSync('appUserId');
-
-						const userInfo = {
-							"id": id,
-							"nickName": res.userInfo.nickName,
-							"profilePhoto": res.userInfo.avatarUrl,
-						}
-						const result = this.$request('post',
-							'/system/appUser/editAppUser', userInfo)
 					},
+					fail: (error) => {
+						console.error('获取用户信息失败:', error);
+					}
 				})
 			}
 		}

+ 106 - 132
pages/order/myOrder/myOrder.vue

@@ -12,72 +12,74 @@
 
 		<!-- 订单轮播区 -->
 		<swiper class="swiper-area w-full" :duration="0" :current="tabCurrentIndex" @change="changeTab">
-		<!-- 轮播项对应订单状态 -->
-		<swiper-item class="tab-content wh-full" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-			<!-- 滚动区 -->
-			<scroll-view class="h-full" scroll-y @scrolltolower="loadData">
-				<!-- 空白页 -->
-				<use-empty v-if="tabItem.orderList.length === 0 && tabItem.loaded" e-style="round" e-type="cart"
-					tip="订单数据为空" height="93vh"></use-empty>
-				<!-- 订单列表区 -->
-				<view class="margin-bottom-sm" :class="index === 0 ? 'padding-top-sm' : ''"	v-for="(item, index) in tabItem.orderList" :key="index">
-					<!-- 订单项 -->
-					<view class="order-item padding bg-main border-radius">
-						<view @click="todetail(item.order)">
-							<view class="dflex-b padding-bottom-sm">
-								<view class="fs fwb dflex">
-									<u-tag text="自提" size="mini" bgColor="#FFF4E4" color="#F5821F" shape="circle" borderColor="#FFF4E4"></u-tag>
-									订单编号:M000003332
+			<!-- 轮播项对应订单状态 -->
+			<swiper-item class="tab-content wh-full" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<!-- 滚动区 -->
+				<scroll-view class="h-full" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<use-empty v-if="tabItem.orderList.length === 0 && tabItem.loaded" e-style="round" e-type="cart"
+						tip="订单数据为空" height="93vh"></use-empty>
+					<!-- 订单列表区 -->
+					<view class="margin-bottom-sm" :class="index === 0 ? 'padding-top-sm' : ''"
+						v-for="(item, index) in tabItem.orderList" :key="index">
+						<!-- 订单项 -->
+						<view class="order-item padding bg-main border-radius">
+							<view @click="todetail(item.order)">
+								<view class="dflex-b padding-bottom-sm">
+									<view class="fs fwb dflex">
+										<u-tag text="打包" size="mini" bgColor="#FFF4E4" color="#F5821F" shape="circle"
+											borderColor="#FFF4E4"></u-tag>
+										订单编号:M000003332
+									</view>
+									<text class="fs active">等待付款</text>
 								</view>
-								<text class="fs active">等待付款</text>
-							</view>
-							<!-- 订单商品明细 -->
-							<view class="goods-area dflex-b">
-								<view class="pic-list dflex">
-									<view class="pic"></view>
-									<view class="pic"></view>
-									<view class="pic"></view>
-								</view>
-								<view class="next-detail">
-									<text>共3件</text>
-									<u-icon name="arrow-right" size="20"></u-icon>
+								<!-- 订单商品明细 -->
+								<view class="goods-area dflex-b">
+									<view class="pic-list dflex">
+										<view class="pic"></view>
+										<view class="pic"></view>
+										<view class="pic"></view>
+									</view>
+									<view class="next-detail">
+										<text>共3件</text>
+										<u-icon name="arrow-right" size="20"></u-icon>
+									</view>
+
 								</view>
-								
-							</view>
 
-							<!-- 实付款 -->
-							<view class="dflex-e padding-top-sm">
-								<text class="fs-xs margin-right-xs">共3件</text>
-								<text class="fs-xs margin-right-xs">共6份商品</text>
-								<text class="fs-xs margin-right-xs">实付</text>
-								<text class="price ft-main">{{ item.order.order_actural_paid}}</text>
+								<!-- 实付款 -->
+								<view class="dflex-e padding-top-sm">
+									<text class="fs-xs margin-right-xs">共3件</text>
+									<text class="fs-xs margin-right-xs">共6份商品</text>
+									<text class="fs-xs margin-right-xs">实付</text>
+									<text class="price ft-main">{{ item.order.order_actural_paid}}</text>
+								</view>
 							</view>
-						</view>
 
-						<!-- 订单操作区 -->
-						<view class="dflex-b margin-top-sm">
-							<view>
-								<text class="ft-dark" >更多</text>
-							</view>
+							<!-- 订单操作区 -->
+							<view class="dflex-b margin-top-sm">
+								<view>
+									<text class="ft-dark">更多</text>
+								</view>
 
-							<view class="dflex-e">
-								<view class="dflex">
-									<button class="action-btn border-radius-big bg-main">取消订单</button>
-									<button class="action-btn border-radius-big bg-main">订单详情</button>
-									<button class="action-btn border-radius-big bg-main main-btn">去支付</button>
+								<view class="dflex-e">
+									<view class="dflex">
+										<button class="action-btn border-radius-big bg-main">取消订单</button>
+										<button class="action-btn border-radius-big bg-main" @click="todetail">订单详情</button>
+										<button class="action-btn border-radius-big bg-main main-btn">去支付</button>
+									</view>
 								</view>
 							</view>
 						</view>
 					</view>
-				</view>
 
-				<!-- 上拉加载更多 -->
-				<use-loadmore v-if="tabItem.orderList.length > 0 && tabItem.loaded && tabItem.hasmore"
-					:type="tabItem.loadingType"></use-loadmore>
-			</scroll-view>
-		</swiper-item>
+					<!-- 上拉加载更多 -->
+					<use-loadmore v-if="tabItem.orderList.length > 0 && tabItem.loaded && tabItem.hasmore"
+						:type="tabItem.loadingType"></use-loadmore>
+				</scroll-view>
+			</swiper-item>
 		</swiper>
-	
+
 	</view>
 </template>
 
@@ -91,38 +93,33 @@
 						id: 0,
 						state: '全部',
 						loadingType: 'more',
-						orderList: [
-							{
-								order_detail:[
-									{
-										goods_img:'../../../static/x2.jpg',
-										goods_name:'商品1',
-										goods_name_pw:'小标题',
-										goods_num:1,
-										goods_sku_name:60,
-										goods_price:10
-									}
-								],
-								order:{
-									order_actural_paid:10,
-									order_refund_state:'处理中',
-									state:'待发货'
+						orderList: [{
+								order_detail: [{
+									goods_img: '../../../static/x2.jpg',
+									goods_name: '商品1',
+									goods_name_pw: '小标题',
+									goods_num: 1,
+									goods_sku_name: 60,
+									goods_price: 10
+								}],
+								order: {
+									order_actural_paid: 10,
+									order_refund_state: '处理中',
+									state: '待发货'
 								}
 							},
 							{
-								order_detail:[
-									{
-										goods_img:'../../../static/x2.jpg',
-										goods_name:'商品1',
-										goods_name_pw:'小标题',
-										goods_num:1,
-										goods_sku_name:60,
-										goods_price:10
-									}
-								],
-								order:{
-									order_actural_paid:10,
-									state:'待发货'
+								order_detail: [{
+									goods_img: '../../../static/x2.jpg',
+									goods_name: '商品1',
+									goods_name_pw: '小标题',
+									goods_num: 1,
+									goods_sku_name: 60,
+									goods_price: 10
+								}],
+								order: {
+									order_actural_paid: 10,
+									state: '待发货'
 								}
 							}
 						]
@@ -135,13 +132,13 @@
 					},
 					{
 						id: 2,
-						state: '待收货',
+						state: '待核销',
 						loadingType: 'more',
 						orderList: []
 					},
 					{
 						id: 3,
-						state: '待自提',
+						state: '已取消',
 						loadingType: 'more',
 						orderList: []
 					},
@@ -150,12 +147,6 @@
 						state: '已完成',
 						loadingType: 'more',
 						orderList: []
-					},
-					{
-						id: 5,
-						state: '已关闭',
-						loadingType: 'more',
-						orderList: []
 					}
 				],
 				reqdata: {
@@ -166,25 +157,27 @@
 				title: '全部'
 			}
 		},
+		onLoad(e) {
+			this.tabCurrentIndex = parseFloat(e.type);
+		},
 		methods: {
-			loadData(){},
+			loadData() {},
 			// swiper 切换
 			changeTab(e) {
 				this.tabCurrentIndex = e.target.current;
-			
 			},
 			//顶部tab点击
 			tabClick(index) {
 				this.tabCurrentIndex = index;
 			},
-			
+
 			// 点击跳转详情页面
 			todetail(order) {
 				// uni.navigateTo({
 				// 	url: `/pages/user/order/order-detail?order_id=${order.order_id}`
 				// });
 				uni.navigateTo({
-					url: `/pages/order/orderDetail/orderDetail`
+					url: `/pages/order/orderPaid/orderPaid`
 				});
 			},
 			// 立即支付
@@ -194,7 +187,7 @@
 			// 删除订单
 			delOrder(item) {
 				let _this = this;
-			
+
 				uni.showModal({
 					title: '提示',
 					content: '删除订单',
@@ -203,7 +196,7 @@
 							uni.showLoading({
 								title: '请稍后'
 							});
-							
+
 						} else if (res.cancel) {
 							console.log('点击取消');
 						}
@@ -216,7 +209,7 @@
 			// 取消订单
 			cancelOrder(item) {
 				let _this = this;
-			
+
 				uni.showModal({
 					title: '提示',
 					content: '取消订单',
@@ -225,32 +218,7 @@
 							uni.showLoading({
 								title: '请稍后'
 							});
-							
-						} else if (res.cancel) {
-							console.log('用户点击取消');
-						}
-					},
-					complete() {
-						uni.hideLoading();
-					}
-				});
-			},
-			// 查看物流
-			toexpress(item) {
-				// uni.navigateTo({
-				// 	url: `/pages/user/order/order-express?order_id=${item.order.order_id}`
-				// });
-			},
-			// 已发货
-			toreceipt(item) {
-				let _this = this;
-			
-				uni.showModal({
-					title: '提示',
-					content: '确认收货',
-					success: function(res) {
-						if (res.confirm) {
-							
+
 						} else if (res.cancel) {
 							console.log('用户点击取消');
 						}
@@ -262,18 +230,19 @@
 			},
 			// 申请退款
 			torefund(data) {
-				
+
 			},
 			// 评价
 			toevaluate(item) {
-				
+
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-	page,.container {
+	page,
+	.container {
 		min-height: 100%;
 		background: $page-color-base;
 	}
@@ -317,6 +286,7 @@
 
 	/* 订单项 */
 	.order-item {
+
 		/* 订单商品明细区 */
 		.goods-area {
 			display: flex;
@@ -366,22 +336,26 @@
 			}
 		}
 	}
-	.pic-list{
+
+	.pic-list {
 		width: calc(100% - 130upx);
-		.pic{
+
+		.pic {
 			margin-right: 20upx;
 			height: 160rpx;
 			width: 160rpx;
 			background-color: #EEE;
 		}
-		.pic:last-child{
+
+		.pic:last-child {
 			margin: 0;
 		}
 	}
-	.next-detail{
+
+	.next-detail {
 		width: 130upx;
 		display: flex;
 		justify-content: flex-end;
 		align-items: center;
 	}
-</style>
+</style>

+ 248 - 0
pages/order/orderDetails/orderDetails.vue

@@ -0,0 +1,248 @@
+<template>
+	<view class="order-detail">
+		<topNavBar title="订单详情" />
+		<view class="order-state padding-sm dflex-b w-full">
+			<view class="state-left">
+				<view class="state-info">等待商家接单</view>
+				<view class="order-code">预计 09:59 分钟后接单</view>
+			</view>
+			<uni-icons type="right" size="24" color="#FFF"></uni-icons>
+		</view>
+		<view class="gap"></view>
+		<view class="padding-sm dflex-b bg-main" @click="show = true">
+			<view class="dflex">
+				<view class="w-full dflex-wrap-w send-label">
+					取餐时间
+				</view>
+			</view>
+			<u-icon slot="icon" size="20" name="arrow-right" label="04:00" labelPos="left"></u-icon>
+		</view>
+		<view class="gap"></view>
+		<view class="padding-sm dflex-b bg-main">
+			<view class="dflex">
+				<view class="w-full dflex-wrap-w send-label">
+					取餐方式
+				</view>
+			</view>
+			<view>
+				<radio style="transform: scale(0.85)" value="r1" :checked="true" color="#ff0000" class="radio">店内用餐
+				</radio>
+			</view>
+		</view>
+
+		<view class="gap"></view>
+		<view class="goods-order-list padding-lr-sm">
+			<view class="shop dflex-b ">
+				<view class="shop-check">
+					<text class="send-label">店铺名称</text>
+				</view>
+				<view class="total-goods">共计2件商品</view>
+			</view>
+			<view class="goods-cart">
+				<view class="goods-cont dflex-b padding-tb-16">
+					<view class="goods-cart-info dflex-b">
+						<view class="pic"></view>
+						<view class="goods-cart-right">
+							<view class="cart-title">商品名称商品名称</view>
+							<view class="order-spec">
+								<text>500g</text>
+							</view>
+							<view class="cart-row-info dflex-s">
+								<view class="cart-price">
+									¥<text>12.30</text>
+								</view>
+								<view class="goods-num">×1</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="goods-cont dflex-b padding-tb-16">
+					<view class="goods-cart-info dflex-b">
+						<view class="pic"></view>
+						<view class="goods-cart-right">
+							<view class="cart-title">商品名称商品名称</view>
+							<view class="order-spec">
+								<text>500g</text>
+							</view>
+							<view class="cart-row-info dflex-s">
+								<view class="cart-price">
+									¥<text>12.30</text>
+								</view>
+								<view class="goods-num">×1</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="gap"></view>
+		<!-- 金额明细 -->
+		<view class="bg-main">
+			<view class="dflex-b padding-lr padding-tb-sm">
+				<view class="flex1 send-label">总金额</view>
+				<view class=""><text style="font-size: 24rpx;">¥</text>46.32</view>
+			</view>
+			<view class="gap"></view>
+			<view class="w-full padding-sm order-info">
+				<view class="row-cell dflex-b">
+					<text>订单编号</text>
+					<text class="cell-right">M0000000000</text>
+				</view>
+				<view class="row-cell dflex-b">
+					<text>下单时间</text>
+					<text class="cell-right">2024-03-25 12:23:36</text>
+				</view>
+			</view>
+		</view>
+		<view class="gap"></view>
+		<view class="bar-space"></view>
+		<view class="order-btn background-gradient">取消订单</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.order-state {
+		background-color: #F96C22;
+		box-sizing: border-box;
+		color: #FFF;
+
+		.state-info {
+			font-size: 14px;
+			padding-bottom: 4px;
+		}
+
+		.order-code {
+			font-size: 12px;
+		}
+	}
+
+	.addr-label {
+		padding: 6upx 0;
+		border-radius: 3px;
+		background-color: #F6390D;
+		color: #fff;
+		width: 120upx;
+		text-align: center;
+		flex-shrink: 0;
+		margin-right: 14upx;
+	}
+
+	.order-spec {
+		padding-bottom: 10upx;
+	}
+
+	.shop {
+		padding-top: 20upx;
+	}
+
+	.goods-num {
+		font-size: 16px;
+		padding-left: 20upx;
+	}
+
+	.sub-coupon {
+		padding-top: 20upx;
+		padding-bottom: 0;
+		color: #000;
+
+		.coupon-name {
+			font-weight: normal;
+		}
+
+		.mj-tag {
+			background-color: #F6390D;
+
+			>text {
+				color: #FFF;
+			}
+		}
+	}
+
+	.total-goods {
+		font-size: 12px;
+		color: #999;
+	}
+
+	.submit-bar {
+		height: 100upx;
+		width: 100%;
+		background-color: #FFF;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+
+		.submit-total {
+			font-size: 16px;
+			font-weight: 700;
+			color: #F6390D;
+		}
+
+		.submit-btn {
+			background-image: $base-bg-gradient-color;
+			height: 70upx;
+			width: 200upx;
+			color: #FFF;
+			font-size: 14px;
+			font-weight: 700;
+			border-radius: 35upx;
+		}
+	}
+
+	.order-btn {
+		height: 76upx;
+		border-radius: 38px;
+		background-image: $base-bg-gradient-color;
+		text-align: center;
+		line-height: 76upx;
+		color: #FFF;
+		font-size: 14px;
+		width: 90%;
+		position: fixed;
+		left: 5%;
+		bottom: 30upx;
+		z-index: 99;
+	}
+
+	.order-info {
+		background-color: #FFF;
+		box-sizing: border-box;
+	}
+
+	.row-cell {
+		padding-bottom: 20upx;
+
+		.cell-right {
+			font-size: 12px;
+			color: #999;
+		}
+	}
+
+	.row-cell:last-child {
+		padding-bottom: 0;
+	}
+
+	.pic {
+		margin-right: 20upx;
+		height: 160rpx;
+		width: 160rpx;
+		background-color: #EEE;
+	}
+
+	.send-label {
+		font-size: 14px;
+		font-weight: 700;
+	}
+</style>

+ 163 - 0
pages/user/myInfo.vue

@@ -0,0 +1,163 @@
+<template>
+	<view>
+		<view style="margin: 20px; background-color: #fff;">
+			<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
+			<u--form labelPosition="left" :model="userInfo" :rules="rules" ref="uForm">
+				<u-form-item label="姓名" prop="userInfo.name">
+					<u--input v-model="userInfo.name" border="none"></u--input>
+				</u-form-item>
+				<u-form-item label="头像" prop="userInfo.avg">
+					<view slot="right" class="flex-row" @click="onInfo">
+						<u-avatar :src="getFilePath(userInfo.avg ? userInfo.avg : null)" size="50"
+							@click="uploadAvator"></u-avatar>
+						<view class="flex-grow-1">
+							<u-icon name="arrow-right" color="#96989e"></u-icon>
+						</view>
+					</view>
+				</u-form-item>
+				<u-form-item label="生日" prop="userInfo.birthday">
+					<u--input v-model="userInfo.birthday" border="none" placeholder="请选择生日"></u--input>
+					<u-icon slot="right" name="arrow-right" color="#96989e"></u-icon>
+				</u-form-item>
+				<u-form-item label="手机号" prop="userInfo.phone" labelWidth="100px">
+					<u--input v-model="userInfo.phone" border="none"></u--input>
+					<u-button type="primary" shape="circle" size="small" slot="right"
+						color="linear-gradient(to right, #F54319, #FF6D20)" text="解绑">
+					</u-button>
+				</u-form-item>
+			</u--form>
+		</view>
+		<view class="cart-bottom padding-sm dflex-b">
+			<view class="go-cart dflex-c">保存编辑</view>
+			<view class="go-buy dflex-c background-gradient">退出登录</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				userInfo: {
+					name: 'uView UI',
+					avg: '',
+					birthday: '',
+					phone: ''
+				},
+				rules: {
+					// 字段名称
+					phone: [{
+							required: true,
+							message: '请输入手机号',
+							trigger: ['change', 'blur'],
+						},
+						{
+							// 自定义验证函数,见上说明
+							validator: (rule, value, callback) => {
+								// 上面有说,返回true表示校验通过,返回false表示不通过
+								// uni.$u.test.phone()就是返回true或者false的
+								return uni.$u.test.phone(value);
+							},
+							message: '手机号码不正确',
+							// 触发器可以同时用blur和change
+							trigger: ['change', 'blur'],
+						}
+					]
+				}
+
+			}
+		},
+		methods: {
+			uploadAvator() { // 上传头像
+				uni.chooseImage({
+					success: (file) => {
+						uni.showLoading({
+							title: '请稍后',
+						})
+
+						// 上传头像文件
+						uni.uploadFile({
+							url: `${this.serverPath}/resource/oss/upload`,
+							name: 'file',
+							filePath: file.tempFilePaths[0],
+							header: {
+								tenantId: this.tenantId
+							},
+							success: async (response) => {
+								const data = JSON.parse(response.data)
+								// 更新用户头像
+								const result = await this.$request('post',
+									'/userinfo/account/update', {
+										avatarUrl: data.data.url,
+										aid: this.userdata.aid
+									}, false, true)
+
+								if (result) {
+									// 记录埋点
+									this.$setPoint('user_update_avatarUrl', {
+										avatarUrl: data.data.url
+									})
+									uni.showToast({
+										title: '上传成功',
+										icon: 'success'
+									})
+									this.userdata.avatarUrl = data.data.url
+									this.setStoreData('vuex_user', this.userdata)
+								}
+							},
+							fail: (e) => {
+
+							}
+						})
+					},
+					fail: (e) => {
+
+					}
+				})
+			},
+		},
+	}
+</script>
+<style scoped lang="less">
+	.cart-bottom {
+		width: 100%;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		height: 130rpx;
+		box-sizing: border-box;
+		background-color: #FFF;
+		z-index: 10;
+		box-shadow: 0px -4px 16px 0px rgba(0, 0, 0, 0.15);
+
+		.go-cart {
+			height: 80%;
+			box-sizing: border-box;
+			border: solid 1px #BBBBBB;
+			font-size: 14px;
+			color: #000;
+			border-radius: 50upx;
+			margin: 0 10px;
+			width: 45%;
+		}
+
+		.go-buy {
+			height: 80%;
+			width: 45%;
+			background-color: #FF0000;
+			color: #FFF;
+			border-radius: 50upx;
+			font-size: 14px;
+		}
+	}
+
+	.flex-row {
+		display: flex;
+		align-items: center;
+	}
+
+	.flex-grow-1 {
+		flex-grow: 1;
+		margin-left: 10px;
+	}
+</style>

+ 160 - 6
pages/user/user.vue

@@ -1,6 +1,81 @@
 <template>
-	<view>
-		
+	<view class="pageBg">
+		<view class="page-header">
+			<view class="contain">
+				<view class="page-header-content">
+					<view class="page-header-content-left">
+						<view class="" @click="onInfo">
+							<u-avatar :src="getFilePath(userdata ? userdata.avatarUrl : null)" size="100"></u-avatar>
+						</view>
+					</view>
+					<view class="page-header-content-center">
+						<view>
+							<view class="fz16px mt5px">{{userdata && userdata.phone ? userdata.phone : '22222'}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 订单 -->
+			<view class="mt20px">
+				<view class="contain">
+					<view class="box">
+						<u-row justify="center">
+							<u-col span="8">
+								<view class="">我的订单</view>
+							</u-col>
+							<u-col span="4">
+								<view class="text-right" @click="openPage('/pages/order/myOrder/myOrder?type=0');">
+									<text class="fz14px" style="color: #96989e;">全部订单</text>
+									<view style="display: inline-block;">
+										<u-icon name="arrow-right" color="#96989e" size="24"></u-icon>
+									</view>
+								</view>
+							</u-col>
+						</u-row>
+						<view class="flex-box mt20px">
+							<view class="flex-box-item" @click="openPage('/pages/order/myOrder/myOrder?type=1')">
+								<u-icon name="rmb-circle" labelColor="#96989e" labelPos="bottom" labelSize="14px"
+									label="待付款" size="40"></u-icon>
+							</view>
+							<view class="flex-box-item" @click="openPage('/pages/order/myOrder/myOrder?type=2')">
+								<u-icon name="clock" labelColor="#96989e" label="待核销" labelSize="14px" labelPos="bottom"
+									size="40"></u-icon>
+							</view>
+							<view class="flex-box-item" @click="openPage('/pages/order/myOrder/myOrder?type=3')">
+								<u-icon name="close-circle" label="已取消" labelColor="#96989e" labelSize="14px" labelPos="bottom"
+									size="40"></u-icon>
+							</view>
+							<view class="flex-box-item" @click="openPage('/pages/order/myOrder/myOrder?type=4')">
+								<u-icon name="bag" label="已完成" labelColor="#96989e" labelSize="14px" labelPos="bottom"
+									size="40"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="mt20px">
+			<view class="contain mt20px">
+				<view class="box mt20px">
+					<view class="mb10px">我的应用</view>
+					<view class="flex-box mt20px">
+						<view class="flex-box-item" @click="openPage('/pages/user/myInfo')">
+							<u-icon name="account" labelColor="#96989e" labelPos="bottom" labelSize="14px"
+								label="个人信息" size="40"></u-icon>
+						</view>
+						<view class="flex-box-item" @click="openPage('/pages/classify/classify')">
+							<u-icon name="car" labelColor="#96989e" label="餐车信息" labelSize="14px" labelPos="bottom"
+								size="40"></u-icon>
+						</view>
+						<view class="flex-box-item">
+							<u-icon name="kefu-ermai" label="客服电话" labelColor="#96989e" labelSize="14px" labelPos="bottom"
+								size="40"></u-icon>
+						</view>
+					</view>
+				</view>
+				<!-- <u-button type="error" @click="exitMP()">退出登录</u-button> -->
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -8,15 +83,94 @@
 	export default {
 		data() {
 			return {
-				
+				userdata:{
+					avatarUrl:'',
+					phone:''
+				}
 			}
 		},
 		methods: {
-			
+			openPage(path) {
+				this.$u.route({
+					url: path
+				})
+			},
+			onInfo() {
+				uni.navigateTo({
+					url: `/pages/user/myInfo`
+				});
+			}
 		}
 	}
 </script>
 
-<style>
+<style lang="scss">
+	.page-header {
+		width: 100%;
+		display: inline-block;
+		padding-top: 60rpx;
+		background-size: cover;
+		background-position: left;
+		background-repeat: no-repeat;
+		background-image: linear-gradient(to bottom, #FBBD69, #F97023);
+		height: 35vh;
+
+		&-content {
+			display: flex;
+			flex-direction: column; // 设置 Flex 方向为垂直
+			align-items: center; // 水平居中子元素
+			justify-content: center; // 垂直居中子元素
+
+			&-left {
+				margin-right: 20rpx;
+
+				.avator {
+					display: inline-block;
+					border: 2px solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			&-center {
+				flex: 1;
+				color: #fff;
+			}
 
-</style>
+			&-right {
+				width: 60rpx;
+			}
+		}
+	}
+
+	.box {
+		padding: 30rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+	}
+
+	.flex-box {
+		display: flex;
+		text-align: center;
+		background-color: #F1F3F8;
+		border-radius: 10rpx;
+
+		&-item {
+			flex: 1;
+			margin: 10px;
+			position: relative;
+
+			.line {
+				height: 70%;
+				width: 1px;
+				background-color: #ebebeb;
+				position: absolute;
+				right: 0;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+	}
+	.pageBg {
+		background-color: #EFF2F7
+	}
+</style>