xhj 2 лет назад
Родитель
Сommit
8b5898fce3
5 измененных файлов с 31 добавлено и 39 удалено
  1. 23 29
      product/detail/detail.vue
  2. 1 1
      product/pay/pay.vue
  3. 2 7
      topic/content/content.vue
  4. 4 1
      utils/h5Templete.js
  5. 1 1
      utils/request.js

+ 23 - 29
product/detail/detail.vue

@@ -484,42 +484,35 @@
 			},
 
 			goHome() {
-				h5util.jumpIndex('/pages/tabBar/index?channel=home')
+				h5util.jumpIndex('/pages/tabBar/index')
 				// app.globalData.openHome();
 			},
 
 			async onShareMessage(options) {
 				let merchantId = '';
 				let path = '';
-				let isSolution = '';
-				isSolution = req.env[req.env.NODE_ENV].isSolution;
 				let userInfo = req.getStorage('userInfo');
 				let shopId = '';
-				if (isSolution) {
-					path = '/share/home/index?appId=' + req.getStorage('appId') + '&userId=' + req.getStorage(
-						'userInfo').id;
-				} else {
-					path = '/product/detail/detail?id=' + this.query.id 
-					// console.log(!req.getStorage('userInfo').id);
-					if (!userInfo.id) {} else {
-						path += '&userId=' + userInfo.id;
-					}
-
-					// console.log(this.query.merchantId);
-					if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
-						path += '&merchantId=' + req.getStorage('MERCHANT').id;
-						merchantId = req.getStorage('MERCHANT').id;
-
-						if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
-							path += '&shopId=' + req.getStorage('smallShop').id;
-							shopId = req.getStorage('smallShop').id;
-							merchantId = req.getStorage('smallShop').merchantDTO.id;
-						}
-					}
-					if (userInfo.merchantId) {
-						path += '&userMerchantId=' + userInfo.merchantId;
+				path = '/product/detail/detail?id=' + this.query.id
+				// console.log(!req.getStorage('userInfo').id);
+				if (!userInfo.id) {} else {
+					path += '&userId=' + userInfo.id;
+				}
+				
+				// console.log(this.query.merchantId);
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					path += '&merchantId=' + req.getStorage('MERCHANT').id;
+					merchantId = req.getStorage('MERCHANT').id;
+				
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						path += '&shopId=' + req.getStorage('smallShop').id;
+						shopId = req.getStorage('smallShop').id;
+						merchantId = req.getStorage('smallShop').merchantDTO.id;
 					}
 				}
+				if (userInfo.merchantId) {
+					path += '&userMerchantId=' + userInfo.merchantId;
+				}
 				route.share(1, userInfo.id, path, merchantId, shopId, 1, this.query.id);
 				
 				path = this.SHARE_BEHAVIOR_FN({path:path,sendShare:false}).path
@@ -810,9 +803,10 @@
 
 			async govip() {
 				if (await req.isAuthFn(true)) {
-					uni.navigateTo({
-						url: '/mine/vip/vip'
-					});
+					h5util.jumpUrlExternal({url:'/mine/vip/vip',onlyWeb:false})
+					// uni.navigateTo({
+					// 	url: '/mine/vip/vip'
+					// });
 				}
 			},
 

+ 1 - 1
product/pay/pay.vue

@@ -113,7 +113,7 @@ import h5util from "../../utils/h5util.js";
 
 		methods: {
 			goHome(){
-				h5util.jumpIndex()
+				h5util.jumpIndex('/pages/tabBar/index')
 				// app.globalData.openHome();
 			},
 			payOrder() {

+ 2 - 7
topic/content/content.vue

@@ -118,14 +118,9 @@ export default {
 		},
 		async onShareMessage(){
 			let path = '';
-			let isSolution = '';
-			isSolution = req.env[req.env.NODE_ENV].isSolution;
 			let userInfo = req.getStorage('userInfo');
-			if(isSolution){
-				path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
-			}else{
-				path = '/topic/content/content?id=' + this.id +'&isShare=' + true+'&userId='+userInfo.id + '&appId=' + req.getStorage('appId');
-			}
+			path = '/topic/content/content?id=' + this.id + '&userId='+userInfo.id
+			if(this.code) path = path + '&code=' + this.code
 			path = this.SHARE_BEHAVIOR_FN({path:path,sendShare:false}).path
 			console.log(path)
 			return {

+ 4 - 1
utils/h5Templete.js

@@ -52,6 +52,9 @@ export default {
 				// 登陆了获取用户信息缓存
 				req.getRequest('/api/user/info', {}, data => {
 					req.setStorage('userInfo', data);
+					// uni.showModal({
+					// 	content:JSON.stringify(req.getStorage('userInfo'))
+					// })
 				});
 			}else{
 				//未登录移除用户信息缓存
@@ -69,7 +72,7 @@ export default {
 			if(path.indexOf('/share/home/index')>-1){
 				
 			}else{
-				path = '/pages/webView/webView?url=' + encodeURIComponent(window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + path)
+				path = '/pages/webView/webView?url=' + encodeURIComponent(window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + path)+'&userId='+req.getStorage('userInfo').id
 			}
 			h5util.postMsg({
 				type: 'function', //function 直接调用方法(此时eventName必传) msg 传递参数

+ 1 - 1
utils/request.js

@@ -6,7 +6,7 @@ const app = getApp();
 
 /**
  * H5版的发布地址目录:测试环境
- * /data/nginx proxy manager/data/web/xcxh5
+ * /data/nginx proxy manager/data/web/xcx_h5
  * 域名:http://xcxh5.ts.zhiqiyun.com/
  */
 const env = {