Skip to content

Commit

Permalink
补充代码
Browse files Browse the repository at this point in the history
  • Loading branch information
wyy committed Dec 4, 2023
1 parent 103f9a5 commit 6ab3f50
Show file tree
Hide file tree
Showing 395 changed files with 28,556 additions and 0 deletions.
8 changes: 8 additions & 0 deletions front-end/mall4uni/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
16 changes: 16 additions & 0 deletions front-end/mall4uni/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 如需添加更多环境变量,请以 VITE_APP_ 开头声明
# 在代码中使用 import.meta.env.VITE_APP_XXX 获取指定变量

# 环境配置标识
VITE_APP_ENV = 'development'

# 微信公众号appid
# 注意此处为微信 公众号appid,不是小程序appid
# 小程序appid在 manifest.json 文件的 mp-weixin.appid 字段中配置
VITE_APP_MP_APPID = 'wx42bbe857570c5b40'

# 统一接口域名
VITE_APP_BASE_API = 'http://127.0.0.1:8086'

# 图片域名
VITE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
16 changes: 16 additions & 0 deletions front-end/mall4uni/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 如需添加更多环境变量,请以 VITE_APP_ 开头声明
# 在代码中使用 import.meta.env.VITE_APP_XXX 获取指定变量

# 环境配置标识
VITE_APP_ENV = 'production'

# 微信公众号appid
# 注意此处为微信 公众号appid,不是小程序appid
# 小程序appid在 manifest.json 文件的 mp-weixin.appid 字段中配置
VITE_APP_MP_APPID = 'wx42bbe857570c5b40'

# 统一接口域名
VITE_APP_BASE_API = 'http://127.0.0.1:8086'

# 图片域名
VITE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
16 changes: 16 additions & 0 deletions front-end/mall4uni/.env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 如需添加更多环境变量,请以 VITE_APP_ 开头声明
# 在代码中使用 import.meta.env.VITE_APP_XXX 获取指定变量

# 环境配置标识
VITE_APP_ENV = 'testing'

# 微信公众号appid
# 注意此处为微信 公众号appid,不是小程序appid
# 小程序appid在 manifest.json 文件的 mp-weixin.appid 字段中配置
VITE_APP_MP_APPID = 'wx42bbe857570c5b40'

# 统一接口域名
VITE_APP_BASE_API = 'http://127.0.0.1:8086'

# 图片域名
VITE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
17 changes: 17 additions & 0 deletions front-end/mall4uni/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# eslint 忽略列表

# disk编译目录
dist

build/*.js
src/assets
src/components/tki-barcode
src/package-user/components/uv-parse
src/uni_modules
src/utils/jwx
src/js_sdk
public

uni_modules
auto-imports.d.ts

87 changes: 87 additions & 0 deletions front-end/mall4uni/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
globals: {
uni: 'readonly',
getApp: 'readonly',
wx: 'readonly',
getCurrentPages: 'readonly',
plus: 'readonly'
},
extends: [
'standard',
'./.eslintrc-auto-import.json',
'plugin:vue/vue3-recommended',
'plugin:vue-scoped-css/vue3-recommended'
],
overrides: [
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: [
'vue'
],
rules: {
// Possible Errors
// 要求使用 let 或 const 而不是 var
'no-var': 'error',
// 强制 "for" 循环中更新子句的计数器朝着正确的方向移动
'for-direction': 'error',
// 强制 getter 函数中出现 return 语句
'getter-return': 'error',
// 禁止在嵌套的块中出现变量声明或 function 声明
'no-inner-declarations': 'error',
// 禁止由于 await 或 yield的使用而可能导致出现竞态条件的赋值
'require-atomic-updates': 'error',
// console 警告
'no-console': 'warn',
// 禁止出现未使用过的变量
'no-unused-vars': [
'warn',
{
args: 'all',
caughtErrors: 'none',
ignoreRestSiblings: true,
vars: 'all'
}
],
// 关闭名称校验
'vue/multi-word-component-names': 'off',
// 非生产环境启用 debugger
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

// Best Practices
eqeqeq: 'off',

// Stylistic Issues
// 强制可嵌套的块的最大深度
'max-depth': ['error', 5],
// 强制函数最大代码行数
'max-lines-per-function': [
'error',
{
max: 150,
skipBlankLines: true
}
],
// 强制回调函数最大嵌套深度
'max-nested-callbacks': ['error', { max: 10 }],
// 强制函数定义中最多允许的参数数量
'max-params': ['error', { max: 5 }],
// 强制每一行中所允许的最大语句数量
'max-statements-per-line': ['error', { max: 1 }],
// 三目运算符换行
'multiline-ternary': ['error', 'never'],
// 传值给组件时的使用 kebab-case
'vue/v-on-event-hyphenation': ['warn', 'always', {
autofix: true,
ignore: []
}]
}
}
28 changes: 28 additions & 0 deletions front-end/mall4uni/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
*.local

# Editor directories and files
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/src/auto-imports.d.ts

.idea
.hbuilderx
.vscode
package-lock.json
pnpm-lock.yaml
.eslintrc-auto-import.json
4 changes: 4 additions & 0 deletions front-end/mall4uni/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
engine-strict = true
shamefully-hoist = true
strict-peer-dependencies = false
registry = https://registry.npmmirror.com
3 changes: 3 additions & 0 deletions front-end/mall4uni/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:1.20
COPY ./dist/build/h5 /usr/share/nginx/html/h5
COPY ./nginx.conf /etc/nginx/conf.d
Loading

0 comments on commit 6ab3f50

Please sign in to comment.