liujd 6 лет назад
Родитель
Сommit
5259cabf5c

+ 6 - 6
mobile-code/src/api/coupon/index.js

@@ -3,16 +3,16 @@ import https from '@/plugins/luch-request_0.0.7/request'
 /** *
  * 登陆客户的优惠情况 m
  */
-export const discount = data => {
-	return https.get('/user/discount', data)
-}
+// export const discount = data => {
+// 	return https.get('/user/discount', data)
+// }
 
 /** *
  * 登陆客户的优惠券列表 m
  */
-export const list = data => {
-	return https.get('/user/discount', data)
-}
+// export const list = data => {
+// 	return https.get('/user/discount', data)
+// }
 
 /** *
  * 优惠券列表 m

+ 2 - 0
mobile-code/src/b-config.js

@@ -0,0 +1,2 @@
+// 项目配置--由bat脚本变更
+export const ProjectName = 'business'

+ 9 - 3
mobile-code/src/m-manifest.json → mobile-code/src/b-manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "花卉宝",
+    "name" : "花卉宝商家后台",
     "appid" : "",
     "description" : "应用描述",
     "versionName" : "1.0.0",
@@ -7,7 +7,10 @@
     "transformPx" : true,
     "debug": false,
     "networkTimeout": {
-        "request":200000
+        "request":200000,
+        "connectSocket": 200000,
+        "uploadFile": 200000,
+        "downloadFile": 200000
     },
     "mp-weixin" : {
         "appid" : "wx3a163add860e0a86",
@@ -30,6 +33,9 @@
     "mp-toutiao" : {
         "usingComponents" : true
     },
+    "mp-qq" : {
+        "usingComponents" : true
+	},
     "h5" : {
         "template" : "template.h5.html",
         "router" : {
@@ -44,7 +50,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.m.huaml.com",
+                    "target": "http://api.b.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 318 - 0
mobile-code/src/b-pages.json

@@ -0,0 +1,318 @@
+{
+	"pages": [
+		{
+			"path": "admin/home/workbench",
+			"style": {
+				"navigationBarTitleText": "工作台"
+			}
+		},
+		{
+			"path": "admin/home/order",
+			"style": {
+				"navigationBarTitleText": "订单"
+			}
+		},
+		{
+			"path": "admin/home/member",
+			"style": {
+				"navigationBarTitleText": "客户"
+			}
+		},
+		{
+			"path": "pages/common/redirect",
+			"style": {
+				"navigationBarTitleText": "加载中..."
+			}
+		},
+		{
+			"path": "pages/common/webview",
+			"style": {
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
+			}
+		}
+	],
+	"subPackages": [
+		{
+			"root": "admin/order",
+			"pages": [
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "详情"
+					}
+				},
+				{
+					"path": "ship",
+					"style": {
+						"navigationBarTitleText": "发货"
+					}
+				},
+				{
+					"path": "fill-form",
+					"style": {
+						"navigationBarTitleText": "填写收花人"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/member",
+			"pages": [
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加客户"
+					}
+				},
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "客户详情"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/interest",
+			"pages": [
+				{
+					"path": "invite",
+					"style": {
+						"navigationBarTitleText": "邀请列表"
+					}
+				},
+				{
+					"path": "my-invite",
+					"style": {
+						"navigationBarTitleText": "我的邀请"
+					}
+				},
+				{
+					"path": "setting",
+					"style": {
+						"navigationBarTitleText": "奖励设置"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/coupon",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "优惠券"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/ad",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "广告列表"
+					}
+				},
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加广告"
+					}
+				},
+				{
+					"path": "sel-goods",
+					"style": {
+						"navigationBarTitleText": "商品选择"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/staff",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "员工管理"
+					}
+				},
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加员工"
+					}
+				},
+				{
+					"path": "sel-member",
+					"style": {
+						"navigationBarTitleText": "客户列表"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/setting",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "设置"
+					}
+				},
+				{
+					"path": "wx-menu",
+					"style": {
+						"navigationBarTitleText": "微信菜单设置"
+					}
+				},
+				{
+					"path": "coupon",
+					"style": {
+						"navigationBarTitleText": "新人领券设置"
+					}
+				},
+				{
+					"path": "level",
+					"style": {
+						"navigationBarTitleText": "会员等级设置"
+					}
+				},
+				{
+					"path": "password",
+					"style": {
+						"navigationBarTitleText": "密码设置"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/goodsManage",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "商品管理"
+					}
+				},
+				{
+					"path": "category",
+					"style": {
+						"navigationBarTitleText": "分类管理"
+					}
+				},
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加商品"
+					}
+				},
+				{
+					"path": "img-store",
+					"style": {
+						"navigationBarTitleText": "图库管理"
+					}
+				},
+				{
+					"path": "goods-name",
+					"style": {
+						"navigationBarTitleText": "填写商品信息"
+					}
+				},
+				{
+					"path": "freight",
+					"style": {
+						"navigationBarTitleText": "运费设置"
+					}
+				},
+				{
+					"path": "price-increase",
+					"style": {
+						"navigationBarTitleText": "节假日自动涨价"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/statistics",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "数据统计"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/assets",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "收入明细"
+					}
+				}
+			]
+		},
+		{
+			"root": "pages/chat",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "客服",
+						"enablePullDownRefresh": true
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/template",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "选择模板"
+					}
+				}
+			]
+		}
+	],
+	"globalStyle": {
+		// #ifdef H5
+		"navigationStyle": "custom",
+		// #endif
+		"navigationBarBackgroundColor": "#fff",
+		"navigationBarTitleText": "花卉宝",
+		"navigationBarTextStyle": "black"
+	},
+	"tabBar": {
+		"color": "#C0C4CC",
+		"selectedColor": "#3385FF",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "admin/home/workbench",
+				"iconPath": "static/images/admin/workbench-no.png",
+				"selectedIconPath": "static/images/admin/workbench-is.png",
+				"text": "工作台"
+			},
+			{
+				"pagePath": "admin/home/order",
+				"iconPath": "static/images/admin/order-no.png",
+				"selectedIconPath": "static/images/admin/order-is.png",
+				"text": "订单"
+			},
+			{
+				"pagePath": "admin/home/member",
+				"iconPath": "static/images/admin/member-no.png",
+				"selectedIconPath": "static/images/admin/member-is.png",
+				"text": "客户"
+			}
+		]
+	}
+}
+

+ 1 - 1
mobile-code/src/m-uni.scss → mobile-code/src/b-uni.scss

@@ -12,7 +12,7 @@ $imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色
-$mainColor: #FF2842;
+$mainColor: #3385FF;
 $mainColor1: #049E2C;
 $auxiliaryColor2: #ff6900;
 

+ 2 - 2
mobile-code/src/config.js

@@ -1,2 +1,2 @@
-// 项目配置--由bat脚本变更
-export const ProjectName = 'business'
+// 项目配置--由bat脚本自动变更
+export const ProjectName = 'mobile'

+ 0 - 2
mobile-code/src/m-config.js

@@ -1,2 +0,0 @@
-// 项目配置--由bat脚本自动变更
-export const ProjectName = 'mobile'

+ 0 - 203
mobile-code/src/m-pages.json

@@ -1,203 +0,0 @@
-{
-	"pages": [
-		{
-			"path": "pages/home/index",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "pages/home/category",
-			"style": {
-				"navigationBarTitleText": "分类"
-			}
-		},
-		{
-			"path": "pages/home/shop",
-			"style": {
-				"navigationBarTitleText": "门店"
-			}
-		},
-		{
-			"path": "pages/home/user",
-			"style": {
-				"navigationBarTitleText": "我的"
-			}
-		},
-		{
-			"path": "pages/common/redirect",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "pages/common/webview",
-			"style": {
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		}
-	],
-	"subPackages": [
-		{
-			"root": "pages/user",
-			"pages": [
-				{
-					"path": "register",
-					"style": {
-						"navigationBarTitleText": "注册"
-					}
-				},
-				{
-					"path": "password",
-					"style": {
-						"navigationBarTitleText": "修改密码"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/goods",
-			"pages": [
-				{
-					"path": "detail",
-					"style": {
-						"navigationBarTitleText": "详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/pay",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "支付"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/callback",
-			"pages": [
-				{
-					"path": "index"
-				}
-			]
-		},
-		{
-			"root": "pages/coupon",
-			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "优惠券",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/order",
-			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "订单列表",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "detail",
-					"style": {
-						"navigationBarTitleText": "订单列表"
-					}
-				},
-				{
-					"path": "buy",
-					"style": {
-						"navigationBarTitleText": "订单确认"
-					}
-				},
-				{
-					"path": "comment",
-					"style": {
-						"navigationBarTitleText": "评价"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/interest",
-			"pages": [
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "邀请排行",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "level",
-					"style": {
-						"navigationBarTitleText": "会员等级",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/chat",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "客服",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		}
-	],
-	"globalStyle": {
-		// #ifdef H5
-		"navigationStyle": "custom",
-		// #endif
-		"navigationBarBackgroundColor": "#fff",
-		"navigationBarTitleText": "花卉宝",
-		"navigationBarTextStyle": "black"
-	},
-	"tabBar": {
-		"color": "#C0C4CC",
-		"selectedColor": "#fa436a",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/home/index",
-				"iconPath": "static/images/common/home-no.png",
-				"selectedIconPath": "static/images/common/home-is.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/home/category",
-				"iconPath": "static/images/common/category-no.png",
-				"selectedIconPath": "static/images/common/category-is.png",
-				"text": "分类"
-			},
-			{
-				"pagePath": "pages/home/shop",
-				"iconPath": "static/images/common/shop-no.png",
-				"selectedIconPath": "static/images/common/shop-is.png",
-				"text": "门店"
-			},
-			{
-				"pagePath": "pages/home/user",
-				"iconPath": "static/images/common/user-no.png",
-				"selectedIconPath": "static/images/common/user-is.png",
-				"text": "我的"
-			}
-		]
-	}
-}
-

+ 3 - 9
mobile-code/src/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "花卉宝商家后台",
+    "name" : "花卉宝",
     "appid" : "",
     "description" : "应用描述",
     "versionName" : "1.0.0",
@@ -7,10 +7,7 @@
     "transformPx" : true,
     "debug": false,
     "networkTimeout": {
-        "request":200000,
-        "connectSocket": 200000,
-        "uploadFile": 200000,
-        "downloadFile": 200000
+        "request":200000
     },
     "mp-weixin" : {
         "appid" : "wx3a163add860e0a86",
@@ -33,9 +30,6 @@
     "mp-toutiao" : {
         "usingComponents" : true
     },
-    "mp-qq" : {
-        "usingComponents" : true
-	},
     "h5" : {
         "template" : "template.h5.html",
         "router" : {
@@ -50,7 +44,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.b.huaml.com",
+                    "target": "http://api.m.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 62 - 177
mobile-code/src/pages.json

@@ -1,21 +1,27 @@
 {
 	"pages": [
 		{
-			"path": "admin/home/workbench",
+			"path": "pages/home/index",
 			"style": {
-				"navigationBarTitleText": "工作台"
+				"navigationBarTitleText": "加载中..."
+			}
+		},
+		{
+			"path": "pages/home/category",
+			"style": {
+				"navigationBarTitleText": "分类"
 			}
 		},
 		{
-			"path": "admin/home/order",
+			"path": "pages/home/shop",
 			"style": {
-				"navigationBarTitleText": "订单"
+				"navigationBarTitleText": "门店"
 			}
 		},
 		{
-			"path": "admin/home/member",
+			"path": "pages/home/user",
 			"style": {
-				"navigationBarTitleText": "客户"
+				"navigationBarTitleText": "我的"
 			}
 		},
 		{
@@ -34,225 +40,109 @@
 	],
 	"subPackages": [
 		{
-			"root": "admin/order",
+			"root": "pages/user",
 			"pages": [
 				{
-					"path": "detail",
+					"path": "register",
 					"style": {
-						"navigationBarTitleText": "详情"
+						"navigationBarTitleText": "注册"
 					}
 				},
 				{
-					"path": "ship",
-					"style": {
-						"navigationBarTitleText": "发货"
-					}
-				},
-				{
-					"path": "fill-form",
+					"path": "password",
 					"style": {
-						"navigationBarTitleText": "填写收花人"
+						"navigationBarTitleText": "修改密码"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/member",
+			"root": "pages/goods",
 			"pages": [
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加客户"
-					}
-				},
 				{
 					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "客户详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/interest",
-			"pages": [
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "邀请列表"
-					}
-				},
-				{
-					"path": "my-invite",
-					"style": {
-						"navigationBarTitleText": "我的邀请"
-					}
-				},
-				{
-					"path": "setting",
-					"style": {
-						"navigationBarTitleText": "奖励设置"
+						"navigationBarTitleText": "详情"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/coupon",
+			"root": "pages/pay",
 			"pages": [
 				{
-					"path": "list",
+					"path": "index",
 					"style": {
-						"navigationBarTitleText": "优惠券"
+						"navigationBarTitleText": "支付"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/ad",
+			"root": "pages/callback",
 			"pages": [
 				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "广告列表"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加广告"
-					}
-				},
-				{
-					"path": "sel-goods",
-					"style": {
-						"navigationBarTitleText": "商品选择"
-					}
+					"path": "index"
 				}
 			]
 		},
 		{
-			"root": "admin/staff",
+			"root": "pages/coupon",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "员工管理"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加员工"
-					}
-				},
-				{
-					"path": "sel-member",
-					"style": {
-						"navigationBarTitleText": "客户列表"
+						"navigationBarTitleText": "优惠券",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/setting",
+			"root": "pages/order",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "设置"
-					}
-				},
-				{
-					"path": "wx-menu",
-					"style": {
-						"navigationBarTitleText": "微信菜单设置"
+						"navigationBarTitleText": "订单列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path": "coupon",
+					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "新人领券设置"
+						"navigationBarTitleText": "订单列表"
 					}
 				},
 				{
-					"path": "level",
+					"path": "buy",
 					"style": {
-						"navigationBarTitleText": "会员等级设置"
+						"navigationBarTitleText": "订单确认"
 					}
 				},
 				{
-					"path": "password",
+					"path": "comment",
 					"style": {
-						"navigationBarTitleText": "密码设置"
+						"navigationBarTitleText": "评价"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/goodsManage",
+			"root": "pages/interest",
 			"pages": [
 				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "商品管理"
-					}
-				},
-				{
-					"path": "category",
-					"style": {
-						"navigationBarTitleText": "分类管理"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加商品"
-					}
-				},
-				{
-					"path": "img-store",
-					"style": {
-						"navigationBarTitleText": "图库管理"
-					}
-				},
-				{
-					"path": "goods-name",
-					"style": {
-						"navigationBarTitleText": "填写商品信息"
-					}
-				},
-				{
-					"path": "freight",
+					"path": "invite",
 					"style": {
-						"navigationBarTitleText": "运费设置"
+						"navigationBarTitleText": "邀请排行",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path": "price-increase",
-					"style": {
-						"navigationBarTitleText": "节假日自动涨价"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/statistics",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "数据统计"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/assets",
-			"pages": [
-				{
-					"path": "list",
+					"path": "level",
 					"style": {
-						"navigationBarTitleText": "收入明细"
+						"navigationBarTitleText": "会员等级",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
@@ -268,17 +158,6 @@
 					}
 				}
 			]
-		},
-		{
-			"root": "admin/template",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "选择模板"
-					}
-				}
-			]
 		}
 	],
 	"globalStyle": {
@@ -291,26 +170,32 @@
 	},
 	"tabBar": {
 		"color": "#C0C4CC",
-		"selectedColor": "#3385FF",
+		"selectedColor": "#fa436a",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{
-				"pagePath": "admin/home/workbench",
-				"iconPath": "static/images/admin/workbench-no.png",
-				"selectedIconPath": "static/images/admin/workbench-is.png",
-				"text": "工作台"
+				"pagePath": "pages/home/index",
+				"iconPath": "static/images/common/home-no.png",
+				"selectedIconPath": "static/images/common/home-is.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/home/category",
+				"iconPath": "static/images/common/category-no.png",
+				"selectedIconPath": "static/images/common/category-is.png",
+				"text": "分类"
 			},
 			{
-				"pagePath": "admin/home/order",
-				"iconPath": "static/images/admin/order-no.png",
-				"selectedIconPath": "static/images/admin/order-is.png",
-				"text": "订单"
+				"pagePath": "pages/home/shop",
+				"iconPath": "static/images/common/shop-no.png",
+				"selectedIconPath": "static/images/common/shop-is.png",
+				"text": "门店"
 			},
 			{
-				"pagePath": "admin/home/member",
-				"iconPath": "static/images/admin/member-no.png",
-				"selectedIconPath": "static/images/admin/member-is.png",
-				"text": "客户"
+				"pagePath": "pages/home/user",
+				"iconPath": "static/images/common/user-no.png",
+				"selectedIconPath": "static/images/common/user-is.png",
+				"text": "我的"
 			}
 		]
 	}

+ 12 - 2
mobile-code/src/pages/home/user.vue

@@ -40,8 +40,18 @@
 				<div class="my-surplus">{{ shopUser.userAsset.balance || 0.00 }}</div>
 			</div>
 			<div class="surplus-right">
-				<button class="button-com">充值</button>
-				<button class="button-com red">付款</button>
+				<button class="button-com" @click="$util.pageTo({
+					url: '/pages/pay/index',
+					query: {
+						pageStatus: 'recharge'
+					}
+				})">充值</button>
+				<button class="button-com red" @click="$util.pageTo({
+					url: '/pages/pay/index',
+					query: {
+						pageStatus: 'payment'
+					}
+				})">付款</button>
 			</div>
 		</div>
 		<div class="list-content">

+ 12 - 10
mobile-code/src/pages/order/buy.vue

@@ -149,15 +149,15 @@ export default {
 	methods: {
 		init() {
 			let goodsInfo = uni.getStorageSync('buyGoodsDetil')
-			if (this.$util.isEmpty(goodsInfo)) {
-				this.$util.pageTo({
-					url: `/pages/goods/detail`,
-					query: {
-						id: this.option.goodsId
-					}
-				})
-				return false
-			}
+			// if (this.$util.isEmpty(goodsInfo)) {
+			// 	this.$util.pageTo({
+			// 		url: `/pages/goods/detail`,
+			// 		query: {
+			// 			id: this.option.goodsId
+			// 		}
+			// 	})
+			// 	return false
+			// }
 			getOrderShop()
 			getShopUser()
 			goodsInfo.buyNum = this.option.goodsNum
@@ -172,6 +172,7 @@ export default {
 		createOrderFn() {
 			let addForm = {}
 			let form = this.tabIndex == 0 ? this.$refs.appDelivery.form : this.mentionForm
+			let region = this.tabIndex == 0 ? this.$refs.appDelivery.region : {}
 			if (this.$refs.couponSel) {
 				addForm.couponId = this.$refs.couponSel.couponId
 			}
@@ -179,7 +180,8 @@ export default {
 				needSend: this.tabIndex == 0 ? '1' : '0',
 				...form,
 				...this.form,
-				...addForm
+				...addForm,
+				...region
 			}).then(res => {
 				uni.removeStorageSync('buyGoodsDetil')
 				this.$util.pageTo({

+ 48 - 19
mobile-code/src/pages/pay/index.vue

@@ -1,8 +1,11 @@
 <template>
 	<div class="app-content">
-		<!-- <div class="tabs-wrap"> -->
-		<app-tabs :tabs="tabs" :currentTab="tabIndex" :isFixed="true" :borderLeft="true" @change="tabChange" itemWidth="50%" />
-		<!-- </div> -->
+		<block v-if="option.pageStatus == 'recharge'">
+			<div class="tabs-wrap">充值</div>
+		</block>
+		<block v-else>
+			<app-tabs :tabs="tabs" :currentTab="tabIndex" :isFixed="true" :borderLeft="true" @change="tabChange" itemWidth="50%" />
+		</block>
 		<!-- 直接付款 -->
 		<block v-if="tabIndex == 0">
 			<div class="logo-wrap">
@@ -12,7 +15,7 @@
 				<div class="app-size-30">{{ shopUser.userName }}</div>
 			</div>
 			<div class="pay-input-wrap">
-				<pay-input-module :focus="inpFocus" :num="form.prePrice" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
+				<pay-input-module :focus="inpFocus" :num="amount" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
 				<div class="balance">
 					<span>账户余额 ¥</span>
 					<span class="app-size-30">{{ shopUser.userAsset.balance }}</span>
@@ -36,7 +39,7 @@
 					<div class="inp-list-line">
 						<!-- <div class="line-label">支付密码</div> -->
 						<div class="line-input">
-							<input type="password" v-model="form.payPassword" :adjust-position="false" class="inp-input" />
+							<input type="password" v-model="modalForm.payPassword" :adjust-position="false" class="inp-input" />
 						</div>
 					</div>
 				</div>
@@ -46,21 +49,25 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
 import AppTabs from '@/components/plugin/tabs'
 import PayInputModule from './components/pay-input'
 import AppDeliveryModule from '@/components/app-delivery'
 // import { getMiniAppUrl } from '@/utils/common'
 import { getCheckLogin } from '@/utils/auth'
 import wexinPay from '@/utils/pay/wxPay'
+import ModalModule from '@/components/plugin/modal'
 // api
 import { fastPay } from '@/api/pay'
+import { recharge } from '@/api/member'
 import { getShopUser } from '@/utils/auth'
 export default {
 	name: 'pay',
 	components: {
 		AppTabs,
 		PayInputModule,
-		AppDeliveryModule
+		AppDeliveryModule,
+		ModalModule
 	},
 	data() {
 		return {
@@ -77,8 +84,8 @@ export default {
 				}
 			],
 			// 初始form
+			amount: '',
 			form: {
-				prePrice: '',
 				payWay: 0 // 0微信 1支付宝 2余额
 			},
 			// 支付相关 ============
@@ -102,10 +109,10 @@ export default {
 		...mapGetters({ shopUser: 'getShopUser' })
 	},
 	onLoad(option) {
-		this.option = this.$util.isEmpty(option) || {
-			account: 12358,
-			shopId: 15680
-		}
+		// this.option = this.$util.isEmpty(option) || {
+		// 	account: 12358,
+		// 	shopId: 15680
+		// }
 		this.init()
 	},
 	methods: {
@@ -114,17 +121,27 @@ export default {
 			getShopUser()
 		},
 		_pay() {
-			if (!this.form.prePrice) {
+			if (!this.amount) {
 				this.$msg('请先输入金额!')
 				return false
 			}
-			let params = {
-				needSend: this.tabIndex == 0 ? '1' : '0',
-				prePrice: this.amount
-				// sourceType: 1,
-				// shopId: 15680
+			let params = {}
+			let host = null
+			if (this.option.pageStatus == 'recharge') {
+				params = {
+					amount: this.amount
+				}
+				host = recharge
+			} else {
+				params = {
+					needSend: this.tabIndex == 0 ? '1' : '0',
+					prePrice: this.amount
+					// sourceType: 1,
+					// shopId: 15680
+				}
+				host = fastPay
 			}
-			fastPay(params).then(res => {
+			host(params).then(res => {
 				wexinPay(res.data, this.paySuccess, this.payFail)
 				// window.location.href = res.data.pay_button.mweb_url
 			})
@@ -189,9 +206,21 @@ export default {
 <style lang="scss">
 	.app-content {
 		min-height: 0;
-        padding-top: 100px;
+		padding-top: 100px;
 		// padding-bottom: 120px;
 	}
+	.tabs-wrap {
+		position: fixed;
+		top: 0;
+		width: 100%;
+		height: 80px;
+		line-height: 80px;
+		text-align: center;
+		background-color: #fff;
+		font-size: 30px;
+		box-shadow: 4px 4px 10px #eee;
+	}
+
 	.logo-wrap {
 		padding-top: 70px;
 		padding-bottom: 60px;

+ 1 - 1
mobile-code/src/uni.scss

@@ -12,7 +12,7 @@ $imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色
-$mainColor: #3385FF;
+$mainColor: #FF2842;
 $mainColor1: #049E2C;
 $auxiliaryColor2: #ff6900;