diff --git a/README.md b/README.md index 6785535..e49c870 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -413,3 +413,8 @@ fix update - 微信支付 - 修改 取消微信支付时文字 “您取消了支付” + +## v1.0.50 +`2023.5.10` +feature +- 增加 百度页面访问统计 diff --git a/src/config/models.js b/src/config/models.js index 6837510..30b29aa 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -1,11 +1,11 @@ /* * @Date: 2021-11-20 10:26:39 * @LastEditors: JinxChen - * @LastEditTime: 2023-04-28 16:41:10 + * @LastEditTime: 2023-05-10 09:17:03 * @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.49F'; //版本号 +export const VERSION_MODEL = '1.0.50F'; //版本号 export const IMAGE_URL = { production: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/', @@ -19,3 +19,8 @@ export const ALIPAY_DOWN_URL = { android: 'https://d.alipay.com', ios: 'https://itunes.apple.com/cn/app/zhi-fu-bao-qian-bao-yu-e-bao/id333206289?mt=8' }; +export const BaiduStatisticsModel = { + production: "https://hm.baidu.com/hm.js?ef364e6446439911bc4ced79bece7715", // 随手精灵百度流量统计 正式环境 + test: "https://hm.baidu.com/hm.js?edb76b471e997167b7782c1513382771", // 随手精灵百度流量统计 测试环境 + development: "https://hm.baidu.com/hm.js?edb76b471e997167b7782c1513382771", // 随手精灵百度流量统计 测试环境 +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 19f8ae2..d507f3e 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ /* * @Date: 2022-01-19 10:08:26 * @LastEditors: JinxChen - * @LastEditTime: 2023-03-27 16:04:16 + * @LastEditTime: 2023-05-10 09:15:16 * @FilePath: \TelpoH5FrontendWeb\src\main.js * @description: */ @@ -14,6 +14,7 @@ import '@/assets/css/reset.scss'; import dayjs from 'dayjs'; // ui库按需引入 import 'vant/lib/index.css'; +import { BaiduStatisticsModel } from '@/config/models'; import { Button, Calendar, @@ -115,6 +116,18 @@ Dialog.setDefaultOptions({ Vue.config.productionTip = false; Vue.prototype.$dayjs = dayjs; Vue.prototype.$bus = new Vue(); +router.afterEach((to, from, next) => { + // 创建百度统计js + setTimeout(()=>{ + var _hmt = _hmt || []; + (function() { + var hm = document.createElement("script"); + hm.src = BaiduStatisticsModel[ process.env.NODE_ENV ]; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })(); + },0); + }); new Vue({ router, store,