lalala 6 лет назад
Родитель
Сommit
d0063da7f1

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

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

+ 1 - 1
mobile-code/src/w-config.js → mobile-code/src/m-config.js

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

+ 64 - 0
mobile-code/src/m-manifest.json

@@ -0,0 +1,64 @@
+{
+    "name" : "花卉宝",
+    "appid" : "",
+    "description" : "应用描述",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : true,
+    "debug": false,
+    "networkTimeout": {
+        "request":200000
+    },
+    "mp-weixin" : {
+        "appid" : "wxe4675bab299a52f7",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "请点击确定"
+            }
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "h5" : {
+        "template" : "template.h5.html",
+        "router" : {
+            // "mode" : "history",
+            "base" : "/",
+            "publicPath" : "/"
+        },
+        "async": {
+            "timeout": 200000
+        },
+        "devServer": {
+            "port": 81,
+            "proxy": {
+                "/api": {
+                    "target": "http://api.m.huaml.com",
+                    "secure": false,
+                    "changeOrigin": true,
+                    "pathRewrite": {
+                        "^/api": ""
+                    }
+                }
+            }
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : ""
+                }
+            }
+        }
+    }
+}

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

@@ -0,0 +1,203 @@
+{
+	"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": "我的"
+			}
+		]
+	}
+}
+

+ 2 - 2
mobile-code/src/w-uni.scss → mobile-code/src/m-uni.scss

@@ -8,11 +8,11 @@
 
 /* 颜色变量 */
 /*图片地址*/
-$imgUrl: 'https://img.huaml.com';
+$imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色
-$mainColor: #3385FF;
+$mainColor: #FF2842;
 $mainColor1: #049E2C;
 $auxiliaryColor2: #ff6900;
 

+ 37 - 32
mobile-code/src/manifest.json

