Commit d7bfe0af by 宋毅

tj

parent 031d36cc
#!/bin/bash #!/bin/bash
FROM registry.cn-beijing.aliyuncs.com/hantang2/node105:v2 FROM registry.cn-beijing.aliyuncs.com/hantang2/node105:v2
MAINTAINER jy "jiangyong@gongsibao.com" MAINTAINER jy "jiangyong@gongsibao.com"
ADD igirl-channel-jdweb /apps/igirl-channel-jdweb/ ADD igirl-channel-web /apps/igirl-channel-web/
WORKDIR /apps/igirl-channel-jdweb/ WORKDIR /apps/igirl-channel-web/
RUN cnpm install -S RUN cnpm install -S
CMD ["node","/apps/igirl-channel-jdweb/main.js"] CMD ["node","/apps/igirl-channel-web/main.js"]
......
var fs=require("fs");
var settings=require("../settings");
var glob = require("glob");
var system = require('../../base/system');
var bizcompCache={};
async function asycReadFile(path){
var p=new Promise(function(reslv,reject){
fs.readFile(path,function(err,r){
if(err){
reject(err);
}else{
reslv(r);
}
});
});
return p;
}
async function buildComponent(compname){
if(bizcompCache[compname] && settings.env=="prod"){
return bizcompCache[compname];
}else{
var htmlpath=settings.basepath+"/app/front/vues/pages/"+compname+"/"+compname+".html";
var jspath=settings.basepath+"/app/front/vues/pages/"+compname+"/"+compname+".js";
var html= await asycReadFile(htmlpath);
var tmpl=html.toString("utf-8");
var js= await asycReadFile(jspath);
var jsstr=js.toString("utf-8");
jsstr=jsstr.replace("${tmpl}",tmpl);
bizcompCache[compname]=jsstr;
return jsstr;
}
}
module.exports = function (app) {
app.get('/vue/comp/base',function(req,res){
var vuePath=settings.basepath+"/app/front/vues/base";
var baseComps=[];
var rs=glob.sync(vuePath+"/**/*.vue");
if(rs){
rs.forEach(function(r){
var comp="";
if(settings.env=="dev"){
delete require.cache[r];
comp=require(r).replace(/\n/g,"");
}else{
comp=require(r).replace(/\n/g,"");
}
baseComps.push(comp);
});
res.end(JSON.stringify(baseComps));
}
});
app.get('/vue/comp/:cname',function(req,res){
var componentName=req.params.cname;
var theme=req.headers["theme"];
var hostname=req.hostname;
buildComponent(componentName,theme,hostname).then(function(r){
res.end(escape(r.replace(/\n/g,"")));
// res.end(r);
});
});
};
var path = require('path');
var ENVINPUT = {
DB_HOST: process.env.DB_HOST,
DB_PORT: process.env.DB_PORT,
DB_USER: process.env.DB_USER,
DB_PWD: process.env.DB_PWD,
DB_NAME: process.env.ZC_CHANNEL_WEB_DB_NAME,
REDIS_HOST: process.env.REDIS_HOST,
REDIS_PORT: process.env.REDIS_PORT,
REDIS_PWD: process.env.REDIS_PWD,
REDIS_DB: process.env.ZC_CHANNEL_WEB_REDIS_DB,
APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "dev"
};
var settings = {
env: ENVINPUT.APP_ENV,
appKey: "201911251551",
paasKey: "wx76a324c5d201d1a4",
secret: "56006077354d48858026c80c0e10bef6",
salt: "%iatpD1gcxz7iF#B",
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 4004,
channelApiUrl: function () {
if (this.env == "dev") {
return "http://zcchannel.apps.com:4003";
} else {
return "http://zc-channel-service";
}
},
paasUrl: function () {
if (this.env == "dev") {
return "http://p.apps.com:4001/";
} else {
return "https://open.gongsibao.com/";
}
},
reqEsAddr: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return "http://43.247.184.94:7200/";//localsettings.reqEsDevUrl;
} else {
return "http://43.247.184.94:7200/";
}
},
apiconfig: {
opLogUrl: function () {
return settings.reqEsAddr() + "bigdata_zc_op_log/_doc?pretty";
},
opLogEsIsAdd: function () {
return 1;
},
},
homePage: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.reqHomePageDevUrl;
} else {
return "http://boss.gongsibao.com/";
}
},
authUrl: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.reqAuthUrl;
} else {
return "http://zcchannelweb.gongsibao.com/admin";
}
},
reqMgAddr: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.reqMgDevUrl;
} else {
return "mongodb://wdy1:123456@43.247.184.94:27017/";
}
},
redis: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.redis;
} else {
return {
host: ENVINPUT.REDIS_HOST,
port: ENVINPUT.REDIS_PORT,
password: ENVINPUT.REDIS_PWD,
db: ENVINPUT.REDIS_DB,
};
}
}
};
module.exports = settings;
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="keywords" content="PAAS 开放平台">
<meta name="baidu-site-verification" content="lATAxZAm8y" />
<meta name="viewport" content="width=device-width, initial-scale=0.8, maximum-scale=0.8, user-scalable=1">
<title id="idtitle"><%=app.name%></title>
<link rel="stylesheet" href="/css/ele/index_2.5.4.css">
<link rel="stylesheet" href="/css/pagecom.css">
<link rel="stylesheet" href="http://p.apps.com:3001/css/pagecom.css">
<link rel="stylesheet" href="/css/fontface-timely.css">
<script src="/js/vue/vue.min_2.6.10.js"></script>
<script src="/js/vue/vue-router.min.js"></script>
<script src="/js/vue/vuex.min.js"></script>
<script src="/js/ele/index_2.5.4.js"></script>
<script src="/js/vue/axios.min.js"></script>
<script>
//缓存当前域名对应的公司信息,公司、页脚、银行账号---全局变量
var appinfo = JSON.parse(unescape('<%=appinfo%>'));
console.log(appinfo);
//缓存当前的基础组件列表
var basecomp=JSON.parse(unescape('<%=basecomp%>'));
//缓存当前的菜单配置
var global_rsconfig=JSON.parse(unescape('<%=rsconfig%>'));
console.log(JSON.stringify(global_rsconfig));
</script>
<style>
body{
margin: 0px;
padding: 0px;
font-size: 14px;
box-sizing: border-box;
height: 100%;
}
.app-main{
width:100%;
height:100%;
background:url("<%=app.bkimageUrl?app.bkimageUrl:'/imgs/pt3.jpg'%>") no-repeat;background-size: cover;
box-sizing: border-box;
}
.app-header{
display: flex;
justify-content:space-between;
color: white;
padding: 15px;
box-sizing: border-box;
cursor: pointer;
}
.app-stage{
display: flex;
width: 100%;
padding: 5px;
box-sizing: border-box;
}
.app-stage .leftnav{
background-color:green;
max-width: 250px;
min-width: 250px;
flex-grow:1;
box-sizing: border-box;
}
.app-stage .leftnav .el-card__body {
height: 85%;
}
.app-stage .rightcontent{
flex-grow:2;
margin-left: 5px;
margin-right: 15px;
box-sizing: border-box;
}
.app-stage .rightcontent >.el-card{
border-radius: 0px;
height: 100%;
box-shadow:unset;
box-sizing: border-box;
}
.app-stage .is-always-shadow{
box-shadow: unset;
}
.app-stage .leftnav > .el-card{
border-radius: 0px;
height: 100%;
box-sizing: border-box;
}
#appName{
font-size: 30px;
font-family:MicrosoftYaHei;
}
.el-button--text{
color: white
}
.activeColor{
color:deepskyblue;
}
</style>
</head>
<body>
<div id="app" v-loading="loading" class="app-main" style="visibility:hidden">
<div id="app-header" class="app-header">
<div id="appName" @click="clkapp"><%=app.name%>后台管理</div>
<div id="login">
<span v-if="currentUser">欢迎您,{{currentUser.nickName}}<el-button @click="exitclick" type="text" icon="el-icon-setting">退出</el-button></span>
</div>
</div>
<div id="app-stage" class="app-stage">
<div class="leftnav">
<el-card id="leftnav">
<gsb-leftmenu bkcolor="white" ref="leftmenu" key="leftmenu" formatprop="formatItem" @menuselect="onMenuSelect"></gsb-leftmenu>
</el-card>
</div>
<div class="rightcontent">
<transition name="slide-fade">
<router-view>
</router-view>
</transition>
</div>
</div>
</div>
<script src="/js/vue/jquery.min.js"></script>
<script src="/js/common.js"></script>
<script src="/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="keywords" content="PAAS 开放平台">
<meta name="baidu-site-verification" content="lATAxZAm8y" />
<meta name="viewport" content="width=device-width, initial-scale=0.8, maximum-scale=0.8, user-scalable=1">
<title id="idtitle">京东云商标注册服务</title>
<!-- <%=app?app.name:'应用未启用'%> -->
<link rel="stylesheet" href="/css/ele/ele2.12.0.css">
<link rel="stylesheet" href="/css/pagecom.css">
<link rel="stylesheet" href="/css/swiper.min.css">
<link rel="stylesheet" href="/css/cropper.css">
<link rel="stylesheet" href="/css/index.css">
<link rel="stylesheet" href="/css/jointjdcloud/iconfont.css">
<script src="/js/swiper/swiper.min.js"></script>
<script src="/js/vue/vue.min_2.6.10.js"></script>
<script src="/js/vue/vue-router.min.js"></script>
<script src="/js/vue/vuex.min.js"></script>
<script src="/js/ele/ele2.12.0.js"></script>
<script src="/js/vue/axios.min.js"></script>
<script src="/js/vue/jquery.min.js"></script>
<!-- 京东公共头部和尾部js链接 -->
<script>
var appinfo = JSON.parse(unescape('<%=appinfo?appinfo:null%>'));
//缓存当前的基础组件列表
var basecomp = JSON.parse(unescape('<%=basecomp%>'));
</script>
<style>
body {
margin: 0px;
padding: 0px;
font-size: 14px;
}
#appName {
font-size: 30px;
font-family: MicrosoftYaHei;
}
.el-button--text {
color: white
}
.activeColor {
color: deepskyblue;
}
</style>
</head>
<body>
<div id="app" v-loading.fullscreen.lock="loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="app-main"
style="visibility:hidden">
<div class="jc_hd"></div>
<transition name="slide-fade">
<router-view></router-view>
</transition>
<div class="jdc-footer"></div>
</div>
<script src="/js/cropper/index.js"></script>
<script src="/js/vue/base64.js"></script>
<script src="/js/common.js"></script>
<script type="module" src="/js/index.js"></script>
</body>
</html>
<script src="http://www.jdcloud.com/public/js/portalBar.js"></script>
\ No newline at end of file
.autumn-main-nav-item,.autumn-search .el-input-group__append,.autumn-search-text{font-family:MicrosoftYaHei;font-weight:400}.autumn-img1,.autumn-img2,.autumn-img3,.autumn-search{text-align:center}.serviceSmall li,.serviceSmallName{list-style:none;box-sizing:border-box}.autumn-main-content,.autumn-main-top-item,.autumn-two-main-left,.autumn-two-right,.content-item-shade,.serviceSmall li,.serviceSmallName,.spring_daohang{box-sizing:border-box}.autumn{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.autumn-search{width:1200px;height:173px;margin:0 auto;line-height:173px;z-index:99}.autumn-search-text{display:inline-block;margin-right:42px;font-size:30px;color:rgba(252,86,52,1)}.autumn-search-input{width:788px;height:54px;background:rgba(255,255,255,1);border:2px solid rgba(253,98,40,1)}.autumn-search .el-input__inner{width:631px;line-height:54px;height:54px;border:none;border-radius:0}.autumn-search .el-input-group__append{width:157px;background:#FC5634;font-size:16px;color:rgba(255,255,255,1);border:none;border-radius:0}.autumn-main-top{width:100%;height:264px;padding:20px 0}.autumn-main-top-item{float:left;width:25%;height:100%;padding:10px;cursor:pointer}.autumn-main-top-item:hover{opacity:.8}.autumn-main-top-item>img{width:100%;height:100%}.autumn-main-nav{margin:25px 10px;width:100%;height:42px;border-left:1px solid rgba(229,59,24,1)}.autumn-main-nav-item{float:left;width:125px;height:40px;line-height:40px;border:1px solid rgba(229,59,24,1);border-left:none;font-size:14px;color:rgba(252,86,52,1);text-align:center;cursor:pointer}.autumn-main-content{margin:22px 0;width:100%;max-height:670px;padding:0 10px}.autumn-main-content-item{display:inline-block;width:231px;height:164px;background-color:#f4a460;position:relative;cursor:pointer}.autumn-main-content-item>img,.content-item-shade{height:100%;width:100%}.content-item-shade{position:absolute;top:0;font-size:18px;background-color:rgba(0,0,0,.6);color:#fff;padding:20px 40px;opacity:0;transition:opacity .5s;-moz-transition:opacity .5s;-webkit-transition:opacity .5s;-o-transition:opacity .5s}.content-item-shade>div{width:100%;line-height:40px;height:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.autumn-main-content-item:hover .content-item-shade{opacity:1}.autumn-img1{width:100%;height:693px;background:url(/imgs/autumn/bj1.png);background-size:100% 100%}.autumn-img2{width:100%;height:662px;background:url(/imgs/autumn/bj2.png);background-size:100% 100%}.autumn-img3{width:100%;height:616px;background:url(/imgs/autumn/bj3.png);background-size:100% 100%}.autumn-bj>img{margin-top:99px}.autumn-two{position:absolute;top:83px;width:100%;height:400px;z-index:999}.autumn-two-main{width:1200px;height:100%;margin:0 auto}.autumn-two-main-left{float:left;width:200px;height:100%;background:rgba(0,0,0,.5);border-radius:3px;-webkit-border-radius:3px}.autumn-two-left-item,.autumn-two-left-item-cla{width:100%;height:50px;line-height:50px;font-size:14px;cursor:pointer}.autumn-two-left-item{text-align:left;color:rgba(255,255,255,.7)}.autumn-two-left-item:last-child{text-align:center;background:#fc5634;color:#fff}.autumn-two-left-item-cla{text-align:left;background-color:#FFF;color:#FD6228}.autumn-two-left-item-span{display:block;width:60%;height:100%;margin:0 auto}.autumn-two-right{width:1000px;height:100%;overflow-y:auto;float:right;background-color:#fff;text-align:left;cursor:default}.colorPieceModel,.serviceSmallName{border-radius:8px;text-align:center;float:left}.autumn-tow-right-it,.autumn-tow-right-title{cursor:pointer;font-size:14px;font-family:PingFangSC-Regular;overflow:hidden}.autumn-tow-right-title{width:100%;padding-left:11px;line-height:36px;color:rgba(56,64,75,1);font-weight:700}.autumn-tow-right-lists{float:left;width:100%;height:100%}.autumn-tow-right-it{float:left;line-height:30px;font-weight:400;color:#666;position:relative;padding:0 11px}.autumn-tow-right-it:after{content:'';position:absolute;width:1px;height:10px;background-color:#a4a4a4;top:10px;right:0}.autumn-tow-right-it:last-child{position:static}.autumn-tow-right-it:hover{color:#FD6228}.colorPieceModel{width:220px;height:460px;color:#fff;font-size:32px;font-family:JZhongYi;overflow:hidden}.moreservice-spring-left-button,.moreservice-spring-right-button{top:45%;font-size:36px;color:rgba(210,214,218,1);z-index:9999;cursor:pointer;position:absolute}.moreservice-spring-right-button{right:0}.moreservice-spring-left-button{left:0}#ip-button:hover{color:#6592F7}#ic-button:hover{color:#A78CEE}#pa-button:hover{color:#EB9E55}.serviceSmall{float:left;width:77%;padding-left:0;margin-bottom:0}.serviceSmall li{width:32%;height:121px;padding:15px;float:left;background-color:#fff;border-radius:8px;margin-left:8px;margin-bottom:8px;transition:box-shadow .2s,margin-top .2s;-webkit-transition:box-shadow .2s,margin-top .2s}#ip li:hover{cursor:pointer;box-shadow:2px 2px 8px #6592F7;margin-top:-2px}#ic li:hover{cursor:pointer;box-shadow:2px 2px 8px #A78CEE;margin-top:-2px}#pa li:hover{cursor:pointer;box-shadow:2px 2px 8px #EB9E55;margin-top:-2px}#LX201906101755oFppND li:hover{cursor:pointer;box-shadow:2px 2px 8px #4081f7;margin-top:-2px}#LX201906111013bmwgjj li:hover{cursor:pointer;box-shadow:2px 2px 8px #ec927f;margin-top:-2px}.serviceSmall h5{color:#38404b;font-size:16px;margin:0 auto}.serviceSmall p{height:35px;color:#828282;font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.serviceSmall li span{color:#FF394D;font-size:16px}.serviceSmallName{padding:12px;margin-left:44px;margin-top:15px;width:130px;height:121px;color:#fff;font-size:14px}.serviceSmallImg{height:auto;margin:0 auto 5px;display:block}.spring_daohang{position:absolute;bottom:10px;left:0;width:950px;height:10px;float:left;padding-right:50px}.spring_daohang_list,.spring_daohang_list_xz{width:10px;height:10px;border-radius:50%;float:right;margin-left:15px;cursor:pointer}.spring_daohang_list{opacity:.5}.spring_daohang_list_xz{opacity:1}
\ No newline at end of file
/* * {
margin: 0;
padding: 0;
} */
.cut {
width: 400px;
height: 400px;
margin: 30px auto;
}
.cut .btn {
line-height: 18px;
}
.c-item {
max-width: 600px;
margin: 10px auto;
margin-top: 20px;
}
.content {
margin: auto;
max-width: 1200px;
margin-bottom: 100px;
}
.test-button {
display: flex;
flex-wrap: wrap;
align-content: center;
justify-content: center;
}
.btn {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
border: 1px solid #c0ccda;
color: #1f2d3d;
text-align: center;
box-sizing: border-box;
outline: none;
margin: 20px 10px 0px 0px;
padding: 9px 15px;
font-size: 14px;
border-radius: 4px;
color: #fff;
background-color: #50bfff;
border-color: #50bfff;
transition: all .2s ease;
text-decoration: none;
user-select: none;
}
.des {
line-height: 30px;
}
code.language-html {
padding: 10px 20px;
margin: 10px 0px;
display: block;
background-color: #333;
color: #fff;
overflow-x: auto;
font-family: Consolas, Monaco, Droid, Sans, Mono, Source, Code, Pro, Menlo, Lucida, Sans, Type, Writer, Ubuntu, Mono;
border-radius: 5px;
white-space: pre;
}
.show-info {
margin-bottom: 50px;
}
.show-info h2 {
line-height: 50px;
}
/*.title, .title:hover, .title-focus, .title:visited {
color: black;
}*/
.cropper_title {
display: block;
text-decoration: none;
text-align: center;
line-height: 1.5;
margin: 20px 0px;
background-image: -webkit-linear-gradient(left, #3498db, #f47920 10%, #d71345 20%, #f7acbc 30%, #ffd400 40%, #3498db 50%, #f47920 60%, #d71345 70%, #f7acbc 80%, #ffd400 90%, #3498db);
color: transparent;
-webkit-background-clip: text;
background-size: 200% 100%;
animation: slide 5s infinite linear;
font-size: 40px;
}
.test {
height: 500px;
}
.model {
position: fixed;
z-index: 10;
width: 100vw;
height: 100vh;
overflow: auto;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.8);
}
.model-show {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
}
.model img {
display: block;
margin: auto;
max-width: 80%;
user-select: none;
background-position: 0px 0px, 10px 10px;
background-size: 20px 20px;
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%), linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%);
}
.c-item {
display: block;
user-select: none;
}
@keyframes slide {
0% {
background-position: 0 0;
}
100% {
background-position: -100% 0;
}
}
\ No newline at end of file
@font-face {
font-family: 'iconfont'; /* project id 895180 */
src: url('//at.alicdn.com/t/font_895180_1yuim2ryomg.eot');
src: url('//at.alicdn.com/t/font_895180_1yuim2ryomg.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_895180_1yuim2ryomg.woff2') format('woff2'),
url('//at.alicdn.com/t/font_895180_1yuim2ryomg.woff') format('woff'),
url('//at.alicdn.com/t/font_895180_1yuim2ryomg.ttf') format('truetype'),
url('//at.alicdn.com/t/font_895180_1yuim2ryomg.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>IconFont Demo</title>
<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css">
<script src="iconfont.js"></script>
<!-- jQuery -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
<!-- 代码高亮 -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
</head>
<body>
<div class="main">
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
<div class="nav-tabs">
<ul id="tabs" class="dib-box">
<li class="dib active"><span>Unicode</span></li>
<li class="dib"><span>Font class</span></li>
<li class="dib"><span>Symbol</span></li>
</ul>
</div>
<div class="tab-container">
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe606;</span>
<div class="name">分享</div>
<div class="code-name">&amp;#xe606;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
<hr>
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
<ul>
<li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
</ul>
<blockquote>
<p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
</blockquote>
<p>Unicode 使用步骤如下:</p>
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.eot');
src: url('iconfont.eot?#iefix') format('embedded-opentype'),
url('iconfont.woff2') format('woff2'),
url('iconfont.woff') format('woff'),
url('iconfont.ttf') format('truetype'),
url('iconfont.svg#iconfont') format('svg');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
<pre><code class="language-css"
>.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre>
<code class="language-html"
>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-fenxiang"></span>
<div class="name">
分享
</div>
<div class="code-name">.icon-fenxiang
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
<hr>
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
<p>与 Unicode 使用方式相比,具有如下特点:</p>
<ul>
<li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
</code></pre>
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fenxiang"></use>
</svg>
<div class="name">分享</div>
<div class="code-name">#icon-fenxiang</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>
<hr>
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
<ul>
<li>支持多色图标了,不再受单色限制。</li>
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
</code></pre>
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
<pre><code class="language-html">&lt;style&gt;
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
&lt;/style&gt;
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
&lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
&lt;/svg&gt;
</code></pre>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('.tab-container .content:first').show()
$('#tabs li').click(function (e) {
var tabContent = $('.tab-container .content')
var index = $(this).index()
if ($(this).hasClass('active')) {
return
} else {
$('#tabs li').removeClass('active')
$(this).addClass('active')
tabContent.hide().eq(index).fadeIn()
}
})
})
</script>
</body>
</html>
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1572251504484'); /* IE9 */
src: url('iconfont.eot?t=1572251504484#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALwAAsAAAAABqwAAAKjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqBNIEwATYCJAMICwYABCAFhG0HMhvYBcgusG14k0A450Cx4FtSAQs2QgTRWlk9O08AiiU74ERFvwoJeTbEFshIFp416+ibXNMUaeBzviwHCKqY/H6Pl2YkCciR3nkk1Qm3SVLLhcDVRBCEbkCA3+A+ce/4L6BA5gPKbY7BYwIGlga4F0Zd54EWSADeMHaBS7hNoNYgJ8V2QVkd0MusRYG4yDIhoM+FZJllq4XKmp1Z3AUVqtM15Q3gTvj9+AcWQk9SUbDqDs/yoyDrp9aeoyr9c6HoBqX5HGD7KDAPyMRpbWqfSjCWSm1KbRTYV3Xws/K/7FvEXv88UcmqrAf9UHRPYldyq5UJ5Hh0FbA16v1IA71ddt3ue6Flfr70sN28d96tdbxZn6r78JX09EUcWQjV5/dGS8PC6pMbHc3zS7XmTy9QOTe3euJqqrw8L56KJ8fv4jssleleAbFtTjaRyhd77ms/TcWKGkGoUQiPH4zqK5n5M3xrP3p1laXYGAfrAMqKb1V/8Td2fp2pA7a0/2Tw9ceFHAbKMujnofpc7uCfiXv2ZF1qmVNWxbWeZHXUwoRatSiHfa0+xuo6bjAXqnXcpqfKQIpCtXEiM/OoUGcJlaqtodacwv112hAqkWswqx8gNDtG0ugtCs1uiczEUaHTJyo1hwq1zkfiiXUmgzXmEhSiKArDXZCNSCJ2rNQYVdcgpo0Pkaw0ZDcgEmOj0Of2FrOFSERkjjWxdsZPKYaYSAIsAPchnpegTKRWFKHuFkrlFI8H1z3JHZEEYLSFQEIoJAoK6wKxIiQi7A+njKXP10AYbXghpKWhJtgAIWLY8SEfN28PolAl9mq4l0di2jH8KAqDMEIigArANITHk0By/bRWSATl1jIiIUvhsQfhvir3+hrhAwpZC5Y+hT25UH2GxE42JDIAAAA=') format('woff2'),
url('iconfont.woff?t=1572251504484') format('woff'),
url('iconfont.ttf?t=1572251504484') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1572251504484#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-fenxiang:before {
content: "\e606";
}
!function(d){var e,n='<svg><symbol id="icon-fenxiang" viewBox="0 0 1024 1024"><path d="M891.306615 1024H10.976918V125.672727A121.845657 121.845657 0 0 1 132.667423 3.930505h358.141414a25.496566 25.496566 0 0 1 0 50.941414H132.667423A70.852525 70.852525 0 0 0 61.918332 125.672727v847.385859h829.388283a70.852525 70.852525 0 0 0 70.749091-70.749091v-370.760404a25.496566 25.496566 0 1 1 50.941414 0v370.760404A121.845657 121.845657 0 0 1 891.306615 1024z" ></path><path d="M383.340554 815.372929a25.444848 25.444848 0 0 1-25.444848-25.444848V460.8a195.490909 195.490909 0 0 1 195.232323-195.28404h364.709495l-209.506263-222.383839A25.444848 25.444848 0 0 1 745.360756 8.016162l249.949091 265.515959a25.496566 25.496566 0 0 1-18.566464 42.925253h-423.718788A144.497778 144.497778 0 0 0 408.681968 460.8v329.128081a25.444848 25.444848 0 0 1-25.341414 25.444848z" ></path></symbol></svg>',t=(e=document.getElementsByTagName("script"))[e.length-1].getAttribute("data-injectcss");if(t&&!d.__iconfont__svg__cssinject__){d.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}!function(e){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(e,0);else{var t=function(){document.removeEventListener("DOMContentLoaded",t,!1),e()};document.addEventListener("DOMContentLoaded",t,!1)}else document.attachEvent&&(o=e,i=d.document,a=!1,(c=function(){try{i.documentElement.doScroll("left")}catch(e){return void setTimeout(c,50)}n()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,n())});function n(){a||(a=!0,o())}var o,i,a,c}(function(){var e,t;(e=document.createElement("div")).innerHTML=n,n=null,(t=e.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",function(e,t){t.firstChild?function(e,t){t.parentNode.insertBefore(e,t)}(e,t.firstChild):t.appendChild(e)}(t,document.body))})}(window);
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="fenxiang" unicode="&#58886;" d="M891.306615-128H10.976918V770.327273A121.845657 121.845657 0 0 0 132.667423 892.069495h358.141414a25.496566 25.496566 0 0 0 0-50.941414H132.667423A70.852525 70.852525 0 0 1 61.918332 770.327273v-847.385859h829.388283a70.852525 70.852525 0 0 1 70.749091 70.749091v370.760404a25.496566 25.496566 0 1 0 50.941414 0v-370.760404A121.845657 121.845657 0 0 0 891.306615-128zM383.340554 80.627071a25.444848 25.444848 0 0 0-25.444848 25.444848V435.2a195.490909 195.490909 0 0 0 195.232323 195.28404h364.709495l-209.506263 222.383839A25.444848 25.444848 0 0 0 745.360756 887.983838l249.949091-265.515959a25.496566 25.496566 0 0 0-18.566464-42.925253h-423.718788A144.497778 144.497778 0 0 1 408.681968 435.2v-329.128081a25.444848 25.444848 0 0 0-25.341414-25.444848z" horiz-adv-x="1024" />
</font>
</defs></svg>
basecomp.forEach(function (comp) {
try{
var obj = eval("(" + comp + ")");
Vue.component(obj.vname, obj);
}catch(e){
console.log(e);
}
});
console.log("load base component finished...");
function buildPromise(compath){
return Promise.resolve(new Promise(function(resolve,reject){
//异步加载组件
axios.get(compath).then(function(res){
console.log(compath);
// var obj=eval("("+res.data+")");
var obj = eval("(" + unescape(res.data) + ")");
resolve(obj);
}).catch(function(reason){
console.log(reason)
})
}));
}
function componentFactory(comname){
var compath="/vue/comp/"+comname;
var tmpFunc=function(){
return buildPromise(compath);
}
return tmpFunc;
}
window.componentFactory=componentFactory;
const store = new Vuex.Store({
state: {
currentCodePath:"",
currentUser:null,
curSelRow:{},
},
});
Vue.mixin({
props:["groupName","modelName"],
computed:Vuex.mapState({
currentUser:state=>{
return state.currentUser;
},
codePath:state=>{
return state.currentCodePath;
},
ctlName:function(){
return this.groupName +"/"+this.modelName+"Ctl";
},
}),
methods:{
getUrl(md){
return "web/"+this.ctlName+"/"+md;
},
}
});
var routes=[];
var codepaths={};
axios.get("/web/common/metaCtl/getRouteConfig").then(d=>{
Object.keys(d.data.data.bizs).map((k)=>{
//path是路由,静态的路由
var pathTmp=d.data.data.bizs[k].path;
var codepath=d.data.data.bizs[k].codepath;
var tmp={"path":pathTmp,"components":{
"default":componentFactory(d.data.data.bizs[k].comname)
},};
routes.push(tmp);
codepaths[pathTmp]=codepath;//暂存每个叶子节点对应的codepath
});
console.log(routes);
var router=new VueRouter({
routes:routes,
});
router.beforeEach((to, from,next) => {
store.state.currentCodePath = codepaths[to.path];
next();
});
var app = new Vue({
el:"#app",
router:router,
store:store,
data:function(){
return {
loading:true,
logins:[
],
};
},
created(){
$(window).resize(()=>{
this.initWindowShow();
});
this.initWindowShow();
this.loading=false;
},
updated(){
},
mounted(){
var self=this;
if(!this.currentUser){
this.logins.push({"icon":"el-icon-location-outline","title":"登录","type":"text",key:"login","isOnGrid":true});
this.logins.push({"icon":"el-icon-edit-outline","title":"注册","type":"text",key:"register","isOnGrid":true});
}else{
this.logins.push({"icon":"el-icon-arrow-right","title":"退出","type":"text",key:"exit","isOnGrid":true});
}
this.checkLogin(()=>{
if(location.hash=="#/"){
this.$router.push("/index");
}
});
},
methods:{
initWindowShow(){
var h=$(window).height();
var m=h-90;
$("#app").css("min-height",h+"px");
$("#app-stage").css("min-height",m+"px");
$("#app").css("visibility",'visible');
},
localdata(key,item){
if(item){
localStorage.setItem(key,JSON.stringify(item));
}else{
var strobj=localStorage.getItem(key);
if(strobj){
return JSON.parse(strobj);
}else{
return null;
}
}
},
showMask(){
this.loading=true;
},
hideMask(){
this.loading=false;
},
onMenuSelect: function (index,keyIndex) {
console.log(index);
this.$router.push(index);
},
formatItem: function (t, label) {
if (t) {
if (!label && t.src) {//表示当前是image元素
if (this.currentUser) {
return this.currentUser.imgUrl;
}
return t.src;
} else {
return label;
}
}
},
clkapp(){
location.href=appinfo.homePage;
},
async exitclick(){
var d= await this.$root.postReq("/web/auth/userCtl/exit",{});
location.href=appinfo.homePage;
},
async checkLogin(cbk){
var d= await this.$root.postReq("/web/auth/userCtl/checkLogin",{});
if(d && d.status==0 && d.data){
this.$store.state.currentUser=d.data;
cbk();
}else{
//alert("no login");
location.href=appinfo.homePage;
}
},
getReq(path,data){
var self=this;
return axios.get(path,{params:data,"headers":{"codepath":this.codePath}}).then(function(r){
if(r && r.data && r.data.status==-99){
self.$store.state.currentUser=null;
self.hideMask();
self.$router.push("/");
self.$message({
message: '扫码成为合伙人',
type: 'warning'
});
self.showLogin();
return null;
}else{
if(r.data && r.data.bizmsg && r.data.bizmsg!="empty"){
self.$message({
message: r.data.bizmsg,
type: 'warning'
});
}
return r.data?r.data:null;;
}
});
},
postReq(path,data){
return axios.post(path,data,{"headers":{'codepath': this.codePath}}).then(function(r){
if(r && r.data && r.data.status==-99){
self.$store.state.currentUser=null;
self.hideMask();
self.$router.push("/");
self.$message({
message: '扫码成为合伙人',
type: 'warning'
});
self.showLogin();
return null;
}else{
return r.data?r.data:null;
}
});
},
},
});
});
//});
/*!
* Bootstrap Reboot v4.1.3 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
width: device-width;
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
dfn {
font-style: italic;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]):not([tabindex]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):focus {
outline: 0;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html [type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
\ No newline at end of file
/*!
* Bootstrap Reboot v4.1.3 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
function getQueryStringMap(){
//取得查询字符串并去掉开头的问号
var str = (location.search.length>0?location.search.substring(1):"");
var args = {};//保存数据的对象
items = str.length?str.split('&'):[];//取得每一项
var item = null;
var name = null;
var value = null;
for(var i=0; i<items.length;i++){
item = items[i].split('=');
name = decodeURIComponent(item[0]);
value = decodeURIComponent(item[1]);
if(name.length){
args[name] = value;
}
}
return args;
}
function addCSS(csspath) {
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = csspath;
document.getElementsByTagName("head")[0].appendChild(link);
}
\ No newline at end of file
import VueCropper from 'index.js'
Vue.use(VueCropper,{
// 全局组件名称,使用new VueHtml5Editor(options)时该选项无效
// global component name
name: "vue-cropper",
// 是否显示模块名称,开启的话会在工具栏的图标后台直接显示名称
// if set true,will append module name to toolbar after icon
showModuleName: false,
});
console.log(VueCropper,'11111111111111111111');
\ No newline at end of file
{"version":3,"file":"index.js","sources":["webpack://vue-cropper/webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"vue-cropper\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vue-cropper\"] = factory();\n\telse\n\t\troot[\"vue-cropper\"] = factory();\n})(window, function() {\nreturn "],"mappings":"AAAA","sourceRoot":""}
\ No newline at end of file
Vue.use(VueHtml5Editor,{
// 全局组件名称,使用new VueHtml5Editor(options)时该选项无效
// global component name
name: "vue-html5-editor",
// 是否显示模块名称,开启的话会在工具栏的图标后台直接显示名称
// if set true,will append module name to toolbar after icon
showModuleName: false,
// 自定义各个图标的class,默认使用的是font-awesome提供的图标
// custom icon class of built-in modules,default using font-awesome
icons: {
text: "fa fa-pencil",
color: "fa fa-paint-brush",
font: "fa fa-font",
align: "fa fa-align-justify",
list: "fa fa-list",
link: "fa fa-chain",
unlink: "fa fa-chain-broken",
tabulation: "fa fa-table",
image: "fa fa-file-image-o",
hr: "fa fa-minus",
eraser: "fa fa-eraser",
undo: "fa-undo fa",
"full-screen": "fa fa-arrows-alt",
info: "fa fa-info",
},
// 配置图片模块
// config image module
image: {
// 文件最大体积,单位字节 max file size
sizeLimit: 6 * 1024 * 1024,
// 上传参数,默认把图片转为base64而不上传
// upload config,default null and convert image to base64
upload: {
url: null,
headers: {},
params: {},
fieldName: {},
},
// 压缩参数,默认使用localResizeIMG进行压缩,设置为null禁止压缩
// compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG)
// set null to disable compression
compress: {
width: 1600,
height: 1600,
quality: 80
},
// 响应数据处理,最终返回图片链接
// handle response data,return image url
uploadHandler:function(responseText){
//default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
console.log("responseText..............................");
console.log(responseText);
var json = JSON.parse(responseText)
if (!json.ok) {
alert(json.msg)
} else {
return json.data
}
}
},
// 语言,内建的有英文(en-us)和中文(zh-cn)
//default en-us, en-us and zh-cn are built-in
language: "zh-cn",
// 自定义语言
i18n: {
//specify your language here
"zh-cn": {
"align": "对齐方式",
"image": "图片",
"list": "列表",
"link": "链接",
"unlink": "去除链接",
"table": "表格",
"font": "文字",
"full screen": "全屏",
"text": "排版",
"eraser": "格式清除",
"info": "关于",
"color": "颜色",
"please enter a url": "请输入地址",
"create link": "创建链接",
"bold": "加粗",
"italic": "倾斜",
"underline": "下划线",
"strike through": "删除线",
"subscript": "上标",
"superscript": "下标",
"heading": "标题",
"font name": "字体",
"font size": "文字大小",
"left justify": "左对齐",
"center justify": "居中",
"right justify": "右对齐",
"ordered list": "有序列表",
"unordered list": "无序列表",
"fore color": "前景色",
"background color": "背景色",
"row count": "行数",
"column count": "列数",
"save": "确定",
"upload": "上传",
"progress": "进度",
"unknown": "未知",
"please wait": "请稍等",
"error": "错误",
"abort": "中断",
"reset": "重置"
}
},
// 扩展模块,具体可以参考examples或查看源码
// extended modules
modules:[
// {
// name: 'hr',
// icon: 'fa fa-minus',
// i18n: 'hr',
// handler(editor) {
// editor.execCommand('insertHTML',"^_^;");
// },
// // init (editor) {
// // console.log(this);
// // },
// // destroyed(editor){
// //
// // },
// },
{
name: "emoji",
icon: "fa fa-minus",
i18n: "emoji",
init: function (editor) {
console.log("emoji module initmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm")
},
dashboard: {
template: `hello`,
data: function () {
return {
symbols: [
">_<|||",
"^_^;",
"⊙﹏⊙‖∣°",
"^_^|||",
"^_^\"",
"→_→",
"..@_@|||||..",
"…(⊙_⊙;)…",
"o_o ....",
"O__O",
"///^_^.......",
"?o?|||",
"( ^_^ )? ",
"(+_+)?",
"(?ε?)? ",
"o_O???",
"@_@a",
"一 一+",
">\"<||||",
"‘(*>﹏<*)′"
]
}
},
methods: {
insertSymbol: function (symbol) {
//$parent is editor component instance
this.$parent.execCommand("insertHTML", symbol)
}
}
}
}
],
// 隐藏不想要显示出来的模块
// the modules you don't want
hiddenModules: [],
// 自定义要显示的模块,并控制顺序
// keep only the modules you want and customize the order.
// can be used with hiddenModules together
visibleModules: [
"text",
"color",
"font",
"align",
"list",
"link",
"unlink",
"tabulation",
"image",
//"hr",
//"eraser",
//"undo",
//"full-screen",
// "info",
],
});
/*! Copyright (c) 2016 Naufal Rabbani (http://github.com/BosNaufal)
* Licensed Under MIT (http://opensource.org/licenses/MIT)
*
* Version 0.0.1
*
*/
// Transition (Optional)
Vue.transition('showAll',{});
var VueAutocomplete = Vue.extend ({
template: '<input type="text" :id="id" :class="class" :name="name" :placeholder="placeholder" v-model="type" @input="input(type)" @dblclick="showAll" @blur="hideAll" @keydown="keydown" @focus="focus" autocomplete="off"/> <div class="autocomplete transition autocomplete-{{ name }}" id="autocomplete-{{ name }}" v-show="showList"> <ul> <li v-for="data in json" transition="showAll" :class="activeClass($index)"> <a href="#" @click.prevent="$emit(\'selectList\',data)" @mousemove="mousemove($index)"> <b>{{ data[anchor] }}</b> <span>{{ data[label] }}</span> </a> </li> </ul> </div>',
props: {
id: String,
class: String,
name: String,
placeholder: String,
model: String, // v-model like
// Anchor of AJAX list
anchor: {
type: String,
required: true
},
// Label of AJAX list
label: String,
// ajax URL will be get
url: {
type: String,
required: true
},
// query param
param: {
type: String,
default: 'q'
},
// minimum length
min: {
type: Number,
default: 0
},
// add 'limit' query to AJAX URL will be fetched
limit: {
type: String,
default: ''
}
},
data: function () {
return {
showList: false,
type: "",
json: [],
focusList: ""
};
},
watch:{
type: function (val,old){
// Sync parent model with $data.type
return this.$parent.$data[this.model] = val;
}
},
methods: {
// Netralize Autocomplete
clearInput: function () {
this.showList = false;
this.type = "";
this.json = [];
this.focusList = "";
},
// Get the original data
cleanUp: function (data) {
return JSON.parse(JSON.stringify(data));
},
input: function (val){
this.showList = true;
// Callback Event
this.$dispatch('autocomplete:input',this.$get('name'),val);
this.$dispatch('autocomplete-'+this.$get('name')+':input',val);
this.$emit('getData',val);
return this.$parent.$data[this.model] = val;
},
showAll: function () {
this.json = [];
this.$emit('getData',"");
// Callback Event
this.$dispatch('autocomplete:show',this.$get('name'));
this.$dispatch('autocomplete-'+this.$get('name')+':show');
this.showList = true;
},
hideAll: function (e) {
var self = this;
// Callback Event
this.$dispatch('autocomplete:blur',this.$get('name'),e);
this.$dispatch('autocomplete-'+this.$get('name')+':blur',e);
setTimeout(function () {
self.showList = false;
// Callback Event
self.$dispatch('autocomplete:hide',self.$get('name'));
self.$dispatch('autocomplete-'+self.$get('name')+':hide');
},250);
},
focus: function (e) {
this.focusList = 0;
// Callback Event
this.$dispatch('autocomplete:focus',this.$get('name'),e);
this.$dispatch('autocomplete-'+this.$get('name')+':focus',e);
},
mousemove: function (i) {
this.focusList = i;
},
keydown: function (e) {
var key = e.keyCode;
// Disable when list isn't showing up
if(!this.showList) return;
switch (key) {
case 40: //down
this.focusList++;
break;
case 38: //up
this.focusList--;
break;
case 13: //enter
this.$emit('selectList', this.json[this.focusList]);
this.showList = false;
break;
case 27: //esc
this.showList = false;
break;
}
// When cursor out of range
var listLength = this.json.length - 1;
this.focusList = this.focusList > listLength ? 0 : this.focusList < 0 ? listLength : this.focusList;
},
activeClass: function (i) {
return {
'focus-list' : i == this.focusList
};
}
},
events: {
selectList: function (data) {
var clean = this.cleanUp(data);
// Put the selected data to type (model)
this.type = clean[this.anchor];
this.showList = false;
/**
* Callback Event
* Deep clone of the original object
*/
this.$dispatch('autocomplete:selected',this.$get('name'),clean);
this.$dispatch('autocomplete-'+this.$get('name')+':selected',clean);
},
getData: function (val) {
var self = this;
if (val.length < this.min) return;
if(this.url != null){
// Callback Event
this.$dispatch('autocomplete:before-ajax',self.$get('name'),val);
this.$dispatch('autocomplete-'+self.$get('name')+':before-ajax',val);
var ajax = new XMLHttpRequest();
var limit;
if(this.$get('limit') != ''){
this.limit = parseFloat(this.limit);
limit = this.limit != "" ? '&limit=' + this.limit : '';
}else{
limit = '';
}
ajax.open('GET', this.url+'?'+this.param+'='+val+limit, true);
ajax.send();
ajax.addEventListener('progress', function (data) {
if(data.lengthComputable){
// Callback Event
self.$dispatch('autocomplete:ajax-progress',self.$get('name'),data);
self.$dispatch('autocomplete-'+self.$get('name')+':ajax-progress',data);
}
});
ajax.addEventListener('loadend', function (data) {
var json = JSON.parse(this.responseText);
// Callback Event
self.$dispatch('autocomplete:ajax-loaded',self.$get('name'),this,json);
self.$dispatch('autocomplete-'+self.$get('name')+':ajax-loaded',this,json);
self.json = json;
});
}
}
},
created: function () {
// Sync parent model with $data.type
this.type = this.$parent.$data[this.model];
}
});
// Register
Vue.component('autocomplete',VueAutocomplete);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment