').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.width(),d.width())+e.outerWidth()/2,i=this.options.height||Math.max(c.height(),d.height());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery);
9 | //# sourceMappingURL=bootstrap2-toggle.min.js.map
--------------------------------------------------------------------------------
/src/main/resources/static/js/bootstrap@4.6.0/plugins/bootstrap2-toggle.min.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"bootstrap2-toggle.min.js","sources":["bootstrap2-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAAOO,UACNC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,UACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGTf,EAAOgB,UAAUZ,SAAW,WAC3B,OACCI,GAAIb,KAAKO,SAASe,KAAK,YAAcjB,EAAOO,SAASC,GACrDC,IAAKd,KAAKO,SAASe,KAAK,aAAejB,EAAOO,SAASE,IACvDC,QAASf,KAAKO,SAASe,KAAK,iBAAmBjB,EAAOO,SAASG,QAC/DC,SAA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B,UAAUoB,QAAU,SAAUE,GACpC3C,KAAKO,SAASO,IAAI,oBACb6B,GAAQ3C,KAAKO,SAASyC,SAC3BhD,KAAKO,SAASM,GAAG,mBAAoBhB,EAAEoD,MAAM,WAC5CjD,KAAKwC,UACHxC,QAGJK,EAAOgB,UAAU6B,QAAU,WAC1BlD,KAAKO,SAASO,IAAI,oBAClBd,KAAK8B,aAAaqB,SAClBnD,KAAKO,SAAS6C,WAAW,aACzBpD,KAAKO,SAAS8C,SAiBf,IAAIC,GAAMzD,EAAE0D,GAAGC,eAEf3D,GAAE0D,GAAGC,gBAA8B1D,EACnCD,EAAE0D,GAAGC,gBAAgBC,YAAcpD,EAKnCR,EAAE0D,GAAGb,OAAOgB,WAAa,WAExB,MADA7D,GAAE0D,GAAGC,gBAAkBF,EAChBtD,MAMRH,EAAE,WACDA,EAAE,6CAA6C2D,oBAGhD3D,EAAE8D,UAAU9C,GAAG,kBAAmB,2BAA4B,SAAS+C,GACtE,GAAIC,GAAYhE,EAAEG,MAAM8D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"}
--------------------------------------------------------------------------------
/src/main/resources/static/js/common/public.js:
--------------------------------------------------------------------------------
1 | let timeUtil = {
2 | dateFormat:(date,format)=>{
3 | let pad = function (num) {
4 | let norm = Math.floor(Math.abs(num));
5 | return (norm < 10 ? '0' : '') + norm;
6 | };
7 | let offset = -date.getTimezoneOffset();
8 | let timezone = ((offset >= 0 ? '+' : '-') + pad(offset / 60) + ":" + pad(offset % 60));
9 | var map = {
10 | "M": date.getMonth() + 1, //月份
11 | "d": date.getDate(), //日
12 | "h": date.getHours(), //小时
13 | "m": date.getMinutes(), //分
14 | "s": date.getSeconds(), //秒
15 | "q": Math.floor((date.getMonth() + 3) / 3), //季度
16 | "S": date.getMilliseconds(), //毫秒
17 | "Z": timezone,
18 | };
19 |
20 | format = format.replace(/([yMdhmsqSZ])+/g, function (all, t) {
21 | var v = map[t];
22 | if (v !== undefined) {
23 | if (all.length > 1) {
24 | v = '0' + v;
25 | v = v.substr(v.length - 2);
26 | }
27 | return v;
28 | } else if (t === 'y') {
29 | return (date.getFullYear() + '').substr(4 - all.length);
30 | }
31 | return all;
32 | });
33 | return format;
34 | },
35 | getBJTime:d=>{
36 | let bgDate = new Date(d);
37 | let tmpHours = d.getHours();
38 | //算得时区
39 | let time_zone = -d.getTimezoneOffset() / 60;
40 | //少于0的是西区 西区应该用时区绝对值加京八区 重新设置时间(西区时间比东区时间早 所以加时区间隔)
41 | if (time_zone < 0) {
42 | time_zone = Math.abs(time_zone) + 8;
43 | bgDate.setHours(tmpHours + time_zone);
44 | } else {
45 | //大于0的是东区 东区时间直接跟京八区相减
46 | time_zone -= 8;
47 | bgDate.setHours(tmpHours - time_zone);
48 | }
49 | return bgDate;
50 | }
51 | };
52 | let $http = {
53 | get:(url,data)=>{
54 | return new Promise(function(resolve, reject){
55 | $.ajax({url:url,cache:false,traditional:true,type:'GET',data:data,
56 | success:function(result){
57 | resolve(result);
58 | },
59 | error: function (xhr, status, error) {
60 | if (xhr.status == 404) {
61 | reject("404:数据不存在");
62 | } else if (xhr.status >= 500) {
63 | reject(xhr.status+":服务器错误");
64 | } else {
65 | reject(xhr.status+":"+xhr.responseText);
66 | }
67 | }
68 | })
69 | });
70 | },
71 | getSync:(url,data)=>{
72 | return new Promise(function(resolve, reject){
73 | $.ajax({url:url,cache:false,traditional:true,type:'GET',data:data,async:false,
74 | success:function(result){
75 | resolve(result);
76 | },
77 | error:function(xhr,status,error){
78 | reject(xhr.status+":"+xhr.responseText);
79 | }
80 | })
81 | });
82 | },
83 | postSync:(url,data,contentType)=>{
84 | return new Promise((resolve, reject) => {
85 | $.ajax({
86 | url:url,
87 | traditional:true,
88 | type:'POST',
89 | contentType:contentType?contentType:'application/x-www-form-urlencoded',
90 | data:data,
91 | async:false,
92 | success:function(result){
93 | resolve(result);
94 | },
95 | error:function(xhr,status,error){
96 | reject(xhr.status+":"+xhr.responseText);
97 | }
98 | })
99 | })
100 | },
101 | //contentType可选,默认application/x-www-form-urlencoded
102 | post:(url,data,contentType)=>{
103 | return new Promise((resolve, reject) => {
104 | $.ajax({
105 | url:url,
106 | traditional:true,
107 | type:'POST',
108 | contentType:contentType?contentType:'application/x-www-form-urlencoded',
109 | data:data,
110 | success:function(result){
111 | resolve(result);
112 | },
113 | error:function(xhr,status,error){
114 | reject(xhr.status+":"+xhr.responseText);
115 | }
116 | })
117 | })
118 | },
119 | postWithForm:function(url,data){return this.post(url,data,'application/x-www-form-urlencoded')},
120 | postWithJSON:function(url,data){return this.post(url,data,'application/json')}
121 | };
122 |
123 | const gft = {
124 | download:(document,target)=>{
125 | let eleLink = document.createElement('a');
126 | eleLink.style.display = 'none';
127 | eleLink.href = target;
128 | document.body.appendChild(eleLink);
129 | eleLink.click();
130 | document.body.removeChild(eleLink);
131 | },
132 | reset($form) {
133 | $form.find('select option').removeAttr('selected');
134 | $form.find(':text').removeAttr('value');
135 | $form.find(':password').removeAttr('value');
136 | $form.find(':file').removeAttr('value');
137 | $form.find('textarea').removeAttr('value');
138 | $form.find(':radio').removeAttr('checked');
139 | $form.find(':checkbox').removeAttr('checked');
140 | },
141 | alert:{
142 | message:function(type,tips,timeout){
143 | let idSelector = 'vue2du3d-alert';
144 | let containerTemplate = '
';
146 | let template = '
' +
147 | '
{{tips}}
'+
148 | '
';
149 | let rand = new Date().getTime().toString();
150 | template = template.replace('{{tips}}', tips).replace('{{rand}}', rand).replace("{{type}}", type);
151 | let $alert = $(document.body).find('#' + idSelector);
152 | if ($alert.length) {
153 | $alert.show().prepend(template);
154 | }else{
155 | $(document.body).prepend(containerTemplate);
156 | $(document.body).find('#' + idSelector).prepend(template);
157 | }
158 | if (timeout && timeout > 0) {
159 | setTimeout(function () {
160 | $(document.body).find('#' + idSelector).find("button[data-rand='" + rand + "']").alert('close');
161 | }, timeout);
162 | }
163 | },
164 | success:function(tips, timeout){
165 | this.message('success', tips, timeout);
166 | },
167 | error:function(tips,timeOut){
168 | this.message('danger', tips, timeOut);
169 | }
170 | }
171 | };
--------------------------------------------------------------------------------
/src/main/resources/static/js/popper@1.12.3/popper.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) Federico Zivolo 2017
3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
4 | */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1
=o.clientWidth&&i>=o.clientHeight}),l=0i[e]&&!t.escapeWithReference&&(n=V(p[o],i[e]-('right'===e?p.width:p.height))),se({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=de({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=_,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var n=e.placement.split('-')[0],r=e.offsets,p=r.popper,s=r.reference,d=-1!==['left','right'].indexOf(n),a=d?'height':'width',l=d?'Top':'Left',f=l.toLowerCase(),m=d?'left':'top',c=d?'bottom':'right',g=O(i)[a];s[c]-gp[c]&&(e.offsets.popper[f]+=s[f]+g-p[c]);var u=s[f]+s[a]/2-g/2,b=t(e.instance.popper,'margin'+l).replace('px',''),y=u-h(e.offsets.popper)[f]-b;return y=X(V(p[a]-g,y),0),e.arrowElement=i,e.offsets.arrow={},e.offsets.arrow[f]=Math.round(y),e.offsets.arrow[m]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,l=e.offsets.reference,f=_,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)f(l.top)||'bottom'===i&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===i&&c||'right'===i&&h||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&c||y&&'end'===r&&h||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=de({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=h(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right
2 |
3 |
4 |
5 |
6 |
7 | 网站短信API接入配置
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
49 |
50 |
55 |
107 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
243 |
244 |
--------------------------------------------------------------------------------
/src/main/resources/templates/error/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 | 404
13 |
14 |
--------------------------------------------------------------------------------
/src/main/resources/templates/error/5xx.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 | 500
13 |
14 |
--------------------------------------------------------------------------------
/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
266 |
--------------------------------------------------------------------------------
/src/test/java/com/lei2j/sms/bomb/AppTest.java:
--------------------------------------------------------------------------------
1 | package com.lei2j.sms.bomb;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
6 | import org.springframework.boot.test.context.SpringBootTest;
7 | import org.springframework.http.MediaType;
8 | import org.springframework.test.web.servlet.MockMvc;
9 | import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
10 |
11 | /**
12 | * @author leijinjun
13 | * @date 2021/1/6
14 | **/
15 | @SpringBootTest
16 | @AutoConfigureMockMvc
17 | public class AppTest {
18 |
19 | @Autowired
20 | private MockMvc mockMvc;
21 |
22 | @Test
23 | public void test1() throws Exception {
24 | mockMvc.perform(MockMvcRequestBuilders.post("/smsBomb/send").param("phone", "13962653261").accept(MediaType.APPLICATION_JSON))
25 | .andExpect((mvcResult) -> {
26 | assert mvcResult.getResponse().getStatus() == 200;
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/update_version.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM 提示用户输入新版本号
3 | set /p new_version=please new version:
4 |
5 | REM 执行 Maven 命令k
6 | mvn versions:set -DnewVersion="%new_version%" -DgenerateBackupPoms=false
--------------------------------------------------------------------------------