@ -0,0 +1,71 @@ |
|||
// @ts-check
|
|||
/** @type {import('cz-git').UserConfig} */ |
|||
module.exports = { |
|||
extends: ['@commitlint/config-conventional'], |
|||
rules: { |
|||
'body-leading-blank': [2, 'always'], |
|||
'footer-leading-blank': [1, 'always'], |
|||
'header-max-length': [2, 'always', 108], |
|||
'subject-empty': [2, 'never'], |
|||
'type-empty': [2, 'never'], |
|||
'subject-case': [0], |
|||
'type-enum': [ |
|||
2, |
|||
'always', |
|||
[ |
|||
'feat', |
|||
'fix', |
|||
'perf', |
|||
'style', |
|||
'docs', |
|||
'test', |
|||
'refactor', |
|||
'build', |
|||
'ci', |
|||
'chore', |
|||
'revert', |
|||
'wip', |
|||
'workflow', |
|||
'types', |
|||
'release' |
|||
] |
|||
] |
|||
}, |
|||
prompt: { |
|||
// 中英文对照版
|
|||
// messages: {
|
|||
// type: '选择你要提交的类型 :',
|
|||
// scope: '选择一个提交范围 (可选):',
|
|||
// customScope: '请输入自定义的提交范围 :',
|
|||
// subject: '填写简短精炼的变更描述 :\n',
|
|||
// body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
|
|||
// breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
|
|||
// footerPrefixsSelect: '选择关联issue前缀 (可选):',
|
|||
// customFooterPrefixs: '输入自定义issue前缀 :',
|
|||
// footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
|
|||
// confirmCommit: '是否提交或修改commit ?'
|
|||
// },
|
|||
// types: [
|
|||
// { value: 'feat', name: 'feat: 新增功能' },
|
|||
// { value: 'fix', name: 'fix: 修复缺陷' },
|
|||
// { value: 'docs', name: 'docs: 文档变更' },
|
|||
// { value: 'style', name: 'style: 代码格式' },
|
|||
// { value: 'refactor', name: 'refactor: 代码重构' },
|
|||
// { value: 'perf', name: 'perf: 性能优化' },
|
|||
// { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
|
|||
// {
|
|||
// value: 'build',
|
|||
// name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)'
|
|||
// },
|
|||
// { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
|
|||
// { value: 'revert', name: 'revert: 回滚 commit' },
|
|||
// {
|
|||
// value: 'chore',
|
|||
// name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)'
|
|||
// },
|
|||
// { value: 'wip', name: 'wip: 正在开发中' },
|
|||
// { value: 'workflow', name: 'workflow: 工作流程改进' },
|
|||
// { value: 'types', name: 'types: 类型定义文件修改' }
|
|||
// ]
|
|||
} |
|||
} |
@ -0,0 +1,3 @@ |
|||
|
|||
VITE_BASE_URL=http://localhost:12080/admin-api |
|||
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api |
@ -0,0 +1,4 @@ |
|||
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app |
|||
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111 |
|||
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn |
|||
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn |
@ -0,0 +1,2 @@ |
|||
VITE_BASE_URL=http://dev.ccwin-in.com:25202/api/admin-api |
|||
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25202/api/admin-api |
@ -0,0 +1,2 @@ |
|||
dist |
|||
*.nvue |
@ -0,0 +1,49 @@ |
|||
{ |
|||
"parser": "vue-eslint-parser", |
|||
"env": { |
|||
"browser": true, |
|||
"commonjs": true, |
|||
"es2021": true |
|||
}, |
|||
"parserOptions": { |
|||
"ecmaVersion": 2021, |
|||
"parser": "@typescript-eslint/parser", |
|||
"sourceType": "module", |
|||
"ecmaFeatures": { |
|||
"jsx": true |
|||
} |
|||
}, |
|||
"extends": [ |
|||
"airbnb-base", |
|||
"eslint:recommended", |
|||
"plugin:prettier/recommended", |
|||
"plugin:vue/vue3-essential", |
|||
"plugin:@typescript-eslint/recommended" |
|||
], |
|||
"plugins": ["vue", "@typescript-eslint", "todo-ddl"], |
|||
"rules": { |
|||
"@typescript-eslint/ban-types": "off", |
|||
"@typescript-eslint/no-explicit-any": "off", |
|||
"@typescript-eslint/explicit-module-boundary-types": "off", |
|||
"import/extensions": "off", |
|||
"quotes": ["warn", "single"], |
|||
"semi": ["warn", "never"], |
|||
"import/no-unresolved": "off", |
|||
"todo-ddl/diy": "warn", |
|||
"import/prefer-default-export": "off", |
|||
"no-param-reassign": "warn", |
|||
"import/no-extraneous-dependencies": "off", |
|||
"max-len": "warn", |
|||
"no-restricted-syntax": "off", |
|||
"no-bitwise": "off", |
|||
"camelcase": "off", |
|||
"no-case-declarations": "off", |
|||
"@typescript-eslint/no-namespace": "off", |
|||
"no-undef": "off", |
|||
"no-promise-executor-return": "off", |
|||
"vue/multi-word-component-names": "off", |
|||
"@typescript-eslint/no-non-null-assertion": "off", |
|||
"@typescript-eslint/ban-ts-comment": "off", |
|||
"linebreak-style": "off" |
|||
} |
|||
} |
@ -1,20 +0,0 @@ |
|||
{ |
|||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
|||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
|||
"version" : "0.0", |
|||
"configurations" : [ |
|||
{ |
|||
"app-plus" : { |
|||
"launchtype" : "local" |
|||
}, |
|||
"default" : { |
|||
"launchtype" : "local" |
|||
}, |
|||
"type" : "uniCloud" |
|||
}, |
|||
{ |
|||
"playground" : "custom", |
|||
"type" : "uni-app:app-android" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,9 @@ |
|||
module.exports = { |
|||
printWidth: 700, // 一行的字符数,如果超过会进行换行,默认为80
|
|||
tabWidth: 2, // 一个 tab 代表几个空格数,默认为 2 个
|
|||
useTabs: false, //是否使用 tab 进行缩进,默认为false,表示用空格进行缩减
|
|||
singleQuote: true, // 字符串是否使用单引号,默认为 false,使用双引号
|
|||
semi: false, // 行尾是否使用分号,默认为true
|
|||
trailingComma: 'none', // 是否使用尾逗号
|
|||
bracketSpacing: true // 对象大括号直接是否有空格,默认为 true,效果:{ a: 1 }
|
|||
} |
@ -1,7 +1,7 @@ |
|||
# 设置基础镜像 |
|||
FROM win-nginx |
|||
|
|||
WORKDIR /opt/eam-pda |
|||
WORKDIR /opt/eam-uniapp |
|||
COPY nginx.conf /usr/local/nginx/conf/nginx.conf |
|||
# 将dist/build/h5/文件中的内容复制到 /opt/eam-pda 这个目录下面 |
|||
COPY dist/build/h5/ /opt/eam-pda |
|||
# 将dist/build/h5/文件中的内容复制到 /opt/eam-uniapp 这个目录下面 |
|||
COPY dist/build/h5/ /opt/eam-uniapp |
|||
|
@ -1,6 +1,6 @@ |
|||
MIT License |
|||
|
|||
Copyright (c) 2022 芋道 |
|||
Copyright (c) 2021 sugar |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
@ -1,19 +1,260 @@ |
|||
# my-project |
|||
# uni-vue3-ts-template |
|||
uni-app Vue3 + TypeScript + Vite + Pinia + Unocss 模板项目 |
|||
|
|||
## Project setup |
|||
支持小程序,H5,App |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxODc4OTk1OQ==653218789959) |
|||
|
|||
![Unocss](https://fastly.jsdelivr.net/gh/MellowCo/image-host/2022/202211121156442.png) |
|||
|
|||
| H5 | 微信小程序 | App(iOS) | App(Android) | |
|||
| :-------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: | |
|||
| ![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzE5Mzc4MzUyMQ==653193783521) | ![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzE5Mzc1Mzk1MQ==653193753951) | ![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxMDc2NTcwNg==653210765706) | <img src="https://img.cdn.sugarat.top/mdImg/MTY1MzIxMzkyOTQxNg==653213929416" width="360"/> | |
|||
|
|||
其它模板 |
|||
* Vue3的uni-app 纯js模板:[uni-app-template](https://github.com/ATQQ/uni-app-template) |
|||
* Vue3的Web应用模板:[vite-vue3-template](https://github.com/ATQQ/vite-vue3-template) |
|||
|
|||
## Env Suggest |
|||
**Node >= 14.19** |
|||
|
|||
**pnpm 7** |
|||
|
|||
**Registry taobao - https://registry.npmmirror.com/** |
|||
|
|||
## Use This Template |
|||
```sh |
|||
npx degit atqq/uni-vue3-ts-template#main my-uni-vue3-ts-vite-project |
|||
``` |
|||
## Feature |
|||
### Prod |
|||
* [x] [Vue3](https://vuejs.org/) |
|||
* [x] [Pinia](https://pinia.vuejs.org/) - replace vuex |
|||
* [x] [Axios](https://github.com/axios/axios) |
|||
* UI/组件库 |
|||
* [x] [uView](https://vkuviewdoc.fsq.pub/) - vk-uview-ui |
|||
* [ ] [uni-ui](https://github.com/dcloudio/uni-ui) - 待接入 |
|||
### Dev |
|||
* [x] [Vite](https://github.com/vitejs/vite) |
|||
* [x] [TypeScript](https://github.com/microsoft/TypeScript/#readme) |
|||
* [x] [Sass](https://github.com/sass/sass) |
|||
* [x] [Less](https://github.com/less/less.js) |
|||
* [x] [Eslint](https://eslint.org/) |
|||
* [x] [Prettier](https://prettier.io/) |
|||
* [x] [Vitest](https://vitest.dev/) - replace jest |
|||
* [x] [unocss](https://github.com/unocss/unocss) - 即时按需原子 css 引擎 |
|||
* [x] GitHooks [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks#readme) |
|||
* ~~LintStaged~~ |
|||
* ~~StyleLint~~ |
|||
|
|||
## 使用 |
|||
### 安装依赖 |
|||
**建议使用pnpm,依赖安装速度更快** |
|||
```sh |
|||
npm i -g pnpm |
|||
``` |
|||
|
|||
```sh |
|||
pnpm install |
|||
``` |
|||
|
|||
**MAC M1(ARM芯片),其它操作系统无需关注**,正常运行需要手动安装 `esbuild-darwin-64`即可 |
|||
```sh |
|||
pnpm add esbuild-darwin-64@0.15.13 -D |
|||
``` |
|||
|
|||
## 本地启动 |
|||
### 微信小程序 |
|||
```sh |
|||
# 构建出产物 |
|||
pnpm dev:mp-weixin |
|||
``` |
|||
|
|||
> **Q1:** 如果dev的时候发现报错,可以尝试删除`node_modules`之后再在命令行中运行`pnpm install --shamefully-hoist`重新安装依赖再`pnpm dev:mp-weixin` |
|||
> |
|||
> [详细参考文档](https://pnpm.io/zh/faq#%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%883) |
|||
|
|||
> **Q2:** 如果运行白屏,有报错信息 “app.js错误ReferenceError: regeneratorRuntime is not defined” |
|||
> |
|||
> 参考[解决方案](https://blog.csdn.net/FUFCY/article/details/125160828) 给微信小程序IDE开启**增强编译选项** |
|||
|
|||
然后将编译结果`dist/dev/mp-weixin`导入微信开发者工具即可运行 |
|||
|
|||
<details> |
|||
<summary>点击查看 导入详细步骤</summary> |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTYzNzQxNjc3MjA4Mw==637416772083) |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTYzNzQxNjg4MTUwNA==637416881504) |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTYzNzQxNjY3OTY0NQ==637416679645) |
|||
|
|||
</details> |
|||
|
|||
### H5 |
|||
```sh |
|||
# CSR |
|||
pnpm dev:h5 |
|||
# SSR |
|||
pnpm dev:h5:ssr |
|||
``` |
|||
|
|||
根据提示,打开对应地址即可访问 |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxMTE0MDEzMg==653211140132) |
|||
|
|||
### App |
|||
>**Q1:** 如启动到App侧有报错? |
|||
>请更新至最新的HBuilderX-Alpha客户端 |
|||
#### 安装一些必要工具 |
|||
需要使用 `uni-app` 官方提供的 [HBuilderX](https://www.dcloud.io/hbuilderx.html) 启动项目 |
|||
|
|||
**Android模拟器在MacOSX、Windows上都可以安装;iOS模拟器只能在MacOSX上安装。** |
|||
|
|||
先安装相关模拟器,[详细参考文档](https://hx.dcloud.net.cn/Tutorial/App/installSimulator) |
|||
* 安卓:[夜神模拟器](https://www.yeshen.com/blog/) |
|||
* iOS:Mac上安装Xcode |
|||
|
|||
准备就绪后,使用 HBuilderX 打开项目 |
|||
#### iOS模拟器运行 |
|||
通过顶部菜单栏,找到运行入口 |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxMjk1MTgzNw==653212951837) |
|||
|
|||
选择一个目标设备,点击启动即可 |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxMjk3NDM0NQ==653212974345) |
|||
|
|||
#### Android模拟器运行 |
|||
这里以[夜神模拟器](https://www.yeshen.com/blog/)为例 |
|||
|
|||
<details> |
|||
<summary>点击查看 详细步骤</summary> |
|||
|
|||
先通过 HBuilderX 修改模拟器端口为 `62001` |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxNDAzMjIwNg==653214032206) |
|||
|
|||
打开夜神模拟器 |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxNDA5OTYxNg==653214099616) |
|||
|
|||
选择运行到 Android 基座 |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxNDEzMzI0OA==653214133248) |
|||
|
|||
选择已经打开的模拟器,点击运行即可 |
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxNDIxNjczNw==653214216737) |
|||
|
|||
![图片](https://img.cdn.sugarat.top/mdImg/MTY1MzIxMzkyOTQxNg==653213929416) |
|||
|
|||
</details> |
|||
|
|||
|
|||
## 打包构建 |
|||
### 微信小程序 |
|||
``` |
|||
pnpm build:mp-weixin |
|||
``` |
|||
yarn install |
|||
### H5 |
|||
```sh |
|||
# CSR |
|||
pnpm build:h5 |
|||
# SSR |
|||
pnpm build:h5:ssr |
|||
``` |
|||
|
|||
### Compiles and hot-reloads for development |
|||
### App |
|||
基于 `HBuilderX` 参考[官方文档](https://hx.dcloud.net.cn/Tutorial/App/SafePack)进行进一步的操作 |
|||
|
|||
其它更多运行脚本 查看 [package.json](./package.json)中的scripts |
|||
|
|||
## css预处理 |
|||
|
|||
### 已配置`scss`和`less`全局变量 |
|||
```typescript |
|||
// vite.config.ts |
|||
export default defineConfig({ |
|||
// ...... |
|||
css: { |
|||
preprocessorOptions: { |
|||
scss: { |
|||
additionalData: '@import "@/static/styles/variables.scss";' |
|||
}, |
|||
less: { |
|||
additionalData: '@import "@/static/styles/variables.less";' |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
``` |
|||
yarn serve |
|||
|
|||
|
|||
|
|||
`additionalData`的值是文件的路径,可以按照自己业务需求去修改,**如果项目样式变量分的比较细,可以使用一个样式文件引入多个变量样式文件,然后在这里引入入口文件** |
|||
|
|||
|
|||
|
|||
## 别名配置 |
|||
|
|||
如果我们想要在`import`的时候 src 的路径简写成`@`,下面的就是配置 vite 的别名,[属性类型请查看vite文档](https://vitejs.cn/config/#resolve-alias) |
|||
|
|||
- `@` 代替 `./src` |
|||
- `@components`代替`./src/components` |
|||
|
|||
```typescript |
|||
// vite.config.ts |
|||
export default defineConfig({ |
|||
// ...... |
|||
resolve: { |
|||
alias: { |
|||
'@': path.resolve(__dirname, './src'), |
|||
'@components': path.resolve(__dirname, './src/components') |
|||
} |
|||
} |
|||
}) |
|||
``` |
|||
|
|||
### Compiles and minifies for production |
|||
例子: |
|||
|
|||
```diff |
|||
// pages/index/index.vue |
|||
- import Hello from '../../components/hello/index.vue' |
|||
+ import Hello from '@/components/hello/index.vue' |
|||
// 或者 |
|||
+ import Hello from '@components/hello/index.vue' |
|||
``` |
|||
yarn build |
|||
|
|||
|
|||
|
|||
### ts |
|||
|
|||
如果是使用ts开发,这样还不够,ts不会识别路径的别名,显示找不到模块的报错,这个时候需要修改 `tsconfig.json` 文件,纠正下路径才可以。 |
|||
|
|||
|
|||
|
|||
```diff |
|||
// tsconfig.json |
|||
{ |
|||
// ...... |
|||
"compilerOptions": { |
|||
// ...... |
|||
+ "baseUrl": "./", |
|||
+ "paths": { |
|||
+ "@/*": ["src/*"], |
|||
+ "@components/*": ["src/components/*"] |
|||
} |
|||
}, |
|||
} |
|||
|
|||
``` |
|||
|
|||
### Customize configuration |
|||
See [Configuration Reference](https://cli.vuejs.org/config/). |
|||
添加 `baseUrl` 和 `paths` 参数,就可以完美解决编辑器的报错提示了! |
|||
|
|||
## 原子化css |
|||
* [unocss](https://github.com/unocss/unocss) - 即时按需原子 css 引擎 |
|||
* [unocss-preset-weapp](https://github.com/MellowCo/unocss-preset-weapp) - 兼容小程序 unocss 预设 |
|||
|
|||
> 支持小程序,h5,app |
|||
|
|||
![](https://fastly.jsdelivr.net/gh/MellowCo/image-host/2022/202211121156442.png) |
|||
|
@ -1,81 +0,0 @@ |
|||
const webpack = require('webpack') |
|||
const plugins = [] |
|||
|
|||
if (process.env.UNI_OPT_TREESHAKINGNG) { |
|||
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js')) |
|||
} |
|||
|
|||
if ( |
|||
( |
|||
process.env.UNI_PLATFORM === 'app-plus' && |
|||
process.env.UNI_USING_V8 |
|||
) || |
|||
( |
|||
process.env.UNI_PLATFORM === 'h5' && |
|||
process.env.UNI_H5_BROWSER === 'builtin' |
|||
) |
|||
) { |
|||
const path = require('path') |
|||
|
|||
const isWin = /^win/.test(process.platform) |
|||
|
|||
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path) |
|||
|
|||
const input = normalizePath(process.env.UNI_INPUT_DIR) |
|||
try { |
|||
plugins.push([ |
|||
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'), |
|||
{ |
|||
file (file) { |
|||
file = normalizePath(file) |
|||
if (file.indexOf(input) === 0) { |
|||
return path.relative(input, file) |
|||
} |
|||
return false |
|||
} |
|||
} |
|||
]) |
|||
} catch (e) { } |
|||
} |
|||
|
|||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui'] |
|||
process.UNI_LIBRARIES.forEach(libraryName => { |
|||
plugins.push([ |
|||
'import', |
|||
{ |
|||
'libraryName': libraryName, |
|||
'customName': (name) => { |
|||
return `${libraryName}/lib/${name}/${name}` |
|||
} |
|||
} |
|||
]) |
|||
}) |
|||
|
|||
if (process.env.UNI_PLATFORM !== 'h5') { |
|||
plugins.push('@babel/plugin-transform-runtime') |
|||
} |
|||
|
|||
const config = { |
|||
presets: [ |
|||
[ |
|||
'@vue/app', |
|||
{ |
|||
modules: webpack.version[0] > 4 ? 'auto' : 'commonjs', |
|||
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry' |
|||
} |
|||
] |
|||
], |
|||
plugins |
|||
} |
|||
|
|||
const UNI_H5_TEST = '**/@dcloudio/uni-h5/dist/index.umd.min.js' |
|||
if (process.env.NODE_ENV === 'production') { |
|||
config.overrides = [{ |
|||
test: UNI_H5_TEST, |
|||
compact: true, |
|||
}] |
|||
} else { |
|||
config.ignore = [UNI_H5_TEST] |
|||
} |
|||
|
|||
module.exports = config |
@ -0,0 +1,25 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<script> |
|||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
|||
CSS.supports('top: constant(a)')) |
|||
document.write( |
|||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
|||
(coverSupport ? ', viewport-fit=cover' : '') + '" />') |
|||
</script> |
|||
<title></title> |
|||
<!--preload-links--> |
|||
<!--app-context--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div id="app"> |
|||
<!--app-html--> |
|||
</div> |
|||
<script type="module" src="/src/main.ts"></script> |
|||
</body> |
|||
|
|||
</html> |
@ -1,64 +1,79 @@ |
|||
{ |
|||
"name": "eam_uni-app", |
|||
"version": "0.1.0", |
|||
"name": "闻荫APP", |
|||
"version": "1.0.0", |
|||
"private": true, |
|||
"scripts": { |
|||
"dev": "npm run dev:h5", |
|||
"test": "npm run build:h5", |
|||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", |
|||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom", |
|||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build", |
|||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build", |
|||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch", |
|||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom", |
|||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve", |
|||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch", |
|||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js" |
|||
"dev": "uni", |
|||
"dev:mp-weixin": "uni -p mp-weixin", |
|||
"dev:app": "uni -p app", |
|||
"dev:custom": "uni -p", |
|||
"test": "uni build --mode test", |
|||
"test:mp-weixin": "uni build -p mp-weixin", |
|||
"test:app": "uni build -p app", |
|||
"test:custom": "uni build -p", |
|||
"prod": "uni build --mode production", |
|||
"prod:mp-weixin": "uni build -p mp-weixin --mode production", |
|||
"prod:app": "uni build -p app --mode production", |
|||
"prod:custom": "uni build -p --mode production" |
|||
}, |
|||
"dependencies": { |
|||
"@dcloudio/uni-app": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-app-plus": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-h5": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-mp-weixin": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-stacktracey": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-stat": "^2.0.2-3090920231225001", |
|||
"@vue/shared": "^3.0.0", |
|||
"core-js": "^3.8.3", |
|||
"crypto-js": "^4.0.0", |
|||
"flyio": "^0.6.2", |
|||
"vue": ">= 2.6.14 < 2.7", |
|||
"vuex": "^3.2.0" |
|||
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-app-plus": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-components": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-h5": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3060920221114001", |
|||
"axios": "^0.27.2", |
|||
"cz-git": "^1.4.1", |
|||
"or": "^0.2.0", |
|||
"pinia": "^2.0.35", |
|||
"vk-uview-ui": "^1.3.7", |
|||
"vue": "^3.2.41", |
|||
"vue-demi": "latest", |
|||
"vue-i18n": "^9.1.9", |
|||
"vuex": "^4.0.2" |
|||
}, |
|||
"devDependencies": { |
|||
"@dcloudio/types": "^3.3.2", |
|||
"@dcloudio/uni-automator": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-cli-i18n": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-cli-shared": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-helper-json": "*", |
|||
"@dcloudio/uni-i18n": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-migration": "^2.0.2-3090920231225001", |
|||
"@dcloudio/uni-template-compiler": "^2.0.2-3090920231225001", |
|||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.2-3090920231225001", |
|||
"@dcloudio/vue-cli-plugin-uni": "^2.0.2-3090920231225001", |
|||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.2-3090920231225001", |
|||
"@dcloudio/webpack-uni-mp-loader": "^2.0.2-3090920231225001", |
|||
"@dcloudio/webpack-uni-pages-loader": "^2.0.2-3090920231225001", |
|||
"@vue/cli-plugin-babel": "~5.0.0", |
|||
"@vue/cli-service": "~5.0.0", |
|||
"babel-plugin-import": "^1.11.0", |
|||
"cross-env": "^7.0.2", |
|||
"jest": "^25.4.0", |
|||
"postcss-comment": "^2.0.0", |
|||
"sass": "^1.69.7", |
|||
"sass-loader": "^13.3.3", |
|||
"vite": "4.0.3", |
|||
"vue-template-compiler": ">= 2.6.14 < 2.7" |
|||
"@commitlint/cli": "^17.4.2", |
|||
"@commitlint/config-conventional": "^17.4.2", |
|||
"@dcloudio/types": "^3.0.16", |
|||
"@dcloudio/uni-automator": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3060920221114001", |
|||
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3060920221114001", |
|||
"@types/node": "^17.0.45", |
|||
"@typescript-eslint/eslint-plugin": "^5.30.3", |
|||
"@typescript-eslint/parser": "^5.30.3", |
|||
"@vitejs/plugin-vue": "^2.3.3", |
|||
"@vitest/ui": "^0.10.5", |
|||
"c8": "^7.11.3", |
|||
"czg": "^1.4.1", |
|||
"eslint": "^8.19.0", |
|||
"eslint-config-airbnb-base": "^15.0.0", |
|||
"eslint-config-prettier": "^8.5.0", |
|||
"eslint-plugin-import": "^2.26.0", |
|||
"eslint-plugin-prettier": "^4.2.1", |
|||
"eslint-plugin-todo-ddl": "^1.1.1", |
|||
"eslint-plugin-vue": "^9.1.1", |
|||
"jsdom": "^24.0.0", |
|||
"less": "^4.1.3", |
|||
"prettier": "^2.7.1", |
|||
"sass": "^1.53.0", |
|||
"simple-git-hooks": "^2.8.1", |
|||
"typescript": "^4.7.4", |
|||
"unocss": "^0.46.4", |
|||
"unocss-preset-weapp": "^0.2.1", |
|||
"vite": "^3.1.8", |
|||
"vite-plugin-eslint": "^1.6.1", |
|||
"vitest": "^0.16.0" |
|||
}, |
|||
"browserslist": [ |
|||
"Android >= 4.4", |
|||
"ios >= 9" |
|||
], |
|||
"uni-app": { |
|||
"scripts": {} |
|||
"simple-git-hooks": { |
|||
"commit-msg": "npx --no-install commitlint --edit \"$1\"" |
|||
} |
|||
} |
|||
|
@ -1,2 +0,0 @@ |
|||
别名:apptestalias |
|||
密码:092134 |
@ -1,27 +0,0 @@ |
|||
const path = require('path') |
|||
const webpack = require('webpack') |
|||
const config = { |
|||
parser: require('postcss-comment'), |
|||
plugins: [ |
|||
require('postcss-import')({ |
|||
resolve (id, basedir, importOptions) { |
|||
if (id.startsWith('~@/')) { |
|||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3)) |
|||
} else if (id.startsWith('@/')) { |
|||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2)) |
|||
} else if (id.startsWith('/') && !id.startsWith('//')) { |
|||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1)) |
|||
} |
|||
return id |
|||
} |
|||
}), |
|||
require('autoprefixer')({ |
|||
remove: process.env.UNI_PLATFORM !== 'h5' |
|||
}), |
|||
require('@dcloudio/vue-cli-plugin-uni/packages/postcss') |
|||
] |
|||
} |
|||
if (webpack.version[0] > 4) { |
|||
delete config.parser |
|||
} |
|||
module.exports = config |
@ -1,25 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh-CN"> |
|||
|
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<title> |
|||
<%= htmlWebpackPlugin.options.title %> |
|||
</title> |
|||
<script> |
|||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) |
|||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />') |
|||
</script> |
|||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" /> |
|||
</head> |
|||
|
|||
<body> |
|||
<noscript> |
|||
<strong>Please enable JavaScript to continue.</strong> |
|||
</noscript> |
|||
<div id="app"></div> |
|||
<!-- built files will be auto injected --> |
|||
</body> |
|||
|
|||
</html> |
@ -1,11 +0,0 @@ |
|||
/// <reference types='@dcloudio/types' />
|
|||
import Vue from 'vue' |
|||
declare module "vue/types/options" { |
|||
type Hooks = App.AppInstance & Page.PageInstance; |
|||
interface ComponentOptions<V extends Vue> extends Hooks { |
|||
/** |
|||
* 组件类型 |
|||
*/ |
|||
mpType?: string; |
|||
} |
|||
} |
@ -1,4 +0,0 @@ |
|||
declare module "*.vue" { |
|||
import Vue from 'vue' |
|||
export default Vue |
|||
} |
@ -1,16 +0,0 @@ |
|||
###################################################################### |
|||
# Build Tools |
|||
|
|||
/unpackage/* |
|||
/node_modules/* |
|||
|
|||
###################################################################### |
|||
# Development Tools |
|||
|
|||
/.idea/* |
|||
/.vscode/* |
|||
/.hbuilderx/* |
|||
|
|||
package-lock.json |
|||
yarn.lock |
|||
|
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 201 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 92 KiB |