فهرست منبع

提示框修改

wyq 4 سال پیش
والد
کامیت
217b7cf5b6
2فایلهای تغییر یافته به همراه10 افزوده شده و 21 حذف شده
  1. 1 10
      src/js/promise.js
  2. 9 11
      src/js/staticInfo.js

+ 1 - 10
src/js/promise.js

@@ -359,16 +359,7 @@ function toast(mess) {
     $(".mess").fadeOut();
   }, 2000)
 }
-const Toasts = function (mess) {
-  var str = `<div id="mess"><img class="warn" style="margin-right:14px" src=${warn}/><span></span></div>`;
-  $("body").append(str);
-  $("#mess").fadeIn().find("span").html(mess);
-  document.getElementById("mess").style.cssText = "display:flex;align-items:center;max-width:60%;min-width: 150px;padding:0 14px;height: 30px;color: #FFB609;line-height: 30px;text-align: center;border-radius: 4px;position: fixed;top: 75px;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #FDF6EA;font-size: 16px;";
-  setTimeout(function () {
-    $("#mess").fadeOut();
-  }, 1000)
 
-}
 module.exports = {
   config,
   get,
@@ -380,5 +371,5 @@ module.exports = {
   isIe8,
   titleConfig,
   titleConfigH,
-  Toast, Toasts
+  Toast
 }

+ 9 - 11
src/js/staticInfo.js

@@ -15,8 +15,7 @@ const {
   config,
   getUrlArgObject,
   openNewWin,
-  Toast,
-  Toasts
+  Toast
 } = require('./promise.js');
 const $ = require("jquery");
 require("./jquery-migrate");
@@ -318,15 +317,14 @@ function getchecks() {
     }
   });
 }
-function isNumber(val) {
-
-  var regPos = /^\d+(\.\d+)?$/; //非负浮点数
-  var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
-  if (regPos.test(val) && regNeg.test(val)) {
-    return true;
-  } else {
-    return false;
-  }
+function Toasts(mess) {
+  var str = `<div id="mess"><img class="warn" style="margin-right:14px" src=${warn}/><span></span></div>`;
+  $("body").append(str);
+  $("#mess").fadeIn().find("span").html(mess);
+  document.getElementById("mess").style.cssText = "display:flex;align-items:center;max-width:60%;min-width: 150px;padding:0 14px;height: 30px;color: #FFB609;line-height: 30px;text-align: center;border-radius: 4px;position: fixed;top: 75px;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #FDF6EA;font-size: 16px;";
+  setTimeout(function () {
+    $("#mess").fadeOut();
+  }, 1000)
 
 }
 function getResult(pushInfo, textType) {