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,14 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
parserOptions: {
parser: "babel-eslint",
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
},
};

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,24 @@
# vuecli3
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
{
"name": "vuecli3",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.6.5",
"vant": "^2.12.10",
"vue": "^2.6.11",
"vue-router": "^3.2.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"compression-webpack-plugin": "^5.0.1",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"pug": "^3.0.2",
"pug-html-loader": "^1.1.5",
"pug-plain-loader": "^1.1.0",
"style-resources-loader": "^1.4.1",
"stylus": "^0.54.8",
"stylus-loader": "^3.0.2",
"vue-template-compiler": "^2.6.11"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,24 @@
<!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>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" type="text/css"></link>
<% } %>
</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 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view />
</div>
</template>
<style lang="stylus">
#app
font-family Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
text-align center
color #2c3e50
margin-top 60px
</style>

View File

@@ -0,0 +1,2 @@
@import "public/_.styl";

View File

@@ -0,0 +1,4 @@
@import "clear.styl";
@import "color.styl";
@import "mixins.styl";
@import "vars.styl";

View File

@@ -0,0 +1,424 @@
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
h1,h2,h3,h4,h5,h6,ul,li,p {
margin: 0;
padding: 0;
}
/* 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,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,43 @@
@import "./color.styl";
fontFamily = Roboto, Lato, sans-serif;
// primary and accent
primaryColor = blue; //
secondaryColor = pinkA200;
successColor = green;
warningColor = yellow600;
errorColor = red;
infoColor = blue;
trackColor = grey400;
// textColor or borderColor
textColor = darkBlack;
secondaryTextColor = fade(fullBlack, 54%);
alternateTextColor = white;
borderColor = fade(fullBlack, 12%);
disabledColor = fade(fullBlack, 38%);
// background
backgroundColor = grey50;
dialogBackgroundColor = white; // dialogs or cards
chipBackgroundColor = grey300;
// icon color
activeIconColor = fade(fullBlack, 54%);
inActiveIconColor = fade(fullBlack, 38%);
// spaceing
iconSize = 24px;
desktopGutter = 24px;
desktopGutterMore = 32px;
desktopGutterLess = 16px;
desktopGutterMini = 8px;
desktopKeylineIncrement = 64px;
desktopDropDownMenuItemHeight = 32px;
desktopDropDownMenuFontSize = 15px;
desktopDrawerMenuItemHeight = 48px;
desktopSubheaderHeight = 48px;
desktopToolbarHeight = 56px;
// animate
easeOutFunction = cubic-bezier(0.23, 1, 0.32, 1);
easeInOutFunction = cubic-bezier(0.445, 0.05, 0.55, 0.95);

View File

@@ -0,0 +1,39 @@
<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>
</div>
</template>
<script>
export default {
name: "HelloWorld",
props: {
msg: String,
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus">
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,32 @@
import Vant from 'vant'
//TODO 这事没写完的代码,
export default {
devBaseUrl: '/apis',
testBaseUrl: 'http://47.114.153.249:3000/api/json',
prodBaseUrl: 'http://47.114.153.249:3000/api/json',
ApiList: {
radio: '/radio', // radio页面
channelList: '/channelList', // tv列表
channelComment: '/channelComment', // tv评论
liveList:'/liveList', //融媒直播
liveDetail:'/liveDetail', //直播详情
newsDetail: 'newsDetail', // 新闻页面接口
videoDetail: '/videoDetail', // 视频页面接口
interactDetail: '/interactDetail' // 用户注册接口
},
VuePlugIn: [ Vant ],
getUrl () {
switch (process.env.NODE_ENV) {
case 'development':
return this.devBaseUrl
// eslint-disable-next-line no-unreachable
break
case 'test':
return this.testBaseUrl
break
case 'production':
return this.prodBaseUrl
break
}
}
}

View File

@@ -0,0 +1,64 @@
import axios from 'axios';
import config from '../config';
import { Toast } from 'vant';
class Http {
constructor() {
axios.defaults.baseURL = config.getUrl();
this.interceptors();
}
async get(option) {
return await axios.get(option.url, {
params: option.data,
headers: Object.assign({
token: localStorage.getItem("token")
}, option.headers)
});
}
async post(option) {
return await axios.post(option.url, option.data, {
headers: Object.assign({
token: localStorage.getItem("token")
}, option.headers)
});
}
interceptors() {
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
Toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true,
});
// 在发送请求之前做些什么
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
// 对响应数据做点什么
Toast.clear();
var data = response.data;
switch(data.resultCode) {
case "000":
return data.data;
case "500":
Toast.fail(data.message);
throw new Error(data.message);
break;
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
}
}
export default new Http()

View File

@@ -0,0 +1,16 @@
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import config from './config';
import http from './service/_';
Vue.config.productionTip = false;
Vue.prototype.$http = http;
config.VuePlugIn.forEach(v => Vue.use(v))
new Vue({
router,
render: (h) => h(App),
}).$mount("#app");

View File

@@ -0,0 +1,8 @@
export default {
data() {
return {
page: 1,
totalPage: 0
}
},
}

View File

@@ -0,0 +1,23 @@
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "Home",
component: () => import(/* webpackChunkName: "home" */ "../views/Home.vue"),
},
{
path: "/about",
name: "About",
component: () => import(/* webpackChunkName: "about" */ "../views/About.vue"),
},
];
const router = new VueRouter({
routes,
});
export default router;

View File

@@ -0,0 +1,76 @@
import http from '../http'
import config from '../config'
export default class IndexService {
async radio (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.radio,
data: data,
headers: header
})
}
async channelList (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.channelList,
data: data,
headers: header
})
}
async channelComment (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.channelComment,
data: data,
headers: header
})
}
async videoDetail (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.videoDetail,
data: data,
headers: header
})
}
async interactDetail (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.interactDetail,
data: data,
headers: header
})
}
async channelComment(data = {}, header = {}) {
return await http.get({
url: config.ApiList.channelComment,
data: data,
headers: header
});
}
//融媒直播
async liveList(data = {}, header = {}) {
return await http.get({
url: config.ApiList.liveList,
data: data,
headers: header
});
}
//直播详情
async liveDetail(data = {}, header = {}) {
return await http.get({
url: config.ApiList.liveDetail,
data: data,
headers: header
});
}
}

View File

@@ -0,0 +1,5 @@
import IndexService from './IndexService'
export default {
index: new IndexService()
}

View File

@@ -0,0 +1,5 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>

View File

@@ -0,0 +1,21 @@
<template lang="pug">
.home
h2 首页
</template>
<script>
export default {
name: "Home",
data() {
return {};
},
async created() {
let res = await this.$http.index.radio();
console.log(res);
},
};
</script>
<style lang="stylus" scoped>
@import "~@page/Home.styl"
</style>

View File

@@ -0,0 +1,117 @@
const path = require('path');
const CompressionPlugin = require('compression-webpack-plugin')
var cdn = {
css: [
'https://cdn.bootcdn.net/ajax/libs/vant/2.12.9/index.min.css'
],
js: [
'https://cdn.bootcss.com/vue/2.6.11/vue.runtime.min.js',
'https://cdn.bootcss.com/vue-router/3.2.0/vue-router.min.js',
'https://cdn.bootcss.com/axios/0.21.1/axios.min.js',
'https://cdn.bootcss.com/vant/2.12.10/vant.min.js',
]
}
module.exports = {
publicPath: './',
lintOnSave: false,
productionSourceMap: false,
parallel: require('os').cpus().length > 1,
devServer: {
hot: false,
port: 1314,
compress: true,
open: false,
openPage: '#/',
overlay: {
warnings: false,
errors: true
},
proxy: {
'/apis': {
target: 'http://115.159.153.142:9010/h5',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/apis': ''
}
}
}
},
configureWebpack:(config) => {
config.externals = {
'vue': 'Vue',
'vue-router': 'VueRouter',
'axios': 'axios',
'vant': 'vant'
}
return {
plugins: [new CompressionPlugin({
test: /\.js$|\.html$|\.css/, //匹配文件名
threshold: 10240, //对超过10k的数据进行压缩
deleteOriginalAssets: false //是否删除原文件
})]
};
},
chainWebpack: (config) => {
// 设置别名
config.resolve.alias
.set('@',resolve('./src'))
.set('@c',resolve('./src/components'))
.set('@router',resolve('./src/router'))
.set('@views',resolve('./src/views'))
.set('@page',resolve('./src/assets/styl/page'))
/**
* 导入全局css
* @type {*[]}
*/
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)))
// 第三方模块使用外链
config.plugin('html').tap(args => {
args[0].cdn = cdn;
return args;
});
/**
* 移除不必要的 prefetch 和 preload请求
*/
config.plugins.delete('prefetch');
config.plugins.delete('preload');
// 配置pug
config.module.rule('pug')
.test(/\.pug$/)
.use('pug-html-loader')
.loader('pug-html-loader')
.end();
}
}
function resolve(dir){
return path.join(__dirname,dir)
}
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/styl/_.styl'),
],
})
}

View File

@@ -0,0 +1,50 @@
1字体类
最常用
font-size 设置字体大小
font-weight 设置字体加粗
text-decoration 设置文字的线
line-height 设置行高 一般用于 div 内部的文字的垂直居中
偶尔使用
letter-spacing 设置字符的左右边距的
text-shadow颜色 x轴偏移距离 y轴偏移距离 阴影的模糊度 设置文字阴影
font-family: 设置字体风格的
自定义字体风格教程http://www.sharedblog.cn/post/126.html
不知道什么时候能使用
word-spacing 设置文字中空格大小的
2文本类
text-indent 设置段落的首行缩进
text-overflow 文字超过父元素的宽度的时候,显示 ...
white-space 设置文字超过父元素的时候,是否可以换行显示
overflow 设置文字超过父元素的时候,如何展示
text-align 设置文字在父元素中的水平对齐方式左left 中
center 右right
vertical-align 设置元素内部多个行内元素的Y对齐方式
outline: none 去除按钮和输入框激活时候的外边框
border-radius 设置元素的圆角属性
box-shadow 设置div的阴影
list-style 设置ul或者 ol 中li的样式风格 none
filter 设置滤镜 常用 blur模糊的
display: 设置元素如何显示
1可以让块标签和行标签相互转换
block 块标签
inline 行标签
inline-block 行内块标签
2none 把元素隐藏起来
其他方式
2.1 visibility: hidden
2.2 width 0 height 0
2.3 opacity 0 ~ 1
2.4 标签上加 hidden

View File

@@ -0,0 +1,76 @@
<!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>
<style>
a {
font-size: 112px;
color: red;
font-weight: 600;
text-shadow: #9e9e9e 19px 32px 2px;
margin: 0;
}
.test {
background: #9e9e9e;
}
.border {
border-left: 10px solid yellow;
border-right: 10px solid #ff000000;
border-top: 10px solid #0000ff00;
border-bottom: 10px solid #00800000;
width: 0px;
height: 0px;
width: 0;
height: 0;
}
ul li {
}
.cursor {
cursor: pointer;
}
</style>
</head>
<body>
<a href="">测试font-size</a>
<p>
吴孟达的一生经历了不少波折,年少成名的他,曾在走红后迷上赌博而债台高筑,同行不愿意找“烂泥扶不上墙”的他拍戏,生活艰难之下他想过自杀,后在好友周润发的暗中帮助下拍戏还清了巨债。
1991年凭着在《天若有情》中出色的表现达叔拿到了人生第一个“最佳男配角”奖。
纵然吴孟达经典作品不少,但最令人难忘的应该是与周星驰合作的喜剧。
1989年洗心革面后的吴孟达与刚出道的周星驰合演《盖世豪侠》和《他来自江湖》两人惊人的默契以及让人捧腹大笑的表演受到不少观众的好评。
</p>
<div class="test">
background 练习
</div>
<div class="border">
</div>
<ul>
<li>ddd</li>
<li>ddd</li>
<li>ddd</li>
<li>ddd</li>
</ul>
<button class="cursor">cursor练习</button>
</body>
</html>

View File

@@ -0,0 +1,361 @@
<!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>
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2389461_e4bex6gjme7.css">
<style>
body,
ul,
li,
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
}
.box {
background: red;
height: 40px;
line-height: 40px;
}
.box p {
color: #fff;
}
.box_2 {
width: 50px;
}
.box_2 p {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.align {
text-align: center;
}
.user img {
width: 50px;
height: 50px;
vertical-align: middle;
}
.search {
width: 160px;
height: 36px;
border: none;
outline: none;
border-radius: 18px;
padding-left: 16px;
padding-right: 39px;
box-sizing: border-box;
background: #f2f2f2 url("./search.png") no-repeat 127px center;
background-size: 12px;
}
.menu {
height: 34px;
background: #96b97d;
}
.center {
width: 1260px;
height: 100%;
margin: 0 auto;
}
.menu li {
float: left;
line-height: 34px;
margin-right: 20px;
}
.menu li a {
color: #fff;
}
.menu li a:hover {
color: #e3efd9
}
.menu_list {
width: 1024px;
padding: 12px 20px;
border: 1px solid #eaeaea;
background-color: #fff;
border-radius: 4px;
}
.menu_list li {
overflow: hidden;
}
.menu_title {
font-size: 18px;
font-weight: 700;
margin: 12px 0;
border-bottom: 1px solid #eaeaea;
padding-bottom: 5px;
}
.menu_title i {
font-size: 20px;
}
.item li {
padding: 6px 16px;
background-color: #f6f6f6;
border-radius: 5px;
color: #bbb;
margin: 0 8px 10px 0;
width: 28%;
float: left;
}
.item h4 {
color: #64854c;
font-size: 16px;
margin-top: 10px;
margin-bottom: 10px;
line-height: 1.1;
}
.des {
overflow: hidden;
}
.des img {
width: 36px;
height: 36px;
margin-left: 10px;
margin-right: 10px;
float: left;
padding-top: 6px;
}
.des span {
color: #666;
font-size: 12px;
font-weight: 700;
}
</style>
</head>
<body>
<div class="box">
<p>line-height 垂直居中</p>
</div>
<div class="box_2">
<p>text-overflow 的案例</p>
</div>
<div class="align">
<p>text-align测试1</p>
<p>text-align测试2</p>
</div>
<div class="user">
<img src="https://upload.jianshu.io/users/upload_avatars/6860761/b343643c-5ced-4421-ab58-1274e7bfe704" alt="">
<span>张三</span>
</div>
<input class="search" type="text" placeholder="输入搜索内容">
<div class="menu">
<div class="center">
<ul>
<li>
<a href="">首页</a>
</li>
<li>
<a href="">HTML</a>
</li>
<li>
<a href="">CSS</a>
</li>
<li>
<a href="">JavaScript</a>
</li>
<li>
<a href="">Node.js</a>
</li>
</ul>
</div>
</div>
<ul class="menu_list">
<li>
<div class="menu_title">
<i class="iconfont icon-caidan"></i>
<span>HTML / CSS</span>
</div>
<ul class="item">
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
</ul>
</li>
<li>
<div class="menu_title">
<i class="iconfont icon-caidan"></i>
<span>HTML / CSS</span>
</div>
<ul class="item">
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
</ul>
</li>
<li>
<div class="menu_title">
<i class="iconfont icon-caidan"></i>
<span>HTML / CSS</span>
</div>
<ul class="item">
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
<li>
<h4>【学习 HTML】</h4>
<div class="des">
<img src="./html.png" alt="">
<span>HTML即超文本标记语言Hyper Text Markup Language</span>
</div>
</li>
</ul>
</li>
</ul>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -0,0 +1,44 @@
<!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 测试2222</title>
</head>
<body>
<div class="header">
<div class="logo">
<img src="" alt="">
<input type="text">
</div>
<div class="menu">
<ul>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
</ul>
</div>
</div>
<div class="content">
<div class="left_menu"></div>
<div class="right_list"></div>
</div>
<div class="footer"></div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js

View File

@@ -0,0 +1,29 @@
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

View File

@@ -0,0 +1,14 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

View File

@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

View File

@@ -0,0 +1,46 @@
# my-project
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
hls 视频切片技术
ffmpeg
m3u8
key: DAFEWRGETDHGRQEWRETWRGET
0.ts
1.ts
...
9.ts
100MB
10s 10MB
10断
video

View File

@@ -0,0 +1,41 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})

View File

@@ -0,0 +1,54 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,101 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View File

@@ -0,0 +1,22 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

View File

@@ -0,0 +1,105 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json', '.less'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@c': resolve('src/components'),
'@view': resolve('src/view'),
'@page': resolve('src/assets/less/view'),
'@less': resolve('src/assets/less'),
'@img': resolve('./static/img')
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
},
{
test:/\.pug$/,
loader: "pug-html-loader"
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View File

@@ -0,0 +1,95 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

View File

@@ -0,0 +1,145 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

View File

@@ -0,0 +1,7 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})

View File

@@ -0,0 +1,85 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/apis': {
// 测试环境
target: 'http://115.159.153.142:9020/h5', // 接口域名
changeOrigin: true, //是否跨域
pathRewrite: {
'^/apis': '' //需要rewrite重写的,
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View File

@@ -0,0 +1,4 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>my-project</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,83 @@
{
"name": "my-project",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "bmy <2271608011@qq.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"amfe-flexible": "^2.2.1",
"axios": "^0.21.1",
"vant": "^2.12.10",
"videojs-contrib-hls": "^5.15.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vue-video-player": "^5.0.2"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"less": "^4.1.1",
"less-loader": "^5.0.0",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-pxtorem": "^6.0.0",
"postcss-url": "^7.2.1",
"pug": "^3.0.2",
"pug-html-loader": "^1.1.5",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

View File

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

View File

@@ -0,0 +1,14 @@
<template lang="pug">
#app
router-view(:key="$route.fullPath")
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
@import "~@less/normalize";
</style>

View File

@@ -0,0 +1,3 @@
@import './colors.less';
@import './vars.less';
@import './mixins.less';

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,424 @@
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
h1,h2,h3,h4,h5,h6,ul,li,p {
margin: 0;
padding: 0;
}
/* 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,43 @@
@import "./colors.less";
@fontFamily: Roboto, Lato, sans-serif;
// primary and accent
@primaryColor: @blue; // 主色
@secondaryColor: @pinkA200;
@successColor: @green;
@warningColor: @yellow600;
@errorColor: @red;
@infoColor: @blue;
@trackColor: @grey400;
// textColor or borderColor
@textColor: @darkBlack;
@secondaryTextColor: fade(@fullBlack, 54%);
@alternateTextColor: @white;
@borderColor: fade(@fullBlack, 12%);
@disabledColor: fade(@fullBlack, 38%);
// background
@backgroundColor: @grey50;
@dialogBackgroundColor: @white; // dialogs or cards
@chipBackgroundColor: @grey300;
// icon color
@activeIconColor: fade(@fullBlack, 54%);
@inActiveIconColor: fade(@fullBlack, 38%);
// spaceing
@iconSize: 24px;
@desktopGutter: 24px;
@desktopGutterMore: 32px;
@desktopGutterLess: 16px;
@desktopGutterMini: 8px;
@desktopKeylineIncrement: 64px;
@desktopDropDownMenuItemHeight: 32px;
@desktopDropDownMenuFontSize: 15px;
@desktopDrawerMenuItemHeight: 48px;
@desktopSubheaderHeight: 48px;
@desktopToolbarHeight: 56px;
// animate
@easeOutFunction: cubic-bezier(0.23, 1, 0.32, 1);
@easeInOutFunction: cubic-bezier(0.445, 0.05, 0.55, 0.95);

View File

@@ -0,0 +1,5 @@
@import "../_.less";
h2 {
color: @blueGrey500;
}

View File

@@ -0,0 +1,95 @@
.apps {
margin-left: 0.307rem;
margin-right: 0.32rem;
}
.apps .p1 {
margin-top: 0.353rem;
font-size: 0.48rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
color: #333333;
}
.apps .p2 {
margin-top: 0.14rem;
font-family: PingFangSC-Medium;
font-size: 0.307rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.576rem;
letter-spacing: 0rem;
color: #999999;
}
.apps .jianjie {
margin-top: 0.393rem;
display: flex;
justify-content: space-between;
}
.apps .jianjie .left {
display: flex;
align-items: center;
}
.apps .jianjie .left img {
margin-right: 0.133rem;
width: 0.347rem;
height: 0.36rem;
}
.apps .jianjie .left p {
color: #999999;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
}
.apps .jianjie .right {
display: flex;
justify-content: flex-end;
align-items: center;
position: relative;
}
.apps .jianjie .right p {
font-family: PingFangSC-Medium;
font-size: 0.32rem;
line-height: 0.384rem;
letter-spacing: 0rem;
color: #999999;
}
.apps .jianjie .right img {
margin-left: 0.147rem;
width: 0.227rem;
height: 0.133rem;
}
.apps .jianjie .right .aaa {
right: 0;
font-size: 0.32rem;
color: #999999;
position: absolute;
top: 0.5rem;
}
.apps .jianjie .right .active {
display: none;
}
.apps .jianjie .right .none {
display: block !important;
}
.apps .msg {
margin-top: 0.467rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.apps .msg p {
font-family: PingFangSC-Medium;
font-size: 0.373rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.448rem;
letter-spacing: 0rem;
color: #333333;
}
.apps .msg img {
width: 2rem;
height: 0.747rem;
}

View File

@@ -0,0 +1,95 @@
.apps {
margin-left: 0.307rem;
margin-right: 0.32rem;
.p1 {
margin-top: 0.353rem;
font-size: 0.48rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
color: #333333;
}
.p2 {
margin-top: 0.14rem;
font-family: PingFangSC-Medium;
font-size: 0.307rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.576rem;
letter-spacing: 0rem;
color: #999999;
}
.jianjie {
margin-top: 0.393rem;
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
img {
margin-right: 0.133rem;
width: 0.347rem;
height: 0.36rem;
}
p {
color: #999999;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
}
}
.right {
display: flex;
justify-content: flex-end;
align-items: center;
position: relative;
p {
font-family: PingFangSC-Medium;
font-size: 0.32rem;
line-height: 0.384rem;
letter-spacing: 0rem;
color: #999999;
}
img {
margin-left: 0.147rem;
width: 0.227rem;
height: 0.133rem;
}
.aaa {
right: 0;
font-size: 0.32rem;
color: #999999;
position: absolute;
top: .5rem;
}
.active{
display: none;
}
.none{
display: block !important;
}
}
}
.msg {
margin-top: 0.467rem;
display: flex;
justify-content: space-between;
align-items: center;
p {
font-family: PingFangSC-Medium;
font-size: 0.373rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.448rem;
letter-spacing: 0rem;
color: #333333;
}
img {
width: 2rem;
height: 0.747rem;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,37 @@
<template lang="pug">
.Allcomment
span 打开APP查看全部评论
</template>
<script>
export default {
name: "AllComment",
data() {
return {}
},
created() {
},
methods: {}
}
</script>
<style scoped lang="less">
.Allcomment{
width: 9.36rem;
height: 1.173rem;
border-radius: 0.107rem;
border: solid 0.027rem #d0302c;
text-align: center;
margin-left: 0.307rem;
line-height: 1.5;
span{
width: 3.693rem;
height: 0.347rem;
font-family: PingFangSC-Medium;
font-size: 0.373rem;
line-height: 0.627rem;
letter-spacing: 0rem;
color: #d0302c;
}
}
</style>

View File

@@ -0,0 +1,60 @@
<template lang="pug">
.recommend
.recommend-title
span 相关推荐
ul
li(v-for='i in 5')
.recommend-img
img(src='@img/recommend_right.png')
span 啊实打实大大啊实打实大大
</template>
<script>
export default {
name: 'Broadwise',
props: {
relevant: {
type: Array,
default: () => {
}
}
},
methods: {}
}
</script>
<style scoped lang="less">
.recommend1 {
padding-left: 0.307rem;
border-top: 0.187rem solid #f3f3f3;
.recommend-title1{
width: 10rem;
height: 1.347rem;
overflow: hidden;
span {
display: block;
margin-top: 0.48rem;
font-size: 0.427rem;
font-weight: 700;
}
}
ul {
display: flex;
overflow-x: scroll;
border-bottom: 1px solid #f3f3f3;
li {
span{
display: block;
margin-top: 0;
margin-bottom: 0.52rem;
font-size: 0.373rem;
}
.recommend-img1 img{
width: 3.653rem;
height: 2.08rem;
border-radius: 0.053rem;
}
}
}
}
</style>

View File

@@ -0,0 +1,116 @@
<template lang="pug">
.comment
.title 全部评论
ul.list(v-if="commentList.length != 0")
li(v-for="(item,index) in commentList")
img(class="tx" :src="item.image")
.right
.right_top
.name
p {{ item.nick_name }}
span {{ item.create_time }}
.zan
img(src="/static/img/icon/give_thumbs-up.png")
span {{ item.praise_count }}
.right_bottom {{ item.content }}
.nodata(v-else)
img(src="/static/img/hm_bg_img_no.png")
p 快来发表你的评论吧
</template>
<script>
export default {
name: 'Comment',
props: {
commentList: {
type: Array,
default: () => []
}
},
data () {
return {}
},
created () {
},
methods: {}
}
</script>
<style scoped lang="less">
.comment {
.title {
height: 1.347rem;
background-color: #ffffff;
font-family: PingFangSC-Bold;
font-size: 0.427rem;
color: #333333;
padding: 0 0.32rem;
box-sizing: border-box;
line-height: 1.347rem;
margin-bottom: 0.373rem;
}
.list {
padding: 0 0.32rem;
box-sizing: border-box;
li {
display: flex;
justify-content: flex-start;
margin-bottom: 0.933rem;
.tx {
width: 0.933rem;
height: 0.947rem;
margin-right: 0.267rem;
border-radius: 100%;
}
.right {
.right_top {
margin-bottom: 0.507rem;
display: flex;
justify-content: space-between;
align-items: center;
.name {
font-size: 0;
p {
font-size: 0.373rem;
color: #333333;
}
span {
font-size: 0.267rem;
color: #999999;
}
}
.zan {
img {
width: 0.347rem;
height: 0.36rem;
margin-right: 0.133rem;
vertical-align: middle;
}
span {
font-size: 0.32rem;
color: #999999;
}
}
}
.right_bottom {
font-size: 0.373rem;
color: #333333;
}
}
}
}
.nodata {
text-align: center;
margin-top: 0.84rem;
img {
width: 5.56rem;
height: 4.653rem;
margin-bottom: 0.68rem;
}
p {
font-size: 0.373rem;
color: #999999;
}
}
}
</style>

View File

@@ -0,0 +1,19 @@
<template lang="pug">
.live
LiveList
</template>
<script>
import LiveList from '@c/LiveList'
export default {
created () {
},
components: {
LiveList
}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,99 @@
<template lang="pug">
ul
li(v-for='item in liveArr')
.li-top
router-link(:to="{ path: 'zhiboInfo', query: { url: item.play_url, id: item.id } }")
img(class='context' :src='item.coverimage')
// 右上角
img(v-if='item.status == 10' class='state' src='@img/icon/live_lab_ing.png')
img(v-else-if='item.status == 3' class='state' src='@img/icon/live_lab_notice_big.png')
img(v-else='item.status == 1 || 2' class='playback' src='@img/icon/live_lab_playback_big.png')
.time(v-if='item.status == 10') 直播时间{{item.start_time}}
.subscribe(v-if='item.status == 3') {{item.appointment_count}}人预约
.subscribe(v-else-if='item.status == 1 || 2') {{item.appointment_count}}人看过
.subscribe(v-else='item.status == 10') {{item.appointment_count}}人在看
span {{item.title}}
</template>
<script>
export default {
name: 'LiveList',
created () {
this.liveList()
},
data () {
return {
liveArr: []
}
},
methods: {
async liveList () {
let res = await this.$http.index.liveList({
})
this.liveArr = res.list
console.log(res)
}
}
}
</script>
<style scoped lang="less">
ul{
margin-top: 0.4rem;
border-top: 0.013rem solid #f5f5f5;
padding-left: 0.307rem;
padding-right: 0.307rem;
li{
position: relative;
margin-bottom: 0.533rem;
.li-top {
.context {
width: 9.36rem;
height: 5.2rem;
}
.state {
position: absolute;
top: 4px;
right: 7px;
width: 1.52rem;
height: 0.48rem;
}
.playback {
position: absolute;
top: 4px;
right: 7px;
width: 0.8rem;
height: 0.48rem;
}
.time {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
width: 4.733rem;
height: 0.503rem;
background-color: #000000;
border-radius: 0.267rem;
opacity: 0.7;
align-items: center;
text-align: center;
color: #fff;
font-size: 0.293rem;
}
.subscribe {
position: absolute;
right: 8px;
bottom: 46px;
font-size: 0.293rem;
color: #ffffff;
}
}
}
span {
display: block;
font-size: 0.4rem;
}
}
</style>

View File

@@ -0,0 +1,70 @@
<template lang="pug">
.radio
v-video(:videoUrl="videoList" :show="false" ref="video")
.title {{ radioList.title }}
img.fenm(:src="radioList.default_frontcover")
img.audio(:src="status ? '/static/img/sound_spectrum.png' : '/static/img/sound_spectrum.gif' ")
img.play(@click="changeStatus" :src="status ? '/static/img/radio_up.png' :'/static/img/radio_stop.png' ")
</template>
<script>
export default {
data () {
return {
status: true,
radioList: {},
videoList: []
}
},
created () {
this.getRadio();
},
methods: {
changeStatus () {
this.status = !this.status
if (!this.status) {
this.$refs.video.play()
} else {
this.$refs.video.stop()
}
},
async getRadio () {
this.radioList = await this.$http.index.radio();
this.videoList.push({
type: 'audio/x-mpegurl',
src: this.radioList.play_url
})
console.log(this.videoList)
console.log(this.radioList);
}
}
}
</script>
<style lang="less" scoped>
.radio {
width: 7.467rem;
margin: 0 auto;
text-align: center;
.title {
font-size: 0.48rem;
color: #000000;
margin-bottom: 0.84rem;
margin-top: 1.347rem;
}
.fenm {
width: 7.467rem;
height: 7.467rem;
margin-bottom: 0.667rem;
}
.audio {
height: 1.2rem;
margin-bottom: 0.733rem;
}
.play {
width: 1.6rem;
height: 1.6rem;
}
}
</style>

View File

@@ -0,0 +1,127 @@
<template lang="pug">
.recommend2
.recommend(v-if="vertical")
.recommend-title
span 相关推荐
ul
li(v-for='(item) in relevant')
.recommend-text
span {{item.title}}
p {{item.create_time}}
.recommend-img
img(:src='item.icon')
.recommend1(v-else)
.recommend-title1
span 相关推荐
ul
li(v-for='(val) in relevant')
.recommend-img1
img(:src='val.icon')
span {{val.title}}
</template>
<script>
export default {
name: 'Recommend',
props: {
relevant: {
type: Array,
default: () => {}
},
NewsList: {
type: Array,
default: () => {}
}
},
data: function () {
return {
vertical: true
}
},
methods: {
}
}
</script>
<style scoped lang="less">
.recommend2{
.recommend1 {
padding-left: 0.307rem;
border-top: 0.187rem solid #f3f3f3;
.recommend-title1{
width: 10rem;
height: 1.347rem;
overflow: hidden;
span {
display: block;
margin-top: 0.48rem;
font-size: 0.427rem;
font-weight: 700;
}
}
ul {
display: flex;
overflow-x: scroll;
border-bottom: 1px solid #f3f3f3;
li {
margin-left: 0.5rem;
span{
display: block;
margin-top: 0;
margin-bottom: 0.52rem;
font-size: 0.373rem;
}
.recommend-img1 img{
width: 3.653rem;
height: 2.08rem;
border-radius: 0.053rem;
}
}
}
}
.recommend {
padding-left: 0.307rem;
border-top: 0.187rem solid #f3f3f3;
border-bottom: 0.187rem solid #f3f3f3;
.recommend-title{
width: 10rem;
height: 1.347rem;
overflow: hidden;
span {
display: block;
margin-top: 0.48rem;
font-size: 0.427rem;
}
}
ul {
padding-right: 0.32rem;
li {
width: 9.693rem;
height: 3.747rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f3f3f3;
.recommend-text {
display: flex;
flex-flow: column;
span{
font-size: 0.427rem;
}
p {
margin-top: 0.533rem;
font-size: 0.32rem;
color: #999999;
}
}
.recommend-img img{
width: 3.013rem;
height: 2.267rem;
border-radius: 0.053rem;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,48 @@
<template lang="pug">
.title
.title-left
img(class='logo' src='@img/icon/gw_img_logo.png')
img(class='text-img' src='@img/icon/logo_text_icon.png')
button 打开
</template>
<script>
export default {
name: 'Top'
}
</script>
<style scoped lang="less">
.title {
width: 10rem;
height: 1.333rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #4c4c4c;
.title-left{
margin-left: 0.32rem;
.logo {
margin-top: 0.15rem;
width: 0.867rem;
height: 0.867rem;
}
.text-img {
margin-left: 0.253rem;
width: 1.76rem;
height: 0.613rem;
vertical-align: 5px;
}
}
button {
width: 1.92rem;
height: 0.693rem;
margin-right: 0.533rem;
color: #fff;
background-color: #d0302c;
border-radius: 5px;
border: none;
font-size: 0.32rem;
}
}
</style>

View File

@@ -0,0 +1,22 @@
<template lang="pug">
.tv
TvList
</template>
<script>
import TvList from '@c/TvList'
export default {
data () {
return {}
},
components: {
TvList
}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,77 @@
<template lang="pug">
ul.tvlist
router-link(tag="li", v-for="(item,index) in TvList"
:key="index", :to="{ path: 'tvInfo', query: { url: item.play_url, id: item.id } }")
span(:class="item.id == currentId ? 's_active': '' ") {{ item.title }}
img(v-if="item.id == currentId" src="/static/img/act-list.gif")
</template>
<script>
export default {
name: 'TvList',
props: {
showIcon: {
type: Boolean,
default: true
},
showActive: {
type: Boolean,
default: true
}
},
data () {
return {
currentId: 0,
TvList: []
}
},
created () {
this.getList()
this.changeStaus()
},
methods: {
changeStaus () {
let id = this.$route.query.id
if (id != undefined) {
this.currentId = id
}
},
async getList () {
this.TvList = await this.$http.index.channelList({
page: this.page,
count: 20
})
console.log(this.TvList)
}
}
}
</script>
<style scoped lang="less">
.tvlist {
li {
width: 10rem;
height: 1.6rem;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.813rem;
padding-right: 0.36rem;
box-sizing: border-box;
border-bottom: 0.013rem solid #e5e5e5;
span {
font-family: PingFangSC-Bold;
font-size: 0.427rem;
color: #333333;
}
.s_active {
color: #d0302c !important;
}
img {
width: 0.36rem;
height: 0.4rem;
}
}
}
</style>

View File

@@ -0,0 +1,78 @@
<template lang="pug">
video-player.video-player-box(ref='videoPlayer', :options='playerOptions',
:playsinline='true' v-show="show")
</template>
<script>
export default {
name: 'Video',
props: {
show: {
type: Boolean,
default: true
},
videoUrl: {
type: Array,
default: () => [{
type: 'audio/x-mpegurl',
src: 'https://vse-as-all44.secdn.net/logos-channel/live/biblescreen-ad-free/chunklist_sess390797962.m3u8'
}]
}
},
data () {
return {
playerOptions: {
// videojs options
language: 'zh-CN',
aspectRatio: '16:9',
autoplay: false,
muted: false,
loop: false,
preload: 'none',
playbackRates: [0.7, 1.0, 1.5, 2.0, 3.0],
sources: this.videoUrl,
controlBar: {
// 当前时间和总时间的 分隔符
timeDivider: true,
//当前播放时间
currentTimeDisplay: true,
// 总时间
durationDisplay: true,
/**
* 区分 currentTimeDisplay,timeDivider,durationDisplay
* remainingTimeDisplay显示默认样式只显示当前播放时间一般
* 为false
*/
remainingTimeDisplay: false,
fullscreenToggle: true
}
}
}
},
created () {},
mounted () {},
methods: {
play() {
this.$refs.videoPlayer.player.play()
},
stop() {
this.$refs.videoPlayer.player.pause()
}
}
}
</script>
<style lang='less' scoped>
/deep/.video-js.vjs-fluid,
.video-js.vjs-16-9,
.video-js.vjs-4-3 {
margin-top: 1.33rem;
}
/deep/.video-js .vjs-big-play-button {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>

View File

@@ -0,0 +1,56 @@
<template lang="pug">
.zhibo
.a
img.first(src="/static/img/icon/gw_img_logo.png")
img.two(src="/static/img/icon/logo_text_icon.png")
.b
.dakai 打开
</template>
<script>
export default {};
</script>
<style lang="less" scoped>
.zhibo {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
background-color: #4c4c4c;
display: flex;
justify-content: space-between;
width: 10rem;
height: 1.333rem;
.first {
width: 0.867rem;
height: 0.867rem;
margin-top: 0.24rem;
margin-left: 0.32rem;
}
.two {
width: 1.76rem;
height: 0.613rem;
margin-top: 0.373rem;
margin-left: 0.253rem;
}
.dakai {
width: 1.92rem;
height: 0.693rem;
background-color: #d0302c;
border-radius: 0.107rem;
margin-top: 0.32rem;
margin-right: 0.533rem;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.627rem;
letter-spacing: 0rem;
color: #ffffff;
text-align: center;
line-height: 0.693rem;
}
}
</style>

View File

@@ -0,0 +1,36 @@
import Vant from 'vant'
import 'vant/lib/index.css'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import 'videojs-contrib-hls'
export default {
devBaseUrl: '/apis',
testBaseUrl: 'http://47.114.153.249:3000/api/json',
prodBaseUrl: 'http://47.114.153.249:3000/api/json',
ApiList: {
radio: '/radio', // radio页面
channelList: '/channelList', // tv列表
channelComment: '/channelComment', // tv评论
liveList: '/liveList', // 融媒直播
liveDetail: '/liveDetail', // 直播详情
newsDetail: '/newsDetail', // 新闻页面接口
videoDetail: '/videoDetail', // 视频页面接口
interactDetail: '/interactDetail' // 用户注册接口
},
VuePlugIn: [ Vant, VueVideoPlayer ],
getUrl () {
switch (process.env.NODE_ENV) {
case 'development':
return this.devBaseUrl
// eslint-disable-next-line no-unreachable
break
case 'test':
return this.testBaseUrl
break
case 'production':
return this.prodBaseUrl
break
}
}
}

View File

@@ -0,0 +1,64 @@
import axios from 'axios'
import config from '../config'
import {Toast} from 'vant'
class Http {
constructor () {
axios.defaults.baseURL = config.getUrl()
this.interceptors()
}
async get (option) {
return await axios.get(option.url, {
params: option.data,
headers: Object.assign({
token: localStorage.getItem('token')
}, option.headers)
})
}
async post (option) {
return await axios.post(option.url, option.data, {
headers: Object.assign({
token: localStorage.getItem('token')
}, option.headers)
})
}
interceptors () {
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
Toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
// 在发送请求之前做些什么
return config
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error)
})
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
// 对响应数据做点什么
Toast.clear()
var data = response.data
switch (data.resultCode) {
case '000':
return data.data
case '500':
Toast.fail(data.message)
throw new Error(data.message)
break
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error)
})
}
}
export default new Http()

View File

@@ -0,0 +1,29 @@
import 'amfe-flexible'
import Vue from 'vue'
import App from './App'
import router from './router'
import config from './config'
import http from './service/_'
import Video from '@c/Video'
Vue.component('v-video', Video)
//头部组件
import commTop from '@c/commTop'
Vue.component('top',commTop);
//评论组件
import Comment from '@c/Comment'
Vue.component('Comment',Comment);
config.VuePlugIn.forEach(v => Vue.use(v))
Vue.config.productionTip = false
Vue.prototype.$http = http
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,9 @@
export default {
data() {
return {
page: 1,
totalPage: 0
}
},
}

View File

@@ -0,0 +1,45 @@
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: () => import(/* webpackChunkName: "home" */ '@view/Home.vue')
},
{
path: '/about',
name: 'about',
component: () => import(/* webpackChunkName: "about" */ '@view/About.vue')
},
{
path: '/tvInfo',
name: 'about',
component: () => import(/* webpackChunkName: "tvInfo" */ '@view/tvInfo.vue')
},
// 直播详情页
{
path: '/zhiboInfo',
name: 'zhiboInfo',
component: () => import(/* webpackChunkName: "zhiboInfo" */ '@view/zhiboInfo.vue')
},
{
path: '/invitation',
name: 'invitation',
component: () => import(/* webpackChunkName: "about" */ '@view/invitation.vue')
},
{
path: '/demand',
name: 'demand',
component: () => import(/* webpackChunkName: "about" */ '@view/demand.vue')
},
{
path: '/News',
name: 'News',
component: () => import(/* webpackChunkName: "about" */ '@view/News.vue')
}
]
})

View File

@@ -0,0 +1,75 @@
import http from '../http'
import config from '../config'
export default class IndexService {
async radio (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.radio,
data: data,
headers: header
})
}
async channelList (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.channelList,
data: data,
headers: header
})
}
async channelComment (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.channelComment,
data: data,
headers: header
})
}
async videoDetail (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.videoDetail,
data: data,
headers: header
})
}
async interactDetail (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.interactDetail,
data: data,
headers: header
})
}
async channelComment (data = {}, header = {}) {
return await http.get({
url: config.ApiList.channelComment,
data: data,
headers: header
})
}
// 融媒直播
async liveList (data = {}, header = {}) {
return await http.get({
url: config.ApiList.liveList,
data: data,
headers: header
})
}
// 直播详情
async liveDetail (data = {}, header = {}) {
return await http.get({
url: config.ApiList.liveDetail,
data: data,
headers: header
})
}
}

View File

@@ -0,0 +1,13 @@
import http from '../http'
import config from '../config'
export default class NewsService {
async newsDetail (data = {}, header = {}) {
// eslint-disable-next-line no-return-await
return await http.get({
url: config.ApiList.newsDetail,
data: data,
headers: header
})
}
}

View File

@@ -0,0 +1,7 @@
import IndexService from './IndexService'
import NewsService from './NewsService'
export default {
index: new IndexService(),
news: new NewsService()
}

View File

@@ -0,0 +1,11 @@
<template lang="pug">
.about 关于我
</template>
<script>
export default {}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,35 @@
<template lang="pug">
.home
van-tabs(v-model='active', :border="true" swipeable='')
van-tab(title="包河Radio")
Radio
van-tab(title="包河Tv")
Tv
van-tab(title="融媒直播")
Live
</template>
<script>
import Radio from '@c/Radio.vue'
import Tv from '@c/Tv.vue'
import Live from '@c/Live.vue'
export default {
data () {
return {
active: 0
}
},
async created () {
},
components: {
Radio, Tv, Live
}
}
</script>
<style scoped lang="less">
@import "~@page/Home";
</style>

View File

@@ -0,0 +1,114 @@
<template lang="pug">
.news
Top
.news-content
.news-title {{NewsList.title}}
.news-date
span {{NewsList.create_time}}
span {{NewsList.viewer_count}}
div(v-html="NewsList.content" :class="isMore ? 'news-body' : ''")
.show( @click="isMore = !isMore" v-if="isMore")
img(src='@img/select-down.png' class='select')
button 打开APP阅读全文
//img(src='@img/backimg.png' class='back')
Recommend(:relevant="relevant")
Comment
</template>
<script>
import Top from '@c/Top.vue'
import Recommend from '@c/Recommend.vue'
import Comment from '@c/Comment.vue'
export default {
name: 'News',
data () {
return {
isMore: true,
NewsList: [],
relevant: []
}
},
created () {
this.getVideoDetail()
},
methods: {
async getVideoDetail () {
let res = await this.$http.news.newsDetail({
id: '461'
})
this.NewsList = res.detail
this.relevant = res.recommend
console.log(res)
}
},
components: {
Top,
Recommend,
Comment
}
}
</script>
<style scoped lang="less">
.news-content {
padding-left: 0.293rem;
padding-right: 0.333rem;
.news-title {
font-size: 0.533rem;
margin-bottom: 0.507rem;
}
.news-date {
font-size: 0.32rem;
span {
margin-left: 2px;
color: #999999;
}
}
.news-body {
height: 7.08rem;
margin-top: 0.907rem;
font-size: 0.427rem;
overflow: hidden;
}
.show {
//position: relative;
display: block;
margin-top: 1px;
text-align: center;
.select {
width: 0.693rem;
}
.back {
position: absolute;
top: 0;
left: 1px;
z-index: -1;
opacity: 0.5;
width: 9.36rem;
height: 3rem;
}
button {
width: 9.36rem;
height: 1.173rem;
background-color: #d0302c;
border-radius: 0.107rem;
font-size: 0.373rem;
color: #ffffff;
border: none;
}
}
}
</style>

View File

