Commit 3c68a08b authored by caimeng's avatar caimeng

贷超商户后台第一次提交

parents
Pipeline #344 canceled with stages
> 1%
last 2 versions
not dead
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
src/assets
src/icons
public
dist
node_modules
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/recommended'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/no-v-html': 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
}
*.html text eol=lf
*.css text eol=lf
*.js text eol=lf
*.scss text eol=lf
*.vue text eol=lf
*.hbs text eol=lf
*.sh text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
.DS_Store
node_modules
dist
.env.local
.env.*.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
public/video
*.zip
*.7z
package-lock.json
module.exports = {
extends: ['stylelint-config-recess-order', 'stylelint-config-prettier'],
}
This diff is collapsed.
>某人有种不要开小号,来正面刚啊。
>为什么发出来你自己没B数吗?说话跟放屁一样的东西,赶紧从我这滚出去。
>还要法院起诉我?去啊,正好把我之前给你买棺材的钱退给我。
## 🌱 常规版使用
```bash
# 克隆项目
git clone https://github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git
# 进入项目目录
cd vue-admin-beautiful-pro
# 安装依赖
npm i
# 本地开发 启动项目
npm run serve
```
## 🌱 基础版使用
```bash
# 克隆项目
git clone -b template https://github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git
# 进入项目目录
cd vue-admin-beautiful-pro
# 安装依赖
npm i
# 本地开发 启动项目
npm run serve
```
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
env: {
development: {
plugins: ['dynamic-import-node'],
},
},
}
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules"]
}
const data = [
'alphabetical_sorting',
'advance',
'address_book',
'alphabetical_sorting',
'advertising',
'alarm_clock',
'area_chart',
'approval',
'answers',
'approve',
'assistant',
'audio_file',
'automotive',
'automatic',
'bad_decision',
'bar_chart',
'bearish',
'biomass',
'biohazard',
'binoculars',
'bookmark',
'briefcase',
'biotech',
'broken_link',
'business',
'bullish',
'business_contact',
'businesswoman',
'cable_release',
'calculator',
'businessman',
'calendar',
'butting_in',
'call_transfer',
'callback',
'camcorder',
'camera',
'camcorder_pro',
'cancel',
'camera_addon',
'camera_identificatio',
'capacitor',
'candle_sticks',
'checkmark',
'circuit',
'charge_battery',
'clear_filters',
'clapperboard',
'clock',
'close_up_mode',
'collaboration',
'cell_phone',
'collapse',
'collect',
'cloth',
'combo_chart',
'comments',
'conference_call',
'compact_camera',
'contacts',
'copyleft',
'copyright',
'crystal_oscillator',
'cursor',
'currency_exchange',
'customer_support',
'dam',
'data_backup',
'data_configuration',
'data_encryption',
'data_protection',
'data_recovery',
'database',
'data_sheet',
'debt',
'decision',
'delete_column',
'delete_database',
'department',
'delete_row',
'deployment',
'dislike',
'disapprove',
'disclaimer',
'display',
'document',
'do_not_insert',
'do_not_mix',
'do_not_inhale',
'donate',
'down',
'doughnut_chart',
'down_left',
'down_right',
'download',
'edit_image',
'electrical_sensor',
'electrical_threshold',
'electricity',
'electro_devices',
'electronics',
'empty_battery',
'empty_filter',
'empty_trash',
'end_call',
'engineering',
'entering_heaven_aliv',
'expand',
'export',
'expired',
'factory',
'factory_breakdown',
'external',
'faq',
'feed_in',
'file',
'feedback',
'film',
'filled_filter',
'filing_cabinet',
'film_reel',
'flash_auto',
'fine_print',
'flash_off',
'flash_on',
'flow_chart',
'folder',
'frame',
'full_battery',
'full_trash',
'gallery',
'generic_sorting_asc',
'generic_sorting_desc',
'genealogy',
'globe',
'good_decision',
'headset',
'grid',
'graduation_cap',
'heat_map',
'high_priority',
'high_battery',
'image_file',
'home',
'idea',
'import',
'in_transit',
'integrated_webcam',
'inspection',
'invite',
'internal',
'ipad',
'info',
'iphone',
'kindle',
'key',
'landscape',
'left',
'left_down',
'left_up',
'leave',
'like_placeholder',
'light_at_the_end_of_',
'library',
'line_chart',
'link',
'like',
'lock',
'list',
'lock_landscape',
'low_battery',
'lock_portrait',
'low_priority',
'make_decision',
'medium_priority',
'manager',
'menu',
'middle_battery',
'minus',
'missed_call',
'mind_map',
'mms',
'multiple_cameras',
'money_transfer',
'music',
'multiple_devices',
'multiple_smartphones',
'multiple_inputs',
'negative_dynamic',
'neutral_decision',
'night_landscape',
'news',
'neutral_trading',
'night_portrait',
'no_idea',
'next',
'no_video',
'nook',
'ok',
'org_unit',
'opened_folder',
'old_time_camera',
'online_support',
'organization',
'package',
'paid',
'parallel_tasks',
'overtime',
'panorama',
'phone',
'phone_android',
'photo_reel',
'pie_chart',
'picture',
'planner',
'plus',
'podium_with_audience',
'podium_without_speak',
'podium_with_speaker',
'previous',
'portrait_mode',
'positive_dynamic',
'privacy',
'process',
'puzzle',
'questions',
'print',
'radar_plot',
'rating',
'ratings',
'reading',
'redo',
'reading_ebook',
'refresh',
'registered_trademark',
'right',
'reuse',
'remove_image',
'right_down',
'right_up',
'rotate_to_portrait',
'rules',
'rotate_camera',
'rotate_to_landscape',
'ruler',
'scatter_plot',
'search',
'safe',
'self_service_kiosk',
'selfie',
'serial_tasks',
'sales_performance',
'settings',
'services',
'share',
'shipped',
'sim_card',
'shop',
'service_mark',
'sim_card_chip',
'signature',
'smartphone_tablet',
'sound_recording_copy',
'sms',
'speaker',
'slr_back_side',
'start',
'stack_of_photos',
'statistics',
'sports_mode',
'support',
'synchronize',
'switch_camera',
'survey',
'tablet_android',
'template',
'trademark',
'todo_list',
'touchscreen_smartpho',
'timeline',
'tree_structure',
'undo',
'up_left',
'two_smartphones',
'unlock',
'up',
'up_right',
'upload',
'video_call',
'video_file',
'view_details',
'video_projector',
'vip',
'voice_presentation',
'webcam',
'voicemail',
'workflow',
'about',
'accept_database',
'add_image',
'add_column',
'add_database',
'add_row',
]
module.exports = [
{
url: '/colorfulIcon/getList',
type: 'get',
response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.query
let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false
return true
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
]
const List = [
{
id: 'root',
createTime: '@datetime',
name: '根节点',
order: 0,
children: [
{
id: '1',
parentId: 'root',
parentName: '根节点',
createTime: '@datetime',
name: '桃花坞',
order: 0,
},
{
id: '2',
parentId: 'root',
parentName: '根节点',
createTime: '@datetime',
name: '少林寺',
order: 1,
children: [
{
id: '@uuid',
parentId: '2',
parentName: '少林寺',
createTime: '@datetime',
name: '达摩院',
order: 0,
},
{
id: '@uuid',
parentId: '2',
parentName: '少林寺',
createTime: '@datetime',
name: '戒律堂',
order: 1,
},
],
},
],
},
]
module.exports = [
{
url: '/departmentManagement/getList',
type: 'get',
response: (config) => {
const { name, pageNo = 1, pageSize = 20 } = config.query
let mockList = List.filter((item) => {
return !(name && item.name.indexOf(name) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
{
url: '/departmentManagement/doEdit',
type: 'post',
response: () => {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/departmentManagement/doDelete',
type: 'post',
response: () => {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
const data = {
description:
' 作者寄语:静坐常思己过,闲谈不论人非,vue-admin-beautiful-pro目前已支持5种布局、5种主题,共计25种风格无缝切换,支持三级路由以上缓存,提供最细致的权限处理,支持中英文切换,同时兼容电脑、平板、手机。',
}
module.exports = [
{
url: '/description/getList',
type: 'get',
response: () => {
return {
code: 200,
msg: 'success',
data,
}
},
},
]
const List = [
{
uuid: '@uuid',
icon: 'file-pdf-line',
title: 'pdf打印',
price: '0',
type: '组件',
isRecommend: 1,
},
]
module.exports = [
{
url: '/goods/getList',
type: 'get',
response(config) {
const { title, pageNo = 1, pageSize = 20 } = config.query
let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
]
module.exports = [
{
url: '/menuManagement/getTree',
type: 'get',
response() {
return {
code: 200,
msg: 'success',
totalCount: 999,
data: [
{
id: 'root',
label: '全部角色',
children: [
{
id: '@id',
role: 'admin',
label: 'admin角色',
},
{
id: '@id',
role: 'editor',
label: 'editor角色',
},
],
},
],
}
},
},
{
url: '/menuManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/menuManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
const data = [
{
email: '@email',
image: 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
notice: '官方QQ群1:972435319、官方QQ群2:1139183756',
},
{
email: '@email',
image: 'https://i.gtimg.cn/club/item/face/img/8/15918_100.gif',
notice:
"github开源地址:<a target='_blank' href='https://github.com/chuzhixin/vue-admin-beautiful'>https://github.com/chuzhixin/vue-admin-beautiful</a>",
},
{
email: '@email',
image: 'https://i.gtimg.cn/club/item/face/img/0/15640_100.gif',
notice:
"开源中国地址:<a target='_blank' href='https://www.oschina.net/p/vue-admin-beautiful'>https://www.oschina.net/p/vue-admin-beautiful</a>",
},
{
email: '@email',
image: 'https://i.gtimg.cn/club/item/face/img/9/15919_100.gif',
notice:
"gitee开源地址:<a target='_blank' href='https://gitee.com/chu1204505056/vue-admin-beautiful'>https://gitee.com/chu1204505056/vue-admin-beautiful</a>",
},
{
email: '@email',
image: 'https://i.gtimg.cn/club/item/face/img/8/15918_100.gif',
notice:
"vue3.0 体验地址:<a target='_blank' href='https://chu1204505056.gitee.io/vue-admin-beautiful-antdv'>'https://chu1204505056.gitee.io/vue-admin-beautiful-antdv</a>",
},
]
module.exports = [
{
url: '/notice/getList',
type: 'get',
response: () => {
return {
code: 200,
msg: 'success',
data,
}
},
},
]
This diff is collapsed.
const List = [
{
id: '@id',
role: 'admin',
},
{
id: '@id',
role: 'editor',
},
]
module.exports = [
{
url: '/roleManagement/getList',
type: 'get',
response(config) {
const { role, pageNo = 1, pageSize = 20 } = config.query
let mockList = List.filter((item) => {
return !(role && item.title.indexOf(role) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
{
url: '/roleManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/roleManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
This diff is collapsed.
const data = [
{
url: 'https://github.com/chuzhixin/vue-admin-beautiful',
value:
'中国最好用的框架企业级、中后台、通用型前端框架vue-admin-beautiful-pro',
},
{
url:
'https://www.baidu.com/s?wd=vue-admin-beautiful%E6%96%87%E6%A1%A3&rsv_spt=1&rsv_iqid=0xb8393f250000e09a&issp=1&f=3&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=1&rsv_dl=ts_0&oq=vue-admin-beautiful&rsv_t=780fn2RNJdwKpBcnXhafmyPjUPAduXDbHgYYngJ2QKBQluEnKOClb2r3SE4W%2BzhtF6fV&rsv_btype=t&inputT=459&rsv_sug3=5&rsv_sug1=5&rsv_sug7=100&rsv_pq=ed30ea5500032c4b&rsv_sug2=0&prefixsug=vue-admin-beautiful&rsp=0&rsv_sug4=1793',
value: 'vue-admin-beautiful文档',
},
{
url:
'https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=2&tn=baiduhome_pg&wd=beautiful.panm.cn&oq=beautiful.panm.cn&rsv_pq=bf312c2f00026019&rsv_t=a6b8%2Fo1W16TeYRYzViSwSXsVMosb255PaiEfKTXMKKNx0dwOtxpowxPYRP%2FJ%2BgMgtcAo&rqlang=cn&rsv_enter=1&rsv_dl=tb&rsv_btype=t&inputT=2&rsv_sug3=61&rsv_sug2=0&rsv_sug4=883&bs=beautiful.panm.cn',
value: 'vue-admin-beautiful官网',
},
]
module.exports = [
{
url: '/search/getList',
type: 'get',
response: () => {
return {
code: 200,
msg: 'success',
data,
}
},
},
]
const { mock } = require('mockjs')
const { handleRandomImage } = require('../utils')
const List = []
const count = 50
for (let i = 0; i < count; i++) {
List.push(
mock({
uuid: '@uuid',
id: '@id',
title: '@title(1, 2)',
description: '@csentence',
'status|1': ['published', 'draft', 'deleted'],
author: '@cname',
datetime: '@datetime',
pageViews: '@integer(300, 5000)',
img: handleRandomImage(228, 228),
switch: '@boolean',
percent: '@integer(80,99)',
'rate|1': [1, 2, 3, 4, 5],
a: '@title(1, 2)',
b: '@title(1, 2)',
c: '@title(1, 2)',
d: '@title(1, 2)',
e: '@title(1, 2)',
f: '@title(1, 2)',
g: '@title(1, 2)',
})
)
}
module.exports = [
{
url: '/table/getList',
type: 'get',
response(config) {
const { title, pageNo = 1, pageSize = 20 } = config.query
let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
{
url: '/table/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/table/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
const accessTokens = {
admin: 'admin-accessToken',
editor: 'editor-accessToken',
test: 'test-accessToken',
}
module.exports = [
{
url: '/publicKey',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
data: {
mockServer: true,
publicKey:
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBT2vr+dhZElF73FJ6xiP181txKWUSNLPQQlid6DUJhGAOZblluafIdLmnUyKE8mMHhT3R+Ib3ssZcJku6Hn72yHYj/qPkCGFv0eFo7G+GJfDIUeDyalBN0QsuiE/XzPHJBuJDfRArOiWvH0BXOv5kpeXSXM8yTt5Na1jAYSiQ/wIDAQAB',
},
}
},
},
{
url: '/login',
type: 'post',
response(config) {
const { username } = config.body
const accessToken = accessTokens[username]
if (!accessToken) {
return {
code: 500,
msg: '帐户或密码不正确',
}
}
return {
code: 200,
msg: 'success',
data: { accessToken },
}
},
},
{
url: '/socialLogin',
type: 'post',
response(config) {
const { code } = config.body
if (!code) {
return {
code: 500,
msg: '未成功获取Token',
}
}
return {
code: 200,
msg: 'success',
data: { accessToken: accessTokens['admin'] },
}
},
},
{
url: '/register',
type: 'post',
response() {
return {
code: 200,
msg: '模拟注册成功',
}
},
},
{
url: '/userInfo',
type: 'post',
response(config) {
const { accessToken } = config.body
let roles = ['admin']
let ability = ['READ']
let username = 'admin'
if ('admin-accessToken' === accessToken) {
roles = ['admin']
ability = ['READ', 'WRITE', 'DELETE']
username = 'admin'
}
if ('editor-accessToken' === accessToken) {
roles = ['editor']
ability = ['READ', 'WRITE']
username = 'editor'
}
if ('test-accessToken' === accessToken) {
roles = ['admin', 'editor']
ability = ['READ']
username = 'test'
}
return {
code: 200,
msg: 'success',
data: {
roles,
ability,
username,
'avatar|1': [
'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
'https://i.gtimg.cn/club/item/face/img/8/15918_100.gif',
],
},
}
},
},
{
url: '/logout',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
}
},
},
]
const List = [
{
id: '@id',
username: 'admin',
password: 'admin',
email: '@email',
roles: ['admin'],
datatime: '@datetime',
},
{
id: '@id',
username: 'editor',
password: 'editor',
email: '@email',
roles: ['editor'],
datatime: '@datetime',
},
{
id: '@id',
username: 'test',
password: 'test',
email: '@email',
roles: ['admin', 'editor'],
datatime: '@datetime',
},
]
module.exports = [
{
url: '/userManagement/getList',
type: 'get',
response(config) {
const { username, pageNo = 1, pageSize = 20 } = config.query
let mockList = List.filter((item) => {
return !(username && item.username.indexOf(username) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
{
url: '/userManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/userManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
/**
* @description 导入所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
*/
const { handleMockArray } = require('./utils')
const mocks = []
const mockArray = handleMockArray()
mockArray.forEach((item) => {
const obj = require(item)
mocks.push(...obj)
})
module.exports = {
mocks,
}
const chokidar = require("chokidar");
const bodyParser = require("body-parser");
const chalk = require("chalk");
const path = require("path");
const Mock = require("mockjs");
const { baseURL } = require("../src/config");
const mockDir = path.join(process.cwd(), "mock");
/**
*
* @param app
* @returns {{mockStartIndex: number, mockRoutesLength: number}}
*/
const registerRoutes = (app) => {
let mockLastIndex;
const { mocks } = require("./index.js");
const mocksForServer = mocks.map((route) => {
return responseFake(route.url, route.type, route.response);
});
for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response);
mockLastIndex = app._router.stack.length;
}
const mockRoutesLength = Object.keys(mocksForServer).length;
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength,
};
};
/**
*
* @param url
* @param type
* @param respond
* @returns {{response(*=, *=): void, type: (*|string), url: RegExp}}
*/
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`${baseURL}${url}`),
type: type || "get",
response(req, res) {
res.status(200);
if (JSON.stringify(req.body) !== "{}") {
console.log(chalk.green(`> 请求地址:${req.path}`));
console.log(chalk.green(`> 请求参数:${JSON.stringify(req.body)}\n`));
} else {
console.log(chalk.green(`> 请求地址:${req.path}\n`));
}
res.json(
Mock.mock(respond instanceof Function ? respond(req, res) : respond)
);
},
};
};
/**
*
* @param app
*/
module.exports = (app) => {
app.use(bodyParser.json());
app.use(
bodyParser.urlencoded({
extended: true,
})
);
const mockRoutes = registerRoutes(app);
let mockRoutesLength = mockRoutes.mockRoutesLength;
let mockStartIndex = mockRoutes.mockStartIndex;
chokidar
.watch(mockDir, {
ignored: /mock-server/,
ignoreInitial: true,
})
.on("all", (event) => {
if (event === "change" || event === "add") {
try {
app._router.stack.splice(mockStartIndex, mockRoutesLength);
Object.keys(require.cache).forEach((item) => {
if (item.includes(mockDir)) {
delete require.cache[require.resolve(item)];
}
});
const mockRoutes = registerRoutes(app);
mockRoutesLength = mockRoutes.mockRoutesLength;
mockStartIndex = mockRoutes.mockStartIndex;
} catch (error) {
console.log(chalk.red(error));
}
}
});
};
const { Random } = require('mockjs')
const { join } = require('path')
const fs = require('fs')
/**
* @description 随机生成图片url。
* @param width
* @param height
* @returns {string}
*/
function handleRandomImage(width = 50, height = 50) {
return `https://picsum.photos/${width}/${height}?random=${Random.guid()}`
}
/**
* @description 处理所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
* @returns {[]}
*/
function handleMockArray() {
const mockArray = []
const getFiles = (jsonPath) => {
const jsonFiles = []
const findJsonFile = (path) => {
const files = fs.readdirSync(path)
files.forEach((item) => {
const fPath = join(path, item)
const stat = fs.statSync(fPath)
if (stat.isDirectory() === true) findJsonFile(item)
if (stat.isFile() === true) jsonFiles.push(item)
})
}
findJsonFile(jsonPath)
jsonFiles.forEach((item) => mockArray.push(`./controller/${item}`))
}
getFiles('mock/controller')
return mockArray
}
module.exports = {
handleRandomImage,
handleMockArray,
}
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 20m;
server {
listen 80;
server_name localhost;
location / {
root /home/web;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
{
"name": "vue-admin-beautiful-pro",
"version": "1.0.0",
"author": "chuzhixin",
"license": "Mozilla Public License Version 2.0",
"private": true,
"participants": [
"fwfmiao"
],
"homepage": "https://chu1204505056.gitee.io/vue-admin-beautiful-pro",
"scripts": {
"serve": "vue-cli-service serve --fix",
"build": "vue-cli-service build",
"build:report": "vue-cli-service build --report",
"lint": "vue-cli-service lint",
"lint:style": "stylelint-config-prettier-check",
"inspect": "vue-cli-service inspect",
"template": "plop",
"clear": "npm cache clean -f&&rimraf node_modules&&npm install --registry=https://registry.npm.taobao.org",
"use:npm": "nrm use npm",
"use:taobao": "nrm use taobao",
"update": "ncu -u&&npm install --registry=https://registry.npm.taobao.org",
"update:globle": "ncu -g",
"push": "start ./push.sh",
"deploy": "start ./deploy.sh",
"docker:build": "npm run build&&docker build --pull --rm -f \"dockerfile\" -t vueadminbeautifulpro:latest \".\"&&docker run --rm -d -p 80:80/tcp vueadminbeautifulpro:latest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"git add"
]
},
"dependencies": {
"axios": "^0.20.0",
"clipboard": "^2.0.6",
"core-js": "^3.6.5",
"dayjs": "^1.9.1",
"echarts": "^4.9.0",
"element-ui": "^2.13.2",
"file-saver": "^2.0.2",
"js-cookie": "^2.2.1",
"jsencrypt": "^3.0.0-rc.1",
"jsplumb": "^2.14.6",
"less-loader": "^10.2.0",
"lodash": "^4.17.20",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"qs": "^6.9.4",
"remixicon": "^2.5.0",
"screenfull": "^5.0.2",
"vue": "^2.6.12",
"vue-echarts": "^4.1.0",
"vue-i18n": "^8.21.1",
"vue-router": "^3.4.5",
"vuedraggable": "^2.24.1",
"vuex": "^3.5.1",
"xlsx": "^0.16.7",
"zx-contextmenu": "0.0.1",
"zx-count": "^0.3.7",
"zx-magnifier": "^0.0.4",
"zx-markdown-editor": "^0.0.2",
"zx-player": "^1.0.1",
"zx-quill": "^0.0.2",
"zx-templates": "^0.0.24"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.6",
"@vue/cli-plugin-eslint": "^4.5.6",
"@vue/cli-service": "^4.5.6",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"body-parser": "^1.19.0",
"chalk": "^4.1.0",
"chokidar": "^3.4.2",
"compression-webpack-plugin": "^6.0.2",
"eslint": "^7.10.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^7.0.1",
"filemanager-webpack-plugin": "^2.0.5",
"lint-staged": "^10.4.0",
"plop": "^2.7.4",
"prettier": "^2.1.2",
"raw-loader": "^4.0.1",
"sass": "^1.26.12",
"sass-loader": "^10.0.2",
"stylelint": "^13.7.2",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recess-order": "^2.1.0",
"svg-sprite-loader": "^5.0.0",
"vue-template-compiler": "^2.6.12",
"webpackbar": "^4.0.0"
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"vue-admin",
"element-admin",
"boilerplate",
"admin-template",
"management-system"
],
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
}
}
const viewGenerator = require('zx-templates/view/prompt')
const curdGenerator = require('zx-templates/curd/prompt')
const componentGenerator = require('zx-templates/component/prompt')
const mockGenerator = require('zx-templates/mock/prompt')
const vuexGenerator = require('zx-templates/vuex/prompt')
module.exports = (plop) => {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('curd', curdGenerator)
plop.setGenerator('component', componentGenerator)
plop.setGenerator('mock&api', mockGenerator)
plop.setGenerator('vuex', vuexGenerator)
}
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'es5',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
htmlWhitespaceSensitivity: 'ignore',
vueIndentScriptAndStyle: true,
endOfLine: 'lf',
}
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="width=device-width,initial-scale=1.0" name="viewport" />
<link href="<%= BASE_URL %>favicon.ico" rel="icon" />
<title><%= VUE_APP_TITLE %></title>
<meta
content="vab,vab官网,后台管理框架,vue后台管理框架,vue-admin-beautiful,vue-admin-beautiful-pro,vue-admin-beautiful官网,vue-admin-beautiful文档,vue-element-admin,vue-element-admin官网,vue-element-admin文档,vue-admin,vue-admin官网,vue-admin文档"
name="keywords"
/>
<meta
content="<%= VUE_APP_TITLE %>官网与文档基于vue-admin-beautiful-pro构建,简称vab(是一款超棒的vue+element中后台前端快速开发框架),QQ群972435319,作者:<%= VUE_APP_AUTHOR %>"
name="description"
/>
<meta content="<%= VUE_APP_AUTHOR %>" name="author" />
<link href="<%= BASE_URL %>static/css/loading.css" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
</body>
</html>
.first-loading-wrp {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 90vh;
min-height: 90vh;
}
.first-loading-wrp > h1 {
font-size: 30px;
font-weight: bolder;
}
.first-loading-wrp .loading-wrp {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
}
.dot {
position: relative;
box-sizing: border-box;
display: inline-block;
width: 64px;
height: 64px;
font-size: 64px;
transform: rotate(45deg);
animation: antRotate 1.2s infinite linear;
}
.dot i {
position: absolute;
display: block;
width: 28px;
height: 28px;
background-color: #1890ff;
border-radius: 100%;
opacity: 0.3;
transform: scale(0.75);
transform-origin: 50% 50%;
animation: antSpinMove 1s infinite linear alternate;
}
.dot i:nth-child(1) {
top: 0;
left: 0;
}
.dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}
<template>
<div id="root">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'App',
}
</script>
import request from '@/utils/request'
//const serverURL = "https://vab-unicloud-3a9da9.service.tcloudbase.com";
//const apiURL = "/colorfulIcon/getList";
export function getIconList(params) {
return request({
url: '/colorfulIcon/getList',
method: 'get',
params,
})
}
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/departmentManagement/getList',
method: 'get',
params,
})
}
export function doEdit(data) {
return request({
url: '/departmentManagement/doEdit',
method: 'post',
data,
})
}
export function doDelete(data) {
return request({
url: '/departmentManagement/doDelete',
method: 'post',
data,
})
}
import request from '@/utils/request'
//const serverURL = "https://vab-unicloud-3a9da9.service.tcloudbase.com";
///const apiURL = "/description/getList";
export function getList() {
return request({
url: '/description/getList',
method: 'get',
})
}
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/goods/getList',
method: 'get',
params,
})
}
import request from '@/utils/request'
export function getTree(params) {
return request({
url: '/menuManagement/getTree',
method: 'get',
params,
})
}
export function doEdit(data) {
return request({
url: '/menuManagement/doEdit',
method: 'post',
data,
})
}
export function doDelete(data) {
return request({
url: '/menuManagement/doDelete',
method: 'post',
data,
})
}
import request from '@/utils/request'
//const serverURL = "https://vab-unicloud-3a9da9.service.tcloudbase.com";
//const apiURL = "/notice/getList";
export function getList() {
return request({
url: '/notice/getList',
method: 'get',
})
}
import request from '@/utils/request'
export function getPublicKey() {
return request({
url: '/publicKey',
method: 'get',
})
}
import request from '@/utils/request'
//const serverURL = "https://vab-unicloud-3a9da9.service.tcloudbase.com";
//const apiURL = "/remixIcon/getList";
export function getIconList(params) {
return request({
url: '/remixIcon/getList',
method: 'get',
params,
})
}
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/roleManagement/getList',
method: 'get',
params,
})
}
export function doEdit(data) {
return request({
url: '/roleManagement/doEdit',
method: 'post',
data,
})
}
export function doDelete(data) {
return request({
url: '/roleManagement/doDelete',
method: 'post',
data,
})
}
import request from '@/utils/request'
export function getRouterList(params) {
return request({
url: '/menu/navigate',
method: 'get',
params,
})
}
import request from '@/utils/request'
//const serverURL = "https://vab-unicloud-3a9da9.service.tcloudbase.com";
//const apiURL = "/search/getList";
export function getList() {
return request({
url: '/search/getList',
method: 'get',
})
}
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/table/getList',
method: 'get',
params,
})
}
export function doEdit(data) {
return request({
url: '/table/doEdit',
method: 'post',
data,
})
}
export function doDelete(data) {
return request({
url: '/table/doDelete',
method: 'post',
data,
})
}
import request from '@/utils/request'
import { encryptedData } from '@/utils/encrypt'
import { loginRSA, tokenName } from '@/config'
export async function login(data) {
if (loginRSA) {
data = await encryptedData(data)
}
return request({
url: '/login',
method: 'post',
data,
})
}
export async function socialLogin(data) {
if (loginRSA) {
data = await encryptedData(data)
}
return request({
url: '/socialLogin',
method: 'post',
data,
})
}
export function getUserInfo(accessToken) {
//此处为了兼容mock.js使用data传递accessToken,如果使用mock可以走headers
return request({
url: '/userInfo',
method: 'post',
data: {
[tokenName]: accessToken,
},
})
}
export function logout() {
return request({
url: '/logout',
method: 'post',
})
}
export function register() {
return request({
url: '/register',
method: 'post',
})
}
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/userManagement/getList',
method: 'get',
params,
})
}
export function doEdit(data) {
return request({
url: '/userManagement/doEdit',
method: 'post',
data,
})
}
export function doDelete(data) {
return request({
url: '/userManagement/doDelete',
method: 'post',
data,
})
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment