first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead

View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@@ -0,0 +1,19 @@
# vuecli3-tpl
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
{
"name": "vuecli3-tpl",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"start": "npm run serve",
"build": "vue-cli-service build"
},
"dependencies": {
"amfe-flexible": "^2.2.1",
"axios": "^0.24.0",
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"postcss-pxtorem": "^5.1.1",
"pug": "^3.0.2",
"pug-html-loader": "^1.1.5",
"pug-plain-loader": "^1.1.0",
"style-resources-loader": "^1.5.0",
"vue-template-compiler": "^2.6.11"
}
}

View File

@@ -0,0 +1,11 @@
// module.exports = {
// plugins: {
// autoprefixer: {
// browsers: ['Android >= 4.0', 'iOS >= 7'],
// },
// 'postcss-pxtorem': {
// rootValue: 37.5,
// propList: ['*'],
// },
// },
// };

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<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 %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,9 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<style lang="less">
@import "~@less/_.less";
</style>

View File

@@ -0,0 +1,4 @@
@import "./mixins/index";
@import "./mixins/normalize";
@import "./mixins/reset";
@import "./config/color";

View File

@@ -0,0 +1,304 @@
@red50: #ffebee;
@red100: #ffcdd2;
@red200: #ef9a9a;
@red300: #e57373;
@red400: #ef5350;
@red500: #f44336;
@red600: #e53935;
@red700: #d32f2f;
@red800: #c62828;
@red900: #b71c1c;
@redA100: #ff8a80;
@redA200: #ff5252;
@redA400: #ff1744;
@redA700: #d50000;
@red: @red500;
@pink50: #fce4ec;
@pink100: #f8bbd0;
@pink200: #f48fb1;
@pink300: #f06292;
@pink400: #ec407a;
@pink500: #e91e63;
@pink600: #d81b60;
@pink700: #c2185b;
@pink800: #ad1457;
@pink900: #880e4f;
@pinkA100: #ff80ab;
@pinkA200: #ff4081;
@pinkA400: #f50057;
@pinkA700: #c51162;
@pink: @pink500;
@purple50: #f3e5f5;
@purple100: #e1bee7;
@purple200: #ce93d8;
@purple300: #ba68c8;
@purple400: #ab47bc;
@purple500: #9c27b0;
@purple600: #8e24aa;
@purple700: #7b1fa2;
@purple800: #6a1b9a;
@purple900: #4a148c;
@purpleA100: #ea80fc;
@purpleA200: #e040fb;
@purpleA400: #d500f9;
@purpleA700: #aa00ff;
@purple: @purple500;
@deepPurple50: #ede7f6;
@deepPurple100: #d1c4e9;
@deepPurple200: #b39ddb;
@deepPurple300: #9575cd;
@deepPurple400: #7e57c2;
@deepPurple500: #673ab7;
@deepPurple600: #5e35b1;
@deepPurple700: #512da8;
@deepPurple800: #4527a0;
@deepPurple900: #311b92;
@deepPurpleA100: #b388ff;
@deepPurpleA200: #7c4dff;
@deepPurpleA400: #651fff;
@deepPurpleA700: #6200ea;
@deepPurple: @deepPurple500;
@indigo50: #e8eaf6;
@indigo100: #c5cae9;
@indigo200: #9fa8da;
@indigo300: #7986cb;
@indigo400: #5c6bc0;
@indigo500: #3f51b5;
@indigo600: #3949ab;
@indigo700: #303f9f;
@indigo800: #283593;
@indigo900: #1a237e;
@indigoA100: #8c9eff;
@indigoA200: #536dfe;
@indigoA400: #3d5afe;
@indigoA700: #304ffe;
@indigo: @indigo500;
@blue50: #e3f2fd;
@blue100: #bbdefb;
@blue200: #90caf9;
@blue300: #64b5f6;
@blue400: #42a5f5;
@blue500: #2196f3;
@blue600: #1e88e5;
@blue700: #1976d2;
@blue800: #1565c0;
@blue900: #0d47a1;
@blueA100: #82b1ff;
@blueA200: #448aff;
@blueA400: #2979ff;
@blueA700: #2962ff;
@blue: @blue500;
@lightBlue50: #e1f5fe;
@lightBlue100: #b3e5fc;
@lightBlue200: #81d4fa;
@lightBlue300: #4fc3f7;
@lightBlue400: #29b6f6;
@lightBlue500: #03a9f4;
@lightBlue600: #039be5;
@lightBlue700: #0288d1;
@lightBlue800: #0277bd;
@lightBlue900: #01579b;
@lightBlueA100: #80d8ff;
@lightBlueA200: #40c4ff;
@lightBlueA400: #00b0ff;
@lightBlueA700: #0091ea;
@lightBlue: @lightBlue500;
@cyan50: #e0f7fa;
@cyan100: #b2ebf2;
@cyan200: #80deea;
@cyan300: #4dd0e1;
@cyan400: #26c6da;
@cyan500: #00bcd4;
@cyan600: #00acc1;
@cyan700: #0097a7;
@cyan800: #00838f;
@cyan900: #006064;
@cyanA100: #84ffff;
@cyanA200: #18ffff;
@cyanA400: #00e5ff;
@cyanA700: #00b8d4;
@cyan: @cyan500;
@teal50: #e0f2f1;
@teal100: #b2dfdb;
@teal200: #80cbc4;
@teal300: #4db6ac;
@teal400: #26a69a;
@teal500: #009688;
@teal600: #00897b;
@teal700: #00796b;
@teal800: #00695c;
@teal900: #004d40;
@tealA100: #a7ffeb;
@tealA200: #64ffda;
@tealA400: #1de9b6;
@tealA700: #00bfa5;
@teal: @teal500;
@green50: #e8f5e9;
@green100: #c8e6c9;
@green200: #a5d6a7;
@green300: #81c784;
@green400: #66bb6a;
@green500: #4caf50;
@green600: #43a047;
@green700: #388e3c;
@green800: #2e7d32;
@green900: #1b5e20;
@greenA100: #b9f6ca;
@greenA200: #69f0ae;
@greenA400: #00e676;
@greenA700: #00c853;
@green: @green500;
@lightGreen50: #f1f8e9;
@lightGreen100: #dcedc8;
@lightGreen200: #c5e1a5;
@lightGreen300: #aed581;
@lightGreen400: #9ccc65;
@lightGreen500: #8bc34a;
@lightGreen600: #7cb342;
@lightGreen700: #689f38;
@lightGreen800: #558b2f;
@lightGreen900: #33691e;
@lightGreenA100: #ccff90;
@lightGreenA200: #b2ff59;
@lightGreenA400: #76ff03;
@lightGreenA700: #64dd17;
@lightGreen: @lightGreen500;
@lime50: #f9fbe7;
@lime100: #f0f4c3;
@lime200: #e6ee9c;
@lime300: #dce775;
@lime400: #d4e157;
@lime500: #cddc39;
@lime600: #c0ca33;
@lime700: #afb42b;
@lime800: #9e9d24;
@lime900: #827717;
@limeA100: #f4ff81;
@limeA200: #eeff41;
@limeA400: #c6ff00;
@limeA700: #aeea00;
@lime: @lime500;
@yellow50: #fffde7;
@yellow100: #fff9c4;
@yellow200: #fff59d;
@yellow300: #fff176;
@yellow400: #ffee58;
@yellow500: #ffeb3b;
@yellow600: #fdd835;
@yellow700: #fbc02d;
@yellow800: #f9a825;
@yellow900: #f57f17;
@yellowA100: #ffff8d;
@yellowA200: #ffff00;
@yellowA400: #ffea00;
@yellowA700: #ffd600;
@yellow: @yellow500;
@amber50: #fff8e1;
@amber100: #ffecb3;
@amber200: #ffe082;
@amber300: #ffd54f;
@amber400: #ffca28;
@amber500: #ffc107;
@amber600: #ffb300;
@amber700: #ffa000;
@amber800: #ff8f00;
@amber900: #ff6f00;
@amberA100: #ffe57f;
@amberA200: #ffd740;
@amberA400: #ffc400;
@amberA700: #ffab00;
@amber: @amber500;
@orange50: #fff3e0;
@orange100: #ffe0b2;
@orange200: #ffcc80;
@orange300: #ffb74d;
@orange400: #ffa726;
@orange500: #ff9800;
@orange600: #fb8c00;
@orange700: #f57c00;
@orange800: #ef6c00;
@orange900: #e65100;
@orangeA100: #ffd180;
@orangeA200: #ffab40;
@orangeA400: #ff9100;
@orangeA700: #ff6d00;
@orange: @orange500;
@deepOrange50: #fbe9e7;
@deepOrange100: #ffccbc;
@deepOrange200: #ffab91;
@deepOrange300: #ff8a65;
@deepOrange400: #ff7043;
@deepOrange500: #ff5722;
@deepOrange600: #f4511e;
@deepOrange700: #e64a19;
@deepOrange800: #d84315;
@deepOrange900: #bf360c;
@deepOrangeA100: #ff9e80;
@deepOrangeA200: #ff6e40;
@deepOrangeA400: #ff3d00;
@deepOrangeA700: #dd2c00;
@deepOrange: @deepOrange500;
@brown50: #efebe9;
@brown100: #d7ccc8;
@brown200: #bcaaa4;
@brown300: #a1887f;
@brown400: #8d6e63;
@brown500: #795548;
@brown600: #6d4c41;
@brown700: #5d4037;
@brown800: #4e342e;
@brown900: #3e2723;
@brown: @brown500;
@blueGrey50: #eceff1;
@blueGrey100: #cfd8dc;
@blueGrey200: #b0bec5;
@blueGrey300: #90a4ae;
@blueGrey400: #78909c;
@blueGrey500: #607d8b;
@blueGrey600: #546e7a;
@blueGrey700: #455a64;
@blueGrey800: #37474f;
@blueGrey900: #263238;
@blueGrey: @blueGrey500;
@grey50: #fafafa;
@grey100: #f5f5f5;
@grey200: #eeeeee;
@grey300: #e0e0e0;
@grey400: #bdbdbd;
@grey500: #9e9e9e;
@grey600: #757575;
@grey700: #616161;
@grey800: #424242;
@grey900: #212121;
@grey: @grey500;
@black: #000000;
@white: #ffffff;
@transparent: rgba(0, 0, 0, 0);
@fullBlack: rgba(0, 0, 0, 1);
@darkBlack: rgba(0, 0, 0, 0.87);
@lightBlack: rgba(0, 0, 0, 0.54);
@minBlack: rgba(0, 0, 0, 0.26);
@faintBlack: rgba(0, 0, 0, 0.12);
@fullWhite: rgba(255, 255, 255, 1);
@darkWhite: rgba(255, 255, 255, 0.87);
@lightWhite: rgba(255, 255, 255, 0.54);