@@ -1,41 +1,41 @@
 {
-    "name" : "花卉宝",
-    "appid" : "",
-    "description" : "应用描述",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : true,
+    "name": "花卉宝",
+    "appid": "",
+    "description": "应用描述",
+    "versionName": "1.0.0",
+    "versionCode": "100",
+    "transformPx": true,
     "debug": false,
     "networkTimeout": {
-        "request":200000
+        "request": 200000
     },
-    "mp-weixin" : {
-        "appid" : "wxe4675bab299a52f7",
-        "setting" : {
-            "urlCheck" : false
+    "mp-weixin": {
+        "appid": "wx3a163add860e0a86",
+        "setting": {
+            "urlCheck": false
         },
-        "usingComponents" : true,
-        "permission" : {
-            "scope.userLocation" : {
-                "desc" : "请点击确定"
+        "usingComponents": true,
+        "permission": {
+            "scope.userLocation": {
+                "desc": "请点击确定"
             }
         }
     },
-    "mp-alipay" : {
-        "usingComponents" : true
+    "mp-alipay": {
+        "usingComponents": true
     },
-    "mp-baidu" : {
-        "usingComponents" : true
+    "mp-baidu": {
+        "usingComponents": true
     },
-    "mp-toutiao" : {
-        "usingComponents" : true
+    "mp-toutiao": {
+        "usingComponents": true
     },
-    "h5" : {
-        "template" : "template.h5.html",
-        "router" : {
+    "h5": {
+        "template": "template.h5.html",
+        "router": {
             // "mode" : "history",
-            "base" : "/",
-            "publicPath" : "/"
+            "base": "/",
+            "publicPath": "/"
         },
         "async": {
             "timeout": 200000
@@ -44,7 +44,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.m.huaml.com",
+                    "target": "http://api.w.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {
@@ -53,12 +53,17 @@
                 }
             }
         },
-        "sdkConfigs" : {
-            "maps" : {
-                "qqmap" : {
-                    "key" : ""
+        "sdkConfigs": {
+            "maps": {
+                "qqmap": {
+                    "key": ""
                 }
             }
+        },
+        "optimization": {
+            "treeShaking": {
+                "enable": true
+            }
         }
     }
-}
+}

+ 14 - 10
mobile-code/src/official/apply.vue

@@ -65,7 +65,7 @@ import AppAvatarModule from '@/components/module/app-avatar'
 const form = require('@/utils/formValidation.js')
 // api
 import { merchantDet, applyRegister, sendSms, regionTreeW } from '@/api/official'
-import { getShopUser } from '@/utils/auth'
+// import { getShopUser } from '@/utils/auth'
 export default {
 	name: 'apply-data',
 	components: {
@@ -100,19 +100,23 @@ export default {
 		}
 	},
 	onLoad() {
-		if (!this.$util.isLogin()) {
-			getShopUser()
-			return false
-		}
+		// if (!this.$util.isLogin()) {
+		// 	// getShopUser()
+		// 	return false
+		// }
 		// this.init()
 	},
 	methods: {
 		init() {
-			let id = this.option.merchantId
-			if (id) {
-				this._getMerchantDet()
-			}
-			this._regionTree()
+			this.$util.getCheckLogin().then(res => {
+				if (res) {
+					let id = this.option.merchantId
+					if (id) {
+						this._getMerchantDet()
+					}
+					this._regionTree()
+				}
+			})
 		},
 		_regionTree() {
 			regionTreeW().then(res => {

+ 13 - 9
mobile-code/src/official/callback.vue

@@ -81,7 +81,7 @@
 	 * @parmas 7 授权提示 - 扫码支付 -- successPayCode
 	 */
 import { accountDet, applyStatus, getAuthUrl } from '@/api/official'
-import { getShopUser } from '@/utils/auth'
+// import { getShopUser } from '@/utils/auth'
 export default {
 	name: 'callback',
 	data() {
@@ -130,10 +130,10 @@ export default {
 		}
 	},
 	onLoad() {
-		if (!this.$util.isLogin()) {
-			getShopUser()
-			return false
-		}
+		// if (!this.$util.isLogin()) {
+		// 	getShopUser()
+		// 	return false
+		// }
 	},
 	mounted() {
 		// this.pageStatus = this.option.pageStatus
@@ -141,10 +141,14 @@ export default {
 	},
 	methods: {
 		init() {
-			this._getStatus()
-			if (this.pageStatus == 1 || this.pageStatus == 5) {
-				this._accountDet()
-			}
+			this.$util.getCheckLogin().then(res => {
+				if (res) {
+					this._getStatus()
+					if (this.pageStatus == 1 || this.pageStatus == 5) {
+						this._accountDet()
+					}
+				}
+			})
 		},
 		// 获取状态
 		_getStatus() {

+ 10 - 6
mobile-code/src/official/pay.vue

@@ -40,7 +40,7 @@
 </template>
 
 <script>
-import { getShopUser } from '@/utils/auth'
+// import { getShopUser } from '@/utils/auth'
 import wexinPay from '@/utils/pay/wxPay'
 import { getMealDet, renewWxPay } from '@/api/official'
 export default {
@@ -53,15 +53,19 @@ export default {
 		}
 	},
 	onLoad() {
-		if (!this.$util.isLogin()) {
-			getShopUser()
-			return false
-		}
+		// if (!this.$util.isLogin()) {
+		// 	getShopUser()
+		// 	return false
+		// }
 		// this.init()
 	},
 	methods: {
 		init() {
-			this._getMealDet()
+			this.$util.getCheckLogin().then(res => {
+				if (res) {
+					this._getMealDet()
+				}
+			})
 		},
 		_getMealDet() {
 			getMealDet({ id: 1 }).then(res => {

+ 8 - 174
mobile-code/src/pages.json

@@ -1,163 +1,28 @@
 {
 	"pages": [
 		{
-			"path": "pages/home/index",
+			"path": "official/index",
 			"style": {
-				"navigationBarTitleText": "加载中..."
+				"navigationBarTitleText": "花卉宝"
 			}
 		},
 		{
-			"path": "pages/home/category",
+			"path": "official/apply",
 			"style": {
-				"navigationBarTitleText": "分类"
+				"navigationBarTitleText": "填写资料"
 			}
 		},
 		{
-			"path": "pages/home/shop",
+			"path": "official/pay",
 			"style": {
-				"navigationBarTitleText": "门店"
+				"navigationBarTitleText": "支付"
 			}
 		},
 		{
-			"path": "pages/home/user",
+			"path": "official/callback",
 			"style": {
-				"navigationBarTitleText": "我的"
+				"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": {
@@ -167,37 +32,6 @@
 		"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": "我的"
-			}
-		]
 	}
 }
 

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

@@ -8,11 +8,11 @@
 
 /* 颜色变量 */
 /*图片地址*/
-$imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
+$imgUrl: 'https://img.huaml.com';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色
-$mainColor: #FF2842;
+$mainColor: #3385FF;
 $mainColor1: #049E2C;
 $auxiliaryColor2: #ff6900;
 

+ 0 - 69
mobile-code/src/w-manifest.json

@@ -1,69 +0,0 @@
-{
-    "name": "花卉宝",
-    "appid": "",
-    "description": "应用描述",
-    "versionName": "1.0.0",
-    "versionCode": "100",
-    "transformPx": true,
-    "debug": false,
-    "networkTimeout": {
-        "request": 200000
-    },
-    "mp-weixin": {
-        "appid": "wx3a163add860e0a86",
-        "setting": {
-            "urlCheck": false
-        },
-        "usingComponents": true,
-        "permission": {
-            "scope.userLocation": {
-                "desc": "请点击确定"
-            }
-        }
-    },
-    "mp-alipay": {
-        "usingComponents": true
-    },
-    "mp-baidu": {
-        "usingComponents": true
-    },
-    "mp-toutiao": {
-        "usingComponents": true
-    },
-    "h5": {
-        "template": "template.h5.html",
-        "router": {
-            // "mode" : "history",
-            "base": "/",
-            "publicPath": "/"
-        },
-        "async": {
-            "timeout": 200000
-        },
-        "devServer": {
-            "port": 81,
-            "proxy": {
-                "/api": {
-                    "target": "http://api.w.huaml.com",
-                    "secure": false,
-                    "changeOrigin": true,
-                    "pathRewrite": {
-                        "^/api": ""
-                    }
-                }
-            }
-        },
-        "sdkConfigs": {
-            "maps": {
-                "qqmap": {
-                    "key": ""
-                }
-            }
-        },
-        "optimization": {
-            "treeShaking": {
-                "enable": true
-            }
-        }
-    }
-}

+ 0 - 37
mobile-code/src/w-pages.json

@@ -1,37 +0,0 @@
-{
-	"pages": [
-		{
-			"path": "official/index",
-			"style": {
-				"navigationBarTitleText": "花卉宝"
-			}
-		},
-		{
-			"path": "official/apply",
-			"style": {
-				"navigationBarTitleText": "填写资料"
-			}
-		},
-		{
-			"path": "official/pay",
-			"style": {
-				"navigationBarTitleText": "支付"
-			}
-		},
-		{
-			"path": "official/callback",
-			"style": {
-				"navigationBarTitleText": "支付"
-			}
-		}
-	],
-	"globalStyle": {
-		// #ifdef H5
-		"navigationStyle": "custom",
-		// #endif
-		"navigationBarBackgroundColor": "#fff",
-		"navigationBarTitleText": "花卉宝",
-		"navigationBarTextStyle": "black"
-	}
-}
-