@@ -0,0 +1,143 @@
<template lang="pug">
.demand
Top
van-swipe(@change='onChange')
van-swipe-item( v-for="(image, index) in images")
img( :src="image" )
template(#indicator='')
.custom-indicator {{ current + 1 }}/{{ images.length }}
.demand_a
.demand_b( v-if="Return.detail.image_url" )
img(class="tx" :src='Return.detail.image_url')
.demand_c
p {{Return.detail.nick_name}}
span {{Return.detail.create_time}}
span {{Return.detail.content}}
comment(:comment-list="Return.comment")
Allcomment
</template>
<script>
import Top from '@c/Top.vue'
import Allcomment from '@c/AllComment.vue'
import comment from '@c/Comment.vue'
export default {
name: 'demand',
data () {
return {
Return: {},
current: 0,
images: []
}
},
created () {
this.getdemand()
},
methods: {
async getdemand () {
let res = await this.$http.index.interactDetail({
id: '218'
})
console.log(res)
this.Return = res
this.images = res.detail.image
},
onChange (index) {
this.current = index
}
},
components: {
Top,
Allcomment,
comment
}
}
</script>
<style scoped lang="less">
.demand {
.van-swipe {
width: 10rem;
height: 13.427rem;
.van-swipe-item {
img {
height: 100%;
}
}
.custom-indicator {
position: absolute;
right: 5px;
bottom: 5px;
padding: 2px 5px;
font-size: 12px;
border-radius: 30%;
background: rgba(0, 0, 0, 0.1);
}
}
.demand_a {
margin: 0.333rem;
.demand_b {
display: flex;
img {
width: 1rem;
height: 1.093rem;
margin-right: 0.213rem;
margin-left: 0.32rem;
}
.demand_c {
p {
width: 2.093rem;
height: 0.347rem;
font-family: PingFangSC-Bold;
font-size: 0.373rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.448rem;
letter-spacing: 0rem;
color: #333333;
}
span {
width: 1.467rem;
height: 0.307rem;
font-family: PingFangSC-Medium;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.747rem;
letter-spacing: 0rem;
color: #999999;
}
}
}
span {
width: 9.36rem;
height: 2.253rem;
font-family: PingFangSC-Medium;
font-size: 0.427rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.667rem;
letter-spacing: 0rem;
color: #333333;
}
}
.comment {
margin-bottom: 0.533rem;
}
.Allcomment {
margin-bottom: 0.533rem;
}
}
</style>

View File

@@ -0,0 +1,175 @@
<template lang="pug">
.invitation
Top
v-video(:videoUrl="videoUrl")
.invitation_a
span {{Return.detail.title}}
.invitation_b
span {{Return.detail.create_time}}
.invitation_c
.left
.left_a
img(class='xing' src='@img/icon/collection-icon.png')
span 收藏
.left_b
img(class='zan' src='@img/icon/give_thumbs-up.png')
span {{Return.detail.like_count}}
.right( @click="boom" )
span 简介
img(class='xia' src='@img/icon/open-close.png' ref="jiantou" )
.invitation_d(style='display:none' ref="invitation_d")
span 简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容
comment(:comment-list="Return.comment")
Allcomment
</template>
<script>
import Top from '@c/Top.vue'
import Allcomment from '@c/AllComment.vue'
import comment from '@c/Comment.vue'
import Recommend from '@c/Recommend.vue'
export default {
name: 'invitation',
data () {
return {
Return: {}
}
},
created () {
this.getvideoDetail()
},
methods: {
async getvideoDetail () {
let res = await this.$http.index.videoDetail({
id: '147'
})
console.log(res)
this.Return = res
},
boom (e) {
if (this.$refs.invitation_d.style.display == 'none') {
this.$refs.jiantou.src = '../static/img/icon/open-just.png'
this.$refs.invitation_d.style.display = 'block'
} else {
this.$refs.invitation_d.style.display = 'none'
this.$refs.jiantou.src = '../static/img/icon/open-close.png'
}
}
},
components: {
Top,
Allcomment,
comment,
Recommend
}
}
</script>
<style scoped lang="less">
.invitation {
.invitation_a {
margin: 0.878rem 0.693rem 0.493rem 0.307rem;
span {
width: 9rem;
height: 1.173rem;
font-family: PingFangSC-Bold;
font-size: 0.48rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.76rem;
letter-spacing: 0rem;
color: #333333;
}
.invitation_b {
span {
font-family: PingFangSC-Medium;
font-size: 0.32rem;
font-weight: normal;
letter-spacing: 0rem;
color: #999999;
}
.invitation_c {
display: flex;
justify-content: space-between;
.left {
display: flex;
.left_a {
img {
width: 0.373rem;
height: 0.373rem;
}
span {
width: 0.613rem;
height: 0.307rem;
font-family: PingFangSC-Medium;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
}
}
.left_b {
img {
width: 0.373rem;
height: 0.373rem;
}
span {
width: 0.613rem;
height: 0.307rem;
font-family: PingFangSC-Medium;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.6rem;
letter-spacing: 0rem;
}
}
}
.right {
span {
width: 0.627rem;
height: 0.307rem;
font-family: PingFangSC-Medium;
font-size: 0.32rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.384rem;
letter-spacing: 0rem;
color: #999999;
}
img {
width: 0.227rem;
height: 0.133rem;
}
}
}
}
}
.invitation_d{
margin: 0.32rem;
span{
width: 9.293rem;
height: 0.92rem;
font-family: PingFangSC-Medium;
font-size: 0.373rem;
font-weight: normal;
font-stretch: normal;
line-height: 0.627rem;
letter-spacing: 0rem;
color: #999999;
}
}
}
</style>

View File

@@ -0,0 +1,48 @@
<template lang="pug">
.tvInfo
top
v-video(:videoUrl="videoUrl")
van-tabs
van-tab(title='频道')
TvList
van-tab(title='评论')
Comment(:comment-list="CommentArr")
</template>
<script>
import TvList from '@c/TvList'
import Comment from '@c/Comment'
export default {
name: 'tvInfo',
data () {
return {
videoUrl: [],
CommentArr: []
}
},
created () {
this.videoUrl.push({
type: 'audio/x-mpegurl',
src: this.$route.query.url
})
this.getTvComment()
},
methods: {
async getTvComment () {
let res = await this.$http.index.channelComment({
object_id: this.$route.query.id
})
this.CommentArr = res.list
}
},
components: {
TvList,
Comment
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,56 @@
<template lang='pug'>
.big
top
v-video
.apps
p.p1 九枚玉和您畅谈陪读生活的酸辣苦涩
p.p2 902873人预约
.jianjie
.left
img(src="/static/img/icon/give_thumbs-up.png")
p 12
.right(@click="dianji")
p 简介
img(
:src="stat ? '/static/img/icon/open-close.png' : '/static/img/icon/open-just.png'"
)
.aaa(v-show="stat") 哈哈哈
.msg
p 7月23日下午14:00直播
img(src="/static/img/yuyue.png")
Comment
</template>
<script>
export default {
data() {
return {
stat: true,
id: this.$route.query.id
};
},
created() {
this.getliveinfo();
},
methods: {
async getliveinfo() {
let res = await this.$http.index.liveDetail({
live_id: this.id
});
console.log(res);
},
dianji() {
this.stat = !this.stat;
console.log(this.stat);
if (!this.stat) {
}
},
},
};
</script>
<style lang='less' scoped>
@import "~@page/zhiboInfo";
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

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