commonUtils.js 511 B

1234567891011121314151617181920
  1. export function stringHasText(string) {
  2. return string !== '' && string !== null && string !== undefined
  3. }
  4. export function numberNotZero(number) {
  5. return number !== 0 && number !== null && number !== undefined
  6. }
  7. export function jsonParamIsTrue(param) {
  8. return param !== undefined && param !== null && param === true
  9. }
  10. //获取星期几
  11. export function getDay(num) {
  12. if (num < 0 || num > 6) {
  13. return null
  14. }
  15. let day = new Array("日", "一", "二", "三", "四", "五", "六")
  16. return '周' + day[num]
  17. }