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

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

@@ -16,10 +16,10 @@ export default {
 		uni.setStorageSync('account', extConfig.account)
 		uni.setStorageSync('account', extConfig.account)
 		// #endif
 		// #endif
 		// 开发
 		// 开发
-		if (process.env.NODE_ENV == 'development') {
+		// if (process.env.NODE_ENV == 'development') {
 			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfNyJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLmIuaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5iLmh1YW1sLmNvbSIsImp0aSI6IjBfNyIsImlhdCI6MTU4MjAyOTY2MywibmJmIjoxNTgyMDI5NjYzLCJleHAiOjE1OTA2Njk2NjMsInVuaXF1ZUlkIjoiNyIsInNvdXJjZUlkIjowfQ.v04WwuiNYArwrCzERY--uB3mWx4r2Za2R0chdjdTZF4')
 			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfNyJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLmIuaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5iLmh1YW1sLmNvbSIsImp0aSI6IjBfNyIsImlhdCI6MTU4MjAyOTY2MywibmJmIjoxNTgyMDI5NjYzLCJleHAiOjE1OTA2Njk2NjMsInVuaXF1ZUlkIjoiNyIsInNvdXJjZUlkIjowfQ.v04WwuiNYArwrCzERY--uB3mWx4r2Za2R0chdjdTZF4')
 			uni.setStorageSync('account', '12362')
 			uni.setStorageSync('account', '12362')
-		}
+		// }
 	},
 	},
 	onShow() {
 	onShow() {
 		// this.isLogin()
 		// this.isLogin()

+ 5 - 3
mobile-code/src/admin/interest/my-invite.vue

@@ -131,11 +131,13 @@
 				this._applyList()
 				this._applyList()
 				
 				
 				getUser().then(res => {
 				getUser().then(res => {
+					let redirectUrl = `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?introMerchantId=${this.userInfo.extend.merchantId}`
+					
 					let params = {
 					let params = {
-						title: '我是分享标题', // 分享标题
-						desc: '我是分享内容', // 分享内容
+						title: '花卉宝花店管理系统', // 分享标题
+						desc: '帮你轻松开店', // 分享内容
 						imgUrl: 'http://a.huahb.com/images/avatar.jpg',
 						imgUrl: 'http://a.huahb.com/images/avatar.jpg',
-						pagePath: `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?introMerchantId=${this.userInfo.extend.merchantId}`
+						pagePath: `${window.location.protocol}//b.${this.$constant.firstHost}.com/#/common/redirect?redirectUrl=${encodeURIComponent(redirectUrl)}&type=invite`
 					}
 					}
 					this.jweixinFn(params)
 					this.jweixinFn(params)
 				})
 				})

+ 1 - 1
mobile-code/src/api/common/index.js

@@ -30,4 +30,4 @@ export const sendSms = param => https.get('/inform-user/send-sms', param)
 export const suggestion = param => https.get('/map/suggestion', param)
 export const suggestion = param => https.get('/map/suggestion', param)
 
 
 // 微信分享 m b
 // 微信分享 m b
-export const wxShare = data => https.post('wx-share/get-params', data)
+export const wxShare = data => https.post('/wx-share/get-params', data)

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

@@ -0,0 +1,63 @@
+<template>
+    <div class="app-content">
+		<!-- <div class="prompt-text">加载中 . . .</div> -->
+	</div>
+</template>
+<script>
+import { mapGetters, mapState, mapActions } from 'vuex'
+import { getWxQrCodeQuery } from '@/api/common'
+export default {
+	data() {
+		return {
+		}
+	},
+	computed: {
+		// ...mapGetters({ userInfo: 'getSelfInfo' })
+	},
+	onLoad(options) {
+		uni.showLoading({
+			title: '加载中...'
+		})
+		if (options.redirectUrl) {
+			this.compatible()
+		}
+		// this._getWxQrCodeQuery(options.scene)
+	},
+	methods: {
+		// _getWxQrCodeQuery(scene) {
+		// 	getWxQrCodeQuery({ scene: scene }).then(res => {
+		// 		uni.hideLoading()
+		// 		if (res.data.url.indexOf('https://') > -1) {
+		// 			const returnUrl = encodeURIComponent(res.data.url)
+		// 			uni.navigateTo({
+		// 				url: `/common/webview?returnUrl=${returnUrl}`
+		// 			})
+		// 		} else {
+		// 			uni.redirectTo({
+		// 				url: res.data.url
+		// 			})
+		// 		}
+		// 	}).catch((e) => {
+		// 		this.compatible()
+		// 	})
+		// },
+		// 兼容,如果小程序码或者接口返回有误时进入登录页
+		compatible() {
+			uni.hideLoading()
+			if (this.option.type == 'invite') {
+				location.href = decodeURIComponent(this.option.redirectUrl)
+			}
+			// uni.redirectTo({
+			// 	url: `/pages/page/login/index`
+			// })
+		}
+	}
+}
+
+</script>
+<style lang="scss" scoped>
+.prompt-text {
+	padding-top: 200px;
+	text-align: center;
+}
+</style>

+ 0 - 0
mobile-code/src/pages/common/webview.vue → mobile-code/src/common/webview.vue


+ 2 - 2
mobile-code/src/m-pages.json

@@ -25,13 +25,13 @@
 			}
 			}
 		},
 		},
 		{
 		{
-			"path": "pages/common/redirect",
+			"path": "common/redirect",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "加载中..."
 				"navigationBarTitleText": "加载中..."
 			}
 			}
 		},
 		},
 		{
 		{
-			"path": "pages/common/webview",
+			"path": "common/webview",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#ffffff",
 				"navigationBarBackgroundColor": "#ffffff",
 				"navigationBarTextStyle": "black"
 				"navigationBarTextStyle": "black"

+ 8 - 4
mobile-code/src/mixins/share.js

@@ -32,11 +32,15 @@ export default {
 					success
 					success
 				}
 				}
 				// 分享给朋友”及“分享到QQ
 				// 分享给朋友”及“分享到QQ
-				jweixin.updateAppMessageShareData(option)
+				// jweixin.updateAppMessageShareData(option)
 				// 分享到朋友圈”及“分享到QQ空间
 				// 分享到朋友圈”及“分享到QQ空间
-				jweixin.updateTimelineShareData(option)
+				// jweixin.updateTimelineShareData(option)
 				// “分享到腾讯微博”
 				// “分享到腾讯微博”
-				jweixin.onMenuShareWeibo(option)
+				// jweixin.onMenuShareWeibo(option)
+				//分享给朋友接口
+				jweixin.onMenuShareAppMessage(option)
+				//分享到朋友圈接口
+				jweixin.onMenuShareTimeline(option);  
 			})
 			})
 			// #endif
 			// #endif
 
 
