Commit 6eaa2721 authored by gengchunlei's avatar gengchunlei

有盟前端埋点

parent eb525c7c
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,6 +15,7 @@
"mint-ui": "^2.2.13",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vue-uweb": "^0.2.2",
"vuex": "^3.4.0"
},
"devDependencies": {
......
......@@ -16,10 +16,18 @@
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script>-->
<title>云南省免费提供避孕药具服务平台</title>
<!-- <script>-->
<!-- //声明_czc对象:-->
<!-- var _czc = _czc || [];-->
<!-- //绑定siteid,请用您的siteid替换下方"XXXXXXXX"部分-->
<!-- _czc.push(["_setAccount", "1280549113"]);-->
<!-- </script>-->
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<!--<script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1280549113&web_id=1280549113"></script>-->
<script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1280549113'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1280549113%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
<script>
// var vConsole =new VConsole();
......
......@@ -3,3 +3,4 @@
<router-view/>
</div>
</template>
......@@ -7,12 +7,15 @@ import 'mint-ui/lib/style.css'
import './assets/elGlobal.css'
import Router from 'vue-router'
import { InfiniteScroll } from 'mint-ui';
import eventLog from "./utils/directive/eventLog";//有盟事件埋点指令v-log="[]"
import uweb from "vue-uweb";
Vue.use(InfiniteScroll);
Vue.use(Router)
Vue.config.productionTip = false
Vue.use(MintUI)
Vue.use(eventLog)
Vue.use(uweb,1280549113)
new Vue({
router,
store,
......
/***************** 埋点自定义指令 *******************/
// readme: https://open.cnzz.com/a/api/trackevent/
export default {
install (Vue) {
Vue.directive('log', {
bind (el, binding) {
el.addEventListener('click', () => { window._czc.push(['_trackEvent', ...binding.value]) }, false)
},
unbind (el) {
el.removeEventListener('click', () => { console.log('remove') })
}
})
}
}
......@@ -32,7 +32,7 @@
</div>
<div class="bottom_btn">
<mt-button type="primary" @click="nextStep" size="large"> 下一步</mt-button>
<mt-button type="primary" @click="nextStep" size="large" v-log="['微信扫码领取人信息填写', '下一步']"> 下一步</mt-button>
</div>
</div>
<no-data v-if="isNoData">
......@@ -173,7 +173,8 @@
if (data.data) {
let par = {
...this.urlParamsDetail,
...this.formData
...this.formData,
resource: '2'
}
this.$router.push({path:'/manualCollection', query: par})
} else {
......
......@@ -68,7 +68,7 @@
</div>
</div>
<!--class="item-right add sub"-->
<div class="sub" @click="singleSub(item)">申请领取</div>
<div class="sub" @click="singleSub(item)" v-log="['药具领取', '确定']">申请领取</div>
</div>
</div>
</div>
......@@ -119,7 +119,24 @@
},
created() {
this.routerDetail = this.$route.query
if (this.routerDetail.resource == '2') {
this.$uweb.ready().then(() => {
// window._czc.push(["_setCustomVar","访客来源", "微信扫码", 0])
this.$uweb.setCustomVar("访客来源", "微信扫码", 0)
}).catch(() => {
})
} else {
this.$uweb.ready().then(() => {
// window._czc.push(["_setCustomVar","访客来源", "医站到家", 0])
this.$uweb.setCustomVar("访客来源", "医站到家", 0)
}).catch(() => {
})
}
// this.sessionInfo = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
},
mounted() {
},
methods: {
getRecordInfo(callBack) {
......@@ -334,12 +351,12 @@
...record,
phone: this.routerDetail.telephone,
networkId: this.routerDetail.id,
receiveWay: receiveWay[1].id,
receiveWay: receiveWay[0].id,
number: +record.number,
produceDate: record.produceDate + ' '+'00:00:00',
expireDate: record.expireDate + ' '+'00:00:00',
residentName: this.routerDetail.residentName,
resource: '2'
resource: this.routerDetail.resource
}
// console.log(JSON.stringify(par))
addSingleManualMedicalRecord(par).then(({data}) => {
......
......@@ -7,7 +7,7 @@
</mt-header>
<div id="map-container" class="containerMap"></div>
<div class="scanCode">
<mt-button icon="saoma" type="primary" @click="ScanCode">扫码领取</mt-button>
<mt-button icon="saoma" type="primary" @click="ScanCode" v-log="['h5摄像头调用', '开始']">扫码领取</mt-button>
</div>
<div class="right_item">
<div class="item">
......@@ -95,7 +95,6 @@
})
},
subscanQRCallBack(val) {
// window.sessionStorage.setItem('test', val)
let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
const {phone = '', userId = ''} = info
let urlP = ''
......@@ -116,7 +115,8 @@
netTypeName,
netName,
status: netStauts,
telephone: phone
telephone: phone,
resource: '1'
}
if (!result.netType) {
return
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment