zpj 2 лет назад
Родитель
Сommit
c055ac95e1
6 измененных файлов с 329 добавлено и 15 удалено
  1. 19 13
      pages-address/address.vue
  2. 171 0
      pages-address/edit-add.vue
  3. 1 1
      pages-buy/group-det.vue
  4. 119 0
      pages-takeout/confirm-order.vue
  5. 6 1
      pages-takeout/shop.vue
  6. 13 0
      pages.json

+ 19 - 13
pages-address/address.vue

@@ -1,20 +1,22 @@
 <template>
-	<view class="address-index flex-common-css box-border-box iPhone-bottom bgc-f">
+	<view class="address-index flex-common-css box-border-box iPhone-bottom">
 		<Nav title="地址管理"></Nav>
 		
 		
-		<view v-if="list.length !== 0" class="scroll-view-css">
-			<EnBlank  :customSrc='true'>
+		<view v-if="list.length === 0" class="scroll-view-css">
+			<EnBlank :customSrc='true'>
 				<template v-slot:blankImg>
 					<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
 				</template>
 			</EnBlank>
 		</view>
-		<view v-else class="scroll-view-css box-border-box p-24 ">
-			<view class="list-box" v-for="(item,i) in 10" :key="i" @click.stop="to(1,item)">
+		<view v-else class="scroll-view-css box-border-box p-24">
+			<view class="list-box box-border-box p-24" v-for="(item,i) in 10" :key="i" @click.stop="to(1,item)">
 				<view class=" mb-8 display-flex">
-					<view v-if="true" class="list-box-only fs-24 fc-FE9E11 text-align-center">默认</view>
-					<view class="fs-34 fw-500 mr-10">重庆工商职业学校3栋1楼503重1重庆工商职业学校3栋1楼503重1</view>
+					<view class="fs-34 fw-500 mr-10 w-556">
+						<span v-if="true" class="list-box-only fs-24 fc-FF7F00 text-align-center">默认</span>
+						重庆工商职业学校3栋1楼503重1重庆工商职业学校3栋1楼503重1
+					</view>
 				</view>
 				<view class="w-520 fs-26 fc-9 align-items-center">
 					<view class="fs-24 fc-9 mr-24">张晓鹏</view>
@@ -26,7 +28,7 @@
 			</view>
 		</view>
 		
-		<view class="box-border-box p-24" @click="to(2)">
+		<view class="box-border-box p-24 bgc-f" @click="to(2)">
 			<view class="add-box text-align-center fs-34 fc-f">新增地址</view>
 		</view>
 	</view>
@@ -53,11 +55,11 @@
 			to(type,item){
 				if(type === 1){
 					uni.navigateTo({
-						url:"pages/me/address-magen/edit-add?id=" + item.id
+						url:"pages-address/edit-ad?id=" + item.id
 					})
 				}else{
 					uni.navigateTo({
-						url:"pages/me/address-magen/edit-add"
+						url:"pages-address/edit-add"
 					})
 				}
 			},
@@ -67,6 +69,9 @@
 
 <style scoped lang="scss">
 	.address-index{
+		.w-556{
+			width: 556rpx;
+		}
 		.w-520{
 			width: 570rpx;
 		}
@@ -79,9 +84,9 @@
 			
 		}
 		.list-box{
+			background: #FFFFFF;
+			border-radius: 20rpx;
 			margin-bottom: 24rpx;
-			padding-bottom: 24rpx;
-			border-bottom: 2rpx solid #F9F9F9;
 			position: relative;
 			
 			image{
@@ -97,11 +102,12 @@
 				right: 0;
 			}
 			.list-box-only{
-				width: 64rpx;
+				padding: 0 8rpx;
 				height: 34rpx;
 				line-height: 34rpx;
 				border-radius: 8rpx;
 				border: 2rpx solid #FE9E11;
+				margin-right: 8rpx;
 			}
 		}
 		

