mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 03:42:05 +00:00
Merge: Snapmaker Orca 2.1.2
This commit is contained in:
183
resources/web/preset_bind/24/24.css
Normal file
183
resources/web/preset_bind/24/24.css
Normal file
@@ -0,0 +1,183 @@
|
||||
#Content
|
||||
{
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
.BlockBanner
|
||||
{
|
||||
padding: 0px;
|
||||
border-bottom:#009688 1px solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.BlockBanner a
|
||||
{
|
||||
display: inline-block;
|
||||
background-color:#009688;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
padding: 0px 24px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.PrinterArea
|
||||
{
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.PrinterBlock
|
||||
{
|
||||
width: 160px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.PrinterBlock img
|
||||
{
|
||||
width:160px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.PName
|
||||
{
|
||||
font-weight: 700;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.pNozzel
|
||||
{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content:flex-start;
|
||||
color: #5A5A5A;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.pNozzel input[type="radio"] {
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pNozzel input[type="radio"] {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid #009688;
|
||||
border-radius: 50%;
|
||||
outline: none;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pNozzel input[type="radio"]:checked {
|
||||
background-color: #009688;
|
||||
border-color: #009688;
|
||||
}
|
||||
|
||||
.pNozzel input[type="radio"]:checked:after {
|
||||
content: '';
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: white;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/*-----Notice-----*/
|
||||
#NoticeMask
|
||||
{
|
||||
background-color: #000;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
opacity: 0.05;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#NoticeBody
|
||||
{
|
||||
display: none;
|
||||
width: 400px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 4px;
|
||||
background-color: inherit;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 200px;
|
||||
margin-left: -200px;
|
||||
}
|
||||
|
||||
#NoticeBar
|
||||
{
|
||||
background-color:#00f0d8;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#NoticeContent
|
||||
{
|
||||
padding: 4mm 10mm;
|
||||
}
|
||||
|
||||
|
||||
#NoticeBtns
|
||||
{
|
||||
margin-top: 4mm;
|
||||
display: flex;
|
||||
justify-content:space-around;
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.searchTerm {
|
||||
width: 100%;
|
||||
border: 3px solid #009688;
|
||||
/*border-right: none;*/
|
||||
padding: 5px;
|
||||
height: 20px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
outline: none;
|
||||
color: #9DBFAF;
|
||||
}
|
||||
|
||||
.searchTerm:focus{
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
/*Resize the wrap to see the search bar change!*/
|
||||
.wrap{
|
||||
width: 30%;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
/* 修改确定按钮的样式和位置 */
|
||||
#AcceptArea {
|
||||
display: flex;
|
||||
justify-content: flex-end; /* 改为右对齐 */
|
||||
padding: 20px 40px; /* 增加右边距,让按钮不贴边 */
|
||||
}
|
||||
|
||||
.NormalBtn {
|
||||
min-width: 80px; /* 设置最小宽度 */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 移除GrayBtn样式 */
|
||||
429
resources/web/preset_bind/24/24.js
Normal file
429
resources/web/preset_bind/24/24.js
Normal file
@@ -0,0 +1,429 @@
|
||||
function OnInit()
|
||||
{
|
||||
//let strInput=JSON.stringify(cData);
|
||||
//HandleStudio(strInput);
|
||||
|
||||
TranslatePage();
|
||||
|
||||
RequestProfile();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function RequestProfile()
|
||||
{
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="request_userguide_profile";
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
function HandleStudio( pVal )
|
||||
{
|
||||
// alert(strInput);
|
||||
// alert(JSON.stringify(strInput));
|
||||
//
|
||||
// let pVal=IsJson(strInput);
|
||||
// if(pVal==null)
|
||||
// {
|
||||
// alert("Msg Format Error is not Json");
|
||||
// return;
|
||||
// }
|
||||
|
||||
let strCmd=pVal['command'];
|
||||
//alert(strCmd);
|
||||
|
||||
if(strCmd=='response_userguide_profile')
|
||||
{
|
||||
HandleModelList(pVal['response']);
|
||||
}
|
||||
}
|
||||
|
||||
function ShowPrinterThumb(pItem, strImg)
|
||||
{
|
||||
$(pItem).attr('src',strImg);
|
||||
$(pItem).attr('onerror',null);
|
||||
}
|
||||
|
||||
function HandleModelList( pVal )
|
||||
{
|
||||
if( !pVal.hasOwnProperty("model") )
|
||||
return;
|
||||
|
||||
pModel=pVal['model'];
|
||||
|
||||
let nTotal=pModel.length;
|
||||
let ModelHtml={};
|
||||
for(let n=0;n<nTotal;n++)
|
||||
{
|
||||
let OneModel=pModel[n];
|
||||
|
||||
let strVendor=OneModel['vendor'];
|
||||
|
||||
//Add Vendor Html Node
|
||||
if($(".OneVendorBlock[vendor='"+strVendor+"']").length==0)
|
||||
{
|
||||
let sVV=strVendor;
|
||||
if( sVV=="BBL" )
|
||||
sVV="Bambu Lab";
|
||||
if( sVV=="Custom")
|
||||
sVV="Custom Printer";
|
||||
if( sVV=="Other")
|
||||
sVV="Orca colosseum";
|
||||
|
||||
let HtmlNewVendor='<div class="OneVendorBlock" Vendor="'+strVendor+'">'+
|
||||
'<div class="BlockBanner">'+
|
||||
' <a>'+sVV+'</a>'+
|
||||
'</div>'+
|
||||
'<div class="PrinterArea"> '+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
||||
$('#Content').append(HtmlNewVendor);
|
||||
}
|
||||
|
||||
let ModelName=OneModel['model'];
|
||||
|
||||
//Collect Html Node Nozzel Html
|
||||
if( !ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor]='';
|
||||
|
||||
let NozzleArray=OneModel['nozzle_diameter'].split(';');
|
||||
let HtmlNozzel='';
|
||||
for(let m=0;m<NozzleArray.length;m++)
|
||||
{
|
||||
let nNozzel=NozzleArray[m];
|
||||
HtmlNozzel += '<div class="pNozzel TextS2">' +
|
||||
'<input type="radio" ' +
|
||||
'name="nozzle_selection" ' +
|
||||
'model="' + OneModel['model'] + '" ' +
|
||||
'nozzel="' + nNozzel + '" ' +
|
||||
'vendor="' + strVendor + '" ' +
|
||||
'onclick="CheckBoxOnclick(this)" />' +
|
||||
'<span>' + nNozzel + '</span>' +
|
||||
'<span class="trans" tid="t13">mm nozzle</span></div>';
|
||||
}
|
||||
|
||||
let CoverImage=OneModel['cover'];
|
||||
ModelHtml[strVendor]+='<div class="PrinterBlock">'+
|
||||
' <div class="PImg"><img src="'+CoverImage+'" /></div>'+
|
||||
' <div class="PName">'+OneModel['model']+'</div>'+ HtmlNozzel +'</div>';
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
for( let key in ModelHtml )
|
||||
{
|
||||
$(".OneVendorBlock[vendor='"+key+"'] .PrinterArea").append( ModelHtml[key] );
|
||||
}
|
||||
|
||||
|
||||
//Update Checkbox
|
||||
$('input').prop("checked", false);
|
||||
for(let m=0;m<nTotal;m++)
|
||||
{
|
||||
let OneModel=pModel[m];
|
||||
|
||||
let SelectList=OneModel['nozzle_selected'];
|
||||
if(SelectList!='')
|
||||
{
|
||||
SelectList=OneModel['nozzle_selected'].split(';');
|
||||
let nLen=SelectList.length;
|
||||
|
||||
for(let a=0;a<nLen;a++)
|
||||
{
|
||||
let nNozzel=SelectList[a];
|
||||
$("input[vendor='" + OneModel['vendor'] + "'][model='" + OneModel['model'] + "'][nozzel='" + nNozzel + "']").prop("checked", true);
|
||||
|
||||
SetModelSelect(OneModel['vendor'], OneModel['model'], nNozzel, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("input[vendor='"+OneModel['vendor']+"'][model='"+OneModel['model']+"']").prop("checked", false);
|
||||
}
|
||||
}
|
||||
|
||||
// let AlreadySelect=$("input:checked");
|
||||
// let nSelect=AlreadySelect.length;
|
||||
// if(nSelect==0)
|
||||
// {
|
||||
// $("input[nozzel='0.4'][vendor='Custom']").prop("checked", true);
|
||||
// }
|
||||
|
||||
TranslatePage();
|
||||
}
|
||||
|
||||
function CheckBoxOnclick(obj) {
|
||||
// 清除所有已选状态
|
||||
ModelNozzleSelected = {};
|
||||
|
||||
// 只记录当前选中的选项
|
||||
if(obj.checked) {
|
||||
let strModel = obj.getAttribute("model");
|
||||
let strVendor = obj.getAttribute("vendor");
|
||||
let strNozzel = obj.getAttribute("nozzel");
|
||||
|
||||
if(!ModelNozzleSelected.hasOwnProperty(strVendor))
|
||||
ModelNozzleSelected[strVendor] = {};
|
||||
if(!ModelNozzleSelected[strVendor].hasOwnProperty(strModel))
|
||||
ModelNozzleSelected[strVendor][strModel] = {};
|
||||
|
||||
ModelNozzleSelected[strVendor][strModel][strNozzel] = true;
|
||||
}
|
||||
}
|
||||
|
||||
function SetModelSelect(vendor, model, nozzel, checked) {
|
||||
if (!ModelNozzleSelected.hasOwnProperty(vendor) && !checked) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ModelNozzleSelected.hasOwnProperty(vendor) && checked) {
|
||||
ModelNozzleSelected[vendor] = {};
|
||||
}
|
||||
|
||||
let oVendor = ModelNozzleSelected[vendor];
|
||||
if (!oVendor.hasOwnProperty(model)) {
|
||||
oVendor[model] = {};
|
||||
}
|
||||
|
||||
let oModel = oVendor[model];
|
||||
if (oModel.hasOwnProperty(nozzel) || checked) {
|
||||
oVendor[model][nozzel] = checked;
|
||||
}
|
||||
}
|
||||
|
||||
function GetModelSelect(vendor, model, nozzel) {
|
||||
if (!ModelNozzleSelected.hasOwnProperty(vendor)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let oVendor = ModelNozzleSelected[vendor];
|
||||
if (!oVendor.hasOwnProperty(model)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let oModel = oVendor[model];
|
||||
if (!oModel.hasOwnProperty(nozzel)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return oVendor[model][nozzel];
|
||||
}
|
||||
|
||||
function FilterModelList(keyword) {
|
||||
// 移除保存checkbox状态的代码
|
||||
/*
|
||||
let ModelSelect = $('input[type=checkbox]');
|
||||
for (let n = 0; n < ModelSelect.length; n++) {
|
||||
let OneItem = ModelSelect[n];
|
||||
let strModel = OneItem.getAttribute("model");
|
||||
let strVendor = OneItem.getAttribute("vendor");
|
||||
let strNozzel = OneItem.getAttribute("nozzel");
|
||||
SetModelSelect(strVendor, strModel, strNozzel, OneItem.checked);
|
||||
}
|
||||
*/
|
||||
|
||||
let nTotal = pModel.length;
|
||||
let ModelHtml = {};
|
||||
|
||||
$('#Content').empty();
|
||||
for (let n = 0; n < nTotal; n++) {
|
||||
let OneModel = pModel[n];
|
||||
|
||||
let strVendor = OneModel['vendor'];
|
||||
let ModelName = OneModel['model'];
|
||||
if (ModelName.toLowerCase().indexOf(keyword.toLowerCase()) == -1)
|
||||
continue;
|
||||
|
||||
//Add Vendor Html Node
|
||||
if ($(".OneVendorBlock[vendor='" + strVendor + "']").length == 0) {
|
||||
let sVV = strVendor;
|
||||
if (sVV == "BBL")
|
||||
sVV = "Bambu Lab";
|
||||
if (sVV == "Custom")
|
||||
sVV = "Custom Printer";
|
||||
if (sVV == "Other")
|
||||
sVV = "Orca colosseum";
|
||||
|
||||
let HtmlNewVendor = '<div class="OneVendorBlock" Vendor="' + strVendor + '">' +
|
||||
'<div class="BlockBanner">' +
|
||||
' <a>' + sVV + '</a>' +
|
||||
'</div>' +
|
||||
'<div class="PrinterArea"> ' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$('#Content').append(HtmlNewVendor);
|
||||
}
|
||||
|
||||
//Collect Html Node Nozzel Html
|
||||
if (!ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor] = '';
|
||||
|
||||
let NozzleArray = OneModel['nozzle_diameter'].split(';');
|
||||
let HtmlNozzel = '';
|
||||
for (let m = 0; m < NozzleArray.length; m++) {
|
||||
let nNozzel = NozzleArray[m];
|
||||
HtmlNozzel += '<div class="pNozzel TextS2">' +
|
||||
'<input type="radio" ' +
|
||||
'name="nozzle_selection" ' +
|
||||
'model="' + OneModel['model'] + '" ' +
|
||||
'nozzel="' + nNozzel + '" ' +
|
||||
'vendor="' + strVendor + '" ' +
|
||||
'onclick="CheckBoxOnclick(this)" />' +
|
||||
'<span>' + nNozzel + '</span>' +
|
||||
'<span class="trans" tid="t13">mm nozzle</span></div>';
|
||||
}
|
||||
|
||||
let CoverImage = OneModel['cover'];
|
||||
ModelHtml[strVendor] += '<div class="PrinterBlock">' +
|
||||
' <div class="PImg"><img src="' + CoverImage + '" /></div>' +
|
||||
' <div class="PName">' + OneModel['model'] + '</div>' + HtmlNozzel + '</div>';
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
for (let key in ModelHtml) {
|
||||
let obj = $(".OneVendorBlock[vendor='" + key + "'] .PrinterArea");
|
||||
obj.empty();
|
||||
obj.append(ModelHtml[key]);
|
||||
}
|
||||
|
||||
// 更新radio选中状态
|
||||
$('input[type="radio"]').each(function() {
|
||||
let strModel = $(this).attr("model");
|
||||
let strVendor = $(this).attr("vendor");
|
||||
let strNozzel = $(this).attr("nozzel");
|
||||
|
||||
if(ModelNozzleSelected[strVendor] &&
|
||||
ModelNozzleSelected[strVendor][strModel] &&
|
||||
ModelNozzleSelected[strVendor][strModel][strNozzel]) {
|
||||
$(this).prop("checked", true);
|
||||
}
|
||||
});
|
||||
|
||||
TranslatePage();
|
||||
}
|
||||
|
||||
function OnExitFilter() {
|
||||
|
||||
let nTotal = 0;
|
||||
let ModelAll = {};
|
||||
for (vendor in ModelNozzleSelected) {
|
||||
for (model in ModelNozzleSelected[vendor]) {
|
||||
for (nozzel in ModelNozzleSelected[vendor][model]) {
|
||||
if (!ModelNozzleSelected[vendor][model][nozzel])
|
||||
continue;
|
||||
|
||||
if (!ModelAll.hasOwnProperty(model)) {
|
||||
//alert("ADD: "+strModel);
|
||||
|
||||
ModelAll[model] = {};
|
||||
|
||||
ModelAll[model]["model"] = model;
|
||||
ModelAll[model]["nozzle_diameter"] = '';
|
||||
ModelAll[model]["vendor"] = vendor;
|
||||
}
|
||||
|
||||
ModelAll[model]["nozzle_diameter"] += ModelAll[model]["nozzle_diameter"] == '' ? nozzel : ';' + nozzel;
|
||||
|
||||
nTotal++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var tSend = {};
|
||||
tSend['sequence_id'] = Math.round(new Date() / 1000);
|
||||
tSend['command'] = "save_userguide_models";
|
||||
tSend['data'] = ModelAll;
|
||||
|
||||
SendWXMessage(JSON.stringify(tSend));
|
||||
|
||||
return nTotal;
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
function OnExit()
|
||||
{
|
||||
let ModelAll={};
|
||||
|
||||
let ModelSelect=$("input:checked");
|
||||
let nTotal=ModelSelect.length;
|
||||
|
||||
if( nTotal==0 )
|
||||
{
|
||||
ShowNotice(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(let n=0;n<nTotal;n++)
|
||||
{
|
||||
let OneItem=ModelSelect[n];
|
||||
|
||||
let strModel=OneItem.getAttribute("model");
|
||||
let strVendor=OneItem.getAttribute("vendor");
|
||||
let strNozzel=OneItem.getAttribute("nozzel");
|
||||
|
||||
//alert(strModel+strVendor+strNozzel);
|
||||
|
||||
if(!ModelAll.hasOwnProperty(strModel))
|
||||
{
|
||||
//alert("ADD: "+strModel);
|
||||
|
||||
ModelAll[strModel]={};
|
||||
|
||||
ModelAll[strModel]["model"]=strModel;
|
||||
ModelAll[strModel]["nozzle_diameter"]='';
|
||||
ModelAll[strModel]["vendor"]=strVendor;
|
||||
}
|
||||
|
||||
ModelAll[strModel]["nozzle_diameter"]+=ModelAll[strModel]["nozzle_diameter"]==''?strNozzel:';'+strNozzel;
|
||||
}
|
||||
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="save_userguide_models";
|
||||
tSend['data']=ModelAll;
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
|
||||
return nTotal;
|
||||
}
|
||||
|
||||
|
||||
function ShowNotice( nShow )
|
||||
{
|
||||
if(nShow==0)
|
||||
{
|
||||
$("#NoticeMask").hide();
|
||||
$("#NoticeBody").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#NoticeMask").show();
|
||||
$("#NoticeBody").show();
|
||||
}
|
||||
}
|
||||
|
||||
function ConfirmSelect()
|
||||
{
|
||||
let nChoose=OnExitFilter();
|
||||
|
||||
if(nChoose>0)
|
||||
{
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="user_guide_finish";
|
||||
tSend['data']={};
|
||||
tSend['data']['action']="finish";
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
120
resources/web/preset_bind/24/index.html
Normal file
120
resources/web/preset_bind/24/index.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Cache-Control" content="max-age=7200" />
|
||||
<title>引导_P21</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="24.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/dark.css" />
|
||||
<!-- <script type="text/javascript" src="test.js"></script> -->
|
||||
<script type="text/javascript" src="../js/jquery-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="../js/json2.js"></script>
|
||||
<script type="text/javascript" src="../../data/text.js"></script>
|
||||
<script type="text/javascript" src="../js/globalapi.js"></script>
|
||||
<!-- <script type="text/javascript" src="../js/common.js"></script> -->
|
||||
<script type="text/javascript" src="24.js"></script>
|
||||
</head>
|
||||
<body onLoad="OnInit()">
|
||||
<div id="Title">
|
||||
<div class="trans" tid="t10">Printer Selection</div>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<div class="search">
|
||||
<input type="text" class="searchTerm" placeholder="Device keyword" oninput="textInput(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div id="Content" class="ZScrol"s>
|
||||
|
||||
<!--<div class="OneVendorBlock" Vendor="BBL">
|
||||
<div class="BlockBanner">
|
||||
<div class="BannerBtns">
|
||||
<div class="SmallBtn_Green" onClick="SelectPrinterAll('BBL')">所有</div>
|
||||
<div class="SmallBtn" onClick="SelectPrinterNone('BBL')">无</div>
|
||||
</div>
|
||||
|
||||
<a>BBL-3DP</a>
|
||||
</div>
|
||||
|
||||
<div class="PrinterArea">
|
||||
|
||||
<div class="PrinterBlock">
|
||||
<div class="PImg"><img src="p2.jpg" /></div>
|
||||
<div class="PName">BBL-3DP-V4NORMAL</div>
|
||||
<div class="pNozzel"><input id="ZZ" type="checkbox" model="BBL-3DP-V4NORMAL" nozzel="0.4" vendor="BBL" />0.4mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V4NORMAL" nozzel="0.1" vendor="BBL" />0.1mm nozzle</div>
|
||||
</div>
|
||||
<div class="PrinterBlock">
|
||||
<div class="PImg"><img src="p1.jpg" /></div>
|
||||
<div class="PName">BBL-3DP-V4NORMAL</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.4" vendor="BBL" />0.4mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.2" vendor="BBL" />0.2mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.1" vendor="BBL" />0.1mm nozzle</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="OneVendorBlock" Vendor="BAMBU">
|
||||
<div class="BlockBanner">
|
||||
<a>BBL-3DP</a>
|
||||
</div>
|
||||
|
||||
<div class="PrinterArea">
|
||||
|
||||
<div class="PrinterBlock">
|
||||
<div class="PImg"><img src="p2.jpg" /></div>
|
||||
<div class="PName">BBL-3DP-V4NORMAL</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V4NORMAL" nozzel="0.4" vendor="BAMBU" />0.4mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V4NORMAL" nozzel="0.1" vendor="BAMBU" />0.1mm nozzle</div>
|
||||
</div>
|
||||
<div class="PrinterBlock">
|
||||
<div class="PImg"><img src="p1.jpg" /></div>
|
||||
<div class="PName">BBL-3DP-V4NORMAL</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.4" vendor="BAMBU" />0.4mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.2" vendor="BAMBU" />0.2mm nozzle</div>
|
||||
<div class="pNozzel"><input type="checkbox" model="BBL-3DP-V5NORMAL" nozzel="0.1" vendor="BAMBU" />0.1mm nozzle</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
<div id="AcceptArea">
|
||||
<div class="NormalBtn trans" tid="t39" id="AcceptBtn" onclick="ConfirmSelect()">Confirm</div>
|
||||
</div>
|
||||
|
||||
<div id="NoticeMask"></div>
|
||||
<div id="NoticeBody">
|
||||
<div id="NoticeBar" class="trans" tid="t18">error</div>
|
||||
<div id="NoticeContent">
|
||||
<div id="NoticeText" class="trans" tid="t37">At least one printer must be selected.</div>
|
||||
<div id="NoticeBtns">
|
||||
<div class="SmallBtn trans" tid="t36" onClick="ShowNotice(0)">ok</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script>
|
||||
document.onkeydown = function (event) {
|
||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
||||
|
||||
if (e.keyCode == 27)
|
||||
ClosePage();
|
||||
|
||||
if (window.event) {
|
||||
try { e.keyCode = 0; } catch (e) { }
|
||||
e.returnValue = true;
|
||||
}
|
||||
};
|
||||
let pModel = {};
|
||||
let ModelNozzleSelected = {};
|
||||
function textInput(obj) {
|
||||
FilterModelList(obj.value);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
199
resources/web/preset_bind/css/common.css
Normal file
199
resources/web/preset_bind/css/common.css
Normal file
@@ -0,0 +1,199 @@
|
||||
*
|
||||
{
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
font-family: "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-sans;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
html
|
||||
{
|
||||
height:100%;
|
||||
background-color: #626262;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
height:100%;
|
||||
max-height: 660px;
|
||||
max-width: 820px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.TextPoint
|
||||
{
|
||||
font-size:1px;
|
||||
}
|
||||
|
||||
.ZScrol::-webkit-scrollbar {/*滚动条整体样式*/
|
||||
width: 12px; /*高宽分别对应横竖滚动条的尺寸*/
|
||||
height: 12px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.ZScrol::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
|
||||
.ZScrol::-webkit-scrollbar-track {/*滚动条里面轨道*/
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
border-radius: 10px;
|
||||
background: #EDEDED;
|
||||
}
|
||||
|
||||
/*----Three Part----*/
|
||||
body
|
||||
{
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
#Title
|
||||
{
|
||||
height: 12%;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
flex-direction:column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#Title div
|
||||
{
|
||||
font-size:28px;
|
||||
line-height: 28px;
|
||||
color: #009688;
|
||||
padding: 0px 10mm;
|
||||
}
|
||||
|
||||
|
||||
#Content
|
||||
{
|
||||
height: 76%;
|
||||
padding: 20px 40px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #464646;
|
||||
position: relative;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#Content div
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
#AcceptArea
|
||||
{
|
||||
height:12%;
|
||||
padding: 0mm 10mm;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
justify-content:flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/*--Btn--*/
|
||||
.NormalBtn
|
||||
{
|
||||
padding: 3mm 9mm;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
background-color: #009688;
|
||||
border-radius: 16px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.NormalBtn:hover
|
||||
{
|
||||
background-color:#4db6ac;
|
||||
}
|
||||
|
||||
.GrayBtn
|
||||
{
|
||||
padding: 3mm 9mm;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
border: 1px solid #575757;
|
||||
border-radius: 18px;
|
||||
color: #575757;
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.GrayBtn:hover
|
||||
{
|
||||
background-color:#E8E8E8;
|
||||
}
|
||||
|
||||
.SmallBtn
|
||||
{
|
||||
padding: 2px 4mm;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
background-color: #D9D9D9;
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.SmallBtn:hover
|
||||
{
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
|
||||
.SmallBtn_Green
|
||||
{
|
||||
padding: 2px 4mm;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
background-color: #009688;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.SmallBtn_Green:hover
|
||||
{
|
||||
background-color: #4db6ac;
|
||||
}
|
||||
|
||||
/*---HyperLink---*/
|
||||
.HyperLink
|
||||
{
|
||||
color: #009688;
|
||||
text-decoration: underline;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------Light Mode-------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
74
resources/web/preset_bind/css/dark.css
Normal file
74
resources/web/preset_bind/css/dark.css
Normal file
@@ -0,0 +1,74 @@
|
||||
*
|
||||
{
|
||||
color: #efeff0;
|
||||
border-color: #B9B9BC;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background-color:#3E3E45;
|
||||
color: #efeff0;
|
||||
}
|
||||
|
||||
.ZScrol::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
|
||||
background-color: #939594;
|
||||
}
|
||||
|
||||
.ZScrol::-webkit-scrollbar-track {/*滚动条里面轨道*/
|
||||
background: #161817;
|
||||
}
|
||||
|
||||
#Title div
|
||||
{
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
/*-----Button-----*/
|
||||
.GrayBtn
|
||||
{
|
||||
border: 1px solid #B9B9BC;
|
||||
color: #B9B9BC;
|
||||
}
|
||||
|
||||
.GrayBtn:hover
|
||||
{
|
||||
background-color:#E8E8E8;
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
/*-------Text------*/
|
||||
|
||||
.TextS1
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
.TextS2
|
||||
{
|
||||
color:#B9B9BC;
|
||||
}
|
||||
|
||||
/*---Policy---*/
|
||||
.TextArea1
|
||||
{
|
||||
background-color: #4A4A51;
|
||||
color: #BEBEC0;
|
||||
}
|
||||
|
||||
/*----Region---*/
|
||||
.RegionItem:hover
|
||||
{
|
||||
background-color:#4C4C55;
|
||||
}
|
||||
|
||||
.RegionSelected:hover
|
||||
{
|
||||
background-color:#009688;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*----Menu----*/
|
||||
#Title div.TitleUnselected
|
||||
{
|
||||
color: #BEBEC0;
|
||||
}
|
||||
35
resources/web/preset_bind/css/home.css
Normal file
35
resources/web/preset_bind/css/home.css
Normal file
@@ -0,0 +1,35 @@
|
||||
#FullArea
|
||||
{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
|
||||
#LoadProgress
|
||||
{
|
||||
position:fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 3mm;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PercentTip
|
||||
{
|
||||
width:70%;
|
||||
height: 100%;
|
||||
background-color: #335DFC;
|
||||
}
|
||||
|
||||
|
||||
#PageArea
|
||||
{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#IEPage
|
||||
{
|
||||
height:100%;
|
||||
width: 100%;
|
||||
}
|
||||
58
resources/web/preset_bind/css/test.css
Normal file
58
resources/web/preset_bind/css/test.css
Normal file
@@ -0,0 +1,58 @@
|
||||
*
|
||||
{
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
html,body
|
||||
{
|
||||
height:100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#PageArea
|
||||
{
|
||||
height:100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
bottom: 35px;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
font-size: 18px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.swiper-slide iframe
|
||||
{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.CBtn
|
||||
{
|
||||
padding: 3mm 100m;
|
||||
background-color: #77EFF9;
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
top:30px;
|
||||
}
|
||||
21
resources/web/preset_bind/js/common.js
Normal file
21
resources/web/preset_bind/js/common.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function ClosePage() {
|
||||
var tSend = {};
|
||||
tSend['sequence_id'] = Math.round(new Date() / 1000);
|
||||
tSend['command'] = "close_page";
|
||||
SendWXMessage(JSON.stringify(tSend));
|
||||
}
|
||||
|
||||
document.onkeydown = function (event) {
|
||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
||||
|
||||
if (window.event) {
|
||||
try { e.keyCode = 0; } catch (e) { }
|
||||
e.returnValue = false;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('wheel', function (event) {
|
||||
if (event.ctrlKey === true || event.metaKey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, { passive: false });
|
||||
339
resources/web/preset_bind/js/globalapi.js
Normal file
339
resources/web/preset_bind/js/globalapi.js
Normal file
@@ -0,0 +1,339 @@
|
||||
|
||||
/*------------------ Date Function ------------------------*/
|
||||
function GetFullToday( )
|
||||
{
|
||||
var d=new Date();
|
||||
|
||||
var nday=d.getDate();
|
||||
var nmonth=d.getMonth()+1;
|
||||
var nyear=d.getFullYear();
|
||||
|
||||
var strM=nmonth+'';
|
||||
if( nmonth<10 )
|
||||
strM='0'+nmonth;
|
||||
|
||||
var strD=nday+'';
|
||||
if( nday<10 )
|
||||
strD='0'+nday;
|
||||
|
||||
return nyear+'-'+strM+'-'+strD;
|
||||
}
|
||||
|
||||
function GetFullDate()
|
||||
{
|
||||
var d=new Date();
|
||||
|
||||
var tDate={};
|
||||
|
||||
tDate.nyear=d.getFullYear();
|
||||
tDate.nmonth=d.getMonth()+1;
|
||||
tDate.nday=d.getDate();
|
||||
|
||||
tDate.nhour=d.getHours();
|
||||
tDate.nminute=d.getMinutes();
|
||||
tDate.nsecond=d.getSeconds();
|
||||
|
||||
tDate.nweek=d.getDay();
|
||||
tDate.ndate=d.getDate();
|
||||
|
||||
var strM=tDate.nmonth+'';
|
||||
if( tDate.nmonth<10 )
|
||||
strM='0'+tDate.nmonth;
|
||||
|
||||
var strD=tDate.nday+'';
|
||||
if( tDate.nday<10 )
|
||||
strD='0'+tDate.nday;
|
||||
|
||||
var strH=tDate.nhour+'';
|
||||
if( tDate.nhour<10 )
|
||||
strH='0'+tDate.nhour;
|
||||
|
||||
var strMin=tDate.nminute+'';
|
||||
if( tDate.nminute<10 )
|
||||
strMin='0'+tDate.nminute;
|
||||
|
||||
var strS=tDate.nsecond+'';
|
||||
if( tDate.nsecond<10 )
|
||||
strS='0'+tDate.nsecond;
|
||||
|
||||
tDate.strdate=tDate.nyear+'-'+strM+'-'+strD;
|
||||
tDate.strFulldate=tDate.strdate+' '+strH+':'+strMin+':'+strS;
|
||||
|
||||
return tDate;
|
||||
}
|
||||
|
||||
|
||||
function Unixtimestamp2Date( nSecond )
|
||||
{
|
||||
var d=new Date(nSecond*1000);
|
||||
|
||||
var tDate={};
|
||||
|
||||
tDate.nyear=d.getFullYear();
|
||||
tDate.nmonth=d.getMonth()+1;
|
||||
tDate.nday=d.getDate();
|
||||
|
||||
tDate.nhour=d.getHours();
|
||||
tDate.nminute=d.getMinutes();
|
||||
tDate.nsecond=d.getSeconds();
|
||||
|
||||
tDate.nweek=d.getDay();
|
||||
tDate.ndate=d.getDate();
|
||||
|
||||
var strM=tDate.nmonth+'';
|
||||
if( tDate.nmonth<10 )
|
||||
strM='0'+tDate.nmonth;
|
||||
|
||||
var strD=tDate.nday+'';
|
||||
if( tDate.nday<10 )
|
||||
strD='0'+tDate.nday;
|
||||
|
||||
tDate.strdate=tDate.nyear+'-'+strM+'-'+strD;
|
||||
|
||||
return tDate.strdate;
|
||||
}
|
||||
|
||||
|
||||
//------------Array Function-------------
|
||||
Array.prototype.in_array = function (e) {
|
||||
let sArray= ',' + this.join(this.S) + ',';
|
||||
let skey=','+e+',';
|
||||
|
||||
if(sArray.indexOf(skey)>=0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------String Function------------------
|
||||
/**
|
||||
* Delete Left/Right Side Blank
|
||||
*/
|
||||
String.prototype.trim=function()
|
||||
{
|
||||
return this.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
/**
|
||||
* Delete Left Side Blank
|
||||
*/
|
||||
String.prototype.ltrim=function()
|
||||
{
|
||||
return this.replace(/(^\s*)/g,'');
|
||||
}
|
||||
/**
|
||||
* Delete Right Side Blank
|
||||
*/
|
||||
String.prototype.rtrim=function()
|
||||
{
|
||||
return this.replace(/(\s*$)/g,'');
|
||||
}
|
||||
|
||||
|
||||
//----------------Get Param-------------
|
||||
function GetQueryString(name)
|
||||
{
|
||||
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r!=null)
|
||||
{
|
||||
return unescape(r[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function GetGetStr()
|
||||
{
|
||||
let strGet="";
|
||||
|
||||
//获取当前URL
|
||||
let url = document.location.href;
|
||||
|
||||
//获取?的位置
|
||||
let index = url.indexOf("?")
|
||||
if(index != -1) {
|
||||
//截取出?后面的字符串
|
||||
strGet = url.substr(index + 1);
|
||||
}
|
||||
|
||||
return strGet;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------JSON Function------------*/
|
||||
|
||||
/*
|
||||
功能:检查一个字符串是不是标准的JSON格式
|
||||
参数: strJson 被检查的字符串
|
||||
返回值: 如果字符串是一个标准的JSON格式,则返回JSON对象
|
||||
如果字符串不是标准JSON格式,则返回null
|
||||
*/
|
||||
function IsJson( strJson )
|
||||
{
|
||||
var tJson=null;
|
||||
try
|
||||
{
|
||||
tJson=JSON.parse(strJson);
|
||||
}
|
||||
catch(exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return tJson;
|
||||
}
|
||||
|
||||
/*-----------------------Ajax Function--------------------*/
|
||||
/*对JQuery的Ajax函数的封装,只支持异步
|
||||
参数说明:
|
||||
url 目标地址
|
||||
action post/get
|
||||
data 字符串格式的发送内容
|
||||
asyn true---异步模式;false-----同步模式;
|
||||
*/
|
||||
function HttpReq( url,action, data,callbackfunc)
|
||||
{
|
||||
var strAction=action.toLowerCase();
|
||||
|
||||
if( strAction=="post")
|
||||
{
|
||||
$.post(url,data,callbackfunc);
|
||||
}
|
||||
else if( strAction=="get")
|
||||
{
|
||||
$.get(url,callbackfunc);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------Cookie Function-------------------*/
|
||||
function setCookie(name, value, time='',path='') {
|
||||
if(time && path){
|
||||
var strsec = time * 1000;
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + strsec * 1);
|
||||
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path="+path;
|
||||
}else if(time){
|
||||
var strsec = time * 1000;
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + strsec * 1);
|
||||
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
|
||||
}else if(path){
|
||||
document.cookie = name + "=" + escape(value) + ";path="+path;
|
||||
}else{
|
||||
document.cookie = name + "=" + escape(value);
|
||||
}
|
||||
}
|
||||
|
||||
function getCookie(c_name)
|
||||
{
|
||||
if(document.cookie.length > 0) {
|
||||
c_start = document.cookie.indexOf(c_name + "=");//获取字符串的起点
|
||||
if(c_start != -1) {
|
||||
c_start = c_start + c_name.length + 1;//获取值的起点
|
||||
c_end = document.cookie.indexOf(";", c_start);//获取结尾处
|
||||
if(c_end == -1) c_end = document.cookie.length;//如果是最后一个,结尾就是cookie字符串的结尾
|
||||
return decodeURI(document.cookie.substring(c_start, c_end));//截取字符串返回
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function checkCookie(c_name) {
|
||||
username = getCookie(c_name);
|
||||
console.log(username);
|
||||
if (username != null && username != "")
|
||||
{ return true; }
|
||||
else
|
||||
{ return false; }
|
||||
}
|
||||
|
||||
function clearCookie(name) {
|
||||
setCookie(name, "", -1);
|
||||
}
|
||||
|
||||
|
||||
/*--------Studio WX Message-------*/
|
||||
function IsInSlicer()
|
||||
{
|
||||
let bMatch=navigator.userAgent.match( RegExp('SM-Slicer','i') );
|
||||
|
||||
return bMatch;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SendWXMessage( strMsg )
|
||||
{
|
||||
let bCheck=IsInSlicer();
|
||||
|
||||
if(bCheck!=null)
|
||||
{
|
||||
window.wx.postMessage(strMsg);
|
||||
}
|
||||
}
|
||||
|
||||
/*------CSS Link Control----*/
|
||||
function RemoveCssLink( LinkPath )
|
||||
{
|
||||
let pNow=$("head link[href='"+LinkPath+"']");
|
||||
|
||||
let nTotal=pNow.length;
|
||||
for( let n=0;n<nTotal;n++ )
|
||||
{
|
||||
pNow[n].remove();
|
||||
}
|
||||
}
|
||||
|
||||
function AddCssLink( LinkPath )
|
||||
{
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var link = document.createElement('link');
|
||||
link.href = LinkPath;
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
function CheckCssLinkExist( LinkPath )
|
||||
{
|
||||
let pNow=$("head link[href='"+LinkPath+"']");
|
||||
let nTotal=pNow.length;
|
||||
|
||||
return nTotal;
|
||||
}
|
||||
|
||||
|
||||
/*------Dark Mode------*/
|
||||
|
||||
function SwitchDarkMode( DarkCssPath )
|
||||
{
|
||||
ExecuteDarkMode( DarkCssPath );
|
||||
setInterval("ExecuteDarkMode('"+DarkCssPath+"')",1000);
|
||||
}
|
||||
|
||||
function ExecuteDarkMode( DarkCssPath )
|
||||
{
|
||||
let nMode=0;
|
||||
let bDarkMode=navigator.userAgent.match( RegExp('dark','i') );
|
||||
if( bDarkMode!=null )
|
||||
nMode=1;
|
||||
|
||||
let nNow=CheckCssLinkExist(DarkCssPath);
|
||||
if( nMode==0 )
|
||||
{
|
||||
if(nNow>0)
|
||||
RemoveCssLink(DarkCssPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nNow==0)
|
||||
AddCssLink(DarkCssPath);
|
||||
}
|
||||
}
|
||||
|
||||
SwitchDarkMode( "../css/dark.css" );
|
||||
12
resources/web/preset_bind/js/home.js
Normal file
12
resources/web/preset_bind/js/home.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
|
||||
function NextSlide()
|
||||
{
|
||||
$('.swiper-button-next').click();
|
||||
}
|
||||
|
||||
function PreSlide()
|
||||
{
|
||||
$('.swiper-button-prev').click();
|
||||
}
|
||||
4
resources/web/preset_bind/js/jquery-2.1.1.min.js
vendored
Normal file
4
resources/web/preset_bind/js/jquery-2.1.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
resources/web/preset_bind/js/jquery-3.6.0.min.js
vendored
Normal file
2
resources/web/preset_bind/js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
185
resources/web/preset_bind/js/json2.js
Normal file
185
resources/web/preset_bind/js/json2.js
Normal file
@@ -0,0 +1,185 @@
|
||||
var JSON;
|
||||
if (!JSON) {
|
||||
JSON = {};
|
||||
}
|
||||
(function () {
|
||||
'use strict';
|
||||
function f(n) {
|
||||
// Format integers to have at least two digits.
|
||||
return n < 10 ? '0' + n : n;
|
||||
}
|
||||
if (typeof Date.prototype.toJSON !== 'function') {
|
||||
Date.prototype.toJSON = function (key) {
|
||||
|
||||
return isFinite(this.valueOf())
|
||||
? this.getUTCFullYear() + '-' +
|
||||
f(this.getUTCMonth() + 1) + '-' +
|
||||
f(this.getUTCDate()) + 'T' +
|
||||
f(this.getUTCHours()) + ':' +
|
||||
f(this.getUTCMinutes()) + ':' +
|
||||
f(this.getUTCSeconds()) + 'Z'
|
||||
: null;
|
||||
};
|
||||
|
||||
String.prototype.toJSON =
|
||||
Number.prototype.toJSON =
|
||||
Boolean.prototype.toJSON = function (key) {
|
||||
return this.valueOf();
|
||||
};
|
||||
}
|
||||
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
||||
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
||||
gap,
|
||||
indent,
|
||||
meta = { // table of character substitutions
|
||||
'\b': '\\b',
|
||||
'\t': '\\t',
|
||||
'\n': '\\n',
|
||||
'\f': '\\f',
|
||||
'\r': '\\r',
|
||||
'"' : '\\"',
|
||||
'\\': '\\\\'
|
||||
},
|
||||
rep;
|
||||
function quote(string) {
|
||||
escapable.lastIndex = 0;
|
||||
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
|
||||
var c = meta[a];
|
||||
return typeof c === 'string'
|
||||
? c
|
||||
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
}) + '"' : '"' + string + '"';
|
||||
}
|
||||
function str(key, holder) {
|
||||
var i, // The loop counter.
|
||||
k, // The member key.
|
||||
v, // The member value.
|
||||
length,
|
||||
mind = gap,
|
||||
partial,
|
||||
value = holder[key];
|
||||
if (value && typeof value === 'object' &&
|
||||
typeof value.toJSON === 'function') {
|
||||
value = value.toJSON(key);
|
||||
}
|
||||
if (typeof rep === 'function') {
|
||||
value = rep.call(holder, key, value);
|
||||
}
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
return quote(value);
|
||||
case 'number':
|
||||
return isFinite(value) ? String(value) : 'null';
|
||||
case 'boolean':
|
||||
case 'null':
|
||||
return String(value);
|
||||
case 'object':
|
||||
if (!value) {
|
||||
return 'null';
|
||||
}
|
||||
gap += indent;
|
||||
partial = [];
|
||||
if (Object.prototype.toString.apply(value) === '[object Array]') {
|
||||
length = value.length;
|
||||
for (i = 0; i < length; i += 1) {
|
||||
partial[i] = str(i, value) || 'null';
|
||||
}
|
||||
v = partial.length === 0
|
||||
? '[]'
|
||||
: gap
|
||||
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
||||
: '[' + partial.join(',') + ']';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
if (rep && typeof rep === 'object') {
|
||||
length = rep.length;
|
||||
for (i = 0; i < length; i += 1) {
|
||||
if (typeof rep[i] === 'string') {
|
||||
k = rep[i];
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (k in value) {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
v = partial.length === 0
|
||||
? '{}'
|
||||
: gap
|
||||
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
||||
: '{' + partial.join(',') + '}';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
if (typeof JSON.stringify !== 'function') {
|
||||
JSON.stringify = function (value, replacer, space) {
|
||||
var i;
|
||||
gap = '';
|
||||
indent = '';
|
||||
if (typeof space === 'number') {
|
||||
for (i = 0; i < space; i += 1) {
|
||||
indent += ' ';
|
||||
}
|
||||
} else if (typeof space === 'string') {
|
||||
indent = space;
|
||||
}
|
||||
rep = replacer;
|
||||
if (replacer && typeof replacer !== 'function' &&
|
||||
(typeof replacer !== 'object' ||
|
||||
typeof replacer.length !== 'number')) {
|
||||
throw new Error('JSON.stringify');
|
||||
}
|
||||
return str('', {'': value});
|
||||
};
|
||||
}
|
||||
if (typeof JSON.parse !== 'function') {
|
||||
JSON.parse = function (text, reviver) {
|
||||
var j;
|
||||
function walk(holder, key) {
|
||||
var k, v, value = holder[key];
|
||||
if (value && typeof value === 'object') {
|
||||
for (k in value) {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = walk(value, k);
|
||||
if (v !== undefined) {
|
||||
value[k] = v;
|
||||
} else {
|
||||
delete value[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return reviver.call(holder, key, value);
|
||||
}
|
||||
text = String(text);
|
||||
cx.lastIndex = 0;
|
||||
if (cx.test(text)) {
|
||||
text = text.replace(cx, function (a) {
|
||||
return '\\u' +
|
||||
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
});
|
||||
}
|
||||
if (/^[\],:{}\s]*$/
|
||||
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
|
||||
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
|
||||
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
||||
j = eval('(' + text + ')');
|
||||
return typeof reviver === 'function'
|
||||
? walk({'': j}, '')
|
||||
: j;
|
||||
}
|
||||
throw new SyntaxError('JSON.parse');
|
||||
};
|
||||
}
|
||||
}());
|
||||
Reference in New Issue
Block a user