git仓库地址更换,首次提交
|
After Width: | Height: | Size: 17 KiB |
|
|
@ -0,0 +1,90 @@
|
|||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: url('@/static/font/iconfont.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-user:before {
|
||||
content: "\e7ae";
|
||||
}
|
||||
|
||||
.icon-password:before {
|
||||
content: "\e8b2";
|
||||
}
|
||||
|
||||
.icon-code:before {
|
||||
content: "\e699";
|
||||
}
|
||||
|
||||
.icon-setting:before {
|
||||
content: "\e6cc";
|
||||
}
|
||||
|
||||
.icon-share:before {
|
||||
content: "\e739";
|
||||
}
|
||||
|
||||
.icon-edit:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.icon-version:before {
|
||||
content: "\e63f";
|
||||
}
|
||||
|
||||
.icon-service:before {
|
||||
content: "\e6ff";
|
||||
}
|
||||
|
||||
.icon-friendfill:before {
|
||||
content: "\e726";
|
||||
}
|
||||
|
||||
.icon-community:before {
|
||||
content: "\e741";
|
||||
}
|
||||
|
||||
.icon-people:before {
|
||||
content: "\e736";
|
||||
}
|
||||
|
||||
.icon-dianzan:before {
|
||||
content: "\ec7f";
|
||||
}
|
||||
|
||||
.icon-right:before {
|
||||
content: "\e7eb";
|
||||
}
|
||||
|
||||
.icon-logout:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-help:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-github:before {
|
||||
content: "\e628";
|
||||
}
|
||||
|
||||
.icon-aixin:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-clean:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-refresh:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 858 B |
|
After Width: | Height: | Size: 258 B |
|
After Width: | Height: | Size: 338 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 260 KiB |
|
After Width: | Height: | Size: 835 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 987 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 868 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1015 B |
|
After Width: | Height: | Size: 752 B |
|
After Width: | Height: | Size: 816 B |
|
After Width: | Height: | Size: 900 B |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 785 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 539 B |
|
After Width: | Height: | Size: 683 B |
|
After Width: | Height: | Size: 562 KiB |
|
After Width: | Height: | Size: 815 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 967 B |
|
After Width: | Height: | Size: 732 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 883 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 981 B |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 919 B |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 778 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 242 B |
|
After Width: | Height: | Size: 732 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 725 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 539 B |
|
After Width: | Height: | Size: 892 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 633 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/favicon.ico">
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
||||
<!-- <script async src="https://api.map.baidu.com/api?v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
<script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
<script type="text/javascript" src="//api.map.baidu.com/library/TrackAnimation/src/TrackAnimation_min.js"></script> -->
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>本站点必须要开启JavaScript才能运行.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* @Author: zhangtq 2452618307@qq.com
|
||||
* @Date: 2024-11-18 13:33:30
|
||||
* @LastEditors: zhangtq 2452618307@qq.com
|
||||
* @LastEditTime: 2024-11-18 13:36:32
|
||||
* @FilePath: static/js/core/css/h5/qx/video.css
|
||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||
*/
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
background-color: black;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.video-js{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.videoContainer{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#ball1{
|
||||
width: 100%;
|
||||
height: 27%;
|
||||
}
|
||||
|
||||
|
||||
.action {
|
||||
height: 350px;
|
||||
transform: translateY(-10px);
|
||||
background-color: #fff;
|
||||
border-radius: 12px 12px 0px 0px;
|
||||
z-index: 9 !important;
|
||||
|
||||
.action-item {
|
||||
margin: 0 auto;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
|
||||
// 统一宽高
|
||||
.w-h {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top,
|
||||
.bottom {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
transform: translateY(60%);
|
||||
|
||||
.circle {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(180deg, #8ebcff 0%, #3888ff 100%);
|
||||
box-shadow: 0px 2px 7px 0px rgba(56, 136, 255, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
transform: translateY(130%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,178 @@
|
|||
/**
|
||||
* @Author: zhangtq 2452618307@qq.com
|
||||
* @Date: 2024-11-18 13:33:30
|
||||
* @LastEditors: zhangtq 2452618307@qq.com
|
||||
* @LastEditTime: 2024-11-18 13:36:27
|
||||
* @FilePath: static/js/core/jy.js
|
||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||
*/
|
||||
var JY = JY || {};
|
||||
JY={Object:{notNull:function(obj) {//判断某对象不为空..返回true 否则 false
|
||||
if (obj === null)return false;else if (obj === undefined)return false;else if (obj === "undefined")return false;else if (obj === "")return false;else if (obj === "[]")return false;else if (obj === "{}")return false;else return true;},
|
||||
notEmpty:function(obj) {//判断某对象不为空..返回obj 否则 ""
|
||||
if (obj === null)return "";else if (obj === undefined)return "";else if (obj === "undefined")return "";else if(obj === "")return "";else if (obj === "[]")return "";else if (obj === "{}")return "";else return obj;},
|
||||
serialize:function(form){var o = {};$.each(form.serializeArray(),function (index){if (o[this['name']]){o[this['name']] = o[this['name']] + "," + this['value'];}else{o[this['name']] = this['value'];}});return o;},
|
||||
//组合变量传递keys,values,types形式// 转换JSON为字符串
|
||||
comVar:function(variables){var keys = "", values = "", types = "",vars={};if (variables) {$.each(variables, function() {if (keys != "") {keys += ",";values += ",";types += ",";}keys += this.key;values += this.value;types += this.type;});}vars={keys:keys,values:values,types:types};return vars;}
|
||||
},
|
||||
Dict:{//ids 对应id值(多个逗号分隔).keys 对应key值(多个逗号分隔).type(可选)1.请选择,2.自定义数组。默认不填.dfstr (可选)自定义数组
|
||||
setSelect:function(ids,keys,type,dfstr){
|
||||
$.ajax({type:'POST',url:bonuspath+'/backstage/dataDict/getDictSelect',data:{ids:ids,keys:keys},dataType:'json',success:function(data,textStatus){
|
||||
if(data.res==1){var map=data.obj;var idss= ids.split(",");var opts="",name="";
|
||||
if(type==1){for(var i=0;i<idss.length;i++){name=map[idss[i]].name;opts="<option value=''>请选择</option>";$.each(map[idss[i]].items,function(n,v) {opts+="<option value='"+v.value+"'>"+v.name+"</option>";});$("#"+idss[i]+" select").append(opts);$("#"+idss[i]).trigger("liszt:updated");};}
|
||||
else if(type==2){var dfstrs= dfstr.split(",");for(var i=0;i<idss.length;i++){name=map[idss[i]].name;$("#"+idss[i]+" label").html(name); opts="<option value=''>"+dfstrs+"</option>";$.each(map[idss[i]].items,function(n,v) {opts+="<option value='"+v.value+"'>"+v.name+"</option>"; });$("#"+idss[i]+" select").append(opts);};}
|
||||
else{for(var i=0;i<idss.length;i++){var name=map[idss[i]].name;$("#"+idss[i]+" label").html(name);opts="";$.each(map[idss[i]].items,function(n,v) {opts+="<option value='"+v.value+"'>"+v.name+"</option>";});$("#"+idss[i]+" select").append(opts);}}}
|
||||
//适应手机
|
||||
if("ontouchend" in document) {$(".chosen-select").removeClass("chosen-select");}
|
||||
//下拉框样式
|
||||
else{$(".chosen-select").chosen(); $(".chosen-select-deselect").chosen({allow_single_deselect:true});}}});
|
||||
}
|
||||
},
|
||||
Page:{//跳转分页
|
||||
jump:function(formId,num,JpFun){$("#"+formId+" .pageNum").val(num);eval(JpFun+"()");},
|
||||
//设置分页单个显示数量
|
||||
setSize:function(formId,size,JpFun){$("#"+formId+" .pageNum").val(1);$("#"+formId+" .pageSize").val(size);eval(JpFun+"()");},
|
||||
/*自定义跳转分页*/
|
||||
jumpCustom:function(formId,pageId,leng,JpFun){var choseJPage=$("#"+pageId+" .choseJPage").val();if(typeof(choseJPage) == "undefined")return;else if(choseJPage==0)choseJPage=1;else if(choseJPage>leng)choseJPage=leng;$("#"+formId+" .pageNum").val(choseJPage);eval(JpFun+"()");},
|
||||
/*设置分页方法,formId 分页参数Form的Id,pageId 分页位置Id,pagesize 分页显示数量,pagenum 页码,totalCount 数据总数,fun 获得数据方法名*/
|
||||
setPage:function(formId,pageId,pagesize,pagenum,totalCount,fun){
|
||||
if(totalCount>0){
|
||||
var pageul = $("#"+pageId+" ul"),html="";
|
||||
pageul.empty();
|
||||
var leng = parseInt((totalCount - 1)/pagesize)+1;
|
||||
if(pagenum - 1 >= 1){html+="<li class='prev'><a onclick='JY.Page.jump('"+formId+"',1,'"+fun+"')' href='#'>首页</a></li>";html+="<li class='prev'><a onclick='JY.Page.jump('"+formId+"',"+(pagenum - 1)+",'"+fun+"')' href='#'>上页</a></li>";}
|
||||
else{html+="<li class='prev disabled'><a href='##'>首页</a></li>";html+="<li class='prev disabled'><a href='##'>上页</a></li>";}
|
||||
var all = leng>2?2:leng;//总显示个数,正常为all+1条,现在设2,显示为3条
|
||||
var start = 1;
|
||||
//all/2取整后的页数减去当前页数,判断是否为大于0
|
||||
var before = pagenum - parseInt(all/2);
|
||||
if(before > 1)start = before;
|
||||
var end = start + all;
|
||||
if(end > leng){end = leng;start = leng > all ? (leng - all) : 1;}
|
||||
//现在设2,和显示对应
|
||||
if(pagenum>2&&leng>3){html+="<li class='' ><a href='#' onclick='JY.Page.jump('"+formId+"',"+(pagenum-2)+",'"+fun+"')' >..</a></li>";}
|
||||
for(var ii = start ; ii <= end; ii++){
|
||||
var page = (parseInt(ii));
|
||||
if(pagenum==page){html+="<li class='active' ><a href='#'>"+page+"</a></li>";}
|
||||
else{html+="<li><a onclick='JY.Page.jump('"+formId+"',"+ii+",'"+fun+"')' href='#'>"+page+"</a></li>";}
|
||||
}
|
||||
if(pagenum<=(leng-2)&&leng>3){html+="<li class='' ><a href='#' onclick='JY.Page.jump('"+formId+"',"+(pagenum+2)+",'"+fun+"')' >..</a></li>";}
|
||||
if(pagenum + 1 <= leng){html+="<li class='next'><a onclick='JY.Page.jump('"+formId+"',"+(pagenum + 1)+",'"+fun+"')' href='#'>下页</a></li>";html+="<li class='next'><a onclick='JY.Page.jump('"+formId+"',"+leng+",'"+fun+"')' href='#'>尾页</a></li>";}
|
||||
else{html+="<li class='next disabled'><a href='##'>下页</a></li>";html+="<li class='next disabled'><a href='##'>尾页</i></a></li>";}
|
||||
html+="<li class='disabled'><a href='##'>共"+leng+"页<font color='red'>"+totalCount+"</font>条</a></li>";
|
||||
// html+="<li class='disabled'><select onchange='JY.Page.setSize('"+formId+"',this.value,'"+fun+"')' style='width:55px;float:left;height:30px;background-color: #033059;color:#ffffff' title='显示条数'>"+"<option value='5' "+((pagesize==5)?"selected='selected'":"")+" >5</option>" +"<option value='10' "+((pagesize==10)?"selected='selected'":"")+" >10</option>" +"<option value='15' "+((pagesize==15)?"selected='selected'":"")+" >15</option>"+"</li>";
|
||||
pageul.append(html);
|
||||
}
|
||||
},
|
||||
/*简化版,设置分页方法,formId 分页参数Form的Id,pageId 分页位置Id,pagesize 分页显示数量,pagenum 页码,totalCount 数据总数,fun 获得数据方法名*/
|
||||
setSimPage:function(formId,pageId,pagesize,pagenum,totalCount,fun){
|
||||
if(totalCount>0){
|
||||
var pageul = $("#"+pageId+" ul"),html="";
|
||||
pageul.empty();
|
||||
var leng = parseInt((totalCount - 1)/pagesize)+1;
|
||||
if(pagenum - 1 >= 1){html+="<li class='prev'><a onclick='JY.Page.jump('"+formId+"',1,'"+fun+"')' href='#'>首</a></li>";}
|
||||
else{html+="<li class='prev disabled'><a href='##'>首</a></li>";}
|
||||
var all = leng>2?2:leng;//总显示个数,正常为all+1条,现在设2,显示为3条
|
||||
var start = 1;
|
||||
//all/2取整后的页数减去当前页数,判断是否为大于0
|
||||
var before = pagenum - parseInt(all/2);
|
||||
if(before > 1)start = before;
|
||||
var end = start + all;
|
||||
if(end > leng){end = leng;start = leng > all ? (leng - all) : 1;}
|
||||
//现在设2,和显示对应
|
||||
if(pagenum>2&&leng>3){html+="<li class='' ><a href='#' onclick='JY.Page.jump('"+formId+"',"+(pagenum-2)+",'"+fun+"')' >..</a></li>";}
|
||||
for(var ii = start ; ii <= end; ii++){
|
||||
var page = (parseInt(ii));
|
||||
if(pagenum==page){html+="<li class='active' ><a href='#'>"+page+"</a></li>";}
|
||||
else{html+="<li><a onclick='JY.Page.jump('"+formId+"',"+ii+",'"+fun+"')' href='#'>"+page+"</a></li>";}
|
||||
}
|
||||
if(pagenum<=(leng-2)&&leng>3){html+="<li class='' ><a href='#' onclick='JY.Page.jump('"+formId+"',"+(pagenum+2)+",'"+fun+"')' >..</a></li>";}
|
||||
if(pagenum + 1 <= leng){html+="<li class='next'><a onclick='JY.Page.jump('"+formId+"',"+leng+",'"+fun+"')' href='#'>尾</a></li>";}
|
||||
else{html+="<li class='next disabled'><a href='##'>尾</i></a></li>";}
|
||||
html+="<li class='disabled'><a href='##'>共"+leng+"页</a></li>";
|
||||
pageul.append(html);
|
||||
}
|
||||
}
|
||||
},
|
||||
Tags:{//设置按钮用的方法,id 这行的id,pBtn 按钮组
|
||||
cleanForm:function(formId){$("#"+formId+" input[type$='text']").val("");$("#"+formId+" textarea").val("");},
|
||||
setFunction:function(id,pBtn){
|
||||
var h="";
|
||||
if(pBtn!=null&&pBtn.length>0){
|
||||
h+="<td class='center'>";
|
||||
h+="<div class='visible-md visible-lg hidden-sm hidden-xs btn-group'>";
|
||||
for(var i=0;i<pBtn.length;i++){h+="<a href='#' title='"+JY.Object.notEmpty(pBtn[i].name)+"' onclick='"+JY.Object.notEmpty(pBtn[i].btnFun)+"('"+id+"')' class='aBtnNoTD' ><i class='"+pBtn[i].icon+" bigger-140'></i></a>";}
|
||||
h+="</div>";
|
||||
h+="<div class='visible-xs visible-sm hidden-md hidden-lg'><div class='inline position-relative'>";
|
||||
h+="<button class='btn btn-minier btn-primary dropdown-toggle' data-toggle='dropdown'><i class='icon-cog icon-only bigger-110'></i></button>";
|
||||
h+="<ul class='dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close'>";
|
||||
for(var i=0;i<pBtn.length;i++){h+="<li><a href='#' title='"+JY.Object.notEmpty(pBtn[i].name)+"' onclick='"+JY.Object.notEmpty(pBtn[i].btnFun)+"('"+id+"')' class='aBtnNoTD' ><i class='"+pBtn[i].icon+" bigger-140'></i></a></li>";}
|
||||
h+="</ul></div></div>";
|
||||
h+="</td>";
|
||||
}else{h+="<td></td>";}
|
||||
return h;
|
||||
},
|
||||
/*class是isValidCheckbox的选择框Yes或No,value设为1或0
|
||||
*formId form的Id
|
||||
*/
|
||||
isValid:function(formId,val){$("#"+formId+" .isValidCheckbox [hi-isValid]").val(val);if(val==1){$("#"+formId+" .isValidCheckbox [sh-isValid]").prop("checked",true);}else{$("#"+formId+" .isValidCheckbox [sh-isValid]").prop("checked",false);}}
|
||||
},
|
||||
Validate:{//判断是否是英文数字,是返回true,不是返回false
|
||||
isEnNum:function(str){if(/^[0-9a-zA-Z]+$/.test(str))return true;return false;},
|
||||
//判断是否是英文,是返回true,不是返回false
|
||||
isEn:function(str){if(/^[A-Za-z]+$/.test(str))return true;return false;},
|
||||
//判断是否是电子邮箱,是返回true,不是返回false
|
||||
isEmail:function(email){if(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email))return true;return false;},
|
||||
//判断是否是日期,是返回true,不是返回false
|
||||
isDate:function(date){if(date.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/))return true;return false;},
|
||||
//判断是否是日期时间,是返回true,不是返回false
|
||||
isDatetime:function(datetime){if(datetime.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/))return true;return false;},
|
||||
//判断是否为合法http(s)
|
||||
isUrl:function(str){if(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(str))return true;return false;},
|
||||
//判断数值是否在范围内(不包含临界):min 最少值,max 最大值,是返回true,不是返回false
|
||||
numrange:function(v,min,max){v=parseInt(v);min=parseInt(min);max=parseInt(max);if((min<v)&&(v<max))return true;return false;},
|
||||
//判断数值是否在范围内(包含临界),min 最少值,max 最大值,是返回true,不是返回false
|
||||
numrangeth:function(v,min,max){v=parseInt(v);min=parseInt(min);max=parseInt(max);if((min<=v)&&(v<=max))return true;return false;},
|
||||
//表单验证fromId,使用方法 在表单必须使用jyValidate属性
|
||||
form:function(fromId,side) {var res=true;side=JY.Object.notNull(side)?side:1;
|
||||
$('#'+fromId+" input[jyValidate]").each(function(){
|
||||
if(res==false)return;var that=$(this);
|
||||
var jyValidate = $(this).attr("jyValidate").split(",");$.each(jyValidate,function(n,v){
|
||||
if(res==false)return;
|
||||
if(v=='required'){if(!JY.Object.notNull(that.val())){that.tips({side:side,msg : "必要字段!",bg:'#FF2D2D',time:1});that.focus();res=false;}}
|
||||
else if(v=='email'){if(JY.Object.notNull(that.val())){if(!JY.Validate.isEmail(that.val())){that.tips({side:side,msg : "电子邮箱不正确!",bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='date'){if(JY.Object.notNull(that.val())){if(!JY.Validate.isDate(that.val())){that.tips({side:side,msg : "日期格式不正确!",bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='datetime'){if(JY.Object.notNull(that.val())){if(!JY.Validate.isDatetime(that.val())){that.tips({side:side,msg : "日期时间格式不正确!",bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='numrange'){if(JY.Object.notNull(that.val())){var min=that.attr("min");var max=that.attr("max");if(!JY.Validate.numrange(that.val(),min,max)){that.tips({side:side,msg : "数字范围:"+min+"~"+max,bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='numrangeth'){if(JY.Object.notNull(that.val())){var min=that.attr("min");var max=that.attr("max"); if(!JY.Validate.numrangeth(that.val(),min,max)){that.tips({side:side,msg :"数字范围:"+min+"~"+max,bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='en'){if(JY.Object.notNull(that.val())){if(!JY.Validate.isEn(that.val())){that.tips({side:side,msg:"只能输入英文",bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
else if(v=='ennum'){if(JY.Object.notNull(that.val())){if(!JY.Validate.isEnNum(that.val())){that.tips({side:side,msg:"只能输入英文或数字",bg :'#FF2D2D',time:1});that.focus();res=false;}}}
|
||||
//extend
|
||||
});});
|
||||
return res;}
|
||||
},
|
||||
Date:{//时间格式化(默认),time 时间
|
||||
Default:function(time){return JY.Object.notNull(time)?(new Date(time).Format("yyyy-MM-dd hh:mm:ss")):" ";},
|
||||
//时间格式化,time 时间,fmt 格式
|
||||
Format:function(time,fmt){return JY.Object.notNull(time)?(new Date(time).Format(fmt)):"";}
|
||||
},
|
||||
Url:{//获取url中的参数,name 参数名,当不存在返回空字符串
|
||||
getParam:function(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
||||
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
||||
if (r != null) return unescape(r[2]); return ""; //返回参数值
|
||||
}
|
||||
},
|
||||
Ajax:{//异步请求, form表单ID,url请求路径,param参数对象,如:{a:'test',b:2},fn回调函数
|
||||
doRequest:function(form,url,param,fn){var params = form || param || {};if (typeof form == 'string'){params = $.extend(param || {},JY.Object.serialize($("#" + form)),{menu:JY.Url.getParam("menu")});}$.ajax({type:'POST',url:url,data:params,dataType:'json',success:function(data, textStatus) { if(data.res==1){if (typeof(fn)=='function'){fn.call(this, data);}}else{if(JY.Object.notNull(data.resMsg))JY.Model.error(data.resMsg);}},error:function(){return;},beforeSend:function(){},complete:function(){}});},
|
||||
req:function(form,url,param,fn){var params = form || param || {};if (typeof form == 'string'){params = $.extend(param || {},JY.Object.serialize($("#" + form)),{menu:JY.Url.getParam("menu")});}$.ajax({type:'POST',url:url,data:params,dataType:'json',success:function(data, textStatus) {if (typeof(fn)=='function'){fn.call(this, data);}},error:function(){return;},beforeSend:function(){},complete:function(){}});}
|
||||
},
|
||||
File:{
|
||||
//obj:对象传this, aFmats:允许格式,用"|"分隔
|
||||
fileType:function(obj,aFmats){
|
||||
if(JY.Object.notNull(aFmats)){var fileType=obj.value.substr(obj.value.lastIndexOf(".")+1).toLowerCase();//获得文件后缀名
|
||||
var aFmat=aFmats.split("|");for (f in aFmat){if(aFmat[f]==fileType){return;}}$(obj).tips({side:3,msg:'请上传'+aFmats+'格式的文件',bg:'#FF2D2D',time:3});$(obj).val('');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* @Author: zhangtq 2452618307@qq.com
|
||||
* @Date: 2024-11-18 13:33:30
|
||||
* @LastEditors: zhangtq 2452618307@qq.com
|
||||
* @LastEditTime: 2024-11-18 13:36:08
|
||||
* @FilePath: static/js/core/public.js
|
||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||
*/
|
||||
var dataUrl = "http://192.168.0.59:1938/video/";
|
||||
$(function() {
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取当日时间
|
||||
*/
|
||||
function getNowTime() {
|
||||
var nowDate = new Date();
|
||||
var year = nowDate.getFullYear();
|
||||
var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) :
|
||||
nowDate.getMonth() + 1;
|
||||
var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
|
||||
var dateStr = year + "-" + month + "-" + day;
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
function getNowMonth() {
|
||||
var nowDate = new Date();
|
||||
var year = nowDate.getFullYear();
|
||||
var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) :
|
||||
nowDate.getMonth() + 1;
|
||||
var dateStr = year + "-" + month ;
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
function isNull(str) {
|
||||
if (str == null) {
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
//判断字符是否为空的方法
|
||||
function isEmpty(obj) {
|
||||
return typeof obj == "undefined" || obj == null || obj === "" || obj === '';
|
||||
}
|
||||
|
||||
function transformation(obj) {
|
||||
if (typeof obj == "undefined" || obj == null || obj === "" || obj === '') {
|
||||
return "";
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
|
@ -0,0 +1,174 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>百度地图</title>
|
||||
<style type="text/css">
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#mapPage {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#container {
|
||||
height: 100%;
|
||||
}
|
||||
.input-value {
|
||||
margin: 0 3%;
|
||||
position: fixed;
|
||||
top: 136px;
|
||||
left: 0;
|
||||
width: 88%;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
}
|
||||
.input-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0.5px solid #3888ff;
|
||||
outline: none;
|
||||
padding: 0 10px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
.btn {
|
||||
margin: 0 6%;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
left: 0;
|
||||
width: 88%;
|
||||
height: 40px;
|
||||
background-color: #3888ff;
|
||||
border: none;
|
||||
z-index: 999;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
}
|
||||
.btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="input-value">
|
||||
<input class="input-item" type="text" name="" id="inputValue" placeholder="请输入工程地址" />
|
||||
</div>
|
||||
<div id="mapPage">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
<button class="btn" id="btn">确定</button>
|
||||
</body>
|
||||
<!-- 微信 JS-SDK 如果不需要兼容小程序,则无需引用此 JS 文件 -->
|
||||
<!-- <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> -->
|
||||
|
||||
<!-- uni 的 SDK -->
|
||||
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
|
||||
|
||||
<!-- 百度地图 -->
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://api.map.baidu.com/api?v=3.0&&type=webgl&ak=cClgLBaLgGUdQDilX9dGvieL"
|
||||
></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
||||
var projectAddress = ''
|
||||
var latitude = ''
|
||||
var longitude = ''
|
||||
// 获取当前位置的经纬度
|
||||
var map = new BMapGL.Map('container') // 创建地图实例
|
||||
var Geocoder = new BMapGL.Geocoder() // 创建地址解析实例
|
||||
var geolocation = new BMapGL.Geolocation() // 创建定位实例
|
||||
var point = new BMapGL.Point(106.23849, 38.49246) // 创建点坐标
|
||||
var marker = new BMapGL.Marker(point) // 创建标记
|
||||
try {
|
||||
geolocation.getCurrentPosition(function (r) {
|
||||
console.log('🚀 ~ map:', map)
|
||||
if (this.getStatus() == BMAP_STATUS_SUCCESS) {
|
||||
latitude = r.point.lat
|
||||
longitude = r.point.lng
|
||||
point = new BMapGL.Point(longitude, latitude) // 创建点坐标
|
||||
map.panTo(point) // 将当前位置设置为地图中心
|
||||
marker = new BMapGL.Marker(point) // 创建标记
|
||||
map.addOverlay(marker) // 将标记添加到地图中
|
||||
console.log('🚀 ~ 地址获成功:', latitude, longitude)
|
||||
} else {
|
||||
console.log('err-地址获取失败' + this.getStatus())
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ error:', error)
|
||||
map.panTo(point)
|
||||
map.addOverlay(marker) // 将标记添加到地图中
|
||||
}
|
||||
map.centerAndZoom(point, 15) // 初始化地图,设置中心点坐标和地图级别
|
||||
map.enableScrollWheelZoom(true) //开启鼠标滚轮缩放
|
||||
// map.setHeading(64.5); //设置地图旋转角度
|
||||
// map.setTilt(73); //设置地图的倾斜角度
|
||||
// 点击地图获取经纬度
|
||||
map.addEventListener('click', e => {
|
||||
// console.log('🚀 ~ $nextTick ~ e.point:', e.latlng)
|
||||
longitude = e.latlng.lng
|
||||
latitude = e.latlng.lat
|
||||
// 将标记点移动到点击位置
|
||||
marker.setPosition(e.latlng)
|
||||
// 将点击位置设置为地图中心
|
||||
map.panTo(e.latlng)
|
||||
// 获取点击位置的中文地址
|
||||
Geocoder.getLocation(e.latlng, res => {
|
||||
// console.log('🚀 ~ $nextTick ~ res:', res)
|
||||
projectAddress = res.address + res.content.poi_desc || ''
|
||||
// 将地址设置到输入框
|
||||
document.getElementById('inputValue').value = projectAddress
|
||||
})
|
||||
})
|
||||
|
||||
// 失去焦点执行
|
||||
document.getElementById('inputValue').addEventListener('input', handleInput)
|
||||
|
||||
function handleInput() {
|
||||
setTimeout(() => {
|
||||
Geocoder.getPoint(document.getElementById('inputValue').value, point => {
|
||||
if (point) {
|
||||
longitude = point.lng
|
||||
latitude = point.lat
|
||||
// 将标记点移动到点击位置
|
||||
marker.setPosition(point)
|
||||
// 将点击位置设置为地图中心
|
||||
map.panTo(point)
|
||||
// 获取点击位置的中文地址
|
||||
Geocoder.getLocation(point, res => {
|
||||
// console.log('🚀 ~ $nextTick ~ res:', res)
|
||||
projectAddress = res.address + res.content.poi_desc || ''
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
|
||||
document.getElementById('btn').addEventListener('click', handleBtn)
|
||||
|
||||
function handleBtn() {
|
||||
setTimeout(() => {
|
||||
console.log('🚀 ~ projectAddress:', projectAddress)
|
||||
uni.postMessage({
|
||||
data: {
|
||||
latitude,
|
||||
longitude,
|
||||
projectAddress
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||