├── favicon.ico ├── dist ├── favicon.ico ├── assets │ ├── element-icons.1573214880519.ttf │ └── element-icons.1573214880519.woff ├── css │ ├── 6.1573214881950.css │ ├── 8.1573214881950.css │ ├── 7.1573214881950.css │ └── upload.1573214881950.css ├── index.html └── js │ ├── bundle.js │ ├── 8.1573214880519.js │ └── 6.1573214880519.js ├── src ├── css │ ├── base.less │ ├── box-shadow.less │ ├── pc.less │ ├── background.less │ ├── flex.less │ ├── app.less │ ├── line-height.less │ ├── public.less │ ├── font.less │ ├── border.less │ ├── height.less │ ├── width.less │ ├── padding.less │ └── margin.less ├── pages │ ├── assets │ │ └── notice.png │ ├── App.vue │ ├── login.vue │ ├── manage │ │ ├── diction.vue │ │ ├── set-site.vue │ │ ├── set-net.vue │ │ ├── admin.vue │ │ ├── download.vue │ │ ├── index.vue │ │ ├── user.vue │ │ └── custom.vue │ ├── Info.vue │ └── user │ │ └── index.vue ├── index.html ├── index.js ├── store │ ├── index.js │ └── api.js └── router.js ├── README.md ├── .babelrc ├── .gitignore ├── webpack ├── build.js ├── server.js ├── webpack.dll.js ├── webpack.config.js ├── webpack.dev.js ├── webpack.prod.js ├── vendor │ └── vue-manifest.json └── webpack.base.js ├── lib ├── get.js ├── set.js ├── vue-module.js ├── env-base.js ├── storage.js ├── config.js ├── province.js ├── validator.js ├── lang.js ├── date.js ├── webapi.js └── dateformat.js └── package.json /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wyulang/vue4/HEAD/favicon.ico -------------------------------------------------------------------------------- /dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wyulang/vue4/HEAD/dist/favicon.ico -------------------------------------------------------------------------------- /src/css/base.less: -------------------------------------------------------------------------------- 1 | @bs:37.5rem; 2 | @bs75:75rem; 3 | @bs64:64rem; 4 | 5 | @color:#ff8600; -------------------------------------------------------------------------------- /src/pages/assets/notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wyulang/vue4/HEAD/src/pages/assets/notice.png -------------------------------------------------------------------------------- /dist/assets/element-icons.1573214880519.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wyulang/vue4/HEAD/dist/assets/element-icons.1573214880519.ttf -------------------------------------------------------------------------------- /dist/assets/element-icons.1573214880519.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wyulang/vue4/HEAD/dist/assets/element-icons.1573214880519.woff -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue4 2 | 3 | 纯webpack构架的vue3.0 框架 4 | 5 | 启动 npm run dev 6 | 7 | DLL npm run dll 8 | 9 | 打包 npm run build 10 | 11 | 技术群QQ 66060257 12 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "corejs": "3", 7 | "useBuiltIns": "usage" 8 | } 9 | ] 10 | ] 11 | } -------------------------------------------------------------------------------- /src/css/box-shadow.less: -------------------------------------------------------------------------------- 1 | .sha-b{ 2 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15); 3 | } 4 | .sha-all{ 5 | box-shadow:0px 0px 10px #9C9C9C; 6 | } 7 | .sha-6{ 8 | box-shadow:0px 0px 6px #ddd; 9 | } 10 | .sha-right{ 11 | box-shadow:3px 0px 3px #d5eaff; 12 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw* 21 | -------------------------------------------------------------------------------- /dist/css/6.1573214881950.css: -------------------------------------------------------------------------------- 1 | .fc-1d7eb8[data-v-7e4c7832]{color:#1d7eb8}.font-b80520[data-v-7e4c7832]{color:#b80520}.btnReturn[data-v-7e4c7832]{padding:10px 20px;border:1px solid #1d7eb8}.canvass[data-v-7e4c7832]{background-color:transparent;border:1px solid #1d7eb8;color:#1d7eb8;padding:10px;font-size:15px;width:400px} -------------------------------------------------------------------------------- /webpack/build.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack') // 加载 webpack 2 | const webpackConfig = require("./webpack.prod.js"); 3 | const chalk = require('chalk'); 4 | const ora = require('ora'); 5 | 6 | process.stderr.write(chalk.blueBright.bold(` build start ..... \n\n`)); 7 | webpack(webpackConfig, (err, state) => {}); 8 | 9 | -------------------------------------------------------------------------------- /lib/get.js: -------------------------------------------------------------------------------- 1 | import { isUndefined } from './lang'; 2 | function get(source, [head, ...tail]) { 3 | source = source[head]; 4 | return tail.length && source ? get(source, tail) : source; 5 | } 6 | export default (source, path, defaultValue) => { 7 | const result = get(source || {}, path.split('.')); 8 | return isUndefined(result) ? defaultValue : result; 9 | }; 10 | -------------------------------------------------------------------------------- /webpack/server.js: -------------------------------------------------------------------------------- 1 | const webpack = require("webpack"); 2 | const webpackConfig = require("./webpack.dev.js"); 3 | let WebpackDevServer = require('webpack-dev-server'); 4 | let config = require('./webpack.config.js'); 5 | 6 | 7 | const compiler = webpack(webpackConfig); 8 | const devServerOptions = Object.assign({}, webpackConfig.devServer); 9 | const server = new WebpackDevServer(compiler, devServerOptions); 10 | 11 | 12 | server.listen(config.port, config.host, res => {}); -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 传媒之窗 11 | 12 | 13 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /lib/set.js: -------------------------------------------------------------------------------- 1 | import { isObject, isArray } from './lang'; 2 | function set(source, [head, ...tail], value) { 3 | source = source[head] = tail.length ? source[head] || {} : value; 4 | if (tail.length) { 5 | if (isObject(source) && !isArray(source)) { 6 | set(source, tail, value); 7 | } 8 | else { 9 | throw new Error(`path node ['.${head}'] must be plain object {}!`); 10 | } 11 | } 12 | } 13 | export default (source, path, value) => { 14 | source = source || {}; 15 | set(source, path.split('.'), value); 16 | return source; 17 | }; 18 | -------------------------------------------------------------------------------- /dist/css/8.1573214881950.css: -------------------------------------------------------------------------------- 1 | .menu-bgs{background-color:#a0cfff}.menu-lines{border-top:1px solid #3a8fcc}.uploads{padding:10px;box-sizing:border-box;height:100%;position:relative}.uploads .body-flies{position:absolute;top:0;left:0;width:100%;bottom:0}.uploads .uploader-btn:hover{background-color:transparent!important}.uploads .filebox{position:absolute;top:0;left:0;width:100%;bottom:0}.uploads .filelist{padding:10px;box-sizing:border-box;display:-webkit-box;display:flex;flex-wrap:wrap}.uploads .filelist .item-list{border:1px solid #f1f1f1;padding:10px;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-flex:1;flex:1;width:15%;max-width:15%;min-width:15%;margin-right:16px;margin-bottom:10px}.uploads .filelist .item-list:last-child{margin-right:0} -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './pages/App.vue'; 3 | import router from './router'; 4 | import store from './store/index'; 5 | import ElementUI from 'element-ui'; 6 | import { session, storages } from 'lib/storage.js'; 7 | import Vuebar from 'vuebar'; 8 | import date from '../lib/date.js'; 9 | import uploader from 'vue-simple-uploader'; 10 | Vue.use(uploader); 11 | Vue.use(Vuebar); 12 | Vue.use(ElementUI); 13 | Vue.prototype.session = session; 14 | Vue.prototype.storage = storages; 15 | Vue.use(ElementUI); 16 | new Vue({ 17 | el:'#app', 18 | router, 19 | store, 20 | render: (h) => h(App), 21 | }); 22 | 23 | Vue.filter('date',function(value,fmt){ 24 | return date.format(value) 25 | }) 26 | 27 | Vue.filter('fileSize',function(value,fmt){ 28 | return date.conver(value) 29 | }) 30 | -------------------------------------------------------------------------------- /dist/css/7.1573214881950.css: -------------------------------------------------------------------------------- 1 | .inputs[data-v-c40149d6]{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;border:1px solid hsla(0,0%,100%,.5);background-color:hsla(0,0%,100%,.4);width:200px;border-radius:3px;padding:8px 15px;margin:0 auto 10px;display:block;text-align:center;font-size:13px;-webkit-transition-duration:.25s;transition-duration:.25s;font-weight:300}.inputs[data-v-c40149d6]:focus{background-color:#fff;color:#333}.buttons[data-v-c40149d6]{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:hsla(0,0%,100%,.8);border:0;padding:10px 15px;color:#333;border-radius:3px;width:180px;cursor:pointer;font-family:microsoft yahei,Arial,sans-serif;font-size:16px;font-weight:700;-webkit-transition-duration:.25s;transition-duration:.25s}.buttons[data-v-c40149d6]:hover{background-color:#fff} -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | Vue.use(Vuex); 4 | import VueClipboard from 'vue-clipboard2' 5 | Vue.use(VueClipboard) 6 | 7 | export default new Vuex.Store({ 8 | state: { 9 | isUpload: false, 10 | downloadFile: [{uid:'111',pross:0}] 11 | }, 12 | actions: { 13 | }, 14 | mutations: { 15 | setMenuShow(state, val) { 16 | state.isMenu = val 17 | }, 18 | setUpload(state, value) { 19 | state.isUpload = value 20 | }, 21 | setDownLoad(state, val) { 22 | state.downloadFile = val; 23 | }, 24 | setDownLoadPross(state, val) { 25 | let prss = state.downloadFile.find(v => { return v.uid = val.uid }) 26 | if (prss) { 27 | prss.pross = val.pross; 28 | console.log(val,prss) 29 | } 30 | } 31 | } 32 | }) 33 | -------------------------------------------------------------------------------- /lib/vue-module.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import { formatDate, dateAdd } from 'lib/dateformat.js'; 3 | Vue.directive('numberInt', { 4 | bind: function (el, binding, vnode) { 5 | const element = el.getElementsByTagName('input')[0] 6 | const len = binding.arg // 初始化设置 7 | element.value = Number(element.value).toFixed(len) // 失焦时候格式化 8 | element.addEventListener('keyup', function () { 9 | vnode.data.model.callback(element.value.replace(/[^\d\.]/g, '')) 10 | }); 11 | element.addEventListener('blur', function () { 12 | let val = element.value && element.value.replace(/[^\d\.]/g, ''); 13 | val = Number(val).toFixed(len); 14 | vnode.data.model.callback(val) 15 | }) 16 | } 17 | }) 18 | 19 | Vue.filter('date', function (value, format = 'YYYY-MM-DD') { 20 | return formatDate(value, format); 21 | }) 22 | 23 | 24 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 传媒之窗
-------------------------------------------------------------------------------- /src/pages/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 44 | -------------------------------------------------------------------------------- /lib/env-base.js: -------------------------------------------------------------------------------- 1 | import get from './get'; 2 | import { isObject } from './lang'; 3 | export default class EnvBase { 4 | /** 5 | * 这里可以在子类重写每个环境的变量的来源 6 | */ 7 | getEnvName() { 8 | return undefined; 9 | } 10 | /** 11 | * 获取指定环境的配置信息 12 | * @author tianyingchun 13 | * @param {String} key 指定环境配置信息 14 | * @param {String} envName 环境名 test, inte, prod, 默认未定义, can aslo be an `key` path of source object. 15 | * @return {Any} 查看路径path.{envName} 找到了直接返回,找不到直接返回undefined. 16 | */ 17 | env(key, envName) { 18 | return this.getFromSource(this, key, envName); 19 | } 20 | getFromSource(source, key, envName) { 21 | envName = envName || this.getEnvName() || 'prod'; 22 | if (!key) { 23 | throw new Error('the `key` is required!'); 24 | } 25 | const keyValues = get(source, `${key}`, undefined); 26 | if (isObject(keyValues)) { 27 | return get(keyValues, `${envName}`, undefined) || keyValues; 28 | } 29 | return keyValues; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/storage.js: -------------------------------------------------------------------------------- 1 | export default function storage(key, value, type) { 2 | if (type) { 3 | localStorage.removeItem(key); 4 | } else { 5 | if (!!value) { 6 | return localStorage.setItem(key, JSON.stringify(value)); 7 | } else { 8 | let val = localStorage.getItem(key) || ""; 9 | return (val && JSON.parse(val)) || ""; 10 | } 11 | } 12 | } 13 | 14 | export const storages = (key, value, type) => { 15 | if (type) { 16 | localStorage.removeItem(key); 17 | } else { 18 | if (!!value) { 19 | return localStorage.setItem(key, JSON.stringify(value)); 20 | } else { 21 | let val = localStorage.getItem(key) || ""; 22 | return (val && JSON.parse(val)) || ""; 23 | } 24 | } 25 | } 26 | 27 | export const session = (key, value, type) => { 28 | if (type) { 29 | sessionStorage.removeItem(key); 30 | } else { 31 | if (!!value) { 32 | return sessionStorage.setItem(key, JSON.stringify(value)); 33 | } else { 34 | let val = sessionStorage.getItem(key) || ""; 35 | return (val && JSON.parse(val)) || ""; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /lib/config.js: -------------------------------------------------------------------------------- 1 | import envBase from './env-base.js'; 2 | export class config extends envBase { 3 | constructor() { 4 | super(); 5 | } 6 | 7 | //1:金榜题名,2:浙考一点通 8 | getEnvName() { 9 | let env = 1; 10 | let url = window.location.href; 11 | if (url.includes('pioneeringedu')) { 12 | env = 2; 13 | } 14 | return env; 15 | } 16 | 17 | type = this.getEnvName(); 18 | 19 | //取浏览参数 20 | getUrlParame(name) { 21 | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 22 | var r = window.location.search.substr(1).match(reg);//search,查询?后面的参数,并匹配正则 23 | if (r != null) return unescape(r[2]); return null; 24 | } 25 | 26 | toHref(href, target, obj) { 27 | let el = document.createElement("a"); 28 | document.body.appendChild(el); 29 | el.href = href; 30 | if (obj) { 31 | let parm = href.includes('?') ? '' : '?'; 32 | for (let item in obj) { 33 | parm += `${item}=${obj[item]}&`; 34 | } 35 | parm = parm.substring(0, parm.length - 1); 36 | el.href += parm; 37 | } 38 | if (!target) { 39 | el.target = '_blank'; 40 | } 41 | el.click(); 42 | document.body.removeChild(el); 43 | } 44 | } 45 | 46 | export default new config(); -------------------------------------------------------------------------------- /webpack/webpack.dll.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const webpack = require('webpack') 5 | const { CleanWebpackPlugin } = require('clean-webpack-plugin') 6 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); 7 | let config = require('./webpack.config.js'); 8 | 9 | let webpackDll = { 10 | mode: 'production', 11 | entry: { 12 | vue: [ 13 | 'vue/dist/vue.esm.js', 14 | 'vuex', 15 | 'axios', 16 | 'vue-router' 17 | ] 18 | }, 19 | output: { 20 | path: path.join(__dirname, '../webpack/vendor/'), // 生成的文件存放路径 21 | filename: '[name].library.js', // 生成的文件名字(默认为dll.vendor.[hash].js) 22 | library: '[name]_library' // 生成文件的映射关系,与下面DllPlugin中配置对应 23 | }, 24 | optimization: { 25 | noEmitOnErrors: true, 26 | minimizer: [ 27 | new UglifyJsPlugin({ 28 | cache: true, 29 | parallel: true, 30 | sourceMap: false // set to true if you want JS source maps 31 | }) 32 | ] 33 | }, 34 | plugins: [ 35 | new CleanWebpackPlugin(), 36 | new webpack.DllPlugin({ 37 | path: path.join(__dirname, '../webpack/vendor/[name]-manifest.json'), 38 | name: '[name]_library', // 与上面output中配置对应 39 | context: __dirname // 上下文环境路径(必填,为了与DllReferencePlugin存在与同一上下文中) 40 | }) 41 | ] 42 | } 43 | module.exports = webpackDll; -------------------------------------------------------------------------------- /webpack/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs-extra'); 3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 4 | // 取本机IP地址 5 | const getIPAdress = () => { 6 | var interfaces = require('os').networkInterfaces(); 7 | for (var devName in interfaces) { 8 | var iface = interfaces[devName]; 9 | for (var i = 0; i < iface.length; i++) { 10 | var alias = iface[i]; 11 | if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) { 12 | return alias.address; 13 | } 14 | } 15 | } 16 | } 17 | //文件是否存在 18 | const isFile = v => { 19 | return fs.pathExistsSync(v); 20 | } 21 | 22 | const [TARGET, clientItem] = [process.env.npm_lifecycle_event, process.argv[2]]; 23 | 24 | const vueLoader = { 25 | dev: "vue-style-loader", 26 | build: { 27 | loader: MiniCssExtractPlugin.loader, 28 | options: { 29 | publicPath: '../', 30 | hmr: TARGET == 'build', // 仅dev环境启用HMR功能 31 | } 32 | }, 33 | dll: MiniCssExtractPlugin.loader, 34 | }; 35 | 36 | module.exports = { 37 | root: path.resolve(__dirname, '../'), 38 | entry: path.resolve(__dirname, '../src/index.js'), 39 | publicPath: '', 40 | outPath: path.resolve(__dirname, '../dist'), 41 | devServer: getIPAdress() || 'localhost', 42 | port: '6006', 43 | isFile: isFile, 44 | getIPAdress: getIPAdress, 45 | vueLoader: vueLoader[TARGET], 46 | host:'0.0.0.0' 47 | } -------------------------------------------------------------------------------- /src/css/pc.less: -------------------------------------------------------------------------------- 1 | @charset"UTF-8"; 2 | @bs:1px; 3 | body, html { 4 | /* min-width:1200px; */ 5 | font-family: MicrosoftYaHei,Helvetica,sans-serif,Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; 6 | margin:0; 7 | padding:0; 8 | font-size:12px; 9 | color:#5e5e5e; 10 | -webkit-font-smoothing:antialiased; 11 | height: 100%; 12 | width: 100%; 13 | } 14 | button, dd, div, dl, dt, form, img, input, li, ol, p, td, th, ul { 15 | margin:0; 16 | padding:0; 17 | border:0 18 | } 19 | button { 20 | cursor: pointer; 21 | } 22 | li { 23 | list-style-type:none 24 | } 25 | i,em{ 26 | font-style: normal; 27 | } 28 | img { 29 | vertical-align:top 30 | } 31 | h1, h2, h3, h4, h5, h6 { 32 | margin:0; 33 | padding:0; 34 | font-size:14px; 35 | font-weight:500 36 | } 37 | input { 38 | font-size:12px; 39 | vertical-align:middle; 40 | color:#333; 41 | outline:0 42 | } 43 | table { 44 | border-collapse:collapse; 45 | border-spacing:0 46 | } 47 | a { 48 | cursor:pointer; 49 | outline:0 50 | } 51 | a:hover, a:link, a:visited { 52 | text-decoration:none 53 | } 54 | 55 | 56 | @import './public.less'; 57 | @import './position.less'; 58 | @import './background.less'; 59 | @import './border.less'; 60 | @import './flex.less'; 61 | @import './font.less'; 62 | @import './height.less'; 63 | @import './margin.less'; 64 | @import './padding.less'; 65 | @import './width.less'; 66 | @import './line-height.less'; 67 | @import './box-shadow.less'; 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/store/api.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import baseApi from "lib/webapi.js"; 4 | import { Message } from 'element-ui'; 5 | 6 | class webapi extends baseApi { 7 | constructor() { 8 | super(); 9 | } 10 | getEnvName() { 11 | let env = 'prod'; 12 | let url = window.location.href; 13 | if (url.indexOf('localhost') > 0) { 14 | env = "me" 15 | } else if (url.indexOf('6006') > 0) { 16 | env = "inte" 17 | } 18 | return env; 19 | } 20 | 21 | prod = `http://${window.location.host}/`; 22 | 23 | ftp = { 24 | // me: 'http://localhost:8080/', 25 | me: 'http://47.100.197.169:8080/', 26 | // me: 'http://118.24.198.193:8080/', 27 | inte: 'http://118.24.198.193:8080/', 28 | prod: this.prod, 29 | }; 30 | 31 | getDomainApi(type) { 32 | return this.env('ftp') 33 | } 34 | 35 | setWithCredentials() { 36 | return true 37 | } 38 | 39 | setToken() { 40 | if (this.storage('userinfo')) { 41 | return { token: this.storage('userinfo').token } 42 | } else { 43 | return {} 44 | } 45 | } 46 | 47 | //请求体BUG提示 48 | getMessage(err, type) { 49 | if (type == 'then') { 50 | if (err.code && err.code == "4405") { 51 | Message.error(err.message || this.errorMess); 52 | window.location.href = "#/" 53 | } else if (err.code && err.code == "7001") { 54 | Message.error(err.message || this.errorMess); 55 | window.location.href = "#/info" 56 | } 57 | } else if (type == 'catch') { 58 | // Message.error(err.msg || this.errorMess); 59 | } 60 | } 61 | } 62 | 63 | export default new webapi(); 64 | -------------------------------------------------------------------------------- /lib/province.js: -------------------------------------------------------------------------------- 1 | export const province = [ 2 | { title: '北京', value: 0, select: true }, 3 | { title: '天津', value: 0, select: true }, 4 | { title: '河北', value: 0, select: true }, 5 | { title: '山西', value: 0, select: true }, 6 | { title: '内蒙古', value: 0, select: true }, 7 | { title: 'nono', value: 0, select: true }, 8 | { title: '辽宁', value: 0, select: true }, 9 | { title: '吉林', value: 0, select: true }, 10 | { title: '黑龙江', value: 0, select: true }, 11 | { title: 'nono', value: 0, select: true }, 12 | { title: '上海', value: 0, select: true }, 13 | { title: '江苏', value: 0, select: true }, 14 | { title: '浙江', value: 0, select: true }, 15 | { title: '安徽', value: 0, select: true }, 16 | { title: '福建', value: 0, select: true }, 17 | { title: '江西', value: 0, select: true }, 18 | { title: '山东', value: 0, select: true }, 19 | { title: 'nono', value: 0, select: true }, 20 | { title: '河南', value: 0, select: true }, 21 | { title: '湖北', value: 0, select: true }, 22 | { title: '湖南', value: 0, select: true }, 23 | { title: '广东', value: 0, select: true }, 24 | { title: '广西', value: 0, select: true }, 25 | { title: '海南', value: 0, select: true }, 26 | { title: 'nono', value: 0, select: true }, 27 | { title: '重庆', value: 0, select: true }, 28 | { title: '四川', value: 0, select: true }, 29 | { title: '贵州', value: 0, select: true }, 30 | { title: '云南', value: 0, select: true }, 31 | { title: '西藏', value: 0, select: true }, 32 | { title: 'nono', value: 0, select: true }, 33 | { title: '陕西', value: 0, select: true }, 34 | { title: '甘肃', value: 0, select: true }, 35 | { title: '青海', value: 0, select: true }, 36 | { title: '宁夏', value: 0, select: true }, 37 | { title: '新疆', value: 0, select: true } 38 | ] -------------------------------------------------------------------------------- /src/css/background.less: -------------------------------------------------------------------------------- 1 | .bs-all{background-size: 100%;} 2 | .bs-half{background-size: 50%;} 3 | .bs-c{background-size: cover;} 4 | .bs-all{background-size: 100% 100%;} 5 | .bc-t{background-color: transparent;} 6 | 7 | ._bc_(@c){ 8 | background-color: @c 9 | } 10 | 11 | .bc-0{._bc_(#000)} 12 | .bc-1{._bc_(#111)} 13 | .bc-2{._bc_(#222)} 14 | .bc-3{._bc_(#333)} 15 | .bc-4{._bc_(#444)} 16 | .bc-5{._bc_(#555)} 17 | .bc-6{._bc_(#666)} 18 | .bc-7{._bc_(#777)} 19 | .bc-8{._bc_(#888)} 20 | .bc-9{._bc_(#999)} 21 | .bc-a{._bc_(#aaa)} 22 | .bc-b{._bc_(#bbb)} 23 | .bc-c{._bc_(#ccc)} 24 | .bc-d{._bc_(#ddd)} 25 | .bc-e{._bc_(#eee)} 26 | .bc-f{._bc_(#fff)} 27 | 28 | .bc-fff{._bc_( #fff)} 29 | .bc-primary {._bc_( #409eff)} 30 | 31 | 32 | .bc-success {._bc_( #67c23a)} 33 | .bc-warning {._bc_( #eb9e05)} 34 | .bc-danger {._bc_( #FB5757)} 35 | .bc-red{._bc_( red)} 36 | .bc-info {._bc_( #878d99)} 37 | 38 | 39 | .bc-f1{._bc_(#f1f1f1)} 40 | .bc-f2{._bc_(#f2f2f2)} 41 | .bc-f3{._bc_(#f3f3f3)} 42 | .bc-f4{._bc_(#f4f4f4)} 43 | .bc-f5{._bc_(#f5f5f5)} 44 | .bc-f6{._bc_(#f6f6f6)} 45 | .bc-f7{._bc_(#f7f7f7)} 46 | .bc-f8{._bc_(#f8f8f8)} 47 | .bc-f9{._bc_(#f9f9f9)} 48 | .bc-fa{._bc_(#fafafa)} 49 | .bc-fb{._bc_(#fbfbfb)} 50 | 51 | .bc-wx{._bc_(#86c70d)} 52 | .bc-zfb{._bc_(#03a0eb)} 53 | 54 | .bc-primary {._bc_( #409eff)} 55 | .bc-4177FF {._bc_( #4177FF)} 56 | .bc-1B202A {._bc_( #1B202A)} 57 | .bc-1e83d3 {._bc_( #1e83d3)} 58 | .bc-6bafe3 {._bc_( #6bafe3)} 59 | .bc-b6de16 {._bc_( #b6de16)} 60 | .bc-fdde51 {._bc_( #FDDE51)} 61 | .bc-daf0dc {._bc_( #DAF0DC)} 62 | .bc-56D28D {._bc_( #56D28D)} 63 | .bc-t{._bc_( transparent)} 64 | 65 | .bc-success {._bc_( #67c23a)} 66 | .bc-warning {._bc_( #eb9e05)} 67 | .bc-danger {._bc_( #FB5757)} 68 | .bc-fe4e63{._bc_( #fe4e63)} 69 | .bc-red{._bc_( red)} 70 | .bc-info {._bc_( #878d99)} 71 | -------------------------------------------------------------------------------- /webpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const ProgressBarPlugin = require('progress-bar-webpack-plugin'); 2 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); 3 | const webpackbase = require('./webpack.base.js'); 4 | const webpack = require('webpack'); 5 | const merge = require('webpack-merge'); 6 | let config = require('./webpack.config.js'); 7 | const chalk = require('chalk'); 8 | const NodemonPlugin = require('nodemon-webpack-plugin'); 9 | 10 | 11 | let webpackDevConfig = { 12 | devtool: 'source-map', 13 | mode: 'development', 14 | devServer: { 15 | open: false, 16 | contentBase: config.outPath, 17 | publicPath: "/", 18 | hot: true, 19 | noInfo: true, 20 | port: config.port, 21 | host: config.host, 22 | historyApiFallback: { 23 | index: '/index.html' //与output的publicPath有关(HTMLplugin生成的html默认为index.html) 24 | } 25 | }, 26 | plugins: [ 27 | new webpack.NamedModulesPlugin(), 28 | new webpack.HotModuleReplacementPlugin(), 29 | new FriendlyErrorsPlugin({ 30 | compilationSuccessInfo: { 31 | messages: [ 32 | chalk.cyan.bold('Your application is running here: ') + chalk.greenBright.bold(`http://${config.devServer}:${config.port}/`), 33 | chalk.cyan.bold('Your application is running here: ') + chalk.greenBright.bold(`http://localhost:${config.port}/`) 34 | ] 35 | } 36 | }), 37 | new ProgressBarPlugin( 38 | { 39 | format: chalk.blueBright(' build :bar :percent (:elapsed seconds) '), 40 | clear: true, 41 | summary: false, 42 | customSummary: res => { 43 | process.stderr.write(chalk.blueBright(' ')) 44 | } 45 | } 46 | ), 47 | // new NodemonPlugin() 48 | ] 49 | } 50 | 51 | module.exports = merge(webpackbase, webpackDevConfig) -------------------------------------------------------------------------------- /lib/validator.js: -------------------------------------------------------------------------------- 1 | export const trim = (str) => { 2 | return str ? String(str).replace(/^\s+|\s+$/g, '') : ''; 3 | }; 4 | // remove '-' ' ' 5 | export const clearStr = (str) => { 6 | return str ? str.replace(/\s+|\-/g, '') : ''; 7 | }; 8 | // TOP 图片验证码的验证表达式 9 | export const isOtpCode = (source) => { 10 | return /^.{4}$/.test(trim(source)); 11 | }; 12 | // 邮政编码 13 | export const isPostCode = (source) => { 14 | return /^[1-9][0-9]{5}$/.test(trim(source)); 15 | }; 16 | // 身份证号码验证表达式 17 | export const isIdCard = (source) => { 18 | return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(clearStr(source)); 19 | }; 20 | // 银行卡号码验证表达式 21 | export const isBankCard = (source) => { 22 | return /^\d{12,}$/.test(clearStr(source)); 23 | }; 24 | // 所有字符必须为中文字符 25 | export const isChCode = (source) => { 26 | return /[^\u4e00-\u9fa5\s+]/ig.test(trim(source)); 27 | }; 28 | // 所有的英文字符 29 | export const isEnCode = (source) => { 30 | return /^[a-zA-Z\s]+$/.test(trim(source)); 31 | }; 32 | // 验证手机号码/^1[3|4|5|8][0-9]\d{4,8}$/ 33 | export const isMobile = (source) => { 34 | return /^1[3-9][0-9]\d{8}$/.test(clearStr(source)); 35 | }; 36 | // 移除字符串空字符串 37 | export const isRequired = (source) => { 38 | return trim(source).length > 0; 39 | }; 40 | // HTTP URL 地址 41 | export const isHttpUrl = (source) => { 42 | return /^https?:\/\//.test(trim(source)); 43 | }; 44 | 45 | // 只能输入数字 46 | export const isMumber = (source) => { 47 | return /^\d{1,}$/.test(clearStr(source)); 48 | }; 49 | 50 | export const isWxBrowser = () => { 51 | let ua = window.navigator.userAgent.toLowerCase() 52 | // 通过正则表达式匹配ua中是否含有MicroMessenger字符串 53 | let _micro = ua.match(/MicroMessenger/i) 54 | if (_micro === 'micromessenger' || (_micro && _micro[0] === 'micromessenger')) { 55 | return true 56 | } else { 57 | return false 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/lang.js: -------------------------------------------------------------------------------- 1 | // http://yui.yahooapis.com/3.18.1/build/yui/yui.js 2 | const TOSTRING = Object.prototype.toString; 3 | const TYPES = { 4 | 'boolean': 'boolean', 5 | 'undefined': 'undefined', 6 | 'number': 'number', 7 | 'string': 'string', 8 | '[object Function]': 'function', 9 | '[object RegExp]': 'regexp', 10 | '[object Array]': 'array', 11 | '[object Date]': 'date', 12 | '[object Error]': 'error' 13 | }; 14 | export const type = (o) => { 15 | return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null'); 16 | }; 17 | export const isFunction = (o) => { 18 | return type(o) === 'function'; 19 | }; 20 | export const isNull = (o) => { 21 | return o === null; 22 | }; 23 | export const isNumber = (o) => { 24 | return type(o) === 'number' && isFinite(o); 25 | }; 26 | export const isBoolean = (o) => { 27 | return type(o) === 'boolean'; 28 | }; 29 | export const isObject = (o, failfn = false) => { 30 | const t = typeof o; 31 | return (o && (t === 'object' || 32 | (!failfn && (t === 'function' || isFunction(o))))) || false; 33 | }; 34 | export const isPlainObject = (o) => { 35 | return isObject(o, true); 36 | }; 37 | export const isString = (o) => { 38 | return type(o) === 'string'; 39 | }; 40 | export const isUndefined = (o) => { 41 | return type(o) === 'undefined'; 42 | }; 43 | export const isArray = Array.isArray || ((o) => type(o) === 'array'); 44 | export const now = Date.now || (() => new Date().getTime()); 45 | export const fromJson = (json) => { 46 | return isString(json) ? JSON.parse(json) : json; 47 | }; 48 | export const toJson = (obj, pretty) => { 49 | if (isUndefined(obj)) { 50 | return undefined; 51 | } 52 | if (!isNumber(pretty)) { 53 | pretty = pretty ? 2 : null; 54 | } 55 | return JSON.stringify(obj, (key, value) => value, pretty); 56 | }; 57 | export const noop = () => { 58 | console.log('noop'); 59 | }; 60 | export const isEmptyObject = (obj) => { 61 | return Object.keys(obj).length <= 0; 62 | }; 63 | -------------------------------------------------------------------------------- /webpack/webpack.prod.js: -------------------------------------------------------------------------------- 1 | const ProgressBarPlugin = require('progress-bar-webpack-plugin'); 2 | const merge = require('webpack-merge'); 3 | const webpackbase = require('./webpack.base.js'); 4 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 5 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); 6 | const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); 7 | const chalk = require('chalk'); 8 | const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 9 | const config = require('./webpack.config.js'); 10 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 11 | const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); 12 | const _version = new Date().getTime(); 13 | 14 | const webpackProdConfig = { 15 | devtool: 'inline-cheap-source-map', 16 | mode: 'production', 17 | optimization: { 18 | noEmitOnErrors: true, 19 | minimizer: [ 20 | new UglifyJsPlugin({ 21 | cache: true, 22 | parallel: true, 23 | sourceMap: false // set to true if you want JS source maps 24 | }), 25 | new OptimizeCssAssetsPlugin({ 26 | cssProcessor: require('cssnano') 27 | }) 28 | ], 29 | splitChunks: { 30 | chunks: 'all' 31 | } 32 | }, 33 | plugins: [ 34 | new CleanWebpackPlugin(), 35 | new MiniCssExtractPlugin({ 36 | filename: `css/[name].${_version}.css`, 37 | chunkFilename: `css/[name].${_version}.css`, 38 | }), 39 | new ProgressBarPlugin( 40 | { 41 | format: chalk.blueBright(' build :bar :percent (:elapsed seconds) '), 42 | clear: false, 43 | summary: false, 44 | customSummary: res => { 45 | process.stderr.write(chalk.blueBright.bold(` build end use time ${res} \n`)) 46 | } 47 | } 48 | ), 49 | // new ParallelUglifyPlugin({ 50 | // uglifyJS: { 51 | // output: { 52 | // beautify: false, 53 | // comments: false 54 | // }, 55 | // compress: { 56 | // drop_console: true, 57 | // collapse_vars: true, 58 | // reduce_vars: true 59 | // } 60 | // } 61 | // }) 62 | ] 63 | } 64 | 65 | module.exports = merge(webpackbase, webpackProdConfig) -------------------------------------------------------------------------------- /src/css/flex.less: -------------------------------------------------------------------------------- 1 | /*弹性布局 wrap start end between around center middle*/ 2 | 3 | .flex { 4 | display: flex; 5 | display: -webkit-flex; 6 | } 7 | .flex-line { 8 | display: inline-flex; 9 | display: -webkit-inline-flex; 10 | } 11 | 12 | .flex-auto {flex: auto;} 13 | .flex-none {flex: none;} 14 | .if{display: inline-flex;} 15 | .flex-1{flex:1;flex-grow: 1;} 16 | 17 | /* flex-direction */ 18 | 19 | /* 主轴为水平方向,起点在左端 */ 20 | .fd-r{ 21 | flex-direction:row; 22 | } 23 | /* 主轴为水平方向,起点在右端 */ 24 | .fd-rr{ 25 | flex-direction:row-reverse; 26 | } 27 | /* 主轴为垂直方向,起点在上沿 */ 28 | .fd-c{ 29 | flex-direction:column; 30 | } 31 | /* 主轴为垂直方向,起点在下沿 */ 32 | .fd-cr{ 33 | flex-direction:column-reverse; 34 | } 35 | 36 | /* 不换行 */ 37 | .fw-n{ 38 | flex-wrap: nowrap 39 | } 40 | /* 换行,第一行在上方 */ 41 | .fw{ 42 | flex-wrap: wrap 43 | } 44 | /* 换行,第一行在下方 */ 45 | .fw-wr{ 46 | flex-wrap: wrap-reverse 47 | } 48 | 49 | /* (默认值):左对齐 */ 50 | .jc-s{ 51 | justify-content: flex-start; 52 | } 53 | /* 右对齐 */ 54 | .jc-e{ 55 | justify-content: flex-end; 56 | } 57 | /* 居中 */ 58 | .jc-c{ 59 | justify-content:center; 60 | } 61 | /* 两端对齐 */ 62 | .jc-b{ 63 | justify-content: space-between; 64 | } 65 | /* 每个项目两侧的间隔相等。所以,项目之间的间隔比项目与边框的间隔大一倍 */ 66 | .jc-a{ 67 | justify-content: space-around; 68 | } 69 | 70 | /* 起点对齐 */ 71 | .ai-s{ 72 | align-items: flex-start; 73 | } 74 | /* 终点对齐 */ 75 | .ai-e{ 76 | align-items: flex-end; 77 | } 78 | /* 中点对齐 */ 79 | .ai-c{ 80 | align-items: center; 81 | } 82 | /* 第一行文字的基线对齐 */ 83 | .ai-b{ 84 | align-items: baseline; 85 | } 86 | /* (默认值) */ 87 | .ai-st{ 88 | align-items: stretch; 89 | } 90 | 91 | 92 | /* 起点对齐 */ 93 | .ac-s{ 94 | align-content: flex-start; 95 | } 96 | /* 终点对齐 */ 97 | .ac-e{ 98 | align-content: flex-end; 99 | } 100 | /* 中点对齐 */ 101 | .ac-c{ 102 | align-content: center; 103 | } 104 | /* 第一行文字的基线对齐 */ 105 | .ac-b{ 106 | align-content: baseline; 107 | } 108 | /* (默认值) */ 109 | .ac-st{ 110 | align-content: stretch; 111 | } 112 | 113 | 114 | /* 起点对齐 */ 115 | .as-s{ 116 | align-self: flex-start; 117 | } 118 | /* 终点对齐 */ 119 | .as-e{ 120 | align-self: flex-end; 121 | } 122 | /* 中点对齐 */ 123 | .as-c{ 124 | align-self: center; 125 | } 126 | /* 第一行文字的基线对齐 */ 127 | .as-b{ 128 | align-self: baseline; 129 | } 130 | /* (默认值) */ 131 | .as-st{ 132 | align-self: stretch; 133 | } 134 | -------------------------------------------------------------------------------- /src/css/app.less: -------------------------------------------------------------------------------- 1 | * { 2 | font-style: normal; 3 | } 4 | 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, embed, 15 | figure, figcaption, footer, header, hgroup, 16 | main, menu, nav, output, ruby, section, summary, 17 | time, mark, audio, video { 18 | margin: 0; 19 | padding: 0; 20 | border: 0; 21 | vertical-align: baseline; 22 | } 23 | /* HTML5 display-role reset for older browsers */ 24 | article, aside, details, figcaption, figure, 25 | footer, header, hgroup, main, menu, nav, section { 26 | display: block; 27 | } 28 | ol, ul { 29 | list-style: none; 30 | } 31 | blockquote, q { 32 | quotes: none; 33 | } 34 | blockquote:before, blockquote:after, 35 | q:before, q:after { 36 | content: ''; 37 | content: none; 38 | } 39 | 40 | /* Don't kill focus outline for keyboard users: http://24ways.org/2009/dont-lose-your-focus */ 41 | a:hover, a:active,button,a { 42 | outline: none; 43 | } 44 | 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } 49 | 50 | html, 51 | *, 52 | *::before, 53 | *::after { 54 | box-sizing: border-box; 55 | } 56 | 57 | 58 | html { 59 | -webkit-text-size-adjust: 100%; 60 | min-height: 100%; 61 | background: #fff; 62 | } 63 | 64 | body, button, input, textarea { 65 | font-family: Helvetica, sans-serif; 66 | color: #333; 67 | font-size: 0.14rem; 68 | } 69 | 70 | button, input, textarea{ 71 | border: 0; 72 | outline: none; 73 | line-height: 1; 74 | } 75 | 76 | input{ 77 | line-height: normal ; 78 | padding: 0; 79 | margin: 0; 80 | } 81 | 82 | * { 83 | -webkit-tap-highlight-color: transparent; 84 | -webkit-touch-callout: none 85 | } 86 | 87 | html,body{ 88 | line-height: 1; 89 | height: 100%; 90 | } 91 | 92 | 93 | 94 | @import './public.less'; 95 | @import './base.less'; 96 | @import './position.less'; 97 | @import './background.less'; 98 | @import './border.less'; 99 | @import './flex.less'; 100 | @import './font.less'; 101 | @import './height.less'; 102 | @import './margin.less'; 103 | @import './padding.less'; 104 | @import './width.less'; 105 | @import './line-height.less'; 106 | @import './box-shadow.less'; -------------------------------------------------------------------------------- /src/css/line-height.less: -------------------------------------------------------------------------------- 1 | ._lh_(@h){ 2 | line-height: @h/@bs; 3 | } 4 | 5 | .lh-all{line-height: 100%} 6 | .lh-half{line-height:50%} 7 | 8 | .lh-6{._lh_(6)} 9 | .lh-7{._lh_(7)} 10 | .lh-8{._lh_(8)} 11 | .lh-9{._lh_(9)} 12 | .lh-10{._lh_(10)} 13 | .lh-11{._lh_(11)} 14 | .lh-12{._lh_(12)} 15 | .lh-13{._lh_(13)} 16 | .lh-14{._lh_(14)} 17 | .lh-15{._lh_(15)} 18 | .lh-16{._lh_(16)} 19 | .lh-17{._lh_(17)} 20 | .lh-18{._lh_(18)} 21 | .lh-19{._lh_(19)} 22 | .lh-20{._lh_(20)} 23 | .lh-21{._lh_(21)} 24 | .lh-22{._lh_(22)} 25 | .lh-23{._lh_(23)} 26 | .lh-24{._lh_(24)} 27 | .lh-25{._lh_(25)} 28 | .lh-26{._lh_(26)} 29 | .lh-27{._lh_(27)} 30 | .lh-28{._lh_(28)} 31 | .lh-29{._lh_(29)} 32 | .lh-30{._lh_(30)} 33 | .lh-31{._lh_(31)} 34 | .lh-32{._lh_(32)} 35 | .lh-33{._lh_(33)} 36 | .lh-34{._lh_(34)} 37 | .lh-35{._lh_(35)} 38 | .lh-36{._lh_(36)} 39 | .lh-37{._lh_(37)} 40 | .lh-38{._lh_(38)} 41 | .lh-39{._lh_(39)} 42 | .lh-40{._lh_(40)} 43 | .lh-41{._lh_(41)} 44 | .lh-42{._lh_(42)} 45 | .lh-43{._lh_(43)} 46 | .lh-44{._lh_(44)} 47 | .lh-45{._lh_(45)} 48 | .lh-46{._lh_(46)} 49 | .lh-47{._lh_(47)} 50 | .lh-48{._lh_(48)} 51 | .lh-49{._lh_(49)} 52 | .lh-50{._lh_(50)} 53 | .lh-51{._lh_(51)} 54 | .lh-52{._lh_(52)} 55 | .lh-53{._lh_(53)} 56 | .lh-54{._lh_(54)} 57 | .lh-55{._lh_(55)} 58 | .lh-56{._lh_(56)} 59 | .lh-57{._lh_(57)} 60 | .lh-58{._lh_(58)} 61 | .lh-59{._lh_(59)} 62 | .lh-60{._lh_(60)} 63 | .lh-61{._lh_(61)} 64 | .lh-62{._lh_(62)} 65 | .lh-63{._lh_(63)} 66 | .lh-64{._lh_(64)} 67 | .lh-65{._lh_(65)} 68 | .lh-66{._lh_(66)} 69 | .lh-67{._lh_(67)} 70 | .lh-68{._lh_(68)} 71 | .lh-69{._lh_(69)} 72 | .lh-70{._lh_(70)} 73 | .lh-71{._lh_(71)} 74 | .lh-72{._lh_(72)} 75 | .lh-73{._lh_(73)} 76 | .lh-74{._lh_(74)} 77 | .lh-75{._lh_(75)} 78 | .lh-76{._lh_(76)} 79 | .lh-77{._lh_(77)} 80 | .lh-78{._lh_(78)} 81 | .lh-79{._lh_(79)} 82 | .lh-80{._lh_(80)} 83 | .lh-81{._lh_(81)} 84 | .lh-82{._lh_(82)} 85 | .lh-83{._lh_(83)} 86 | .lh-84{._lh_(84)} 87 | .lh-85{._lh_(85)} 88 | .lh-86{._lh_(86)} 89 | .lh-87{._lh_(87)} 90 | .lh-88{._lh_(88)} 91 | .lh-89{._lh_(89)} 92 | .lh-90{._lh_(90)} 93 | .lh-91{._lh_(91)} 94 | .lh-92{._lh_(92)} 95 | .lh-93{._lh_(93)} 96 | .lh-94{._lh_(94)} 97 | .lh-95{._lh_(95)} 98 | .lh-96{._lh_(96)} 99 | .lh-97{._lh_(97)} 100 | .lh-98{._lh_(98)} 101 | .lh-99{._lh_(99)} 102 | .lh-100{._lh_(100)} 103 | .lh-150{._lh_(150)} 104 | .lh-200{._lh_(200)} 105 | .lh-250{._lh_(250)} 106 | .lh-300{._lh_(300)} 107 | .lh-350{._lh_(350)} 108 | .lh-400{._lh_(400)} 109 | .lh-500{._lh_(500)} 110 | .lh-600{._lh_(600)} 111 | .lh-700{._lh_(700)} 112 | .lh-800{._lh_(800)} 113 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yuyue", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "node ./webpack/server.js", 8 | "build": "node ./webpack/build.js", 9 | "dll": "webpack --progress --config webpack/webpack.dll.js ---" 10 | }, 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "@babel/core": "^7.6.4", 15 | "@babel/plugin-proposal-class-properties": "^7.5.5", 16 | "@babel/preset-env": "^7.6.3", 17 | "@babel/preset-react": "^7.6.3", 18 | "add-asset-html-webpack-plugin": "^3.1.3", 19 | "amfe-flexible": "^2.2.1", 20 | "assets-webpack-plugin": "^3.9.10", 21 | "autoprefixer": "^9.6.5", 22 | "axios": "^0.19.0", 23 | "babel-loader": "^8.0.6", 24 | "babel-plugin-syntax-dynamic-import": "^6.18.0", 25 | "chalk": "^2.4.2", 26 | "clean-webpack-plugin": "^3.0.0", 27 | "copy-webpack-plugin": "^5.0.4", 28 | "css-hot-loader": "^1.4.4", 29 | "css-loader": "^3.2.0", 30 | "cssnano": "^4.1.10", 31 | "element-ui": "^2.12.0", 32 | "extract-text-webpack-plugin": "^4.0.0-beta.0", 33 | "file-loader": "^4.2.0", 34 | "friendly-errors-webpack-plugin": "^1.7.0", 35 | "fs-extra": "^8.1.0", 36 | "html-loader": "^0.5.5", 37 | "html-webpack-plugin": "^3.2.0", 38 | "inobounce": "^0.2.0", 39 | "inquirer": "^7.0.0", 40 | "less": "^3.10.3", 41 | "less-loader": "^5.0.0", 42 | "lodash": "^4.17.15", 43 | "mini-css-extract-plugin": "^0.8.0", 44 | "mint-ui": "^2.2.13", 45 | "nodemon-webpack-plugin": "^4.1.1", 46 | "number-precision": "^1.3.1", 47 | "optimize-css-assets-webpack-plugin": "^5.0.3", 48 | "ora": "^4.0.2", 49 | "postcss-loader": "^3.0.0", 50 | "progress-bar-webpack-plugin": "^1.12.1", 51 | "qs": "^6.9.0", 52 | "sass-resources-loader": "^2.0.1", 53 | "uglifyjs-webpack-plugin": "^2.2.0", 54 | "url-loader": "^2.2.0", 55 | "vue": "^2.6.10", 56 | "vue-awesome-swiper": "^3.1.3", 57 | "vue-loader": "^15.7.1", 58 | "vue-print-nb": "^1.4.0", 59 | "vue-qriously": "^1.1.1", 60 | "vue-seamless-scroll": "^1.1.17", 61 | "vue-simple-uploader": "^0.7.2", 62 | "vue-template-compiler": "^2.6.10", 63 | "vuebar": "0.0.20", 64 | "vuex": "^3.1.1", 65 | "walk": "^2.3.14", 66 | "wangeditor": "^3.1.1", 67 | "webpack": "^4.41.2", 68 | "webpack-cli": "^3.3.9", 69 | "webpack-dev-server": "^3.8.2", 70 | "webpack-merge": "^4.2.2", 71 | "webpack-parallel-uglify-plugin": "^1.1.2" 72 | }, 73 | "dependencies": { 74 | "core-js": "^3.3.3", 75 | "vue-clipboard2": "^0.3.1", 76 | "vue-router": "^3.0.7" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /webpack/vendor/vue-manifest.json: -------------------------------------------------------------------------------- 1 | {"name":"vue_library","content":{"../node_modules/axios/lib/utils.js":{"id":0,"buildMeta":{"providedExports":true}},"../node_modules/webpack/buildin/global.js":{"id":1,"buildMeta":{"providedExports":true}},"../node_modules/process/browser.js":{"id":2,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/bind.js":{"id":3,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/buildURL.js":{"id":4,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/cancel/isCancel.js":{"id":5,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/defaults.js":{"id":6,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/adapters/xhr.js":{"id":7,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/createError.js":{"id":8,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/mergeConfig.js":{"id":9,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/cancel/Cancel.js":{"id":10,"buildMeta":{"providedExports":true}},"../node_modules/vue/dist/vue.esm.js":{"id":12,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/timers-browserify/main.js":{"id":13,"buildMeta":{"providedExports":true}},"../node_modules/setimmediate/setImmediate.js":{"id":14,"buildMeta":{"providedExports":true}},"../node_modules/vuex/dist/vuex.esm.js":{"id":15,"buildMeta":{"exportsType":"namespace","providedExports":["default","Store","install","mapState","mapMutations","mapGetters","mapActions","createNamespacedHelpers"]}},"../node_modules/axios/index.js":{"id":16,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/axios.js":{"id":17,"buildMeta":{"providedExports":true}},"../node_modules/axios/node_modules/is-buffer/index.js":{"id":18,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/Axios.js":{"id":19,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/InterceptorManager.js":{"id":20,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/dispatchRequest.js":{"id":21,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/transformData.js":{"id":22,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/normalizeHeaderName.js":{"id":23,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/settle.js":{"id":24,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/core/enhanceError.js":{"id":25,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/parseHeaders.js":{"id":26,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/isURLSameOrigin.js":{"id":27,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/cookies.js":{"id":28,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/isAbsoluteURL.js":{"id":29,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/combineURLs.js":{"id":30,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/cancel/CancelToken.js":{"id":31,"buildMeta":{"providedExports":true}},"../node_modules/axios/lib/helpers/spread.js":{"id":32,"buildMeta":{"providedExports":true}},"../node_modules/vue-router/dist/vue-router.esm.js":{"id":33,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}}}} -------------------------------------------------------------------------------- /src/css/public.less: -------------------------------------------------------------------------------- 1 | 2 | /*清除浮动*/ 3 | .clearfix:before, 4 | .clearfix:after{ 5 | content: " "; 6 | display: inline-block; 7 | height: 0; 8 | width: 100%; 9 | clear: both; 10 | visibility: hidden; 11 | } 12 | .clearfix{*zoom: 1;} 13 | .clear{clear:both;height:0;overflow:hidden;} 14 | 15 | *{ box-sizing: border-box;} 16 | .hand{cursor: pointer;} 17 | .inline-block {display: inline-block;} 18 | .show {display: block;} 19 | .hide {display: none;} 20 | .centent,.center{text-align: center} 21 | .right{text-align: right} 22 | .left{text-align: left} 23 | .fl{float: left;} 24 | .fr{float: right} 25 | 26 | .v-t{vertical-align:top;} 27 | .v-b{vertical-align:bottom;} 28 | .v-m{vertical-align:middle;} 29 | 30 | .auto {overflow: auto;} 31 | .autox {overflow-x: auto;overflow-y: hidden;} 32 | .autoy {overflow-y: auto;overflow-x:hidden;} 33 | .hidden {overflow: hidden;} 34 | .scroll {overflow: scroll;} 35 | 36 | /* 清除字体样式 */ 37 | .ff-no{ 38 | font-style:normal; 39 | text-decoration:none 40 | } 41 | 42 | /* 下划线样式 */ 43 | .ff-b{ 44 | text-decoration:underline ; 45 | } 46 | /* 删除线样式 */ 47 | .ff-del{ 48 | text-decoration:line-through 49 | } 50 | /* 上划线样式 */ 51 | .ff-t{ 52 | text-decoration:overline 53 | } 54 | 55 | .autoline(@line){ 56 | display: -webkit-box; 57 | overflow: hidden; 58 | -webkit-line-break: auto; 59 | /*! autoprefixer: ignore next */ 60 | -webkit-box-orient: vertical; 61 | -webkit-line-clamp: @line; 62 | } 63 | 64 | .line-1 { 65 | white-space: nowrap; 66 | overflow: hidden; 67 | text-overflow: ellipsis; 68 | /*! autoprefixer: ignore next */ 69 | -webkit-box-orient: vertical; 70 | } 71 | 72 | .line-2 {.autoline(2);} 73 | .line-3 {.autoline(3);} 74 | .line-4 {.autoline(4);} 75 | .line-5 {.autoline(5);} 76 | .line-6 {.autoline(6);} 77 | 78 | 79 | 80 | .input{ 81 | flex: 1; 82 | border: none; 83 | outline: none; 84 | color: #555; 85 | } 86 | 87 | /* 不换行 */ 88 | .nowrap{ 89 | white-space:nowrap; 90 | } 91 | 92 | /* 强行换行 */ 93 | .wrap{ 94 | word-wrap: break-word; 95 | word-break:break-all; 96 | } 97 | 98 | .outline{outline:none}; 99 | 100 | .op-0 {opacity: 0;} 101 | .op-1 {opacity: 0.1;} 102 | .op-2 {opacity: 0.2;} 103 | .op-3 {opacity: 0.3;} 104 | .op-4 {opacity: 0.4;} 105 | .op-5 {opacity: 0.5;} 106 | .op-6 {opacity: 0.6;} 107 | .op-7 {opacity: 0.7;} 108 | .op-8 {opacity: 0.8;} 109 | .op-9 {opacity: 0.9;} 110 | .op-10 {opacity: 1;} 111 | 112 | .ba-0 {background:rgba(0,0,0,0.1);} 113 | .ba-1 {background:rgba(0,0,0,0.2);} 114 | .ba-2 {background:rgba(0,0,0,0.3);} 115 | .ba-3 {background:rgba(0,0,0,0.4);} 116 | .ba-4 {background:rgba(0,0,0,0.5);} 117 | .ba-5 {background:rgba(0,0,0,0.6);} 118 | .ba-6 {background:rgba(0,0,0,0.7);} 119 | .ba-7 {background:rgba(0,0,0,0.8);} 120 | .ba-8 {background:rgba(0,0,0,0.9);} 121 | .ba-95 {background:rgba(0,0,0,0.95);} 122 | 123 | @keyframes fade-in { 124 | 0% { 125 | opacity: 0.3; 126 | } 127 | 100% { 128 | opacity: 1; 129 | } 130 | } 131 | @-webkit-keyframes fade-in { 132 | 0% { 133 | opacity: 0.3; 134 | } 135 | 100% { 136 | opacity: 1; 137 | } 138 | } 139 | .wrapper { 140 | animation: fade-in; 141 | animation-duration: 1s; 142 | -webkit-animation: fade-in 1s; 143 | } -------------------------------------------------------------------------------- /src/router.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue'; 3 | import Router from 'vue-router'; 4 | 5 | Vue.use(Router) 6 | 7 | /* webpackChunkName: "upload" */ 8 | 9 | const routers = [ 10 | { 11 | path: '/', 12 | name: "login", 13 | component: () => import('./pages/login.vue'), 14 | meta: { 15 | index: 0, 16 | title: "用户登录" 17 | } 18 | }, 19 | { 20 | path: '/info', 21 | name: "info", 22 | component: () => import('./pages/info.vue'), 23 | meta: { 24 | index: 0, 25 | title: "服务器信息查看" 26 | } 27 | }, 28 | { 29 | path: '/user', 30 | name: "user", 31 | component: () => import('./pages/user/index.vue'), 32 | meta: { 33 | index: 0, 34 | title: "用户登录" 35 | }, 36 | children: [ 37 | { 38 | path: '/user/upload', 39 | name: "user-upload", 40 | component: () => import( /* webpackChunkName: "upload" */'./pages/user/uploads.vue'), 41 | meta: { 42 | index: 0, 43 | title: "用户登录" 44 | }, 45 | }, 46 | { 47 | path: '/user/file', 48 | name: "user-file", 49 | component: () => import( /* webpackChunkName: "upload" */'./pages/user/file-new.vue'), 50 | meta: { 51 | index: 0, 52 | title: "用户登录" 53 | }, 54 | }, 55 | ] 56 | }, 57 | { 58 | path: '/manage', 59 | name: "manage", 60 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/index.vue'), 61 | meta: { 62 | index: 0, 63 | title: "用户登录" 64 | }, 65 | children: [ 66 | { 67 | path: '/manage/custom', 68 | name: "manage-custom", 69 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/custom.vue'), 70 | meta: { 71 | index: 0, 72 | title: "用户登录" 73 | }, 74 | }, 75 | { 76 | path: '/manage/net', 77 | name: "manage-net", 78 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/set-net.vue'), 79 | meta: { 80 | index: 0, 81 | title: "用户登录" 82 | }, 83 | }, 84 | { 85 | path: '/manage/site', 86 | name: "manage-site", 87 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/set-site.vue'), 88 | meta: { 89 | index: 0, 90 | title: "用户登录" 91 | }, 92 | }, 93 | { 94 | path: '/manage/admin', 95 | name: "manage-admin", 96 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/admin.vue'), 97 | meta: { 98 | index: 0, 99 | title: "用户登录" 100 | }, 101 | }, 102 | { 103 | path: '/manage/diction', 104 | name: "manage-diction", 105 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/diction.vue'), 106 | meta: { 107 | index: 0, 108 | title: "用户登录" 109 | }, 110 | }, 111 | { 112 | path: '/manage/download', 113 | name: "manage-download", 114 | component: () => import( /* webpackChunkName: "upload" */'./pages/manage/download.vue'), 115 | meta: { 116 | index: 0, 117 | title: "用户登录" 118 | }, 119 | } 120 | ] 121 | } 122 | ] 123 | 124 | export default new Router({ 125 | routes: routers 126 | }) 127 | 128 | export const menus = routers; 129 | -------------------------------------------------------------------------------- /src/css/font.less: -------------------------------------------------------------------------------- 1 | ._fs_(@c){ 2 | font-size: @c/@bs; 3 | } 4 | 5 | .fw-1{font-weight: 100} 6 | .fw-2{font-weight: 200} 7 | .fw-3{font-weight: 300} 8 | .fw-4{font-weight: 400} 9 | .fw-5{font-weight: 500} 10 | .fw-6{font-weight: 600} 11 | .fw-7{font-weight: 700} 12 | .fb{font-weight: bold} 13 | 14 | .fs-0{._fs_(0)} 15 | .fs-1{._fs_(1)} 16 | .fs-2{._fs_(2)} 17 | .fs-3{._fs_(3)} 18 | .fs-4{._fs_(4)} 19 | .fs-5{._fs_(5)} 20 | .fs-6{._fs_(6)} 21 | .fs-7{._fs_(7)} 22 | .fs-8{._fs_(8)} 23 | .fs-9{._fs_(9)} 24 | .fs-10{._fs_(10)} 25 | .fs-11{._fs_(11)} 26 | .fs-12{._fs_(12)} 27 | .fs-13{._fs_(13)} 28 | .fs-14{._fs_(14)} 29 | .fs-15{._fs_(15)} 30 | .fs-16{._fs_(16)} 31 | .fs-17{._fs_(17)} 32 | .fs-18{._fs_(18)} 33 | .fs-19{._fs_(19)} 34 | .fs-20{._fs_(20)} 35 | .fs-21{._fs_(21)} 36 | .fs-22{._fs_(22)} 37 | .fs-23{._fs_(23)} 38 | .fs-24{._fs_(24)} 39 | .fs-25{._fs_(25)} 40 | .fs-26{._fs_(26)} 41 | .fs-27{._fs_(27)} 42 | .fs-28{._fs_(28)} 43 | .fs-29{._fs_(29)} 44 | .fs-30{._fs_(30)} 45 | .fs-31{._fs_(31)} 46 | .fs-32{._fs_(32)} 47 | .fs-33{._fs_(33)} 48 | .fs-34{._fs_(34)} 49 | .fs-35{._fs_(35)} 50 | .fs-36{._fs_(36)} 51 | .fs-37{._fs_(37)} 52 | .fs-38{._fs_(38)} 53 | .fs-39{._fs_(39)} 54 | .fs-40{._fs_(40)} 55 | .fs-41{._fs_(41)} 56 | .fs-42{._fs_(42)} 57 | .fs-43{._fs_(43)} 58 | .fs-44{._fs_(44)} 59 | .fs-45{._fs_(45)} 60 | .fs-46{._fs_(46)} 61 | .fs-47{._fs_(47)} 62 | .fs-48{._fs_(48)} 63 | .fs-49{._fs_(49)} 64 | .fs-50{._fs_(50)} 65 | .fs-51{._fs_(51)} 66 | .fs-52{._fs_(52)} 67 | .fs-53{._fs_(53)} 68 | .fs-54{._fs_(54)} 69 | .fs-55{._fs_(55)} 70 | .fs-56{._fs_(56)} 71 | .fs-57{._fs_(57)} 72 | .fs-58{._fs_(58)} 73 | .fs-59{._fs_(59)} 74 | .fs-60{._fs_(60)} 75 | .fs-61{._fs_(61)} 76 | .fs-62{._fs_(62)} 77 | .fs-63{._fs_(63)} 78 | .fs-64{._fs_(64)} 79 | .fs-65{._fs_(65)} 80 | .fs-66{._fs_(66)} 81 | .fs-67{._fs_(67)} 82 | .fs-68{._fs_(68)} 83 | .fs-69{._fs_(69)} 84 | .fs-70{._fs_(70)} 85 | .fs-71{._fs_(71)} 86 | .fs-72{._fs_(72)} 87 | .fs-73{._fs_(73)} 88 | .fs-74{._fs_(74)} 89 | .fs-75{._fs_(75)} 90 | .fs-76{._fs_(76)} 91 | .fs-77{._fs_(77)} 92 | .fs-78{._fs_(78)} 93 | .fs-79{._fs_(79)} 94 | .fs-80{._fs_(80)} 95 | .fs-81{._fs_(81)} 96 | .fs-82{._fs_(82)} 97 | .fs-83{._fs_(83)} 98 | .fs-84{._fs_(84)} 99 | .fs-85{._fs_(85)} 100 | .fs-86{._fs_(86)} 101 | .fs-87{._fs_(87)} 102 | .fs-88{._fs_(88)} 103 | .fs-89{._fs_(89)} 104 | .fs-90{._fs_(90)} 105 | .fs-91{._fs_(91)} 106 | .fs-92{._fs_(92)} 107 | .fs-93{._fs_(93)} 108 | .fs-94{._fs_(94)} 109 | .fs-95{._fs_(95)} 110 | .fs-96{._fs_(96)} 111 | .fs-97{._fs_(97)} 112 | .fs-98{._fs_(98)} 113 | .fs-99{._fs_(99)} 114 | .fs-100{._fs_(100)} 115 | 116 | ._fc_(@c){ 117 | color: @c 118 | } 119 | 120 | .fc-000{._fc_(#000)} 121 | .fc-111{._fc_(#111)} 122 | .fc-222{._fc_(#222)} 123 | .fc-333{._fc_(#333)} 124 | .fc-444{._fc_(#444)} 125 | .fc-555{._fc_(#555)} 126 | .fc-666{._fc_(#666)} 127 | .fc-777{._fc_(#777)} 128 | .fc-888{._fc_(#888)} 129 | .fc-999{._fc_(#999)} 130 | .fc-aaa{._fc_(#aaa)} 131 | .fc-bbb{._fc_(#bbb)} 132 | .fc-ccc{._fc_(#ccc)} 133 | .fc-ddd{._fc_(#ddd)} 134 | .fc-eee{._fc_(#eee)} 135 | .fc-fff{._fc_(#fff)} 136 | 137 | .fc-btn{._fc_(#409eff)} 138 | .fc-succ{._fc_(#67c23a)} 139 | .red{._fc_(rgb(255, 0, 0))} 140 | .fc-a{._fc_(rgb(0, 0, 204))} 141 | 142 | .fc-success {._fc_( #67c23a)} 143 | .fc-warning {._fc_( #eb9e05)} 144 | .fc-danger {._fc_( #FB5757)} 145 | .fc-info {._fc_( #878d99)} 146 | 147 | -------------------------------------------------------------------------------- /src/pages/login.vue: -------------------------------------------------------------------------------- 1 | 16 | 78 | 128 | -------------------------------------------------------------------------------- /src/pages/manage/diction.vue: -------------------------------------------------------------------------------- 1 | 54 | 86 | 87 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /webpack/webpack.base.js: -------------------------------------------------------------------------------- 1 | let HtmlWebpackPlugin = require('html-webpack-plugin'); 2 | let config = require('./webpack.config.js'); 3 | const path = require('path'); 4 | const VueLoaderPlugin = require('vue-loader/lib/plugin'); 5 | const webpack = require('webpack'); 6 | const AddAssetHtmlPlugin = require('add-asset-html-webpack-plugin'); 7 | const _version = new Date().getTime(); 8 | 9 | // happypack 10 | 11 | module.exports = { 12 | entry: config.entry, 13 | output: { 14 | filename: 'js/bundle.js', 15 | path: config.outPath, 16 | publicPath: './', 17 | chunkFilename: 'js/[name].'+_version+'.js', 18 | library: '[name]_library' 19 | }, 20 | resolve: { 21 | alias: { 22 | 'lib': path.join(config.root, 'lib/'), 23 | '@css': path.join(config.root, 'src/css'), 24 | 'vue$': 'vue/dist/vue.esm.js', 25 | }, 26 | modules: ['node_modules', '*'], 27 | extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.vue'] 28 | }, 29 | module: { 30 | rules: [{ 31 | test: /\.css$/, 32 | use: [ 33 | config.vueLoader, { 34 | loader: "css-loader" 35 | }, { 36 | loader: "postcss-loader", 37 | options: { plugins: [require("autoprefixer")] } 38 | } 39 | ] 40 | }, 41 | { 42 | test: /\.less$/, 43 | use: [ 44 | config.vueLoader, { 45 | loader: "css-loader" 46 | }, { 47 | loader: "postcss-loader", 48 | options: { plugins: [require("autoprefixer")] } 49 | }, { 50 | loader: "less-loader" 51 | }, { 52 | loader: 'sass-resources-loader', 53 | options: { 54 | resources: path.join(config.root, 'src/css/base.less'), 55 | } 56 | } 57 | ] 58 | }, 59 | { 60 | test: /\.vue$/, 61 | loader: 'vue-loader', 62 | options: { 63 | transformAssetUrls: { 64 | video: ['src', 'poster'], 65 | source: 'src', 66 | img: 'src', 67 | image: 'xlink:href' 68 | }, 69 | compilerOptions: { 70 | preserveWhitespace: false 71 | } 72 | } 73 | }, 74 | { 75 | test: /\.js$/, 76 | use: { 77 | loader: 'babel-loader', 78 | options: { 79 | plugins: ['@babel/plugin-proposal-class-properties', 'syntax-dynamic-import'] 80 | } 81 | }, 82 | exclude: /node_modules/, 83 | // include: [process.cwd(), './src'] 84 | }, 85 | { 86 | test: /\.(gif|png|jpe?g|svg|ico)$/i, 87 | use: [{ 88 | loader: 'url-loader', 89 | options:{ 90 | name:'assets/[name].'+_version+'.[ext]', 91 | limit:5000 92 | } 93 | }, 94 | ] 95 | }, 96 | { 97 | test: /\.(woff|woff2|eot|ttf|otf)$/, // 处理字体 98 | use: { 99 | loader: 'file-loader', 100 | options:{ 101 | name:'./assets/[name].'+_version+'.[ext]', 102 | publicPath:'../' 103 | } 104 | } 105 | } 106 | ] 107 | }, 108 | plugins: [ 109 | new VueLoaderPlugin(), 110 | new webpack.DllReferencePlugin({ 111 | context: __dirname, 112 | manifest: require('./vendor/vue-manifest.json') 113 | }), 114 | new HtmlWebpackPlugin({ 115 | filename: `index.html`, 116 | template: config.root + '/src/index.html', 117 | title: 'wyulang', 118 | favicon:path.resolve('favicon.ico'), 119 | prod: true, 120 | hash: true, 121 | minify: { 122 | removeAttributeQuotes: true, 123 | collapseWhitespace: true, 124 | html5: true, 125 | minifyCSS: true, 126 | removeComments: true, 127 | removeEmptyAttributes: true 128 | } 129 | }), 130 | new AddAssetHtmlPlugin({ 131 | filepath: path.resolve(__dirname, './vendor/vue.library.js'), 132 | outputPath:'js', 133 | publicPath:'./js' 134 | }) 135 | ] 136 | } -------------------------------------------------------------------------------- /src/pages/manage/set-site.vue: -------------------------------------------------------------------------------- 1 | 68 | 111 | 112 | 160 | 161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /lib/date.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 时间对象 3 | * @type {{getCurrentUnix: Time.getCurrentUnix, getTodayUnix: Time.getTodayUnix, getThisYearUnix: Time.getThisYearUnix, format: Time.format, compensateZero: Time.compensateZero, transform: Time.transform}} 4 | */ 5 | class DateFat { 6 | //获取当前 Unix 时间戳 7 | getCurrentUnix() { 8 | return new Date().getTime(); 9 | } 10 | //获取今日 0 点 0 分 0 秒的 Unix 时间戳 11 | getTodayUnix() { 12 | var date = new Date(); 13 | date.setHours(0); 14 | date.setMinutes(0); 15 | date.setSeconds(0); 16 | date.setMilliseconds(0); 17 | return date.getTime(); 18 | } 19 | //获取今年 1 月 1 日 0 点 0 分 0 秒的 Unix 时间戳 20 | getThisYearUnix() { 21 | var date = new Date(); 22 | date.setMonth(0); 23 | date.setDate(1); 24 | date.setHours(0); 25 | date.setMinutes(0); 26 | date.setSeconds(0); 27 | date.setMilliseconds(0); 28 | return date.getTime(); 29 | } 30 | //格式化日期;输出格式为 xxxx-xx-xx 31 | format(val) { 32 | var dateObj = new Date(val); 33 | //month 代表月份的整数值从0(1月)到11(12月),所以需要转换 34 | var month = this.compensateZero(dateObj.getMonth() + 1); 35 | var day = this.compensateZero(dateObj.getDate()); 36 | return dateObj.getFullYear() + '-' + month + '-' + day; 37 | } 38 | dateNormalize(date) { 39 | if (!date) { 40 | date = new Date(); 41 | } 42 | let final; 43 | const dateType = Object.prototype.toString.call(date); 44 | switch (dateType) { 45 | case '[object Date]': 46 | final = date; 47 | break; 48 | case '[object String]': 49 | // IOS format fix. '2016-11-11' 需要转换成2016/11/11 50 | final = new Date(date.replace(/-/ig, '/')); 51 | break; 52 | default: 53 | final = new Date(date); 54 | } 55 | return final; 56 | } 57 | /** 58 | * 如果值小于 10,那么在前面补一个零 59 | * @param val 60 | * @returns {*} 61 | */ 62 | compensateZero(val) { 63 | if (typeof val == 'number') { 64 | return val < 10 ? '0' + val : val; 65 | } else { 66 | return val; 67 | } 68 | } 69 | /** 70 | * 转换为相对时间 71 | * 72 | * 1 分钟之前,返回“刚刚” 73 | * 1 分钟到 1 小时之间,返回“xx 分钟前” 74 | * 1 小时到 1 天之间,返回“xx 小时前” 75 | * 1 天到 1 个月(假设固定为 31 天)之间,返回“xx 天前” 76 | * 大于 1 个月,返回“xx 年 xx 月 xx 日” 77 | * @param val unix 时间戳 78 | */ 79 | transform(val) { 80 | //计算时间间隔(单位:s) 81 | const week = ['日', '一', '二', '三', '四', '五', '六']; 82 | var interval = (this.getCurrentUnix() - val) / 1000; 83 | let date = this.dateNormalize(val); 84 | if (Math.floor(interval / 60) <= 0) {//1 分钟之前 85 | return '刚刚'; 86 | } else if (interval < 3600) {//1 分钟到 1 小时之间 87 | return Math.floor(interval / 60) + '分钟前'; 88 | } else if (interval >= 3600 && (val - this.getTodayUnix() >= 0)) {//1 小时到 1 天之间 89 | return Math.floor(interval / 3600) + '小时前'; 90 | } 91 | else if (interval / (3600 * 24) <= 7) {//1 天到 1 个月(假设固定为 31 天)之间 92 | return '周'.concat(week[date.getDay()]); 93 | } 94 | else if (interval / (3600 * 24) <= 31) {//1 天到 1 个月(假设固定为 31 天)之间 95 | return Math.ceil(interval / (3600 * 24)) + '天前'; 96 | } 97 | else { 98 | return this.format(val); 99 | } 100 | } 101 | 102 | conver(limit) { 103 | limit = isNaN(limit) ? 0 : parseInt(limit) 104 | let size = ""; 105 | if (limit < 0.1 * 1024) { 106 | //如果小于0.1KB转化成B 107 | size = limit.toFixed(2) + "B"; 108 | } else if (limit < 0.1 * 1024 * 1024) { 109 | //如果小于0.1MB转化成KB 110 | size = (limit / 1024).toFixed(2) + "KB"; 111 | } else if (limit < 0.1 * 1024 * 1024 * 1024) { 112 | //如果小于0.1GB转化成MB 113 | size = (limit / (1024 * 1024)).toFixed(2) + "MB"; 114 | } else { 115 | //其他转化成GB 116 | size = (limit / (1024 * 1024 * 1024)).toFixed(2) + "GB"; 117 | } 118 | let sizestr = size + ""; 119 | let len = sizestr.indexOf("\."); 120 | let dec = sizestr.substr(len + 1, 2); 121 | if (dec == "00") { 122 | //当小数点后为00时 去掉小数部分 123 | return sizestr.substring(0, len) + sizestr.substr(len + 3, 2); 124 | } 125 | return sizestr; 126 | } 127 | 128 | }; 129 | 130 | export default new DateFat(); -------------------------------------------------------------------------------- /lib/webapi.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import envBase from './env-base.js'; 3 | import qs from 'qs'; 4 | 5 | export default class baseApi extends envBase { 6 | constructor() { 7 | axios.interceptors.response.use(response => { 8 | return response.data; 9 | }, error => { 10 | return Promise.reject(error); 11 | }); 12 | super(); 13 | } 14 | 15 | errorMess = "网络异常!请稍后重试"; 16 | 17 | //请求主体 18 | request(url, data, method, header, responses = "json", withCredentials,onDownloadProgress) { 19 | if (withCredentials != '') { 20 | if (withCredentials == 'true') { 21 | withCredentials = true; 22 | } 23 | if (withCredentials == 'false') { 24 | withCredentials = false; 25 | } 26 | } else { 27 | withCredentials = this.setWithCredentials(); 28 | } 29 | let headers = this.getHeader(header); 30 | let dataType = ['get'].includes(method) ? "params" : "data"; 31 | if (headers["Content-Type"].includes('urlencoded') && !['get'].includes(method)) { 32 | data = qs.stringify(data); 33 | } 34 | let configs = { 35 | url: url, 36 | method: method, 37 | headers: headers, 38 | [dataType]: data, 39 | responseType: responses, 40 | withCredentials: withCredentials, 41 | } 42 | if (onDownloadProgress) { 43 | configs['onDownloadProgress'] = onDownloadProgress 44 | } 45 | return axios.request(configs).catch(res => { 46 | this.getMessage(res, 'catch'); 47 | }).then(res => { 48 | this.getMessage(res, 'then'); 49 | return res; 50 | }) 51 | } 52 | 53 | 54 | 55 | //请求头部 56 | getHeader(header = {}) { 57 | let ctype = this.contentType(header); 58 | let headerObj = { 59 | 'Content-Type': ctype 60 | } 61 | if (header.type) { 62 | delete header.type; 63 | } 64 | if (typeof header === 'object') { 65 | Object.assign(headerObj, header); 66 | } 67 | let token = this.setToken(); 68 | Object.assign(headerObj, token); 69 | return headerObj; 70 | } 71 | 72 | get(url, data, config = {}) { 73 | return this.requestConfig(url, data, 'get', config) 74 | } 75 | post(url, data, config = {}) { 76 | return this.requestConfig(url, data, 'post', config); 77 | } 78 | put(url, data, config = {}) { 79 | return this.requestConfig(url, data, 'PUT', config); 80 | } 81 | delete(url, data, config = {}) { 82 | return this.requestConfig(url, data, 'delete', config) 83 | } 84 | all(array) { 85 | return axios.all(array); 86 | } 87 | 88 | requestConfig(url, data, method, config = {}) { 89 | let [getUrl, header, responseType, withCredentials, onDownloadProgress] = [this.getDomainApi().concat(url), "", "", '', false] 90 | Object.keys(config).forEach(v => { 91 | if (v == "isUrl") { 92 | //第三方网址,全址,不带前缀 93 | getUrl = url; 94 | } else if (v == "header") { 95 | //自定义头部 96 | header = config[v]; 97 | } else if (v == "responseType") { 98 | //设置responseType 类别 如 json 99 | responseType = config[v]; 100 | } else if (v == "env") { 101 | getUrl = this.getDomainApi(config[v]).concat(url) 102 | } else if (v == "withCredentials") { 103 | withCredentials = config[v] 104 | } else if (v == 'Url') { 105 | getUrl = config[v].concat(url); 106 | } else if (v == 'download') { 107 | onDownloadProgress = config[v]; 108 | } 109 | }) 110 | return this.request(getUrl, data, method, header, responseType, withCredentials, onDownloadProgress) 111 | } 112 | 113 | getDomainApi() { 114 | return ""; 115 | } 116 | 117 | contentType(type = '') { 118 | // header.type ? "application/x-www-form-urlencoded; charset=UTF-8" : "application/json" 119 | return "application/json"; 120 | } 121 | 122 | getMessage(res) { 123 | //show message error 124 | } 125 | 126 | setWithCredentials() { 127 | return false 128 | } 129 | 130 | storage(key, value, type) { 131 | if (type) { 132 | localStorage.removeItem(key); 133 | } else { 134 | if (!!value) { 135 | return localStorage.setItem(key, JSON.stringify(value)); 136 | } else { 137 | let val = localStorage.getItem(key) || ""; 138 | return (val && JSON.parse(val)) || ""; 139 | } 140 | } 141 | } 142 | 143 | session(key, value, type) { 144 | if (type) { 145 | sessionStorage.removeItem(key); 146 | } else { 147 | if (!!value) { 148 | return sessionStorage.setItem(key, JSON.stringify(value)); 149 | } else { 150 | let val = sessionStorage.getItem(key) || ""; 151 | return (val && JSON.parse(val)) || ""; 152 | } 153 | } 154 | } 155 | 156 | setToken() { 157 | return {} 158 | } 159 | } -------------------------------------------------------------------------------- /src/css/border.less: -------------------------------------------------------------------------------- 1 | ._b_(@c,@t) when(@t=all){ 2 | border: 1px solid @c; 3 | } 4 | ._b_(@c,@t) when(@t=top){ 5 | border-top: 1px solid @c; 6 | } 7 | ._b_(@c,@t) when(@t=bottom){ 8 | border-bottom: 1px solid @c; 9 | } 10 | ._b_(@c,@t) when(@t=left){ 11 | border-left: 1px solid @c; 12 | } 13 | ._b_(@c,@t) when(@t=right){ 14 | border-right: 1px solid @c; 15 | } 16 | 17 | .bl-0{border: 0;} 18 | 19 | ._bra_(@s){ 20 | border-radius: @s/@bs; 21 | } 22 | 23 | .b-1{._b_(#111,all)} 24 | .b-2{._b_(#222,all)} 25 | .b-3{._b_(#333,all)} 26 | .b-4{._b_(#444,all)} 27 | .b-5{._b_(#555,all)} 28 | .b-6{._b_(#666,all)} 29 | .b-7{._b_(#777,all)} 30 | .b-8{._b_(#888,all)} 31 | .b-9{._b_(#999,all)} 32 | .b-a{._b_(#aaa,all)} 33 | .b-b{._b_(#bbb,all)} 34 | .b-c{._b_(#ccc,all)} 35 | .b-d{._b_(#ddd,all)} 36 | .b-e{._b_(#eee,all)} 37 | .b-f{._b_(#fff,all)} 38 | .b-f2{._b_(#f2f2f2,all)} 39 | .b-f3{._b_(#f3f3f3,all)} 40 | 41 | .bt-1{._b_(#111,top)} 42 | .bt-2{._b_(#222,top)} 43 | .bt-3{._b_(#333,top)} 44 | .bt-4{._b_(#444,top)} 45 | .bt-5{._b_(#555,top)} 46 | .bt-6{._b_(#666,top)} 47 | .bt-7{._b_(#777,top)} 48 | .bt-8{._b_(#888,top)} 49 | .bt-9{._b_(#999,top)} 50 | .bt-a{._b_(#aaa,top)} 51 | .bt-b{._b_(#bbb,top)} 52 | .bt-c{._b_(#ccc,top)} 53 | .bt-d{._b_(#ddd,top)} 54 | .bt-e{._b_(#eee,top)} 55 | .bt-f{._b_(#fff,top)} 56 | .bt-f2{._b_(#f2f2f2,top)} 57 | .bt-f3{._b_(#f3f3f3,top)} 58 | 59 | 60 | .bb-1{._b_(#111,bottom)} 61 | .bb-2{._b_(#222,bottom)} 62 | .bb-3{._b_(#333,bottom)} 63 | .bb-4{._b_(#444,bottom)} 64 | .bb-5{._b_(#555,bottom)} 65 | .bb-6{._b_(#666,bottom)} 66 | .bb-7{._b_(#777,bottom)} 67 | .bb-8{._b_(#888,bottom)} 68 | .bb-9{._b_(#999,bottom)} 69 | .bb-a{._b_(#aaa,bottom)} 70 | .bb-b{._b_(#bbb,bottom)} 71 | .bb-c{._b_(#ccc,bottom)} 72 | .bb-d{._b_(#ddd,bottom)} 73 | .bb-e{._b_(#eee,bottom)} 74 | .bb-f{._b_(#fff,bottom)} 75 | .bb-f2{._b_(#f2f2f2,bottom)} 76 | .bb-f3{._b_(#f3f3f3,bottom)} 77 | 78 | .bl-1{._b_(#111,left)} 79 | .bl-2{._b_(#222,left)} 80 | .bl-3{._b_(#333,left)} 81 | .bl-4{._b_(#444,left)} 82 | .bl-5{._b_(#555,left)} 83 | .bl-6{._b_(#666,left)} 84 | .bl-7{._b_(#777,left)} 85 | .bl-8{._b_(#888,left)} 86 | .bl-9{._b_(#999,left)} 87 | .bl-a{._b_(#aaa,left)} 88 | .bl-b{._b_(#bbb,left)} 89 | .bl-c{._b_(#ccc,left)} 90 | .bl-d{._b_(#ddd,left)} 91 | .bl-e{._b_(#eee,left)} 92 | .bl-f{._b_(#fff,left)} 93 | .bl-f2{._b_(#f2f2f2,left)} 94 | .bl-f3{._b_(#f3f3f3,left)} 95 | 96 | .br-1{._b_(#111,right)} 97 | .br-2{._b_(#222,right)} 98 | .br-3{._b_(#333,right)} 99 | .br-4{._b_(#444,right)} 100 | .br-5{._b_(#555,right)} 101 | .br-6{._b_(#666,right)} 102 | .br-7{._b_(#777,right)} 103 | .br-8{._b_(#888,right)} 104 | .br-9{._b_(#999,right)} 105 | .br-a{._b_(#aaa,right)} 106 | .br-b{._b_(#bbb,right)} 107 | .br-c{._b_(#ccc,right)} 108 | .br-d{._b_(#ddd,right)} 109 | .br-e{._b_(#eee,right)} 110 | .br-f{._b_(#fff,right)} 111 | .br-f2{._b_(#f2f2f2,right)} 112 | .br-f3{._b_(#f3f3f3,right)} 113 | 114 | .ra-all{border-radius: 100%;} 115 | .ra-0{._bra_(0)} 116 | .ra-1{._bra_(1)} 117 | .ra-2{._bra_(2)} 118 | .ra-3{._bra_(3)} 119 | .ra-4{._bra_(4)} 120 | .ra-5{._bra_(5)} 121 | .ra-6{._bra_(6)} 122 | .ra-7{._bra_(7)} 123 | .ra-8{._bra_(8)} 124 | .ra-9{._bra_(9)} 125 | .ra-10{._bra_(10)} 126 | .ra-11{._bra_(11)} 127 | .ra-12{._bra_(12)} 128 | .ra-13{._bra_(13)} 129 | .ra-14{._bra_(14)} 130 | .ra-15{._bra_(15)} 131 | .ra-16{._bra_(16)} 132 | .ra-17{._bra_(17)} 133 | .ra-18{._bra_(18)} 134 | .ra-19{._bra_(19)} 135 | .ra-20{._bra_(20)} 136 | .ra-21{._bra_(21)} 137 | .ra-22{._bra_(22)} 138 | .ra-23{._bra_(23)} 139 | .ra-24{._bra_(24)} 140 | .ra-25{._bra_(25)} 141 | .ra-26{._bra_(26)} 142 | .ra-27{._bra_(27)} 143 | .ra-28{._bra_(28)} 144 | .ra-29{._bra_(29)} 145 | .ra-30{._bra_(30)} 146 | .ra-31{._bra_(31)} 147 | .ra-32{._bra_(32)} 148 | .ra-33{._bra_(33)} 149 | .ra-34{._bra_(34)} 150 | .ra-35{._bra_(35)} 151 | .ra-36{._bra_(36)} 152 | .ra-37{._bra_(37)} 153 | .ra-38{._bra_(38)} 154 | .ra-39{._bra_(39)} 155 | .ra-40{._bra_(40)} 156 | .ra-41{._bra_(41)} 157 | .ra-42{._bra_(42)} 158 | .ra-43{._bra_(43)} 159 | .ra-44{._bra_(44)} 160 | .ra-45{._bra_(45)} 161 | .ra-46{._bra_(46)} 162 | .ra-47{._bra_(47)} 163 | .ra-48{._bra_(48)} 164 | .ra-49{._bra_(49)} 165 | .ra-50{._bra_(50)} 166 | .ra-51{._bra_(51)} 167 | .ra-52{._bra_(52)} 168 | .ra-53{._bra_(53)} 169 | .ra-54{._bra_(54)} 170 | .ra-55{._bra_(55)} 171 | .ra-56{._bra_(56)} 172 | .ra-57{._bra_(57)} 173 | .ra-58{._bra_(58)} 174 | .ra-59{._bra_(59)} 175 | .ra-60{._bra_(60)} 176 | .ra-61{._bra_(61)} 177 | .ra-62{._bra_(62)} 178 | .ra-63{._bra_(63)} 179 | .ra-64{._bra_(64)} 180 | .ra-65{._bra_(65)} 181 | .ra-66{._bra_(66)} 182 | .ra-67{._bra_(67)} 183 | .ra-68{._bra_(68)} 184 | .ra-69{._bra_(69)} 185 | .ra-70{._bra_(70)} 186 | .ra-71{._bra_(71)} 187 | .ra-72{._bra_(72)} 188 | .ra-73{._bra_(73)} 189 | .ra-74{._bra_(74)} 190 | .ra-75{._bra_(75)} 191 | .ra-76{._bra_(76)} 192 | .ra-77{._bra_(77)} 193 | .ra-78{._bra_(78)} 194 | .ra-79{._bra_(79)} 195 | .ra-80{._bra_(80)} 196 | .ra-81{._bra_(81)} 197 | .ra-82{._bra_(82)} 198 | .ra-83{._bra_(83)} 199 | .ra-84{._bra_(84)} 200 | .ra-85{._bra_(85)} 201 | .ra-86{._bra_(86)} 202 | .ra-87{._bra_(87)} 203 | .ra-88{._bra_(88)} 204 | .ra-89{._bra_(89)} 205 | .ra-90{._bra_(90)} 206 | .ra-91{._bra_(91)} 207 | .ra-92{._bra_(92)} 208 | .ra-93{._bra_(93)} 209 | .ra-94{._bra_(94)} 210 | .ra-95{._bra_(95)} 211 | .ra-96{._bra_(96)} 212 | .ra-97{._bra_(97)} 213 | .ra-98{._bra_(98)} 214 | .ra-99{._bra_(99)} 215 | .ra-100{._bra_(100)} 216 | 217 | -------------------------------------------------------------------------------- /src/pages/manage/set-net.vue: -------------------------------------------------------------------------------- 1 | 80 | 139 | 140 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /dist/css/upload.1573214881950.css: -------------------------------------------------------------------------------- 1 | .menu-bg{background-color:#4dcaad}.menu-line{border-top:1px solid #369780}.uploads .uploader-btn:hover{background-color:transparent!important}.el-tree-node__content{line-height:30px;height:30px!important}.file-active{color:#2398f2}.bb-fe{border-bottom:1px solid #f2f2f2}.fc-fc6{color:#fc6}.manages .login-body{position:absolute;top:0;left:0;height:100%;width:100%;z-index:22}.manages .login-body .contents{width:100%;height:100%;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;padding:0}.manages .login-body .contents .content-body{width:100%;min-width:950px;background-color:#fff;opacity:.95;display:-webkit-box;display:flex}.manages .login-body .contents .content-body .navs{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center}.manages .login-body .contents .content-body .navs .navs-item{display:-webkit-box;display:flex;background-color:#62676c;color:#fff;cursor:pointer;width:100%;padding:15px 0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;border-bottom:1px solid #6d6d6d}.manages .login-body .contents .content-body .navs .navs-item.active{color:#fff;background-color:#67c23a}.manages .login-body .contents .content-body .navs .navs-item:hover{background-color:#3a8ee6;border-bottom:1px solid #3a8ee6}.manages .login-body .contents .content-body .lefts{background-color:#909399;width:170px}.manages .login-body .contents .content-body .rights{-webkit-box-flex:1;flex:1}.manages .login-body .contents .content-body .rights .btn-upload .btn-item{margin-left:10px;padding:2px 10px;cursor:pointer}.manages .login-body .contents .content-body .rights .btn-upload .btn-item i{font-weight:700;font-size:15px}.manages .login-body .contents .content-body .rights .btn-upload .btn-item.active{color:#67c23a}.manages .login-body .contents .content-body .rights .btn-change div{padding:3px 5px}.manages .login-body .contents .content-body .titles{background-color:#3e3f43;color:#fff;line-height:45px;padding-left:20px;font-size:16px}.manages .login-body .contents .content-body .inpust{background-color:transparent}.manages .login-body .contents .content-body .inpust input{background-color:transparent;color:#fff;width:100%;border:1px solid #3872f6;border-radius:3px;line-height:40px;padding:2px 5px 2px 30px;background:none}.bc .uploads{padding:10px;box-sizing:border-box;height:100%;position:relative}.bc .uploads .body-flies{position:absolute;top:0;left:0;width:100%;bottom:0}.bc .uploads .flexupload:hover{background-color:transparent}.bc .uploads .filebox{position:absolute;top:0;left:0;width:100%;bottom:0}.bc .uploads .filelist{padding:10px;box-sizing:border-box;display:-webkit-box;display:flex;flex-wrap:wrap}.bc .uploads .filelist .item-list{border:1px solid #f1f1f1;padding:10px;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-flex:1;flex:1;width:15%;max-width:15%;min-width:15%;margin-right:16px;margin-bottom:10px}.bc .uploads .filelist .item-list:last-child{margin-right:0}.modules-dig textarea{height:200px}.uploads{padding:10px;box-sizing:border-box;height:100%;position:relative}.uploads .body-flies{position:absolute;top:0;left:0;width:100%;bottom:0}.uploads .flexupload:hover{background-color:transparent}.uploads .filebox{position:absolute;top:0;left:0;width:100%;bottom:0}.uploads .filelist{padding:10px;box-sizing:border-box;display:-webkit-box;display:flex;flex-wrap:wrap}.uploads .filelist .item-list{border:1px solid #f1f1f1;padding:10px;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-flex:1;flex:1;width:15%;max-width:15%;min-width:15%;margin-right:16px;margin-bottom:10px}.uploads .filelist .item-list:last-child{margin-right:0}.videoDig{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999;background:rgba(2,2,2,.55)}.videoDig .dig-close{width:64px;height:64px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAfCAYAAACGVs+MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgRmlyZXdvcmtzIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBNkY5NUY4RDM3RDgxMUU3QjQyMUZENTIwNDY5OTFDNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBNkY5NUY4RTM3RDgxMUU3QjQyMUZENTIwNDY5OTFDNCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE2Rjk1RjhCMzdEODExRTdCNDIxRkQ1MjA0Njk5MUM0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE2Rjk1RjhDMzdEODExRTdCNDIxRkQ1MjA0Njk5MUM0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Aaf3PgAAANpJREFUeNrMl0EOgyAQRaEbexQP5Cl6Ck/RK8ztWLcrlEQSQ0WYYT70J8YEdN6TqIAxR7z3tB/OgBMYgZU2BniMA8NjKDbO/jcODI+ZY+eClMjAl/QiiEQVHCXBgmtLiOBaEk3wVgkVuFRCFV6QoIvrSB1+Kv6+k4DCCxDqAi9IpFnRs9mdBHHrWaHEZz9NSfPXWvvk1npIRuACHjJJRgDxDlBPeO4roC7w2n4oHCrBLaoqIS2Wue/Fha8tT9L0e66d/SASQ9eEQ1fFQ/cF/7IzGrc3HL073gQYAL2Iz1119SZEAAAAAElFTkSuQmCC") no-repeat 50%;position:absolute;top:66px;right:30px;z-index:100002;cursor:pointer}.videoDig .dig-body{height:100%;width:100%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.videoDig .dig-body video{width:60%;outline:none} -------------------------------------------------------------------------------- /src/pages/manage/admin.vue: -------------------------------------------------------------------------------- 1 | 75 | 145 | 146 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /src/pages/manage/download.vue: -------------------------------------------------------------------------------- 1 | 56 | 110 | 143 | -------------------------------------------------------------------------------- /src/pages/manage/index.vue: -------------------------------------------------------------------------------- 1 | 33 | 93 | 191 | -------------------------------------------------------------------------------- /src/pages/manage/user.vue: -------------------------------------------------------------------------------- 1 | 81 | 151 | 152 | 200 | 201 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /src/pages/Info.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 181 | 182 | 202 | -------------------------------------------------------------------------------- /lib/dateformat.js: -------------------------------------------------------------------------------- 1 | function dateNormalize(date) { 2 | if (!date) { 3 | date = new Date(); 4 | } 5 | let final; 6 | const dateType = Object.prototype.toString.call(date); 7 | switch (dateType) { 8 | case '[object Date]': 9 | final = date; 10 | break; 11 | case '[object String]': 12 | // IOS format fix. '2016-11-11' 需要转换成2016/11/11 13 | final = new Date(date.replace(/-/ig, '/')); 14 | break; 15 | default: 16 | final = new Date(date); 17 | } 18 | return final; 19 | } 20 | function Appendzero(obj) { 21 | if (obj < 10) { 22 | return '0' + '' + obj; 23 | } 24 | else { 25 | return obj; 26 | } 27 | } 28 | /** 29 | * YYYY:4位年,如1993 30 | * YY:2位年,如93 31 | * MM:月份 32 | * DD:日期 33 | * hh:小时 34 | * mm:分钟 35 | * ss:秒钟 36 | * 星期:星期, 返回如 星期二 37 | * 周:返回如 周二 38 | * week:英文星期全称, 返回如 Saturday 39 | * www:三位英文星期, 返回如 Sat 40 | * @param {Date|String|Number} date The Date instance(optional) 41 | * @param {String} format Date format string. YYYY-MM-DD 42 | * @return {String} Formatted string. 43 | */ 44 | export const formatDate = function (date, format) { 45 | if (!date) { 46 | return date; 47 | } 48 | if (arguments.length < 2 && !date.getTime) { 49 | format = date; 50 | date = new Date(); 51 | } 52 | else { 53 | date = dateNormalize(date); 54 | } 55 | if (typeof format !== 'string') { 56 | format = 'YYYY年MM月DD日 hh时mm分ss秒'; 57 | } 58 | const week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', '日', '一', '二', '三', '四', '五', '六']; 59 | return format.replace(/YYYY|YY|MM|M|DD|hh|mm|ss|星期|周|www|week/g, function (a) { 60 | switch (a) { 61 | case 'YYYY': 62 | return date.getFullYear(); 63 | case 'YY': 64 | return (date.getFullYear() + '').slice(2); 65 | case 'MM': 66 | return Appendzero(date.getMonth() + 1); 67 | case 'M': 68 | return date.getMonth() + 1; 69 | case 'DD': 70 | return Appendzero(date.getDate()); 71 | case 'hh': 72 | return Appendzero(date.getHours()); 73 | case 'mm': 74 | return Appendzero(date.getMinutes()); 75 | case 'ss': 76 | return Appendzero(date.getSeconds()); 77 | case '星期': 78 | return '星期' + week[date.getDay() + 7]; 79 | case '周': 80 | return '周' + week[date.getDay() + 7]; 81 | case 'week': 82 | return week[date.getDay()]; 83 | case 'www': 84 | return week[date.getDay()].slice(0, 3); 85 | } 86 | }); 87 | }; 88 | /** 89 | * 日期的加减法 90 | * 91 | * @param {String} interval 字符串表达式,表示要添加的时间间隔. 92 | * @param {Number} number 数值表达式,表示要添加的时间间隔的个数. 93 | * @param {Date} date 时间对象. 94 | * @return {Date} 新的时间对象. 95 | */ 96 | export const dateAdd = (interval, number, date) => { 97 | interval = (interval || '').replace(/\s+/ig, ''); 98 | date = dateNormalize(date); 99 | switch (interval) { 100 | case 'y': 101 | date.setFullYear(date.getFullYear() + number); 102 | return date; 103 | case 'q': 104 | date.setMonth(date.getMonth() + number * 3); 105 | return date; 106 | case 'm': 107 | date.setMonth(date.getMonth() + number); 108 | return date; 109 | case 'w': 110 | date.setDate(date.getDate() + number * 7); 111 | return date; 112 | case 'd': 113 | date.setDate(date.getDate() + number); 114 | return date; 115 | case 'h': 116 | date.setHours(date.getHours() + number); 117 | return date; 118 | case 'mi': 119 | date.setMinutes(date.getMinutes() + number); 120 | return date; 121 | case 's': 122 | date.setSeconds(date.getSeconds() + number); 123 | return date; 124 | default: 125 | date.setDate(date.getDate() + number); 126 | return date; 127 | } 128 | }; 129 | /** 130 | * 计算还剩余多少时间 Note. format(hh时mm分ss秒)is required. 131 | * @param {Number|String} seconds 20000 132 | * @param {String} format YYYY年MM月DD日 hh时mm分ss秒 133 | * @param {String} prefix 剩余 134 | * @returns {String} 剩余23时58分 135 | */ 136 | export const formatTimestamp = (seconds, format, prefix) => { 137 | prefix = prefix || ''; 138 | seconds = parseInt(seconds, 10); 139 | format = format || 'YYYY年MM月DD日 hh时mm分ss秒'; 140 | const orginalDate = new Date('2000/01/01'); 141 | const originalDataTick = orginalDate.getTime(); 142 | const originalFormatedDate = formatDate(orginalDate, format); 143 | const newDate = originalDataTick + seconds; 144 | const newFormatedDate = formatDate(new Date(newDate), format); 145 | const newChars = newFormatedDate.split(''); 146 | const oldChars = originalFormatedDate.split(''); 147 | let diff; 148 | for (let i = 0; i < newChars.length; i++) { 149 | if (oldChars[i] !== newChars[i]) { 150 | diff = newFormatedDate.substr(i); 151 | break; 152 | } 153 | } 154 | return diff ? prefix + diff : diff; 155 | }; 156 | 157 | export const GetDateDiff = (startTime, endTime, diffType) => { 158 | //将xxxx-xx-xx的时间格式,转换为 xxxx/xx/xx的格式 159 | // startTime = startTime.replace(/\-/g, "/"); 160 | // endTime = endTime.replace(/\-/g, "/"); 161 | //将计算间隔类性字符转换为小写 162 | diffType = diffType.toLowerCase(); 163 | var sTime = new Date(startTime); //开始时间 164 | var eTime = new Date(endTime); //结束时间 165 | //作为除数的数字 166 | var timeType = 1; 167 | switch (diffType) { 168 | case "second": 169 | timeType = 1000; 170 | break; 171 | case "minute": 172 | timeType = 1000 * 60; 173 | break; 174 | case "hour": 175 | timeType = 1000 * 3600; 176 | break; 177 | case "day": 178 | timeType = 1000 * 3600 * 24; 179 | break; 180 | default: 181 | break; 182 | } 183 | return parseInt((eTime.getTime() - sTime.getTime()) / parseInt(timeType)); 184 | } -------------------------------------------------------------------------------- /dist/js/bundle.js: -------------------------------------------------------------------------------- 1 | var main_library=function(l){function e(e){for(var t,n,r=e[0],a=e[1],o=e[2],i=0,u=[];i 2 |
3 |
4 | 30 |
31 | 32 |
33 |
34 | 35 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 取消 75 | 确定修改 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 84 |
85 |
86 | 87 |
88 |
89 |
90 |
91 | 92 | {{item.fileName}} 93 |
94 | 95 |
96 |
97 |
98 |
99 | 100 | 181 | 182 | 234 | -------------------------------------------------------------------------------- /src/pages/manage/custom.vue: -------------------------------------------------------------------------------- 1 | 110 | 233 | 234 | 282 | 283 | 284 | 285 | 286 | -------------------------------------------------------------------------------- /dist/js/8.1573214880519.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp_name_library=window.webpackJsonp_name_library||[]).push([[8],{243:function(e,t,n){"use strict";n(238),n(241),n(242),n(130),n(237),n(245),n(122),n(248),n(249),n(78),n(239),n(240),n(251),n(246),n(254),n(266),n(244),n(133),n(255),n(247);var r=n(252),p=n.n(r);n(267),n(250),n(258),n(123),n(126),n(124),n(256),n(259);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return s[o(e)]||s[c.call(e)]||(e?"object":"null")}function u(e,t){var n=1>")]),n("button",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:JSON.stringify(e.data),expression:"JSON.stringify(data)",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:e.onCopy,expression:"onCopy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:e.onErr,expression:"onErr",arg:"error"}],attrs:{type:"button"}},[e._v("复制")])])])])])])}r._withStripped=!0;n(274);var o=n(243),a={data:function(){return{data:{ipAddress:"",macAddress:"",cpuSerial:"",mainBoardSerial:""}}},methods:{initData:function(){var e=this;o.a.get("sys/getServerInfos").then(function(t){2e3==t.code&&(e.data=t.data)})}},onCopy:function(){this.$message.success("内容已复制到剪切板!")},onErr:function(){this.$message.error("抱歉,复制失败!")},mounted:function(){var t=document.getElementById("stars"),r=t.getContext("2d"),o=t.width=window.innerWidth,a=t.height=window.innerHeight,i=217,s=[],e=0,u=document.createElement("canvas"),n=u.getContext("2d");u.width=100,u.height=100;var c=u.width/2,l=n.createRadialGradient(c,c,0,c,c,c);function f(t,e){if(arguments.length<2&&(e=t,t=0),e