View File

@@ -0,0 +1,310 @@
.transition(@d) {
-webkit-transition-duration: @d;
transition-duration: @d;
}
.delay(@d) {
-webkit-transition-delay: @d;
transition-delay: @d;
}
.transform(@t) {
-webkit-transform: @t;
transform: @t;
}
.transform-origin(@to) {
-webkit-transform-origin: @to;
transform-origin: @to;
}
.translate3d(@x:0, @y:0, @z:0) {
-webkit-transform: translate3d(@x,@y,@z);
transform: translate3d(@x,@y,@z);
}
.animation (@a) {
-webkit-animation: @a;
animation: @a;
}
.scrollable() {
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.flex-shrink(@fs) {
-webkit-box-flex: @fs;
-webkit-flex-shrink: @fs;
-ms-flex: 0 @fs auto;
flex-shrink: @fs;
}
.clearfix() {
&:after,
&:before {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
.hairline(@position, @color) when (@position = top) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(50% 0%);
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = left) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(0% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
.hairline(@position, @color) when (@position = bottom) {
&:after {
content: '';
position: absolute;
left: 0;
bottom: 0;
right: auto;
top: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = right) {
&:after {
content: '';
position: absolute;
right: 0;
top: 0;
left: auto;
bottom: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(100% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
// For right and bottom
.hairline-remove(@position) when not (@position = left) and not (@position = top) {
&:after {
display: none;
}
}
// For left and top
.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
&:before {
display: none;
}
}
// For right and bottom
.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
&:after {
background-color: @color;
}
}
// For left and top
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
&:before {
background-color: @color;
}
}
// Encoded SVG Background
.encoded-svg-background(@svg) {
@url: `encodeURIComponent(@{svg})`;
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
}
// Preserve3D
.preserve3d() {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
// Shadow
.depth(@level:1) {
& when (@level = 0) {
box-shadow: none;
}
& when (@level = 1) {
box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
}
& when (@level = 2) {
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
}
& when (@level = 3) {
box-shadow: 0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);
}
& when (@level = 4) {
box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);
}
& when (@level = 5) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12);
}
& when (@level = 6) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);
}
& when (@level = 7) {
box-shadow: 0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);
}
& when (@level = 8) {
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);
}
& when (@level = 9) {
box-shadow: 0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12);
}
& when (@level = 10) {
box-shadow: 0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12);
}
& when (@level = 11) {
box-shadow: 0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12);
}
& when (@level = 12) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12);
}
& when (@level = 13) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);
}
& when (@level = 14) {
box-shadow: 0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12);
}
& when (@level = 15) {
box-shadow: 0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12);
}
& when (@level = 16) {
box-shadow: 0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);
}
& when (@level = 17) {
box-shadow: 0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12);
}
& when (@level = 18) {
box-shadow: 0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12);
}
& when (@level = 19) {
box-shadow: 0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12);
}
& when (@level = 20) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12);
}
& when (@level = 21) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12);
}
& when (@level = 22) {
box-shadow: 0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12);
}
& when (@level = 23) {
box-shadow: 0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12);
}
& when (@level = 24) {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);
}
// & when (@level = 1) {
// box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px;
// }
// & when (@level = 2) {
// box-shadow: rgba(0, 0, 0, 0.156863) 0px 3px 10px, rgba(0, 0, 0, 0.227451) 0px 3px 10px;
// }
// & when (@level = 3) {
// box-shadow: rgba(0, 0, 0, 0.188235) 0px 10px 30px, rgba(0, 0, 0, 0.227451) 0px 6px 10px;
// }
// & when (@level = 4) {
// box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
// }
// & when (@level = 5) {
// box-shadow: rgba(0, 0, 0, 0.298039) 0px 19px 60px, rgba(0, 0, 0, 0.219608) 0px 15px 20px;
// }
}
// Highlighted Links
.active-highlight(@color:rgba(255, 255, 255, 0.15)){
&:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background-color: @color;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
opacity: 0;
pointer-events: none;
.transition(600ms);
}
&.active-state:before,
html:not(.watch-active-state) &:active:before {
opacity: 1;
.transition(150ms);
}
}
.active-highlight-color(@color) {
&:before {
background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
}
}
// No Scrollbar
.no-scrollbar() {
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
opacity: 0 !important;
}
}
.ellipsis() {
white-space:nowrap;
text-overflow:ellipsis;
overflow:hidden;
word-wrap: break-word;
}

View File

@@ -0,0 +1,414 @@
body,ul,li,h1,h2,h3,h4,h5,h6,p {
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
}
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template, /* 1 */
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/* Forms
========================================================================== */
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit; /* 1 */
margin: 0; /* 2 */
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

View File

@@ -0,0 +1,24 @@
.el-header {
padding: 0 !important;
position: fixed;
width: 100%;
z-index: 9;
top: 0;
left: 0;
right: 0;
}
.el-aside {
position: fixed;
top: 60px;
left: 0;
bottom: 0;
ul {
height: 100%;
}
}
.el-main {
margin-left: 200px;
margin-top: 60px;
}

View File

@@ -0,0 +1,7 @@
.home {
h2 {
color: @purple300;
.ellipsis();
font-size: 37.5px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,59 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

@@ -0,0 +1,21 @@
export default {
devUrl: 'http://127.0.0.1:3000/api/json',
testUrl: '',
prodUrl: '',
apiList: {
index: '/index'
},
checkUrl: function () {
switch (process.env.NODE_ENV) {
case 'development':
return this.devUrl;
break;
case 'test':
return this.testUrl;
break;
case 'production':
return this.prodUrl;
break;
}
}
}

View File

@@ -0,0 +1,17 @@
import $http from '@/service/_'
import $util from '@/util'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import HelloWorld from '@/components/HelloWorld'
export default {
VueComponents: [ HelloWorld ],
VuePlugIn: [ ElementUI ],
NotVuePlugIn: {
$http, $util
}
}

View File

@@ -0,0 +1,16 @@
export default {
path: '/',
name: 'layout',
component: () => import(/* webpackChunkName: "layout" */ '@/views/layout/_'),
children: [
{
path: '/home',
name: 'home',
component: () => import(/* webpackChunkName: "index" */ '@/views/Home/index'),
meta: {
isLogin: true,
title: '首页'
}
}
]
}

View File

@@ -0,0 +1,71 @@
import axios from 'axios'
import config from '@/config'
import { Notification, Loading } from 'element-ui';
let loadingInstance = null;
export default class Http {
constructor () {
this.instance = axios.create({
baseURL: config.checkUrl(),
timeout: 10000,
headers: {
'Content-Type': 'application/json'
}
})
this.interceptors()
}
async get (params) {
return await this.instance.get(params.url, {
params: params.data,
headers: Object.assign({
token: localStorage.getItem("token")
}, params.headers )
})
}
async post (params) {
return await this.instance.post(params.url, params.data, {
headers: Object.assign({
token: localStorage.getItem("token")
}, params.headers )
})
}
interceptors () {
// 添加请求拦截器
this.instance.interceptors.request.use(function (config) {
loadingInstance = Loading.service({
text: '加载中...'
})
return config
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error)
})
// 添加响应拦截器
this.instance.interceptors.response.use(function (response) {
// 对响应数据做点什么
loadingInstance.close();
switch (response.data.status) {
case 200:
return response.data.result
break;
case 404:
Notification.error({
title: '接口出现错误',
message: response.data.msg,
duration: 0
})
throw new Error(response.data.msg)
break;
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error)
})
}
}

View File

@@ -0,0 +1,23 @@
// import 'amfe-flexible'
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import init from './config/init'
Vue.config.productionTip = false
// 注册全局组件
init.VueComponents.forEach(v => Vue.component(v.name, v))
// 初始化vue插件
init.VuePlugIn.forEach(v => Vue.use(v))
// 挂载非vue插件到vue实例中这样可以全局调用方法
for (const key in init.NotVuePlugIn) Vue.prototype[key] = init.NotVuePlugIn[key]
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

View File

@@ -0,0 +1,73 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import routesConfig from '../config/routes'
import util from '../util/index'
Vue.use(VueRouter)
const routes = [
routesConfig,
{
path: '/login',
name: 'login',
component: () => import(/* webpackChunkName: "login" */ '@/views/account/login'),
meta: {
isLogin: false
},
beforeEnter: (to, from, next) => {
if (localStorage.getItem("token") == null) {
next()
} else {
history.back()
}
}
},
{
path: '/reg',
name: 'reg',
component: () => import(/* webpackChunkName: "reg" */ '../views/account/reg'),
meta: {
isLogin: false
},
beforeEnter: (to, from, next) => {
}
}
]
const router = new VueRouter({
routes
})
// 登录拦截
router.beforeEach((to, from, next) => {
// 表示未登录
document.title = to.meta.title
if (localStorage.getItem("token") == null) {
// 需要登录才可以查看的页面
if (to.meta.isLogin) {
next({
path: "/login",
query: {
from: to.fullPath
}
})
// 不需要登录就可以查看的页面
} else {
next()
}
// 表示登录过了
} else {
next()
}
})
if (localStorage.getItem("jurisdiction") != null) {
util.createdRouterConfig(router)
}
export default router

View File

@@ -0,0 +1,7 @@
import indexService from './indexService'
import carService from './carService'
export default {
index: new indexService(),
car: new carService()
}

View File

@@ -0,0 +1,3 @@
export default class carService {
}

View File

@@ -0,0 +1,14 @@
import http from "@/http"
import config from "@/config"
export default class IndexService {
async home(data = {}, header = {}) {
return await (new http()).get({
url: config.apiList.index,
data: data,
headers: header
})
}
}

View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})

View File

@@ -0,0 +1,25 @@
import routesConfig from '@/config/routes'
class Index {
createdRouterConfig (self) {
let jurisdiction = JSON.parse(localStorage.getItem("jurisdiction"))
jurisdiction.forEach(v => {
v.children.forEach(k => {
routesConfig.children.push({
path: `/${v.path}/${k.path}`,
name: `${v.path}_${k.path}`,
component: () => import(`@/views/${v.path}/${k.path}.vue`),
meta: {
isLogin: true,
title: k.name
}
})
})
});
self.addRoute(routesConfig)
}
}
export default new Index()

View File

@@ -0,0 +1,22 @@
<template>
<div class="index">
<ul>
<li v-for="i in 100">哈哈哈哈</li>
</ul>
</div>
</template>
<script>
export default {
name: "index",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,79 @@
<template>
<div class="login">
<el-button type="primary" @click="UserLogin">登录</el-button>
</div>
</template>
<script>
export default {
name: "login",
data() {
return {}
},
methods: {
async UserLogin() {
// 掉接口
// let res = this.$http.user.login({ name: '', pwd: '' })......
let res = {
token: 'UYFUBLJBILHIGUYFYTT/JUHBKVTCURDFTURDRTDJHGVJKHVB',
jurisdiction: [
{
name: '用户管理',
path: 'user',
icon: 'el-icon-user',
children: [
{
name: '添加用户',
path: 'add',
icon: 'el-icon-folder-add',
},
{
name: '编辑用户',
path: 'edit',
icon: 'el-icon-edit',
},
{
name: '用户列表',
path: 'list',
icon: 'el-icon-tickets',
}
]
},
{
name: '文章管理',
path: 'article',
icon: 'el-icon-document',
children: [
{
name: '添加文章',
path: 'add',
icon: 'el-icon-folder-add',
},
{
name: '编辑文章',
path: 'edit',
icon: 'el-icon-edit',
},
{
name: '文章列表',
path: 'list',
icon: 'el-icon-tickets',
}
]
}
]
};
localStorage.setItem("token", res.token);
localStorage.setItem("jurisdiction", JSON.stringify(res.jurisdiction));
this.$router.replace("/home");
}
}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.reg reg
</template>
<script>
export default {
name: "reg",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.add 添加文章
</template>
<script>
export default {
name: "add",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.editUser 编辑文章
</template>
<script>
export default {
name: "editUser",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.list 文章列表
</template>
<script>
export default {
name: "list",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,86 @@
<template>
<div class="layout">
<el-container>
<el-header>
<el-menu
class="el-menu-demo"
mode="horizontal"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b">
<el-menu-item index="1">处理中心</el-menu-item>
<el-submenu index="2">
<template slot="title">我的工作台</template>
<el-menu-item index="2-1">选项1</el-menu-item>
<el-menu-item index="2-2">选项2</el-menu-item>
<el-menu-item index="2-3">选项3</el-menu-item>
<el-submenu index="2-4">
<template slot="title">选项4</template>
<el-menu-item index="2-4-1">选项1</el-menu-item>
<el-menu-item index="2-4-2">选项2</el-menu-item>
<el-menu-item index="2-4-3">选项3</el-menu-item>
</el-submenu>
</el-submenu>
<el-menu-item index="3" disabled>消息中心</el-menu-item>
<el-menu-item index="4"><a href="https://www.ele.me" target="_blank">订单管理</a></el-menu-item>
</el-menu>
</el-header>
<el-container>
<el-aside width="200px">
<el-menu class="el-menu-vertical-demo" router :unique-opened="true" :default-active="$route.path">
<el-submenu v-for="(item,index) in jurisdiction" :key="index" :index="index.toString()">
<template slot="title">
<i :class="item.icon"></i>
<span>{{ item.name }}</span>
</template>
<el-menu-item-group>
<el-menu-item v-for="(v,i) in item.children" :key="i" :index="`/${item.path}/${v.path}`">
<template slot="title">
<i :class="v.icon"></i>
<span>{{ v.name }}</span>
</template>
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</div>
</template>
<script>
export default {
name: "layout",
data() {
return {
jurisdiction: JSON.parse(localStorage.getItem("jurisdiction"))
}
},
created() {
//
console.log(this.$route)
this.$util.createdRouterConfig(this.$router)
},
methods: {
}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.add 添加用户
</template>
<script>
export default {
name: "add",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.editUser 编辑用户
</template>
<script>
export default {
name: "editUser",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
.list 用户列表
</template>
<script>
export default {
name: "list",
data() {
return {}
},
methods: {}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,43 @@
const path = require("path");
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
publicPath: './',
chainWebpack: config => {
// 配置pug
config.module.rule('pug')
.test(/\.pug$/)
.use('pug-html-loader')
.loader('pug-html-loader')
.end()
// 配置别名
config.resolve.alias
.set("@", resolve("src"))
.set("@less", resolve("src/assets/less"))
.set("@page", resolve("src/assets/less/page"))
.set("@components", resolve("src/components"))
.set("@views", resolve("src/views"))
// 配置 less 的自动导入
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type)))
}
}
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/less/_.less'),
],
})
}

View File

@@ -0,0 +1,65 @@
权限控制:
路由权限(路由配置文件)
页面显示和隐藏
1用户登录成功后 接口 /login
{
token: '',
jurisdiction: [ // 权限数组
{
name: '用户管理',
path: 'user',
icon: '',
children: [
{
name: '添加用户',
path: 'add',
icon: '',
},
{
name: '编辑用户',
path: 'edit',
icon: '',
},
{
name: '用户列表',
path: 'list',
icon: '',
}
]
},
{
name: '文章管理',
path: 'article',
icon: '',
children: [
{
name: '添加文章',
path: 'add',
icon: '',
},
{
name: '编辑文章',
path: 'edit',
icon: '',
},
{
name: '文章列表',
path: 'list',
icon: '',
}
]
}
]
}
2: 根据 权限数组 遍历,生成路由的配置文件
根据 权限数组 遍历,生成 左侧的导航菜单

View File

@@ -0,0 +1,23 @@
body,p,ul,li,h1,h2,h3,h4,h5,h6,input{
margin: 0;
padding: 0;
border: none;
}
body {
font-size: 0;
}
li {
list-style: none;
}
input {
/* 去除选中input时候产生的外边框 */
outline: none;
}
a {
text-decoration: none;
color: #000;
}

View File

@@ -0,0 +1,242 @@
.header {
position: fixed;
width: 100%;
height: .9rem;
display: flex;
z-index: 999;
top: 0.29rem;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 0.37rem;
}
.header img {
width: 0.42rem;
height: 0.42rem;
}
.header ul {
display: flex;
justify-content: space-around;
align-items: center;
}
.header ul li{
font-size: 0.3rem;
color: #fff;
}
.header ul li:nth-child(2) {
margin: 0 0.22rem;
}
.content {
height: calc(100vh - 1rem);
background: url("../img/back.png");
background-size: cover;
background-position-x: center;
position: relative;
}
.user_right {
position: absolute;
right: 0.19rem;
bottom: 0.14rem;
}
.user_right .user_top {
position: relative;
border: solid 0.03rem #ffffff;
width: 0.96rem;
height: 0.97rem;
border-radius: 100%;
margin-bottom: 0.3rem;
}
.user_right .user_top .user_img{
width: 100%;
height: 100%;
}
.user_right .user_top .user_flow{
position: absolute;
width: 0.34rem;
height: 0.33rem;
left: 50%;
transform: translateX(-50%);
bottom: -0.14rem;
}
.user_right ul{}
.user_right ul li {
text-align: center;
}
.user_right ul li:nth-child(1){
margin-bottom: 0.36rem;
}
.user_right ul li:nth-child(2){
margin-bottom: 0.27rem;
}
.user_right ul li:nth-child(3){
margin-bottom: 0.32rem;
}
.user_right ul li:nth-child(1) p {
margin-top: 0.09rem;
}
.user_right ul li:nth-child(2) p {
margin-top: 0.09rem;
}
.user_right ul li:nth-child(3) p{
margin-top: 0.17rem;
}
.user_right ul li:nth-child(4) p{
margin-top: 0.15rem;
}
.user_right ul li:nth-child(1) img {
width: 0.68rem;
height: 0.63rem;
}
.user_right ul li:nth-child(2) img {
width: 0.67rem;
height: 0.8rem;
}
.user_right ul li:nth-child(3) img {
width: 0.7rem;
height: 0.7rem;
}
.user_right ul li:nth-child(4) img {
width: 0.61rem;
height: 0.61rem;
}
.user_right ul li p {
font-size: 0.2rem;
color: #ffffff;
}
.music_bottom {
position: absolute;
left: 0.3rem;
bottom: 0.1rem;
}
.music_bottom .shop_name {
display: flex;
align-items: center;
margin-bottom: 0.22rem;
}
.music_bottom .shop_name img {
width: 0.28rem;
height: 0.26rem;
margin-right: 0.1rem;
margin-left: 0.07rem;
}
.music_bottom .shop_name .shop_title {
margin-right: 0.26rem;
}
.music_bottom .shop_name span {
font-size: 0.26rem;
color: #ffc600;
}
.music_bottom .shop_item {
width: 5.85rem;
height: 1.68rem;
background-color: #ffffff;
display: flex;
padding: 0.1rem 0.09rem;
box-sizing: border-box;
margin-bottom: 0.29rem;
position: relative;
}
.music_bottom .shop_item .car{
width: 0.46rem;
height: 0.46rem;
position: absolute;
bottom: 0.17rem;
right: 0.34rem;
}
.music_bottom .shop_item .shop_pic {
width: 1.48rem;
height: 1.48rem;
margin-right: 0.15rem;
}
.music_bottom .shop_item .shop_item_r{}
.music_bottom .shop_item_r .shop_item_title{
font-size: 0.28rem;
color: #333333;
margin-bottom: 0.21rem;
}
.music_bottom .shop_item_r .shop_item_price{
display: flex;
align-items: center;
margin-bottom: 0.17rem;
}
.music_bottom .shop_item_r .nums{
font-size: 0.2rem;
color: #626262;
zoom: 0.8;
}
.music_bottom .shop_item_price .price{
font-size: 0.28rem;
color: #333333;
margin-right: 0.03rem;
}
.music_bottom .shop_item_price .jx{
width: 0.6rem;
height: 0.24rem;
background-color: #ea4e3d;
border-radius: 0.12rem;
display: flex;
align-items: center;
justify-content: center;
}
.jx span {
font-size: 0.2rem;
color: #fffefe;
zoom: 0.8;
}
.shop_music {
display: flex;
align-items: center;
}
.shop_music img {
width: 0.27rem;
height: 0.28rem;
margin-right: 0.13rem;
}
.shop_music span {
font-size: 0.24rem;
color: #ffffff;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
left: 0;
height: 1rem;
background-color: #000000;
display: flex;
align-items: baseline;
justify-content: space-between;
padding-left: 0.39rem;
padding-right: 0.54rem;
box-sizing: border-box;
line-height: 1rem;
}
.footer li {
height: 100%;
}
.footer li a {
font-size: 0.24rem;
color: #ffffff;
}
.footer .active {
position: relative;
}
.footer .active a{
font-size: 0.3rem;
}
.footer .active::after {
content: "";
position: absolute;
width: 0.51rem;
height: 0.03rem;
background-color: #ffffff;
border-radius: 0.015rem;
left: 50%;
transform: translateX(-50%);
bottom: 0.05rem;
}

View File

@@ -0,0 +1,6 @@
@media screen and (min-width: 1024px) {
body {
width: 375px;
margin: 0 auto;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="en">
<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">
<title>Document</title>
<script src="./js/rem.js"></script>
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/public.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="header">
<img src="./img/sc.png" alt="">
<ul>
<li>推荐</li>
<li>关注</li>
<li>直播</li>
</ul>
<img src="./img/search.png" alt="">
</div>
<div class="content">
<div class="user_right">
<div class="user_top">
<img class="user_img" src="./img/user.png" alt="">
<img class="user_flow" src="./img/flow.png" alt="">
</div>
<ul>
<li>
<img src="./img/like.png" alt="">
<p>71.1W</p>
</li>
<li>
<img src="./img/share.png" alt="">
<p>分享</p>
</li>
<li>
<img src="./img/comment.png" alt="">
<p>评论</p>
</li>
<li>
<img src="./img/shop.png" alt="">
<p>购物袋</p>
</li>
</ul>
</div>
<div class="music_bottom">
<div class="shop_name">
<img src="./img/shop_icon.png" alt="">
<span class="shop_title">美林美妆合肥店</span>
<span>>7KM</span>
</div>
<div class="shop_item">
<img class="shop_pic" src="./img/4832198.png" alt="">
<div class="shop_item_r">
<div class="shop_item_title">夏季网纱半身裙中长款纱……</div>
<div class="shop_item_price">
<span class="price">¥68.00</span>
<div class="jx">
<span>精选</span>
</div>
</div>
<div class="nums">已卖1020</div>
</div>
<img class="car" src="./img/car.png" alt="">
</div>
<div class="shop_music">
<img src="./img/music.png" alt="">
<span>你像花儿一样美DJ</span>
</div>
</div>
</div>
<ul class="footer">
<li class="active">
<a href="">首页</a>
</li>
<li>
<a href="">好友</a>
</li>
<li>
<a href="">圈子</a>
</li>
<li>
<a href="">购物车</a>
</li>
<li>
<a href="">我的</a>
</li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,13 @@
window.onload = function () {
/*720代表设计师给的设计稿的宽度你的设计稿是多少就写多少;100代表换算比例这里写100是
为了以后好算,比如你测量的一个宽度是100px,就可以写为1rem,以及1px=0.01rem等等*/
getRem(750, 100)
};
window.onresize = function () {
getRem(750, 100)
};
function getRem(pwidth, prem) {
var html = document.getElementsByTagName("html")[0];
var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
html.style.fontSize = oWidth / pwidth * prem + "px";
}

View File

@@ -0,0 +1,20 @@
{ // 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"
},
"h5" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

@@ -0,0 +1,18 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
@import "./less/_.less";
@import "./static/iconfont/iconfont.css";
</style>

View File

@@ -0,0 +1,24 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,23 @@
export default {
devUrl: 'http://192.168.1.131:3000/api/json',
testUrl: '',
prodUrl: '',
apiList: {
index: '/index',
type: '/class',
classList: '/classList'
},
checkUrl: function () {
switch (process.env.NODE_ENV) {
case 'development':
return this.devUrl;
break;
case 'test':
return this.testUrl;
break;
case 'production':
return this.prodUrl;
break;
}
}
}

View File

@@ -0,0 +1,13 @@
import $http from '@/service/_'
import $util from '@/util'
import HelloWorld from '@/components/HelloWorld'
export default {
VueComponents: [ HelloWorld ],
NotVuePlugIn: {
$http, $util
}
}

View File

@@ -0,0 +1,59 @@
import config from '@/config'
export default class Http {
async get(params) {
uni.showLoading({
title: '加载中...'
});
return new Promise((suc, err) => {
uni.request({
url: config.checkUrl() + params.url,
data: params.data,
method: 'GET',
header: Object.assign({
token: uni.getStorageSync('token')
}, params.headers),
success: (res) => {
this.interceptors(suc, res.data)
}
});
})
}
async post(params) {
uni.showLoading({
title: '加载中...'
});
return new Promise((suc, err) => {
uni.request({
url: config.checkUrl() + params.url,
data: params.data,
method: 'POST',
header: Object.assign({
token: uni.getStorageSync('token')
}, params.headers),
success: (res) => {
this.interceptors(suc, res.data)
}
});
})
}
interceptors(callback,data) {
uni.hideLoading();
switch (data.status) {
case 200:
callback(data.result)
break;
case 404:
uni.showToast({
title: data.msg,
duration: 2000,
icon: 'error'
});
throw new Error(data.msg)
break;
}
}
}

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,2 @@
@import "./mixins/normalize.less";
@import "./mixins/reset.less";

View File

@@ -0,0 +1,310 @@
@themeColor: #fb7299;
@SecondaryThemeColor: #fe7fa2;
@black: #000000;
@white: #ffffff;
@red50: #ffebee;
@red100: #ffcdd2;
@red200: #ef9a9a;
@red300: #e57373;
@red400: #ef5350;
@red500: #f44336;
@red600: #e53935;
@red700: #d32f2f;
@red800: #c62828;
@red900: #b71c1c;
@redA100: #ff8a80;
@redA200: #ff5252;
@redA400: #ff1744;
@redA700: #d50000;
@red: @red500;
@pink50: #fce4ec;
@pink100: #f8bbd0;
@pink200: #f48fb1;
@pink300: #f06292;
@pink400: #ec407a;
@pink500: #e91e63;
@pink600: #d81b60;
@pink700: #c2185b;
@pink800: #ad1457;
@pink900: #880e4f;
@pinkA100: #ff80ab;
@pinkA200: #ff4081;
@pinkA400: #f50057;
@pinkA700: #c51162;
@pink: @pink500;
@purple50: #f3e5f5;
@purple100: #e1bee7;
@purple200: #ce93d8;
@purple300: #ba68c8;
@purple400: #ab47bc;
@purple500: #9c27b0;
@purple600: #8e24aa;
@purple700: #7b1fa2;
@purple800: #6a1b9a;
@purple900: #4a148c;
@purpleA100: #ea80fc;
@purpleA200: #e040fb;
@purpleA400: #d500f9;
@purpleA700: #aa00ff;
@purple: @purple500;
@deepPurple50: #ede7f6;
@deepPurple100: #d1c4e9;
@deepPurple200: #b39ddb;
@deepPurple300: #9575cd;
@deepPurple400: #7e57c2;
@deepPurple500: #673ab7;
@deepPurple600: #5e35b1;
@deepPurple700: #512da8;
@deepPurple800: #4527a0;
@deepPurple900: #311b92;
@deepPurpleA100: #b388ff;
@deepPurpleA200: #7c4dff;
@deepPurpleA400: #651fff;
@deepPurpleA700: #6200ea;
@deepPurple: @deepPurple500;
@indigo50: #e8eaf6;
@indigo100: #c5cae9;
@indigo200: #9fa8da;
@indigo300: #7986cb;
@indigo400: #5c6bc0;
@indigo500: #3f51b5;
@indigo600: #3949ab;
@indigo700: #303f9f;
@indigo800: #283593;
@indigo900: #1a237e;
@indigoA100: #8c9eff;
@indigoA200: #536dfe;
@indigoA400: #3d5afe;
@indigoA700: #304ffe;
@indigo: @indigo500;
@blue50: #e3f2fd;
@blue100: #bbdefb;
@blue200: #90caf9;
@blue300: #64b5f6;
@blue400: #42a5f5;
@blue500: #2196f3;
@blue600: #1e88e5;
@blue700: #1976d2;
@blue800: #1565c0;
@blue900: #0d47a1;
@blueA100: #82b1ff;
@blueA200: #448aff;
@blueA400: #2979ff;
@blueA700: #2962ff;
@blue: @blue500;
@lightBlue50: #e1f5fe;
@lightBlue100: #b3e5fc;
@lightBlue200: #81d4fa;
@lightBlue300: #4fc3f7;
@lightBlue400: #29b6f6;
@lightBlue500: #03a9f4;
@lightBlue600: #039be5;
@lightBlue700: #0288d1;
@lightBlue800: #0277bd;
@lightBlue900: #01579b;
@lightBlueA100: #80d8ff;
@lightBlueA200: #40c4ff;
@lightBlueA400: #00b0ff;
@lightBlueA700: #0091ea;
@lightBlue: @lightBlue500;
@cyan50: #e0f7fa;
@cyan100: #b2ebf2;
@cyan200: #80deea;
@cyan300: #4dd0e1;
@cyan400: #26c6da;
@cyan500: #00bcd4;
@cyan600: #00acc1;
@cyan700: #0097a7;
@cyan800: #00838f;
@cyan900: #006064;
@cyanA100: #84ffff;
@cyanA200: #18ffff;
@cyanA400: #00e5ff;
@cyanA700: #00b8d4;
@cyan: @cyan500;
@teal50: #e0f2f1;
@teal100: #b2dfdb;
@teal200: #80cbc4;
@teal300: #4db6ac;
@teal400: #26a69a;
@teal500: #009688;
@teal600: #00897b;
@teal700: #00796b;
@teal800: #00695c;
@teal900: #004d40;
@tealA100: #a7ffeb;
@tealA200: #64ffda;
@tealA400: #1de9b6;
@tealA700: #00bfa5;
@teal: @teal500;
@green50: #e8f5e9;
@green100: #c8e6c9;
@green200: #a5d6a7;
@green300: #81c784;
@green400: #66bb6a;
@green500: #4caf50;
@green600: #43a047;
@green700: #388e3c;
@green800: #2e7d32;
@green900: #1b5e20;
@greenA100: #b9f6ca;
@greenA200: #69f0ae;
@greenA400: #00e676;
@greenA700: #00c853;
@green: @green500;
@lightGreen50: #f1f8e9;
@lightGreen100: #dcedc8;
@lightGreen200: #c5e1a5;
@lightGreen300: #aed581;
@lightGreen400: #9ccc65;
@lightGreen500: #8bc34a;
@lightGreen600: #7cb342;
@lightGreen700: #689f38;
@lightGreen800: #558b2f;
@lightGreen900: #33691e;
@lightGreenA100: #ccff90;
@lightGreenA200: #b2ff59;
@lightGreenA400: #76ff03;
@lightGreenA700: #64dd17;
@lightGreen: @lightGreen500;
@lime50: #f9fbe7;
@lime100: #f0f4c3;
@lime200: #e6ee9c;
@lime300: #dce775;
@lime400: #d4e157;
@lime500: #cddc39;
@lime600: #c0ca33;
@lime700: #afb42b;
@lime800: #9e9d24;
@lime900: #827717;
@limeA100: #f4ff81;
@limeA200: #eeff41;
@limeA400: #c6ff00;
@limeA700: #aeea00;
@lime: @lime500;
@yellow50: #fffde7;
@yellow100: #fff9c4;
@yellow200: #fff59d;
@yellow300: #fff176;
@yellow400: #ffee58;
@yellow500: #ffeb3b;
@yellow600: #fdd835;
@yellow700: #fbc02d;
@yellow800: #f9a825;
@yellow900: #f57f17;
@yellowA100: #ffff8d;
@yellowA200: #ffff00;
@yellowA400: #ffea00;
@yellowA700: #ffd600;
@yellow: @yellow500;
@amber50: #fff8e1;
@amber100: #ffecb3;
@amber200: #ffe082;
@amber300: #ffd54f;
@amber400: #ffca28;
@amber500: #ffc107;
@amber600: #ffb300;
@amber700: #ffa000;
@amber800: #ff8f00;
@amber900: #ff6f00;
@amberA100: #ffe57f;
@amberA200: #ffd740;
@amberA400: #ffc400;
@amberA700: #ffab00;
@amber: @amber500;
@orange50: #fff3e0;
@orange100: #ffe0b2;
@orange200: #ffcc80;
@orange300: #ffb74d;
@orange400: #ffa726;
@orange500: #ff9800;
@orange600: #fb8c00;
@orange700: #f57c00;
@orange800: #ef6c00;
@orange900: #e65100;
@orangeA100: #ffd180;
@orangeA200: #ffab40;
@orangeA400: #ff9100;
@orangeA700: #ff6d00;
@orange: @orange500;
@deepOrange50: #fbe9e7;
@deepOrange100: #ffccbc;
@deepOrange200: #ffab91;
@deepOrange300: #ff8a65;
@deepOrange400: #ff7043;
@deepOrange500: #ff5722;
@deepOrange600: #f4511e;
@deepOrange700: #e64a19;
@deepOrange800: #d84315;
@deepOrange900: #bf360c;
@deepOrangeA100: #ff9e80;
@deepOrangeA200: #ff6e40;
@deepOrangeA400: #ff3d00;
@deepOrangeA700: #dd2c00;
@deepOrange: @deepOrange500;
@brown50: #efebe9;
@brown100: #d7ccc8;
@brown200: #bcaaa4;
@brown300: #a1887f;
@brown400: #8d6e63;
@brown500: #795548;
@brown600: #6d4c41;
@brown700: #5d4037;
@brown800: #4e342e;
@brown900: #3e2723;
@brown: @brown500;
@blueGrey50: #eceff1;
@blueGrey100: #cfd8dc;
@blueGrey200: #b0bec5;
@blueGrey300: #90a4ae;
@blueGrey400: #78909c;
@blueGrey500: #607d8b;
@blueGrey600: #546e7a;
@blueGrey700: #455a64;
@blueGrey800: #37474f;
@blueGrey900: #263238;
@blueGrey: @blueGrey500;
@grey50: #fafafa;
@grey100: #f5f5f5;
@grey200: #eeeeee;
@grey300: #e0e0e0;
@grey400: #bdbdbd;
@grey500: #9e9e9e;
@grey600: #757575;
@grey700: #616161;
@grey800: #424242;
@grey900: #212121;
@grey: @grey500;
@transparent: rgba(0, 0, 0, 0);
@fullBlack: rgba(0, 0, 0, 1);
@darkBlack: rgba(0, 0, 0, 0.87);
@lightBlack: rgba(0, 0, 0, 0.54);
@minBlack: rgba(0, 0, 0, 0.26);
@faintBlack: rgba(0, 0, 0, 0.12);
@fullWhite: rgba(255, 255, 255, 1);
@darkWhite: rgba(255, 255, 255, 0.87);
@lightWhite: rgba(255, 255, 255, 0.54);

View File

@@ -0,0 +1,22 @@
.padding-15 (@px: 30rpx) {
padding-left: @px;
padding-right: @px;
}
.no-scrollbar() {
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
opacity: 0 !important;
}
}
.ellipsis() {
white-space:nowrap;
text-overflow:ellipsis;
overflow:hidden;
word-wrap: break-word;
}

View File

@@ -0,0 +1,414 @@
body,ul,li,h1,h2,h3,h4,h5,h6,p {
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
}
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template, /* 1 */
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/* Forms
========================================================================== */
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit; /* 1 */
margin: 0; /* 2 */
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

View File

@@ -0,0 +1,94 @@
@import "../mixins/index.less";
@import "../config/color.less";
.home {
display: flex;
flex-direction: column;
/* #ifdef H5 */
height: calc(100vh - 100rpx);
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh);
/* #endif */
.header {
height: 160rpx;
width: 100%;
background-color: @themeColor;
.header_search {
height: 88rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
.padding-15();
align-items: center;
box-sizing: border-box;
background-color: @themeColor;
.iconfont {
color: @white;
font-size: 45rpx;
}
.search {
width: 82%;
background: #fff;
height: 60rpx;
border-radius: 60rpx;
display: flex;
flex-direction: row;
align-items: center;
box-sizing: border-box;
padding-left: 30rpx;
i {
color: #999;
font-size: 26rpx;
margin-right: 10rpx;
padding-top: 2rpx;
}
text {
font-size: 24rpx;
color: #999;
}
}
}
.header_menu {
height: 72rpx;
display: flex;
justify-content: space-between;
flex-direction: row;
background-color: @SecondaryThemeColor;
.menu_list {
white-space: nowrap;
width: calc(100vw - 80rpx);
line-height: 72rpx;
.menu_item {
display: inline-block;
padding: 0 14rpx;
font-size: 26rpx;
color: #d3d2d2;
}
.active {
color: @white !important;
}
}
.icon-edit {
width: 80rpx;
height: 72rpx;
text-align: center;
line-height: 72rpx;
}
}
}
.content {
flex: 1;
.swiper {
width: 100%;
height: 100%;
.swiper_scroll {
height: 100%;
}
}
}
}

View File

@@ -0,0 +1,27 @@
import App from './App'
import Vue from 'vue'
import store from './store'
Vue.config.productionTip = false
App.mpType = 'app'
import init from '@/config/init'
// #ifdef H5
init.VueComponents.forEach(v => Vue.component(v.name, v))
// #endif
Vue.prototype.$sys = uni.getSystemInfoSync();
// 挂载非vue插件到vue实例中这样可以全局调用方法
for (const key in init.NotVuePlugIn) Vue.prototype[key] = init.NotVuePlugIn[key]
const app = new Vue({
store,
...App
})
app.$mount()

View File

@@ -0,0 +1,83 @@
{
"name" : "test",
"appid" : "__UNI__8FEF06E",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "x86" ]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {
"payment" : {},
"ad" : {}
},
"splashscreen" : {
"androidStyle" : "common"
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2",
"h5" : {
"router" : {
"mode" : "hash"
}
}
}

View File

@@ -0,0 +1,71 @@
{
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
},
{
"path": "pages/mechanism/mechanism",
"style": {
"navigationBarTitleText": "机构",
"enablePullDownRefresh": false
}
},
{
"path": "pages/model/model",
"style": {
"navigationBarTitleText": "模特",
"enablePullDownRefresh": false
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#000",
"borderStyle": "black",
"backgroundColor": "#fff",
"iconWidth": "18px",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/img/home.png",
"selectedIconPath": "static/img/home_a.png",
"text": "首页"
},
{
"pagePath": "pages/model/model",
"iconPath": "static/img/model.png",
"selectedIconPath": "static/img/model_a.png",
"text": "模特"
},
{
"pagePath": "pages/mechanism/mechanism",
"iconPath": "static/img/jg.png",
"selectedIconPath": "static/img/jg_a.png",
"text": "机构"
},
{
"pagePath": "pages/me/me",
"iconPath": "static/img/me.png",
"selectedIconPath": "static/img/me_a.png",
"text": "我的"
}
]
}
}

View File

@@ -0,0 +1,126 @@
<template>
<view class="home">
<view class="header" :style="{ paddingTop: $sys.statusBarHeight+'px' }">
<view class="header_search">
<i class="iconfont icon-taozi1"></i>
<view class="search">
<i class="iconfont icon-search"></i>
<text>198万张图有你想要的...</text>
</view>
<navigator class="iconfont icon-wo"></navigator>
</view>
<view class="header_menu">
<scroll-view scroll-x="true" class="menu_list" :scroll-into-view="into">
<view
class="menu_item"
:class="index == currentIndex ? 'active' : ''"
v-for="(item, index) in principal"
:key="index"
:id="'into' + index"
@click="changeActive(index)"
>{{ item.title }}</view
>
</scroll-view>
<navigator url="" class="iconfont icon-edit"> </navigator>
</view>
</view>
<view class="content">
<swiper class="swiper" :current="currentIndex" @change="SwiperChange">
<swiper-item v-for="(item, index) in principal" :key="index">
<scroll-view
scroll-y
class="swiper_scroll"
@scrolltolower="loadMore(index)"
>
<view class="swiper-item" v-for="(v, i) in item.content" :key="i">
{{ v.title }}
</view>
<uni-load-more :status="item.loadStatus" v-if="index != 0"></uni-load-more>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentIndex: 0,
into: "into0",
principal: [],
};
},
created() {
this.getType();
},
methods: {
loadMore(index) {
this.principal[this.currentIndex].page += 1;
if (
this.principal[this.currentIndex].page <=
this.principal[this.currentIndex].total_page
) {
this.getClassList("more");
} else {
this.principal[this.currentIndex].loadStatus = "noMore";
}
},
SwiperChange(event) {
this.currentIndex = event.detail.current;
this.changeInto();
this.getClassList();
},
changeActive(index) {
this.currentIndex = index;
},
changeInto() {
this.into = `into${this.currentIndex}`;
},
async getType() {
let res = await this.$http.index.type();
this.principal = res.principal;
await this.getClassList();
},
async getClassList(type = "click") {
var getList = async () => {
this.principal[this.currentIndex].loadStatus = "loading";
let res = await this.$http.index.classList({
page: this.principal[this.currentIndex].page,
id: this.principal[this.currentIndex].id,
});
this.principal[this.currentIndex].content = [
...this.principal[this.currentIndex].content,
...res.data,
];
this.principal[this.currentIndex].page = res.current_page;
this.principal[this.currentIndex].total_page = res.total_page;
this.principal[this.currentIndex].loadStatus = "more";
};
if (type == "click") {
if (
this.principal[this.currentIndex].id != -1 &&
this.principal[this.currentIndex].content.length == 0
) {
getList();
}
} else {
getList();
}
},
},
};
</script>
<style lang="less" scoped>
@import "~@/less/page/home.less";
</style>

