lalala пре 6 година
родитељ
комит
dffec58ef0

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

@@ -18,7 +18,7 @@ export default {
 		// #endif
 		// #endif
 		// 开发
 		// 开发
 		if (process.env.NODE_ENV == 'development') {
 		if (process.env.NODE_ENV == 'development') {
-			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfMTI1NDM3NDUifQ.eyJpc3MiOiJodHRwOlwvXC9hcGkubS5odWFtbC5jb20iLCJhdWQiOiJodHRwOlwvXC9hcGkubS5odWFtbC5jb20iLCJqdGkiOiIwXzEyNTQzNzQ1IiwiaWF0IjoxNTgyNDY3MzYwLCJuYmYiOjE1ODI0NjczNjAsImV4cCI6MTU5MTEwNzM2MCwidW5pcXVlSWQiOiIxMjU0Mzc0NSIsInNvdXJjZUlkIjowfQ.i2IR_7lDqf9Cq3z7p6xDY2hLXNA8QbsCRHGl1uK4_4E')
+			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfMTI1NDM3NDUifQ.eyJpc3MiOiJodHRwOlwvXC9hcGkubS5odWFtbC5jb20iLCJhdWQiOiJodHRwOlwvXC9hcGkubS5odWFtbC5jb20iLCJqdGkiOiIwXzEyNTQzNzQ1IiwiaWF0IjoxNTgyNDY5NDIzLCJuYmYiOjE1ODI0Njk0MjMsImV4cCI6MTU5MTEwOTQyMywidW5pcXVlSWQiOiIxMjU0Mzc0NSIsInNvdXJjZUlkIjowfQ.ebTPvzLj4aI8F4iLHy_UdsVlAI-KyzErGQbJhPL1YRY')
 			uni.setStorageSync('account', '12362')
 			uni.setStorageSync('account', '12362')
 		}
 		}
 	},
 	},

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

@@ -287,7 +287,9 @@
 			},
 			},
 			// 续费
 			// 续费
 			renewFn() {
 			renewFn() {
+				// #ifdef H5
 				location.href = `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?merchantId=${this.userInfo.extend.merchantId}&pay=1`
 				location.href = `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?merchantId=${this.userInfo.extend.merchantId}&pay=1`
+				// #endif
 			}
 			}
 		}
 		}
 	}
 	}

+ 2 - 0
mobile-code/src/common/redirect.vue

@@ -45,7 +45,9 @@ export default {
 		compatible() {
 		compatible() {
 			uni.hideLoading()
 			uni.hideLoading()
 			if (this.option.type == 'invite') {
 			if (this.option.type == 'invite') {
+				// #ifdef H5
 				location.href = decodeURIComponent(this.option.redirectUrl)
 				location.href = decodeURIComponent(this.option.redirectUrl)
+				// #endif
 			}
 			}
 			// uni.redirectTo({
 			// uni.redirectTo({
 			// 	url: `/pages/page/login/index`
 			// 	url: `/pages/page/login/index`

+ 7 - 1
mobile-code/src/constant/index.js

@@ -61,9 +61,15 @@ if (ProjectName == 'mobile') {
 console.log(envVal)
 console.log(envVal)
 
 
 function getFirstHost() {
 function getFirstHost() {
-	let host = window.location.host
+	let host = ''
+	// #ifdef H5
+	host = window.location.host
 	host = host.split('.')
 	host = host.split('.')
 	host = host.length == 3 ? host[1] : host[0]
 	host = host.length == 3 ? host[1] : host[0]
+	// #endif
+	// #ifndef H5
+	host = extConfig.mHost
+	// #endif
 	return process.env.NODE_ENV == 'development' ? 'huaml' : host
 	return process.env.NODE_ENV == 'development' ? 'huaml' : host
 }
 }
 
 

+ 4 - 0
mobile-code/src/official/callback.vue

@@ -183,10 +183,14 @@
 					// 		id: this.option.id
 					// 		id: this.option.id
 					// 	}
 					// 	}
 					// })
 					// })
+					// #ifdef H5
 					location.href = `${window.location.protocol}//b.${this.$constant.firstHost}.com/#/`
 					location.href = `${window.location.protocol}//b.${this.$constant.firstHost}.com/#/`
+					// #endif
 				} else if (this.btnText == '开始授权') {
 				} else if (this.btnText == '开始授权') {
 					getAuthUrl().then(res => {
 					getAuthUrl().then(res => {
+						// #ifdef H5
 						location.href = res.data.url
 						location.href = res.data.url
+						// #endif
 					})
 					})
 					// this.$msg('功能待对接!')
 					// this.$msg('功能待对接!')
 				}
 				}

+ 1 - 1
mobile-code/src/pages.json

@@ -3,7 +3,7 @@
 		{
 		{
 			"path": "pages/home/index",
 			"path": "pages/home/index",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "加载中..."
+				"navigationBarTitleText": ""
 			}
 			}
 		},
 		},
 		{
 		{

+ 6 - 1
mobile-code/src/pages/interest/invite.vue

@@ -146,7 +146,12 @@
 						title: `${res.merchantName}`, // 分享标题
 						title: `${res.merchantName}`, // 分享标题
 						desc: '这家店不错推荐给你', // 分享内容
 						desc: '这家店不错推荐给你', // 分享内容
 						imgUrl: res.smallAvatarUrl,
 						imgUrl: res.smallAvatarUrl,
-						pagePath: `${window.location.protocol}//m.${this.$constant.firstHost}.com/#/pages/home/shop?account=${res.merchantId}&introUserId=${res.id}`
+						// #ifdef H5
+						pagePath: `${window.location.protocol}//m.${this.$constant.firstHost}.com/#/pages/home/shop?account=${res.merchantId}&introUserId=${res.id}`,
+						// #endif
+						// #ifndef H5
+						pagePath: `/pages/home/shop?account=${res.merchantId}&introUserId=${res.id}`
+						// #endif
 					}
 					}
 					this.jweixinFn(shareParams)
 					this.jweixinFn(shareParams)
 
 

+ 7 - 2
mobile-code/src/pages/pay/index.vue

@@ -196,8 +196,13 @@
 						let shareParams = {
 						let shareParams = {
 							title: `点我付款`, // 分享标题
 							title: `点我付款`, // 分享标题
 							desc: '享随机优惠,最高20元', // 分享内容
 							desc: '享随机优惠,最高20元', // 分享内容
-							imgUrl: `${window.location.protocol}//img.${this.$constant.firstHost}.com/retail/pay.jpg`,
-							pagePath: `${window.location.protocol}//m.${this.$constant.firstHost}.com/#/pages/pay/index?account=${res.merchantId}&sourceType=2`
+							imgUrl: `${this.$constant.imgUrl}/retail/pay.jpg`,
+							// #ifdef H5
+							pagePath: `${this.$constant.formal}/#/pages/pay/index?account=${res.merchantId}&sourceType=2`,
+							// #endif
+							// #ifndef H5
+							pagePath: `/pages/pay/index?account=${res.merchantId}&sourceType=2`
+							// #endif
 						}
 						}
 						this.jweixinFn(shareParams)
 						this.jweixinFn(shareParams)
 					})
 					})