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,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,17 @@
.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,18 @@
// 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": {
browsers: ['Android >= 4.0', 'iOS >= 7']
},
"postcss-pxtorem": {
"rootValue": 37.5,
"propList": [
"*"
]
}
}
}

View File

@@ -0,0 +1,22 @@
# vuecli2.x
> 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).

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,103 @@
'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'),
'@page': resolve('src/assets/less/page'),
'@less': resolve('src/assets/less'),
'@mixins': resolve('src/assets/less/mixins'),
}
},
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,76 @@
'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: {},
// 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,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>vuecli2.x</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,83 @@
{
"name": "vuecli2.x",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "bmy",
"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.24.0",
"vant": "^2.12.34",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"videojs-contrib-hls": "^5.15.0",
"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.2",
"less-loader": "^4.1.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": "^5.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,15 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
@import "~@less/_";
</style>

View File

@@ -0,0 +1,5 @@
@import "./config/color.less";
@import "./config/size.less";
@import "./mixins/mixins.less";
@import "./mixins/normalize.less";
@import "./mixins/resetUI.less";

View File

@@ -0,0 +1,3 @@
@defaultSize: 14px;
@smallSize: 12px;
@bigSize_19: 19px;

View File

@@ -0,0 +1,260 @@
.transform(@t) {
-webkit-transform: @t;
transform: @t;
}
.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 left and top
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
&:before {
background-color: @color;
}
}
// 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,435 @@
/*! 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,
body,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
font,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
p,
div {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
/*background: transparent;*/
}
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;
}
/* 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,
figcaption,
figure,
footer,
header,
main,
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,
[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"],
[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,435 @@
/*! 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, body, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,p,div {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
/*background: transparent;*/
}
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;
}
/* 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,8 @@
@import "../_.less";
.about {
h2 {
color: @themeColor;
font-size: @bigSize_19;
}
}

View File

@@ -0,0 +1,21 @@
<template lang="pug">
.live live
bottom-t
</template>
<script>
export default {
data () {
return {
active: 0
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,175 @@
<template lang="pug">
.radio
vue-video(
ref="video",
:url="playUrl",
:is-show="false",
v-if="playUrl.length != 0"
)
.title {{ radio.title }}
img.music_img(:src="radio.logo")
img.music_gif(
:src="status ? '/static/img/sound_spectrum.png' : '/static/img/sound_spectrum.gif'"
)
ul.action
li(@click="GetRadio")
img(src="/static/img/icon/live_broadcast_icon.png")
p 当前播放
li
img(
@click="PlayVideo",
:src="status ? '/static/img/radio_up.png' : '/static/img/radio_stop.png'"
)
li(@click="showMenu")
img(src="/static/img/icon/program_list_icon.png")
p 节目列表
van-popup(v-model="isShow", position="bottom", :style="{ height: '70%' }")
.menu_title 节目单
ul.menu_list
li(v-for="(item,index) in menuList" :key="index")
.left
.text
span {{ item.menu_name }}
.name {{ item.nick_name }}
img(src="/static/img/act-list.gif")
span {{ item.start_time }} - {{ item.end_time }}
</template>
<script>
export default {
data() {
return {
isShow: false, // 控制节目单的显示隐藏,true显示,false 隐藏
active: 0,
status: true, // true 未播放,false 播放中
radio: {},
playUrl: [],
menuList: [] // 节目列表
};
},
created() {
this.GetRadio();
},
methods: {
async GetRadio() {
this.radio = await this.$http.index.radio();
this.playUrl = [
{
type: "application/x-mpegURL",
src: this.radio.play_url,
},
];
},
async showMenu() {
this.menuList = await this.$http.index.getMenuList();
console.log( this.menuList);
this.isShow = !this.isShow;
},
PlayVideo() {
// console.log(this.$refs.video);
if (this.status) {
this.$refs.video.onPlayerPlay();
} else {
this.$refs.video.onPlayerPause();
}
this.status = !this.status;
},
},
};
</script>
<style lang="less" scoped>
.radio {
display: flex;
flex-direction: column;
align-items: center;
.title {
font-size: 0.48rem;
color: #000000;
margin-bottom: 0.84rem;
margin-top: 1.347rem;
}
.music_img {
width: 7.467rem;
height: 7.467rem;
margin-bottom: 0.67rem;
}
.music_gif {
width: 7.467rem;
height: 1.2rem;
margin-bottom: 0.733rem;
}
.action {
display: flex;
width: 7.48rem;
justify-content: space-between;
align-items: center;
li {
text-align: center;
img {
width: 0.52rem;
height: 0.52rem;
margin-bottom: 0.173ren;
}
p {
font-size: 0.267rem;
color: #999999;
}
&:nth-child(2) {
img {
width: 1.6rem;
height: 1.6rem;
}
}
}
}
.menu_title {
font-size: 0.37rem;
font-weight: 500;
color: #000;
text-align: center;
border-bottom: 0.01rem solid #ccc;
line-height: 1.6rem;
}
.menu_list {
width: 100%;
li {
display: flex;
align-items: center;
padding: 0 0.39rem;
border-bottom: 0.01rem solid #ccc;
height: 1.6rem;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.text {
text-align: center;
span {
font-size: 0.37rem;
color: #000;
}
.name {
margin-top: 0.2rem;
font-size: 0.32rem;
color: #999;
}
}
img {
width: 0.37rem;
height: 0.39rem;
margin-left: 0.57rem;
}
}
span {
font-size: 0.37rem;
color: #000;
}
}
}
}
</style>

View File

@@ -0,0 +1,109 @@
<template lang="pug">
.recommend
.recommend_title 相关推荐
ul.recommend_content( v-if="type == 0")
router-link(v-for="v,i in this.res" tag="li" :key="i" :to="{ path: '/NewsDetail',query:{id:v.id}}")
.recommend_left
p {{v.title }}
span {{v.update_time}}
img.recommend_right( :src='v.icon')
ul.recommend_content( v-if="type == 1" class="type1_f")
router-link(tag="li" class="type1" v-for="v,i in res" this.tag="li" :key="i" :to="{ path: '/Sevents',query:{id:v.id} }")
img(:src="v.cover")
p {{v.title}}
</template>
<script>
export default {
name: 'recommend',
props: {
type: {
type: Number,
default: 1
}, //type为0时是竖排样式 type为1时是横向滑动样式
res: {
type: Array,
default: () =>{[]}
}
},
created() {
},
data() {
return {
}
},
methods: {
},
};
</script>
<style lang="less" scoped>
.type1_f::-webkit-scrollbar{
display: none;
}
.recommend{
background-color: #fff;
.recommend_title{
display: flex;
align-items: center;
font-size: 0.427rem;
color: #333333;
height: 1.347rem;
padding: 0 0.32rem;
}
.type1_f {
display: flex;
overflow: auto;
padding-left: 0.32rem;
.type1 {
flex-direction:column;
margin-right: 0.133rem;
width: 3.635rem;
img{
width: 3.653rem;
height: 2.08rem;
margin-bottom: 0.32rem;
}
p {
width: 3.413rem;
height: 0.947rem;
font-size: 0.373rem;
overflow: hidden;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
}
}
.recommend_content{
li{
display: flex;
justify-content: space-between;
.recommend_left{
padding-top: 0.613rem;
padding-bottom: 0.587rem;
margin-left: 0.32rem;
p{
font-size: 0.427rem;
color: #333333;
margin-bottom: 0.573rem;
}
span{
font-size: 0.32rem;
color: #999999;
}
}
.recommend_right{
margin-top: 0.427rem;
width: 3.013rem;
height: 2.267rem;
margin-right: 0.32rem;
}
}
}
}
</style>

View File

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

View File

@@ -0,0 +1,82 @@
<template lang="pug">
van-list(v-model='loading',
:finished='finished',
:immediate-check="false",
finished-text='没有更多了',
@load='onLoad')
ul.tv-list
router-link(v-for="v,i in list" tag="li" :key="i" :to="{ path: '/tvinfo', query: { id: v.id, url: v.play_url } }")
span(:class="v.id == $route.query.id ? 'active' : '' ") {{ v.title }}
img(src="/static/img/act-list.gif" v-if="v.id == $route.query.id && show")
</template>
<script>
export default {
name: 'tv-list',
props: {
show: {
type: Boolean,
default: false
}
},
data() {
return {
active: 0,
loading: false,
finished: false,
page: 1,
tvObj: {},
list: []
};
},
created() {
this.channelList()
},
methods: {
async channelList() {
var res = await this.$http.index.channelList({
page: this.page,
count: 15
});
res.last_page = 2
this.list = [ ...this.list, ...res.data ];
this.tvObj = res;
this.loading = false;
},
onLoad() {
if (this.page >= this.tvObj.last_page) {
this.finished = true;
} else {
this.page += 1;
this.channelList()
}
console.log("滚动到底部");
}
},
};
</script>
<style lang="less" scoped>
.tv-list {
background-color: #ffffff;
li {
height: 1.6rem;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.547rem;
padding-right: 0.36rem;
span {
font-size: 0.427rem;
color: #333333;
}
.active {
color: #d0302c !important;
}
img {
width: 0.36rem;
height: 0.4rem;
}
}
}
</style>

View File

@@ -0,0 +1,48 @@
<template lang="pug">
.bottom-t
span 打开APP查看全部评论
</template>
<script>
export default {
name: 'bottom-t',
// props: {
// show: {
// type: Boolean,
// default: false
// }
// },
data() {
return {
}
},
methods: {
},
};
</script>
<style lang="less" scoped>
.bottom-t{
position: fixed;
width: 9.36rem;
height: 1.173rem;
border-radius: 0.107rem;
border: solid 0.027rem #d0302c;
bottom: 0.533rem;
display: flex;
align-items: center;
justify-content: center;
left: 0.307rem;
background-color: #fff;
span{
font-size: 0.373rem !important;
color: #d0302c !important;
font-size: 0.373rem;
color: #d0302c;
}
}
</style>

View File

@@ -0,0 +1,120 @@
<template lang="pug">
.comments_list
p.title 全部评论
.big(v-if="res.length != 0 ")
.one( v-for="v,i in res" :key="i")
.top
.left
img(:src='v.image', alt='')
.name
p {{v.nick_name}}
span {{v.create_time}}
.right
img(src='/static/img/icon/give_thumbs-up.png', alt='')
span {{v.praise_count}}
.text {{v.content}}
.two(v-else)
img.two_img(src="/static/img/hm_bg_img.png", alt='')
.two_text(:style="{fontSize:'0.4rem'}") 快来发表你的评论吧
</template>
<script>
export default {
name: 'comments',
props: {
res: {
type: Array,
default: () =>{[]}
}
},
created() {
},
data() {
return {
}
},
methods: {
},
};
</script>
<style lang="less" scoped>
.comments_list{
margin-bottom: 2rem;
.title{
margin-left: 0.32rem;
height: 1.347rem;
background-color: #ffffff;
font-size: 0.427rem !important;
color: #333333;
bottom:1.093rem;
display: flex;
align-items: center;
}
.one{
margin:0 0.32rem 0.5rem 0.307rem;
.top{
height: 1.747rem;
background-color: #ffffff;
display: flex;
justify-content: space-between;
padding-left: 0.307rem;
padding-right: 0.32rem;
align-items: center;
.left{
display: flex;
align-items: center;
img{
width: 0.933rem;
height: 0.947rem;
}
.name{
margin-left:0.27rem;
p{
font-size: 0.373rem;
color: #333333;
padding-bottom: 0.1rem;
}
span{
font-size: 0.267rem;
color: #999999;
}
}
}
.right{
img{
width: 0.347rem;
height: 0.36rem;
padding-right: 0.27rem;
}
span{
font-size: 0.32rem;
color: #999999;
}
}
}
.text{
width: 7.973rem;
font-size: 0.28rem;
line-height: 0.42rem;
color: #333333;
margin-left: 1.507rem;
}
}
.two{
display: flex;
flex-direction: column;
align-items: center;
.two_img{
width: 5.1rem;
height: 5.1rem;
}
.two_text{
top:0.68rem;
font-size:0.373rem;
color: #999999;
}
}
}
</style>

View File

@@ -0,0 +1,66 @@
<template lang="pug">
.nav
.left
img(class="navlogo" src="/static/img/icon/gw_img_logo.png")
img(class="navicon" src="/static/img/icon/logo_text_icon.png")
.right 打开
</template>
<script>
export default {
name: 'navt',
data () {
return {
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.nav {
width: 100%;
height: 1.3rem;
background-color: #000000;
opacity: 0.7;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
left: 0;
z-index: 100;
.left {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 0.3rem;
.navlogo {
width: 0.9rem;
height: 0.9rem;
margin-right: 0.3rem;
}
.navicon {
width: 1.8rem;
height: 0.6rem;
}
}
.right {
width: 1.9rem;
height: 0.7rem;
background-color: #d0302c;
border-radius: 0.1rem;
font-size: 0.3rem;
line-height: 0.7rem;
color: #ffffff;
text-align: center;
margin-right: 0.5333rem;
}
}
</style>

View File

@@ -0,0 +1,59 @@
<template lang="pug">
video-player.video-player-box(
ref="videoPlayer",
v-show="isShow"
:options="playerOptions",
:playsinline="true",
@play="onPlayerPlay()",
)
</template>
<script>
export default {
name: 'vue-video',
props: {
isShow: {
type: Boolean,
default: true,
},
url: {
type: Array,
default: () => []
}
},
data() {
return {
playerOptions: {
language: "en",
aspectRatio: "16:9",
playbackRates: [0.7, 1.0, 1.5, 2.0],
sources: this.url,
},
};
},
mounted() {
},
beforeDestroy() {
console.log("====== this.player ", this.player);
},
computed: {
player() {
return this.$refs.videoPlayer.player;
},
},
methods: {
onPlayerPlay() {
this.player && this.player.play();
},
onPlayerPause() {
this.player && this.player.pause();
},
},
};
</script>
<style lang="less" scoped>
.video-player-box {
width: 100%;
}
</style>

View File

@@ -0,0 +1,57 @@
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";
import { Swipe, SwipeItem } from 'vant';
import http from "@/service";
import utils from "@/utils";
import video from "@/components/video";
import TvList from "@/components/TvList";
import bottom from "@/components/bottom";
import comment from "@/components/comment";
import navt from "@/components/navt";
import recommend from "@/components/RelevantRecommend";
export default {
devBaseUrl: 'https://zbhapi.ahtv.cn/h5', // 开发阶段
testBaseUrl: '', // 测试阶段
prodBaseUrl: '', // 正式阶段
apiList: {
radio: '/radio', // 包河radio
channelList: '/channelList', // 包河tv
liveList: '/liveList', // 溶媒直播
getMenuList: '/getMenuList', // 节目列表
videoDetail:'/videoDetail',
getMenuList: '/getMenuList' ,// 节目列表
newsDetail: '/newsDetail',//新闻资讯
interactDetail: '/interactDetail' //帖子详情
},
VuePlugins: [ Vant, VueVideoPlayer ],
VuePlugins: [ Vant, VueVideoPlayer,Swipe,SwipeItem],
VueComponent: [video, TvList,recommend,bottom,navt,comment],
NotVuePlugins: [
{ n: '$http', v: http },
{ n: '$utils', v: utils },
],
CheckBaseUrl: function () {
switch (process.env.NODE_ENV) {
case "development":
return this.devBaseUrl;
break;
case "test":
return this.testBaseUrl;
break;
case "production":
return this.prodBaseUrl;
break;
default:
break;
}
}
}

View File

@@ -0,0 +1,77 @@
import axios from "axios";
import config from "@/config"
import { Toast } from 'vant';
export default class Http {
constructor() {
this.instance = axios.create({
baseURL: config.CheckBaseUrl(),
timeout: 10000,
headers: {
"Content-Type": "application/json; charset=utf-8"
}
});
this.interceptors();
}
async get(params) {
return await this.instance.get(params.url, {
params: params.data,
headers: params.headers
})
}
async post(params) {
return await this.instance.post(params.url, params.data, {
headers: params.headers
})
}
interceptors() {
// 添加请求拦截器
this.instance.interceptors.request.use(function (config) {
Toast.loading({
duration: 0,
message: '加载中...'
})
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
// 添加响应拦截器
this.instance.interceptors.response.use(function (response) {
Toast.clear()
if (response.config.url == "/channelList") {
return response.data
} else {
switch (response.data.resultCode) {
case "000":
return response.data.data
break;
case 404:
Toast.fail({
duration: 3000,
message: response.data.message
})
throw new Error(response.data.message);
break;
default:
break;
}
}
return response.data;
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
}
}

View File

@@ -0,0 +1,26 @@
import "amfe-flexible";
import Vue from 'vue'
import App from './App'
import router from './router'
import config from "@/config";
// 初始化vue插件
config.VuePlugins.forEach(v => Vue.use(v));
// 挂载自定义方法到vue实例上,实现全局访问
config.NotVuePlugins.forEach(v => Vue.prototype[v["n"]] = v["v"]);
// 注册全局vue组件
config.VueComponent.forEach(v => Vue.component(v.name, v))
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,54 @@
<template lang="pug">
.home
van-tabs(
@change="tabChange",
v-model="active",
:swipeable="true",
line-width="0.32rem",
line-height="0.067rem",
:ticky="true"
)
van-tab(title="包河radio")
RadioComponents
van-tab(title="包河TV")
TvComponents
van-tab(title="融媒直播")
LiveComponents
</template>
<script>
import RadioComponents from "@/components/Radio";
import TvComponents from "@/components/Tv";
import LiveComponents from "@/components/Live";
export default {
created() {
this.active = Number(this.$route.query.type)
},
data() {
return {
active: 0,
};
},
methods: {
tabChange(index) {
this.$router.push({
query: {
type: index,
},
});
},
},
components: {
RadioComponents,
TvComponents,
LiveComponents,
},
};
</script>
<style lang="less" scoped>
@import "~@page/Home";
</style>

View File

@@ -0,0 +1,43 @@
<template lang="pug">
.tv-info
vue-video(:url="playUrl", v-if="playUrl.length != 0")
van-tabs(v-model="active")
van-tab(title="频道")
tv-list(:show="true")
van-tab(title="评论") 内容 2
</template>
<script>
export default {
data() {
return {
active: 0,
playUrl: [],
};
},
watch: {
$route: function (to, from) {
console.log("我监听到页面的地址和参数方式了改变");
this.setVideoUrl();
},
},
created() {
this.setVideoUrl();
console.log(this.playUrl);
},
methods: {
setVideoUrl() {
this.playUrl = [
{
type: "video/x-flv",
src: this.$route.query.url,
},
];
},
},
};
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,111 @@
<template lang="pug">
div
navt
.content(v-if="NewsDetail.length !=0")
.top
h2 {{NewsDetail.detail.title}}
span {{NewsDetail.detail.publish_time}}
.textlist(v-html="NewsDetail.detail.content" :class ="active ? 'active' : ''")
.bow(@click="onClick" v-show ="!active")
img(src="/static/img/select-down.png")
.bowtext 打开APP阅读全文
recommend(:type="0",:res='NewsDetail.recommend')
comments(:res='NewsDetail.comment')
bottom-t
</template>
<script>
export default {
data () {
return {
type:0,
active:false,
NewsDetail:{},
res:[]
}
},
created() {
this.newsDetail();
},
methods: {
async newsDetail() {
this.NewsDetail = await this.$http.index.newsDetail({id: this.$route.query.id,});
console.log(this.NewsDetail);
},
onClick(){
this.active = !this.active;
},
},
}
</script>
<style lang="less">
.textlist p {
font-size: 0.4rem !important;
color: #000000;
}
</style>
<style lang="less" scoped>
.content{
margin-top: 1.3rem;
padding: 0.3rem 0.3rem 0.3rem 0.3rem;
overflow-y: scroll;
position: relative;
overflow: hidden;
.top{
h2{
width: 9.4rem;
height: 1.2rem;
font-size: 0.5rem;
line-height: 0.7rem;
color: #333333;
}
span{
width: 5.3rem;
height: 0.3rem;
font-size: 0.3rem;
color: #999999;
margin-right: 0.2rem;
}
}
.textlist {
font-size: 0.4rem !important;
color: #000000;
height: 19rem;
margin-top: 0.3rem;
}
.active{
height: auto;
}
.bow{
text-align: center;
position: absolute;
bottom: 0;
background-image: linear-gradient(rgb(255, 255, 255), rgba(255, 255, 255, 0.144));
img{
width: 0.7rem;
height: 0.5rem;
margin-bottom: 0.4rem;
margin-top: 0.4rem;
}
.bowtext{
width: 9.4rem;
height: 1.2rem;
background-color: #d0302c;
border-radius: 0.1rem;
font-size: 0.3rem;
line-height: 1.2rem;
color: #ffffff;
}
}
}
</style>

View File

@@ -0,0 +1,110 @@
<template lang="pug">
div
navt
.content
van-swipe(
@change="onChange",
:loop="false",
:width="375",
:height="503.5",
v-if="res.detail"
)
van-swipe-item( v-for="(v, i) in res.detail.image", :key="i")
img(:src="v")
template(#indicator="")
.custom-indicator {{ current + 1 }}/{{ img_len }}
.Posts(v-if="res.detail")
.Posts_title
img(:src="res.detail.image_url")
.user
.user_name {{res.detail.nick_name}}
.time {{res.detail.create_time}}
.Posts_content {{res.detail.content}}
comments(:res="res.comment")
bottom-t
</template>
<script>
export default {
data() {
return {
current: 0,
res: [1],
img_len: 0,
};
},
created() {
this.interactDetail();
},
watch: {
res: function () {
this.res != [1] ? (this.img_len = this.res.detail.image.length) : "";
},
},
methods: {
async interactDetail() {
this.res = await this.$http.index.interactDetail({
id: this.$route.query.id,
});
},
onChange(index) {
this.current = index;
},
},
};
</script>
<style lang="less" scoped>
.custom-indicator {
position: absolute;
right: 0.533rem;
bottom: 0.627rem;
padding: 0.147rem 0.373rem ;
font-size: 0.373rem;
background: rgba(0, 0, 0, 0.57);
border-radius: .5rem;
}
.content {
margin-top: 1.333rem;
margin-bottom: 2.333rem;
}
.van-swipe-item {
img {
width: 100%;
}
}
.Posts {
padding: 0 0.333rem;
border-bottom: 0.213rem solid #f3f3f3;
.Posts_title {
height: 1.45rem;
display: flex;
align-items: center;
img {
width: 1rem;
height: 1rem;
border-radius: 50%;
margin-right: 0.213rem;
}
.user {
.user_name {
font-size: 0.373rem;
color: #333333;
}
.time {
margin-top: 0.2rem;
font-size: 0.32rem;
color: #999999;
}
}
}
.Posts_content {
font-size: 0.427rem;
line-height: 0.667rem;
color: #333333;
margin-bottom: 0.2rem;
}
}
</style>

View File

@@ -0,0 +1,138 @@
<template lang="pug">
.sevents
navt
.content(v-if="Object.keys(res).length !=0")
vue-video(:url="playUrl", v-if="playUrl.length != 0")
.text
.name {{ res.detail.title }}
p {{ res.detail.create_time }}
.bot
.left
.coll
img(src="/static/img/icon/collection-icon.png", alt="")
span.bot_text 收藏
.numb
img(src="/static/img/icon/give_thumbs-up.png", alt="")
span.num {{ res.detail.like_count }}
.right(@click="Getlist")
span.rights 简介
img.direction(
:src="isShow ? '/static/img/icon/open-just.png' : '/static/img/icon/open-close.png'",
alt=""
)
.act(v-show="isShow") {{ res.detail.des }}
recommend(:type="1", :res="res.recommend")
comments(:res="res.comment")
bottom-t
</template>
<script>
export default {
data() {
return {
type: 1,
res:{},
isShow: false,
playUrl: [],
};
},
watch: {
$route: function (to, from) {
console.log("我监听到页面的地址和参数方式了改变");
this.videoDetail();
},
},
created() {
this.videoDetail();
},
methods: {
async videoDetail() {
this.res = await this.$http.index.videoDetail({
id: this.$route.query.id,
});
this.playUrl = [
{
type: "video/mp4",
src: this.res.detail.play_url,
},
];
},
Getlist() {
this.isShow = !this.isShow;
},
},
};
</script>
<style lang="less" scoped>
.sevents {
.video-player-box {
margin-top: 1.2rem;
}
.text {
.name {
font-size: 0.48rem !important;
color: #333333 !important;
width: 9rem;
margin:0.66rem 0 0.2rem 0.37rem;
}
p {
font-size: 0.307rem !important;
color: #999999 !important;
padding: 0 0 0.36rem 0.306rem;
box-sizing: border-box;
}
.bot {
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding: 0 0.307rem 0 0.307rem;
.left {
display: flex;
.coll {
margin-right: 0.8rem;
img {
width: 0.347rem;
height: 0.347rem;
padding-right: 0.3rem;
}
.bot_text {
font-size: 0.32rem ;
color: #999999 ;
}
}
.numb {
img {
width: 0.347rem;
height: 0.36rem;
padding-right: 0.3rem;
}
.num {
font-size: 0.32rem;
color: #999999 ;
}
}
}
.right {
.rights {
font-size: 0.32rem ;
color: #999999 ;
}
img {
width: 0.227rem;
height: 0.133rem;
padding-left: 0.3rem;
}
}
}
.act {
margin: 0.387rem 0.38rem 0 0.32rem;
font-size: 0.373rem ;
color: #999999 ;
}
}
}
</style>

View File

@@ -0,0 +1,34 @@
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'Home',
component: () => import(/* webpackChunkName: "HelloWorld" */ '@/page/home/Home')
},
{
path: '/tvinfo',
name: 'TvInfo',
component: () => import(/* webpackChunkName: "about" */ '@/page/home/TvInfo')
},
{
path: '/PostsInfo',
name: 'PostsInfo',
component: () => import(/* webpackChunkName: "about" */ '@/page/PostsInfo/PostsInfo')
},
{
path: '/sevents',
name: 'Sevents',
component: () => import(/* webpackChunkName: "about" */ '@/page/Sevents/Sevents')
},
{
path: '/NewsDetail',
name: 'NewsDetail',
component: () => import(/* webpackChunkName: "about" */ '@/page/NewsDetail/NewsDetail')
}
]
})

