Commit fd1129b8 authored by 张罗鹏's avatar 张罗鹏

初始化

parents
# ligthrestaurant
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
```
yarn run build
```
### Run your tests
```
yarn run test
```
### Lints and fixes files
```
yarn run lint
```
### Run your unit tests
```
yarn run test:unit
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/app'
]
}
module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
transformIgnorePatterns: [
'/node_modules/'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
testURL: 'http://localhost/',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "lightrestaurant",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"ant-design-vue": "^1.7.7",
"axios": "^0.20.0",
"babel-polyfill": "^6.26.0",
"core-js": "^2.6.5",
"echarts": "^5.1.2",
"vue": "^2.6.10",
"vue-echarts": "^6.0.0",
"vue-particles": "^1.0.9",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@vue/cli-plugin-babel": "^3.7.0",
"@vue/cli-plugin-eslint": "^3.7.0",
"@vue/cli-plugin-unit-jest": "^3.7.0",
"@vue/cli-service": "^3.7.0",
"@vue/composition-api": "^1.1.1",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.5.21"
}
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
This diff is collapsed.
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg class="lds-message" width="80px" height="80px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><g transform="translate(20 50)">
<circle cx="0" cy="0" r="7" fill="#e15b64" transform="scale(0.99275 0.99275)">
<animateTransform attributeName="transform" type="scale" begin="-0.375s" calcMode="spline" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" values="0;1;0" keyTimes="0;0.5;1" dur="1s" repeatCount="indefinite"></animateTransform>
</circle>
</g><g transform="translate(40 50)">
<circle cx="0" cy="0" r="7" fill="#f47e60" transform="scale(0.773605 0.773605)">
<animateTransform attributeName="transform" type="scale" begin="-0.25s" calcMode="spline" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" values="0;1;0" keyTimes="0;0.5;1" dur="1s" repeatCount="indefinite"></animateTransform>
</circle>
</g><g transform="translate(60 50)">
<circle cx="0" cy="0" r="7" fill="#f8b26a" transform="scale(0.42525 0.42525)">
<animateTransform attributeName="transform" type="scale" begin="-0.125s" calcMode="spline" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" values="0;1;0" keyTimes="0;0.5;1" dur="1s" repeatCount="indefinite"></animateTransform>
</circle>
</g><g transform="translate(80 50)">
<circle cx="0" cy="0" r="7" fill="#abbd81" transform="scale(0.113418 0.113418)">
<animateTransform attributeName="transform" type="scale" begin="0s" calcMode="spline" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" values="0;1;0" keyTimes="0;0.5;1" dur="1s" repeatCount="indefinite"></animateTransform>
</circle>
</g></svg>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en" style="font-size: 192px;">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> -->
<meta name="viewport" content="initial-scale=0.5,maximum-scale=1,user-scalable=no">
<meta name="renderer" content="webkit">
<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
<!-- <script src="https://g.alicdn.com/gdt/jsapi/1.9.12/index.js"></script> -->
<script src='https://wpk-gate.zjzwfw.gov.cn/static/wpk-jssdk.1.0.2/wpkReporter.js' crossorigin='true'></script>
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>定海</title>
<script>
//稳定性监控
try {
const config = {
bid: 'SZDH_zzdpro',
signkey: '1234567890abcdef',
gateway: 'https://wpk-gate.zjzwfw.gov.cn'
};
const wpk = new wpkReporter(config);
wpk.installAll();
window._wpk = wpk;
} catch (err) {
console.error('WpkReporter init fail', err);
}
//通用采集 SDK
(function(w, d, s, q, i) {
w[q] = w[q] || [];
var f = d.getElementsByTagName(s)[0],j = d.createElement(s);
j.async = true;
j.id = 'beacon-aplus';
j.src = 'https://alidt.alicdn.com/alilog/mlog/aplus_cloud.js';
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']
});
var u = navigator.userAgent
var isAndroid = u.indexOf('Android') > -1
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['appId', isAndroid ? '28302650' : isIOS ? '28328447' : '47130293']
});
//用户信息埋点
// 如采集用户信息是异步行为需要先执行这个BLOCK埋点
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'BLOCK']
});
//基础埋点
// 单页应用 或 “单个页面”需异步补充PV日志参数还需进行如下埋点:
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['aplus-waiting', 'MAN']
});
// // 如采集用户信息是异步行为,需要先设置完用户信息后再执行这个START埋点
// // 此时被block住的日志会携带上用户信息逐条发出
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'START']
});
</script>
</head>
<body>
<noscript>
<strong>We're sorry but ligthrestaurant doesn't work properly without
JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app">
<div style="background: #ecf0f5;text-align: center;height: 100vh;font-family: 'Comfortaa', cursive;"><img
style="width: 100px;height: 80vh;margin: 20px;display: inline-block;" src="./image/loading.svg"></div>
</div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<template>
<a-config-provider :locale="locale">
<div id="app">
<div class="content">
<router-view/>
</div>
</div>
</a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
/* eslint-disable */
export default {
name: 'App',
data() {
return {
locale: zhCN,
show:false,
screenWidth: document.body.clientWidth, // 屏幕尺寸
}
},
mounted () {
const that = this
window.addEventListener('resize',()=>{
window.screenWidth = document.body.clientWidth
that.screenWidth = window.screenWidth
var news = document.documentElement;
news.style.fontSize = that.screenWidth / 10 + 'px'
});
var news = document.documentElement;
news.style.fontSize = that.screenWidth / 10 + 'px'
},
}
/* eslint-enable */
</script>
<style lang="less">
body {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-corner {
background: rgb(200, 210, 224);
}
&::-webkit-scrollbar-thumb {
background: #2397f6;
border-radius: 10px;
}
&::-webkit-scrollbar-track {
background: #f3f4f9;
border-radius: 2px;
}
}
</style>
import axios from '@/axios/index.js'
export function getMoneyCount () {
return axios({
url: '/gov/whole/research/money/count',
method: 'get',
})
}
export function getEnterprises () {
return axios({
url: '/gov/scientific/enterprises',
method: 'get',
})
}
export function getAchievements () {
return axios({
url: '/gov/scientific/achievements',
method: 'get',
})
}
export function create () {
return axios({
url: '/gov/science/create',
method: 'get',
})
}
import axios from 'axios'
import store from '@/store' // progress bar style
// import ElementUI from 'element-ui'
// import router from '../router'
// import Vue from 'vue';
/* eslint-disable */
// 默认配置一个api代理转发
axios.defaults.baseURL = '/userApi';
// axios.defaults.baseURL = '/api';
// 跨域请求,允许保存cookie
axios.defaults.withCredentials = true
axios.defaults.headers.common['token'] = 'Bearer ' + store.getters.access_token
axios.defaults.headers.common['Authorization'] = 'bearer ' + store.getters.access_token
// 配置接口返回code不为0时 弹出错误配置信息
axios.interceptors.response.use((config) => {
// const token = store.getters.access_token
// if(token){
// config.headers.common['token'] = 'Bearer ' + token// token
// // console.log('嘻嘻嘻嘻',config,config.headers)
// }
return config
}, function (error) {
if (error.response) {
if(error.response.status === 401){
return Promise.reject(error.response.data)
}
if (error.response.data.code === 1 && error.response.status !== 401){
return Promise.reject(error.response.data)
}
}
})
export default axios
/* eslint-enable */
<template>
<div class="header">
<div class="header-one">
<div style="display: flex">
<div @click="gotoGov" style="cursor: pointer;">数字政府</div>
<span v-if="!isHome">
<a-dropdown>
<a class="ant-dropdown-link">
定海<a-icon type="down" style="margin-left: 5px"/>
</a>
<a-menu slot="overlay">
<a-menu-item v-for="(item,index) in list" :key="index">
<div @click="goto(item.url)">{{ item.name }}</div>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</div>
<div>
<div class="top-name">
<div class="top-button" @click="gotoHome">数字舟山</div>
<div class="admin-name">{{userInfo.aliasName}}</div>
</div>
</div>
</div>
<div class="header-search" @click="gotoSearch">
请输入关键词
<div class="header-search-button">搜索</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { clearStore } from '@/util/store'
export default {
props: {
noSearch: {
type: Boolean,
default: false
},
headerClick: {
type: Boolean,
default: false
},
isHome: {
type: Boolean,
default: false
}
},
data () {
return {
list: [{
name: '舟山',
url: 'https://szzs.zhoushan.gov.cn/portal/#/dashboard'
},{
name: '定海',
url: '/gov'
},{
name: '普陀',
url: 'https://szh.putuo.gov.cn:4443/digitgov_index'
},{
name: '岱山',
url: 'https://szgg.daishan.gov.cn:8088/#/dashboard'
},{
name: '嵊泗',
url: 'https://szss.shengsi.gov.cn/portal/?isNum=1'
},{
name: '高新区',
url: 'http://60.163.193.114:8081/#/gov'
},{
name: '普朱',
url: 'http://61.153.218.179:8082/#/govDigital'
},{
name: '新城',
url: 'http://60.163.193.140:8081/#/gov'
},{
name: '金塘',
url: 'http://60.163.193.146:8081/#/govDigital'
},{
name: '六横',
url: 'http://60.163.193.145:8081/#/govDigital'
}]
}
},
computed: {
...mapGetters(['userInfo'])
},
methods: {
gotoSearch () {
this.$router.push({
path: '/search'
})
},
gotoGov () {
// if (this.headerClick) {
this.$router.push({
path: '/gov'
})
// }else{
// this.$router.push({
// path: '/home'
// })
// }
},
gotoHome () {
let herf = 'https://szzs.zhoushan.gov.cn/portal/#/dashboard'
// if (this.isHome) {
// // window.location.href = 'https://szzs.zhoushan.gov.cn/portal/#/'
// herf = 'https://szzs.zhoushan.gov.cn/portal/#/'
// } else {
// herf = 'https://szzs.zhoushan.gov.cn/portal/#/dashboard'
// }
let ua = navigator.userAgent.toLowerCase()
if((ua.indexOf('dingtalk') >= 0 || !!ua.match(/AppleWebKit.*Mobile.*/) || ua.indexOf('iPad') > -1 || ua.indexOf('ipad') > -1 || ua.indexOf('android') > -1 || ua.indexOf('Adr') > -1)){
dd.openLink({
url: `${herf}?ddtab=true`
}).then(res => {
console.log(res)
}).catch(err => {})
}else{
window.open(herf,'_blank')
}
},
goto (val) {
if( val === '/gov' ){
this.$router.push({
path: '/gov'
})
return false
}
if( val ){
let herf = val
let ua = navigator.userAgent.toLowerCase()
if((ua.indexOf('dingtalk') >= 0 || !!ua.match(/AppleWebKit.*Mobile.*/) || ua.indexOf('iPad') > -1 || ua.indexOf('ipad') > -1 || ua.indexOf('android') > -1 || ua.indexOf('Adr') > -1)){
dd.openLink({
url: `${herf}?ddtab=true`
}).then(res => {
console.log(res)
}).catch(err => {})
}else{
window.open(herf,'_blank')
}
}
},
logout () {
clearStore({
type: 'all'
})
this.$router.push({
path: '/login'
})
}
}
}
</script>
<style lang="less" scoped>
.header {
background: url(/image/header.png);
height: 3rem;
background-size: 100% 100%;
}
.top-name{
display: flex;
font-size: 18px;
align-items: center;
.admin-name{
display: flex;
align-items: center;
font-size: 0.15rem;
letter-spacing: 0.1rem;
&::before{
width: .25974rem;
height: .25974rem;
margin-right: .15rem;
display: inline-block;
background: url(/image/user1.png) no-repeat;
background-size: 100% 100%;
vertical-align: top;
content: "";
}
}
}
.header-one {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.3rem 0.47rem;
div {
font-size: 0.18rem;
color: #FCFCFC;
}
.top-button {
font-size: 0.09rem;
padding: 0.045rem 0.12rem;
background: #25A0F9;
border-radius: 3px;
margin-right: 0.4rem;
cursor: pointer;
}
::v-deep a {
color: white;
font-size: 0.13rem;
margin-left: 10px;
}
}
.header-search {
width: 50%;
margin: 0 auto;
color: rgba(112, 112, 112, 0.5);
padding: 0.08rem 0.18rem;
position: relative;
background: white;
border-radius: 10px;
font-size: 0.1rem;
margin-top: 0.12rem;
cursor: pointer;
.header-search-button {
cursor: pointer;
color: #FFFFFF;
border-radius: 0 10px 10px 0;
background: #FC8F4A;
position: absolute;
top: 0;
right: 0;
height: 100%;
display: flex;
align-items: center;
padding: 0 0.25rem;
font-size: 0.1rem;
}
}
</style>
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import '../public/css/iconfont.css';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import * as echarts from 'echarts';
import '../public/css/base.less';
import axios from './axios/index.js'
import VueParticles from 'vue-particles'
Vue.use(VueParticles)
Vue.prototype.$echarts = echarts
Vue.use(Antd);
Vue.config.productionTip = false;
new Vue({
router,
store,
axios,
render: h => h(App)
}).$mount('#app');
import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
const router = new Router({
routes: [
{
path: '/',
name: 'home',
component: () => import('./views/home/index.vue'),
meta: {
name: '首页'
}
}
]
})
export default router;
const getters = {
userInfo: state => state.common.userInfo,
access_token: state => state.common.access_token,
refresh_token: state => state.common.refresh_token
}
export default getters
import Vue from 'vue'
import Vuex from 'vuex'
import common from './modules/common'
import getters from './getters'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
common
},
getters
})
export default store
import { getStore, setStore } from '@/util/store';
/*eslint-disable*/
const common = {
state: {
access_token:
getStore({
name: 'access_token'
}) || '',
refresh_token:
getStore({
name: 'refresh_token'
}) || '',
userInfo: getStore({
name: 'userInfo'
}) || {}
},
actions: {
LoginByQrcode ({ commit }, userInfo) {
}
},
mutations: {
SET_ACCESS_TOKEN: (state, access_token) => {
state.access_token = access_token;
setStore({
name: 'access_token',
content: state.access_token,
type: 'session'
});
},
SET_USERINFO: (state, userInfo) => {
state.userInfo = userInfo;
setStore({
name: 'userInfo',
content: state.userInfo,
type: 'session'
});
},
}
}
export default common
export default {
data () {
return {
}
},
components: { },
methods: {
// list 循环的数组 name 拿出来的值 sort是否倒序一下
getDetailData(list,name,sort) {
let data = list.map(item => {
return item[name];
})
if( sort ){
data = data.reverse()
}
return data
},
getLI (arr,name) {
let map = {}
for (let i = 0; i < arr.length; i++) {
let ai = arr[i]
if (!map[ai[name]]) {
map[ai[name]] = [ai]
} else {
map[ai[name]].push(ai)
}
}
let ress = []
Object.keys(map).forEach(key => {
ress.push({
id: key,
data: map[key],
})
})
return ress
},
getDetailDatabyName(list,name,byname,sort) {
let data = []
list.map(item => {
if( item.zjd === byname ){
data.push(item[name].toFixed(2));
}
})
if( sort ){
data = data.reverse()
}
return data
},
get100(list) {
let data = list.map(item => {
return Number(item) * 100;
})
return data
},
// 页面变化耕者变化 不然一个一个写太多了
getSe (array) {
window.onresize = ()=>{
for (let index = 0; index < array; index++) {
this[`myChart${index ? index : ''}`].resize()
}
}
},
// 相加
getSum (array,name) {
let data = 0
array.forEach(element => {
data = data + element[name]
});
return data
}
},
}
\ No newline at end of file
/*eslint-disable*/
/**
* 判断是否为空
*/
const validatenull = (val) => {
if (typeof val === 'boolean') {
return false
}
if (typeof val === 'number') {
return false
}
if (val instanceof Array) {
if (val.length === 0) return true
} else if (val instanceof Object) {
if (JSON.stringify(val) === '{}') return true
} else {
if (val === 'null' || val == null || val === 'undefined' || val === undefined || val === '') return true
return false
}
return false
}
/**
* 存储localStorage
*/
export const setStore = (params = {}) => {
let {
name,
content,
type
} = params
name = 'ZSSZ-' + name
const obj = {
dataType: typeof (content),
content: content,
type: type,
datetime: new Date().getTime()
}
if (type) {
window.sessionStorage.setItem(name, JSON.stringify(obj))
} else {
window.localStorage.setItem(name, JSON.stringify(obj))
}
}
/**
* 获取localStorage
*/
export const getStore = (params = {}) => {
let {
name,
debug
} = params
name = 'ZSSZ-' + name
let obj = {}
let content
obj = window.sessionStorage.getItem(name)
if (validatenull(obj)) obj = window.localStorage.getItem(name)
if (validatenull(obj)) return
try {
obj = JSON.parse(obj)
} catch (e) {
return obj
}
if (debug) {
return obj
}
if (obj.dataType === 'string') {
content = obj.content
} else if (obj.dataType === 'number') {
content = Number(obj.content)
} else if (obj.dataType === 'boolean') {
content = eval(obj.content)
} else if (obj.dataType === 'object') {
content = obj.content
}
return content
}
/**
* 删除localStorage
*/
export const removeStore = (params = {}) => {
let {
name,
type
} = params
name = 'ZSSZ-' + name
if (type) {
window.sessionStorage.removeItem(name)
} else {
window.localStorage.removeItem(name)
}
}
/**
* 获取全部localStorage
*/
export const getAllStore = (params = {}) => {
const list = []
const {
type
} = params
if (type) {
for (let i = 0; i <= window.sessionStorage.length; i++) {
list.push({
name: window.sessionStorage.key(i),
content: getStore({
name: window.sessionStorage.key(i),
type: 'session'
})
})
}
} else {
for (let i = 0; i <= window.localStorage.length; i++) {
list.push({
name: window.localStorage.key(i),
content: getStore({
name: window.localStorage.key(i)
})
})
}
}
return list
}
/**
* 清空全部localStorage
*/
export const clearStore = (params = {}) => {
const {type} = params
if (type) {
window.sessionStorage.clear()
} else {
window.localStorage.clear()
}
}
<template>
<div class="about">
<h1>This is an about 2page</h1>
</div>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
},
mounted() {
}
};
</script>
<template>
<div class="about">
<h1>This is an about 2page</h1>
</div>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
},
mounted() {
}
};
</script>
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? './' : './',
outputDir: 'dist',
lintOnSave: true,
runtimeCompiler: true, //关键点在这
// 调整内部的 webpack 配置。
// 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/webpack.md
chainWebpack: () => {},
configureWebpack: () => {},
// 配置 webpack-dev-server 行为。
devServer: {
open: process.platform === 'darwin',
host: '0.0.0.0',
port: 8080,
https: false,
hotOnly: false,
// 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/cli-service.md#配置代理
proxy: {
'/userApi': {
// target: 'http://192.168.2.146:8083/',
target: 'https://szdh.dinghai.gov.cn:8081/',
// target: 'http://8.131.226.44:8081/',
changeOrigin: true,
pathRewrite: {
'^/userApi': '/userApi'
}
}
},
before: app => {}
}
};
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