Переглянути джерело

小程序会刊页面路口

yanj 5 днів тому
батько
коміт
b0065ac0cb

+ 3 - 0
package.json

@@ -17,6 +17,7 @@
 					"ENV_TYPE": "dev",
 					"UNI_PLATFORM": "mp-weixin",
 					"NAME": "dev",
+					"VERSION": "0.01",
 					"TOKEN_KEY": "token",
 					"BASE_API": "https://mp-test-miniprogapi.matchexpo.cn"
 				},
@@ -30,6 +31,7 @@
 					"ENV_TYPE": "test",
 					"UNI_PLATFORM": "mp-weixin",
 					"NAME": "test",
+					"VERSION": "0.01",
 					"TOKEN_KEY": "token",
 					"BASE_API": "https://mp-test-miniprogapi.matchexpo.cn"
 				},
@@ -43,6 +45,7 @@
 					"ENV_TYPE": "prod",
 					"UNI_PLATFORM": "mp-weixin",
 					"NAME": "prod",
+					"VERSION": "0.01",
 					"TOKEN_KEY": "token",
 					"BASE_API": "https://starify-api-dev.matchexpo.cn"
 				},

+ 2 - 2
pages/activity/components/activity-item.vue

@@ -48,9 +48,9 @@
 		methods: {
 			onClickActivity(item){
         if (this.type === 'exhibitor') {
-          this.webviewTo('https://mp-test-onlinecatelogue.matchexpo.cn/mini-pro-activity')
+          this.webviewTo(this.$store.getters.website_url + '/mini-pro-activity?v=' + this.$store.getters.version)
         } else {
-          this.webviewTo('https://mp-test-onlinecatelogue.matchexpo.cn/mini-pro-same-detail')
+          this.webviewTo(this.$store.getters.website_url + '/mini-pro-same-detail?v=' + this.$store.getters.version)
         }
 				// this.navigateTo('/pages/activity/detail')
 			}

+ 1 - 1
pages/activity/components/activity-recommend.vue

@@ -36,7 +36,7 @@
 		},
 		methods: {
 			onClickActivity() {
-				this.navigateTo('https://mp-test-onlinecatelogue.matchexpo.cn/mini-pro-activity')
+				this.navigateTo(this.$store.getters.website_url + '/mini-pro-activity?v=' + this.$store.getters.version)
 			}
 		}
 	}

+ 1 - 1
pages/news/components/news-item.vue

@@ -26,7 +26,7 @@
 		},
 		methods: {
 			onClickDetail(item) {
-        this.navigateTo('https://mp-test-onlinecatelogue.matchexpo.cn/mini-pro-news')
+        this.navigateTo(this.$store.getters.website_url + '/mini-pro-news?v=' + this.$store.getters.version)
 				if (this.type === 'exhibitor')  {
 					// this.navigateTo('')
 				} else {

+ 3 - 1
store/getters.js

@@ -5,6 +5,8 @@ const getters = {
   baseApi: state => process.env.BASE_API,
   loading: state => state.app.loading,
   ossDomain: state => state.app.ossDomain,
-  locale: state => state.app.locale
+  locale: state => state.app.locale,
+  version: state => process.env.VERSION ?? '0.01',
+  website_url: state => 'https://mp-test-onlinecatelogue.matchexpo.cn'
 }
 export default getters