From e2712f3c2f88a92b3c9647f1d7f3cee8f4a75c9e Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Mon, 8 May 2023 10:31:40 +0800 Subject: [PATCH] 'commit' --- WebRoot/html/dangjian/js/djs.js | 91 ----------------------- WebRoot/html/dangjian/js/easytimer.min.js | 7 ++ WebRoot/html/dangjian/view/exam.html | 27 +++++-- WebRoot/html/dangjian/view/exam_copy.html | 61 ++++++++------- WebRoot/html/dangjian/view/login.html | 17 +---- 5 files changed, 62 insertions(+), 141 deletions(-) delete mode 100644 WebRoot/html/dangjian/js/djs.js create mode 100644 WebRoot/html/dangjian/js/easytimer.min.js diff --git a/WebRoot/html/dangjian/js/djs.js b/WebRoot/html/dangjian/js/djs.js deleted file mode 100644 index 3200453..0000000 --- a/WebRoot/html/dangjian/js/djs.js +++ /dev/null @@ -1,91 +0,0 @@ -function tbdTimeCountdown(args) { - var ele = document.getElementById(args.id); - var alltime = args.alltime; - var arr = []; - - var t = Math.floor(alltime / (24 * 60 * 60)); - var yt = alltime % (24 * 60 * 60); - - var s = Math.floor(yt / (60 * 60)); - var ys = yt % (60 * 60); - - var f = Math.floor(ys / (60)); - var yf = ys % (60); - - var m = yf; - - arr[0] = [t, "天"]; - arr[1] = [s, ":"]; - arr[2] = [f, ":"]; - arr[3] = [m, ""]; - - if (s == 0) { - s = "00"; - } - if (f == 0) { - f = "00"; - } - if (m == 0) { - m = "00"; - } - - var s = ce(arr, 0); - - ele.innerHTML = s; - - var dong; - - dong = setInterval(function () { - alltime -= 1; - if (alltime <= 0) { - clearInterval(dong); - ele.innerHTML = "0秒"; - args.end(); - } else { - t = Math.floor(alltime / (24 * 60 * 60)); - yt = alltime % (24 * 60 * 60); - - s = Math.floor(yt / (60 * 60)); - ys = yt % (60 * 60); - - f = Math.floor(ys / (60)); - yf = ys % (60); - - m = yf; - - if (s == 0) { - s = "00"; - } - if (f == 0) { - f = "00"; - } - if (m == 0) { - m = "00"; - } - - arr[0] = [t, "天"]; - arr[1] = [s, ":"]; - arr[2] = [f, ":"]; - arr[3] = [m, ""]; - - var s = ce(arr, 0); - - ele.innerHTML = s; - }; - }, 1000); - - function ce(arr, sta) { - var i = sta; - if (i < arr.length) { - if (arr[i][0] != 0) { - var s = ""; - for (var j = i; j < arr.length; j++) { - s += "" + arr[j][0] + "" + arr[j][1]; - }; - return s; - } else { - return ce(arr, i + 1); - }; - }; - }; -} \ No newline at end of file diff --git a/WebRoot/html/dangjian/js/easytimer.min.js b/WebRoot/html/dangjian/js/easytimer.min.js new file mode 100644 index 0000000..d5a7df5 --- /dev/null +++ b/WebRoot/html/dangjian/js/easytimer.min.js @@ -0,0 +1,7 @@ +/** + * easytimer.js + * Generated: 2022-08-23 + * Version: 4.5.4 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).easytimer={})}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;ne)return t;for(r=0;r0&&void 0!==arguments[0]?arguments[0]:["hours","minutes","seconds"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;t=t||["hours","minutes","seconds"],e=e||":",n=n||2;var r,o=[];for(r=0;r-1&&this.events[t].splice(n,1)}},u.prototype.removeAllListeners=function(t){t?Array.isArray(this.events[t])&&(this.events[t]=[]):this.events={}},u.prototype.emit=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},D=new i,L=new i,x=new u,V=!1,M=!1,U={},k={detail:{timer:this}};function I(t,e){var n=g[t];L[t]=e,D[t]=t===y?Math.abs(e):w(e>=0?e:n-w(e,n),n)}function _(t){return B(t,y)}function z(t){return B(t,v)}function C(t){return B(t,p)}function R(t){return B(t,l)}function q(t){return B(t,d)}function B(t,e){var n=L[e];return I(e,rt(t,b[e])),L[e]!==n}function F(){G(),Z()}function G(){clearInterval(t),t=void 0,V=!1,M=!1}function H(t){yt()?(E=K(),T=ot(O.target)):$(t),J()}function J(){var n=b[e];Y(W(Date.now()))||(t=setInterval(N,n),V=!0,M=!1)}function K(){return W(Date.now())-L.secondTenths*b.secondTenths*o}function N(){var t=W(Date.now());X(Q()),s(k.detail.timer),Y(t)&&(ut(),pt("targetAchieved",k))}function Q(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(Date.now()),e=o>0?t-E:E-t,n={};return n.secondTenths=q(e),n.seconds=R(e),n.minutes=C(e),n.hours=z(e),n.days=_(e),n}function W(t){return Math.floor(t/b[e])*b[e]}function X(t){t.secondTenths&&pt("secondTenthsUpdated",k),t.seconds&&pt("secondsUpdated",k),t.minutes&&pt("minutesUpdated",k),t.hours&&pt("hoursUpdated",k),t.days&&pt("daysUpdated",k)}function Y(t){return T instanceof Array&&t>=P}function Z(){D.reset(),L.reset()}function $(t){e=tt((t=t||{}).precision),s="function"==typeof t.callback?t.callback:function(){},A=!0===t.countdown,o=!0===A?-1:1,"object"===r(t.startValues)?st(t.startValues):j=null,E=K(),Q(),"object"===r(t.target)?T=ot(t.target):A?(t.target={seconds:0},T=ot(t.target)):T=null,U={precision:e,callback:s,countdown:"object"===r(t)&&!0===t.countdown,target:T,startValues:j},O=t}function tt(t){if(!et(t="string"==typeof t?t:l))throw new Error("Error in precision parameter: ".concat(t," is not a valid value"));return t}function et(t){return m.indexOf(t)>=0}function nt(t){var e;if("object"===r(t))if(t instanceof Array){if(5!==t.length)throw new Error("Array size not valid");e=t}else{for(var n in t)if(m.indexOf(n)<0)throw new Error("Error in startValues or target parameter: ".concat(n," is not a valid input value"));e=[t.secondTenths||0,t.seconds||0,t.minutes||0,t.hours||0,t.days||0]}var o=(e=e.map((function(t){return parseInt(t,10)})))[0],s=e[1]+rt(o,c),i=e[2]+rt(s,a),u=e[3]+rt(i,f),d=e[4]+rt(u,h);return e[0]=o%c,e[1]=s%a,e[2]=i%f,e[3]=u%h,e[4]=d,e}function rt(t,e){var n=t/e;return n<0?Math.ceil(n):Math.floor(n)}function ot(t){if(t){var e=it(T=nt(t));return P=E+e.secondTenths*b.secondTenths*o,T}}function st(t){j=nt(t),D.secondTenths=j[0],D.seconds=j[1],D.minutes=j[2],D.hours=j[3],D.days=j[4],L=it(j,L)}function it(t,e){var n=e||{};return n.days=t[4],n.hours=n.days*h+t[3],n.minutes=n.hours*f+t[2],n.seconds=n.minutes*a+t[1],n.secondTenths=n.seconds*c+t[[0]],n}function ut(){F(),pt("stopped",k)}function ct(){F(),H(O),pt("reset",k)}function at(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n(n({},S),t),vt()||(H(t),pt("started",k))}function ft(){G(),M=!0,pt("paused",k)}function ht(t,e){x.on(t,e)}function dt(t,e){x.removeListener(t,e)}function lt(t){x.removeAllListeners(t)}function pt(t,e){x.emit(t,e)}function vt(){return V}function yt(){return M}function mt(){return D}function bt(){return L}function gt(){return U}$(S),void 0!==this&&(this.start=at,this.pause=ft,this.stop=ut,this.reset=ct,this.isRunning=vt,this.isPaused=yt,this.getTimeValues=mt,this.getTotalTimeValues=bt,this.getConfig=gt,this.addEventListener=ht,this.on=ht,this.removeEventListener=dt,this.removeAllEventListeners=lt,this.off=dt)}t.Timer=O,t.default=O,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/WebRoot/html/dangjian/view/exam.html b/WebRoot/html/dangjian/view/exam.html index c97a5b6..e62a433 100644 --- a/WebRoot/html/dangjian/view/exam.html +++ b/WebRoot/html/dangjian/view/exam.html @@ -194,17 +194,11 @@ - + + + + + diff --git a/WebRoot/html/dangjian/view/login.html b/WebRoot/html/dangjian/view/login.html index 8c653fa..13c57dc 100644 --- a/WebRoot/html/dangjian/view/login.html +++ b/WebRoot/html/dangjian/view/login.html @@ -62,19 +62,17 @@ -
+ - - +