guhongwei 2 gadi atpakaļ
vecāks
revīzija
7e1073771a

+ 44 - 0
pages.json

@@ -70,7 +70,51 @@
 					"style": {
 					"style": {
 						"navigationBarTitleText": "订单列表"
 						"navigationBarTitleText": "订单列表"
 					}
 					}
+				},
+				{
+					"path": "discount/index",
+					"style": {
+						"navigationBarTitleText": "我的优惠劵"
+					}
+				},
+				{
+					"path": "integral/index",
+					"style": {
+						"navigationBarTitleText": "我的积分"
+					}
+				},
+				{
+					"path": "assets/index",
+					"style": {
+						"navigationBarTitleText": "我的资产"
+					}
+				},
+				{
+					"path": "dough/index",
+					"style": {
+						"navigationBarTitleText": "我的拼团"
+					}
+				},
+				{
+					"path": "address/index",
+					"style": {
+						"navigationBarTitleText": "收货地址"
+					}
+				},
+				{
+					"path": "address/add",
+					"style": {
+						"navigationBarTitleText": "新增收货地址"
+					}
+
+				},
+				{
+					"path": "account/index",
+					"style": {
+						"navigationBarTitleText": "账号管理"
+					}
 				}
 				}
+
 			]
 			]
 		},
 		},
 		{
 		{

+ 18 - 12
pages/my/index.vue

@@ -3,7 +3,7 @@
 		<view class="main">
 		<view class="main">
 			<view class="one">
 			<view class="one">
 				<view class="one_1" v-if="!user._id">
 				<view class="one_1" v-if="!user._id">
-					<text class="iconfont icon-geren2" @click="toOrrder('logo')"></text>
+					<text class="iconfont icon-geren2" @click="toCommon('pages/login/index')"></text>
 					<view class="name">未登录</view>
 					<view class="name">未登录</view>
 				</view>
 				</view>
 				<view class="one_1" v-else>
 				<view class="one_1" v-else>
@@ -16,12 +16,12 @@
 				<view class="one_2">
 				<view class="one_2">
 					<view class="one_2_1">
 					<view class="one_2_1">
 						<text v-if="user._id">{{user.collect||0}}</text>
 						<text v-if="user._id">{{user.collect||0}}</text>
-						<text @click="toOrrder('pagesMy/collection/market')">收藏的商品</text>
+						<text @click="toCommon('pagesMy/collection/market')">收藏的商品</text>
 					</view>
 					</view>
 					<text class="link">|</text>
 					<text class="link">|</text>
 					<view class="one_2_1">
 					<view class="one_2_1">
 						<text v-if="user._id">{{user.collect||0}}</text>
 						<text v-if="user._id">{{user.collect||0}}</text>
-						<text @click="toOrrder('pagesMy/collection/shop')">收藏的店铺</text>
+						<text @click="toCommon('pagesMy/collection/shop')">收藏的店铺</text>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -29,7 +29,7 @@
 				<view class="two_1">
 				<view class="two_1">
 					<view class="title">我的订单</view>
 					<view class="title">我的订单</view>
 					<view class="title">
 					<view class="title">
-						<text @click="toOrrder('pagesMy/order/index')">全部订单</text>
+						<text @click="toCommon('pagesMy/order/index')">全部订单</text>
 						<text class="iconfont icon-dayufuhao"></text>
 						<text class="iconfont icon-dayufuhao"></text>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -41,7 +41,7 @@
 						<text class="title">{{item.title}}</text>
 						<text class="title">{{item.title}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="two_1" v-for="(item, index) in menuList" :key="index" @click="toOrrder(item.type)">
+				<view class="two_1" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
 					<view class="title">{{item.title}}</view>
 					<view class="title">{{item.title}}</view>
 					<view class="title">
 					<view class="title">
 						<text v-if="user._id&&item.title=='我的积分'">{{user.integral||0}}分</text>
 						<text v-if="user._id&&item.title=='我的积分'">{{user.integral||0}}分</text>
@@ -93,31 +93,31 @@
 				// 菜单
 				// 菜单
 				menuList: [{
 				menuList: [{
 						title: '我的优惠劵',
 						title: '我的优惠劵',
-						type: 'f'
+						route: 'pagesMy/discount/index'
 					},
 					},
 					{
 					{
 						title: '我的积分',
 						title: '我的积分',
-						type: 'g'
+						route: 'pagesMy/integral/index'
 					},
 					},
 					{
 					{
 						title: '我的资产',
 						title: '我的资产',
-						type: 'h'
+						route: 'pagesMy/assets/index'
 					},
 					},
 					{
 					{
 						title: '我的拼团',
 						title: '我的拼团',
-						type: 'i'
+						route: 'pagesMy/dough/index'
 					},
 					},
 					{
 					{
 						title: '我的收货地址',
 						title: '我的收货地址',
-						type: 'j'
+						route: 'pagesMy/address/index'
 					},
 					},
 					{
 					{
 						title: '账号管理',
 						title: '账号管理',
-						type: 'k'
+						route: 'pagesMy/account/index'
 					},
 					},
 					{
 					{
 						title: '客服电话',
 						title: '客服电话',
-						type: 'l'
+						route: ''
 					},
 					},
 				],
 				],
 			};
 			};
@@ -129,6 +129,12 @@
 					url: `/${e.route}`
 					url: `/${e.route}`
 				})
 				})
 			},
 			},
