smart-app alpha 版本

This commit is contained in:
zhuoda
2024-03-10 22:26:32 +08:00
parent d64b769d40
commit 728ddb9a7e
295 changed files with 20261 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
/*
* 商品
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-03 22:08:10
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
export const GOODS_STATUS_ENUM = {
APPOINTMENT: {
value: 1,
desc: '预约中',
},
SELL: {
value: 2,
desc: '售卖中',
},
SELL_OUT: {
value: 3,
desc: '售罄',
},
};
export default {
GOODS_STATUS_ENUM,
};

View File

@@ -0,0 +1,24 @@
/*
* 企业
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2023-09-03 22:07:27
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
export const ENTERPRISE_TYPE_ENUM = {
NORMAL: {
value: 1,
desc: '有限企业',
},
FOREIGN: {
value: 2,
desc: '外资企业',
},
};
export default {
ENTERPRISE_TYPE_ENUM,
};

View File

@@ -0,0 +1,70 @@
/*
* 通用常量
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 19:57:29
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
export const PAGE_SIZE = 10;
export const PAGE_SIZE_OPTIONS = ['5', '10', '15', '20', '30', '40', '50', '75', '100', '150', '200', '300', '500'];
//登录页面名字
export const PAGE_PATH_LOGIN = '/login';
//404页面名字
export const PAGE_PATH_404 = '/404';
export const showTableTotal = function (total) {
return `${total}`;
};
export const FLAG_NUMBER_ENUM = {
TRUE: {
value: 1,
desc: '是',
},
FALSE: {
value: 0,
desc: '否',
},
};
export const GENDER_ENUM = {
UNKNOWN: {
value: 0,
desc: '未知',
},
MAN: {
value: 1,
desc: '男',
},
WOMAN: {
value: 2,
desc: '女',
},
};
export const USER_TYPE_ENUM = {
ADMIN_EMPLOYEE: {
value: 1,
desc: '员工',
},
};
export const DATA_TYPE_ENUM = {
NORMAL: {
value: 1,
desc: '普通',
},
ENCRYPT: {
value: 10,
desc: '加密',
},
};

View File

@@ -0,0 +1,24 @@
/*
* 所有常量入口
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 19:58:28
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
import { FLAG_NUMBER_ENUM, GENDER_ENUM, USER_TYPE_ENUM } from './common-const';
import loginDevice from './system/login-device-const';
import enterpriseConst from './business/oa/enterprise-const';
import goodsConst from './business/erp/goods-const';
import changeLogConst from './support/change-log-const';
export default {
FLAG_NUMBER_ENUM,
GENDER_ENUM,
USER_TYPE_ENUM,
...loginDevice,
...enterpriseConst,
...goodsConst,
...changeLogConst,
};

View File

@@ -0,0 +1,19 @@
/*
* key 常量
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 19:58:50
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
/**
* key前缀
*/
const KEY_PREFIX = 'smart_h5_';
/**
* localStorageKey集合
*/
// token
export const USER_TOKEN = `${KEY_PREFIX}token`;

View File

@@ -0,0 +1,28 @@
/*
* 正则常量
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 19:59:05
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
export const regular = {
phone: /^(13|14|15|16|17|18|19)\d{9}$/,
qq: /^[1-9]\d{3,}$/,
linkUrl:
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/,
// eslint-disable-next-line no-useless-escape
isNumber: /(^[\-1-9][1-9]*(.[1-9]+)?)$/, // 判断是否为数字除了0 外
isLandlineOrPhone: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, // 验证 座机 或者手机
account: /^[a-z0-9]{3,16}$/, // 请输入3-16位(小写字母|数字)的账号
mobileAccount: /^[a-z0-9]{6,16}$/, // 请输入6-16位(小写字母|数字)的账号(和移动端保持一致)
accountDesc: '请输入3-16位(小写字母|数字)的账号',
pwd: /^[A-Za-z0-9._]{6,16}$/, // 请输入6-16位(大小写字母|数字|小数点|下划线)的密码
pwdDesc: '请输入6-16位(大小写字母|数字|小数点|下划线)的密码',
delBlankSpace: /\s+/g, // 删除空格
isPdfReg: new RegExp(/\.(pdf|PDF)/),
isElseFileReg: new RegExp(/\.(doc|docx|xls|xlsx|txt|ppt|pptx|pps|ppxs)/),
isIdentityCard: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/, // 验证身份证号
isChinese: /^[\u4e00-\u9fa5]+$/gi, // 验证是否汉字
};

View File

@@ -0,0 +1,32 @@
/**
* 系统更新日志 枚举
*
* @Author: 卓大
* @Date: 2022-09-26 14:53:50
* @Copyright 1024创新实验室
*/
/**
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
*/
export const CHANGE_LOG_TYPE_ENUM = {
MAJOR_UPDATE: {
value: 1,
desc: '重大更新',
type: 'error',
},
FUNCTION_UPDATE: {
value: 2,
desc: '功能更新',
type: 'primary',
},
BUG_FIX: {
value: 3,
desc: 'Bug修复',
type: 'warning',
},
};
export default {
CHANGE_LOG_TYPE_ENUM,
};

View File

@@ -0,0 +1,31 @@
/*
* 登录设备
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 19:56:56
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
export const LOGIN_DEVICE_ENUM = {
PC: {
value: 1,
desc: '电脑端',
},
ANDROID: {
value: 2,
desc: '安卓',
},
APPLE: {
value: 3,
desc: '苹果',
},
H5: {
value: 3,
desc: 'H5',
},
};
export default {
LOGIN_DEVICE_ENUM,
};