function _extends() {
_extends = Object.assign || function (target) {
for (let i = 1; i < arguments.length; i++) {
const source = arguments[i]
for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key]
}
}
}
return target
}
return _extends.apply(this, arguments)
}
/* eslint no-console:0 */
const formatRegExp = /%[sdj%]/g
let warning = function warning() {} // don't print warning message when in production env or node runtime
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window
!== 'undefined' && typeof document !== 'undefined') {
warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn) {
if (errors.every((e) => typeof e === 'string')) {
console.warn(type, errors)
}
}
}
}
function convertFieldsError(errors) {
if (!errors || !errors.length) return null
const fields = {}
errors.forEach((error) => {
const { field } = error
fields[field] = fields[field] || []
fields[field].push(error)
})
return fields
}
function format() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key]
}
let i = 1
const f = args[0]
const len = args.length
if (typeof f === 'function') {
return f.apply(null, args.slice(1))
}
if (typeof f === 'string') {
let str = String(f).replace(formatRegExp, (x) => {
if (x === '%%') {
return '%'
}
if (i >= len) {
return x
}
switch (x) {
case '%s':
return String(args[i++])
case '%d':
return Number(args[i++])
case '%j':
try {
return JSON.stringify(args[i++])
} catch (_) {
return '[Circular]'
}
break
default:
return x
}
})
for (let arg = args[i]; i < len; arg = args[++i]) {
str += ` ${arg}`
}
return str
}
return f
}
function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern'
}
function isEmptyValue(value, type) {
if (value === undefined || value === null) {
return true
}
if (type === 'array' && Array.isArray(value) && !value.length) {
return true
}
if (isNativeStringType(type) && typeof value === 'string' && !value) {
return true
}
return false
}
function asyncParallelArray(arr, func, callback) {
const results = []
let total = 0
const arrLength = arr.length
function count(errors) {
results.push.apply(results, errors)
total++
if (total === arrLength) {
callback(results)
}
}
arr.forEach((a) => {
func(a, count)
})
}
function asyncSerialArray(arr, func, callback) {
let index = 0
const arrLength = arr.length
function next(errors) {
if (errors && errors.length) {
callback(errors)
return
}
const original = index
index += 1
if (original < arrLength) {
func(arr[original], next)
} else {
callback([])
}
}
next([])
}
function flattenObjArr(objArr) {
const ret = []
Object.keys(objArr).forEach((k) => {
ret.push.apply(ret, objArr[k])
})
return ret
}
function asyncMap(objArr, option, func, callback) {
if (option.first) {
const _pending = new Promise((resolve, reject) => {
const next = function next(errors) {
callback(errors)
return errors.length ? reject({
errors,
fields: convertFieldsError(errors)
}) : resolve()
}
const flattenArr = flattenObjArr(objArr)
asyncSerialArray(flattenArr, func, next)
})
_pending.catch((e) => e)
return _pending
}
let firstFields = option.firstFields || []
if (firstFields === true) {
firstFields = Object.keys(objArr)
}
const objArrKeys = Object.keys(objArr)
const objArrLength = objArrKeys.length
let total = 0
const results = []
const pending = new Promise((resolve, reject) => {
const next = function next(errors) {
results.push.apply(results, errors)
total++
if (total === objArrLength) {
callback(results)
return results.length ? reject({
errors: results,
fields: convertFieldsError(results)
}) : resolve()
}
}
if (!objArrKeys.length) {
callback(results)
resolve()
}
objArrKeys.forEach((key) => {
const arr = objArr[key]
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next)
} else {
asyncParallelArray(arr, func, next)
}
})
})
pending.catch((e) => e)
return pending
}
function complementError(rule) {
return function (oe) {
if (oe && oe.message) {
oe.field = oe.field || rule.fullField
return oe
}
return {
message: typeof oe === 'function' ? oe() : oe,
field: oe.field || rule.fullField
}
}
}
function deepMerge(target, source) {
if (source) {
for (const s in source) {
if (source.hasOwnProperty(s)) {
const value = source[s]
if (typeof value === 'object' && typeof target[s] === 'object') {
target[s] = { ...target[s], ...value }
} else {
target[s] = value
}
}
}
}
return target
}
/**
* Rule for validating required fields.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
errors.push(format(options.messages.required, rule.fullField))
}
}
/**
* Rule for validating whitespace.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function whitespace(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === '') {
errors.push(format(options.messages.whitespace, rule.fullField))
}
}
/* eslint max-len:0 */
const pattern = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
url: new RegExp(
'^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该项目是一款基于uniapp和uview2.0框架的物业管理系统源码,涵盖444个文件,包括246个JavaScript文件、129个Vue组件文件、24个SCSS样式文件、16个JSON配置文件等。系统集成了物业缴费、量房服务、商城秒杀拼团、巡检管理、供应商加盟商品及分佣设置等多种功能,已成功上线。适用于各类物业管理需求,欢迎有意者联系获取。
资源推荐
资源详情
资源评论
收起资源包目录
基于uniapp+uview2.0的物业管理系统源码出售,包含缴费、量房、商城等功能 (443个子文件)
uniicons.css 8KB
.gitignore 350B
index.html 672B
async-validator.js 38KB
parser.js 35KB
noNetwork.js 28KB
calendar.js 26KB
icons.js 26KB
index.js 21KB
classify.data.js 14KB
clipboard.min.js 13KB
nvue - backup.js 12KB
util.js 12KB
dayjs.js 11KB
clone.js 8KB
icons.js 7KB
nvue.js 7KB
mixin.js 7KB
style.js 7KB
transition.js 6KB
test.js 6KB
Request.js 6KB
props.js 6KB
props.js 5KB
nvue - 副本.js 5KB
nvue.js 5KB
props.js 5KB
props.js 5KB
route.js 4KB
colorGradient.js 4KB
props.js 4KB
props.js 4KB
utils.js 4KB
value.js 4KB
mpother.js 4KB
digit.js 4KB
props.js 4KB
props.js 4KB
props.js 3KB
utils.js 3KB
props.js 3KB
mergeConfig.js 3KB
props.js 3KB
props.js 3KB
index.js 3KB
props.js 3KB
props.js 3KB
props.js 3KB
nvue.ani-map.js 3KB
util.js 3KB
props.js 3KB
index.js 3KB
props.js 3KB
props.js 3KB
props.js 3KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
emitter.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
buildURL.js 2KB
utils.js 2KB
props.js 2KB
props.js 2KB
touch.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 2KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
props.js 1KB
nvue.js 1KB
props.js 1KB
InterceptorManager.js 1KB
props.js 1KB
共 443 条
- 1
- 2
- 3
- 4
- 5
资源评论
lly202406
- 粉丝: 3042
- 资源: 5530
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功