Ver Fonte

获得详情页分享url修改

lyb há 4 anos atrás
pai
commit
8a381b2198
3 ficheiros alterados com 15 adições e 7 exclusões
  1. 2 2
      assets/http/config.js
  2. 1 1
      pages/activity/activityDetail.vue
  3. 12 4
      pages/index/home.vue

+ 2 - 2
assets/http/config.js

@@ -1,9 +1,9 @@
 let config = {}
 
-// config.baseURL = 'http://192.168.1.35:2888' //本地
+// config.baseURL = 'http://192.168.1.91:2888' //本地
 // config.baseURL = 'http://123.60.225.130:2888'
 // config.baseURL = 'http://vote-back.guosen-fumao.cn/api' //测试服务器
-config.baseURL = 'https://vote.guosen-fumao.cn/api' //正式服务器
+config.baseURL = 'https://vote.gxnumber.cn/api' //正式服务器
 //是否需要获取手机号
 config.isAuthPhone = true
 config.transformDomains = 'https://m.changyoyo.com'

+ 1 - 1
pages/activity/activityDetail.vue

@@ -283,7 +283,7 @@
 					title: `${this.$isNotEmpty(this.activitySetting.pullVoteParam.sponsor) ? `【${this.activitySetting.pullVoteParam.sponsor}】` : ``}${this.posetrParams.title}`,
 					desc: `邀请您为《${this.activity.title}》投票!`,
 					imgUrl: this.activity.imgUrl,
-					link: window.location.href
+					link: window.location.origin + window.location.pathname + window.location.hash
 				}
 				this.$shareConfig.H5Share(shareParam);
 				// #endif

+ 12 - 4
pages/index/home.vue

@@ -231,13 +231,21 @@
 			 */
 			async initParams(options) {
 				const activeId = options.activeId
+				// if (this.$isNotEmpty(activeId)) {
+				// 	//活动列表传进来
+				// 	this.activeId = activeId
+				// } else if (this.$isNotEmpty(this.vuex_active_setting) &&
+				// 	this.$isNotEmpty(this.vuex_active_setting.defaultActiveId)) {
+				// 	//缓存中有活动id
+				// 	this.activeId = this.vuex_active_setting.defaultActiveId
+				// } else {
+				// 	//获取默认的活动id
+				// 	this.activeId = await this.getDefaultActiveId()
+				// }
+				
 				if (this.$isNotEmpty(activeId)) {
 					//活动列表传进来
 					this.activeId = activeId
-				} else if (this.$isNotEmpty(this.vuex_active_setting) &&
-					this.$isNotEmpty(this.vuex_active_setting.defaultActiveId)) {
-					//缓存中有活动id
-					this.activeId = this.vuex_active_setting.defaultActiveId
 				} else {
 					//获取默认的活动id
 					this.activeId = await this.getDefaultActiveId()