qj-common 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export function routeMappingFn(name) {
|
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
export function flowClickFn(moduleName, pitPosition, pitName) {
|
|
20
|
-
let utmObj = JSON.parse(sessionStorage.getItem('utmObj')); //获取utm参数
|
|
20
|
+
let utmObj = JSON.parse(sessionStorage.getItem('utmObj')) || {}; //获取utm参数
|
|
21
21
|
if (!utmObj) {
|
|
22
22
|
utmObj = {
|
|
23
23
|
"utmSource_var": "-",
|
|
@@ -27,14 +27,14 @@ export function flowClickFn(moduleName, pitPosition, pitName) {
|
|
|
27
27
|
"utmTerm_var": "-"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
let curRouteName = sessionStorage.getItem("curRouteName");
|
|
30
|
+
let curRouteName = this.$route.path ? this.$route.path : sessionStorage.getItem("curRouteName");
|
|
31
31
|
let pathObj = routeMappingFn(curRouteName);
|
|
32
|
-
|
|
32
|
+
let obj = {
|
|
33
33
|
"pageType_var": pathObj.pageType ? pathObj.pageType : "-",
|
|
34
34
|
"pageName_var": pathObj.pageName ? pathObj.pageName : "-",
|
|
35
35
|
"moduleName_var": moduleName ? moduleName : "-",
|
|
36
36
|
"pitPosition_var": pitPosition,
|
|
37
|
-
"pitName_var": pitName ? pitName : "-"
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
"pitName_var": pitName ? pitName : "-"
|
|
38
|
+
}
|
|
39
|
+
gio('track', "flowClick", Object.assign(obj, utmObj))
|
|
40
40
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<!-- item.menuTarget ==1 表示不显示 -->
|
|
29
29
|
|
|
30
30
|
<a
|
|
31
|
-
@click="_router(itemChild)"
|
|
31
|
+
@click="_router(itemChild, item)"
|
|
32
32
|
:class="[
|
|
33
33
|
$route.path === `/${itemChild.menuAction}`
|
|
34
34
|
? 'c-theme'
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
|
+
import { flowClickFn } from '#/utils/routeMapping.js';
|
|
55
56
|
import { IEVersion } from '#/utils/utils.js';
|
|
56
57
|
import { mapGetters } from 'vuex';
|
|
57
58
|
import { getProappinfo } from '#/api/login';
|
|
@@ -84,7 +85,10 @@ export default {
|
|
|
84
85
|
this.secDomainName=sessionStorage.getItem('secDomainName')?sessionStorage.getItem('secDomainName'):null
|
|
85
86
|
},
|
|
86
87
|
methods: {
|
|
87
|
-
_router(item) {
|
|
88
|
+
_router(item, data) {
|
|
89
|
+
if(item.tenantCode && item.tenantCode == "2020063000000001"){
|
|
90
|
+
flowClickFn(data.menuName, "-", item.menuName);
|
|
91
|
+
}
|
|
88
92
|
if (location.href.indexOf('localhost') > -1) {
|
|
89
93
|
location.href = '#/' + item.menuAction;
|
|
90
94
|
} else {
|