zhangyuhan 4 жил өмнө
parent
commit
127f47498a

+ 2 - 0
jydocs-mobile/.env.development

@@ -2,3 +2,5 @@ NODE_ENV=development
 VUE_APP_MOCK=true
 VUE_APP_BASE_API = '/dev/api'
 BASE_URL = '/dev/docs/'
+VUE_APP_BASE_URL = '/dev/docs/'
+VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/pointsLogs?logAction='

+ 2 - 0
jydocs-mobile/.env.production

@@ -1,3 +1,5 @@
 NODE_ENV=production
 VUE_APP_BASE_API='/jydocs/'
 BASE_URL = '/page_docs_app/'
+VUE_APP_BASE_URL = '/page_docs_app/'
+VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/pointsLogs?logAction='

+ 5 - 0
jydocs-mobile/src/main.ts

@@ -6,6 +6,7 @@ import '@/utils/'
 import { Component } from 'vue-property-decorator'
 import { Toast, Lazyload } from 'vant'
 import VueBus from './vue_bus'
+import axios from 'axios'
 
 Component.registerHooks(['beforeRouteEnter', 'beforeRouteLeave', 'beforeRouteUpdate'])
 Toast.setDefaultOptions({ getContainer: '#app' })
@@ -13,6 +14,10 @@ Toast.setDefaultOptions({ getContainer: '#app' })
 Vue.config.productionTip = false
 Vue.use(Toast).use(Lazyload).use(VueBus)
 
+router.afterEach((to) => {
+  axios.get(process.env.VUE_APP_LOG_URL + process.env.VUE_APP_BASE_URL + to.fullPath)
+})
+
 new Vue({
   router,
   store,