Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit a1da25c

Browse files
committed
Update variable type.
1 parent 2bbebe8 commit a1da25c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ export default function install (Vue: Vue, { router, siteIdList, isDebug = false
5555
const ROUTER_MODE: string = getRouterMode(VUE_VERSION, router);
5656

5757
// 获取页面的url信息
58-
const PAGE_PATH_DIR_COUNT = window.location.pathname.split('/').length;
59-
const PAGE_PATH = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');
58+
const PAGE_PATH_DIR_COUNT: number = window.location.pathname.split('/').length;
59+
const PAGE_PATH: string = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');
6060

6161
// 根据路由模式生成要上报的链接
62-
const PAGE_URL = ROUTER_MODE === 'hash' ? `${PAGE_PATH}/#${to.fullPath}` : `${PAGE_PATH}${to.fullPath}`;
62+
const PAGE_URL: string = ROUTER_MODE === 'hash' ? `${PAGE_PATH}/#${to.fullPath}` : `${PAGE_PATH}${to.fullPath}`;
6363

6464
// 上报数据
6565
pushBAIDU.pv(PAGE_URL);

0 commit comments

Comments
 (0)