From d242de7639a02afe44df742dd86ed8a191ca461e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Wed, 15 Sep 2021 09:31:13 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontCode2/sunshine_levy/index.html | 1 + FrontCode2/sunshine_levy/src/views/index.vue | 245 ++++++++----------- 2 files changed, 108 insertions(+), 138 deletions(-) diff --git a/FrontCode2/sunshine_levy/index.html b/FrontCode2/sunshine_levy/index.html index 0ca3275..6321977 100644 --- a/FrontCode2/sunshine_levy/index.html +++ b/FrontCode2/sunshine_levy/index.html @@ -6,6 +6,7 @@ 房屋征收 + diff --git a/FrontCode2/sunshine_levy/src/views/index.vue b/FrontCode2/sunshine_levy/src/views/index.vue index cdd69c1..9326c81 100644 --- a/FrontCode2/sunshine_levy/src/views/index.vue +++ b/FrontCode2/sunshine_levy/src/views/index.vue @@ -221,64 +221,39 @@ export default { name: 'home', data() { return { - // apidata: { - // success: true, - // code: 200, - // message: '请求成功', - // data: { - // prjList: [ - // { - // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - // area: '海曙区', - // zsbm: '宁波市海曙区房屋征收管理服务中心', - // year: 2021.0, - // zsjdh: '海政发[2021]513号', - // currentState: '项目报结', - // fhpgList: [ - // { - // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - // assessmentNo: '0513', - // houseAddress: '高桥镇', - // countValue: '137654.00', - // }, - // ], - // bcxyList: [ - // { - // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - // xyNo: '海政发2021513-0513-1', - // houseAddress: '高桥镇', - // summationShouldCompensateMoney: '137654.00', - // }, - // ], - // }, - // ], - // idCard: '330203199904044544身份证号码', - // userName: '姓名', - // }, - // extras: null, - // timestamp: 1631256680049, - // }, - // user: { - // name: "加载中...", - // identityId: "加载中...", - // }, - // project: { - // name: "加载中...", - // area: "加载中...", - // department: "加载中...", - // year: "加载中...", - // num: "加载中...", - // }, - // assess: { - // num: "", - // address: "加载中...", - // amount: "加载中...", - // }, - // retrievalProtocol: { - // num: "", - // address: "加载中...", - // compensation: "加载中...", - // amount: "0", + // data: { + // userName: '张三丰', + // idCard: '341203199206303411', + // prjList: [ + // { + // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', + // name: '项目名称', + // area: '海曙区', + // zsbm: '宁波市海曙区房屋征收管理服务中心', + // year: 2021.0, + // zsjdh: '海政发[2021]513号', + // currentState: '项目报结', + // fhpgList: [ + // { + // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', + // id: 'a400583e-ae93-444f-8a20-4c4731b0cc13', + // assessmentNo: '0513', + // houseAddress: '高桥镇', + // countValue: '137654.00', + // }, + // ], + // bcxyList: [ + // { + // prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', + // id: 'bf21b302-8059-462d-985f-ce7452c4d5b4', + // xyNo: '海政发2021513-0513-1', + // houseAddress: '高桥镇', + // switchProductionWay: '货币补偿', + // summationShouldCompensateMoney: '137654.00', + // }, + // ], + // }, + // ], // }, data: {}, total: '8', @@ -304,11 +279,15 @@ export default { ], loading: false, finished: true, + userInfoData: {}, // 用户个人信息 }; }, created() { this.onInit(); }, + mounted() { + this.setZwaplus(); // 埋点 + }, methods: { onLoad() {}, onInit() { @@ -317,59 +296,22 @@ export default { host: 'https://mapi.zjzwfw.gov.cn/', dataType: 'JSON', type: 'GET', + data: { + ticket: '1234567', + }, appKey: 'es4b8zmz+2001833218+dehllx', // 必须 onSuccess: (data) => { console.log('data', data); + if (data.data && data.data.success == true) { + // this.data = data.data; + } else { + console.log('用户无数据,不展示'); + } }, onFail: (err) => { console.log(err, 'err'); }, }); - let apidata = { - success: true, - code: 200, - message: '请求成功', - data: { - userName: '张三丰', - idCard: '341203199206303411', - prjList: [ - { - prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - name: '项目名称', - area: '海曙区', - zsbm: '宁波市海曙区房屋征收管理服务中心', - year: 2021.0, - zsjdh: '海政发[2021]513号', - currentState: '项目报结', - fhpgList: [ - { - prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - id: 'a400583e-ae93-444f-8a20-4c4731b0cc13', - assessmentNo: '0513', - houseAddress: '高桥镇', - countValue: '137654.00', - }, - ], - bcxyList: [ - { - prjId: '936d98a8-2c8f-410f-b126-68a7568f60c4', - id: 'bf21b302-8059-462d-985f-ce7452c4d5b4', - xyNo: '海政发2021513-0513-1', - houseAddress: '高桥镇', - switchProductionWay: '货币补偿', - summationShouldCompensateMoney: '137654.00', - }, - ], - }, - ], - }, - extras: null, - timestamp: 1631261808797, - }; - if (apidata.code == 200) { - this.data = apidata.data; - } - // this.onLogin(); //获取当前数据 // apis.getprjdata({ ticket: this.$route.query.ticket }).then((prjdata) => { // debugger; @@ -381,41 +323,6 @@ export default { gotoProject(type) { this.$router.push({ name: 'projectSelect', params: { type: type } }); }, - onLogin() { - // this.loading = true; - let form = { account: 'zgbqc', password: '111qqqqq' }; - apis - .login(form) - .finally(() => { - debugger; - // this.loading = false; - }) - .then(({ result }) => { - token.value = result.token; - // this.$root.replace('/'); - debugger; - this.onLoadUserInfo(); - this.onLoadStatistic(); - }) - .catch((err) => { - debugger; - // this.$toast(err); - }); - }, - onLoadUserInfo() { - apis.account().then(({ result }) => { - for (let key in result) { - if (this.user.hasOwnProperty(key)) { - this.user[key] = result[key]; - } - } - }); - }, - onLoadStatistic() { - apis.projectStatistics().then(({ result }) => { - this.statistics = result; - }); - }, padStart(num, n) { var tbl = []; var len = n - num.toString().length; @@ -423,6 +330,68 @@ export default { if (!tbl[len]) tbl[len] = new Array(len + 1).join('0'); return tbl[len] + num; }, + setZwUserAplus(Userid) { + // 设置用户信息埋点 + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['_hold', 'BLOCK'], + }); + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['_user_nick', this.userInfoData.username], + }); + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['_user_id', Userid], + }); + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['_hold', 'START'], + }); + }, + // 基础信息埋点配置 + setZwaplus() { + (function (w, d, s, q, i) { + w[q] = w[q] || []; + var f = d.getElementsByTagName(s)[0]; + var j = d.createElement(s); + j.async = true; + j.id = 'beacon-aplus'; + j.src = 'https://d.alicdn.com/alilog/mlog/aplus.js?id=202951085'; + f.parentNode.insertBefore(j, f); + })(window, document, 'script', 'aplus_queue'); + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['aplus-rhost-v', 'alog.zjzwfw.gov.cn'], + }); + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['aplus-rhost-g', 'alog.zjzwfw.gov.cn'], + }); + // 这个会落到 app_key 字段上 + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['appId', '60506758'], + }); + // 单页应用 或 “单个页面”需异步补充 PV 日志参数还需进行如下埋点: + aplus_queue.push({ + action: 'aplus.setMetaInfo', + arguments: ['aplus-waiting', 'MAN'], + }); + // 单页应用路由切换后 或 在异步获取到 pv 日志所需的参数后再执行 sendPV: + aplus_queue.push({ + action: 'aplus.sendPV', + arguments: [ + { + is_auto: false, + }, + { + miniAppId: '2001833218', //'应用开发管理平台-应用 ID + miniAppName: '房屋征收', + }, + ], + }); + }, }, };