lalala před 6 roky
rodič
revize
1a8afec898

+ 3 - 3
mobile-code/src/App.vue

@@ -10,13 +10,13 @@ export default {
 	onLaunch() {
 		// this.getAllOptions()
 		// #ifdef MP-WEIXIN
-		wxLoginFn()
-		let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
+		// wxLoginFn()
+		const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
 		console.log('extConfig', extConfig)
 		uni.setStorageSync('account', extConfig.account)
 		// #endif
 		// 开发
-		// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjFfMTI1MzY2MzAifQ.eyJpc3MiOiJodHRwOlwvXC9tLmhoYi5jb20iLCJhdWQiOiJodHRwOlwvXC9tLmhoYi5jb20iLCJqdGkiOiIxXzEyNTM2NjMwIiwiaWF0IjoxNTc0NDIzMDc4LCJuYmYiOjE1NzQ0MjMwNzgsImV4cCI6MTU3NDQyNjY3OCwidXNlcklkIjoxMjUzNjYzMH0.v_T9NuFRpzuI7GtwuuuNlVg6EylImaCUwqo2A6NRTE4')
+		// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfMTI1NDM3NDAifQ.eyJpc3MiOiJodHRwczpcL1wvYXBpLm0uaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5tLmh1YW1sLmNvbSIsImp0aSI6IjBfMTI1NDM3NDAiLCJpYXQiOjE1NzkzNTI5OTIsIm5iZiI6MTU3OTM1Mjk5MiwiZXhwIjoxNTg3OTkyOTkyLCJ1bmlxdWVJZCI6IjEyNTQzNzQwIiwic291cmNlSWQiOjB9.ugv2pHO9wooDPEGkCZzPjf2bZIOxEHB2rL_t_DzMgC4')
 		// uni.setStorageSync('account', '12358')
 	},
 	onShow() {

+ 1 - 1
mobile-code/src/admin/goodsManage/freight.vue

@@ -47,7 +47,7 @@ export default {
 		}
 	},
 	methods: {
-		mInit() {
+		init() {
 			getUser().then(res => {
 				this.form.first = this.userInfo.extend.freightFirst
 				this.form.add = this.userInfo.extend.freightAdd

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

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

+ 10 - 4
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,10 +7,13 @@
     "transformPx" : true,
     "debug": false,
     "networkTimeout": {
-        "request":200000
+        "request":200000,
+        "connectSocket": 200000,
+        "uploadFile": 200000,
+        "downloadFile": 200000
     },
     "mp-weixin" : {
-        "appid" : "wxe4675bab299a52f7",
+        "appid" : "wx3a163add860e0a86",
         "setting" : {
             "urlCheck" : false
         },
@@ -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'

+ 8 - 5
mobile-code/src/constant/index.js

@@ -1,12 +1,15 @@
 import { ProjectName } from '@/config'
 
+// #ifdef MP-WEIXIN
+const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
+// #endif
 // 常量索引
 const envVal = {
 	// #ifdef H5
 	imgUrl: `${window.location.protocol}//img.${getFirstHost()}.com`,
 	// #endif
-	// #ifndef H5
-	imgUrl: `http://img.huaml.com`,
+	// #ifdef MP-WEIXIN
+	imgUrl: extConfig.imgHost,
 	// #endif
 	env: process.env.NODE_ENV,
 	// 本地连接地址
@@ -23,9 +26,9 @@ if (ProjectName == 'mobile') {
 	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://m.huaml.com' : `${window.location.protocol}//${window.location.host}`
 	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.m.huaml.com` : `${window.location.protocol}//api.${window.location.host}`
 	// #endif
-	// #ifndef H5
-	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://m.huaml.com' : `https://m.huaml.com`
-	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.m.huaml.com` : `https://api.m.huaml.com`
+	// #ifdef MP-WEIXIN
+	envVal.formal = process.env.NODE_ENV == 'development' ? extConfig.mHost : extConfig.mHost
+	envVal.hostUrl = process.env.NODE_ENV == 'development' ? extConfig.mHost : extConfig.mHost
 	// #endif
 
 	uni.setStorageSync('source', 'mobile')

+ 4 - 5
mobile-code/src/ext.json

@@ -3,10 +3,9 @@
     "extAppid": "wxe4675bab299a52f7",
     "directCommit": false,
     "ext": {
-      "account": 12358,
-      "host": "https://mini.huahb.com",
-      "miniUrl": "https://mini.huahb.com",
-      "imgUrl": "https://img.huahb.com",
-      "merchantName":"花卉宝"
+      "account": 12362,
+      "mHost": "https://api.m.huaml.com",
+      "imgHost": "https://img.huaml.com",
+      "merchantName":"花美灵"
     }
   }

+ 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": "我的"
-			}
-		]
-	}
-}
-

+ 4 - 10
mobile-code/src/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "花卉宝商家后台",
+    "name" : "花卉宝",
     "appid" : "",
     "description" : "应用描述",
     "versionName" : "1.0.0",
@@ -7,13 +7,10 @@
     "transformPx" : true,
     "debug": false,
     "networkTimeout": {
-        "request":200000,
-        "connectSocket": 200000,
-        "uploadFile": 200000,
-        "downloadFile": 200000
+        "request":200000
     },
     "mp-weixin" : {
-        "appid" : "wx3a163add860e0a86",
+        "appid" : "wxe4675bab299a52f7",
         "setting" : {
             "urlCheck" : false
         },
@@ -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": {

+ 17 - 2
mobile-code/src/mixins/globalMixins.js

@@ -1,6 +1,6 @@
 import { mapGetters } from 'vuex'
 import { pageTo, getCheckLogin, isLogin } from '@/utils/util.js'
-import { getUser } from '@/utils/auth'
+import { getUser, wxLoginFn } from '@/utils/auth'
 import constant from '@/constant'
 export default {
 	data() {
@@ -27,7 +27,7 @@ export default {
 		if (option.account) {
 			uni.setStorageSync('account', option.account)
 		}
-		uni.setStorageSync('currentQuery', option)
+		uni.setStorageSync('currentQuery', JSON.stringify(option))
 		// 登录
 		if (constant.source == 'business' || constant.source == 'mobile') {
 			if (isLogin()) {
@@ -36,6 +36,7 @@ export default {
 					// console.log('init', this.init)
 				}
 			} else {
+				// #ifdef H5
 				getCheckLogin().then(res => {
 					if (constant.source == 'business') {
 						if (res) {
@@ -43,6 +44,13 @@ export default {
 						}
 					}
 				})
+				// #endif
+				// #ifdef MP-WEIXIN
+				console.log('afa')
+				wxLoginFn().then(res => {
+					this.init()
+				})
+				// #endif
 			}
 		}
 		if (constant.source == 'official') {
@@ -51,7 +59,14 @@ export default {
 	},
 	mounted() {
 		if (this.mInit) {
+			// #ifdef H5
 			this.mInit()
+			// #endif
+			// #ifdef MP-WEIXIN
+			// wxLoginFn().then(res => {
+			// 	this.mInit()
+			// })
+			// #endif
 			// console.log('init', this.mInit)
 		}
 	}

+ 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": "我的"
 			}
 		]
 	}

+ 0 - 3
mobile-code/src/pages/home/index.vue

@@ -57,9 +57,6 @@ export default {
 			})
 			this._detail()
 		},
-		mInit() {
-			console.log('asfdas')
-		},
 		_detail() {
 			getMainIndex().then(res => {
 				this.data = res.data

+ 1 - 0
mobile-code/src/pages/home/user.vue

@@ -46,6 +46,7 @@
 					<div class="my-surplus">{{ shopUser.userAsset.balance || 0.00 }}</div>
 				</div>
 				<div class="surplus-right">
+					<button class="button-com" v-if="shopUser.isFull != 1" @click="applyVIP">申请会员</button>
 					<button class="button-com" @click="pageToFn({
 					url: '/pages/pay/index',
 					query: {

+ 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;
 

+ 3 - 7
mobile-code/src/utils/auth.js

@@ -95,13 +95,9 @@ export async function wxLoginFn(update) {
 	})
 
 	await postWxCode({ code: getObj.code }).then(subRes => {
-		const { openid, session_key, unionid } = subRes.data
-		dataInfo = subRes.data
-		store.commit('setLoginInfo', {
-			openid,
-			session_key,
-			unionid
-		  })
+		if (UTIL.isEmpty(subRes)) return false
+		uni.setStorageSync('token', subRes.data.token)
+		store.commit('setLoginInfo', subRes.data.user)
 	})
 
 	return dataInfo

+ 9 - 2
mobile-code/src/utils/common.js

@@ -173,13 +173,20 @@ export function isPersonRoleType(roleType) {
  * 是否是微信浏览器
  */
 export function isWxBrowser() {
+	let status = false
+	// #ifdef H5
 	const ua = window.navigator.userAgent.toLowerCase()
 	// 通过正则表达式匹配ua中是否含有MicroMessenger字符串
 	if (ua.match(/MicroMessenger/i) == 'micromessenger') {
-		return true
+		status = true
 	} else {
-		return false
+		status = false
 	}
+	// #endif
+	// #ifdef MP-WEIXIN
+	status = false
+	// #endif
+	return status
 }
 
 /** *

+ 1 - 2
mobile-code/src/utils/util.js

@@ -72,7 +72,6 @@ const checkName = (str) => {
  * @parmas isFrist 为true时开头为&
  */
 export async function getCheckLogin() {
-	console.log('isWxBrowser()', isWxBrowser())
 	let status = false
 	let token = uni.getStorageSync('token')
 	if (token) {
@@ -80,7 +79,7 @@ export async function getCheckLogin() {
 	} else {
 		// #ifdef H5
 		if (isWxBrowser()) {
-			let option = uni.getStorageSync('currentQuery') || {}
+			let option = JSON.parse(uni.getStorageSync('currentQuery')) || {}
 			console.log('option', option)
 			// console.log('option', getMiniAppUrl(option, true))
 			// return false