6.3 #11
							
								
								
									
										70
									
								
								components/mine/address-active/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								components/mine/address-active/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,70 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="address-active">
 | 
			
		||||
		<view class="user-info">
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="收货人" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="手机号" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="area">
 | 
			
		||||
				<input type="text" placeholder="省市区" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="详细地址" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="set-default">
 | 
			
		||||
				<view>设为默认地址</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<u-switch v-model="checked" active-color="#FF770F" inactive-color="##A9A7A7" size="35"></u-switch>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="edit-btn">保存地址</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			checked: false
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.address-active {
 | 
			
		||||
	// min-height: 100vh;
 | 
			
		||||
	.user-info {
 | 
			
		||||
		border-top: 1rpx solid rgba(235,235,235,1);
 | 
			
		||||
		> view {
 | 
			
		||||
			height: 98rpx;
 | 
			
		||||
			padding: 30rpx;
 | 
			
		||||
			border-bottom: 2rpx solid rgba(235,235,235,1);
 | 
			
		||||
			> input {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				outline: none;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.set-default {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.edit-btn {
 | 
			
		||||
		margin: 122rpx auto 0;
 | 
			
		||||
		width: 690rpx;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		background: rgba(255,119,15,1);
 | 
			
		||||
		border-radius: 49rpx;
 | 
			
		||||
		font-size: 36rpx;
 | 
			
		||||
		color:rgba(255,255,255,1);
 | 
			
		||||
		line-height: 98rpx;
 | 
			
		||||
		text-align: center;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="address">
 | 
			
		||||
		<radio-group @change="changeDefault">
 | 
			
		||||
		<u-radio-group v-model="current" @change="changeDefault" size="29" active-color="#FF780F">
 | 
			
		||||
			<view v-for="(item, index) in addressList" :key="index" class="address-item">
 | 
			
		||||
				<view class="item-top">
 | 
			
		||||
					<view class="user-info">
 | 
			
		||||
@ -11,10 +11,15 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="item-bottom">
 | 
			
		||||
					<view class="item-default">
 | 
			
		||||
						<radio :value="item" :checked="index === current" color="#FF770F" class="radio-class" />
 | 
			
		||||
						<view :class="[item == current ? 'radio-default' : 'radio-others']">
 | 
			
		||||
							{{ item == current ? '已设为默认' : '设为默认' }}
 | 
			
		||||
						</view>
 | 
			
		||||
						<u-radio 
 | 
			
		||||
							:name="item" 
 | 
			
		||||
							shape="circle"
 | 
			
		||||
							label-size="22" 
 | 
			
		||||
						>
 | 
			
		||||
							<view :class="[item == current ? 'radio-default' : 'radio-others']">
 | 
			
		||||
								{{ item == current ? '已设为默认' : '设为默认' }}
 | 
			
		||||
							</view>
 | 
			
		||||
						</u-radio>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="address-operate">
 | 
			
		||||
						<view>
 | 
			
		||||
@ -28,8 +33,8 @@
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</radio-group>
 | 
			
		||||
		<view class="address-btn">添加地址</view>
 | 
			
		||||
		</u-radio-group>
 | 
			
		||||
		<view class="address-btn" @click="addAddress">添加地址</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
@ -52,9 +57,14 @@ export default {
 | 
			
		||||
				url: '/pageE/mine/EditAddress'
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		addAddress() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageE/mine/AddAddress'
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		changeDefault(event) {
 | 
			
		||||
			console.log(event)
 | 
			
		||||
			this.current = event.detail.value
 | 
			
		||||
			// this.current = event
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
@ -62,6 +72,9 @@ export default {
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.address {
 | 
			
		||||
	padding-top: 1rpx;
 | 
			
		||||
	.u-radio-group {
 | 
			
		||||
		display: block;
 | 
			
		||||
	}
 | 
			
		||||
	.address-item {
 | 
			
		||||
		background-color: #ffffff;
 | 
			
		||||
		margin-bottom: 20rpx;
 | 
			
		||||
@ -102,19 +115,12 @@ export default {
 | 
			
		||||
		.item-bottom {
 | 
			
		||||
			padding-top: 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			.item-default {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				font-size: 22rpx;
 | 
			
		||||
				/deep/ .radio-class {
 | 
			
		||||
					.uni-radio-wrapper {
 | 
			
		||||
						.uni-radio-input {
 | 
			
		||||
							width: 29rpx !important;
 | 
			
		||||
							height: 29rpx !important;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				.radio-default {
 | 
			
		||||
					color: rgba(255,119,15,1);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										24
									
								
								pageE/mine/AddAddress.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								pageE/mine/AddAddress.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="add-address">
 | 
			
		||||
		<AddressActive></AddressActive>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import AddressActive from '@/components/mine/address-active/index'
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			checked: false
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	components: {
 | 
			
		||||
		AddressActive
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.add-address {
 | 
			
		||||
	min-height: calc(100vh-var(--custom-bar-height));
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -1,70 +1,24 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="edit-address">
 | 
			
		||||
		<view class="user-info">
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="收货人" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="手机号" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="area">
 | 
			
		||||
				<input type="text" placeholder="省市区" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<input type="text" placeholder="详细地址" />
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="set-default">
 | 
			
		||||
				<view>设为默认地址</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<u-switch v-model="checked" active-color="#FF770F" inactive-color="##A9A7A7" size="35"></u-switch>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="edit-btn">保存地址</view>
 | 
			
		||||
		<AddressActive></AddressActive>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import AddressActive from '@/components/mine/address-active/index'
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			checked: false
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	components: {
 | 
			
		||||
		AddressActive
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.edit-address {
 | 
			
		||||
	min-height: 100vh;
 | 
			
		||||
	.user-info {
 | 
			
		||||
		border-top: 1rpx solid rgba(235,235,235,1);
 | 
			
		||||
		> view {
 | 
			
		||||
			height: 98rpx;
 | 
			
		||||
			padding: 30rpx;
 | 
			
		||||
			border-bottom: 2rpx solid rgba(235,235,235,1);
 | 
			
		||||
			> input {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				outline: none;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.set-default {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.edit-btn {
 | 
			
		||||
		margin: 122rpx auto 0;
 | 
			
		||||
		width: 690rpx;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		background: rgba(255,119,15,1);
 | 
			
		||||
		border-radius: 49rpx;
 | 
			
		||||
		font-size: 36rpx;
 | 
			
		||||
		color:rgba(255,255,255,1);
 | 
			
		||||
		line-height: 98rpx;
 | 
			
		||||
		text-align: center;
 | 
			
		||||
	}
 | 
			
		||||
	min-height: calc(100vh-var(--custom-bar-height));
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										14
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								pages.json
									
									
									
									
									
								
							@ -123,6 +123,20 @@
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					"path": "mine/AddAddress",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"navigationBarTitleText": "添加地址",
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleSize": "36px",
 | 
			
		||||
							"titleColor": "#333333",
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"backgroundColor": "#FFFFFF"
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		}	
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user