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

+ 2 - 2
mobile-code/src/admin/home/workbench.vue

@@ -87,7 +87,7 @@
 	import FabModule from '@/components/plugin/fab'
 	import AppAvatarModule from '@/components/module/app-avatar'
 	import ModalModule from '@/components/plugin/modal'
-	import { getDataTimestamp, getFirstHost } from '@/utils/common'
+	import { getDataTimestamp } from '@/utils/common'
 	// api
 	import { getUser } from '@/utils/auth'
 	import { consoleIndex } from '@/api/workbench'
@@ -287,7 +287,7 @@
 			},
 			// 续费
 			renewFn() {
-				location.href = `${window.location.protocol}//www.${getFirstHost()}.com/#/?payMerchantId=${this.userInfo.extend.merchantId}&pay=1`
+				location.href = `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?payMerchantId=${this.userInfo.extend.merchantId}&pay=1`
 			}
 		}
 	}

+ 134 - 119
mobile-code/src/admin/interest/my-invite.vue

@@ -10,7 +10,7 @@
 							<div class="app-color-3">三级代理</div>
 						</div>
 					</div>
-					<div class="user-wrap-right">
+					<div class="user-wrap-right" @click="showShare = true">
 						<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
 					</div>
 				</div>
@@ -51,135 +51,150 @@
 				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 			</block>
 		</div>
+		<app-share-mask :show="showShare" @click="showShare = false" />
 	</div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import AppTabs from '@/components/plugin/tabs'