View File

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

View File

@@ -0,0 +1,9 @@
// 统一导出
import indexService from "@/service/indexService";
import carService from "@/service/carService";
export default {
index: new indexService(),
car: new carService(),
}

View File

@@ -0,0 +1,53 @@
import Http from "@/http";
import config from "@/config"
export default class indexService {
async radio (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.radio,
data: data,
headers: headers
})
}
async getMenuList (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.getMenuList,
data: data,
headers: headers
})
}
async channelList (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.channelList,
data: data,
headers: headers
})
}
async videoDetail (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.videoDetail,
data: data,
headers: headers
})
}
async newsDetail (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.newsDetail,
data: data,
headers: headers
})
}
async interactDetail (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.interactDetail,
data: data,
headers: headers
})
}
}

View File

@@ -0,0 +1,10 @@
class utils {
test() {
console.log("工具函数");
}
}
export default new utils();

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,100 @@
spa 单页web应用
hash
history
build 项目打包 和 项目的webpack配置
config 脚手架的自定义配置
dist 打包后的文件,部署到服务器上时候用的
node_modules 项目的插件依赖
src 项目开发的核心源码
assets 存放静态资源,需要 webpack 进行特殊处理才可以使用的静态资源(体积较小)
css
components 组件
router vue-router 的配置文件
App 所有页面的最顶级的父组件
main.js 我们项目的启动文件(入口文件)
static 存放静态资源例如:图片,视频,字体这些 体积较大,不常修改
.babelrc babel 的配置文件 进行代码降级的,把高版本的js代码转化为低版本的js
.editorconfig 规范编辑器使用统一的代码格式
.eslintignore eslint 的忽略文件
.eslintrc eslint 的配置文件
.gitignore git的忽略文件
.postcssrc.js postcss 的配置文件
index.html
README.md 给仓库看的,项目的帮助手册
md markdown
webpack 项目的打包工具
ajax
vue-resource
axios
插件
vue 插件
非vue插件
css 预处理器
less sass scss stylus
1.mp4 100MB 10分钟
hls 视频切片
ffmpeg
10 个文件
1个文件 10MB
0.ts
1.ts
3.ts
...
9.ts
ccc.m3u8
作业:
页面
新闻资讯
PSD:1,2
接口:https://zbhapi.ahtv.cn/h5 /newsDetail ?id=575
负责人:陶瑞
视频点播
PSD:3,4
接口:https://zbhapi.ahtv.cn/h5 /videoDetail ?id=147
负责人:计梦梦
帖子详情
PSD:7
接口:https://zbhapi.ahtv.cn/h5 /interactDetail ?id=219
负责人:王安民
组件
1:顶部的头部组件 定位 陶瑞
2:相关推荐 组件 两种样式 王安民
3:全部评论 计梦梦
4:打开APP查看全部评论 固定在底部的位置 计梦梦