@ -0,0 +1,23 @@ |
|||
.DS_Store |
|||
node_modules |
|||
/dist |
|||
|
|||
|
|||
# local env files |
|||
.env.local |
|||
.env.*.local |
|||
|
|||
# Log files |
|||
npm-debug.log* |
|||
yarn-debug.log* |
|||
yarn-error.log* |
|||
pnpm-debug.log* |
|||
|
|||
# Editor directories and files |
|||
.idea |
|||
.vscode |
|||
*.suo |
|||
*.ntvs* |
|||
*.njsproj |
|||
*.sln |
|||
*.sw? |
|||
@ -0,0 +1,24 @@ |
|||
# vue |
|||
|
|||
## Project setup |
|||
``` |
|||
npm install |
|||
``` |
|||
|
|||
### Compiles and hot-reloads for development |
|||
``` |
|||
npm run serve |
|||
``` |
|||
|
|||
### Compiles and minifies for production |
|||
``` |
|||
npm run build |
|||
``` |
|||
|
|||
### Lints and fixes files |
|||
``` |
|||
npm run lint |
|||
``` |
|||
|
|||
### Customize configuration |
|||
See [Configuration Reference](https://cli.vuejs.org/config/). |
|||
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
presets: ["@vue/cli-plugin-babel/preset"], |
|||
}; |
|||
@ -0,0 +1,19 @@ |
|||
{ |
|||
"compilerOptions": { |
|||
"target": "es5", |
|||
"module": "esnext", |
|||
"baseUrl": "./", |
|||
"moduleResolution": "node", |
|||
"paths": { |
|||
"@/*": [ |
|||
"src/*" |
|||
] |
|||
}, |
|||
"lib": [ |
|||
"esnext", |
|||
"dom", |
|||
"dom.iterable", |
|||
"scripthost" |
|||
] |
|||
} |
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
{ |
|||
"name": "vue", |
|||
"version": "0.1.0", |
|||
"private": true, |
|||
"scripts": { |
|||
"serve": "vue-cli-service serve", |
|||
"build": "vue-cli-service build", |
|||
"lint": "vue-cli-service lint" |
|||
}, |
|||
"dependencies": { |
|||
"axios": "^0.19.2", |
|||
"core-js": "^3.8.3", |
|||
"element-ui": "^2.15.10", |
|||
"jquery": "^3.7.1", |
|||
"layui-src": "^2.6.8", |
|||
"less": "^3.10.3", |
|||
"vue": "^2.6.14", |
|||
"vue-router": "^3.5.1", |
|||
"vuex": "^3.6.2" |
|||
}, |
|||
"devDependencies": { |
|||
"@babel/core": "^7.12.16", |
|||
"@babel/eslint-parser": "^7.12.16", |
|||
"@vue/cli-plugin-babel": "~5.0.0", |
|||
"@vue/cli-plugin-eslint": "~5.0.0", |
|||
"@vue/cli-plugin-router": "~5.0.0", |
|||
"@vue/cli-plugin-vuex": "~5.0.0", |
|||
"@vue/cli-service": "~5.0.0", |
|||
"eslint": "^7.32.0", |
|||
"eslint-config-prettier": "^8.3.0", |
|||
"eslint-plugin-prettier": "^4.0.0", |
|||
"eslint-plugin-vue": "^8.0.3", |
|||
"prettier": "^2.4.1", |
|||
"vue-template-compiler": "^2.6.14", |
|||
"less": "^3.10.3", |
|||
"less-loader": "^5.0.0" |
|||
}, |
|||
"eslintConfig": { |
|||
"root": true, |
|||
"env": { |
|||
"node": true |
|||
}, |
|||
"extends": [ |
|||
"plugin:vue/essential", |
|||
"eslint:recommended", |
|||
"plugin:prettier/recommended" |
|||
], |
|||
"parserOptions": { |
|||
"parser": "@babel/eslint-parser" |
|||
}, |
|||
"rules": {} |
|||
}, |
|||
"browserslist": [ |
|||
"> 1%", |
|||
"last 2 versions", |
|||
"not dead" |
|||
] |
|||
} |
|||
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,24 @@ |
|||
<!DOCTYPE html> |
|||
<html lang=""> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
|||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
|||
<link rel="stylesheet" href="./layui/css/layui.css" /> |
|||
<!-- <script src="../static/kline/src/klinecharts.min.js"></script> --> |
|||
<script src="<%= BASE_URL %>static/kline/src/jquery-3.4.1.min.js"></script> |
|||
<script src="<%= BASE_URL %>static/kline/src/klinecharts.min.js"></script> |
|||
<script src="<%= BASE_URL %>static/kline/src/klinecharts.js"></script> |
|||
<script src="<%= BASE_URL %>static/kline/src/lang.js"></script> |
|||
<title><%= htmlWebpackPlugin.options.title %></title> |
|||
</head> |
|||
<body> |
|||
<noscript> |
|||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
|||
</noscript> |
|||
<div id="app"></div> |
|||
<!-- built files will be auto injected --> |
|||
<script src="./layui/layui.js"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1 @@ |
|||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none} |
|||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 299 KiB |
@ -0,0 +1,102 @@ |
|||
<!DOCTYPE html> |
|||
<!-- saved from url=(0048)https://kline.rsncoin.com/index/index/index/id/5 --> |
|||
<html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|||
<title>KLINES OF DFICOINS</title> |
|||
|
|||
<meta name="renderer" content="webkit"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|||
<meta http-equiv="Access-Control-Allow-Origin" content="*"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="format-detection" content="telephone=no"> |
|||
<!-- <link rel="icon" href="https://kline.rsncoin.com/favicon.ico">--> |
|||
<link rel="stylesheet" href="./src/layui.css"> |
|||
<link rel="stylesheet" href="./src/public.css"> |
|||
<link rel="stylesheet" href="./src/iconfont.css"> |
|||
<link rel="stylesheet" href="./src/index.css"> |
|||
<link rel="stylesheet" href="./src/public(1).css"> |
|||
<link rel="stylesheet" href="./src/soulTable.css"> |
|||
|
|||
<script src="./src/jquery-3.4.1.min.js"></script> |
|||
<script src="./src/json3.min.js"></script> |
|||
<script type="text/javascript" src="./src/layui.js"></script> |
|||
<script type="text/javascript" src="./src/cache.js"></script> |
|||
<script type="text/javascript" src="./src/index.js"></script> |
|||
<script src="./src/iconfont.js"></script> |
|||
<link id="layuicss-layer" rel="stylesheet" href="./src/layer.css" media="all"> |
|||
<link rel="stylesheet" href="./src/kline.css"></link> |
|||
</head> |
|||
<body class="main_body"> |
|||
<div class="layui-layout layui-layout-admin"> |
|||
<!-- 左侧导航 --> |
|||
<div class="layui-side layui-bg-black" style="top: 0 !important;"> |
|||
<p class="market_list border-bottom-grey" style="color: #1AA094">交易市场</p> |
|||
<a href="index.html"><p class="market_list border-bottom-grey">PYTNUSDT</p></a> |
|||
<a href="oige.html"><p class="market_list border-bottom-grey">OIGEUSDT</p></a> |
|||
<a href="gql.html"><p class="market_list border-bottom-grey">GQLUSDT</p></a> |
|||
<a href="rpn.html"><p class="market_list border-bottom-grey">RPNUSDT</p></a> |
|||
</div> |
|||
<!-- 右侧内容 --> |
|||
<div class="layui-body" style="top: 0 !important;bottom:0"> |
|||
<blockquote class="layui-elem-quote title"> |
|||
PYTNUSDT |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="1" |
|||
style="margin-left:20px;">1分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="5">5分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn active" type="button" |
|||
data-interval="15">15分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="30"> |
|||
30分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="60">1小时 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="240"> |
|||
4小时 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="D">天 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" data-interval="W">周 |
|||
</button> |
|||
</blockquote> |
|||
<div id="kc-container"> |
|||
|
|||
</div> |
|||
</div> |
|||
<!-- 移动导航 --> |
|||
<div class="site-tree-mobile"><i class="layui-icon"></i></div> |
|||
<div class="site-mobile-shade"></div> |
|||
|
|||
<script src="./src/common.js"></script> |
|||
</div> |
|||
|
|||
<script type="text/javascript" src="./src/lang.js"></script> |
|||
<script type="text/javascript" src="./src/klinecharts.min.js"></script> |
|||
<script src="./src/klineCharts.js"></script> |
|||
<script> |
|||
var loading_index = null; |
|||
layui.use('layer', function () { |
|||
layer = layui.layer; |
|||
|
|||
kcStart({ |
|||
containerId: 'kc-container', |
|||
symbol: 'PYTN', |
|||
coinScale: parseInt('5'), // 计价币种精度 |
|||
volumeScale: parseInt('5'), // 成交量精度保留 |
|||
interval: '15', |
|||
timezone: "America/Toronto", |
|||
language: 'zh_TW' |
|||
}) |
|||
}) |
|||
</script> |
|||
<!-- <div class="layui-layer-move"></div> |
|||
<div class="ileft" title="按[ESC]切换展示和隐藏IP,双击复制IP, 双击[F4]去项目主页" id="chrome-website-ip" style="display: none;">本机地址 |
|||
<div id="chrome-website-ip-value">127.0.0.1</div> |
|||
</div> --> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,306 @@ |
|||
var cacheStr = window.sessionStorage.getItem("cache"), |
|||
oneLoginStr = window.sessionStorage.getItem("oneLogin"); |
|||
layui.use(['form','jquery',"layer"],function() { |
|||
var form = layui.form, |
|||
$ = layui.jquery, |
|||
layer = parent.layer === undefined ? layui.layer : top.layer; |
|||
|
|||
//判断是否web端打开
|
|||
if(!/http(s*):\/\//.test(location.href)){ |
|||
layer.alert("请先将项目部署到 localhost 下再进行访问【建议通过tomcat、webstorm、hb等方式运行,不建议通过iis方式运行】,否则部分数据将无法显示"); |
|||
}else{ //判断是否处于锁屏状态【如果关闭以后则未关闭浏览器之前不再显示】
|
|||
if(window.sessionStorage.getItem("lockcms") != "true" && window.sessionStorage.getItem("showNotice") != "true"){ |
|||
//showNotice();
|
|||
} |
|||
} |
|||
|
|||
//判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像
|
|||
if(window.sessionStorage.getItem('userFace') && $(".userAvatar").length > 0){ |
|||
$("#userFace").attr("src",window.sessionStorage.getItem('userFace')); |
|||
$(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]); |
|||
}else{ |
|||
$("#userFace").attr("src","../../images/face.jpg"); |
|||
} |
|||
|
|||
//公告层
|
|||
function showNotice(){ |
|||
layer.open({ |
|||
type: 1, |
|||
title: "系统公告", |
|||
area: '300px', |
|||
shade: 0.8, |
|||
id: 'LAY_layuipro', |
|||
btn: ['火速围观'], |
|||
moveType: 1, |
|||
content: '<div style="padding:15px 20px; text-align:justify; line-height: 22px; text-indent:2em;border-bottom:1px solid #e2e2e2;"><p class="layui-red">请使用模版前请务必仔细阅读首页右下角的《更新日志》,避免使用中遇到一些简单的问题造成困扰。</p></pclass></p><p>1.0发布以后发现很多朋友将代码上传到各种素材网站,当然这样帮我宣传我谢谢大家,但是有部分朋友上传到素材网站后将下载分值设置的相对较高,需要朋友们充钱才能下载。本人发现后通过和站长、网站管理员联系以后将分值调整为不需要充值才能下载或者直接免费下载。在此郑重提示各位:<span class="layui-red">本模版已进行作品版权证明,不管以何种形式获取的源码,请勿进行出售或者上传到任何素材网站,否则将追究相应的责任。</span></p></div>', |
|||
success: function(layero){ |
|||
var btn = layero.find('.layui-layer-btn'); |
|||
btn.css('text-align', 'center'); |
|||
btn.on("click",function(){ |
|||
tipsShow(); |
|||
}); |
|||
}, |
|||
cancel: function(index, layero){ |
|||
tipsShow(); |
|||
} |
|||
}); |
|||
} |
|||
function tipsShow(){ |
|||
window.sessionStorage.setItem("showNotice","true"); |
|||
if($(window).width() > 432){ //如果页面宽度不足以显示顶部“系统公告”按钮,则不提示
|
|||
layer.tips('系统公告躲在了这里', '#userInfo', { |
|||
tips: 3, |
|||
time : 1000 |
|||
}); |
|||
} |
|||
} |
|||
$(".showNotice").on("click",function(){ |
|||
showNotice(); |
|||
}) |
|||
|
|||
//锁屏
|
|||
function lockPage(){ |
|||
layer.open({ |
|||
title : false, |
|||
type : 1, |
|||
content : '<div class="admin-header-lock" id="lock-box">'+ |
|||
'<div class="admin-header-lock-img"><img src="images/face.jpg" class="userAvatar"/></div>'+ |
|||
'<div class="admin-header-lock-name" id="lockUserName">驊驊龔頾</div>'+ |
|||
'<div class="input_btn">'+ |
|||
'<input type="password" class="admin-header-lock-input layui-input" autocomplete="off" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" />'+ |
|||
'<button class="layui-btn" id="unlock">解锁</button>'+ |
|||
'</div>'+ |
|||
'<p>请输入“123456”,否则不会解锁成功哦!!!</p>'+ |
|||
'</div>', |
|||
closeBtn : 0, |
|||
shade : 0.9, |
|||
success : function(){ |
|||
//判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像
|
|||
if(window.sessionStorage.getItem('userFace') && $(".userAvatar").length > 0){ |
|||
$(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]); |
|||
} |
|||
} |
|||
}) |
|||
$(".admin-header-lock-input").focus(); |
|||
} |
|||
$(".lockcms").on("click",function(){ |
|||
window.sessionStorage.setItem("lockcms",true); |
|||
lockPage(); |
|||
}) |
|||
// 判断是否显示锁屏
|
|||
if(window.sessionStorage.getItem("lockcms") == "true"){ |
|||
lockPage(); |
|||
} |
|||
// 解锁
|
|||
$("body").on("click","#unlock",function(){ |
|||
if($(this).siblings(".admin-header-lock-input").val() == ''){ |
|||
layer.msg("请输入解锁密码!"); |
|||
$(this).siblings(".admin-header-lock-input").focus(); |
|||
}else{ |
|||
if($(this).siblings(".admin-header-lock-input").val() == "123456"){ |
|||
window.sessionStorage.setItem("lockcms",false); |
|||
$(this).siblings(".admin-header-lock-input").val(''); |
|||
layer.closeAll("page"); |
|||
}else{ |
|||
layer.msg("密码错误,请重新输入!"); |
|||
$(this).siblings(".admin-header-lock-input").val('').focus(); |
|||
} |
|||
} |
|||
}); |
|||
$(document).on('keydown', function(event) { |
|||
var event = event || window.event; |
|||
if(event.keyCode == 13) { |
|||
$("#unlock").click(); |
|||
} |
|||
}); |
|||
|
|||
//退出
|
|||
$(".signOut").click(function(){ |
|||
window.sessionStorage.removeItem("menu"); |
|||
menu = []; |
|||
window.sessionStorage.removeItem("curmenu"); |
|||
}) |
|||
|
|||
//功能设定
|
|||
$(".functionSetting").click(function(){ |
|||
layer.open({ |
|||
title: "功能设定", |
|||
area: ["380px", "280px"], |
|||
type: "1", |
|||
content : '<div class="functionSrtting_box">'+ |
|||
'<form class="layui-form">'+ |
|||
'<div class="layui-form-item">'+ |
|||
'<label class="layui-form-label">开启Tab缓存</label>'+ |
|||
'<div class="layui-input-block">'+ |
|||
'<input type="checkbox" name="cache" lay-skin="switch" lay-text="开|关">'+ |
|||
'<div class="layui-word-aux">开启后刷新页面不关闭打开的Tab页</div>'+ |
|||
'</div>'+ |
|||
'</div>'+ |
|||
'<div class="layui-form-item">'+ |
|||
'<label class="layui-form-label">Tab切换刷新</label>'+ |
|||
'<div class="layui-input-block">'+ |
|||
'<input type="checkbox" name="changeRefresh" lay-skin="switch" lay-text="开|关">'+ |
|||
'<div class="layui-word-aux">开启后切换窗口刷新当前页面</div>'+ |
|||
'</div>'+ |
|||
'</div>'+ |
|||
'<div class="layui-form-item">'+ |
|||
'<label class="layui-form-label">单一登陆</label>'+ |
|||
'<div class="layui-input-block">'+ |
|||
'<input type="checkbox" name="oneLogin" lay-filter="multipleLogin" lay-skin="switch" lay-text="是|否">'+ |
|||
'<div class="layui-word-aux">开启后不可同时多个地方登录</div>'+ |
|||
'</div>'+ |
|||
'</div>'+ |
|||
'<div class="layui-form-item skinBtn">'+ |
|||
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="settingSuccess">设定完成</a>'+ |
|||
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-primary" lay-submit="" lay-filter="noSetting">朕再想想</a>'+ |
|||
'</div>'+ |
|||
'</form>'+ |
|||
'</div>', |
|||
success : function(index, layero){ |
|||
//如果之前设置过,则设置它的值
|
|||
$(".functionSrtting_box input[name=cache]").prop("checked",cacheStr=="true" ? true : false); |
|||
$(".functionSrtting_box input[name=changeRefresh]").prop("checked",changeRefreshStr=="true" ? true : false); |
|||
$(".functionSrtting_box input[name=oneLogin]").prop("checked",oneLoginStr=="true" ? true : false); |
|||
//设定
|
|||
form.on("submit(settingSuccess)",function(data){ |
|||
window.sessionStorage.setItem("cache",data.field.cache=="on" ? "true" : "false"); |
|||
window.sessionStorage.setItem("changeRefresh",data.field.changeRefresh=="on" ? "true" : "false"); |
|||
window.sessionStorage.setItem("oneLogin",data.field.oneLogin=="on" ? "true" : "false"); |
|||
window.sessionStorage.removeItem("menu"); |
|||
window.sessionStorage.removeItem("curmenu"); |
|||
location.reload(); |
|||
return false; |
|||
}); |
|||
//取消设定
|
|||
form.on("submit(noSetting)",function(){ |
|||
layer.closeAll("page"); |
|||
}); |
|||
//单一登陆提示
|
|||
form.on('switch(multipleLogin)', function(data){ |
|||
layer.tips('温馨提示:此功能需要开发配合,所以没有功能演示,敬请谅解', data.othis,{tips: 1}) |
|||
}); |
|||
form.render(); //表单渲染
|
|||
} |
|||
}) |
|||
}) |
|||
|
|||
//判断是否修改过系统基本设置,去显示底部版权信息
|
|||
if(window.sessionStorage.getItem("systemParameter")){ |
|||
systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter")); |
|||
$(".footer p span").text(systemParameter.powerby); |
|||
} |
|||
|
|||
//更换皮肤
|
|||
function skins(){ |
|||
var skin = window.sessionStorage.getItem("skin"); |
|||
if(skin){ //如果更换过皮肤
|
|||
if(window.sessionStorage.getItem("skinValue") != "自定义"){ |
|||
$("body").addClass(window.sessionStorage.getItem("skin")); |
|||
}else{ |
|||
$(".layui-layout-admin .layui-header").css("background-color",skin.split(',')[0]); |
|||
$(".layui-bg-black").css("background-color",skin.split(',')[1]); |
|||
$(".hideMenu").css("background-color",skin.split(',')[2]); |
|||
} |
|||
} |
|||
} |
|||
skins(); |
|||
$(".changeSkin").click(function(){ |
|||
layer.open({ |
|||
title : "更换皮肤", |
|||
area : ["310px","280px"], |
|||
type : "1", |
|||
content : '<div class="skins_box">'+ |
|||
'<form class="layui-form">'+ |
|||
'<div class="layui-form-item">'+ |
|||
'<input type="radio" name="skin" value="默认" title="默认" lay-filter="default" checked="">'+ |
|||
'<input type="radio" name="skin" value="橙色" title="橙色" lay-filter="orange">'+ |
|||
'<input type="radio" name="skin" value="蓝色" title="蓝色" lay-filter="blue">'+ |
|||
'<input type="radio" name="skin" value="自定义" title="自定义" lay-filter="custom">'+ |
|||
'<div class="skinCustom">'+ |
|||
'<input type="text" class="layui-input topColor" name="topSkin" placeholder="顶部颜色" />'+ |
|||
'<input type="text" class="layui-input leftColor" name="leftSkin" placeholder="左侧颜色" />'+ |
|||
'<input type="text" class="layui-input menuColor" name="btnSkin" placeholder="顶部菜单按钮" />'+ |
|||
'</div>'+ |
|||
'</div>'+ |
|||
'<div class="layui-form-item skinBtn">'+ |
|||
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="changeSkin">确定更换</a>'+ |
|||
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-primary" lay-submit="" lay-filter="noChangeSkin">朕再想想</a>'+ |
|||
'</div>'+ |
|||
'</form>'+ |
|||
'</div>', |
|||
success : function(index, layero){ |
|||
var skin = window.sessionStorage.getItem("skin"); |
|||
if(window.sessionStorage.getItem("skinValue")){ |
|||
$(".skins_box input[value="+window.sessionStorage.getItem("skinValue")+"]").attr("checked","checked"); |
|||
}; |
|||
if($(".skins_box input[value=自定义]").attr("checked")){ |
|||
$(".skinCustom").css("visibility","inherit"); |
|||
$(".topColor").val(skin.split(',')[0]); |
|||
$(".leftColor").val(skin.split(',')[1]); |
|||
$(".menuColor").val(skin.split(',')[2]); |
|||
}; |
|||
form.render(); |
|||
$(".skins_box").removeClass("layui-hide"); |
|||
$(".skins_box .layui-form-radio").on("click",function(){ |
|||
var skinColor; |
|||
if($(this).find("div").text() == "橙色"){ |
|||
skinColor = "orange"; |
|||
}else if($(this).find("div").text() == "蓝色"){ |
|||
skinColor = "blue"; |
|||
}else if($(this).find("div").text() == "默认"){ |
|||
skinColor = ""; |
|||
} |
|||
if($(this).find("div").text() != "自定义"){ |
|||
$(".topColor,.leftColor,.menuColor").val(''); |
|||
$("body").removeAttr("class").addClass("main_body "+skinColor+""); |
|||
$(".skinCustom").removeAttr("style"); |
|||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style"); |
|||
}else{ |
|||
$(".skinCustom").css("visibility","inherit"); |
|||
} |
|||
}) |
|||
var skinStr,skinColor; |
|||
$(".topColor").blur(function(){ |
|||
$(".layui-layout-admin .layui-header").css("background-color",$(this).val()+" !important"); |
|||
}) |
|||
$(".leftColor").blur(function(){ |
|||
$(".layui-bg-black").css("background-color",$(this).val()+" !important"); |
|||
}) |
|||
$(".menuColor").blur(function(){ |
|||
$(".hideMenu").css("background-color",$(this).val()+" !important"); |
|||
}) |
|||
|
|||
form.on("submit(changeSkin)",function(data){ |
|||
if(data.field.skin != "自定义"){ |
|||
if(data.field.skin == "橙色"){ |
|||
skinColor = "orange"; |
|||
}else if(data.field.skin == "蓝色"){ |
|||
skinColor = "blue"; |
|||
}else if(data.field.skin == "默认"){ |
|||
skinColor = ""; |
|||
} |
|||
window.sessionStorage.setItem("skin",skinColor); |
|||
}else{ |
|||
skinStr = $(".topColor").val()+','+$(".leftColor").val()+','+$(".menuColor").val(); |
|||
window.sessionStorage.setItem("skin",skinStr); |
|||
$("body").removeAttr("class").addClass("main_body"); |
|||
} |
|||
window.sessionStorage.setItem("skinValue",data.field.skin); |
|||
layer.closeAll("page"); |
|||
}); |
|||
form.on("submit(noChangeSkin)",function(){ |
|||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+""); |
|||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style"); |
|||
skins(); |
|||
layer.closeAll("page"); |
|||
}); |
|||
}, |
|||
cancel : function(){ |
|||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+""); |
|||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style"); |
|||
skins(); |
|||
} |
|||
}) |
|||
}) |
|||
|
|||
}) |
|||
@ -0,0 +1,68 @@ |
|||
$('body').on('click', '.layer-close, .layer-close1, .layer-close2', function(){ |
|||
console.log('asd'); |
|||
layer.close(layer_index); |
|||
}) |
|||
|
|||
function get_image_url(img, path, default_str){ |
|||
if(img == '' || img == null || img == undefined) return default_str || ''; |
|||
img = $.trim(img); |
|||
img_t = img.toLowerCase(); |
|||
if(img_t.indexOf('http') === 0){ |
|||
return img; |
|||
} |
|||
return (path || '') + img; |
|||
} |
|||
|
|||
function checkValue(field, value){ |
|||
if(field == 'mobile'){ |
|||
var reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; |
|||
if(reg.test(value)) { |
|||
return true; |
|||
}else{return false;} |
|||
} |
|||
else if(field == 'number'){ |
|||
var reg = /^[0-9]+\.?[0-9]*$/; |
|||
if(reg.test(value)) { |
|||
return true; |
|||
}else{return false;} |
|||
} |
|||
else if(field == 'idcard'){ |
|||
var reg = /^[0-9]{18}$/; |
|||
if(reg.test(value)) { |
|||
return true; |
|||
}else{return false;} |
|||
} |
|||
} |
|||
|
|||
function timestampToTime(timestamp, format, date_s) { |
|||
if(timestamp == undefined || timestamp == null || timestamp == '' || timestamp == 0) return ''; |
|||
if(format == undefined || format == null) format = 'all'; |
|||
var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
|||
Y = date.getFullYear(); |
|||
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1); |
|||
D = change(date.getDate()); |
|||
h = change(date.getHours()); |
|||
m = change(date.getMinutes()); |
|||
s = change(date.getSeconds()); |
|||
date_s = date_s || '-'; |
|||
if(format == 'Y'){ |
|||
return Y; |
|||
} |
|||
else if(format == 'full'){ |
|||
return Y + date_s + M + date_s + D + ' ' + h + ':' + m; |
|||
} |
|||
else if(format == 'all'){ |
|||
return Y + date_s + M + date_s + D + ' ' + h + ':' + m + ':' + s; |
|||
} |
|||
else if(format == 'date'){ |
|||
return Y + date_s + M + date_s + D; |
|||
} |
|||
else return M + date_s + D;// + h + m + s;
|
|||
} |
|||
function change(t) { |
|||
if (t < 10) { |
|||
return "0" + t; |
|||
} else { |
|||
return t; |
|||
} |
|||
} |
|||
@ -0,0 +1,160 @@ |
|||
/*公共样式*/ |
|||
.header .layui-nav-child{ z-index:99999; top:60px; left: auto; right: 0;} |
|||
.seraph{ font-size:16px !important;} |
|||
.main_body{ min-width:320px; } |
|||
.layui-nav .layui-nav-item a{ cursor:pointer;} |
|||
.layui-nav .layui-nav-item>a{ color:rgba(255,255,255,1); max-height:60px;} |
|||
.layui-layer-tab .layui-layer-title span{ padding:0 !important;} |
|||
/*iframe{ position:absolute; height:100%; width:100%; border:none;}*/ |
|||
.top_menu.layui-nav .layui-nav-child dd.layui-this a,.closeBox.layui-nav .layui-nav-child dd.layui-this a,.closeBox .layui-nav-child dd.layui-this,.top_menu .layui-nav-child dd.layui-this{ background:none; color:#333;} |
|||
.layui-nav .layui-nav-child a:hover,.layui-nav .layui-nav-child dd.layui-this a:hover{background-color:#5FB878;color:#fff;} |
|||
|
|||
/*模拟加载层图标样式*/ |
|||
.layui-layer-dialog .layui-layer-content .layui-layer-ico16{ background-size:100% 100% !important; } |
|||
/*样式改变的过渡*/ |
|||
.layui-body,.layui-footer,.layui-layout-admin .layui-side,.logo,.topLevelMenus li.layui-nav-item,.topLevelMenus li.layui-nav-item:hover{ transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out; } |
|||
/*隐藏*/ |
|||
*[mobile],.component .layui-select-title i.layui-edge{ display:none;} |
|||
|
|||
/*打开页面动画*/ |
|||
.layui-tab-item.layui-show{ animation:moveTop 1s; -webkit-animation:moveTop 1s; animation-fill-mode:both; -webkit-animation-fill-mode:both; position:relative; height:100%; -webkit-overflow-scrolling: touch; overflow:auto; } |
|||
@keyframes moveTop{ |
|||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);} |
|||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);} |
|||
} |
|||
@-o-keyframes moveTop{ |
|||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);} |
|||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);} |
|||
} |
|||
@-moz-keyframes moveTop{ |
|||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);} |
|||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);} |
|||
} |
|||
@-webkit-keyframes moveTop{ |
|||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);} |
|||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);} |
|||
} |
|||
/*锁屏*/ |
|||
.admin-header-lock{width: 320px; height: 170px; padding: 20px; position: relative; text-align: center;} |
|||
.admin-header-lock-img{width:70px; height:70px; margin: 0 auto;} |
|||
.admin-header-lock-img img{width:70px; height:70px; border-radius: 100%; box-shadow:0 0 30px #44576b;} |
|||
.admin-header-lock-name{color: #009688;margin: 8px 0 15px 0;} |
|||
.input_btn{ overflow: hidden; margin-bottom: 10px; } |
|||
.admin-header-lock-input{width: 170px; color: #fff;background-color: #009688; float: left; margin:0 10px 0 40px; border:none;} |
|||
.admin-header-lock-input::-webkit-input-placeholder {color:#fff;} |
|||
.admin-header-lock-input::-moz-placeholder {color:#fff;} |
|||
.admin-header-lock-input:-ms-input-placeholder {color:#fff;} |
|||
.admin-header-lock-input:-moz-placeholder {color:#fff;} |
|||
#unlock{ float: left; } |
|||
#lock-box p{ color:#e60000; } |
|||
/*顶部*/ |
|||
.header{ z-index:1500;} |
|||
.logo{ color: #fff; float: left;margin: -1px 15px 0 -15px; text-align: center; width:200px;} |
|||
.logo img{width:100%;height:50px;} |
|||
.hideMenu{ float:left; width:20px; height:20px; margin-top:15px; font-size:17px; line-height:20px; text-align:center; padding:5px 5px; color:#fff; background-color:#1AA094; } |
|||
.hideMenu:hover{ color:#fff; } |
|||
.layui-nav cite{ margin-left: 5px;} |
|||
/*顶部右侧*/ |
|||
.topLevelMenus{float:left;} |
|||
.topLevelMenus li.layui-nav-item:hover{ background-color:rgba(221,221,221,0.2);} |
|||
.layui-nav .layui-this:after{ bottom:-5px!important;} |
|||
.header .layui-nav-bar{top:60px !important;} |
|||
.topLevelMenus .layui-nav-item.layui-this{ background-color:rgba(0,0,0,0.5);} |
|||
.top_menu.layui-nav .layui-this:after{ width:0px; } |
|||
.top_menu .layui-nav-bar,.mobileTopLevelMenus .layui-nav-bar{background-color:rgba(0,0,0,0.7);} |
|||
|
|||
#userInfo{min-width: 100px;} |
|||
/*左侧导航*/ |
|||
.layui-nav{background-color: inherit !important;} |
|||
.showMenu.layui-layout-admin .layui-side{ left:-200px; } |
|||
.showMenu .layui-body,.showMenu .layui-footer{ left:0; } |
|||
/*左侧用户头像*/ |
|||
.top_menu{ background-color:inherit !important; position:absolute; right:0;top:0; } |
|||
.layui-layout-admin .layui-side{ left:0; overflow:hidden;} |
|||
.user-photo{width: 200px; height: 90px;} |
|||
/*.user-photo a.img{ display: block; width:80px; height:80px; margin: 0 auto 10px;}*/ |
|||
.user-photo a.img img{ display: block; border: none; width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; border: 4px solid #44576b; box-sizing:border-box;} |
|||
.user-photo p{ display: block; width: 100%; height: 50px; color: #ffffff; text-align: center; font-size: 12px; white-space: nowrap;line-height: 50px; overflow: hidden;} |
|||
/*左侧导航重定义*/ |
|||
.layui-nav-item.layui-nav-itemed{ background-color:#2B2E37 !important;} |
|||
.layui-nav-itemed:before{ width:5px; height:100%; background-color:#009688; position:absolute; content:''; left:0; top:0;} |
|||
.layui-nav-itemed .layui-nav-child a{ padding-left:40px;} |
|||
/*左侧搜索框*/ |
|||
.component{ width:180px; height:30px; margin:0 auto 5px; position:relative;} |
|||
.component .layui-input{ height:30px; line-height: 30px; font-size:12px; border:none; transition: all 0.3s; background:rgba(255,255,255,0.05); } |
|||
.component .layui-input:focus{ background:#fff; color:#000; } |
|||
.component .layui-form-select dl{ top:33px; background:#fff; } |
|||
.component .layui-icon{ position: absolute; right:8px; top:8px; color:#000; } |
|||
.component dl dd{ color:#000 !important;} |
|||
.component dl dd.layui-this{ color:#fff !important;} |
|||
.component dl dd.layui-select-tips{ color:#999 !important;} |
|||
|
|||
/*layui-body*/ |
|||
.layui-body{overflow-y:scroll; border-top:5px solid #1AA094;border-left:2px solid #1AA094; background:#fff;padding: 10px;} |
|||
#top_tabs_box{ padding-right:138px; height:40px; border-bottom:1px solid #e2e2e2; } |
|||
#top_tabs{ position: absolute; border-bottom:none;} |
|||
/*.layui-tab-title .layui-this{ background-color:#1AA094; color:#fff; }*/ |
|||
.layui-tab-title .layui-this:after{ border:none; } |
|||
.layui-tab-title li cite{ font-style: normal; padding-left:5px; } |
|||
.clildFrame.layui-tab-content{ top:41px; position:absolute; bottom:0; width:100%; padding:0;} |
|||
/*多窗口页面操作下拉*/ |
|||
.closeBox{ position:absolute; right:0; background-color:#fff !important; color:#000; border-left:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; } |
|||
.closeBox .layui-nav-item{ line-height:40px; } |
|||
.closeBox .layui-nav-item>a,.closeBox .layui-nav-item>a:hover{ color:#000; } |
|||
.closeBox .layui-nav-child{ top:42px; left:-12px; } |
|||
.closeBox .layui-nav-bar{ display:none; } |
|||
.closeBox a i.caozuo{ font-size: 20px; position:absolute; top:1px; left:0; } |
|||
.closeBox a span.layui-nav-more{ border-color:#333 transparent transparent;} |
|||
.closeBox a span.layui-nav-more.layui-nav-mored{ border-color:transparent transparent #333;} |
|||
/*功能设定*/ |
|||
.functionSrtting_box{ padding-top:15px;} |
|||
.functionSrtting_box .layui-form-label{ width:81px;} |
|||
.functionSrtting_box .layui-word-aux{ position:absolute;left:60px; top:9px; font-size: 12px;} |
|||
/*换肤*/ |
|||
.skins_box{ padding:10px 34px 0; } |
|||
.skinBtn{ text-align:center; } |
|||
/*橙色*/ |
|||
.orange .layui-layout-admin .layui-header{ background-color:orange !important; } |
|||
.orange .layui-bg-black{ background-color:#e47214 !important; } |
|||
/*蓝色*/ |
|||
.blue .layui-layout-admin .layui-header{ background-color:#3396d8 !important; } |
|||
.blue .layui-bg-black,.blue .hideMenu{ background-color:#146aa2 !important; } |
|||
/*自定义*/ |
|||
.skinCustom{ visibility:hidden; } |
|||
.skinCustom input{ width:48%; margin:5px 2% 5px 0; float:left; } |
|||
.orange .layui-nav-tree .layui-nav-child a,.blue .layui-nav-tree .layui-nav-child a{ color:#fff; } |
|||
.orange .top_menu.layui-nav .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-more{border-color:#fff transparent transparent !important;} |
|||
.orange .top_menu.layui-nav-itemed .layui-nav-more,.orange .top_menu.layui-nav .layui-nav-mored,.blue .top_menu.layui-nav-itemed .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-mored{border-color:transparent transparent #fff !important;} |
|||
/*底部*/ |
|||
.footer{ text-align: center; line-height:44px;border-left: 2px solid #1AA094; z-index:999;} |
|||
|
|||
/*响应式样式*/ |
|||
@media screen and (max-width:1080px){ |
|||
.mobileTopLevelMenus[mobile]{display:inline-block;} |
|||
.site-mobile .site-tree-mobile,.topLevelMenus[pc]{display:none !important;} |
|||
} |
|||
@media screen and (max-width: 720px){ |
|||
.hideMenu{ display: none !important; } |
|||
.mobileTopLevelMenus[mobile]{ padding:0;} |
|||
.top_menu>li[pc]{ display: none !important; } |
|||
/*左侧导航*/ |
|||
.layui-layout-admin .layui-side{ left:-260px; } |
|||
.site-mobile .layui-side{ left: 0; z-index:1100; } |
|||
.site-tree-mobile {display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width:40px; height:40px; line-height:40px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;} |
|||
.site-mobile .site-mobile-shade { content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;} |
|||
.layui-body,.layui-layout-admin .layui-footer{ left:-2px; } |
|||
} |
|||
@media screen and (max-width:480px){ |
|||
.logo{ width:120px; font-size: 18px;} |
|||
#userInfo>a{ padding:0 10px;} |
|||
.mobileTopLevelMenus[mobile] li>a{ padding:0 17px 0 15px;} |
|||
.logo,.layui-nav.top_menu{ padding:0 5px;} |
|||
.adminName,.top_menu dd[pc]{ display: none !important; } |
|||
*[mobile],.top_menu .layui-nav-item.showNotice[pc]{ display:inline-block !important; } |
|||
} |
|||
|
|||
/*修改顶部高度*/ |
|||
.header .layui-nav-child,.layui-body,.layui-layout-admin .layui-side,.header .layui-nav-bar{ top:50px !important;} |
|||
.header .layui-nav .layui-nav-item,.header .layui-nav .layui-nav-item>a,.header,.logo{ line-height:50px !important; max-height:50px !important;} |
|||
.mobileTopLevelMenus{ float:left;} |
|||
.hideMenu{ margin-top: 10px;} |
|||
@ -0,0 +1,170 @@ |
|||
var $,tab,dataStr,layer; |
|||
/*layui.config({ |
|||
base : "/cms/js/" |
|||
}).extend({ |
|||
"bodyTab" : "bodyTab" |
|||
})*/ |
|||
layui.use(['form','element','layer','jquery'],function(){ |
|||
var form = layui.form, |
|||
element = layui.element; |
|||
$ = layui.$; |
|||
layer = parent.layer === undefined ? layui.layer : top.layer; |
|||
/*tab = layui.bodyTab({ |
|||
openTabNum : "50", //最大可打开窗口数量
|
|||
url : "/cms/json/navs.json" //获取菜单json地址
|
|||
});*/ |
|||
|
|||
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
|
|||
/*function getData(json){ |
|||
$.getJSON(tab.tabConfig.url,function(data){ |
|||
if(json == "contentManagement"){ |
|||
dataStr = data.contentManagement; |
|||
//重新渲染左侧菜单
|
|||
tab.render(); |
|||
}else if(json == "memberCenter"){ |
|||
dataStr = data.memberCenter; |
|||
//重新渲染左侧菜单
|
|||
tab.render(); |
|||
}else if(json == "systemeSttings"){ |
|||
dataStr = data.systemeSttings; |
|||
//重新渲染左侧菜单
|
|||
tab.render(); |
|||
}else if(json == "seraphApi"){ |
|||
dataStr = data.seraphApi; |
|||
//重新渲染左侧菜单
|
|||
tab.render(); |
|||
} |
|||
}) |
|||
}*/ |
|||
//页面加载时判断左侧菜单是否显示
|
|||
//通过顶部菜单获取左侧菜单
|
|||
$(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){ |
|||
if($(this).parents(".mobileTopLevelMenus").length != "0"){ |
|||
$(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this"); |
|||
}else{ |
|||
$(".mobileTopLevelMenus dd").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this"); |
|||
} |
|||
$(".layui-layout-admin").removeClass("showMenu"); |
|||
$("body").addClass("site-mobile"); |
|||
getData($(this).data("menu")); |
|||
//渲染顶部窗口
|
|||
tab.tabMove(); |
|||
}) |
|||
|
|||
//隐藏左侧导航
|
|||
$(".hideMenu").click(function(){ |
|||
// if($(".topLevelMenus li.layui-this a").data("url")){
|
|||
// layer.msg("此栏目状态下左侧菜单不可展开"); //主要为了避免左侧显示的内容与顶部菜单不匹配
|
|||
// return false;
|
|||
// }
|
|||
$(".layui-layout-admin").toggleClass("showMenu"); |
|||
//渲染顶部窗口
|
|||
tab.tabMove(); |
|||
}) |
|||
|
|||
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
|
|||
//getData("contentManagement");
|
|||
|
|||
//手机设备的简单适配
|
|||
$('.site-tree-mobile').on('click', function(){ |
|||
$('body').addClass('site-mobile'); |
|||
}); |
|||
$('.site-mobile-shade').on('click', function(){ |
|||
$('body').removeClass('site-mobile'); |
|||
}); |
|||
|
|||
// 添加新窗口
|
|||
$("body").on("click",".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')",function(){ |
|||
//如果不存在子级
|
|||
if($(this).siblings().length == 0){ |
|||
addTab($(this)); |
|||
$('body').removeClass('site-mobile'); //移动端点击菜单关闭菜单层
|
|||
} |
|||
$(this).parent("li").siblings().removeClass("layui-nav-itemed"); |
|||
}) |
|||
|
|||
//清除缓存
|
|||
$(".clearCache").click(function(){ |
|||
window.sessionStorage.clear(); |
|||
window.localStorage.clear(); |
|||
var index = layer.msg('清除缓存中,请稍候',{icon: 16,time:false,shade:0.8}); |
|||
setTimeout(function(){ |
|||
layer.close(index); |
|||
layer.msg("缓存清除成功!"); |
|||
},1000); |
|||
}) |
|||
cacheStr = "true";//自定义添加的
|
|||
//刷新后还原打开的窗口
|
|||
if(cacheStr == "true") { |
|||
if (window.sessionStorage.getItem("menu") != null) { |
|||
menu = JSON.parse(window.sessionStorage.getItem("menu")); |
|||
curmenu = window.sessionStorage.getItem("curmenu"); |
|||
var openTitle = ''; |
|||
for (var i = 0; i < menu.length; i++) { |
|||
openTitle = ''; |
|||
if (menu[i].icon) { |
|||
if (menu[i].icon.split("-")[0] == 'icon') { |
|||
openTitle += '<i class="seraph ' + menu[i].icon + '"></i>'; |
|||
} else { |
|||
openTitle += '<i class="layui-icon">' + menu[i].icon + '</i>'; |
|||
} |
|||
} |
|||
openTitle += '<cite>' + menu[i].title + '</cite>'; |
|||
openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="' + menu[i].layId + '">ဆ</i>'; |
|||
element.tabAdd("bodyTab", { |
|||
title: openTitle, |
|||
content: "<iframe src='" + menu[i].href + "' data-id='" + menu[i].layId + "'></frame>", |
|||
id: menu[i].layId |
|||
}) |
|||
//定位到刷新前的窗口
|
|||
if (curmenu != "undefined") { |
|||
if (curmenu == '' || curmenu == "null") { //定位到后台首页
|
|||
element.tabChange("bodyTab", ''); |
|||
} else if (JSON.parse(curmenu).title == menu[i].title) { //定位到刷新前的页面
|
|||
element.tabChange("bodyTab", menu[i].layId); |
|||
} |
|||
} else { |
|||
element.tabChange("bodyTab", menu[menu.length - 1].layId); |
|||
} |
|||
} |
|||
//渲染顶部窗口
|
|||
//tab.tabMove();
|
|||
} |
|||
}else{ |
|||
window.sessionStorage.removeItem("menu"); |
|||
window.sessionStorage.removeItem("curmenu"); |
|||
} |
|||
}) |
|||
|
|||
//打开新窗口
|
|||
function addTab(_this){ |
|||
//tab.tabAdd(_this);
|
|||
//$('#main-iframe').attr('src', _this.attr('data-url'));
|
|||
if(_this.attr('data-url') == undefined || _this.attr('data-url') == '' || _this.attr('data-url') == null) return ; |
|||
window.location.href = _this.attr('data-url'); |
|||
} |
|||
|
|||
//捐赠弹窗
|
|||
function donation(){ |
|||
layer.tab({ |
|||
area : ['260px', '367px'], |
|||
tab : [{ |
|||
title : "微信", |
|||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/wechat.jpg'></div>" |
|||
},{ |
|||
title : "支付宝", |
|||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/alipay.jpg'></div>" |
|||
}] |
|||
}) |
|||
} |
|||
|
|||
//图片管理弹窗
|
|||
function showImg(){ |
|||
$.getJSON('/cms/json/images.json', function(json){ |
|||
var res = json; |
|||
layer.photos({ |
|||
photos: res, |
|||
anim: 5 |
|||
}); |
|||
}); |
|||
} |
|||
@ -0,0 +1,327 @@ |
|||
var tvBlackBgColor = '#f5f5f5' // 黑色背景色
|
|||
var tvIntervalList = ['1', '5', '15', '30', '60', '240', 'D', 'W'] // 所有周期
|
|||
var tvIntradayMultipliers = ['1', '5', '15', '30', '60', '240'] // 日内周期
|
|||
var realtimeFlag = false; |
|||
var kcCurrentData = {}; |
|||
var lastBarTime = parseInt(Date.now() / 1000); |
|||
var loadMoreFlag = false; |
|||
/** |
|||
* 一个对象,往上面挂[id]: callback; |
|||
* id为键,对应一个请求历史数据的请求, |
|||
* callback是该请求历史数据返回的回调函数, |
|||
* 且回调函数会延时清理自身过期id callback |
|||
* { |
|||
* 1: function(){} |
|||
* 2: function(){} |
|||
* } |
|||
*/ |
|||
var kcHistoryKeyId = 1 // 自增id,本地维护
|
|||
var kcHistoryCallbackMap = {} |
|||
|
|||
var kcSocket = null // websocket 实例
|
|||
var kcSubscribeId = 3601 // 自增id, 本地维护
|
|||
var kcChart = null; |
|||
|
|||
// 获取当前交易对 如BTC/USDT
|
|||
function getSymbol() { |
|||
return kcCurrentData.symbol || (kcCurrentData.coinSymbol + '/' + kcCurrentData.baseSymbol) |
|||
} |
|||
|
|||
|
|||
// 设置可见K线范围
|
|||
function setKLineVisibleRange(lastBarTime_t, barsCount) { |
|||
var count = barsCount || 300 // 显示几条k线
|
|||
var interval = kcCurrentData.interval |
|||
var to = parseInt(lastBarTime_t) // 历史数据的最后一条柱子的时间
|
|||
var toNum = 20 // 多显示几条k线距离
|
|||
var seconds = getSecondsByInterval(interval); // 秒数
|
|||
var options = { |
|||
from: to - (seconds * count), |
|||
to: to, // 可见的结束时间,因为结束时间可能不是当前时间,为了与右边价格刻度有一点距离所以加toNum条柱子的时间
|
|||
interval: seconds |
|||
} |
|||
return options; |
|||
} |
|||
|
|||
// 周期转换为秒
|
|||
function getSecondsByInterval(interval) { |
|||
// 周期 ['1', '5', '15', '30', '60', '240', 'D', 'W']
|
|||
interval = interval || kcCurrentData.interval; |
|||
var map = { |
|||
'1': 60, |
|||
'5': 60 * 5, |
|||
'15': 60 * 15, |
|||
'30': 60 * 30, |
|||
'60': 60 * 60, |
|||
'240': 60 * 240, |
|||
'D': 60 * 60 * 24, |
|||
'W': 60 * 60 * 24 * 7 |
|||
} |
|||
return map[interval + ''] |
|||
} |
|||
|
|||
function loadMoreKline(data, is_first, key){ |
|||
if(key == kcHistoryKeyId) { |
|||
is_first = is_first || false; |
|||
if (is_first) { |
|||
kcChart.clearData(); |
|||
} |
|||
if (data != null || data != '' || data != undefined) { |
|||
var dataArr = []; |
|||
var dataArr_index = 0; |
|||
$.each(data, function (index, item) { |
|||
try { |
|||
if (typeof item == 'string') { |
|||
item = JSON.parse(item); |
|||
} |
|||
dataArr[dataArr_index] = { |
|||
timestamp: Number(item[0] * 1000), |
|||
open: Number(item[1]), |
|||
high: Number(item[3]), |
|||
low: Number(item[4]), |
|||
close: Number(item[2]), |
|||
volume: Number(item[5]) |
|||
}; |
|||
// if(kcCurrentData.interval == 'D' || kcCurrentData.interval == 'W') dataArr[dataArr_index].timestamp += 57600000;
|
|||
dataArr_index++; |
|||
} catch (e) { |
|||
|
|||
} |
|||
}) |
|||
console.log(dataArr); |
|||
kcHistoryKeyId++; |
|||
if (dataArr.length <= 0) { |
|||
kcChart.applyMoreData(dataArr, false); |
|||
} else { |
|||
lastBarTime = (dataArr[0].timestamp / 1000) - getSecondsByInterval(); |
|||
console.log(lastBarTime); |
|||
kcChart.applyMoreData(dataArr, true); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
// $('.interval_btn').on('click', function(){
|
|||
// console.log('11111');
|
|||
// if(kcChart != null || kcChart != undefined){
|
|||
// var _this = $(this);
|
|||
// kcCurrentData.interval = _this.attr('data-interval');
|
|||
// // 请求历史数据
|
|||
// kcHistoryKeyId = 1;
|
|||
// var rang = setKLineVisibleRange(parseInt(Date.now() / 1000));
|
|||
// $.ajax({
|
|||
// url: "https://dfmg.dficoins.com/api/getkkline",
|
|||
// type: 'get',
|
|||
// async: false,
|
|||
// data: {
|
|||
// symbol: getSymbol(),
|
|||
// interval: getSecondsByInterval(kcCurrentData.interval),
|
|||
// times: kcHistoryKeyId,
|
|||
// from: rang.from,
|
|||
// to: rang.to + (365 * 86400)
|
|||
// },
|
|||
// beforeSend: function(){
|
|||
// loading_index = layer.load(1, {
|
|||
// shade: [0.1, '#fff'] //0.1透明度的白色背景
|
|||
// });
|
|||
// },
|
|||
// success:function (result) { //成功回调
|
|||
// console.log(result);
|
|||
// if(result.status){
|
|||
// loadMoreKline(result.data, true, result.code);
|
|||
// $('.interval_btn').removeClass('active');
|
|||
// _this.addClass('active');
|
|||
// }else{
|
|||
|
|||
// }
|
|||
// layer.close(loading_index);
|
|||
// },
|
|||
// error: function(xhr){
|
|||
// layer.close(loading_index);
|
|||
// }
|
|||
// });
|
|||
// }
|
|||
// })
|
|||
|
|||
|
|||
// 初始化tv
|
|||
function initKlineChart() { |
|||
|
|||
kcChart = klinecharts.init(kcCurrentData.containerId); |
|||
kcChart.setTimezone(kcCurrentData.timezone); |
|||
kcChart.setOffsetRightSpace(20); |
|||
// 创建一个主图指标
|
|||
kcChart.createTechnicalIndicator({ name: 'VOL', calcParams: [10], styles: { margin: { top: 0.2, bottom: 2 } } }) |
|||
kcChart.createTechnicalIndicator({ |
|||
name: 'MA', |
|||
shortName: 'MA', |
|||
calcParams: [10, 20, 30], |
|||
dragEnabled: true, |
|||
plots: [ |
|||
{ key: 'ma1', title: 'MA10: ', type: 'line' }, |
|||
{ key: 'ma2', title: 'MA20: ', type: 'line' }, |
|||
{ key: 'ma3', title: 'MA30: ', type: 'line' } |
|||
], |
|||
// 当计算参数改变时,希望提示的和参数一样,即title的值需要改变
|
|||
regeneratePlots: (params) => { |
|||
return params.map((p, i) => { |
|||
return { key: `ma${i + 1}`, title: `MA${p}: `, type: 'line' } |
|||
}) |
|||
}, |
|||
// 计算结果
|
|||
calcTechnicalIndicator: (kLineDataList, { params, plots }) => { |
|||
// 注意:返回数据个数需要和kLineDataList的数据个数一致,如果无值,用{}代替即可。
|
|||
// 计算参数最好取回调参数params,如果不是,后续计算参数发生变化的时候,这里计算不能及时响应
|
|||
const closeSums = [] |
|||
return kLineDataList.map((kLineData, i) => { |
|||
const ma = {} |
|||
const close = kLineData.close |
|||
params.forEach((param, j) => { |
|||
closeSums[j] = (closeSums[j] || 0) + close |
|||
if (i >= param - 1) { |
|||
ma[plots[j].key] = closeSums[j] / param |
|||
closeSums[j] -= dataList[i - (param - 1)].close |
|||
} |
|||
}) |
|||
// 如果有值的情况下,这里每一项的数据格式应该是 { ma1: xxx, ma2: xxx }
|
|||
// 每个key需要和plots中的子项key对应的值一致
|
|||
return ma |
|||
}) |
|||
} |
|||
}, true, { |
|||
id: 'candle_pane', |
|||
dragEnabled: true |
|||
}); |
|||
kcChart.setPriceVolumePrecision(kcCurrentData.coinScale, kcCurrentData.volumeScale); |
|||
kcChart.loadMore(function () { |
|||
setTimeout(function(){ |
|||
if(loadMoreFlag) { |
|||
loadMoreFlag = false; |
|||
var rang = setKLineVisibleRange(lastBarTime); |
|||
$.ajax({ |
|||
url: "https://dfmg.dficoins.com/api/getkkline", |
|||
type: 'get', |
|||
async: false, |
|||
data: { |
|||
symbol: getSymbol(), |
|||
interval: getSecondsByInterval(kcCurrentData.interval), |
|||
times: kcHistoryKeyId, |
|||
from: rang.from, |
|||
to: rang.to |
|||
}, |
|||
success: function (result) { //成功回调
|
|||
console.log(result); |
|||
if (result.status) { |
|||
loadMoreKline(result.data, false, result.code); |
|||
loadMoreFlag = true; |
|||
} else { |
|||
|
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}, kcHistoryKeyId == 1 ? 500 : 10); |
|||
|
|||
}) |
|||
kcChart.setStyleOptions({ |
|||
// 蜡烛图
|
|||
candle: { |
|||
// 提示
|
|||
tooltip: { |
|||
// 'always' | 'follow_cross' | 'none'
|
|||
showRule: 'always', |
|||
// 'standard' | 'rect'
|
|||
showType: 'rect', |
|||
labels: [ |
|||
langData[kcCurrentData.language].time, |
|||
langData[kcCurrentData.language].open, |
|||
langData[kcCurrentData.language].close, |
|||
langData[kcCurrentData.language].high, |
|||
langData[kcCurrentData.language].low, |
|||
langData[kcCurrentData.language].volume |
|||
], |
|||
values: null, |
|||
defaultValue: '--', |
|||
rect: { |
|||
paddingLeft: 0, |
|||
paddingRight: 0, |
|||
paddingTop: 0, |
|||
paddingBottom: 6, |
|||
offsetLeft: 8, |
|||
offsetTop: 20, |
|||
offsetRight: 8, |
|||
borderRadius: 4, |
|||
borderSize: 1, |
|||
borderColor: '#3f4254', |
|||
backgroundColor: 'rgba(17, 17, 17, .3)' |
|||
}, |
|||
text: { |
|||
size: 12, |
|||
family: 'Helvetica Neue', |
|||
weight: 'normal', |
|||
color: '#fff', |
|||
marginLeft: 8, |
|||
marginTop: 6, |
|||
marginRight: 8, |
|||
marginBottom: 0 |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
var rang = setKLineVisibleRange(lastBarTime); |
|||
$.ajax({ |
|||
url: "https://dfmg.dficoins.com/api/getkkline", |
|||
type: 'get', |
|||
async: false, |
|||
data: { |
|||
symbol: getSymbol(), |
|||
interval: getSecondsByInterval(kcCurrentData.interval), |
|||
times: kcHistoryKeyId, |
|||
from: rang.from, |
|||
to: rang.to + (365 * 86400) |
|||
}, |
|||
beforeSend: function(){ |
|||
loading_index = layer.load(1, { |
|||
shade: [0.1, '#fff'] //0.1透明度的白色背景
|
|||
}); |
|||
}, |
|||
success:function (result) { //成功回调
|
|||
console.log(result); |
|||
if(result.status){ |
|||
loadMoreKline(result.data, true, result.code); |
|||
loadMoreFlag = true; |
|||
$('.interval_btn').removeClass('active'); |
|||
$('.interval_btn[data-interval="' + result.msg + '"]').addClass('active'); |
|||
}else{ |
|||
layer.msg(result.msg, {icon: 2}); |
|||
} |
|||
layer.close(loading_index); |
|||
}, |
|||
error: function(xhr){ |
|||
layer.close(loading_index); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 先引入这个JS文件,然后在websocket连接成功后,调用这个方法,启动TradingView
|
|||
/** |
|||
* 启动 |
|||
* @param {Object} _ws 已经连接成功的Websocket对象 |
|||
* @param {Object} _config Tv配置项,计价币种和交易币种必须要传入 |
|||
*/ |
|||
function kcStart(_config){ |
|||
// 重要:k线图配置的重要数据,当前k线维护的一份数据,k线切换时,改变周期时都要变对应的值
|
|||
kcCurrentData = { |
|||
containerId: _config.containerId, |
|||
baseSymbol: _config.baseSymbol, // 计价币种
|
|||
coinSymbol: _config.coinSymbol, // 交易币种
|
|||
symbol: _config.symbol || '--', |
|||
coinScale: _config.coinScale || 2, // 计价币种精度
|
|||
volumeScale: _config.volumeScale || 2, // 成交量精度保留
|
|||
interval: _config.interval || '15', // 15分钟
|
|||
bgColor: _config.bgColor || tvBlackBgColor, // 当前选择背景色
|
|||
language: _config.language || 'en', |
|||
timezone: _config.timezone || 'Asia/Shanghai' |
|||
} |
|||
initKlineChart() |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
var langData = { |
|||
zh_TW: { |
|||
time: '', |
|||
open: '開', |
|||
close: '收', |
|||
high: '高', |
|||
low: '低', |
|||
volume: '成交量' |
|||
}, |
|||
en: { |
|||
time: '', |
|||
open: 'open', |
|||
close: 'close', |
|||
high: 'high', |
|||
low: 'low', |
|||
volume: 'volume' |
|||
} |
|||
}; |
|||
@ -0,0 +1,70 @@ |
|||
p{margin:0;} |
|||
.border-circular{ border-radius: 100%; } |
|||
.border-circularpx{ border-radius: 100px; } |
|||
.p-grey, .span-grey{ color: grey; } |
|||
.p-white, .span-white{ color: white; } |
|||
.p-black, .span-black{ color: black; } |
|||
.div-border{ border:1px solid #cfcfcf; } |
|||
.border-top-grey{ border-top: 0.5px solid rgba(128,128,128,0.3); } |
|||
.border-bottom-grey{ border-bottom: 0.5px solid rgba(128,128,128,0.3); } |
|||
.border-right-grey{ border-right: 0.5px solid rgba(128,128,128,0.3); } |
|||
.border-left-grey{ border-left: 0.5px solid rgba(128,128,128,0.3); } |
|||
.pcolor1, .span-color1{color: #FF5722;} |
|||
.pcolor2, .span-color2{color: #009688;} |
|||
.pcolor3, .span-color3{color: #FBDECC;} |
|||
.pcolor4, .span-color4{color: #a38983;} |
|||
.pcolor5, .span-color5{color: #FD7835;} |
|||
.pcolor6, .span-color6{color: #664303;} |
|||
.p100, .span-100{font-size: 100%;} |
|||
.p110, .span-110{font-size: 110%;} |
|||
.p120, .span-120{font-size: 120%;} |
|||
.p90, .span-90{font-size: 90%;} |
|||
.p80, .span-80{font-size: 80%;} |
|||
.p70, .span-70{font-size: 70%;} |
|||
.p60, .span-60{font-size: 60%;} |
|||
.p140, .span-140{ font-size: 140%; } |
|||
.p150, .span-150{ font-size: 150%; } |
|||
.p170, .span-170{ font-size: 170%; } |
|||
.p200, .span-200{ font-size: 200%; } |
|||
.span-required{color:red;} |
|||
.input-w1{width:300px;} |
|||
.bgd-color-grey{background-color: rgb(241,241,241);} |
|||
.bgd-color-white{background-color: white;} |
|||
.bgd-color3{background-color: #FBDECC;} |
|||
.bgd-color4{background-color: #FD7835;} |
|||
.bgd-color5{background-color: #fff3c8;} |
|||
input[type=file] { display: none; } |
|||
.a0{color:white;cursor: pointer;} |
|||
.a0:hover{color:white;} |
|||
.a1{color:#009688;cursor: pointer;} |
|||
.a1:hover{color:#009688;} |
|||
.a2{color:#1E9FFF;cursor: pointer;} |
|||
.a2:hover{color:#1E9FFF;} |
|||
tr{width:100%;} |
|||
/*input[disabled]{background-color: rgba(136, 136, 136, 0.4);}*/ |
|||
.h-over{height:auto;overflow: hidden;} |
|||
/*tp_trace*/ |
|||
#think_page_trace_open{z-index:1;} |
|||
/**/ |
|||
.iconfont{cursor: pointer;} |
|||
.default-badge{border: 1.5px solid #5FB878;color:#5FB878;border-radius: 5px;padding:2px 3px;} |
|||
|
|||
.notify-flag{width:10px;height:10px;background-color: #FF5722;position: absolute;top:10px;right:15px;z-index:1501; |
|||
-webkit-animation-duration: 1.3s; |
|||
animation-duration: 1.3s; |
|||
-webkit-animation-fill-mode: both; |
|||
animation-fill-mode: both} |
|||
.es-list { max-height: 200px !important; z-index:1001;background-color: white;overflow-y:auto; display: none;position: absolute;margin-top:3px;border: 1px solid #C9C9C9; } |
|||
.es-list li{padding: 10px;border-bottom: 0.5px solid rgba(128,128,128,0.3);} |
|||
/* 隐藏时间范围选择器中的选择时间时的滚动条 */ |
|||
.laydate-time-list li ol::-webkit-scrollbar{display: none;} |
|||
|
|||
.select2-container--default.select2-container--open{ z-index:2002; } |
|||
.select2-input{ width:100%;height:38px; } |
|||
|
|||
|
|||
.layui-table-view .layui-table-box .layui-table thead tr .layui-table-cell span { font-weight: bold; } /* laytable 标题行样式 */ |
|||
|
|||
.mui-popup.mui-popup-in{-moz-box-shadow:3px 3px 12px #333333; -webkit-box-shadow:3px 3px 12px #333333; box-shadow:3px 3px 12px #333333;} |
|||
|
|||
.p-block-input{line-height: 36px;} |
|||
@ -0,0 +1,174 @@ |
|||
/*公共样式*/ |
|||
.childrenBody{ padding:10px;} |
|||
.layui-table-view{ margin:0 !important;} |
|||
.magb0{margin-bottom:0 !important;} |
|||
.magt0{ margin-top:0 !important;} |
|||
.magt3{ margin-top:3px !important;} |
|||
.magt10{ margin-top:10px !important;} |
|||
.magb15{ margin-bottom:15px !important;} |
|||
.magt30{ margin-top:30px !important;} |
|||
.layui-left{text-align:left;} |
|||
.layui-block{ width:100% !important;} |
|||
.layui-center{text-align:center;} |
|||
.layui-right{text-align:right;} |
|||
.layui-elem-quote.title{ padding:10px 15px; margin-bottom:0;} |
|||
.layui-bg-white{ background-color:#fff !important;} |
|||
.border{ border:1px solid #e6e6e6 !important; padding:10px; border-top:none;} |
|||
.main_btn .layui-btn{ margin:2px 5px 2px 0;} |
|||
.layui-timeline-axis{ left:-4px;} |
|||
.layui-elem-quote{ word-break: break-all;} |
|||
.icons li,.icons li:hover,.loginBody .seraph,.loginBody .seraph:hover,.loginBody .layui-form-item.layui-input-focus label,.loginBody .layui-form-item label,.loginBody .layui-form-item.layui-input-focus input,.loginBody .layui-form-item input{transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;} |
|||
.icons li:hover i,.icons li i{transition: font-size 0.3s ease-in-out;-webkit-transition: font-size 0.3s ease-in-out;} |
|||
.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;} |
|||
.loginBody .layui-input-focus .layui-input::-moz-placeholder{transition: color 0.2s linear 0.2s;} |
|||
.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{transition: color 0.2s linear 0.2s;} |
|||
.loginBody .layui-input-focus .layui-input::placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;} |
|||
/*后台首页*/ |
|||
.panel_box{ margin-bottom:5px;} |
|||
.panel{ text-align:center; height:90px;} |
|||
.panel_box a{display:block; border-radius:5px; overflow:hidden; height:80px; background-color:#f2f2f2 !important; } |
|||
.panel_icon{ width:40%; display: inline-block; line-height:80px; float:left; position:relative; height:100%;} |
|||
.panel_icon i{ font-size:40px !important; color:#fff; display: inline-block;} |
|||
.panel_word{ width:60%; display: inline-block; float:right; margin:13px 0 14px; } |
|||
.panel_word span{ font-size:25px; display:block; height:34px; } |
|||
.panel .loginTime{ font-size:15px; color:#1E9FFF; line-height:17px;} |
|||
.panel em{ font-style:normal;} |
|||
.history_box{ min-height:500px; height:500px; overflow-y:scroll; padding:10px !important;} |
|||
.history_box .layui-timeline .layui-timeline-item:last-child{ padding-bottom:0;} |
|||
@media screen and (max-width:1200px) { |
|||
.history_box { height: auto !important; overflow-y: inherit; } |
|||
} |
|||
/*修改密码*/ |
|||
.pwdTips{ min-height:auto; margin:40px 0 15px 110px;} |
|||
/*个人资料*/ |
|||
form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; } |
|||
.user_right{ text-align: center; } |
|||
.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;} |
|||
.user_right img#userFace{ width:200px; height:200px; margin-top:20px; cursor:pointer; box-shadow:0 0 50px #44576b; } |
|||
.userAddress.layui-form-item .layui-input-inline{ width:23%; } |
|||
.userAddress.layui-form-item .layui-input-inline:last-child{ margin-right:0; } |
|||
/*下拉多选*/ |
|||
.layui-form-item select[multiple]+.layui-form-select dd{ padding:0;} |
|||
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary]{ margin:0 !important; display:block; line-height:36px !important; position:relative; padding-left:26px;} |
|||
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] span{line-height:36px !important; float:none;} |
|||
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] i{ position:absolute; left:10px; top:0; margin-top:9px;} |
|||
.multiSelect{ line-height:normal; height:auto; padding:4px 10px; overflow:hidden;min-height:38px; margin-top:-38px; left:0; z-index:99;position:relative;background:none;} |
|||
.multiSelect a{ padding:2px 5px; background:#908e8e; border-radius:2px; color:#fff; display:block; line-height:20px; height:20px; margin:2px 5px 2px 0; float:left;} |
|||
.multiSelect a span{ float:left;} |
|||
.multiSelect a i{ float:left; display:block; margin:2px 0 0 2px; border-radius:2px; width:8px; height:8px; background:url(../images/close.png) no-repeat center; background-size:65%; padding:4px;} |
|||
.multiSelect a i:hover{ background-color:#545556;} |
|||
/*404页面*/ |
|||
.noFind{ text-align:center; padding-top:2%;} |
|||
.noFind i{ line-height:1em; font-size:12em !important; color: #393D50; display:block;} |
|||
.ufo{ text-align:center; height:100%; position:relative;} |
|||
.noFind .page_icon,.noFind .ufo_icon{ opacity:1; position:absolute; left:50%; transform:translateX(-50%); -ms-transform:translateX(-50%); -moz-transform:translateX(-50%); -webkit-transform:translateX(-50%); -o-transform:translateX(-50%);} |
|||
.noFind .page_icon{ top:300px; animation:pageGo 0.3s ease-in 0.3s forwards; -webkit-animation:pageGo 0.3s ease-in 0.3s forwards; -o-animation:pageGo 0.3s ease-in 0.3s forwards; -moz-animation:pageGo 0.3s ease-in 0.3s forwards;} |
|||
.noFind .ufo_icon{ top:100px; animation:ufo 1s ease-in 0.6s forwards; -webkit-animation:ufo 1s ease-in 0.6s forwards; -o-animation:ufo 1s ease-in 0.6s forwards; -moz-animation:ufo 1s ease-in 0.6s forwards;} |
|||
.page404{ margin-top:10%; opacity:0; font-size:0; animation:page404 0.5s ease-in 1.7s forwards; -webkit-animation:page404 0.5s ease-in 1.7s forwards; -o-animation:page404 0.5s ease-in 1.7s forwards; -moz-animation:page404 0.5s ease-in 1.7s forwards;} |
|||
.page404 p{ font-size: 20px; font-weight: 300; color: #999;} |
|||
/*页面被吸走*/ |
|||
@keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top: 100px;}} |
|||
@-moz-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}} |
|||
@-webkit-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}} |
|||
@-o-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}} |
|||
/*ufo飞走*/ |
|||
@keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}} |
|||
@-moz-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}} |
|||
@-webkit-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}} |
|||
@-o-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}} |
|||
/*404显示*/ |
|||
@keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}} |
|||
@-moz-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}} |
|||
@-webkit-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}} |
|||
@-o-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}} |
|||
/*图标管理*/ |
|||
.iconsLength{ margin:0 5px;} |
|||
.icons li{ margin:5px 0; text-align:center; height:120px; cursor:pointer;} |
|||
.icons li i{ display:block; font-size:35px; margin:10px 0; line-height:60px; height:60px;} |
|||
.icons li:hover{ background:rgba(13,10,49,.9); border-radius:5px; color:#fff;} |
|||
.icons li:hover i{ font-size:50px;} |
|||
#copyText{ width:0;height:0; opacity:0; position:absolute; left:-9999px; top:-9999px;} |
|||
/*开发文档*/ |
|||
h2.method{ font-size:18px; line-height:45px; padding-left:5px;} |
|||
/*登录*/ |
|||
.loginHtml,.loginBody{ height:100%;} |
|||
/*.loginBody{ background:url("../images/login_bg.jpg") no-repeat center center;}*/ |
|||
.loginBody form.layui-form{ padding:0 20px; width:300px; height:auto; position:absolute; left:50%; top:50%; margin:-150px 0 0 -150px; -webkit-box-sizing:border-box;-moz-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box; background:#fff;-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; box-shadow:0 0 50px #009688;} |
|||
.login_face{ margin:-55px auto 20px; width:100px; height:100px; -webkit-border-radius:50%; -moz-border-radius:50%; border-radius:50%; border:5px solid #fff; overflow:hidden;box-shadow:0 0 30px #009688;} |
|||
.login_face img{ width:100%;} |
|||
.loginBody .layui-form-item{ position:relative;} |
|||
.loginBody .layui-form-item label{ position:absolute; color:#757575; left:10px; top:9px; line-height:20px; background:#fff; padding:0 5px; font-size:14px; cursor:text;} |
|||
.loginBody .layui-form-item.layui-input-focus label{ top:-10px; font-size:12px; color:#ff6700;} |
|||
.loginBody .layui-form-item.layui-input-active label{ top:-10px; font-size:12px;} |
|||
.loginBody .layui-input::-webkit-input-placeholder{color:#fff;} |
|||
.loginBody .layui-input::-moz-placeholder{color:#fff;} |
|||
.loginBody .layui-input:-ms-input-placeholder{color:#fff;} |
|||
.loginBody .layui-input::placeholder{color:#fff;} |
|||
.loginBody .layui-form-item.layui-input-focus input{ border-color:#ff6700 !important;} |
|||
.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{color:#757575;} |
|||
.loginBody .layui-input-focus .layui-input::-moz-placeholder{color:#757575;} |
|||
.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{color:#757575;} |
|||
.loginBody .layui-input-focus .layui-input::placeholder{color:#757575;} |
|||
.loginBody .seraph{ font-size:30px; text-align:center;} |
|||
.loginBody .seraph.icon-qq:hover{ color:#0288d1;} |
|||
.loginBody .seraph.icon-wechat:hover{ color:#00d20d;} |
|||
.loginBody .seraph.icon-sina:hover{ color:#d32f2f;} |
|||
.imgCode{ position:relative;} |
|||
#imgCode img{ position:absolute; top:1px; right:1px; cursor:pointer;} |
|||
/*用户等级*/ |
|||
.layui-table-view .layui-table span.seraph{ font-size:25px !important;} |
|||
.vip1{ color:#994a2b;} |
|||
.vip2{ color:#899396;} |
|||
.vip3{ color:#bd6a08;} |
|||
.vip4{ color:#a3b8c4;} |
|||
.vip5{ color:#63c3ea;} |
|||
.vip6{ color:#b563ed;} |
|||
.vip7{ color:#ff9831;} |
|||
.vip8{ color:#A757A8;} |
|||
.vip9{ color:#0ff;} |
|||
.vip10{ color:#f00;} |
|||
/*新闻添加*/ |
|||
.layui-elem-quote .layui-inline{ margin:3px 0;} |
|||
.category .layui-form-checkbox{ margin:5px 0;} |
|||
.border .layui-form-item{ margin-bottom:10px;} |
|||
.border .layui-form-label{ width:50px;} |
|||
.border .layui-form-label i{ position:absolute; top:10px; left:3px;} |
|||
.border .layui-input-block{ margin-left:80px;} |
|||
.thumbBox{ height:151px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; position:relative; text-align:center; line-height:153px;} |
|||
.thumbImg{ max-width:100%; max-height:100%; border:none;} |
|||
.thumbBox:after{ position:absolute; width:100%; height:100%;line-height:153px; z-index:-1; text-align:center; font-size:20px; content:"缩略图"; left:0; top:0; color:#9F9F9F;} |
|||
/*图片管理*/ |
|||
#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;} |
|||
#Images li img{ width:100%; cursor:pointer; } |
|||
#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; } |
|||
#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; width:74%; position:relative;} |
|||
#Images li .operate .check .layui-form-checkbox[lay-skin=primary]{ width:100%;} |
|||
#Images li .operate .check .layui-form-checkbox[lay-skin=primary] span{ padding:0 5px 0 25px; width:100%; box-sizing:border-box;} |
|||
#Images li .operate .check .layui-form-checkbox[lay-skin=primary] i{position:absolute; left:0; top:0;} |
|||
#Images li .operate .img_del{ float:right; margin:9px 11px 0 0; font-size: 22px !important; cursor:pointer; } |
|||
#Images li .operate .img_del:hover{ color:#f00; } |
|||
@media screen and (max-width:1050px){#Images li{ width:24%;}} |
|||
@media screen and (max-width: 750px){#Images li{ width:49%;}} |
|||
@media screen and (max-width:432px){#Images li{ width:99%;}} |
|||
/*系统日志*/ |
|||
.layui-btn-green{ background-color:#5FB878 !important;} |
|||
/*友情链接*/ |
|||
.linkLogo{ width:80px; height:40px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; margin:0 auto; position:relative; text-align:center; line-height:42px;} |
|||
.linkLogoImg{ max-width:90%; max-height:90%;} |
|||
.linkLogo:after{ position:absolute; width:100%; height:100%;line-height:42px; z-index:-1; text-align:center; font-size:12px; content:"上传LOGO"; left:0; top:0; color:#9F9F9F;} |
|||
.linksAdd .layui-form-label{ width:60px; padding-left:0;} |
|||
.linksAdd .layui-input-block{ margin-left:75px;} |
|||
.linksAdd .layui-input-block input{ padding:0 5px;} |
|||
/*响应式*/ |
|||
@media screen and (max-width:450px) { |
|||
#userFaceBtn{ height: 30px;line-height: 30px; padding: 0 10px; font-size: 12px;} |
|||
.user_right img#userFace{ width:100px; height:100px; margin-top:0;} |
|||
.layui-col-xs12 .layui-form-label{ width:60px; padding-left:0;} |
|||
.layui-col-xs12 .layui-input-block,.layui-col-xs12 .layui-input-inline{ margin-left:75px;} |
|||
.layui-col-xs12 .layui-input-inline{ left:0 !important; width:auto !important;} |
|||
.noFind{ padding-top:0;} |
|||
*[pc]{ display:none;} |
|||
} |
|||
input[type=file] { |
|||
display: none; |
|||
} |
|||
@ -0,0 +1,762 @@ |
|||
/** 自定义字体 **/ |
|||
/** 这里使用在线字体,如果需要离线包,请看 font/README.md **/ |
|||
@font-face { |
|||
font-family: 'soul-icon'; /* project id 677836 */ |
|||
src: url('//at.alicdn.com/t/font_677836_jwq362m0tt.eot'); |
|||
src: url('//at.alicdn.com/t/font_677836_jwq362m0tt.eot?#iefix') format('embedded-opentype'), |
|||
url('//at.alicdn.com/t/font_677836_jwq362m0tt.woff2') format('woff2'), |
|||
url('//at.alicdn.com/t/font_677836_jwq362m0tt.woff') format('woff'), |
|||
url('//at.alicdn.com/t/font_677836_jwq362m0tt.ttf') format('truetype'), |
|||
url('//at.alicdn.com/t/font_677836_jwq362m0tt.svg#iconfont') format('svg'); |
|||
} |
|||
|
|||
.soul-icon { |
|||
font-family:"soul-icon" !important; |
|||
font-size: 16px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
|
|||
.soul-icon-filter:before { content: "\e60b"; } |
|||
.soul-icon-filter-asc:before { content: "\e768"; } |
|||
.soul-icon-filter-desc:before { content: "\e767"; } |
|||
.soul-icon-asc:before { content: "\e6af"; } |
|||
.soul-icon-desc:before { content: "\e6ae"; } |
|||
.soul-icon-all-check:before { content: "\e670"; } |
|||
.soul-icon-invert-check:before { content: "\e614"; } |
|||
.soul-icon-fold:before { content: "\e760"; } |
|||
.soul-icon-unfold:before { content: "\e611"; } |
|||
.soul-icon-delete:before { content: "\e600"; } |
|||
.soul-icon-download:before { content: "\e601"; } |
|||
.soul-icon-drop-list:before { content: "\e6a3"; } |
|||
.soul-icon-query:before { content: "\e66d"; } |
|||
/* 全选*/ |
|||
.soul-icon-quanxuan:before { content: "\e623"; } |
|||
.soul-icon-qingkong:before { content: "\e63e"; } |
|||
.soul-icon-fanxuan:before { content: "\e614"; } |
|||
|
|||
/*最大化*/ |
|||
.soul-icon-min:before { content: "\e656"; } |
|||
.soul-icon-max:before { content: "\e61b"; } |
|||
|
|||
|
|||
/* 配色方案*/ |
|||
.layui-red { |
|||
color: #FF5722 |
|||
} |
|||
.layui-orange { |
|||
color: #FFB800 |
|||
} |
|||
.layui-green { |
|||
color: #009688 |
|||
} |
|||
.layui-cyan { |
|||
color: #2F4056 |
|||
} |
|||
.layui-blue { |
|||
color: #1E9FFF |
|||
} |
|||
.layui-black { |
|||
color: #393D49 |
|||
} |
|||
.layui-gray { |
|||
color: #eee |
|||
} |
|||
.layui-firebrick { |
|||
color: firebrick; |
|||
} |
|||
.layui-deeppink { |
|||
color: deeppink; |
|||
} |
|||
.layui-blueviolet { |
|||
color: blueviolet; |
|||
} |
|||
|
|||
.soul-condition [class*="layui-col-"] { |
|||
margin-top: 10px; |
|||
} |
|||
/* 表格排序样式*/ |
|||
.soul-edge { |
|||
display: inline-block; |
|||
width: 0; |
|||
height: 0; |
|||
border-width: 6px; |
|||
border-style: dashed; |
|||
border-color: transparent; |
|||
overflow: hidden |
|||
} |
|||
.soul-table-sort { |
|||
width: 10px; |
|||
height: 20px; |
|||
margin-left: 5px; |
|||
cursor: pointer !important; |
|||
position: relative; |
|||
display: inline-block; |
|||
} |
|||
|
|||
.soul-table-sort .soul-edge { |
|||
position: absolute; |
|||
left: 5px; |
|||
border-width: 5px |
|||
} |
|||
|
|||
.soul-table-sort .soul-table-sort-asc { |
|||
top: 10px; |
|||
border-top: none; |
|||
border-bottom-style: solid; |
|||
border-bottom-color: #b2b2b2 |
|||
} |
|||
|
|||
.soul-table-sort .soul-table-sort-asc:hover { |
|||
border-bottom-color: #666 |
|||
} |
|||
|
|||
.soul-table-sort .soul-table-sort-desc { |
|||
bottom: -2px; |
|||
border-bottom: none; |
|||
border-top-style: solid; |
|||
border-top-color: #b2b2b2 |
|||
} |
|||
|
|||
.soul-table-sort .soul-table-sort-desc:hover { |
|||
border-top-color: #666 |
|||
} |
|||
|
|||
.soul-table-sort[soul-sort=asc] .soul-table-sort-asc { |
|||
border-bottom-color: #000 |
|||
} |
|||
|
|||
.soul-table-sort[soul-sort=desc] .soul-table-sort-desc { |
|||
border-top-color: #000 |
|||
} |
|||
|
|||
.multiOption { |
|||
display: inline-block; |
|||
padding: 0 5px; |
|||
cursor: pointer; |
|||
color: #999; |
|||
} |
|||
/*表格筛选*/ |
|||
.soul-table-filter { |
|||
line-height: 20px; |
|||
color: #b2b2b2; |
|||
cursor: pointer; |
|||
margin-left: 5px; |
|||
} |
|||
.soul-table-filter .soul-icon-filter-asc,.soul-table-filter .soul-icon-filter-desc { |
|||
display: none; |
|||
} |
|||
.soul-table-filter[lay-sort="asc"] .soul-icon-filter-asc{ |
|||
display: block; |
|||
color: #000000; |
|||
} |
|||
.soul-table-filter[lay-sort="asc"] .soul-icon-filter,.soul-table-filter[lay-sort="asc"] .soul-icon-filter-desc{ |
|||
display: none; |
|||
} |
|||
|
|||
.soul-table-filter[lay-sort="desc"] .soul-icon-filter-desc{ |
|||
display: block; |
|||
color: #000000; |
|||
} |
|||
.soul-table-filter[lay-sort="desc"] .soul-icon-filter,.soul-table-filter[lay-sort="desc"] .soul-icon-filter-asc{ |
|||
display: none; |
|||
} |
|||
.soul-table-filter[soul-filter="true"] i { |
|||
color: #009688!important; |
|||
} |
|||
|
|||
|
|||
[id^=main-list], [id^=soul-columns], [id^=soul-dropList], [id^=soul-condition], [id^=soul-bf-prefix], [id^=soul-bf-column], [id^=soul-bf-type], [id^=soul-bf-cond2] { |
|||
display: inline-block; |
|||
position: absolute; |
|||
z-index: 2147483647; |
|||
background-color: white; |
|||
max-height: 200px; |
|||
min-width: 160px; |
|||
max-width: 300px; |
|||
overflow-y: auto; |
|||
border: 1px solid #e6e6e6; |
|||
border-radius: 5px; |
|||
box-shadow: 2px 2px 4px -2px rgba(0,0,0,.2); |
|||
} |
|||
[id^=main-list] { |
|||
max-height: initial; |
|||
} |
|||
[id^=soul-condition] { |
|||
overflow-y: visible; |
|||
max-height: initial; |
|||
min-width: 285px; |
|||
padding: 5px; |
|||
} |
|||
.staticDate{ margin-left: -271px; } |
|||
|
|||
[id^=soul-condition] .layui-laydate-header { |
|||
padding: 4px 70px 5px |
|||
} |
|||
[id^=soul-condition] hr{ |
|||
margin: 5px 0; |
|||
} |
|||
[id^=soul-condition].soul-bf{ |
|||
min-width: 150px; |
|||
} |
|||
[id^=soul-filter-list] ul li { |
|||
padding: 3px 10px; |
|||
cursor: pointer; |
|||
} |
|||
[id^=soul-filter-list] ul li:hover { |
|||
background-color: deepskyblue; |
|||
} |
|||
[id^=soul-filter-list] i.layui-icon { |
|||
display: inline-block; |
|||
width: 16px; |
|||
} |
|||
[id^=soul-dropList] ul { |
|||
border: 0; |
|||
max-height: 116px; |
|||
overflow-y: auto; |
|||
} |
|||
[id^=soul-dropList] ul li, [id^=soul-filter-list] [id^=soul-columns]>li{ |
|||
padding: 2px 10px; |
|||
} |
|||
[id^=soul-dropList] .check { |
|||
padding: 5px 10px; |
|||
} |
|||
.filter-search { |
|||
padding: 5px 10px 0 10px; |
|||
} |
|||
[id^=soul-condition] .layui-inline { |
|||
width: 100px; |
|||
} |
|||
[id^=soul-condition] table.condition-table tr>td { |
|||
padding: 0 3px; |
|||
} |
|||
[id^=soul-condition] table.condition-table tr>td:first-child { |
|||
min-width: 60px; |
|||
} |
|||
[id^=soul-condition] .layui-form-switch { |
|||
background-color: #1E9FFF; |
|||
border: 1px solid #1E9FFF; |
|||
width: 35px; |
|||
margin-top: 0px; |
|||
} |
|||
[id^=soul-condition] .layui-form-switch.layui-form-onswitch { |
|||
background-color: #5FB878; |
|||
border: 1px solid #5FB878; |
|||
} |
|||
[id^=soul-condition] .layui-form-switch em { |
|||
color: #fff!important; |
|||
} |
|||
[id^=soul-condition] .layui-form-switch i { |
|||
background-color: #fff; |
|||
} |
|||
[data-type^=date][class$=Condition] { |
|||
width: 273px; |
|||
} |
|||
/*表格筛选*/ |
|||
[id^=soul-condition]>div{ |
|||
width: 270px; |
|||
} |
|||
|
|||
.soul-condition-title { |
|||
text-align: center; |
|||
font-weight: bolder; |
|||
} |
|||
|
|||
/*底部筛选*/ |
|||
.soul-bottom-contion { |
|||
height: 31px; |
|||
/*line-height: 29px;*/ |
|||
border-top: solid 1px #e6e6e6; |
|||
} |
|||
.soul-bottom-contion .condition-items { |
|||
display: inline-block; |
|||
width: calc(100vw - 100px); |
|||
height: 30px; |
|||
float: left; |
|||
overflow: hidden; |
|||
white-space: nowrap; |
|||
} |
|||
.soul-bottom-contion .condition-item>div { |
|||
display: inline-block; |
|||
height: 28px; |
|||
line-height: 28px; |
|||
cursor: pointer; |
|||
} |
|||
.soul-bottom-contion .condition-items .condition-item>div[class^='item-']:hover{ |
|||
text-decoration: underline; |
|||
} |
|||
.soul-bottom-contion .condition-items .condition-item{ |
|||
padding: 0 10px; |
|||
margin: 0 2px; |
|||
font-weight: bold; |
|||
border: solid 1px darkslateblue; |
|||
border-radius: 10px; |
|||
display: inline-block; |
|||
height: 28px; |
|||
position: relative; |
|||
} |
|||
.soul-bottom-contion .editCondtion { |
|||
height: 30px; |
|||
float: right; |
|||
} |
|||
.soul-bottom-contion .item-value { |
|||
min-width: 20px; |
|||
display: inline-block; |
|||
} |
|||
.soul-bottom-contion .editCondtion a { |
|||
border: hidden; |
|||
border-left: solid 1px #e6e6e6; |
|||
height: 28px; |
|||
line-height: 29px; |
|||
} |
|||
.soul-bottom-contion .condition-items .condition-item .condition-item-close { |
|||
position: absolute; |
|||
cursor: pointer; |
|||
margin-top: -8px; |
|||
} |
|||
.soul-bottom-contion .condition-items>.condition-item>.condition-item-close { |
|||
margin-top: -2px; |
|||
} |
|||
.soul-bottom-contion .condition-items .condition-item .condition-item-close:hover{ |
|||
color: red |
|||
} |
|||
.soul-bottom-contion .condition-items .condition-item .condition-item-close:before { |
|||
background: white; |
|||
border-radius: 10px; |
|||
} |
|||
.soul-edit-out { |
|||
padding: 10px; |
|||
} |
|||
[id^=soul-bf] li { |
|||
padding: 0px 10px; |
|||
height: 22px; |
|||
line-height: 22px; |
|||
color: #000; |
|||
cursor: pointer; |
|||
} |
|||
[id^=soul-bf] li.soul-bf-selected { |
|||
background-color: deepskyblue; |
|||
} |
|||
[id^=soul-bf] li:hover { |
|||
background-color: deepskyblue; |
|||
} |
|||
.soul-edit-out .tempValue { |
|||
height: 25px; |
|||
} |
|||
.soul-bf-condition-value { |
|||
display: inline; |
|||
width: 100px; |
|||
} |
|||
/*子表格*/ |
|||
.layui-table tbody tr.noHover:hover { |
|||
background-color: white; |
|||
} |
|||
|
|||
/*编辑筛选*/ |
|||
.soul-edit-out .layui-form-radio { |
|||
margin: 0; |
|||
} |
|||
.soul-edit-out ul li > div { |
|||
display: inline-block; |
|||
margin-right: 10px; |
|||
height: 25px; |
|||
vertical-align: top; |
|||
cursor: pointer; |
|||
} |
|||
.soul-edit-out ul.group { |
|||
padding-left: 50px; |
|||
} |
|||
.soul-edit-out ul.group.line { |
|||
border-left: 1px dashed grey; |
|||
} |
|||
.soul-edit-out ul li { |
|||
line-height: 25px; |
|||
} |
|||
.soul-edit-out table { |
|||
display: inline-block; |
|||
} |
|||
.soul-edit-out table td[data-type='top'] { |
|||
width: 12px; |
|||
height: 12px; |
|||
border-left: dashed 1px grey; |
|||
border-bottom: dashed 1px grey; |
|||
} |
|||
.soul-edit-out table td[data-type='bottom'] { |
|||
width: 12px; |
|||
height: 12px; |
|||
border-left: dashed 1px grey; |
|||
} |
|||
.soul-edit-out li.last>div>table td[data-type='bottom'] { |
|||
border-left: none; |
|||
} |
|||
.soul-edit-out .layui-form-switch { |
|||
background-color: #1E9FFF; |
|||
border: 1px solid #1E9FFF; |
|||
width: 35px; |
|||
margin-top: 0px; |
|||
} |
|||
.soul-edit-out .layui-form-switch em { |
|||
color: #fff!important; |
|||
} |
|||
.soul-edit-out .layui-form-switch i { |
|||
background-color: #fff; |
|||
} |
|||
.soul-edit-out .layui-form-switch.layui-form-onswitch { |
|||
background-color: #5FB878; |
|||
border: 1px solid #5FB878; |
|||
} |
|||
.soul-edit-out .delete-item { |
|||
display: none; |
|||
} |
|||
.soul-edit-out li:hover>.delete-item { |
|||
display: inline-block; |
|||
} |
|||
|
|||
/* 拖拽相关 */ |
|||
#column-remove { |
|||
position: absolute; |
|||
z-index: 2147483647; |
|||
} |
|||
.layui-table-box.no-left-border td.isDrag, .layui-table-box.no-left-border th.isDrag { |
|||
border-left: inherit!important; |
|||
} |
|||
.soul-drag-bar { |
|||
position: absolute; |
|||
top: 100px; |
|||
z-index: 200; |
|||
left: 50%; |
|||
font-weight: 900; |
|||
color: white; |
|||
box-shadow: 0 1px 20px rgba(0,0,0,.15); |
|||
text-align: center; |
|||
transform: translateX(100vw); |
|||
/*transition: transform .3s;*/ |
|||
} |
|||
.soul-drag-bar.active { |
|||
transform: translateX(-98px); |
|||
} |
|||
.soul-drag-bar > div { |
|||
display: inline-block; |
|||
padding: 10px; |
|||
cursor: crosshair; |
|||
width: 62px; |
|||
background-color: rgb(0, 150, 136, 0.5); |
|||
} |
|||
.soul-drag-bar > div.active, .soul-drag-bar[data-type='left']>div[data-type='left'], .soul-drag-bar[data-type='right']>div[data-type='right'], .soul-drag-bar[data-type='none']>div[data-type='none'] { |
|||
background-color: rgb(0, 150, 136); |
|||
} |
|||
|
|||
/* 动画 */ |
|||
.animated { |
|||
-webkit-animation-duration: 1s; |
|||
-moz-animation-duration: 1s; |
|||
-o-animation-duration: 1s; |
|||
animation-duration: 1s; |
|||
-webkit-animation-fill-mode: both; |
|||
-moz-animation-fill-mode: both; |
|||
-o-animation-fill-mode: both; |
|||
animation-fill-mode: both; |
|||
} |
|||
@-moz-keyframes fadeInLeft { |
|||
0% { |
|||
opacity: 0; |
|||
-moz-transform: translateX(-20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-moz-transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
@-o-keyframes fadeInLeft { |
|||
0% { |
|||
opacity: 0; |
|||
-o-transform: translateX(-20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-o-transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
@keyframes fadeInLeft { |
|||
0% { |
|||
opacity: 0; |
|||
transform: translateX(-20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
.animated.fadeInLeft { |
|||
-webkit-animation-name: fadeInLeft; |
|||
-moz-animation-name: fadeInLeft; |
|||
-o-animation-name: fadeInLeft; |
|||
animation-name: fadeInLeft; |
|||
} |
|||
|
|||
@-webkit-keyframes fadeOutLeft { |
|||
0% { |
|||
opacity: 1; |
|||
-webkit-transform: translateX(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-webkit-transform: translateX(-20px); |
|||
} |
|||
} |
|||
|
|||
@-moz-keyframes fadeOutLeft { |
|||
0% { |
|||
opacity: 1; |
|||
-moz-transform: translateX(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-moz-transform: translateX(-20px); |
|||
} |
|||
} |
|||
|
|||
@-o-keyframes fadeOutLeft { |
|||
0% { |
|||
opacity: 1; |
|||
-o-transform: translateX(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-o-transform: translateX(-20px); |
|||
} |
|||
} |
|||
|
|||
@keyframes fadeOutLeft { |
|||
0% { |
|||
opacity: 1; |
|||
transform: translateX(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
transform: translateX(-20px); |
|||
} |
|||
} |
|||
|
|||
.animated.fadeOutLeft { |
|||
-webkit-animation-name: fadeOutLeft; |
|||
-moz-animation-name: fadeOutLeft; |
|||
-o-animation-name: fadeOutLeft; |
|||
animation-name: fadeOutLeft; |
|||
} |
|||
|
|||
@-webkit-keyframes fadeInRight { |
|||
0% { |
|||
opacity: 0; |
|||
-webkit-transform: translateX(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-webkit-transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
@-moz-keyframes fadeInRight { |
|||
0% { |
|||
opacity: 0; |
|||
-moz-transform: translateX(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-moz-transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
@-o-keyframes fadeInRight { |
|||
0% { |
|||
opacity: 0; |
|||
-o-transform: translateX(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-o-transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
@keyframes fadeInRight { |
|||
0% { |
|||
opacity: 0; |
|||
transform: translateX(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
transform: translateX(0); |
|||
} |
|||
} |
|||
|
|||
.animated.fadeInRight { |
|||
-webkit-animation-name: fadeInRight; |
|||
-moz-animation-name: fadeInRight; |
|||
-o-animation-name: fadeInRight; |
|||
animation-name: fadeInRight; |
|||
} |
|||
|
|||
@-webkit-keyframes fadeInUp { |
|||
0% { |
|||
opacity: 0; |
|||
-webkit-transform: translateY(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-webkit-transform: translateY(0); |
|||
} |
|||
} |
|||
|
|||
@-moz-keyframes fadeInUp { |
|||
0% { |
|||
opacity: 0; |
|||
-moz-transform: translateY(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-moz-transform: translateY(0); |
|||
} |
|||
} |
|||
|
|||
@-o-keyframes fadeInUp { |
|||
0% { |
|||
opacity: 0; |
|||
-o-transform: translateY(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
-o-transform: translateY(0); |
|||
} |
|||
} |
|||
|
|||
@keyframes fadeInUp { |
|||
0% { |
|||
opacity: 0; |
|||
transform: translateY(20px); |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
transform: translateY(0); |
|||
} |
|||
} |
|||
|
|||
.animated.fadeInUp { |
|||
-webkit-animation-name: fadeInUp; |
|||
-moz-animation-name: fadeInUp; |
|||
-o-animation-name: fadeInUp; |
|||
animation-name: fadeInUp; |
|||
} |
|||
|
|||
@-webkit-keyframes fadeOutDown { |
|||
0% { |
|||
opacity: 1; |
|||
-webkit-transform: translateY(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-webkit-transform: translateY(20px); |
|||
} |
|||
} |
|||
|
|||
@-moz-keyframes fadeOutDown { |
|||
0% { |
|||
opacity: 1; |
|||
-moz-transform: translateY(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-moz-transform: translateY(20px); |
|||
} |
|||
} |
|||
|
|||
@-o-keyframes fadeOutDown { |
|||
0% { |
|||
opacity: 1; |
|||
-o-transform: translateY(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
-o-transform: translateY(20px); |
|||
} |
|||
} |
|||
|
|||
@keyframes fadeOutDown { |
|||
0% { |
|||
opacity: 1; |
|||
transform: translateY(0); |
|||
} |
|||
100% { |
|||
opacity: 0; |
|||
transform: translateY(20px); |
|||
} |
|||
} |
|||
|
|||
.animated.fadeOutDown { |
|||
-webkit-animation-name: fadeOutDown; |
|||
-moz-animation-name: fadeOutDown; |
|||
-o-animation-name: fadeOutDown; |
|||
animation-name: fadeOutDown; |
|||
} |
|||
|
|||
.soul-table-contextmenu { |
|||
position: absolute; |
|||
z-index: 200; |
|||
list-style: none; |
|||
margin: 0; |
|||
padding: 0; |
|||
border: 1px solid #ebeef5; |
|||
box-shadow: 2px 2px 4px -2px rgba(0,0,0,.2); |
|||
background: white; |
|||
} |
|||
.soul-table-contextmenu li { |
|||
line-height: 26px; |
|||
padding: 0 30px; |
|||
cursor: pointer; |
|||
word-break: keep-all; |
|||
} |
|||
.soul-table-contextmenu li:hover { |
|||
background: #c5c5c5; |
|||
} |
|||
.soul-table-contextmenu li i.prefixIcon{ |
|||
position: absolute; |
|||
left: 8px; |
|||
} |
|||
|
|||
.soul-table-contextmenu li i.endIcon{ |
|||
position: absolute; |
|||
right: 8px; |
|||
} |
|||
|
|||
/*拖拽相关*/ |
|||
.layui-table-sort-invalid { |
|||
width: 10px; |
|||
height: 20px; |
|||
margin-left: 5px; |
|||
cursor: pointer!important; |
|||
} |
|||
.layui-table-sort-invalid .layui-table-sort-asc { |
|||
top: 3px; |
|||
border-top: none; |
|||
border-bottom-style: solid; |
|||
border-bottom-color: #b2b2b2; |
|||
} |
|||
.layui-table-sort-invalid .layui-edge { |
|||
position: absolute; |
|||
left: 5px; |
|||
border-width: 5px; |
|||
} |
|||
.layui-table-sort-invalid .layui-table-sort-desc { |
|||
bottom: 5px; |
|||
border-bottom: none; |
|||
border-top-style: solid; |
|||
border-top-color: #b2b2b2; |
|||
} |
|||
.layui-table-sort-invalid .layui-edge { |
|||
position: absolute; |
|||
left: 5px; |
|||
border-width: 5px; |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
<template> |
|||
<div id="app"> |
|||
<!-- <nav> |
|||
<router-link to="/">Home</router-link> | |
|||
<router-link to="/about">About</router-link> |
|||
</nav> --> |
|||
<router-view /> |
|||
</div> |
|||
</template> |
|||
|
|||
<style> |
|||
#app { |
|||
font-family: Avenir, Helvetica, Arial, sans-serif; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
text-align: center; |
|||
color: #2c3e50; |
|||
} |
|||
|
|||
nav { |
|||
padding: 30px; |
|||
} |
|||
|
|||
nav a { |
|||
font-weight: bold; |
|||
color: #2c3e50; |
|||
} |
|||
|
|||
nav a.router-link-exact-active { |
|||
color: #42b983; |
|||
} |
|||
</style> |
|||
|
After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,48 @@ |
|||
<template> |
|||
<div> |
|||
<div id="kc-container"></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// import $ from 'jquery'; |
|||
// import kline from '../../static/kline/src/klineCharts.js'; |
|||
export default { |
|||
name: "HelloWorld", |
|||
props: ["name"], |
|||
data() { |
|||
return { |
|||
loadingIndex: null |
|||
} |
|||
}, |
|||
watch:{ |
|||
name(){ |
|||
initKlineChart() |
|||
console.log('111'); |
|||
// if(name){ |
|||
// console.log('111'); |
|||
// this.init() |
|||
// } |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
init() { |
|||
kcStart({ |
|||
containerId: 'kc-container', |
|||
symbol: this.name, |
|||
coinScale: parseInt('5'), // 计价币种精度 |
|||
volumeScale: parseInt('5'), // 成交量精度保留 |
|||
interval: '15', |
|||
timezone: "America/Toronto", |
|||
language: 'zh_TW' |
|||
}) |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,12 @@ |
|||
import Vue from "vue"; |
|||
import App from "./App.vue"; |
|||
import router from "./router"; |
|||
import store from "./store"; |
|||
|
|||
Vue.config.productionTip = false; |
|||
|
|||
new Vue({ |
|||
router, |
|||
store, |
|||
render: (h) => h(App), |
|||
}).$mount("#app"); |
|||
@ -0,0 +1,26 @@ |
|||
import Vue from "vue"; |
|||
import VueRouter from "vue-router"; |
|||
import HomeView from "../views/HomeView.vue"; |
|||
|
|||
Vue.use(VueRouter); |
|||
|
|||
const routes = [ |
|||
{ |
|||
path: "/", |
|||
name: "home", |
|||
component: HomeView, |
|||
}, |
|||
{ |
|||
path: "/about", |
|||
name: "about", |
|||
component: () => import("../views/AboutView.vue"), |
|||
}, |
|||
]; |
|||
|
|||
const router = new VueRouter({ |
|||
mode: "history", |
|||
base: process.env.BASE_URL, |
|||
routes, |
|||
}); |
|||
|
|||
export default router; |
|||
@ -0,0 +1,12 @@ |
|||
import Vue from "vue"; |
|||
import Vuex from "vuex"; |
|||
|
|||
Vue.use(Vuex); |
|||
|
|||
export default new Vuex.Store({ |
|||
state: {}, |
|||
getters: {}, |
|||
mutations: {}, |
|||
actions: {}, |
|||
modules: {}, |
|||
}); |
|||
@ -0,0 +1,5 @@ |
|||
<template> |
|||
<div class="about"> |
|||
<h1>This is an about page</h1> |
|||
</div> |
|||
</template> |
|||
@ -0,0 +1,126 @@ |
|||
<template> |
|||
<div class="home"> |
|||
<div class="layui-layout layui-layout-admin"> |
|||
<!-- 左侧导航 --> |
|||
<div class="layui-side layui-bg-black" style="top: 0 !important;"> |
|||
<p class="market_list border-bottom-grey" style="color: #1AA094">交易市场</p> |
|||
<!-- <a href="index.html"><p class="market_list border-bottom-grey">PYTNUSDT</p></a> |
|||
<a href="oige.html"><p class="market_list border-bottom-grey">OIGEUSDT</p></a> |
|||
<a href="gql.html"><p class="market_list border-bottom-grey">GQLUSDT</p></a> |
|||
<a href="rpn.html"><p class="market_list border-bottom-grey">RPNUSDT</p></a> --> |
|||
<p class="market_list border-bottom-grey" @click="handleClick('PYTN')" :style="{'color': title=='PYTN'?'red':'white'}">PYTNUSDT</p> |
|||
<p class="market_list border-bottom-grey" @click="handleClick('OIGE')" :style="{'color': title=='OIGE'?'red':'white'}">OIGEUSDT</p> |
|||
<p class="market_list border-bottom-grey" @click="handleClick('GQL')" :style="{'color': title=='GQL'?'red':'white'}">GQLUSDT</p> |
|||
<p class="market_list border-bottom-grey" @click="handleClick('RPN')" :style="{'color': title=='RPN'?'red':'white'}">RPNUSDT</p> |
|||
</div> |
|||
<!-- 右侧内容 --> |
|||
<div class="layui-body" style="top: 0 !important;bottom:0"> |
|||
<blockquote class="layui-elem-quote title"> |
|||
{{title+'USDT'}} |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="1" style="margin-left:20px;">1分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="5">5分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn active" type="button" |
|||
data-interval="15">15分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="30"> |
|||
30分钟 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="60">1小时 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="240"> |
|||
4小时 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="D">天 |
|||
</button> |
|||
<button class="layui-btn layui-btn-primary layui-btn-sm interval_btn" type="button" |
|||
data-interval="W">周 |
|||
</button> |
|||
</blockquote> |
|||
|
|||
<HelloWorld :name='title'></HelloWorld> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import $ from 'jquery'; |
|||
// import 'layui-src/src/layui.js'; |
|||
// import 'layui-src/src/css/layui.css'; |
|||
import HelloWorld from '@/components/HelloWorld.vue'; |
|||
// import '../../static/kline/src/klineCharts.js'; |
|||
export default { |
|||
name: "HomeView", |
|||
components: { |
|||
HelloWorld |
|||
}, |
|||
data() { |
|||
return { |
|||
title:"PYTN" |
|||
}; |
|||
}, |
|||
mounted() { |
|||
$('.interval_btn').on('click', function(){ |
|||
if(kcChart != null || kcChart != undefined){ |
|||
var _this = $(this); |
|||
kcCurrentData.interval = _this.attr('data-interval'); |
|||
// 请求历史数据 |
|||
kcHistoryKeyId = 1; |
|||
var rang = setKLineVisibleRange(parseInt(Date.now() / 1000)); |
|||
$.ajax({ |
|||
url: "https://dfmg.dficoins.com/api/getkkline", |
|||
type: 'get', |
|||
async: false, |
|||
data: { |
|||
symbol: getSymbol(), |
|||
interval: getSecondsByInterval(kcCurrentData.interval), |
|||
times: kcHistoryKeyId, |
|||
from: rang.from, |
|||
to: rang.to + (365 * 86400) |
|||
}, |
|||
beforeSend: function(){ |
|||
loading_index = layer.load(1, { |
|||
shade: [0.1, '#fff'] //0.1透明度的白色背景 |
|||
}); |
|||
}, |
|||
success:function (result) { //成功回调 |
|||
console.log(result); |
|||
if(result.status){ |
|||
loadMoreKline(result.data, true, result.code); |
|||
$('.interval_btn').removeClass('active'); |
|||
_this.addClass('active'); |
|||
}else{ |
|||
|
|||
} |
|||
layer.close(loading_index); |
|||
}, |
|||
error: function(xhr){ |
|||
layer.close(loading_index); |
|||
} |
|||
}); |
|||
} |
|||
}) |
|||
}, |
|||
methods: { |
|||
handleClick(name){ |
|||
this.title = name |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
@import '../../public/static/kline/src/index.css'; |
|||
@import '../../public/static/kline/src/kline.css'; |
|||
/* @import '../../static/kline/src/public.css'; */ |
|||
/* @import '../../static/kline/src/iconfont.css'; */ |
|||
@import '../../public/static/kline/src/public(1).css'; |
|||
@import '../../public/static/kline/src/soulTable.css'; |
|||
</style> |
|||
@ -0,0 +1,27 @@ |
|||
const { defineConfig } = require("@vue/cli-service"); |
|||
var webpack = require('webpack') |
|||
module.exports = defineConfig({ |
|||
transpileDependencies: true, |
|||
lintOnSave:false, |
|||
// devServer: {
|
|||
// proxy: {
|
|||
// "/api": {
|
|||
// target: 'http://xxxxxxxxxxx.com',//代理地址 凡是使用/api
|
|||
// changeOrigin: true,//允许跨域请求
|
|||
// secure: false,
|
|||
// pathRewrite: { //重写路径 替换请求地址中的指定路径
|
|||
// ['^/api']: '/' //将请求地址中的api替换为空
|
|||
// }
|
|||
// }
|
|||
// }
|
|||
// }
|
|||
configureWebpack: { |
|||
plugins: [ |
|||
new webpack.ProvidePlugin({ |
|||
$:"jquery", |
|||
jQuery:"jquery", |
|||
"windows.jQuery":"jquery" |
|||
}) |
|||
] |
|||
} |
|||
}); |
|||