Commit 6f63f6db by chenwq

create

1 parent 6991ce4f
Showing 1000 changed files with 895 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

> 1%
last 2 versions
not ie <= 8
root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# 所有环境默认
# 页面 title 前缀
VUE_APP_TITLE=D+
# 静态资源基础路径
VUE_APP_PUBLIC_PATH = '/dj-carlife-web/'
# cdn图片加速地址
VUE_APP_PUBLIC_IMGPATH = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/web/'
# 仓库地址
VUE_APP_REPO = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
# 国际化配置
VUE_APP_I18N_LOCALE=zh-chs
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_ELEMENT_COLOR=#409EFF
VUE_APP_STORAGE_PREFIX=d+
\ No newline at end of file \ No newline at end of file
# 开发环境
# 网络请求开发地址
# VUE_APP_API=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
VUE_APP_REPO=http://192.168.3.171:7300/mock/5be17454f31545347559d499/config
\ No newline at end of file \ No newline at end of file
# No Mock 构建
# 指定构建模式
NODE_ENV=production
# 标记当前是 No Mock 构建
VUE_APP_BUILD_MODE=nomock
.DS_Store
node_modules
/dist
/.history
/cache
/copyDirTarget
.cursorrules
.cursor
.trae
# 本地环境文件不上传
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
module.exports = {
plugins: {
// tailwindcss: {},
autoprefixer: {}
// "postcss-px-to-viewport": {
// unitToConvert: "rem", // 要转化的单位
// viewportWidth: 25, // UI设计稿的宽度
// unitPrecision: 6, // 转换后的精度,即小数点位数
// propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
// viewportUnit: "px", // 指定需要转换成的视窗单位,默认vw
// fontViewportUnit: "px", // 指定字体需要转换成的视窗单位,默认vw
// selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名,
// minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换
// mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false
// replace: true, // 是否转换后直接更换属性值
// exclude: [/node_modules/], // 设置忽略文件,用正则做目录名匹配
// landscape: false // 是否处理横屏情况
// }
}
}
auth.token=45d2be625091494b9a0de35af25bb273c0a471650575471096d60dd61f6995e6
defaults.url = http://sentry.glsx.com.cn
defaults.org = sentry
defaults.project =dj-carlife-web
{
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"esbenp.prettier-vscode"
]
}
\ No newline at end of file \ No newline at end of file
{
"i18n-ally.localesPaths": [
"src/locales"
],
"cSpell.words": [
"vuex",
"Cascader",
"glsx"
],
"workbench.tree.indent": 24,
"explorer.compactFolders": false,
"scm.compactFolders": false,
"problems.decorations.enabled": false,
"eslint.format.enable": true,
"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": true,
"vetur.ignoreProjectWarning": false,
"vetur.experimental.templateInterpolationService": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.autoIndent": "full",
"editor.codeActionsOnSave": {
// "source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},
"[vue]": {},
"[javascript]": {},
"[javascriptreact]": {},
"i18n-ally.sourceLanguage": "zh-chs",
"javascript.suggest.autoImports": true
}
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"problemMatcher": [],
"label": "npm: dev",
"detail": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"Vue 2 Component": {
"prefix": "vue2",
"body": [
"<template>",
" <div class=\"$1\">",
" $0",
" </div>",
"</template>",
"",
"<script>",
"export default {",
" name: '$2',",
" data() {",
" return {",
" $3",
" };",
" },",
" props: {",
" $4",
" },",
" computed: {",
" $5",
" },",
" methods: {",
" $6",
" },",
" mounted() {",
" $7",
" }",
"};",
"</script>",
"",
"<style scoped lang=\"scss\">",
"$8",
"</style>"
],
"description": "Vue 2 单文件组件模板"
},
"Vuex Store Template (Vue2)": {
"prefix": "vuexstore2",
"body": [
"export default {",
" state: {",
" ${1:count}: ${2:0},",
" },",
" getters: {",
" ${3:get${1/(.*)/${1:/capitalize}/}}: state => state.${1},",
" },",
" mutations: {",
" set${1/(.*)/${1:/capitalize}/}(state, payload) {",
" state.${1} = payload;",
" },",
" increment${1/(.*)/${1:/capitalize}/}(state, payload = 1) {",
" state.${1} += payload;",
" }",
" },",
" actions: {",
" ${4:increment${1/(.*)/${1:/capitalize}/}Async}({ commit }, payload) {",
" setTimeout(() => {",
" commit('increment${1/(.*)/${1:/capitalize}/}', payload);",
" }, 1000);",
" }",
" },",
"};"
],
"description": "Vue 2 + Vuex 3 的 store 模板"
}
}
# 嘀加智享车生活后台 http://192.168.3.233:8090/saas_plus/dj-car-life-system
# 测试环境(http://frontend.test.glsx.com.cn/dj-carlife-web/#/login) glsadmin admin123
# 生产环境(http://dj.glsx.com.cn/dj-carlife-web/#/login) liushiquan1 liushiq123
开发环境 glsadmin 123456
预发布账号: yfbyyb a123456
测试环境账号 15816539335 a123456(超管)
aa123456 aa123456 (园区店)
bb123456 bb123456 (服务商)
从 develop 分支号 dev_v4.4.0 本来用来开发审核以及报表功能版本, wangql_dev_v4.4.0 已开发部分对应需求,未往 dev_v4.4.0 版本合并,因此目前 dev_v4.4.0 分支无用
从 develop 拉分支号 dev_v4.5.1 用来开发转化加 V4.5.0 功能需求
从 dev_v4.5.0 拉分支号 dev_v4.5.2 用来新建菜单对应现在的虚拟对公账户功能,以前的菜单保留以防万一
从 develop 拉分支号 dev_v4.7.0 需求功能:零售商品的审核以及首页的数据报表
dev_v4.7.0 已上线并且已合并到 develop 与 mater 上
从 develop 拉分支号 dev_v4.7.1,dev_v4.7.0 上线后已将代码合并到 dev_v4.7.1(上线后需合并代码到 dev_v4.7.2 和 dev_v4.8.0)
从 develop 拉分支号 dev_v4.7.2,需求:广汇 ERP
从 dev_v4.7.1 已提测未上线版本中拉分支 dev_v4.8.0,需求:虚拟对公账户和订单补录 7 月中旬需求
dev_v4.8.0 下载二维码地址在上线需换 path,并且需要配置按钮权限,ERP 功能视情况是否与 7 月紧急版本一起上线,不然就上线时屏蔽
dev_v4.8.0 已上线,合并到 develop 以及 master 主干上
从 develop 上拉取分支 dev_4.12.0_0927 对应 9 月份紧急版本(审计)
4.11.0 版本上线后需往主干及分支 dev_4.12.0_0927 版本上合并代码
dev_4.12.0_0927 版本上线后已往主干 develop 以及 master 上合并
从 develop 上拉取分支 dev_4.12.1 对应 1010 紧急版本
dev_4.13.0 分支以上线并往 develop 以及 master 上合并
从 develop 上拉取分支 dev_4.14.0 对应 11 月 商品改版+场景配置 版本
提测由于部署问题,直接从 dev_4.14.0 拉取 dev_4.14.1 代码相同的分支做部署
12 月大版本下部分 从测试中的分支 dev_4.14.1 拉取 dev_4.14.2 分支去做 清分及对账优化 版本,待 dev_4.14.1 上线后将代码合并进开发中的 dev_4.14.2
dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上
紧急版本 dev_v4.14.1.2 上线后以合并到 develop 以及 master 主干上,版本代码已合并到提测版本 dev_v4.14.2 上
dev_v4.12.2 已上线并合并到主干上
从主干拉取分支 dev_v4.15.0 用于开发 saas+0113 版本功能开发
从主干拉取分支 dev_v4.16.0 用于开发 SAAS+V4.16.0-0227-2 月份需求
[![Build Status](https://www.travis-ci.org/d2-projects/d2-admin-start-kit.svg?branch=master)](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)
\ No newline at end of file \ No newline at end of file
module.exports = {
plugins: [
'@babel/plugin-proposal-nullish-coalescing-operator', // 双问号
'@babel/plugin-proposal-optional-chaining' // 可选链
// '@babel/plugin-proposal-optional-chaining', // 可选链 ?.
// '@babel/plugin-proposal-nullish-coalescing-operator' // 空值合并 ??
],
presets: ['@vue/cli-plugin-babel/preset'],
// 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
sourceType: 'unambiguous'
}
import antfu from "@antfu/eslint-config";
export default antfu({
markdown: true,
vue: true,
css: true,
jsonc: true,
json: true,
ignores: [
// 忽略uni_modules目录
"**/uni_modules/",
"dist",
// unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
"auto-import.d.ts",
"build/",
"tests/",
"node_modules/",
// # node 覆盖率文件
"coverage/",
"**/*-min.js",
"**/*.min.js",
],
stylistic: {
"indent": "tab", // 4个空格
"quotes": "double", // or 'double'
"semi": true,
"array-bracket-spacing": ["error", "always"],
},
rules: {
"no-useless-catch": "off",
"vue/no-unused-refs": "warn",
"unused-imports/no-unused-imports": "warn",
"no-unused-vars": "warn",
"style/eol-last": "off",
"no-prototype-builtins": "warn",
"prefer-template": "off",
"no-useless-return": "off",
"vue/no-deprecated-delete-set": "off",
"vue/no-deprecated-dollar-listeners-api": "off",
"vue/require-explicit-emits": "off",
"eqeqeq": "warn",
"vue/v-on-event-hyphenation": "off",
"style/no-tabs": "off",
"vue/no-deprecated-v-bind-sync": "off",
"vue/no-lone-template": "off",
"vue/no-mutating-props": "off",
"vue/no-deprecated-filter": "off",
"vue/no-v-for-template-key-on-child": "off",
// 强制:Vue 多行 HTML 元素的内容前后必须换行
"vue/multiline-html-element-content-newline": [
"error",
{
ignoreWhenEmpty: false, // 即使元素内容为空,也要求换行(如 <div>\n</div>)
ignores: [], // 无忽略的元素(所有多行元素都生效)
allowEmptyLines: true, // 允许内容前后存在空白行
},
],
// 强制:Vue HTML 标签闭合括号不换行
"vue/html-closing-bracket-newline": [
"error",
{
singleline: "never", // 单行标签:闭合括号不换行(如 <image src="xxx" />)
multiline: "never", // 多行标签:闭合括号不换行(如 <image\n src="xxx"\n/>)
},
],
// 强制:Vue HTML 元素自闭合格式(如 <image /> 而非 <image></image>)
"vue/html-self-closing": [
"error",
{
html: {
void: "any", // 原生空标签(如 <img>)允许任意自闭合格式
normal: "any", // 原生普通标签(如 <div>)允许任意自闭合格式
component: "any", // 自定义组件(如 <MyComponent>)允许任意自闭合格式
},
svg: "any", // SVG 标签允许任意自闭合格式
math: "any", // MathML 标签允许任意自闭合格式
},
],
// 强制:Vue HTML 模板中标签缩进 4 个空格
"vue/html-indent": [
"error",
4,
{
attribute: 1, // 属性相对于标签缩进 1 级(4 个空格)
baseIndent: 1, // 基础缩进 1 级(适配组件嵌套场景)
closeBracket: 0, // 闭合标签与属性对齐(不额外缩进)
alignAttributesVertically: true, // 多行属性时垂直对齐(如所有属性左侧对齐)
ignores: [], // 无忽略的标签
},
],
"vue/attributes-order": ["error", {
order: [
"DEFINITION", // is
"LIST_RENDERING", // v-for
"CONDITIONALS", // v-if v-else-if v-else v-show v-cloak
"RENDER_MODIFIERS", // v-once v-pre
"GLOBAL", // id
"UNIQUE", // ref key
"SLOT", // v-slot slot
"TWO_WAY_BINDING", // v-model
"OTHER_DIRECTIVES", // v-custom-directive
"OTHER_ATTR", // 自定义属性和其他
"EVENTS", // @click @focus
"CONTENT", // v-text v-html
],
alphabetical: false, // 是否在同组内再按字母排序(建议 false,官方默认顺序更好)
}],
// 强制:Vue SFC 中块的顺序(template -> script -> style)
"vue/block-order": [
"error",
{
order: ["template", "script", "style"], // 固定三个核心块的顺序
},
],
// 强制:Vue 元素首属性的换行格式
"vue/first-attribute-linebreak": [
"error",
{
singleline: "beside", // 单行属性:首属性紧跟标签名(不换行)
multiline: "beside", // 多行属性:首属性也紧跟标签名(注:原注释描述与配置冲突,按配置「不换行」,如需换行可改为 "below")
},
],
// 强制:Vue 元素属性每行最多数量限制
"vue/max-attributes-per-line": [
"error",
{
singleline: 2, // 单行元素最多允许 2 个属性(如 <image src="xxx" alt="xxx">)
multiline: 1, // 多行元素每行最多 1 个属性(每个属性单独一行)
},
],
// 关闭:unused-imports 插件的「禁止未使用变量」检测(与 no-unused-vars 功能重叠,同步关闭)
"unused-imports/no-unused-vars": "off",
// 关闭:禁止无限制使用 eslint-disable 注释(允许临时禁用多个规则,按需关闭)
"eslint-comments/no-unlimited-disable": "off",
// 关闭:检查 JSDoc 注释中参数名与实际参数是否一致(无需强制 JSDoc 规范时关闭)
"jsdoc/check-param-names": "off",
// 强制:代码块前必须加空格(如 function fn() { 前加空格,报错级别 error)
"space-before-blocks": "error",
// 关闭:禁止使用 console(开发环境保留 console.log 便于调试,按需关闭)
"no-console": "off",
"style/brace-style": ["error", "1tbs"],
},
formatters: {
/**
* Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
* By default uses Prettier
*/
css: true,
scss: true,
less: true,
/**
* Format HTML files
* By default uses Prettier
*/
html: true,
},
});
module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
transform: {
'^.+\\.vue$': '@vue/vue2-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
testURL: 'http://localhost/'
}
{
"compilerOptions": {
"target": "ES2020",
// "jsx": "react-jsx",
// "lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": [
"ES2020"
],
"useDefineForClassFields": true,
/* Paths */
"baseUrl": ".",
"module": "ESNext",
/* Bundler mode */
// 按 Node 规则解析模块
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
],
"@api/*": [
"src/api/*"
]
},
"resolveJsonModule": true,
"allowImportingTsExtensions": false,
"allowJs": true,
"checkJs": false,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist",
".git"
]
// 对齐 Webpack 的 extensions 优先级
// "extensions": [".vue", ".js", ".ts", ".json"]
}
This diff could not be displayed because it is too large.
{
"name": "dj-car-life-system",
"version": "0.1.0",
"private": true,
"scripts": {
"备注": "去掉nomock配置命令",
"serve": "vue-cli-service serve",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": "vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock",
"lint": "vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
},
"dependencies": {
"@sentry/browser": "^7.12.1",
"@sentry/integrations": "^7.12.1",
"@sentry/tracing": "^7.3.0",
"@sentry/vue": "^7.3.0",
"ali-oss": "^6.22.0",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"bignumber.js": "^9.1.1",
"caniuse-lite": "^1.0.30001763",
"core-js": "^3.8.3",
"dayjs": "^1.8.12",
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"element-ui": "2.13.2",
"emoji-regex": "^10.6.0",
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.6",
"glsk-toolkit": "^1.0.5",
"glsx-common-sdk": "^0.3.0",
"hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"lodash": "^4.17.23",
"lodash-es": "^4.17.22",
"lowdb": "^1.0.0",
"nanoid": "^5.1.6",
"nprogress": "^0.2.0",
"number-precision": "^1.6.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.8.0",
"rfdc": "^1.3.0",
"screenfull": "^4.2.0",
"sha1": "^1.1.1",
"sortablejs": "^1.15.6",
"svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-lazyload": "^1.2.3",
"vue-router": "3.0.5",
"vuedraggable": "^2.24.3",
"vuex": "^3.0.1",
"wangeditor": "4.7.15",
"webpack-theme-color-replacer": "^1.4.2",
"xlsx": "^0.16.9"
},
"devDependencies": {
"@antfu/eslint-config": "^6.7.3",
"@babel/core": "^7.12.16",
"@sentry/webpack-plugin": "^1.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12",
"@babel/plugin-proposal-optional-chaining": "7.13.12",
"@kazupon/vue-i18n-loader": "^0.4.1",
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/compiler-sfc": "^3.5.26",
"@vue/test-utils": "1.0.0-beta.29",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"eslint": "^9.39.2",
"eslint-plugin-format": "^1.2.0",
"jest": "^27.1.0",
"md5": "^2.3.0",
"postcss-preset-env": "^7.7.2",
"postcss-px-to-viewport": "^1.1.1",
"sass": "~1.62.0",
"sass-loader": "^7.3.1",
"script-loader": "^0.7.2",
"speed-measure-webpack-plugin": "^1.5.0",
"vue-template-compiler": "^2.5.21",
"webpack": "^5.74.0"
},
"volta": {
"node": "14.21.3"
}
}
const path = require('path')
class copyDir {
apply(compiler) {
// done是webpack 得编译完成周期
compiler.hooks.afterEmit.tap('DonePlugins', function(stats) {
// console.log('编译完成!!')
// 因为写在文件夹里面 要找外面的文件要加../
// 删除老文件夹 并拷贝
removeDir(`${__dirname}/../dist`)
cpSync(
path.join(__dirname, '../copyDirTarget'),
path.join(__dirname, '../dist')
)
cpSync(
path.join(__dirname, '../copyDirTarget'),
path.join(__dirname, '../dist//dj-carlife-web')
)
// removeDir(`${__dirname}/../copyDirTarget`)
})
}
}
/** 主要版本 */
const major = process.version.match(/v([0-9]*).([0-9]*)/)[1]
/** 特性版本 */
const minor = process.version.match(/v([0-9]*).([0-9]*)/)[2]
/**
* 文件夹复制
* @param {string} source 源文件夹
* @param {string} destination 目标文件夹
*/
function cpSync(source, destination) {
const fs = require('fs')
// console.log('source', source)
// 判断node版本不是16.7.0以上的版本
// 则进入兼容处理
// 这样处理是因为16.7.0的版本支持了直接复制文件夹的操作
if (Number(major) < 16 || (Number(major) == 16 && Number(minor) < 7)) {
// 如果存在文件夹 先递归删除该文件夹
if (fs.existsSync(destination)) fs.rmSync(destination, { recursive: true })
// 新建文件夹 递归新建
fs.mkdirSync(destination, { recursive: true })
// 读取源文件夹
const rd = fs.readdirSync(source)
// console.log('rd', rd)
for (const fd of rd) {
// 循环拼接源文件夹/文件全名称
const sourceFullName = source + '/' + fd
// 循环拼接目标文件夹/文件全名称
const destFullName = destination + '/' + fd
// 读取文件信息
const lstatRes = fs.lstatSync(sourceFullName)
// 是否是文件
if (lstatRes.isFile()) fs.copyFileSync(sourceFullName, destFullName)
// 是否是文件夹
if (lstatRes.isDirectory()) cpSync(sourceFullName, destFullName)
}
} else fs.cpSync(source, destination, { force: true, recursive: true })
}
/**
* @caption 删除本地文件夹/文件
* @param {String} directoryPath 例: d://x/x/x.json 或者 d://x/x/x
*/
function removeDir(directoryPath) {
const fs = require('fs')
// 判断文件是否存在
require('fs').existsSync(directoryPath) && dleteDir()
function dleteDir() {
const files = fs.readdirSync(directoryPath)
for (var i = 0; i < files.length; i++) {
const newPath = path.join(directoryPath, files[i])
const stat = fs.statSync(newPath)
if (stat.isDirectory()) {
// 如果是文件夹就递归下去
removeDir(newPath)
} else {
// 删除文件
fs.unlinkSync(newPath)
}
}
fs.rmdirSync(directoryPath) // 如果文件夹是空的,就将自己删除掉
}
}
module.exports = copyDir
const removeDir = require('./removeFn')
class AsyncRomveDir {
apply(compiler) {
// console.log('自定义异步组件');
compiler.hooks.afterEmit.tapAsync('AsyncPlugin', (compilation, cb) => {
setTimeout(() => {
// console.log()
removeDir(`${__dirname}/../copyDirTarget`)
cb()
}, 5000)
})
}
}
module.exports = AsyncRomveDir
/**
* @caption 删除本地文件夹/文件
* @param {String} directoryPath 例: d://x/x/x.json 或者 d://x/x/x
*/
function removeDir(directoryPath) {
const fs = require('fs')
const path = require('path')
// 判断文件是否存在
require('fs').existsSync(directoryPath) && dleteDir()
function dleteDir() {
const files = fs.readdirSync(directoryPath)
for (var i = 0; i < files.length; i++) {
const newPath = path.join(directoryPath, files[i])
const stat = fs.statSync(newPath)
if (stat.isDirectory()) {
// 如果是文件夹就递归下去
removeDir(newPath)
} else {
// 删除文件
fs.unlinkSync(newPath)
}
}
fs.rmdirSync(directoryPath) // 如果文件夹是空的,就将自己删除掉
}
}
module.exports = removeDir
No preview for this file type
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-08 12:25:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-08 14:10:42
* @FilePath: \scrm-micro-drainage\public\hash.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// hash.js
self.importScripts('spark-md5.min.js')
self.onmessage = e => {
console.log(e)
const { file } = e.data
const spark = new self.SparkMD5.ArrayBuffer()
let count = 0
const loadNext = index => {
const reader = new FileReader()
reader.readAsArrayBuffer(file)
reader.onload = e => {
count++
spark.append(e.target.result)
var hexHash = spark.end()
var oParams = {}
oParams.fileMD5 = hexHash
oParams.file = e.target.result
oParams.size = file.size
self.postMessage(oParams)
}
}
loadNext(0)
}
No preview for this file type
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
<path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
<path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
<animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite" />
</path>
</svg>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>icon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<title>
<%= VUE_APP_TITLE %>
</title>
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
}
.d2-home {
background-color: #2A343D;
height: 100%;
display: flex;
flex-direction: column;
}
.d2-home__main {
user-select: none;
width: 100%;
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.d2-home__footer {
width: 100%;
flex-grow: 0;
text-align: center;
padding: 1em 0;
}
.d2-home__footer>a {
font-size: 12px;
color: #fff;
text-decoration: none;
}
.d2-home__loading {
height: 32px;
width: 32px;
margin-bottom: 20px;
}
.d2-home__title {
color: #FFF;
font-size: 20px;
margin-bottom: 10px;
}
.d2-home__sub-title {
color: #fff;
font-size: 14px;
}
</style>
<!-- <script>
var _hmt = _hmt || [];
var hmid = "1dfa88d0c8571eef2d383070cb3e5ca1";
(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();
</script> -->
</head>
<body>
<noscript>
<strong>
很抱歉,如果没有 JavaScript 支持,系统 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
</strong>
</noscript>
<div id="app">
<div class="d2-home">
<div class="d2-home__main">
<!-- <img class="d2-home__loading" src="`/image/loading/loading-spin.svg`" alt="loading"> -->
<img class="d2-home__loading" src="<%= VUE_APP_PUBLIC_PATH %>/image/loading/loading-spin.svg" alt="loading">
<div class="d2-home__title">
正在加载资源
</div>
<div class="d2-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</div>
<div class="d2-home__footer">
<a href="http://www.glsx.com.cn" target="_blank">
<!-- 版权所有&copy-2019 GLSX粤ICP备12020087号 -->
</a>
</div>
</div>
</div>
<!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
<script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=44cc16e43ad7ed3358df507bd0618181&plugin=AMap.Geocoder&plugin=AMap.PlaceSearch&plugin=AMap.Geolocation">
</script>
</html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!