+ 171 - 0
pages-address/edit-add.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="edit-add-index flex-common-css box-border-box iPhone-bottom">
+		<Nav :title="fromData.id?'编辑地址':'新增地址'"></Nav>
+
+		<view class="scroll-view-css box-border-box p-24">
+			
+			<view class="box-card box-border-box p-24 mb-20">
+				<EnInput label="收货人" placeholder="请输入收货人姓名" v-model="fromData.consignee"></EnInput>
+				<EnInput label="电话号码" type="number" placeholder="请输入电话号码" v-model="fromData.phone"></EnInput>
+
+				<EnSelect label="收货学校" placeholder="请选择收货学校" v-model="fromData.id" :localData="schoolList" :valueType="'1'"></EnSelect>
+				<EnSelect label="楼栋" placeholder="请选择楼栋" v-model="fromData.id" :localData="builList" :valueType="'1'"></EnSelect>
+				
+				<EnInput label="详细地址" placeholder="请输入详细地址" v-model="fromData.address"></EnInput>
+			</view>
+			
+			<view class="box-card box-border-box p-24 flex-justify-space">
+				<view class="">
+					<view class="fs-30 mb-16">设为默认地址</view>
+					<view class="fs-24 fc-9">提醒:下单会优先使用该地址</view>
+				</view>
+				<view class="r-right" @click="fromData.is_default == 1?fromData.is_default=0:fromData.is_default=1" 
+				:class="fromData.is_default == 0?'n-r':'s-r'">
+					<view class="r-y"></view>
+				</view>
+			</view>
+		</view>
+
+		<view class="box-border-box p-24 bgc-f " @click="save()">
+			<view class="add-box text-align-center fs-34 fc-f mb-20">确定</view>
+			<view class="add-box-1 text-align-center fs-34 fc-41ABF5">删除</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import tools from "@/service/tools.js";
+	import EnSelect from "@/components/en-from/en-select/en-select";
+	import EnInput from "@/components/en-from/en-input/en-input";
+	
+	export default {
+		components: {
+			EnInput,
+			EnSelect,
+		},
+		data() {
+			return {
+				radioData: [{
+						'id': '0',
+						'name': '否'
+					},
+					{
+						'id': '1',
+						'name': '是'
+					}
+				],
+				fromData: {
+					id: '',
+					address: '',
+					is_default: 0,
+					consignee: '',
+					city_names: '',
+					phone: '',
+					province: '',
+					city: '',
+					area: '',
+					lon: '',
+					lat: '',
+				},
+
+				schoolList: [
+					{
+						value:1,
+						text:'学校1',
+					},
+					{
+						value:2,
+						text:'学校2',
+					}
+				],
+				builList:[
+					{
+						value:1,
+						text:'楼栋1',
+					},
+					{
+						value:2,
+						text:'楼栋2',
+					}
+				],
+				isAJAX: false,
+			}
+		},
+		onLoad(e) {
+			if (e.id) {
+				this.getInfo(e.id)
+			} else {
+				this.fromData.id = '';
+			}
+		},
+		mounted() {
+			
+		},
+		methods: {
+			getInfo(id) {
+				
+			},
+			save() {
+				
+			},
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.edit-add-index {
+		.add-box {
+			width: 100%;
+			height: 80rpx;
+			line-height: 80rpx;
+			background-color: #2F80ED;
+			border-radius: 200rpx;
+		}
+		.add-box-1{
+			width: 100%;
+			height: 88rpx;
+			line-height: 88rpx;
+			background: #FFFFFF;
+			border-radius: 200rpx 200rpx 200rpx 200rpx;
+			box-sizing: border-box;
+			border: 2rpx solid #41ABF5;
+		}
+		.box-card{
+			width: 1005;
+			min-height: 152rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+		}
+		.r-right{
+			margin-top: 24rpx;
+			width: 88rpx;
+			height: 52rpx;
+			border-radius: 200rpx;
+			position: relative;
+			.r-y{
+				width: 44rpx;
+				height: 44rpx;
+				background: #FFFFFF;
+				border-radius: 200rpx;
+				position: absolute;
+				top: 4rpx;
+			}
+		}
+		.s-r{
+			background-color: #41ABF5;
+			transition:  all 1s; 
+			.r-y{
+				right: 4rpx !important;
+				transition:  all 1s; 
+			}
+		}
+		.n-r{
+			background-color: #ccc;
+			transition:  all 1s; 
+			.r-y{
+				left: 4rpx !important;
+				transition:  all 1s; 
+			}
+		}
+	}
+</style>

+ 1 - 1
pages-buy/group-det.vue

@@ -102,7 +102,7 @@
 			}
 		},
 		onShow() {
-			this.setCountDown('2024-6-18 12:45:00');
+			this.setCountDown('2024-6-21 12:45:00');
 		},
 		methods:{
 			toBack(){

+ 119 - 0
pages-takeout/confirm-order.vue

@@ -0,0 +1,119 @@
+<template>
+	<view class="confirm-order-box iPhone-bottom flex-common-css box-border-box">
+		<view class="bg-box"></view>
+		<Nav title='提交订单' bgckgroundBox='transparent'></Nav>
+		
+		<view class="scroll-view-css box-border-box p-24">
+			<view class="box-card box-border-box mb-20 bgc-f">
+				<view class="box-input box-border-box p-b-20 mb-20">
+					<view class="flex-justify-space mb-12">
+						<view class="fs-36 fw-600 text-overflow-ellipsis w570">
+							重庆工商职业学校3栋1楼503重庆工 商职业学校3栋1楼503重庆工商职业学校3栋1楼503重庆工 商职业学校3栋1楼503
+						</view>
+						<image class="right-icon" src="@/static/img/toRight.png" mode=""></image>
+					</view>
+					<view class="">
+						<span class="mr-24 fs-28 fc-9">张晓鹏</span><span class="fs-28 fc-9">18883660721</span>
+					</view>
+				</view>
+				<view class="box-input flex-justify-space box-border-box p-b-20 mb-20">
+					<view class="fs-28 fw-600">配送方式</view>
+					<view class="fs-24 fw-400 sd-box fc-FB3D03">送达宿舍</view>
+				</view>
+			</view>
+			
+			
+			
+			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
+				<view class="fs-28 fw-600 w158">支付方式</view>
+				<view class="wx-box display-flex">
+					<image src="@/static/img/common/wx-zf.png" mode="scaleToFill"></image>
+					<view class="fs-28 fw-400 ml-10">微信支付</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="bottom-box box-border-box p-24">
+			<view class="flex-justify-space">
+				<view class="align-items-flex-end box-1">
+					<span class="fs-28 fc-f fw-600">¥</span>
+					<span class="fs-44 fc-f fw-600">19.5</span>
+				</view>
+				<view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style scoped lang="scss">
+	.right-icon{
+		width: 32rpx;
+		height: 32rpx;
+	}
+	.w570{
+		width: 570rpx;
+	}
+	.sd-box{
+		padding: 3rpx 16rpx;
+		height: 40rpx;
+		background: rgba(251,61,3,0.1);
+		border-radius: 8rpx 8rpx 8rpx 8rpx;
+	}
+	
+	.confirm-order-box{
+		position: relative;
+		.bg-box{
+			width: 100%;
+			height: 448rpx;
+			filter: blur(80rpx);
+			background: linear-gradient(to right,rgba(176, 252, 250, 0.6),rgba(249,246,224,0.87),rgba(249,246,224,0.87));
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: -1;
+		}
+		.bottom-box{
+			background-color: #fff;
+			.box-1{
+				flex: 1;
+				height: 100rpx;
+				background: #333;
+				border-radius: 200rpx 0rpx 0rpx 200rpx;
+				box-sizing: border-box;
+				padding-left: 32rpx;
+				padding-bottom: 20rpx;
+			}
+			.box-2{
+				width: 200rpx;
+				height: 100rpx;
+				line-height: 100rpx;
+				background: #41ABF5;
+				border-radius: 0rpx 200rpx 200rpx 0rpx;
+				text-align: center;
+			}
+		}
+		
+		.box-card{
+			width: 100%;
+			min-height: 88rpx;
+			border-radius: 20rpx;
+			padding: 24rpx 24rpx 0 24rpx;
+		}
+		.wx-box{
+			image{
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
+		.box-input{
+			border-bottom: 2rpx solid #F9F9F9;
+			
+		}
+	}
+</style>

+ 6 - 1
pages-takeout/shop.vue

@@ -125,7 +125,7 @@
 							<view class="fs-24 fc-ff3939">配送费¥10</view>
 						</view>
 						<!-- <view class="fs-32 fw-600 fc-f mr-30">20元起送</view> -->
-						<view class="shop-buttom-money-2 text-align-center fs-32 fc-f fw-600">去结算</view>
+						<view class="shop-buttom-money-2 text-align-center fs-32 fc-f fw-600" @click="toConfirmOrder()">去结算</view>
 					</view>
 				</view>
 			</view>
@@ -232,6 +232,11 @@
 			closeCoupon(){
 				this.$refs.popupCoupon.close()
 			},
+			toConfirmOrder(){
+				uni.navigateTo({
+					url:'/pages-takeout/confirm-order'
+				})
+			},
 		},
 	}
 </script>

+ 13 - 0
pages.json

@@ -81,6 +81,12 @@
 					"style": {
 						"navigationBarTitleText": "地址管理"
 					}
+				},
+				{
+					"path": "edit-add",
+					"style": {
+						"navigationBarTitleText": "地址管理"
+					}
 				}
 			]
 		},
@@ -152,6 +158,13 @@
 					"style": {
 						"navigationBarTitleText": "资质"
 					}
+				},
+				{
+				
+					"path": "confirm-order",
+					"style": {
+						"navigationBarTitleText": "提交订单"
+					}
 				}
 			]
 		},