@@ -68,7 +72,7 @@ export default {
 		 * jsSdk入权限验证配置
 		 * jsSdk入权限验证配置
 		 * @parmas apiList 为需要获取的微信jsdk的接口列表
 		 * @parmas apiList 为需要获取的微信jsdk的接口列表
 		 */
 		 */
-		getWeiXinOptin(data, apiList = ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareWeibo']) {
+		getWeiXinOptin(data, apiList = ['checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage']) {
 			return new Promise((resolve, reject) => {
 			return new Promise((resolve, reject) => {
 				const params = {
 				const params = {
 					// url: location.origin
 					// url: location.origin

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

@@ -36,7 +36,7 @@
 			</div>
 			</div>
 			<!-- 推荐人 -->
 			<!-- 推荐人 -->
 			<div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
 			<div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
-				<div class="recommend-tag">推荐</div>
+				<div class="recommend-tag">推荐花店</div>
 				<div class="recommend-det">
 				<div class="recommend-det">
 					<app-avatar-module :src="merchantData.smallLogoUrl" :width="78" alt="推荐人头像" />
 					<app-avatar-module :src="merchantData.smallLogoUrl" :width="78" alt="推荐人头像" />
 					<div class="recommend-info">
 					<div class="recommend-info">

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

@@ -65,17 +65,17 @@
 		},
 		},
 		methods: {
 		methods: {
 			init() {
 			init() {
-				// 续费
-				// #ifdef H5
-				let renewOption = sessionStorage.getItem('renewOption')
-				if (renewOption) {
-					this.renewOption = JSON.parse(renewOption)
-				}
-				// #endif
-
 				this.$util.getCheckLogin().then(res => {
 				this.$util.getCheckLogin().then(res => {
 					if (res) {
 					if (res) {
 						this._getMealDet()
 						this._getMealDet()
+
+						// 续费
+						// #ifdef H5
+						let renewOption = sessionStorage.getItem('renewOption')
+						if (renewOption) {
+							this.renewOption = JSON.parse(renewOption)
+						}
+						// #endif
 					}
 					}
 				})
 				})
 			},
 			},

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

@@ -19,13 +19,13 @@
 			}
 			}
 		},
 		},
 		{
 		{
-			"path": "pages/common/redirect",
+			"path": "common/redirect",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "加载中..."
 				"navigationBarTitleText": "加载中..."
 			}
 			}
 		},
 		},
 		{
 		{
-			"path": "pages/common/webview",
+			"path": "common/webview",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#ffffff",
 				"navigationBarBackgroundColor": "#ffffff",
 				"navigationBarTextStyle": "black"
 				"navigationBarTextStyle": "black"

+ 0 - 57
mobile-code/src/pages/common/redirect.vue

@@ -1,57 +0,0 @@
-<template>
-    <div></div>
-</template>
-<script>
-import { mapGetters, mapState, mapActions } from 'vuex'
-import { getWxQrCodeQuery } from '@/api/common'
-export default {
-	data() {
-		return {
-		}
-	},
-	computed: {
-		// ...mapGetters({ userInfo: 'getSelfInfo' })
-	},
-	onLoad(options) {
-		uni.showLoading({
-			title: '加载中...'
-		})
-		uni.switchTab({
-			url: '/pages/home/index'
-		})
-		return false
-		if (!options.scene) {
-			this.compatible()
-			return false
-		}
-		this._getWxQrCodeQuery(options.scene)
-	},
-	methods: {
-		_getWxQrCodeQuery(scene) {
-			getWxQrCodeQuery({ scene: scene }).then(res => {
-				uni.hideLoading()
-				if (res.data.url.indexOf('https://') > -1) {
-					const returnUrl = encodeURIComponent(res.data.url)
-					uni.navigateTo({
-						url: `/pages/page/webview/index?returnUrl=${returnUrl}`
-					})
-				} else {
-					uni.redirectTo({
-						url: res.data.url
-					})
-				}
-			}).catch((e) => {
-				this.compatible()
-			})
-		},
-		// 兼容,如果小程序码或者接口返回有误时进入登录页
-		compatible() {
-			uni.hideLoading()
-			uni.redirectTo({
-				url: `/pages/page/login/index`
-			})
-		}
-	}
-}
-
-</script>