-import AppAvatarModule from '@/components/module/app-avatar'
-import AppWrapperEmpty from '@/components/app-wrapper-empty'
-import { list } from '@/mixins'
-// api
-import { assetDet, applyList } from '@/api/proxy'
-export default {
-	name: 'my-invite-list',
-	components: {
-		AppTabs,
-		AppAvatarModule,
-		AppWrapperEmpty
-	},
-	mixins: [list],
-	data() {
-		return {
-			constant: this.$constant,
-			data: {},
-			tabIndex: 0,
-			tabs: [
-				{
-					name: '全部'
-				},
-				{
-					name: '待审核'
-				},
-				{
-					name: '试用中'
-				},
-				{
-					name: '已付费'
-				},
-				{
-					name: '已到期'
-				}
-			],
-			// 用户数据
-			userData: [
-				{
-					name: '账号余额(¥)',
-					value: 0,
-					// btn: '提现'
-				},
-				{
-					name: '邀请花店',
-					value: 0
-				},
-				{
-					name: '付费花店',
-					value: 0
-				},
-				{
-					name: '累计收益(¥)',
-					value: 0
-				}
-			]
-		}
-	},
-	computed: {
-		...mapGetters({ userInfo: 'getUser' })
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			this._assetDet()
-			this._applyList()
-		},
-		_assetDet() {
-			assetDet().then(res => {
-				if (this.$util.isEmpty(res.data)) return false
-				this.data = res.data
-				this.userData[0].value = res.data.balance
-				this.userData[1].value = res.data.inviteNum
-				this.userData[2].value = res.data.payNum
-				this.userData[3].value = res.data.income
-			})
+	import { mapGetters } from 'vuex'
+	import AppTabs from '@/components/plugin/tabs'
+	import AppAvatarModule from '@/components/module/app-avatar'
+	import AppWrapperEmpty from '@/components/app-wrapper-empty'
+	import AppShareMask from '@/components/module/app-share-mask'
+	import { list, share } from '@/mixins'
+	// api
+	import { getUser } from '@/utils/auth'
+	import { assetDet, applyList } from '@/api/proxy'
+	export default {
+		name: 'my-invite-list',
+		components: {
+			AppTabs,
+			AppAvatarModule,
+			AppWrapperEmpty,
+			AppShareMask
 		},
-		_applyList() {
-			let status = this.getStatus(this.tabIndex)
-			return applyList({ status: status }).then(res => {
-				this.completes(res)
-			})
-		},
-		// operate
-		change(e) {
-			if (this.tabIndex == e.index) {
-				return false
-			} else {
-				this.tabIndex = e.index
-				this.resetList()
-				this._applyList()
+		mixins: [list, share],
+		data() {
+			return {
+				constant: this.$constant,
+				showShare: false,
+				data: {},
+				tabIndex: 0,
+				tabs: [
+					{
+						name: '全部'
+					},
+					{
+						name: '待审核'
+					},
+					{
+						name: '试用中'
+					},
+					{
+						name: '已付费'
+					},
+					{
+						name: '已到期'
+					}
+				],
+				// 用户数据
+				userData: [
+					{
+						name: '账号余额(¥)',
+						value: 0
+						// btn: '提现'
+					},
+					{
+						name: '邀请花店',
+						value: 0
+					},
+					{
+						name: '付费花店',
+						value: 0
+					},
+					{
+						name: '累计收益(¥)',
+						value: 0
+					}
+				]
 			}
 		},
-		withdrawFn() {
-			this.$msg('功能开发中...')
+		computed: {
+			...mapGetters({ userInfo: 'getUser' })
+		},
+		onLoad() {
+			// this.init()
 		},
-		getStatus(e) {
-			let val = ''
-			switch (e) {
-				case 0:
-					val = -1
-					break
-				case 1:
-					val = 0
-					break
-				case 2:
-					val = 1
-					break
-				case 3:
-					val = 3
-					break
-				case 4:
-					val = 4
-					break
-				default:
-					val = -1
-					break
+		methods: {
+			init() {
+				this._assetDet()
+				this._applyList()
+				
+				getUser().then(res => {
+					let params = {
+						title: '我是分享标题', // 分享标题
+						desc: '我是分享内容', // 分享内容
+						imgUrl: 'http://a.huahb.com/images/avatar.jpg',
+						pagePath: `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?introMerchantId=${this.userInfo.extend.merchantId}`
+					}
+					this.jweixinFn(params)
+				})
+			},
+			_assetDet() {
+				assetDet().then(res => {
+					if (this.$util.isEmpty(res.data)) return false
+					this.data = res.data
+					this.userData[0].value = res.data.balance
+					this.userData[1].value = res.data.inviteNum
+					this.userData[2].value = res.data.payNum
+					this.userData[3].value = res.data.income
+				})
+			},
+			_applyList() {
+				let status = this.getStatus(this.tabIndex)
+				return applyList({ status: status }).then(res => {
+					this.completes(res)
+				})
+			},
+			// operate
+			change(e) {
+				if (this.tabIndex == e.index) {
+					return false
+				} else {
+					this.tabIndex = e.index
+					this.resetList()
+					this._applyList()
+				}
+			},
+			withdrawFn() {
+				this.$msg('功能开发中...')
+			},
+			getStatus(e) {
+				let val = ''
+				switch (e) {
+					case 0:
+						val = -1
+						break
+					case 1:
+						val = 0
+						break
+					case 2:
+						val = 1
+						break
+					case 3:
+						val = 3
+						break
+					case 4:
+						val = 4
+						break
+					default:
+						val = -1
+						break
+				}
+				return val
 			}
-			return val
 		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>

+ 3 - 0
mobile-code/src/api/common/index.js

@@ -28,3 +28,6 @@ export const sendSms = param => https.get('/inform-user/send-sms', param)
 
 // 地图查询 m b s w
 export const suggestion = param => https.get('/map/suggestion', param)
+
+// 微信分享 m b
+export const wxShare = data => https.post('wx-share/get-params', data)

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

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

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

@@ -1,318 +0,0 @@
-{
-	"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": "客户"
-			}
-		]
-	}
-}
-

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

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

+ 10 - 2
mobile-code/src/constant/index.js

@@ -1,5 +1,4 @@
 import { ProjectName } from '@/config'
-import { getFirstHost } from '@/utils/common'
 
 // #ifdef MP-WEIXIN
 const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
@@ -18,7 +17,9 @@ const envVal = {
 	// 请求接口地址
 	formal: null,
 	// 项目来源
-	source: ProjectName
+	source: ProjectName,
+	// 第一个host
+	firstHost: getFirstHost()
 }
 
 // 项目配置
@@ -59,4 +60,11 @@ if (ProjectName == 'mobile') {
 
 console.log(envVal)
 
+function getFirstHost() {
+	let host = window.location.host
+	host = host.split('.')
+	host = host.length == 3 ? host[1] : host[0]
+	return process.env.NODE_ENV == 'development' ? 'huaml' : host
+}
+
 export default envVal

+ 2 - 2
mobile-code/src/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": {

+ 20 - 21
mobile-code/src/mixins/share.js

@@ -1,10 +1,8 @@
 // #ifdef H5
 import jweixin from 'jweixin-module'
-import { wechatJssdk } from '@/api/common'
+import { wxShare } from '@/api/common'
 // #endif
 
-// import { shareStatisc } from '@/api/buriedPoint/index'
-
 export default {
 	data() {
 		return {
@@ -21,10 +19,10 @@ export default {
 		async jweixinFn(data) {
 			let that = this
 			function success() {
-				that.shareStatiscFN(data.linkurl, data.owner_user_id, data.puser_id)
+				// that.shareStatiscFN(data.linkurl, data.owner_user_id, data.puser_id)
 			}
 			// #ifdef H5
-			await that.getWeiXinOptin() // 需在用户可能点击分享按钮前就先调用
+			await that.getWeiXinOptin(data) // 需在用户可能点击分享按钮前就先调用
 			jweixin.ready(function() {
 				let option = {
 					title: data.title, // 分享标题
@@ -53,30 +51,31 @@ export default {
 		},
 
 		// ==分享统计回调==
-		shareStatiscFN(res, owner_user_id, puser_id) {
-			const userid = uni.getStorageSync('user_id') || null
-			const params = {}
-			if (userid == owner_user_id) {
-				params.share_user_id = userid
-				params.owner_user_id = owner_user_id
-			} else {
-				params.owner_user_id = owner_user_id
-				params.share_user_id = userid
-				params.p_share_user_id = puser_id
-			}
-			// shareStatisc(params)
-		},
+		// shareStatiscFN(res, owner_user_id, puser_id) {
+		// 	const userid = uni.getStorageSync('user_id') || null
+		// 	const params = {}
+		// 	if (userid == owner_user_id) {
+		// 		params.share_user_id = userid
+		// 		params.owner_user_id = owner_user_id
+		// 	} else {
+		// 		params.owner_user_id = owner_user_id
+		// 		params.share_user_id = userid
+		// 		params.p_share_user_id = puser_id
+		// 	}
+		// 	// shareStatisc(params)
+		// },
 		/**
 		 * jsSdk入权限验证配置
 		 * @parmas apiList 为需要获取的微信jsdk的接口列表
 		 */
-		getWeiXinOptin(apiList = ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareWeibo']) {
+		getWeiXinOptin(data, apiList = ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareWeibo']) {
 			return new Promise((resolve, reject) => {
 				const params = {
-					url: location.origin
+					// url: location.origin
+					url: data.pagePath
 				}
 				const jsApiList = apiList
-				wechatJssdk(params).then(res => {
+				wxShare(params).then(res => {
 					let resdata = res.data
 					jweixin.config({
 						debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

+ 1 - 2
mobile-code/src/official/callback.vue

@@ -83,7 +83,6 @@
 	 * @parmas 6 授权成功 - 扫码支付 -- successPayCode
 	 * @parmas 7 授权提示 - 扫码支付 -- successPayCode
 	 */
-	import { getFirstHost } from '@/utils/common'
 	// api
 	import { accountDet, applyStatus, getAuthUrl } from '@/api/official'
 	// import { getShopUser } from '@/utils/auth'
@@ -184,7 +183,7 @@
 					// 		id: this.option.id
 					// 	}
 					// })
-					location.href = `${window.location.protocol}//b.${getFirstHost()}.com/#/`
+					location.href = `${window.location.protocol}//b.${this.$constant.firstHost}.com/#/`
 				} else if (this.btnText == '开始授权') {
 					getAuthUrl().then(res => {
 						location.href = res.data.url

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

@@ -1,28 +1,284 @@
 {
 	"pages": [
 		{
-			"path": "official/index",
+			"path": "admin/home/workbench",
 			"style": {
-				"navigationBarTitleText": "花卉宝"
+				"navigationBarTitleText": "工作台"
 			}
 		},
 		{
-			"path": "official/apply",
+			"path": "admin/home/order",
 			"style": {
-				"navigationBarTitleText": "填写资料"
+				"navigationBarTitleText": "订单"
 			}
 		},
 		{
-			"path": "official/pay",
+			"path": "admin/home/member",
 			"style": {
-				"navigationBarTitleText": "支付"
+				"navigationBarTitleText": "客户"
 			}
 		},
 		{
-			"path": "official/callback",
+			"path": "pages/common/redirect",
 			"style": {
-				"navigationBarTitleText": "支付"
+				"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": {
@@ -32,6 +288,31 @@
 		"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://img.huaml.com';
+$imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色

+ 1 - 12
mobile-code/src/utils/common.js

@@ -480,16 +480,6 @@ export function bubbleSort(array) {
 	}
 }
 
-/** *
- * 获取host第一个值
- */
-export function getFirstHost() {
-	let host = window.location.host
-	host = host.split('.')
-	host = host.length == 3 ? host[1] : host[0]
-	return process.env.NODE_ENV == 'development' ? 'huaml' : host
-}
-
 export default {
 	copyText,
 	deepCopy,
@@ -511,6 +501,5 @@ export default {
 	verifiPhone,
 	calcDistance,
 	upLoadImg,
-	bubbleSort,
-	getFirstHost
+	bubbleSort
 }

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

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

+ 2 - 2
mobile-code/src/b-manifest.json → mobile-code/src/w-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": {

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

@@ -0,0 +1,37 @@
+{
+	"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"
+	}
+}
+

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

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