+			// 公共跳转
+			toCommon(e) {
+				uni.navigateTo({
+					url: `/${e}`
+				})
+			},
 			// 跳转页面
 			// 跳转页面
 			toOrrder(e) {
 			toOrrder(e) {
 				const that = this;
 				const that = this;

+ 23 - 0
pagesMy/account/index.vue

@@ -0,0 +1,23 @@
+<template>
+	<mobile-frame>
+		1
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 24 - 0
pagesMy/address/add.vue

@@ -0,0 +1,24 @@
+<template>
+	<mobile-frame>
+		新增收货地址
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {};
+		},
+		onLoad: function(e) {
+			console.log(e);
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 240 - 0
pagesMy/address/index.vue

@@ -0,0 +1,240 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="one">
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+					<view class="list-scroll-view">
+						<view class="list" v-for="(item,index) in list" :key="index">
+							<view class="name">
+								<text>{{item.name}}</text>
+								<text>{{item.phone}}</text>
+							</view>
+							<view class="address">
+								<text>{{item.province}}</text>
+								<text>{{item.city}}</text>
+								<text>{{item.area}}</text>
+								<text>{{item.address}}</text>
+								<text>{{item.number}}</text>
+							</view>
+							<view class="btn">
+								<view class="btn_1" v-if="item.is_default==false">
+									<button type="default" size="mini" @click="toDefa(item)">设为默认</button>
+								</view>
+								<view class="btn_1">
+									<button type="default" size="mini" @click="toCommon(item)">编辑</button>
+								</view>
+								<view class="btn_1">
+									<button type="default" size="mini" @click="toDel(item)">删除</button>
+								</view>
+							</view>
+							<view class="default" v-if="item.is_default==true">
+								<text>默认</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="two">
+				<view class="two_1">
+					<button type="default">获取微信地址</button>
+				</view>
+				<view class="two_1">
+					<button type="default" @click="toCommon()">新增收货地址</button>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: [ //信息列表
+					{
+						id: '1234567',
+						name: '姓名',
+						phone: '13174420325',
+						province: '吉林省',
+						city: '长春市',
+						area: '朝阳区',
+						address: '详细地址',
+						number: 0,
+						is_default: false
+					},
+					{
+						id: '123456',
+						name: '姓名',
+						phone: '13174420325',
+						province: '吉林省',
+						city: '长春市',
+						area: '朝阳区',
+						address: '详细地址',
+						number: 11,
+						is_default: true
+					}
+
+				]
+			};
+		},
+		onShow: function() {},
+		methods: {
+			// 分页
+			toPage() {
+
+			},
+			// 设置默认
+			toDefa(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定设置该地址为默认地址吗?',
+					success: function(res) {
+						if (res.confirm) {
+							console.log('用户点击确定');
+						}
+					}
+				});
+			},
+			// 编辑
+			toCommon(e) {
+				uni.navigateTo({
+					url: `/pagesMy/address/add?id=${e&&e.id?e.id:''}`
+				})
+			},
+			// 删除
+			toDel(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定删除该地址吗?',
+					success: function(res) {
+						if (res.confirm) {
+							console.log('用户点击确定');
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f5Color);
+
+			.list {
+				position: relative;
+				background: var(--fffColor);
+				padding: 2vw;
+				width: 92vw;
+				margin: 2vw 2vw 0 2vw;
+				border-radius: 5px;
+
+				.name {
+					font-size: var(--font16Size);
+					margin: 0 0 1vw 0;
+
+					text {
+						padding: 0 2vw 0 0;
+					}
+				}
+
+				.address {
+					font-size: var(--font14Size);
+					margin: 0 0 1vw 0;
+
+					text {
+						padding: 0 2vw 0 0;
+					}
+				}
+
+				.btn {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-around;
+					border-top: 1px solid var(--font16Size);
+					padding: 2vw 0 0 0;
+
+					.btn_1 {
+						button {
+							width: 100%;
+							color: var(--fffColor);
+							background-color: var(--f35BColor);
+						}
+					}
+
+					.btn_1:nth-child(2) {
+						button {
+							background-color: var(--f0fColor);
+						}
+					}
+
+					.btn_1:last-child {
+						button {
+							background-color: var(--fFB1Color);
+						}
+					}
+				}
+
+				.default {
+					position: absolute;
+					top: 0;
+					right: 0;
+
+					text {
+						background: var(--ff0Color);
+						color: var(--fffColor);
+						font-size: var(--font12Size);
+						padding: 1vw;
+						border-radius: 5px;
+					}
+				}
+			}
+
+		}
+
+		.two {
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+
+			.two_1 {
+				width: 50vw;
+
+				button {
+					width: 100%;
+					color: var(--fffColor);
+					background-color: var(--f08Color);
+				}
+
+
+			}
+
+			.two_1:nth-child(2) {
+				button {
+					background-color: var(--fFB1Color);
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 23 - 0
pagesMy/assets/index.vue

@@ -0,0 +1,23 @@
+<template>
+	<mobile-frame>
+		我的资产
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 23 - 0
pagesMy/discount/index.vue

@@ -0,0 +1,23 @@
+<template>
+	<mobile-frame>
+		我的优惠劵
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 23 - 0
pagesMy/dough/index.vue

@@ -0,0 +1,23 @@
+<template>
+	<mobile-frame>
+		我的拼团
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 23 - 0
pagesMy/integral/index.vue

@@ -0,0 +1,23 @@
+<template>
+	<mobile-frame>
+		我的积分
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onShow: function() {},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>