Browse Source

8-6 store

2312970463@qq.com 4 years ago
parent
commit
ce25945014

+ 19 - 2
api/user.js

@@ -1,4 +1,5 @@
-import request from '@/utils/request'
+import request from '@/utils/request'
+import { upFilse } from '@/utils/request';
 
 
 // 订单统计信息
 // 订单统计信息
 export function orderData(data) {
 export function orderData(data) {
@@ -101,4 +102,20 @@ export function delcollect(data) {
 	});
 	});
 }
 }
 
 
-
+//上传图片
+export function upload(data){
+	return upFilse({
+		url:'/api/upload/image',
+		method:'post',
+		data
+	})
+}
+
+//用户修改信息
+export function edit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}

+ 517 - 469
pages.json

@@ -1,471 +1,519 @@
-{
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"enablePullDownRefresh": true,
+{
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"enablePullDownRefresh": true,
 				"navigationStyle": "custom",
 				"navigationStyle": "custom",
-				"navigationBarTitleText": "商城首页"
-			}
-		},
-		{
-			"path": "pages/index/sign",
-			"style": {
-				"navigationBarTitleText": "每日签到",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},{
-			"path": "pages/public/register",
-			"style": {
-				"navigationBarTitleText": "注册",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		}, {
-			"path": "pages/public/login",
-			"style": {
-				"navigationBarTitleText": "登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/public/wxLogin",
-			"style": {
-				"navigationBarTitleText": "微信登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/public/forget",
-			"style": {
-				"navigationBarTitleText": "忘记密码",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/index",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "超值拼团"
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/detail",
-			"style": {
-				"navigationBarTitleText": "拼团列表",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/productCollage",//拼团商品
-			"style": {
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				},
-				"navigationBarTitleText":"商品详情"
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/inviteImg",
-			"style": {
-				"navigationBarTitleText": "拼团邀请图",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/productGroup",
-			"style": {
-				"navigationBarTitleText": "拼团详情展示",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		// {
-		// 	"path": "pages/product/groupBooking/groupdetails",
-		// 	"style": {
-		// 		"navigationBarTitleText": "拼团详情",
-		// 		"app-plus": {
-		// 			"titleNView": false
-		// 		}
-		// 	}
-		// },
-		{
-			"path": "pages/product/reply",
-			"style": {
-				"navigationBarTitleText": "商品评价",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/product",
-			"style": {
-				"navigationBarTitleText": "详情展示",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/seckill",
-			"style": {
-				"navigationBarTitleText": "限时秒杀"
-			}
-		},
-		{
-			"path": "pages/product/list",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "商品列表"
-			}
-		},
-		{
-			"path": "pages/product/search",
-			"style": {
-				"enablePullDownRefresh": true,
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP || APP-PLUS
-				"app-plus": {
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "请输入关键字",
-							"disabled": false,
-							"placeholderColor": "#606266",
-							"align": "left"
-						},
-						"buttons": [{
-							"text": "搜索",
-							"fontSize": "14",
-							"color": "#303133",
-							"background": "rgba(0,0,0,0)",
-							"width": "40px"
-						}]
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "搜索"
-			}
-		},
-		{
-			"path": "pages/product/classify",
-			"style": {
-				"navigationStyle": "custom",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/set/set",
-			"style": {
-				"navigationBarTitleText": "设置"
-			}
-		},
-		{
-			"path": "pages/set/address",
-			"style": {
-				"navigationBarTitleText": "收货地址"
-			}
-		},
-		{
-			"path": "pages/set/addressManage",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		},
-		{
-			"path": "pages/set/phone",
-			"style": {
-				"navigationBarTitleText": "实名认证"
-			}
-		},
-		{
-			"path": "pages/set/password",
-			"style": {
-				"navigationBarTitleText": "修改密码"
-			}
-		},
-		{
-			"path": "pages/set/userinfo",
-			"style": {
-				"navigationBarTitleText": "修改资料"
-			}
-		}, {
-			"path": "pages/cart/cart",
-			"style": {
-				"navigationBarTitleText": "购物车"
-			}
-		},
-		
-		{
-			"path": "pages/user/user",
-			"style": {
-				// #ifndef MP-WEIXIN
-				"navigationStyle": "custom",
-				// "app-plus": {
-				// 	"bounce": "none",
-				// 	"titleNView": {
-				// 		"type": "transparent",
-				// 		"buttons": [{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue60f",
-				// 				"fontSize": "24",
-				// 				"color": "#303133",
-				// 				"width": "46px",
-				// 				"background": "rgba(0,0,0,0)"
-				// 			},
-				// 			{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue744",
-				// 				"fontSize": "28",
-				// 				"color": "#303133",
-				// 				"background": "rgba(0,0,0,0)",
-				// 				"redDot": true
-				// 			}
-				// 		]
-				// 	}
-				// },
-				// #endif
-				"navigationBarTitleText": "个人中心"
-			}
-		},
-		{
-			"path": "pages/user/award",
-			"style": {
-				"navigationBarTitleText": "奖励明细",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/user/withdrawal",
-			"style": {
-				"navigationBarTitleText": "奖励提现"
-			}
-		},
-		{
-			"path": "pages/user/notice",
-			"style": {
-				"navigationBarTitleText": "通知"
-			}
-		},
-		{
-			"path": "pages/user/favorites",
-			"style": {
-				"navigationBarTitleText": "收藏夹"
-			}
-		}, {
-			"path": "pages/user/coupon",
-			"style": {
-				"navigationBarTitleText": "我的卡卷"
-			}
-		},
-		{
-			"path": "pages/user/scoreAccumulate",
-			"style": {
-				"navigationBarTitleText": "积分明细"
-			}
-		},
-		{
-			"path": "pages/order/order",
-			"style": {
-				"navigationBarTitleText": "我的订单",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/order/expressInfo",
-			"style": {
-				"navigationBarTitleText": "快递详情"
-			}
-		},
-		{
-			"path": "pages/order/orderDetail",
-			"style": {
-				"navigationBarTitleText": "订单详情",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/order/evaluate",
-			"style": {
-				"navigationBarTitleText": "评论"
-			}
-		},
-		{
-			"path": "pages/order/orderRefund",
-			"style": {
-				"navigationBarTitleText": "申请退款"
-			}
-		},
-		{
-			"path": "pages/order/createOrder",
-			"style": {
-				"navigationBarTitleText": "创建订单"
-			}
-		},  {
-			"path": "pages/money/pay",
-			"style": {
-				"navigationBarTitleText": "支付"
-			}
-		},
-		{
-			"path": "pages/money/paySuccess",
-			"style": {
-				"navigationBarTitleText": "支付成功"
-			}
-		},
-		{
-			"path": "pages/money/wallet",
-			"style": {
-				"navigationBarTitleText": "我的钱包",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/money/account",
-			"style": {
-				"navigationBarTitleText": "提现账号"
-			}
-		},
-		{
-			"path": "pages/money/withdrawal",
-			"style": {
-				"navigationBarTitleText": "提现"
-			}
-		},
-		{
-			"path": "pages/money/recharge",
-			"style": {
-				"navigationBarTitleText": "充值"
-			}
-		},
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "输入关键词搜索",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "分类"
-			}
-		},
-		{
-			"path": "pages/redirect/redirect",
-			"style": {
-				"navigationBarTitleText": "微信登录跳转页面",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/user/shareQrCode",
-			"style": {
-				"navigationBarTitleText": "邀请好友"
-			}
-		}
-	],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#FFFFFF",
-		"backgroundColor": "#f8f8f8"
-	},
-	"tabBar": {
-		"color": "#C0C4CC",
-		"selectedColor": "#FF4C4C",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index/index",
-				"iconPath": "static/tabBar/tab-home.png",
-				"selectedIconPath": "static/tabBar/tab-home-current.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/category/category",
-				"iconPath": "static/tabBar/tab-cate.png",
-				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "分类"
-			},
-			{
-				"pagePath": "pages/cart/cart",
-				"iconPath": "static/tabBar/tab-cart.png",
-				"selectedIconPath": "static/tabBar/tab-cart-current.png",
-				"text": "购物车"
-			},
-			{
-				"pagePath": "pages/user/user",
-				"iconPath": "static/tabBar/tab-my.png",
-				"selectedIconPath": "static/tabBar/tab-my-current.png",
-				"text": "我的"
-			}
-		]
-	}
+				"navigationBarTitleText": "商城首页"
+			}
+		},
+		{
+			"path": "pages/index/sign",
+			"style": {
+				"navigationBarTitleText": "每日签到",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}, {
+			"path": "pages/public/register",
+			"style": {
+				"navigationBarTitleText": "注册",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}, {
+			"path": "pages/public/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/wxLogin",
+			"style": {
+				"navigationBarTitleText": "微信登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/forget",
+			"style": {
+				"navigationBarTitleText": "忘记密码",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/index",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "超值拼团"
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/detail",
+			"style": {
+				"navigationBarTitleText": "拼团列表",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/productCollage", //拼团商品
+			"style": {
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				},
+				"navigationBarTitleText": "商品详情"
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/inviteImg",
+			"style": {
+				"navigationBarTitleText": "拼团邀请图",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/productGroup",
+			"style": {
+				"navigationBarTitleText": "拼团详情展示",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		// {
+		// 	"path": "pages/product/groupBooking/groupdetails",
+		// 	"style": {
+		// 		"navigationBarTitleText": "拼团详情",
+		// 		"app-plus": {
+		// 			"titleNView": false
+		// 		}
+		// 	}
+		// },
+		{
+			"path": "pages/product/reply",
+			"style": {
+				"navigationBarTitleText": "商品评价",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/product",
+			"style": {
+				"navigationBarTitleText": "详情展示",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/seckill",
+			"style": {
+				"navigationBarTitleText": "限时秒杀"
+			}
+		},
+		{
+			"path": "pages/product/list",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "商品列表"
+			}
+		},
+		{
+			"path": "pages/product/search",
+			"style": {
+				"enablePullDownRefresh": true,
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP || APP-PLUS
+				"app-plus": {
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "请输入关键字",
+							"disabled": false,
+							"placeholderColor": "#606266",
+							"align": "left"
+						},
+						"buttons": [{
+							"text": "搜索",
+							"fontSize": "14",
+							"color": "#303133",
+							"background": "rgba(0,0,0,0)",
+							"width": "40px"
+						}]
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "搜索"
+			}
+		},
+		{
+			"path": "pages/product/classify",
+			"style": {
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/set/set",
+			"style": {
+				"navigationBarTitleText": "设置"
+			}
+		},
+		{
+			"path": "pages/set/address",
+			"style": {
+				"navigationBarTitleText": "收货地址"
+			}
+		},
+		{
+			"path": "pages/set/addressManage",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/set/phone",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
+		},
+		{
+			"path": "pages/set/password",
+			"style": {
+				"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "pages/set/userinfo",
+			"style": {
+				"navigationBarTitleText": "修改资料"
+			}
+		}, {
+			"path": "pages/cart/cart",
+			"style": {
+				"navigationBarTitleText": "购物车"
+			}
+		},
+
+		{
+			"path": "pages/user/user",
+			"style": {
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// "app-plus": {
+				// 	"bounce": "none",
+				// 	"titleNView": {
+				// 		"type": "transparent",
+				// 		"buttons": [{
+				// 				"fontSrc": "/static/yticon.ttf",
+				// 				"text": "\ue60f",
+				// 				"fontSize": "24",
+				// 				"color": "#303133",
+				// 				"width": "46px",
+				// 				"background": "rgba(0,0,0,0)"
+				// 			},
+				// 			{
+				// 				"fontSrc": "/static/yticon.ttf",
+				// 				"text": "\ue744",
+				// 				"fontSize": "28",
+				// 				"color": "#303133",
+				// 				"background": "rgba(0,0,0,0)",
+				// 				"redDot": true
+				// 			}
+				// 		]
+				// 	}
+				// },
+				// #endif
+				"navigationBarTitleText": "个人中心"
+			}
+		},
+		{
+			"path": "pages/user/award",
+			"style": {
+				"navigationBarTitleText": "奖励明细",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/withdrawal",
+			"style": {
+				"navigationBarTitleText": "奖励提现"
+			}
+		},
+		{
+			"path": "pages/user/notice",
+			"style": {
+				"navigationBarTitleText": "通知"
+			}
+		},
+		{
+			"path": "pages/user/favorites",
+			"style": {
+				"navigationBarTitleText": "收藏夹"
+			}
+		}, {
+			"path": "pages/user/coupon",
+			"style": {
+				"navigationBarTitleText": "我的卡卷"
+			}
+		},
+		{
+			"path": "pages/user/scoreAccumulate",
+			"style": {
+				"navigationBarTitleText": "积分明细"
+			}
+		},
+		{
+			"path": "pages/store/storeList",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				"navigationBarTitleText": "门店列表"
+
+			}
+		},
+		{
+			"path": "pages/store/storeMessage",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				"navigationBarTitleText": "编辑门店"
+		
+			}
+		},
+		{
+			"path": "pages/store/storeDetail",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				"navigationBarTitleText": "门店详情"
+		
+			}
+		},
+		{
+			"path": "pages/store/apply",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				"navigationBarTitleText": "申请店长"
+		
+			}
+		},
+		{
+			"path": "pages/order/order",
+			"style": {
+				"navigationBarTitleText": "我的订单",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "pages/order/expressInfo",
+			"style": {
+				"navigationBarTitleText": "快递详情"
+			}
+		},
+		{
+			"path": "pages/order/orderDetail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "pages/order/evaluate",
+			"style": {
+				"navigationBarTitleText": "评论"
+			}
+		},
+		{
+			"path": "pages/order/orderRefund",
+			"style": {
+				"navigationBarTitleText": "申请退款"
+			}
+		},
+		{
+			"path": "pages/order/createOrder",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		}, {
+			"path": "pages/money/pay",
+			"style": {
+				"navigationBarTitleText": "支付"
+			}
+		},
+		{
+			"path": "pages/money/paySuccess",
+			"style": {
+				"navigationBarTitleText": "支付成功"
+			}
+		},
+		{
+			"path": "pages/money/wallet",
+			"style": {
+				"navigationBarTitleText": "我的钱包",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/money/account",
+			"style": {
+				"navigationBarTitleText": "提现账号"
+			}
+		},
+		{
+			"path": "pages/money/withdrawal",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/money/recharge",
+			"style": {
+				"navigationBarTitleText": "充值"
+			}
+		},
+		{
+			"path": "pages/category/category",
+			"style": {
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
+				"app-plus": {
+					"bounce": "none",
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "输入关键词搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
+						}
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "分类"
+			}
+		},
+		{
+			"path": "pages/redirect/redirect",
+			"style": {
+				"navigationBarTitleText": "微信登录跳转页面",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/user/shareQrCode",
+			"style": {
+				"navigationBarTitleText": "邀请好友"
+			}
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8"
+	},
+	"tabBar": {
+		"color": "#C0C4CC",
+		"selectedColor": "#FF4C4C",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/category/category",
+				"iconPath": "static/tabBar/tab-cate.png",
+				"selectedIconPath": "static/tabBar/tab-cate-current.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
+			},
+			{
+				"pagePath": "pages/user/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
+			}
+		]
+	}
 }
 }

+ 18 - 16
pages/index/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="container">
 	<view class="container">
 		<!-- 小程序头部兼容 -->
 		<!-- 小程序头部兼容 -->
-	
+
 		<view class="input-box flex" @click="clickSearch">
 		<view class="input-box flex" @click="clickSearch">
 			<view class=" input-content flex">
 			<view class=" input-content flex">
 				<view class="iconfont iconsearch"></view>
 				<view class="iconfont iconsearch"></view>
@@ -20,7 +20,7 @@
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 			</swiper>
 			</swiper>
 			<!-- 自定义swiper指示器 -->
 			<!-- 自定义swiper指示器 -->
-		<!-- 	<view class="swiper-dots">
+			<!-- 	<view class="swiper-dots">
 				<text class="num">{{ swiperCurrent + 1 }}</text>
 				<text class="num">{{ swiperCurrent + 1 }}</text>
 				<text class="sign">/</text>
 				<text class="sign">/</text>
 				<text class="num">{{ swiperLength }}</text>
 				<text class="num">{{ swiperLength }}</text>
@@ -32,7 +32,7 @@
 				<image src="/static/icon/c3.png"></image>
 				<image src="/static/icon/c3.png"></image>
 				<text>全部分类</text>
 				<text>全部分类</text>
 			</view>
 			</view>
-			<navigator url="/pages/product/groupBooking/index">
+			<navigator url="/pages/user/storeList">
 				<view class="cate-item">
 				<view class="cate-item">
 					<image src="/static/icon/c5.png"></image>
 					<image src="/static/icon/c5.png"></image>
 					<text>线下门店</text>
 					<text>线下门店</text>
@@ -60,18 +60,20 @@
 				<view class="">附近门店</view>
 				<view class="">附近门店</view>
 				<view class="title-b">门店好物随心购</view>
 				<view class="title-b">门店好物随心购</view>
 			</view>
 			</view>
-			<view class="store flex" v-for="item in 3">
-				<image src="" mode="" class="store-img"></image>
-				<view class="store-info">
-					<view class="store-name">鑫旺零售台州店</view>
-					<view class="store-detail">台州市椒江区市府大道120号</view>
-					<view class="store-tip">门店</view>
-					<view class="store-des">
-						<image src="" mode=""></image>
-						距离 15KM
+			<navigator url="/pages/store/storeDetail" v-for="item in 3">
+				<view class="store flex">
+					<image src="" mode="" class="store-img"></image>
+					<view class="store-info">
+						<view class="store-name">鑫旺零售台州店</view>
+						<view class="store-detail">台州市椒江区市府大道120号</view>
+						<view class="store-tip">门店</view>
+						<view class="store-des">
+							<image src="" mode=""></image>
+							距离 15KM
+						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-			</view>
+			</navigator>
 		</view>
 		</view>
 		<!-- 好货推荐 -->
 		<!-- 好货推荐 -->
 		<view class="store-wrapper">
 		<view class="store-wrapper">
@@ -377,7 +379,7 @@ export default {
 		navToTab(url) {
 		navToTab(url) {
 			uni.switchTab({
 			uni.switchTab({
 				url: url
 				url: url
-			})
+			});
 		},
 		},
 		//砍价商品推荐详情页
 		//砍价商品推荐详情页
 		navToDetailPages(item) {
 		navToDetailPages(item) {
@@ -693,7 +695,7 @@ export default {
 	position: absolute;
 	position: absolute;
 	width: 100%;
 	width: 100%;
 	padding: 25rpx;
 	padding: 25rpx;
-	background-color: rgba(0,0,0,0);
+	background-color: rgba(0, 0, 0, 0);
 	z-index: 999;
 	z-index: 999;
 	height: 44px;
 	height: 44px;
 	.iconsearch {
 	.iconsearch {
@@ -1240,7 +1242,7 @@ page {
 				font-size: 36rpx;
 				font-size: 36rpx;
 				font-family: PingFang SC;
 				font-family: PingFang SC;
 				font-weight: bold;
 				font-weight: bold;
-				color: #FF4C4C;
+				color: #ff4c4c;
 				line-height: 35rpx;
 				line-height: 35rpx;
 				height: 35rpx;
 				height: 35rpx;
 				.old-price {
 				.old-price {

+ 27 - 23
pages/order/createOrder.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
 	<view>
 	<view>
-		<view class="navbar">
+		<!-- <view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
+		</view> -->
 
 
 		<!-- 地址 -->
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
@@ -26,7 +26,7 @@
 
 
 			<image class="a-bg" :src="addressImg"></image>
 			<image class="a-bg" :src="addressImg"></image>
 		</navigator>
 		</navigator>
-		<navigator v-if="tabCurrentIndex == 1" url="/pages/address/shopList" class="address-section">
+		<!-- <navigator v-if="tabCurrentIndex == 1" url="/pages/address/shopList" class="address-section">
 			<view class="order-content" v-if="shopAddress.name">
 			<view class="order-content" v-if="shopAddress.name">
 				<text class="iconfont iconlocation"></text>
 				<text class="iconfont iconlocation"></text>
 				<view class="cen">
 				<view class="cen">
@@ -46,8 +46,11 @@
 			</view>
 			</view>
 
 
 			<image class="a-bg" :src="addressImg"></image>
 			<image class="a-bg" :src="addressImg"></image>
-		</navigator>
-
+		</navigator> -->
+		<!-- 选择安装位置 -->
+	<!-- 	<view class="">
+			选择安装地址
+		</view> -->
 		<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 		<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 			<!-- <view class="g-header b-b">
 			<!-- <view class="g-header b-b">
 				<image class="logo" :src="ls.productInfo.image"></image>
 				<image class="logo" :src="ls.productInfo.image"></image>
@@ -72,7 +75,7 @@
 		</view>
 		</view>
 
 
 		<!-- 优惠明细 -->
 		<!-- 优惠明细 -->
-		<view class="yt-list">
+		<!-- <view class="yt-list">
 			<view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
 			<view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
 				<view class="cell-icon">券</view>
 				<view class="cell-icon">券</view>
 				<text class="cell-tit clamp">优惠券</text>
 				<text class="cell-tit clamp">优惠券</text>
@@ -86,37 +89,38 @@
 				<text class="cell-tit clamp">商家促销</text>
 				<text class="cell-tit clamp">商家促销</text>
 				<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
 				<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
 			</view>
 			</view>
-		</view>
+		</view> -->
 		<!-- 金额明细 -->
 		<!-- 金额明细 -->
 		<view class="yt-list">
 		<view class="yt-list">
 			<!-- <view class="yt-list-cell b-b">
 			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
 			</view> -->
-			<view class="yt-list-cell b-b">
+			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
-			</view>
-			<view class="yt-list-cell b-b">
-				<text class="cell-tit clamp">运费</text>
-				<text class="cell-tip">{{ Postage }}</text>
-			</view>
-			<view class="yt-list-cell b-b">
+			</view> -->
+			
+			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">备注</text>
 				<text class="cell-tit clamp">备注</text>
 				<input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
 				<input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
-			</view>
+			</view> -->
 		</view>
 		</view>
 		<view class="yt-list">
 		<view class="yt-list">
 			<view class="yt-list-cell b-b">
 			<view class="yt-list-cell b-b">
-				<text class="cell-tit clamp">商品金额</text>
+				<text class="cell-tit clamp">商品总价</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
+			</view>
+			<view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">运费</text>
+				<text class="cell-tip">{{ Postage }}</text>
 			</view>
 			</view>
-			<view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
+			<!-- <view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
 				<text class="cell-tit clamp">积分抵扣</text>
 				<text class="cell-tit clamp">积分抵扣</text>
 				<text class="cell-tip">-¥{{ integralMoney }}</text>
 				<text class="cell-tip">-¥{{ integralMoney }}</text>
-			</view>
+			</view> -->
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
-				<text class="cell-tit clamp">VIP优惠</text>
+				<text class="cell-tit clamp">会员折扣</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -171,10 +175,10 @@ export default {
 					state: 0,
 					state: 0,
 					text: '快递配送'
 					text: '快递配送'
 				},
 				},
-				{
-					state: 1,
-					text: '到店自提'
-				}
+				// {
+				// 	state: 1,
+				// 	text: '到店自提'
+				// }
 			],
 			],
 			maskState: 0, //优惠券面板显示状态
 			maskState: 0, //优惠券面板显示状态
 			desc: '', //备注
 			desc: '', //备注

+ 214 - 167
pages/product/common/productBottom.vue

@@ -1,169 +1,216 @@
-<template>
-	<view class="page-bottom">
-		<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
-			<text class="iconfont iconhome"></text>
-			<text>首页</text>
-		</navigator>
-		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
-			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
-			<text>收藏</text>
-		</view>
-		<view class="action-btn-group">
-			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
-			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
-		</view>
-	</view>
-</template>
-
-<script>
-import { collectAdd, collectDel } from '@/api/product.js';
-export default {
-	props: {
-		many: {
-			default: 9
-		},
-		goodsObjact: {
-			default: function() {
-				return {};
-			}
-		},
-		goodsid:{
-			default: ''
-		}
-	},
-	data() {
-		return {};
-	},
-	methods: {
-		buy(type) {
-			this.$emit('specOPne',type);
-		},
-		//收藏
-		toFavorite(item) {
-			let obj = this;
-			item.userCollect = !item.userCollect;
-			if (!item.userCollect) {
-				collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功取消收藏',
-						type: 'top',
-						duration: 1500
-					});
-				});
-			} else {
-				collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功加入收藏',
-						type: 'top',
-						duration: 1500
-					});
-				});
-			}
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-/* 底部操作菜单 */
-.page-bottom {
-	position: fixed;
-	bottom: 0rpx;
-	z-index: 95;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	width: 750rpx;
-	height: 120rpx;
-	background-color: #ffffff;
+<template>
+	<view class="page-bottom">
+		<!-- 	<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
+			<text class="iconfont iconhome"></text>
+			<text>首页</text>
+		</navigator>
+		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
+			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
+			<text>收藏</text>
+		</view> -->
+		<!-- <view class="action-btn-group">
+			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
+			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
+		</view> -->
+		<view class="btm-btn">
+			<button type="primary" class="add-btn" @click="buy(2)">加入购物车</button>
+			<button type="primary" class="buy-btn" @click="buy(1)">立即购买</button>
+		</view>
+	</view>
+</template>
+
+<script>
+import { collectAdd, collectDel } from '@/api/product.js';
+export default {
+	props: {
+		many: {
+			default: 9
+		},
+		goodsObjact: {
+			default: function() {
+				return {};
+			}
+		},
+		goodsid: {
+			default: ''
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		buy(type) {
+			this.$emit('specOPne', type);
+		},
+		//收藏
+		toFavorite(item) {
+			let obj = this;
+			item.userCollect = !item.userCollect;
+			if (!item.userCollect) {
+				collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
+					uni.showToast({
+						title: '成功取消收藏',
+						type: 'top',
+						duration: 1500
+					});
+				});
+			} else {
+				collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
+					uni.showToast({
+						title: '成功加入收藏',
+						type: 'top',
+						duration: 1500
+					});
+				});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* 底部操作菜单 */
+.page-bottom {
+	position: fixed;
+	bottom: 0rpx;
+	z-index: 95;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 750rpx;
+	height: 120rpx;
+	background-color: #ffffff;
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx; */
-	.p-b-btn {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		font-size: $font-sm;
-		color: $font-color-base;
-		width: 96rpx;
-		height: 80rpx;
-		.iconfont {
-			font-size: 40rpx;
-			line-height: 48rpx;
-			color: $font-color-light;
-		}
-		&.active,
-		&.active .iconfont {
-			color: $uni-color-primary;
-		}
-		.iconlikefill {
-			font-size: 46rpx;
-		}
-		image {
-			width: 56rpx;
-			height: 58rpx;
-		}
-	}
-	.action-btn-group {
-		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
-		overflow: hidden;
-		margin-left: 20rpx;
-		position: relative;
-		&:after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			right: 50%;
-			transform: translateY(-50%);
-			height: 28rpx;
-			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
-		}
-		.action-btn {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 270rpx;
-			height: 100%;
-			font-size: $font-base;
-			padding: 0;
-			border-radius: 0;
-			background: transparent;
-			&.buy-now-btn {
-				background-color: #303e49;
-			}
-			&.add-cart-btn {
-				background-color: $base-color;
-			}
-		}
-	}
-}
-.p-b-btn {
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-	font-size: $font-sm;
-	color: $font-color-base;
-	width: 96rpx;
-	height: 80rpx;
-	.iconfont {
-		font-size: 40rpx;
-		line-height: 48rpx;
-		color: $font-color-light;
-	}
-	&.active,
-	&.active .iconfont {
-		color: $uni-color-primary;
-	}
-	.icon-fenxiang2 {
-		font-size: 42rpx;
-		transform: translateY(-2rpx);
-	}
-	.iconlikefill {
-		font-size: 46rpx;
-	}
-}
+	border-radius: 16rpx; */
+	.p-b-btn {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		font-size: $font-sm;
+		color: $font-color-base;
+		width: 96rpx;
+		height: 80rpx;
+		.iconfont {
+			font-size: 40rpx;
+			line-height: 48rpx;
+			color: $font-color-light;
+		}
+		&.active,
+		&.active .iconfont {
+			color: $uni-color-primary;
+		}
+		.iconlikefill {
+			font-size: 46rpx;
+		}
+		image {
+			width: 56rpx;
+			height: 58rpx;
+		}
+	}
+	.action-btn-group {
+		display: flex;
+		height: 76rpx;
+		border-radius: 100px;
+		overflow: hidden;
+		margin-left: 20rpx;
+		position: relative;
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			right: 50%;
+			transform: translateY(-50%);
+			height: 28rpx;
+			width: 0;
+			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		}
+		.action-btn {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			// width: 270rpx;
+			// height: 100%;
+			font-size: $font-base;
+			padding: 0;
+			border-radius: 0;
+			background: transparent;
+			width: 339rpx;
+			height: 90rpx;
+			&.buy-now-btn {
+				background-color: #303e49;
+			}
+			&.add-cart-btn {
+				background-color: #fff;
+				color: #ff4c4c;
+				border: #ff4c4c 1px solid;
+			}
+		}
+	}
+}
+.p-b-btn {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	font-size: $font-sm;
+	color: $font-color-base;
+	width: 96rpx;
+	height: 80rpx;
+	.iconfont {
+		font-size: 40rpx;
+		line-height: 48rpx;
+		color: $font-color-light;
+	}
+	&.active,
+	&.active .iconfont {
+		color: $uni-color-primary;
+	}
+	.icon-fenxiang2 {
+		font-size: 42rpx;
+		transform: translateY(-2rpx);
+	}
+	.iconlikefill {
+		font-size: 46rpx;
+	}
+}
+.btm-btn {
+	z-index: 2;
+	width: 750rpx;
+	height: 130rpx;
+	display: flex;
+	// justify-content: space-between;
+	justify-content: space-between;
+	// justify-content: space-between;
+	position: fixed;
+	padding: 20rpx;
+	bottom: 0;
+	background-color: #fff;
+	// z-index: 666;
+	.add-btn {
+		width: 339rpx;
+		height: 90rpx;
+		border: 1px solid #ff4c4c;
+		border-radius: 45rpx;
+		background-color: #fff;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #ff4c4c;
+		line-height: 90rpx;
+	}
+	.buy-btn {
+		width: 339rpx;
+		height: 90rpx;
+		background: #ff4c4c;
+		border-radius: 45rpx;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #ff4c4c;
+		line-height: 90rpx;
+		color: #fff;
+	}
+	.skill {
+		width: 699rpx;
+	}
+}
 </style>
 </style>

+ 35 - 26
pages/product/common/productContent.vue

@@ -1,27 +1,21 @@
 <template>
 <template>
 	<view class="introduce-section">
 	<view class="introduce-section">
-		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
-		<button open-type="share" class="shareDate">
-			<image class="share-img" src="../../../static/img/img57.png"></image>
-			好物推荐
-		</button>
-		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
-		<!-- <view class="progress-box">
-			<progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
-			<view class="number">剩余{{ goodsObjact.percent | parseIntTo }}%</view>
-		</view> -->
+		
+		<!-- 分享 -->
+		<button open-type="share" class="shareDate" style="border: none;">
+			<image class="share-img" src="../../../static/icon/share.png"></image>
+		</button>
+		<!-- 价格信息 -->
 		<view class="price-box">
 		<view class="price-box">
 			<text class="price-tip">¥</text>
 			<text class="price-tip">¥</text>
 			<view class="price">
 			<view class="price">
 				{{ goodsObjact.price }}
 				{{ goodsObjact.price }}
-				<text class="text">/份</text>
+				<!-- <text class="text">/份</text> -->
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 			</view>
 			</view>
-		</view>
-		<view class="price-green">
-			¥{{ goodsObjact.ot_price }}
-			<text>市场价</text>
-		</view>
+		</view>
+		<!-- 商品名称 -->
+		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -69,16 +63,19 @@ export default {
 			padding-left: 15rpx;
 			padding-left: 15rpx;
 		}
 		}
 	}
 	}
-	.shareDate {
-		position: absolute;
-		top: 25rpx;
-		right: 25rpx;
-		font-size: 26rpx;
-		color: #3d3f46;
-		border-radius: 15rpx;
-		background-color: #ffffff;
-		height: 60rpx;
-		line-height: 60rpx;
+	.shareDate {
+		position: absolute;
+		top: 25rpx;
+		right: 10rpx;
+		font-size: 26rpx;
+		color: #3d3f46;
+		border-radius: 15rpx;
+		background-color: #ffffff;
+		height: 60rpx;
+		line-height: 60rpx;
+		&::after {
+			border: none;
+		}
 	}
 	}
 	.share-img {
 	.share-img {
 		width: 30rpx;
 		width: 30rpx;
@@ -142,5 +139,17 @@ export default {
 		margin-left: 25rpx;
 		margin-left: 25rpx;
 		font-size: 24rpx;
 		font-size: 24rpx;
 	}
 	}
+}
+.share-wrapper {
+	width: 36rpx;
+	height: 36rpx;
+	position: absolute;
+	top: 27rpx;
+	right: 43rpx;
+	background-color: #fff;
+	image {
+		width: 100%;
+		height: 100%;
+	}
 }
 }
 </style>
 </style>

+ 705 - 611
pages/product/product.vue

@@ -1,612 +1,706 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 标题 -->
-		<product-content :goodsObjact="goodsObjact"></product-content>
-		<!-- 拼货时间及优惠 -->
-		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
-		<!-- 猜你喜欢 -->
-		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
-		<!-- 评价 -->
-		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
-		<!-- 规格信息 -->
-		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
-		<!-- 图文详情 -->
-		<content-text :description="description"></content-text>
-		<!-- 底部高度撑开 -->
-		<view class="contentBottomHeight"></view>
-		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
-		<!-- 规格-模态层弹窗 -->
-		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer attr-content" @click.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="actionImage"></image>
-					<view class="right">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { goodsDetail, cartAdd } from '@/api/product.js';
-import { mapState } from 'vuex';
-import store from '@/store/index.js';
-import { saveUrl } from '@/utils/loginUtils.js';
-// #ifdef H5
-import { weixindata } from '@/utils/wxAuthorized';
-// #endif
-// 头部轮播图
-import topSwiper from './common/topSwiper.vue';
-// 标题
-import productContent from './common/productContent.vue';
-// 到货时间及优惠
-import discounts from './common/discounts.vue';
-// 规格信息
-import freshDetail from './common/freshDetail.vue';
-// 图文详情
-import contentText from './common/contentText.vue';
-// 底部按钮
-import productBottom from './common/productBottom.vue';
-// 猜你喜欢
-import guessLike from './common/guessLike.vue';
-// 评价
-import estimate from './common/estimate.vue';
-export default {
-	components: {
-		guessLike,
-		topSwiper,
-		productContent,
-		discounts,
-		freshDetail,
-		contentText,
-		productBottom,
-		estimate
-	},
-	data() {
-		return {
-			goodsStore: 0, //选中库存
-			specList: [],
-			buys_show: true,
-			buys_shows: false,
-			specSelected: [], //选中的分类
-			specClass: 'none', //显示隐藏弹窗
-			many: 1, //1是单规格  2是多规格
-			reply: '', //评论
-			list: '', //商品详情的数据
-			type: 1, //默认支付方式add为
-			goodsType: 0,
-			goodsNumber: 1, //购买数量
-			goodsid: '', //商品id
-			description: '', //商品描述
-			goodsObjact: {
-				percent: 1
-			}, //保存商品数据
-			//图片循环
-			imgList: [],
-			// 对比对象
-			actionPrice: 0, //默认选中商品价格
-			actionImage: '', //默认选中图片
-			good_list: '', //猜你喜欢列表
-			goodsNumberMax: 0, //最大可购买数量
-			// 倒计时数据保存
-			seckillObj: {
-				stopTime: 0, //结束时间
-				stop: false, //是否结束
-				stopTimeH: 0, //小时
-				stopTimeM: 0, //分钟
-				stopTimeS: 0, //秒钟
-				stopTimeD: 0, //天
-				upTime: 0 //更新组件内部组件用
-			},
-			// 拼团数据保存
-			pink: {
-				id: '', //拼团编号
-				uid: '', //用户编号
-				people: '', //拼团人数
-				price: '', //拼团价格
-				stop_time: '', //拼团结束时间
-				nickname: '', //团长昵称
-				avatar: '', //团长头像
-				count: '', //拼团剩余人数
-				h: '', //时
-				i: '', //分
-				s: '' //秒
-			},
-			userInfo: ''
-		};
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	async onLoad(options) {
-		let obj = this;
-		obj.userInfo = uni.getStorageSync('userInfo');
-		//保存商品id
-		this.goodsid = options.id;
-		this.goodsType = options.type;
-		// 判断有无人邀请
-		if (options.spread) {
-			// 存储邀请人
-			uni.setStorageSync('spread', options.spread);
-		}
-		saveUrl();
-		this.goodsDetail();
-		// 注册邀请信息
-		// #ifdef H5
-		let bool = uni.getStorageSync('weichatBrowser') || '';
-		if (bool) {
-			weixindata();
-		}
-		// #endif
-	},
-	computed: {
-		...mapState(['weichatObj', 'baseURL', 'urlFile'])
-	},
-	// 分享
-	onShareAppMessage(options) {
-		// 设置菜单中的转发按钮触发转发事件时的转发内容
-		let pages = getCurrentPages(); //获取加载的页面
-		let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-		let url = currentPage.route; //当前页面url
-		let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-		let shareObj = {
-			title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
-			path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-			imageUrl: this.goodsObjact.image,
-			success: function(res) {
-				// 转发成功之后的回调
-				if (res.errMsg == 'shareAppMessage:ok') {
-				}
-			},
-			fail: function() {
-				// 转发失败之后的回调
-				if (res.errMsg == 'shareAppMessage:fail cancel') {
-					// 用户取消转发
-				} else if (res.errMsg == 'shareAppMessage:fail') {
-					// 转发失败,其中 detail message 为详细失败信息
-				}
-			}
-		};
-
-		return shareObj;
-	},
-	methods: {
-		//选择规格
-		selectSpec(item, arr, ind) {
-			arr.attr_value.forEach(function(e) {
-				e.check = false;
-			});
-			item.check = true;
-			let obj = this;
-			obj.specSelected[ind] = item.attr;
-			let str = obj.specSelected.join(',');
-			// 获取当前选中的对象
-			if (obj.productValue[str]) {
-				obj.buys_show = true;
-				obj.buys_shows = false;
-				obj.actionPrice = obj.productValue[str].price;
-				obj.goodsNumberMax = obj.productValue[str].stock;
-				obj.actionImage = obj.productValue[str].image;
-				obj.uniqueId = obj.productValue[str].unique;
-				obj.goodsStore = obj.productValue[str].stock;
-			} else {
-				(obj.buys_show = false), (obj.buys_shows = true);
-			}
-			if (obj.goodsStore == 0) {
-				obj.buys_show = false;
-				obj.buys_shows = true;
-			}
-			obj.specSelected[ind] = item.attr;
-		},
-		// 打開彈窗
-		specOPne(type=1) {
-			let obj = this;
-			obj.specClass = 'show';
-			obj.type = type
-		},
-		//规格弹窗开关
-		toggleSpec(str) {
-			if (this.specClass === 'show') {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			} else if (this.specClass === 'none') {
-				this.specClass = 'show';
-			}
-			// 保存当前购买类型
-			this.type = str;
-		},
-		//领取优惠券
-		Getcoupon() {
-			uni.navigateTo({
-				url: '/pages/coupon/getcoupon'
-			});
-		},
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		// 跳转页面
-		navTo(url) {
-			uni.navigateTo({
-				url: '/pages/product/reply?id=' + this.goodsid
-			});
-		},
-		//加入购物车
-		Addcar(item) {
-			let obj = this;
-			cartAdd({
-				cartNum: '1', //商品数量
-				uniqueId: '', //商品标签
-				new: 0, //商品是否新增加到购物车1为不加入0为加入
-				mer_id: '',
-				productId: item.id //商品编号
-			})
-				.then(function(e) {
-					uni.showToast({
-						title: '成功加入购物车',
-						type: 'top',
-						duration: 500,
-						icon: 'none'
-					});
-
-					obj.goodsDetail();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		goodsDetail() {
-			let obj = this;
-			// 获取普通商品信息
-			goodsDetail({}, this.goodsid).then(function({ data }) {
-				obj.list = data;
-				obj.good_list = data.good_list; //保存猜你喜欢列表
-				obj.reply = data.reply; //保存评论列表
-				let goods = data.storeInfo;
-				obj.goodsObjact = goods;
-				if (obj.goodsObjact.description != null) {
-					obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-				} //小程序商品详情图超出屏幕问题
-				obj.imgList = goods.slider_image; //保存轮播图
-				obj.specList = data.productAttr; //保存分类列表
-				if (Array.isArray(data.productValue) != true) {
-					obj.many = 2;
-					obj.specList = data.productAttr; //保存产品属性
-					obj.productValue = data.productValue; //保存属性值
-					obj.specSelected = []; //初始化默认选择对象
-					for (let i = 0; i < obj.specList.length; i++) {
-						// 设置默认数据
-						let attrValue = obj.specList[i].attr_value[0];
-						attrValue.check = true;
-						obj.specSelected.push(attrValue.attr);
-					}
-					let str = obj.specSelected.join(',');
-					console.log(str, 'str');
-					// 设置默认值
-					obj.actionPrice = obj.productValue[str].price;
-					obj.goodsNumberMax = obj.productValue[str].stock;
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodsStore = obj.productValue[str].quota;
-				} else {
-					obj.many = 1;
-				}
-				obj.productValue = data.productValue; //保存分类查询数据
-				obj.actionPrice = goods.price; //保存默认选中商品价格
-				obj.actionImage = goods.image_base; //保存默认选中商品图片
-				obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
-				obj.shopId = data.mer_id; //保存商店id
-			});
-		},
-		// 立即购买
-		buy() {
-			let obj = this;
-			// 创建传值对象
-			let data = {
-					cartNum: obj.goodsNumber, //商品数量
-					new: 1,
-					productId: obj.goodsid,//商品编号
-					uniqueId:obj.uniqueId
-				};
-			
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			cartAdd(data)
-				.then(function(e) {
-					let da = e.data;
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
-						});
-					}
-					if (obj.type == 2) {
-						uni.showToast({
-							title: '成功加入购物车',
-							type: 'top',
-							duration: 2000,
-							icon: 'none'
-						});
-						obj.goodsDetail();
-					}
-					obj.toggleSpec()
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 阻止触发上级事件
-		stopPrevent() {}
-	}
-};
-</script>
-
-<style lang="scss">
-/*  弹出层 */
-.popup {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	z-index: 99;
-	&.show {
-		display: block;
-
-		.mask {
-			animation: showPopup 0.2s linear both;
-		}
-
-		.layer {
-			animation: showLayer 0.2s linear both;
-		}
-	}
-
-	&.hide {
-		.mask {
-			animation: hidePopup 0.2s linear both;
-		}
-
-		.layer {
-			animation: hideLayer 0.2s linear both;
-		}
-	}
-
-	&.none {
-		display: none;
-	}
-
-	.mask {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		min-height: 35vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-
-		.btn {
-			height: 66rpx;
-			line-height: 66rpx;
-			border-radius: 100rpx;
-			background: $uni-color-primary;
-			font-size: $font-base + 2rpx;
-			color: #fff;
-			margin: 30rpx auto 20rpx;
-		}
-	}
-
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-
-		100% {
-			opacity: 1;
-		}
-	}
-
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0;
-		}
-	}
-
-	@keyframes showLayer {
-		0% {
-			transform: translateY(120%);
-		}
-
-		100% {
-			transform: translateY(0%);
-		}
-	}
-
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(0);
-		}
-
-		100% {
-			transform: translateY(120%);
-		}
-	}
-}
-/* 规格选择弹窗 */
-.attr-content {
-	padding: 25rpx 30rpx;
-
-	.a-t {
-		display: flex;
-
-		image {
-			width: 170rpx;
-			height: 170rpx;
-			flex-shrink: 0;
-			border-radius: 8rpx;
-		}
-
-		.right {
-			display: flex;
-			flex-direction: column;
-			padding-left: 24rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-base;
-			line-height: 42rpx;
-			width: 75%;
-
-			.price {
-				font-size: $font-lg;
-				color: $uni-color-primary;
-				margin: 10rpx 0rpx;
-			}
-
-			.name {
-				font-size: 32rpx;
-				color: $font-color-dark;
-				height: 50rpx;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				display: block;
-			}
-
-			.selected-text {
-				margin-right: 10rpx;
-			}
-		}
-	}
-
-	.attr-list {
-		display: flex;
-		flex-direction: column;
-		font-size: $font-base + 2rpx;
-		color: $font-color-base;
-		padding-top: 30rpx;
-		padding-left: 10rpx;
-	}
-
-	.item-list {
-		padding: 20rpx 0 0;
-		display: flex;
-		flex-wrap: wrap;
-
-		text {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			margin-right: 20rpx;
-			margin-bottom: 20rpx;
-			border-radius: 100rpx;
-			min-width: 60rpx;
-			height: 60rpx;
-			padding: 0 20rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-		}
-
-		.selected {
-			background: #ddffdf;
-			color: $uni-color-primary;
-		}
-	}
-}
-
-//默认商品底部高度
-.goodsBottom {
-	height: 160rpx;
-}
-page {
-	background: #f0f0f0;
-}
-//秒杀、拼团底部高度
-.contentBottomHeight {
-	height: 110rpx;
-}
-//默认商品底部高度
-.goodsBottom {
-	height: 160rpx;
-}
-/deep/ .iconenter {
-	font-size: $font-base + 2rpx;
-	color: #888;
-}
-/deep/ .con_image {
-	width: 130rpx;
-	height: 130rpx;
-	display: inline-block;
-	padding: 15rpx;
-	image {
-		width: 100%;
-		height: 100%;
-	}
-}
-/* 商品详情中限制图片大小 */
-/deep/ .rich-img {
-	width: 100% !important;
-	height: auto;
-}
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 标题 -->
+		<product-content :goodsObjact="goodsObjact"></product-content>
+		<!-- 拼货时间及优惠 -->
+		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
+		<!-- 猜你喜欢 -->
+		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
+		<!-- 评价 -->
+		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
+		<!-- 规格信息 -->
+		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
+		<!-- 规格-模态层弹窗 -->
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer attr-content" @click.stop="stopPrevent">
+				<view class="a-t">
+					<image :src="actionImage"></image>
+					<view class="right">
+						<text class="name clamp">{{ goodsObjact.store_name }}</text>
+						<view class="price"><text>¥</text>{{ actionPrice * goodsNumber }}</view>
+						<image src="../../static/icon/del.png" mode="" class="right-img" @click="close()"></image>
+						<!-- <text class="stock">库存:{{ goodsStore }}件</text> -->
+						<!-- <view class="selected" v-if="specList != ''">
+							已选:
+							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
+						</view> -->
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>选择{{ item.attr_name }}分类</text>
+					<view class="item-list">
+						<text
+							v-for="(childItem, childIndex) in item.attr_value"
+							:key="childIndex"
+							class="tit"
+							:class="{ selected: childItem.check }"
+							@click="selectSpec(childItem, item, index)"
+						>
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<view class="mun-box">
+					<text>购买数量</text>
+					<view class="num">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
+					</view>
+				</view>
+				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
+				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { goodsDetail, cartAdd, seckillGoods } from '@/api/product.js';
+import { mapState } from 'vuex';
+import store from '@/store/index.js';
+import { saveUrl } from '@/utils/loginUtils.js';
+// #ifdef H5
+import { weixindata } from '@/utils/wxAuthorized';
+// #endif
+// 头部轮播图
+import topSwiper from './common/topSwiper.vue';
+// 标题
+import productContent from './common/productContent.vue';
+// 到货时间及优惠
+import discounts from './common/discounts.vue';
+// 规格信息
+import freshDetail from './common/freshDetail.vue';
+// 图文详情
+import contentText from './common/contentText.vue';
+// 底部按钮
+import productBottom from './common/productBottom.vue';
+// 猜你喜欢
+import guessLike from './common/guessLike.vue';
+// 评价
+import estimate from './common/estimate.vue';
+//增减数量
+import uniNumberBox from '@/components/uni-number-box.vue'
+export default {
+	components: {
+		guessLike,
+		topSwiper,
+		productContent,
+		discounts,
+		freshDetail,
+		contentText,
+		productBottom,
+		estimate,
+		uniNumberBox
+	},
+	data() {
+		return {
+			isShare: false,
+			goodsStore: 0, //选中库存
+			specList: [],
+			buys_show: true,
+			buys_shows: false,
+			specSelected: [], //选中的分类
+			specClass: 'none', //显示隐藏弹窗
+			many: 1, //1是单规格  2是多规格
+			reply: '', //评论
+			list: '', //商品详情的数据
+			type: 1, //默认支付方式add为
+			goodsType: 0,
+			goodsNumber: 1, //购买数量
+			goodsid: '', //商品id
+			description: '', //商品描述
+			goodsObjact: {
+				percent: 1
+			}, //保存商品数据
+			//图片循环
+			imgList: [],
+			// 对比对象
+			actionPrice: 0, //默认选中商品价格
+			actionImage: '', //默认选中图片
+			good_list: '', //猜你喜欢列表
+			goodsNumberMax: 0, //最大可购买数量
+			// 倒计时数据保存
+			seckillObj: {
+				stopTime: 0, //结束时间
+				stop: false, //是否结束
+				stopTimeH: 0, //小时
+				stopTimeM: 0, //分钟
+				stopTimeS: 0, //秒钟
+				stopTimeD: 0, //天
+				upTime: 0 //更新组件内部组件用
+			},
+			// 拼团数据保存
+			pink: {
+				id: '', //拼团编号
+				uid: '', //用户编号
+				people: '', //拼团人数
+				price: '', //拼团价格
+				stop_time: '', //拼团结束时间
+				nickname: '', //团长昵称
+				avatar: '', //团长头像
+				count: '', //拼团剩余人数
+				h: '', //时
+				i: '', //分
+				s: '' //秒
+			},
+			userInfo: ''
+		};
+	},
+	filters: {
+		parseIntTo(percent) {
+			percent = +percent * 100;
+			if (percent % 1 === 0) {
+				return percent;
+			} else {
+				percent = percent.toFixed(1);
+				return percent;
+			}
+		}
+	},
+	async onLoad(options) {
+		let obj = this;
+		obj.userInfo = uni.getStorageSync('userInfo');
+		//保存商品id
+		this.goodsid = options.id;
+		if (options.type) {
+			this.goodsType = options.type;
+		}
+		// 判断有无人邀请
+		if (options.spread) {
+			// 存储邀请人
+			uni.setStorageSync('spread', options.spread);
+		}
+		saveUrl();
+		this.goodsDetail();
+		// 注册邀请信息
+		// #ifdef H5
+		let bool = uni.getStorageSync('weichatBrowser') || '';
+		if (bool) {
+			weixindata();
+		}
+		// #endif
+	},
+	computed: {
+		...mapState(['weichatObj', 'baseURL', 'urlFile'])
+	},
+	// 分享
+	onShareAppMessage(options) {
+		// 设置菜单中的转发按钮触发转发事件时的转发内容
+		let pages = getCurrentPages(); //获取加载的页面
+		let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+		let url = currentPage.route; //当前页面url
+		let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+		let shareObj = {
+			title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
+			path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+			imageUrl: this.goodsObjact.image,
+			success: function(res) {
+				// 转发成功之后的回调
+				if (res.errMsg == 'shareAppMessage:ok') {
+				}
+			},
+			fail: function() {
+				// 转发失败之后的回调
+				if (res.errMsg == 'shareAppMessage:fail cancel') {
+					// 用户取消转发
+				} else if (res.errMsg == 'shareAppMessage:fail') {
+					// 转发失败,其中 detail message 为详细失败信息
+				}
+			}
+		};
+
+		return shareObj;
+	},
+	methods: {
+		//选择数量
+		numberChange(e) {
+			console.log(e)
+			this.goodsNumber = e.number
+		},
+		close() {
+			this.specClass = 'none'
+		},
+		//选择规格
+		selectSpec(item, arr, ind) {
+			arr.attr_value.forEach(function(e) {
+				e.check = false;
+			});
+			item.check = true;
+			let obj = this;
+			obj.specSelected[ind] = item.attr;
+			let str = obj.specSelected.join(',');
+			// 获取当前选中的对象
+			if (obj.productValue[str]) {
+				obj.buys_show = true;
+				obj.buys_shows = false;
+				obj.actionPrice = obj.productValue[str].price;
+				obj.goodsNumberMax = obj.productValue[str].stock;
+				obj.actionImage = obj.productValue[str].image;
+				obj.uniqueId = obj.productValue[str].unique;
+				obj.goodsStore = obj.productValue[str].stock;
+			} else {
+				(obj.buys_show = false), (obj.buys_shows = true);
+			}
+			if (obj.goodsStore == 0) {
+				obj.buys_show = false;
+				obj.buys_shows = true;
+			}
+			obj.specSelected[ind] = item.attr;
+		},
+		// 打開彈窗
+		specOPne(type = 1) {
+			let obj = this;
+			obj.specClass = 'show';
+			obj.type = type;
+		},
+		//规格弹窗开关
+		toggleSpec(str) {
+			if (this.specClass === 'show') {
+				this.specClass = 'hide';
+				setTimeout(() => {
+					this.specClass = 'none';
+				}, 250);
+			} else if (this.specClass === 'none') {
+				this.specClass = 'show';
+			}
+			// 保存当前购买类型
+			this.type = str;
+		},
+		//领取优惠券
+		Getcoupon() {
+			uni.navigateTo({
+				url: '/pages/coupon/getcoupon'
+			});
+		},
+		//详情页
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		},
+		// 跳转页面
+		navTo(url) {
+			uni.navigateTo({
+				url: '/pages/product/reply?id=' + this.goodsid
+			});
+		},
+		//加入购物车
+		Addcar(item) {
+			let obj = this;
+			cartAdd({
+				cartNum: '1', //商品数量
+				uniqueId: '', //商品标签
+				new: 0, //商品是否新增加到购物车1为不加入0为加入
+				mer_id: '',
+				productId: item.id //商品编号
+			})
+				.then(function(e) {
+					uni.showToast({
+						title: '成功加入购物车',
+						type: 'top',
+						duration: 500,
+						icon: 'none'
+					});
+
+					obj.goodsDetail();
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		goodsDetail() {
+			let obj = this;
+			// 获取普通商品信息
+			if (obj.goodsType == 0) {
+				goodsDetail({}, this.goodsid).then(function({ data }) {
+					obj.list = data;
+					console.log(obj.list,'普通商品数据')
+					obj.good_list = data.good_list; //保存猜你喜欢列表
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.slider_image; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					if (Array.isArray(data.productValue) != true) {
+						obj.many = 2;
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str');
+						// 设置默认值
+						obj.actionPrice = obj.productValue[str].price;
+						obj.goodsNumberMax = obj.productValue[str].stock;
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodsStore = obj.productValue[str].stock;
+					} else {
+						obj.many = 1;
+					}
+					obj.productValue = data.productValue; //保存分类查询数据
+					obj.actionPrice = goods.price; //保存默认选中商品价格
+					obj.actionImage = goods.image_base; //保存默认选中商品图片
+					obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+					obj.shopId = data.mer_id; //保存商店id
+				});
+			}
+			// 获取秒杀商品信息
+			if (obj.goodsType == 1) {
+				seckillGoods({}, this.goodsid).then(function({ data }) {
+					obj.list = data;
+					console.log(obj.list, '秒杀商品数据++++++++++');
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsNumberMax = goods.num;
+					console.log(obj.seckillObj, '数据');
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.images; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					if (Array.isArray(data.productValue) != true) {
+						console.log('多规格+++++++++++++');
+						obj.many = 2;
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str');
+						// 设置默认值
+						obj.actionPrice = obj.productValue[str].price;
+						// obj.goodsNumberMax = obj.productValue[str].quota;
+						// console.log(obj.goodsNumberMax,'obj.goodsNumberMax++++++++++++')
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodsStore = obj.productValue[str].stock;
+					} else {
+						console.log('单规格+++++++++++++');
+						obj.many = 1;
+						obj.productValue = data.productValue; //保存分类查询数据
+						obj.actionPrice = goods.price; //保存默认选中商品价格
+						obj.actionImage = goods.image_base; //保存默认选中商品图片
+						// obj.goodsNumberMax = goods.quota; //保存默认选中最大可购买商品数量
+						console.log(obj.goodsNumberMax, 'obj.goodsNumberMax---------------');
+						obj.shopId = data.mer_id; //保存商店id
+					}
+				});
+			}
+		},
+		// 立即购买
+		buy() {
+			let obj = this;
+			// 创建传值对象
+			let data = {
+				cartNum: obj.goodsNumber, //商品数量
+				new: 1,
+				productId: obj.goodsid, //商品编号
+				uniqueId: obj.uniqueId
+			};
+
+			if (obj.type == 2) {
+				data.new = 0;
+			}
+			cartAdd(data)
+				.then(function(e) {
+					let da = e.data;
+					if (obj.type == 1) {
+						// 跳转到支付页
+						uni.navigateTo({
+							url: '/pages/order/createOrder?id=' + da.cartId
+						});
+					}
+					if (obj.type == 2) {
+						uni.showToast({
+							title: '成功加入购物车',
+							type: 'top',
+							duration: 2000,
+							icon: 'none'
+						});
+						obj.goodsDetail();
+					}
+					obj.toggleSpec();
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 阻止触发上级事件
+		stopPrevent() {}
+	}
+};
+</script>
+
+<style lang="scss">
+/*  弹出层 */
+.popup {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	z-index: 99;
+	&.show {
+		display: block;
+
+		.mask {
+			animation: showPopup 0.2s linear both;
+		}
+
+		.layer {
+			animation: showLayer 0.2s linear both;
+		}
+	}
+
+	&.hide {
+		.mask {
+			animation: hidePopup 0.2s linear both;
+		}
+
+		.layer {
+			animation: hideLayer 0.2s linear both;
+		}
+	}
+
+	&.none {
+		display: none;
+	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 1;
+		background-color: rgba(0, 0, 0, 0.4);
+	}
+
+	.layer {
+		position: fixed;
+		z-index: 99;
+		bottom: 0;
+		width: 100%;
+		min-height: 20vh;
+		border-radius: 10rpx 10rpx 0 0;
+		background-color: #fff;
+
+		.btn {
+			height: 66rpx;
+			line-height: 66rpx;
+			border-radius: 100rpx;
+			background: $uni-color-primary;
+			font-size: $font-base + 2rpx;
+			color: #fff;
+			margin: 30rpx auto 20rpx;
+		}
+	}
+
+	@keyframes showPopup {
+		0% {
+			opacity: 0;
+		}
+
+		100% {
+			opacity: 1;
+		}
+	}
+
+	@keyframes hidePopup {
+		0% {
+			opacity: 1;
+		}
+
+		100% {
+			opacity: 0;
+		}
+	}
+
+	@keyframes showLayer {
+		0% {
+			transform: translateY(120%);
+		}
+
+		100% {
+			transform: translateY(0%);
+		}
+	}
+
+	@keyframes hideLayer {
+		0% {
+			transform: translateY(0);
+		}
+
+		100% {
+			transform: translateY(120%);
+		}
+	}
+}
+/* 规格选择弹窗 */
+.attr-content {
+	padding: 25rpx 30rpx;
+
+	.a-t {
+		display: flex;
+
+		image {
+			width: 170rpx;
+			height: 170rpx;
+			flex-shrink: 0;
+			border-radius: 8rpx;
+		}
+
+		.right {
+			display: flex;
+			flex-direction: column;
+			padding-left: 24rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-base;
+			line-height: 42rpx;
+			width: 75%;
+			position: relative;
+			.right-img {
+				width: 37rpx;
+				height: 37rpx;
+				position: absolute;
+				right: 0;
+				top: 20rpx;
+				// background-color: red;
+			}
+			.price {
+				position: absolute;
+				bottom: 0;
+				font-size: $font-lg;
+				color: $uni-color-primary;
+				margin: 10rpx 0rpx;
+				font-size: 60rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #EF041F;
+				text {
+					font-size: 30rpx;
+				}
+			}
+
+			.name {
+				width: 350rpx;
+				font-size: 32rpx;
+				color: $font-color-dark;
+				height: 50rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				display: block;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #1D2023;
+			}
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+	}
+
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: $font-base + 2rpx;
+		color: $font-color-base;
+		padding-top: 30rpx;
+		padding-left: 10rpx;
+	}
+
+	.item-list {
+		padding: 20rpx 0 0;
+		display: flex;
+		flex-wrap: wrap;
+
+		text {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #eee;
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			border-radius: 10rpx;
+			min-width: 60rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+		}
+
+		.selected {
+			background: #fceff1;
+			color: #f35768;
+			border: 1px solid #f35768;
+		}
+	}
+}
+
+//默认商品底部高度
+.goodsBottom {
+	height: 160rpx;
+}
+page {
+	background: #f0f0f0;
+}
+//秒杀、拼团底部高度
+.contentBottomHeight {
+	height: 130rpx;
+}
+//默认商品底部高度
+.goodsBottom {
+	height: 160rpx;
+}
+/deep/ .iconenter {
+	font-size: $font-base + 2rpx;
+	color: #888;
+}
+/deep/ .con_image {
+	width: 130rpx;
+	height: 130rpx;
+	display: inline-block;
+	padding: 15rpx;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+/* 商品详情中限制图片大小 */
+/deep/ .rich-img {
+	width: 100% !important;
+	height: auto;
+}
+.mun-box {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
 </style>
 </style>

+ 260 - 83
pages/set/userinfo.vue

@@ -1,93 +1,270 @@
 <template>
 <template>
-	<view class="content">
-		<view class="row b-b">
-			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="name" placeholder="修改昵称" placeholder-class="placeholder" />
+<!-- 	<view class="container">
+		<uni-list>
+		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
+			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
+		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
+		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
+		</uni-list>
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
+			</uni-list-item>
+		</uni-list>
+		
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="清除缓存" ></uni-list-item>
+		    <uni-list-item title="检查更新" >
+				<template slot="right">
+					当前版本 1.0.3
+				</template>
+			</uni-list-item>
+		</uni-list>
+		<view class="list-cell log-out-btn" @click="toLogout">
+			<text class="cell-tit">退出登录</text>
 		</view>
 		</view>
-		<button class="add-btn" @click="confirm">提交</button>
-	</view>
+	</view> -->
+  <view class="container">
+  	<view class="row b-b flex jg">
+  		<text class="tit">头像</text>
+  		<image :src="userInfo.avatar" @click.stop="imgsub"></image>
+  	</view>
+  	<view class="row b-b flex">
+  		<text class="tit">昵称</text>
+  		<input class="input" v-model="userInfo.nickname" type="text" placeholder-class="placeholder" />
+  	</view>
+  	<view class="row b-b flex">
+  		<text class="tit">ID</text>
+  		<input class="input" v-model="userInfo.uid" type="text" disabled="true" placeholder-class="placeholder" />
+  	</view>
+  	<view class="row b-b flex">
+  		<text class="tit">用户账号</text>
+  		<input class="input" v-model="userInfo.account || userInfo.phone" type="number" disabled="true" placeholder-class="placeholder" />
+  	</view>
+  	<view class="submit-box flex" >
+  		<view class="submit" @click="edit">确认修改</view>
+  		<!-- <view class="submit" @click="toLogout">退出登录</view> -->
+  	</view>
+  	
+  </view>
 </template>
 </template>
 
 
 <script>
 <script>
-import { mapState } from 'vuex';
-import { userEdit } from '@/api/set.js';
-export default {
-	data() {
-		return {
-			name: ''
-		};
-	},
+	// import uniList from "@/components/uni-list/uni-list.vue"
+	// import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
+	// import { logout } from '@/api/set.js';
+	// import {  
+	//     mapMutations  
+	// } from 'vuex';
+	// export default {
+	// 	components: {
+	// 		uniList,uniListItem
+	// 	},
+	// 	data() {
+	// 		return {
+				
+	// 		};
+	// 	},
+	// 	methods:{
+	// 		...mapMutations('user',['logout']),
+	// 		navTo(url){
+	// 			uni.navigateTo({
+	// 				url:url
+	// 			})
+	// 		},
+	// 		//退出登录
+	// 		toLogout(){
+	// 			let obj = this;
+	// 			uni.showModal({
+	// 			    content: '确定要退出登录么',
+	// 			    success: (e)=>{
+	// 			    	if(e.confirm){
+	// 						logout({}).then((e) => {
+	// 							uni.navigateBack();
+	// 						}).catch((e) => {
+	// 							console.log(e);
+	// 						})
+	// 			    		obj.logout();
+	// 			    	}
+	// 			    }
+	// 			});
+	// 		},
+	// 		//switch切换触发方法
+	// 		switchChange(e){
+	// 			console.log(e);
+	// 			let statusTip = e.value ? '打开': '关闭';
+	// 			this.$api.msg(`${statusTip}消息推送`);
+	// 		},
 
 
-	computed: {
-		...mapState('user', ['userInfo'])
-	},
-	onShow(option) {
-		this.name = this.userInfo.nickname + '';
-	},
-	methods: {
-		switchChange(e) {
-			this.addressData.default = e.value;
-		},
-		confirm() {
-			userEdit({ nickname: this.name, avatar: this.userInfo.avatar })
-				.then(e => {
-					this.$api.msg('修改成功');
-					setTimeout(()=> {
-						uni.switchTab({
-							url:'/pages/user/user'
-						});
-					}, 1000);
-					console.log(e);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		}
-	}
-};
-</script>
+	// 	}
+	// }
+  import uniList from '@/components/uni-list/uni-list.vue';
+  import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+  import { mapState, mapMutations } from 'vuex';
+  import { logout } from '@/api/set.js';
 
 
-<style lang="scss">
-page {
-	background: $page-color-base;
-	padding-top: 16upx;
-}
-
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
+  import {
+  		uploads,edit,upload
+  	} from '@/api/user.js';
+  export default {
+  	components: {
+  		uniList,
+  		uniListItem
+  	},
+  	data() {
+  		return {
+  			// nickName:'李淡淡',
+  			// id:'HFBNXISN',
+  			// account:'13745262356',
+  			userInfo:{},
+			pics:[]
+  		};
+  	},
+  	onLoad() {
+  		this.userInfo = uni.getStorageSync('userInfo') || '';
+      console.log(this.userInfo)
+  	},
+  	methods: {
+  		...mapMutations('user',['logout']),
+  		//退出登录
+  		toLogout() {
+  			let obj = this;
+  			uni.showModal({
+  				content: '确定要退出登录么',
+  				success: e => {
+  					if (e.confirm) {
+  						logout({}).then(e => {
+  							obj.logout();
+  							uni.navigateTo({
+  								url:'/pages/public/login'
+  							})
+  						})
+  						.catch(e => {
+  							console.log(e);
+  						});
+  					}
+  				}
+  			});
+  		},
+  		imgsub() {
+			let obj = this
+  	// 		console.log('上传头像')
+			// this.$util.uploadImageOne('upload/image', function(res) {
+			// 	console.log('------',res);
+			// 	// this.pics.push(res.data.pathreplace(/http:\/\/mer.crmeb.net/,'http://zccy.liuniu946.com'));
+			// 	obj.userInfo.avatar = res.data.path.replace(/http:\/\/mer.crmeb.net/,'http://zccy.frp.liuniu946.com')
+			// 	// obj.$set(this, 'pics', this.pics);
+			// 	// obj.$set(this, 'extract_pic', this.pics[0])
+			// });
+  			// uploads({
+  			// 	filename: ''
+  			// }).then(data => {
+  			// 	console.log("data",data);
+  			// 	this.userInfo.avatar = data[0].url;
+  			// })
+			upload({
+				filename: ''
+			}).then(res => {
+				console.log(res[0].url)
+				obj.userInfo.avatar = res[0].url
+				// console.log(obj.userInfo.avatar)
+			});
+  		},
+  		edit() {
+  			const that = this;
+			uni.showLoading({
+				title: '提交中...',
+				mask:true
+			})
+  			edit({
+  				avatar: this.userInfo.avatar,
+  				nickname: this.userInfo.nickname
+  			}).then( e =>{
+				uni.hideLoading()
+  				that.$api.msg('修改成功');
+  				setTimeout(()=> {
+  					uni.switchTab({
+  						url:'/pages/user/user'
+  					});
+  				}, 1000);
+  			}).catch(e =>{
+  				console.log(e);
+  				that.$api.msg('修改失败');
+  			})
+  		}
+  	}
+  };
+</script>
 
 
-	.tit {
-		flex-shrink: 0;
-		width: 120upx;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30upx;
-		color: $font-color-dark;
+<style lang='scss'>
+	/* page{
+		background: $page-color-base;
 	}
 	}
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
-	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690upx;
-	height: 80upx;
-	margin: 60upx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	} */
+  page {
+    background-color: #f3f3f3;
+  	min-height: 100%;
+  	.container{
+  		height: 100%;
+  		
+  	}
+  }
+  .row {
+    background-color: #fff;
+  	padding: 42rpx 25rpx;
+  	font-size: 30rpx;
+  	color: #333333;
+  	image{
+  		width: 80rpx;
+  		height: 80rpx;
+  		border-radius: 50%;
+  	}
+  	.input {
+  		text-align: right;
+  		color: #333333;
+  	}
+  }
+  .submit-box{
+  		 padding-top: 157rpx;
+  		.submit{
+  			margin: 40rpx auto;
+  			width: 560rpx;
+  			background-color: #901b21;
+  			color: #FFFFFF;
+  			text-align: center;
+  			padding:26rpx 0rpx;
+  			border-radius: 50rpx;
+  		}
+  	}
+    .jg {
+      margin-bottom: 20rpx;
+    }
 </style>
 </style>

+ 199 - 0
pages/store/apply.vue

@@ -0,0 +1,199 @@
+<template>
+	<view class="wrapper">
+		<template v-if="isStep == 1">
+			<view class="" style="height: 135rpx;"></view>
+			<view class="top"></view>
+			<view class="item"><view class="item-top">特权一</view></view>
+			<view class="item"><view class="item-top">特权一</view></view>
+			<view class="item"><view class="item-top">特权一</view></view>
+			<view class="btn" @click="changeStep">立即申请成为店长</view>
+		</template>
+		<template v-if="isStep == 2">
+			<view class="tab-wrapper">
+				<view class="tab-item">
+					<view class="itemx">
+						<view class="item-tit">姓名:</view>
+						<input type="text" v-model="name" />
+					</view>
+					<view class="itemx">
+						<view class="item-tit">推荐人编号:</view>
+						<input type="text" v-model="name" />
+					</view>
+					<view class="itemx">
+						<view class="item-tit">联系方式:</view>
+						<input type="text" v-model="name" />
+					</view>
+					<view class="itemx">
+						<view class="item-tit">验证码:</view>
+						<input type="text" v-model="name" />
+					</view>
+				</view>
+			</view>
+			<view class="up-wrapper">
+				身份证正反面
+				<view class="imgs">
+					<view class="imgs-item">
+						<image :src="sfzz" mode="" v-if="sfzz" @click.stop="upImg(1)"></image>
+						<image src="../../static/img/add.png" mode="" v-if="!sfzz" @click.stop="upImg(1)"></image>
+					</view>
+					<view class="imgs-item">
+						<image :src="sfzf" mode="" v-if="sfzf" @click.stop="upImg(2)"></image>
+						<image src="../../static/img/add.png" mode="" v-if="!sfzf" @click.stop="upImg(2)"></image>
+					</view>
+				</view>
+			</view>
+			<view class="up-wrapper">
+				营业执照
+				<view class="imgs">
+					<view class="imgs-item">
+						<image :src="sfzz" mode="" v-if="sfzz" @click.stop="upImg(1)"></image>
+						<image src="../../static/img/add.png" mode="" v-if="!sfzz" @click.stop="upImg(1)"></image>
+					</view>
+					<view class="imgs-item">
+						<image :src="sfzf" mode="" v-if="sfzf" @click.stop="upImg(2)"></image>
+						<image src="../../static/img/add.png" mode="" v-if="!sfzf" @click.stop="upImg(2)"></image>
+					</view>
+				</view>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+import { upload } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			isStep: 1,
+			name: '',
+			speed_id: '',
+			phone: '',
+			code: '',
+			sfzz: '', //身份证正面
+			sfzf: '' //身份证反面
+		};
+	},
+	methods: {
+		changeStep() {
+			this.isStep = 2;
+		},
+		upImg(index) {
+			let obj = this;
+			upload({
+				filename: ''
+			}).then(res => {
+				console.log(res[0].url);
+				if (index == 1) {
+					obj.sfzz = res[0].url;
+				}
+				if( index == 2) {
+					obj.sfzf = res[0].url
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.wrapper {
+	height: 100%;
+}
+.top {
+	margin: 0 auto 49rpx;
+	width: 674rpx;
+	height: 231rpx;
+	background: linear-gradient(-23deg, #ffe7be, #fed591);
+	border-radius: 10rpx;
+}
+.item {
+	margin: 44rpx auto;
+	width: 674rpx;
+	height: 176rpx;
+	box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
+	border-radius: 10rpx;
+	.item-top {
+		width: 85rpx;
+		line-height: 36rpx;
+		background-color: #fed591;
+		border-radius: 10rpx 18rpx 18rpx 0;
+		text-align: center;
+		font-size: 20rpx;
+		font-family: Source Han Sans CN;
+		font-weight: 400;
+		color: #975f4a;
+	}
+}
+.btn {
+	margin: 0 auto;
+	width: 606rpx;
+	height: 80rpx;
+	background: linear-gradient(-23deg, #ffe7be, #fed591);
+	border-radius: 40rpx;
+	font-size: 35rpx;
+	font-family: Source Han Sans CN;
+	font-weight: 400;
+	color: #704e1c;
+	line-height: 80rpx;
+	text-align: center;
+}
+.tab-wrapper {
+	padding: 20rpx 30rpx;
+	background-color: #f2f3f5;
+	.itemx {
+		margin: 0 auto;
+		width: 100%;
+		background-color: #fff !important;
+		height: 100rpx;
+		display: flex;
+		// width: 690px;
+		border: 1px #f4f4f4 solid;
+		.item-tit {
+			height: 100rpx;
+			line-height: 100rpx;
+			padding-left: 30rpx;
+			width: 250rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			flex-shrink: 0;
+		}
+		input {
+			width: 440rpx;
+			padding-right: 20rpx;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
+}
+.up-wrapper {
+	margin: auto;
+	padding: 38rpx 21rpx;
+	width: 690rpx;
+	// height: 250rpx;
+	background: #ffffff;
+	border-radius: 10rpx;
+	font-size: 28rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #333333;
+	.imgs {
+		padding: 27rpx 70rpx;
+		display: flex;
+		justify-content: space-around;
+		.imgs-item {
+			height: 160rpx;
+			width: 160rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+}
+</style>

+ 154 - 0
pages/store/storeDetail.vue

@@ -0,0 +1,154 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<image src="" mode="" class="store-img"></image>
+			<view class="right">
+				<view class="store-name clamp">
+					鑫旺零售台州店
+				</view>
+				<view class="store-content clamp2">
+					店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介
+				</view>
+			</view>
+		</view>
+		<view class="jg"></view>
+		<view class="store-info">
+			<view class="title">
+				门店地址/营业时间
+			</view>
+			<view class="info-box">
+				<view class="item">
+					<image src="" mode="" class="item-img"></image>
+					<view class="item-msg">
+						台州市市府大道110号
+					</view>
+				</view>
+				<view class="item">
+					<image src="" mode="" class="item-img"></image>
+					<view class="item-msg">
+						营业时间8:30-12:00,13:30-17:00
+					</view>
+				</view>
+				<view class="item">
+					<image src="" mode="" class="item-img"></image>
+					<view class="item-msg">
+						0576-847112333
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="edit-btn" @click="navTo('/pages/store/storeMessage')">
+			编辑信息
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+	.top {
+		height: 198rpx;
+		display: flex;
+		padding: 30rpx 25rpx 36rpx;
+		.store-img {
+			width: 132rpx;
+			height: 132rpx;
+			background-color: red;
+			flex-shrink: 0;
+		}
+		.right {
+			padding-left: 20rpx;
+			.store-name {
+				padding: 5rpx 0;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.store-title {
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #999999;
+				line-height: 25rpx;
+			}
+		}
+		
+	}
+	.jg {
+		height: 20rpx;
+		background-color: #f8f6f6;
+	}
+	.store-info {
+		padding: 28rpx 30rpx 0;
+		height: 100%;
+		.title {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			line-height: 55rpx;
+		}
+		.info-box {
+			margin-top: 30rpx;
+			width: 690rpx;
+			min-height: 301rpx;
+			border: 2px solid #DDDDDD;
+			border-radius: 10rpx;
+			padding: 40rpx 40rpx 0rpx;
+			.item {
+				display: flex;
+				padding-bottom: 40rpx;
+				image {
+					margin-top: 6rpx;
+					margin-right: 20rpx;
+					height: 28rpx;
+					width: 28rpx;
+					background-color: red;
+					flex-shrink: 0;
+				}
+				.item-msg {
+					font-size: 29rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 40rpx;
+				}
+			}
+		}
+	}
+	.edit-btn {
+		position: fixed;
+		bottom: 34rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+		width: 674rpx;
+		// height: 88rpx;
+		background: #FF4C4C;
+		border-radius: 44rpx;
+		text-align: center;
+		line-height: 88rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+	}
+</style>

+ 147 - 0
pages/store/storeList.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="store-list">
+		<scroll-view scroll-y="true" class="list" @scrolltolower="loadData()">
+			<empty v-if="loaded && list.length == 0"></empty>
+			<view class="store flex" v-for="item in list">
+				<image src="" mode="" class="store-img"></image>
+				<view class="store-info">
+					<view class="store-name">鑫旺零售台州店</view>
+					<view class="store-detail">台州市椒江区市府大道120号</view>
+					<view class="store-tip">门店</view>
+					<view class="store-des">
+						<image src="" mode=""></image>
+						距离 15KM
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType" v-if="list !=0"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import empty from '@/components/empty';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	export default {
+		components: {
+			uniLoadMore,
+			empty
+		},
+		data() {
+			return {
+				list: [1,2,3],
+				storeList: [],
+				loadingType: 'more',
+				page: 1,
+				limit: 10,
+				height: '',//滚动区域高度
+				loaded: false,
+			}
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.list').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		onLoad() {
+			this.loadData()
+		},
+		methods: {
+			//获取门店list
+			loadData() {
+				let obj = this
+				if(obj.loadingType == 'loading') {
+					return
+				}
+				if(obj.loadingType == 'noMore') {
+					return 
+				}
+				
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.store-list {
+		padding-top: 20rpx;
+	}
+	.store {
+		margin: 0 auto 20rpx;
+		width: 710rpx;
+		height: 210rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
+		border-radius: 10rpx;
+		padding: 19rpx 25rpx 11rpx 20rpx;
+		justify-content: flex-start;
+		.store-img {
+			flex-shrink: 0;
+			width: 180rpx;
+			height: 180rpx;
+			border-radius: 10rpx;
+			background-color: red;
+		}
+		.store-info {
+			width: 100%;
+			height: 100%;
+			padding-left: 19rpx;
+			position: relative;
+			.store-name {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.store-detail {
+				padding-top: 10rpx;
+				font-size: 22rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+			.store-tip {
+				width: 66rpx;
+				height: 40rpx;
+				background: linear-gradient(120deg, #ffc063, #ffa163);
+				border-radius: 8rpx;
+				position: absolute;
+				right: 0;
+				top: 0;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+				line-height: 40rpx;
+				text-align: center;
+			}
+			.store-des {
+				// width: 400rpx;
+				position: absolute;
+				bottom: 0;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				height: 35rpx;
+				image {
+					margin-right: 8rpx;
+					width: 17rpx;
+					height: 24rpx;
+					background-color: red;
+				}
+			}
+		}
+	}
+</style>

+ 158 - 0
pages/store/storeMessage.vue

@@ -0,0 +1,158 @@
+<template>
+	<view class="content">
+		<view class="item">
+			<view class="item-tit">
+				店铺名称
+			</view>
+			<input type="text" v-model="name"/>
+		</view>
+		<view class="item">
+			<view class="item-tit">
+				商家电话
+			</view>
+			<input type="number" v-model="phone"/>
+		</view>
+		<view class="item">
+			<view class="item-tit">
+				商家地址
+			</view>
+			<input type="text" v-model="address"/>
+		</view>
+		<view class="item">
+			<view class="item-tit">
+				营业时间
+			</view>
+			<input type="text" v-model="workTime"/>
+		</view>
+		<view class="item">
+			<view class="item-tit">
+				商户简介
+			</view>
+			<textarea v-model="info" placeholder="" />
+		</view>
+		<view class="item">
+			<view class="item-tit">
+				门户头像
+			</view>
+			<view class="up-wrapper">
+				<image :src="logo" mode="" v-if="logo" @click.stop="upImg"></image>
+				<image src="../../static/img/add.png" mode="" v-else  @click.stop="upImg"></image>
+			</view>
+		</view>
+		<view class="sub" @click="sub">
+			确认修改
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+			upload
+		} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				name: '鑫旺零售台州店',
+				phone: '12345678911',
+				address: '台州市市府大道110号',
+				info: '店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介',
+				workTime: '8:30-12:00,13:30-17:00',
+				logo: ''
+			}
+		},
+		methods:{
+			// 修改logo
+			upImg() {
+				let obj = this
+				upload({
+					filename: ''
+				}).then(res => {
+					console.log(res[0].url)
+					obj.logo = res[0].url
+				});
+			},
+			//提交
+			sub() {
+				let obj = this
+				
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #f8f6f6;
+	}
+	.item {
+		background-color: #fff !important;
+		min-height: 100rpx;
+		display: flex;
+		width: 750px;
+		border: 1px  #F4F4F4 solid;
+		.item-tit {
+			height: 100rpx;
+			line-height: 100rpx;
+			padding-left: 30rpx;
+			width: 200rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			flex-shrink: 0;
+		}
+		input {
+			width: 550rpx;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		textarea {
+			width: 550rpx;
+			height: 257rpx;
+			padding-top: 45rpx;
+			padding-right: 30rpx;
+			line-height: 50rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.up-wrapper {
+			height: 352rpx;
+			width: 550rpx;
+			position: relative;
+			image {
+				position: absolute;
+				height: 160rpx;
+				width: 160rpx;
+				top: 0;
+				bottom: 0;
+				left: 94rpx;
+				margin: auto;
+			}
+		}
+	}
+	.sub {
+		width: 674rpx;
+		height: 88rpx;
+		background: #FF4C4C;
+		border-radius: 44rpx;
+		line-height: 88rpx;
+		text-align: center;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+		position: absolute;
+		bottom: 35rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+</style>

+ 8 - 6
pages/user/user.vue

@@ -5,7 +5,7 @@
 			<view class="user-section">
 			<view class="user-section">
 				<view class="bg"></view>
 				<view class="bg"></view>
 				<view class="user-info-box ">
 				<view class="user-info-box ">
-					<view class="detail flex" @click="navTo('/pages/set/userinfo')">
+					<view class="detail flex">
 						<view class="portrait-box"><image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image></view>
 						<view class="portrait-box"><image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image></view>
 						<view class="info-box">
 						<view class="info-box">
 							<view class="username">{{ userInfo.nickname || '游客' }}</view>
 							<view class="username">{{ userInfo.nickname || '游客' }}</view>
@@ -26,7 +26,7 @@
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="my-info flex">
+					<view class="my-info flex" @click="navTo('/pages/set/userinfo')" v-if="hasLogin">
 						<image src="../../static/icon/i6.png" mode=""></image>
 						<image src="../../static/icon/i6.png" mode=""></image>
 						<view class="title">我的资料</view>
 						<view class="title">我的资料</view>
 					</view>
 					</view>
@@ -78,7 +78,9 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- 升级店长 -->
 			<!-- 升级店长 -->
-			<view class="up-box"></view>
+			<navigator url="/pages/store/apply">
+				<view class="up-box" @click=""></view>
+			</navigator>
 			<view>
 			<view>
 				<!-- <view class="tj-sction">
 				<!-- <view class="tj-sction">
 					<view class="tj-item" @click="navTo('/pages/money/wallet')">
 					<view class="tj-item" @click="navTo('/pages/money/wallet')">
@@ -148,7 +150,7 @@
 import { mapState, mapMutations } from 'vuex';
 import { mapState, mapMutations } from 'vuex';
 import uniList from '@/components/uni-list/uni-list.vue';
 import uniList from '@/components/uni-list/uni-list.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import { orderData, userinfo } from '@/api/user.js';
+import { orderData, getUserInfo } from '@/api/user.js';
 import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 let startY = 0,
 let startY = 0,
 	moveY = 0,
 	moveY = 0,
@@ -211,13 +213,13 @@ export default {
 	// },
 	// },
 	// #endif
 	// #endif
 	computed: {
 	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		...mapState('user', ['userInfo', 'orderInfo','hasLogin'])
 	},
 	},
 	methods: {
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		// 加载初始数据
 		// 加载初始数据
 		loadBaseData() {
 		loadBaseData() {
-			userinfo({})
+			getUserInfo({})
 				.then(({ data }) => {
 				.then(({ data }) => {
 					this.setUserInfo(data);
 					this.setUserInfo(data);
 					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
 					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页

BIN
static/icon/del.png


BIN
static/icon/share.png


BIN
static/img/shareimg.png


+ 2 - 1
store/index.js

@@ -14,7 +14,8 @@ const store = new Vuex.Store({
 		// #ifdef H5 || MP-WEIXIN
 		// #ifdef H5 || MP-WEIXIN
 		weichatInfo:{},//保存微信注册信息
 		weichatInfo:{},//保存微信注册信息
 		weichatObj:'',//微信对象
 		weichatObj:'',//微信对象
-		// #endif
+		// #endif
+		// hasLogin:false,
 	},
 	},
 	mutations: {
 	mutations: {
 		//保存微信信息
 		//保存微信信息