View File

@@ -0,0 +1,22 @@
<template>
<view class="me">
我的
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,25 @@
<template>
<view class="mechanism">
机构
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad(option) {
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,24 @@
<template>
<view class="model">
模特
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad(option) {
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,7 @@
import indexService from './indexService'
import carService from './carService'
export default {
index: new indexService(),
car: new carService()
}

View File

@@ -0,0 +1,3 @@
export default class carService {
}

View File

@@ -0,0 +1,45 @@
import http from "@/http"
import config from "@/config"
export default class IndexService {
async home(data = {}, header = {}) {
return await (new http()).get({
url: config.apiList.index,
data: data,
headers: header
})
}
async classList(data = {}, header = {}) {
return await (new http()).get({
url: config.apiList.classList,
data: data,
headers: header
})
}
async type(data = {}, header = {}) {
let res = await (new http()).get({
url: config.apiList.type,
data: data,
headers: header
});
res.principal.forEach(v => {
v.total_page = 0;
v.loadStatus = "more";
v.content = [];
});
res.principal.unshift({
content: [],
id: -1,
page: 0,
title: "首页",
total_page: 0
})
return res;
}
}

View File

@@ -0,0 +1,181 @@
@font-face {
font-family: "iconfont";
src: url('./static/iconfont/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-weixin1:before {
content: "\e64f";
}
.icon-ziyuan:before {
content: "\e620";
}
.icon-zhuangtai:before {
content: "\e655";
}
.icon-eye:before {
content: "\e61b";
}
.icon-eye1:before {
content: "\e605";
}
.icon-goumai:before {
content: "\e73b";
}
.icon-tupian1:before {
content: "\e61e";
}
.icon-shipin:before {
content: "\e60c";
}
.icon-vip:before {
content: "\e6ba";
}
.icon-zongdailizhanghao:before {
content: "\e618";
}
.icon-zitiyanse:before {
content: "\ec85";
}
.icon-weixiao:before {
content: "\e603";
}
.icon-lahei:before {
content: "\e627";
}
.icon-xinbaniconshangchuan_huaban:before {
content: "\e602";
}
.icon-gif:before {
content: "\e70d";
}
.icon-zhendong:before {
content: "\e638";
}
.icon-tubiaozhizuomoban:before {
content: "\e601";
}
.icon-wushuju:before {
content: "\e642";
}
.icon-aixin:before {
content: "\e640";
}
.icon-xiangxia:before {
content: "\e636";
}
.icon-fenxiang:before {
content: "\e634";
}
.icon-xin:before {
content: "\e698";
}
.icon-clean:before {
content: "\e616";
}
.icon-qianjin-tongyong:before {
content: "\e610";
}
.icon-qianjin:before {
content: "\e604";
}
.icon-zuji:before {
content: "\e600";
}
.icon-guanyu:before {
content: "\e637";
}
.icon-xieyiguanli:before {
content: "\e6b2";
}
.icon-shengji:before {
content: "\e63c";
}
.icon-back1:before {
content: "\e619";
}
.icon-tuijian:before {
content: "\e60f";
}
.icon-huo:before {
content: "\e6c0";
}
.icon-home:before {
content: "\e617";
}
.icon-jigou:before {
content: "\e61a";
}
.icon-wo:before {
content: "\e611";
}
.icon-edit:before {
content: "\e696";
}
.icon-search:before {
content: "\e60a";
}
.icon-taozi1:before {
content: "\e61c";
}
.icon-taozi:before {
content: "\e89d";
}
.icon-me:before {
content: "\e61f";
}
.icon-gengduo:before {
content: "\e7ac";
}
.icon-dingwei:before {
content: "\e63e";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;

View File

@@ -0,0 +1,5 @@
export default {
carList: state => state.car.carList,
theme: state => state.setting.theme,
}

View File

@@ -0,0 +1,16 @@
import Vue from 'vue'
import Vuex from 'vuex'
import car from './modules/car'
import pub from './modules/public'
import setting from './modules/setting'
import getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
car, pub, setting
},
getters
})

View File

@@ -0,0 +1,24 @@
import carService from '../../service/carService'
export default {
state: {
carList: []
},
mutations: {
SET_CARLIST (state, data) {
state.carList = data
}
},
actions: {
async getCarList({ commit }) {
let res = await (new carService()).getCarList();
console.log("actions getCarList ===: ", res)
commit("SET_CARLIST", res)
},
async addCar({ commit }, params) {
let res = await (new carService()).addCar(params);
console.log("actions addCar ===: ", res)
}
}
}

View File

@@ -0,0 +1,11 @@
export default {
state: {
},
mutations: {
},
actions: {
}
}

View File

@@ -0,0 +1,11 @@
export default {
state: {
theme: 'red'
},
mutations: {
},
actions: {
}
}

Some files were not shown because too many files have changed in this diff Show More