Commit dccfdf24 authored by 朱建丰's avatar 朱建丰

=0726

parent 47be740e
# Default ignored files
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/zhengfu.iml" filepath="$PROJECT_DIR$/.idea/zhengfu.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
>>> .el-breadcrumb__inner { >>> .el-breadcrumb__inner {
color: #333; color: #333;
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px !important;
a { a {
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
...@@ -171,4 +171,4 @@ export default { ...@@ -171,4 +171,4 @@ export default {
border-right: 20px solid transparent; border-right: 20px solid transparent;
border-top: 20px solid transparent; border-top: 20px solid transparent;
} }
</style> </style>
\ No newline at end of file
...@@ -28,3 +28,44 @@ npm test ...@@ -28,3 +28,44 @@ npm test
``` ```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
<!-- window.addEventListener('message', async function (e, d) {
if (e.data && e.data.accessToken) {
var token = e.data.accessToken;
var url =
'https://portal.lishui.gov.cn:18080/api_2021/public/index.php/index/MicroPortalLogin/getUserInfoByAccessToken?token=' +token;
var user = await fetch(url);
var contentType = user.headers.get('Content-Type');
console.log(contentType);
console.log("return user");
console.log(user.json());
console.log("finishing");
} else {
window.location.replace("./#err");
} -->
// var data = JSON.parse(e.data);
// alert(data);
// var accessToken = data.accessToken;
// alert(accessToken);
//alert(e.data)
// let data = JSON.parse(e.data);
// let accessToken = data.accessToken;
})
...@@ -88,45 +88,7 @@ ...@@ -88,45 +88,7 @@
viewPort(navigator.userAgent); viewPort(navigator.userAgent);
}, 500); }, 500);
} }
window.addEventListener('message', async function (e, d) {
if (e.data && e.data.accessToken) {
var token = e.data.accessToken;
var url =
'https://portal.lishui.gov.cn:18080/api_2021/public/index.php/index/MicroPortalLogin/getUserInfoByAccessToken?token=' +token;
var user = await fetch(url);
var contentType = user.headers.get('Content-Type');
console.log(contentType);
console.log("return user");
console.log(user.json());
console.log("finishing");
} else {
window.location.replace("./#err");
}
// var data = JSON.parse(e.data);
// alert(data);
// var accessToken = data.accessToken;
// alert(accessToken);
//alert(e.data)
// let data = JSON.parse(e.data);
// let accessToken = data.accessToken;
})
</script> </script>
</html> </html>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
>首页</a >首页</a
></el-breadcrumb-item ></el-breadcrumb-item
> >
<el-breadcrumb-item>{{ breadData.page_name }}</el-breadcrumb-item> <el-breadcrumb-item >{{ breadData.page_name }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div> <div>
<i class="iconfont icon-chengshi"></i> <i class="iconfont icon-chengshi"></i>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="breadcrumb-text" v-if="show"> <div class="breadcrumb-text" v-if="show">
<div class="breadcrumb-title"> <div class="breadcrumb-title">
<img src="../assets/images/target.png" alt="" /> <img src="../assets/images/target.png" alt="" />
<span>年度目标</span> <span style="font-size:16px !important">年度目标</span>
<div class="s-line"></div> <div class="s-line"></div>
{{ breadData.annual_target }} {{ breadData.annual_target }}
</div> </div>
...@@ -89,6 +89,8 @@ export default { ...@@ -89,6 +89,8 @@ export default {
align-items: center; align-items: center;
} }
} }
.breadcrumb-text { .breadcrumb-text {
padding: 16px 20px 0; padding: 16px 20px 0;
} }
...@@ -99,7 +101,8 @@ export default { ...@@ -99,7 +101,8 @@ export default {
span { span {
color: #1492ff; color: #1492ff;
margin-right: 8px; margin-right: 8px;
font-size: 18px; font-weight: bold;
font-size: 18px !important;
} }
.s-line { .s-line {
width: 1px; width: 1px;
...@@ -169,4 +172,4 @@ export default { ...@@ -169,4 +172,4 @@ export default {
border-right: 20px solid transparent; border-right: 20px solid transparent;
border-top: 20px solid transparent; border-top: 20px solid transparent;
} }
</style> </style>
\ No newline at end of file
...@@ -18,8 +18,7 @@ import Szsy from '../views/Szsy.vue' ...@@ -18,8 +18,7 @@ import Szsy from '../views/Szsy.vue'
import Err from '../views/err.vue' import Err from '../views/err.vue'
Vue.use(Router) Vue.use(Router)
var router = new Router({ var router = new Router({
routes: [ routes: [{
{
path: '/', path: '/',
name: 'Index', name: 'Index',
component: MyIndex component: MyIndex
...@@ -27,86 +26,122 @@ var router = new Router({ ...@@ -27,86 +26,122 @@ var router = new Router({
{ {
path: '/xxczh', path: '/xxczh',
name: 'NewUrbanization', name: 'NewUrbanization',
meta: { title: '新型城镇化' }, meta: {
title: '新型城镇化'
},
component: Xxczh component: Xxczh
}, },
{ {
path: '/msbz', path: '/msbz',
name: 'live', name: 'live',
meta: { title: '民生保障' }, meta: {
title: '民生保障'
},
component: Msbz component: Msbz
}, },
{ {
path: '/qyxtfz', path: '/qyxtfz',
name: 'region', name: 'region',
meta: { title: '区域协调发展' }, meta: {
title: '区域协调发展'
},
component: Qyxtfz component: Qyxtfz
}, },
{ {
path: '/cyfz', path: '/cyfz',
name: 'Cyfz', name: 'Cyfz',
meta: { title: '产业发展' }, meta: {
title: '产业发展'
},
component: Cyfz component: Cyfz
}, },
{ {
path: '/xczx', path: '/xczx',
name: 'Xczx', name: 'Xczx',
meta: { title: '乡村振兴' }, meta: {
title: '乡村振兴'
},
component: Xczx component: Xczx
}, },
{ {
path: '/aqsc', path: '/aqsc',
name: 'Aqsc', name: 'Aqsc',
meta: { title: '安全生产' }, meta: {
title: '安全生产'
},
component: Aqsc component: Aqsc
}, },
{ {
path: '/sxh', path: '/sxh',
name: 'Sxh', name: 'Sxh',
meta: { title: '双循环' }, meta: {
title: '双循环'
},
component: Sxh component: Sxh
}, },
{ {
path: '/kjcx', path: '/kjcx',
name: 'Kjcx', name: 'Kjcx',
meta: { title: '科技创新' }, meta: {
title: '科技创新'
},
component: Kjcx component: Kjcx
}, },
{ {
path: '/yshj', path: '/yshj',
name: 'Yshj', name: 'Yshj',
meta: { title: '营商环境' }, meta: {
title: '营商环境'
},
component: Yshj component: Yshj
}, },
{ {
path: '/ctfy', path: '/ctfy',
name: 'Ctfy', name: 'Ctfy',
meta: { title: '常态防疫' }, meta: {
title: '常态防疫'
},
component: Ctfy
},
{
path: '/cthfy',
name: 'Cthfy',
meta: {
title: '常态防疫'
},
component: Ctfy component: Ctfy
}, },
{ {
path: '/stwm', path: '/stwm',
name: 'Stwm', name: 'Stwm',
meta: { title: '生态文明' }, meta: {
title: '生态文明'
},
component: Stwm component: Stwm
}, },
{ {
path: '/xxgl', path: '/xxgl',
name: 'Xxgl', name: 'Xxgl',
meta: { title: '信息管理' }, meta: {
title: '信息管理'
},
component: Xxgl component: Xxgl
}, },
{ {
path: '/szsy', path: '/szsy',
name: 'Szsy', name: 'Szsy',
meta: { title: '双招双引' }, meta: {
title: '双招双引'
},
component: Szsy component: Szsy
}, },
{ {
path: '/err', path: '/err',
name: 'Err', name: 'Err',
meta: { title: '无权限' }, meta: {
title: '无权限'
},
component: Err component: Err
} }
] ]
...@@ -122,20 +157,7 @@ router.beforeEach((to, from, next) => { ...@@ -122,20 +157,7 @@ router.beforeEach((to, from, next) => {
// if (to.path == "/login"||to.path=="/nopower") { // if (to.path == "/login"||to.path=="/nopower") {
next() next()
// if (to.path == '/') {
// next()
// } else if (to.fullPath.indexOf('?') != -1) {
// let tag = to.fullPath.split('?')[1]
// let obj = {}
// obj[tag.split('=')[0]] = tag.split('=')[1]
// if (obj.debug == "true") {
// next();
// } else {
// next({name: 'Err'})
// }
// } else {
// next({name: 'Err'})
// }
// } else { // } else {
...@@ -149,16 +171,31 @@ router.beforeEach((to, from, next) => { ...@@ -149,16 +171,31 @@ router.beforeEach((to, from, next) => {
/*---------埋点代码开始 (路由切换执行)----------*/ /*---------埋点代码开始 (路由切换执行)----------*/
// 单页应用 或 “单个页面”需异步补充PV日志参数还需进行如下埋点: // 单页应用 或 “单个页面”需异步补充PV日志参数还需进行如下埋点:
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['aplus-waiting', 'MAN'] }); aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['aplus-waiting', 'MAN']
});
// PV日志接收日志域名,必须按实际情况填写 // PV日志接收日志域名,必须按实际情况填写
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['aplus-rhost-v', 'alog.zjzwfw.gov.cn'] }); 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'] }); aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['aplus-rhost-g', 'alog.zjzwfw.gov.cn']
});
// 判单设备设置appId // 判单设备设置appId
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['appId', isAndroid ? '28302650' : isIOS ? '28328447' : '47130293'] }); aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['appId', isAndroid ? '28302650' : isIOS ? '28328447' : '47130293']
});
// 如采集用户信息是异步行为需要先执行这个BLOCK埋点 // 如采集用户信息是异步行为需要先执行这个BLOCK埋点
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['_hold', 'BLOCK'] }); aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'BLOCK']
});
aplus_queue.push({ aplus_queue.push({
'action': 'aplus.sendPV', 'action': 'aplus.sendPV',
...@@ -169,16 +206,16 @@ router.beforeEach((to, from, next) => { ...@@ -169,16 +206,16 @@ router.beforeEach((to, from, next) => {
sapp_id: '14053', sapp_id: '14053',
sapp_name: 'szzf-yh', sapp_name: 'szzf-yh',
// 自定义PV参数key-value键值对(只能是这种平铺的json,不能做多层嵌套),除userName外(考虑安全原因暂时做废弃处理),其他为必填项。 // 自定义PV参数key-value键值对(只能是这种平铺的json,不能做多层嵌套),除userName外(考虑安全原因暂时做废弃处理),其他为必填项。
dev_type: devType, // 设备类型 dev_type: devType, // 设备类型
site_type: '101', // 站点类型 数字化改革门户100 数字政府101 党政机关整体智治102 数字社会103 数字经济104 数字法治105 site_type: '101', // 站点类型 数字化改革门户100 数字政府101 党政机关整体智治102 数字社会103 数字经济104 数字法治105
is_digital_reform: '1', // 固定值传1,标识是否为数字化改革相关应用 is_digital_reform: '1', // 固定值传1,标识是否为数字化改革相关应用
is_workbench: '1', // 新增字段,标识是否为数字化改革工作台,取值 1或0,1代表是,0代表不是,不填该参数取默认值0 is_workbench: '1', // 新增字段,标识是否为数字化改革工作台,取值 1或0,1代表是,0代表不是,不填该参数取默认值0
city_code: '331100', // 设区市编码 city_code: '331100', // 设区市编码
area_code: '331125', // 区县编码 area_code: '331125', // 区县编码
page_name: '云和数字政府门户', // 页面名称 page_name: '云和数字政府门户', // 页面名称
page_url: window.location.href, page_url: window.location.href,
page_id: window.location.hash, page_id: window.location.hash,
_user_id: sessionStorage.token ? JSON.parse(sessionStorage.token).accountId : '', // 客户端用户ID(浙政钉2.0ID) _user_id: sessionStorage.token ? JSON.parse(sessionStorage.token).accountId : '', // 客户端用户ID(浙政钉2.0ID)
// _user_nick: '', // userName考虑安全原因暂时做废弃处理 // _user_nick: '', // userName考虑安全原因暂时做废弃处理
}] }]
}) })
...@@ -194,7 +231,10 @@ router.beforeEach((to, from, next) => { ...@@ -194,7 +231,10 @@ router.beforeEach((to, from, next) => {
}); });
// 如采集用户信息是异步行为,需要先设置完用户信息后再执行这个START埋点 // 如采集用户信息是异步行为,需要先设置完用户信息后再执行这个START埋点
// 此时被block住的日志会携带上用户信息逐条发出 // 此时被block住的日志会携带上用户信息逐条发出
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['_hold', 'START'] }); aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'START']
});
/*---------埋点代码结束----------*/ /*---------埋点代码结束----------*/
......
function parseUser(json) {
if (json.code != "200") {
return null;
}
var data = json.data;
if (data == null || data == undefined) {
return null;
}
var username = data.username;
if (username == null || username == undefined || username == "") {
return null;
}
return username;
}
export async function messageFun(e) {
if (e.data && e.data.accessToken) {
var token = e.data.accessToken;
if (token == null || token == undefined) {
return false;
}
try {
console.log(token);
var url =
'https://portal.lishui.gov.cn:18080/api_2021/public/index.php/index/MicroPortalLogin/getUserInfoByAccessToken?accessToken=' + token;
var user = await fetch(url);
console.log(url);
var contentType = user.headers.get('Content-Type');
console.log(contentType);
console.log("return user");
var json = await user.json();
var username = parseUser(json);
console.log(json);
console.log("welcome:" + username);
if (username == null) {
return false;
}
console.log("finishing");
} catch (e) {
return false;
}
} else {
return false;
}
return true;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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