lalala %!s(int64=6) %!d(string=hai) anos
pai
achega
0cdaa75108

+ 7 - 0
mobile-code/src/api/official/index.js

@@ -54,3 +54,10 @@ export const accountDet = data => {
 export const getAuthUrl = data => {
 	return https.get('/wx-open/get-auth-url', data)
 }
+
+/** *
+ * 开始授权 w
+ */
+export const getIntroduce = data => {
+	return https.get('/merchant/introduce-shop', data)
+}

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

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

+ 2 - 2
mobile-code/src/w-manifest.json → mobile-code/src/b-manifest.json

@@ -83,7 +83,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx3a163add860e0a86",
+        "appid" : "wxe4675bab299a52f7",
         "setting" : {
             "urlCheck" : false
         },
@@ -121,7 +121,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.w.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": "common/redirect",
+			"style": {
+				"navigationBarTitleText": "加载中..."
+			}
+		},
+		{
+			"path": "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/w-uni.scss → mobile-code/src/b-uni.scss

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

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

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

+ 2 - 2
mobile-code/src/manifest.json

@@ -83,7 +83,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxe4675bab299a52f7",
+        "appid" : "wx3a163add860e0a86",
         "setting" : {
             "urlCheck" : false
         },
@@ -121,7 +121,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.b.huaml.com",
+                    "target": "http://api.w.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 9 - 4
mobile-code/src/official/apply.vue

@@ -41,7 +41,7 @@
 					<app-avatar-module :src="merchantData.smallLogoUrl" :width="78" alt="推荐人头像" />
 					<div class="recommend-info">
 						<div class="app-size-32">{{ merchantData.merchantName }}</div>
-						<div class="app-color-2">{{ merchantData.address }}</div>
+						<div class="app-color-2">{{ merchantData.fullAddress }}</div>
 					</div>
 				</div>
 			</div>
@@ -64,7 +64,7 @@
 	import AppAvatarModule from '@/components/module/app-avatar'
 	const form = require('@/utils/formValidation.js')
 	// api
-	import { merchantDet, applyRegister, sendSmsW, regionTreeW } from '@/api/official'
+	import { getIntroduce, applyRegister, sendSmsW, regionTreeW } from '@/api/official'
 	// import { getShopUser } from '@/utils/auth'
 	export default {
 		name: 'apply-data',
@@ -111,10 +111,12 @@
 			init() {
 				this.$util.getCheckLogin().then(res => {
 					if (res) {
-						let id = this.option.merchantId
+						// #ifdef H5
+						let id = sessionStorage.getItem('introMerchantId')
 						if (id) {
 							this._getMerchantDet()
 						}
+						// #endif
 						this._regionTree()
 					}
 				})
@@ -125,9 +127,12 @@
 				})
 			},
 			_getMerchantDet() {
-				merchantDet({ id: this.option.merchantId }).then(res => {
+				// #ifdef H5
+				let id = sessionStorage.getItem('introMerchantId')
+				getIntroduce({ id: id }).then(res => {
 					this.merchantData = res.data
 				})
+				// #endif
 			},
 			// ==============
 			confirmFn() {

+ 8 - 0
mobile-code/src/official/index.vue

@@ -137,6 +137,7 @@
 		},
 		methods: {
 			init() {
+				// 续费
 				if (this.option.pay == 1) {
 					// #ifdef H5
 					this.status = 3
@@ -147,6 +148,13 @@
 					sessionStorage.removeItem('renewOption')
 					// #endif
 				}
+
+				// 邀请新华店
+				if (this.option.introMerchantId) {
+					// #ifdef H5
+					sessionStorage.setItem('introMerchantId', this.option.introMerchantId)
+					// #endif
+				}
 				// let token = uni.getStorageSync('token')
 				// if (token) {
 				// 	this._getDet()

+ 1 - 1
mobile-code/src/official/pay.vue

@@ -87,7 +87,7 @@
 				})
 			},
 			wxPay() {
-				renewWxPay({ id: this.detail.id, merchantId: this.renewOption.payMerchantId }).then(res => {
+				renewWxPay({ id: this.detail.id, merchantId: this.renewOption.merchantId }).then(res => {
 					wexinPay(res.data, this.paySuccess, this.payFail)
 				})
 			},

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

@@ -1,284 +1,28 @@
 {
 	"pages": [
 		{
-			"path": "admin/home/workbench",
+			"path": "official/index",
 			"style": {
-				"navigationBarTitleText": "工作台"
+				"navigationBarTitleText": "花卉宝"
 			}
 		},
 		{
-			"path": "admin/home/order",
+			"path": "official/apply",
 			"style": {
-				"navigationBarTitleText": "订单"
+				"navigationBarTitleText": "填写资料"
 			}
 		},
 		{
-			"path": "admin/home/member",
+			"path": "official/pay",
 			"style": {
-				"navigationBarTitleText": "客户"
+				"navigationBarTitleText": "支付"
 			}
 		},
 		{
-			"path": "common/redirect",
+			"path": "official/callback",
 			"style": {
-				"navigationBarTitleText": "加载中..."
+				"navigationBarTitleText": "支付"
 			}
-		},
-		{
-			"path": "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": {
@@ -288,31 +32,6 @@
 		"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/uni.scss

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

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

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

+ 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"
-	}
-}
-