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,30 @@
// 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 @@
// 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": {},
'postcss-pxtorem': {
rootValue: 37.5,
propList: ['*']
}
}
}

View File

@@ -0,0 +1,21 @@
# vuecli2
> 这是vue-cli2的脚手架学习
## 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)
}
}

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,98 @@
'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'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@less': resolve('src/assets/less'),
'@page': resolve('src/assets/less/page'),
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.less$/,
loader: "style-loader!css-loader!less-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,84 @@
'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: {
'/api': {
target:'https://zbhapi.ahtv.cn/h5', // 代理目标
changeOrigin:true, //是否跨域
pathRewrite:{
'^/api': '/' //重写路径
}
},
},
// 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 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>vuecli2</title><link href=./static/css/app.27a212180d8c40976dd83623298c6a1b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.24770643d53cb88507c7.js></script><script type=text/javascript src=./static/js/vendor.9b3f155ab38b9b6563ef.js></script><script type=text/javascript src=./static/js/app.6e6788fd2faa91301a54.js></script></body></html>

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: 652 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: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1 @@
webpackJsonp([0],{"1UEa":function(t,e){},"5VHs":function(t,e){},H9dg:function(t,e){},gR7s:function(t,e){},"lyB/":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"Radio"},[a("div",{staticClass:"title"},[t._v("包河制作")]),t._v(" "),a("img",{staticClass:"radio_img",attrs:{src:"/static/img/radio_img.jpg",alt:""}}),t._v(" "),a("img",{staticClass:"audio_img",attrs:{src:"",alt:""}}),t._v(" "),a("div",{staticClass:"action"},[a("div",{staticClass:"action_item"},[a("img",{attrs:{src:"",alt:""}}),t._v(" "),a("div")]),t._v(" "),a("div",{staticClass:"action_item"},[a("img",{attrs:{src:"",alt:""}})]),t._v(" "),a("div",{staticClass:"action_item"},[a("img",{attrs:{src:"",alt:""}}),t._v(" "),a("div")])])])}]};var n={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"Tv"},[this._v("Tv")])},staticRenderFns:[]};var s={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"Live"},[this._v("Live")])},staticRenderFns:[]};var r={data:function(){return{active:0}},created:function(){},methods:{},components:{RadioComponents:a("C7Lr")({name:"Radio",data:function(){return{}},methods:{}},i,!1,function(t){a("5VHs")},"data-v-7079fbf0",null).exports,TvComponents:a("C7Lr")({name:"Tv",data:function(){return{}},methods:{}},n,!1,function(t){a("H9dg")},"data-v-3569e6ae",null).exports,LiveComponents:a("C7Lr")({name:"Live",data:function(){return{}},methods:{}},s,!1,function(t){a("gR7s")},"data-v-678fb21a",null).exports}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"home"},[a("van-tabs",{attrs:{"line-width":"0.32rem",swipeable:"",border:"","title-inactive-color":"#999","title-active-color":"#000"},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[a("van-tab",{attrs:{title:"包河Radio"}},[a("RadioComponents")],1),t._v(" "),a("van-tab",{attrs:{title:"包河Tv"}},[a("TvComponents")],1),t._v(" "),a("van-tab",{attrs:{title:"融媒直播"}},[a("LiveComponents")],1)],1)],1)},staticRenderFns:[]};var o=a("C7Lr")(r,c,!1,function(t){a("1UEa")},"data-v-3ee4996f",null);e.default=o.exports}});

View File

@@ -0,0 +1 @@
webpackJsonp([1],{"9+7K":function(t,e){},wp6V:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"about"},[this._v("\n "+this._s(this.title)+"\n")])},staticRenderFns:[]};var s=n("C7Lr")({data:function(){return{title:"我的"}}},i,!1,function(t){n("9+7K")},"data-v-3bf42983",null);e.default=s.exports}});

View File

@@ -0,0 +1 @@
webpackJsonp([3],{NHnr:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});e("/JRm");var r=e("yf3K"),a={render:function(){var t=this.$createElement,n=this._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]};var u=e("C7Lr")({name:"App"},a,!1,function(t){e("t5PT")},null,null).exports,s=e("ddSS");r.a.use(s.a);var i=new s.a({routes:[{path:"/",name:"home",component:function(){return e.e(0).then(e.bind(null,"lyB/"))}},{path:"/about",name:"about",component:function(){return e.e(1).then(e.bind(null,"wp6V"))}}]}),o=e("BdEu"),c=(e("TdPg"),e("lC5x")),p=e.n(c),l=e("J0Oq"),f=e.n(l),h=e("AA3o"),d=e.n(h),v=e("xSur"),m=e.n(v),g=e("rVsN"),w=e.n(g),x=e("DoAe"),y=e.n(x),b=function(){function t(){d()(this,t),this.instance=y.a.create({baseURL:U.checkBaseUrl(),timeout:3e3,headers:{}}),this.interceptors()}return m()(t,[{key:"get",value:function(){var t=f()(p.a.mark(function t(n){return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.get(n.url,{params:n.data});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(n){return t.apply(this,arguments)}}()},{key:"post",value:function(){var t=f()(p.a.mark(function t(n){return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.post(n.url,n.data);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(n){return t.apply(this,arguments)}}()},{key:"interceptors",value:function(){this.instance.interceptors.request.use(function(t){return o.a.loading({message:"加载中...",duration:0}),t},function(t){return w.a.reject(t)}),this.instance.interceptors.response.use(function(t){switch(o.a.clear(),t.data.status){case 200:return t.data.result;case 500:throw o.a.loading({type:"fail",message:t.data.msg}),new Error(t.data.msg)}},function(t){return w.a.reject(t)})}}]),t}(),k=function t(){d()(this,t)},P={index:new(function(){function t(){d()(this,t)}return m()(t,[{key:"home",value:function(){var t=f()(p.a.mark(function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(new b).get({url:U.urlList.index,data:n});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}()),car:new k},B=new(function(){function t(){d()(this,t)}return m()(t,[{key:"test",value:function(){console.log("test")}}]),t}()),U={devBaseUrl:"http://192.168.31.100:3000/api/json",testBaseUrl:"http://192.168.31.100:3000/api/json/test",prodBaseUrl:"http://192.168.31.100:3000/api/json/prod",urlList:{index:"/index"},vuePlugins:[o.b],noVuePlugins:[{name:"$http",value:P},{name:"$utils",value:B}],checkBaseUrl:function(){return this.prodBaseUrl}};r.a.config.productionTip=!1,U.vuePlugins.forEach(function(t){return r.a.use(t)}),U.noVuePlugins.forEach(function(t){return r.a.prototype[t.name]=t.value}),new r.a({el:"#app",router:i,components:{App:u},template:"<App/>"})},TdPg:function(t,n){},t5PT:function(t,n){}},["NHnr"]);

View File

@@ -0,0 +1 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={4:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"6721454d43c1021988a7",1:"14855a1c9bede7d50e9a"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);

File diff suppressed because one or more lines are too long

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</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,81 @@
{
"name": "vuecli2",
"version": "1.0.0",
"description": "这是vue-cli2的脚手架学习",
"author": "刘兵 <www.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.26.1",
"vant": "^2.12.47",
"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": "^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": "^5.0.0",
"postcss-url": "^7.2.1",
"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,20 @@
<template>
<div id="app">
<keep-alive >
<router-view v-if="$route.meta.keepAlive" :key="$route.fullPath"/>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :key="$route.fullPath"/>
</div>
</template>
<script>
export default {
name: "App",
};
</script>
<style lang="less">
@import "~@less/_";
</style>

View File

@@ -0,0 +1,3 @@
@import "./config/normalize";
@import "./mixins/restUI";

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,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,ul,li,p,h1,h2,h3,h4,h5,h6 {
margin: 0;
padding: 0;
list-style: none;
}
/* 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 */
text-decoration: none;
}
/**
* 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 */
outline: none;
border: none;
}
/**
* 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,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,7 @@
@import "../config/color";
@import "../mixins/mixins";
ul {
li {
color: @red;
}
}

View File

@@ -0,0 +1,113 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
<ul>
<li>
<a
href="https://vuejs.org"
target="_blank"
>
Core Docs
</a>
</li>
<li>
<a
href="https://forum.vuejs.org"
target="_blank"
>
Forum
</a>
</li>
<li>
<a
href="https://chat.vuejs.org"
target="_blank"
>
Community Chat
</a>
</li>
<li>
<a
href="https://twitter.com/vuejs"
target="_blank"
>
Twitter
</a>
</li>
<br>
<li>
<a
href="http://vuejs-templates.github.io/webpack/"
target="_blank"
>
Docs for This Template
</a>
</li>
</ul>
<h2>Ecosystem</h2>
<ul>
<li>
<a
href="http://router.vuejs.org/"
target="_blank"
>
vue-router
</a>
</li>
<li>
<a
href="http://vuex.vuejs.org/"
target="_blank"
>
vuex
</a>
</li>
<li>
<a
href="http://vue-loader.vuejs.org/"
target="_blank"
>
vue-loader
</a>
</li>
<li>
<a
href="https://github.com/vuejs/awesome-vue"
target="_blank"
>
awesome-vue
</a>
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
font-weight: normal;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

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

View File

@@ -0,0 +1,186 @@
<template>
<div class="Radio">
<div class="title">{{ radioData.title }}</div>
<v-video ref="testvideo" :show="false" :url="videoSrc"></v-video>
<img class="radio_img" :src="radioData.frontcover" alt="" />
<img
class="audio_img"
:src="isPlay ? '../../static/img/sound_spectrum.gif' : '../../static/img/sound_spectrum.png'" alt=""
/>
<div class="action">
<div class="action_item">
<img src="../../static/img/live_broadcast_icon.png" alt="" />
<div class="action_item_title">当前直播</div>
</div>
<div class="action_item" @click="playVideo">
<img
class="play"
:src="
isPlay
? '../../static/img/radio_stop.png'
: '../../static/img/radio_up.png'
"
alt=""
/>
</div>
<div class="action_item" @click="showList">
<img src="../../static/img/program_list_icon.png" alt="" />
<div class="action_item_title">节目列表</div>
</div>
</div>
<van-popup v-model="show" position="bottom" :style="{ height: '70%' }">
<div class="popup">
<div class="popup_title">节目单</div>
<div class="popup_body"></div>
<div class="popup_close"></div>
</div>
</van-popup>
</div>
</template>
<script>
export default {
name: "Radio",
data() {
return {
isPlay: false, // 控制页面的播放状态 false 未播放 true 已播放
show: false, // 控制 节目列表的显示 false 不显示 true 显示
radioData: {},
videoSrc: [],
};
},
created() {
this.getRadioList();
},
mounted() {},
methods: {
async getRadioList() {
let res = await this.$http.index.radio();
this.radioData = res;
this.videoSrc = [
{
type: "application/x-mpegURL",
src: res.play_url,
},
];
console.log(this.videoSrc);
},
playVideo() {
this.isPlay ? this.$refs.testvideo.pause() : this.$refs.testvideo.play();
this.isPlay = !this.isPlay;
},
showList() {
this.show = !this.show;
},
},
};
</script>
<style scoped lang="less">
.Radio {
padding: 0 1.267rem;
text-align: center;
.title {
font-family: PingFangSC-Bold;
font-size: 0.48rem;
color: #000000;
margin-top: 1.347rem;
margin-bottom: 0.84rem;
}
.radio_img {
width: 7.467rem;
height: 7.467rem;
margin-bottom: 0.667rem;
}
.audio_img {
height: 1.2rem;
width: 100%;
margin-bottom: 0.733rem;
}
.action {
display: flex;
justify-content: space-between;
align-items: center;
.action_item {
img {
width: 0.52rem;
height: 0.52rem;
}
.play {
width: 1.6rem;
height: 1.6rem;
}
.action_item_title {
font-family: PingFang-SC-Medium;
font-size: 0.267rem;
color: #999999;
margin-top: 0.173rem;
}
}
}
.popup {
display: flex;
flex-direction: column;
height: 100%;
.popup_title {
font-size: 0.37rem;
font-weight: 500;
color: #000;
text-align: center;
border-bottom: 0.01rem solid #ccc;
line-height: 1.6rem;
}
.popup_body {
text-align: left;
flex: 1;
overflow-y: scroll;
.popup_body_item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.39rem;
border-bottom: 0.01rem solid #ccc;
.item_left {
display: flex;
align-items: center;
.text {
p {
font-size: 0.37rem;
color: #000;
}
span {
margin-top: 0.27rem;
font-size: 0.32rem;
color: #999;
}
}
img {
width: 0.37rem;
height: 0.39rem;
margin-left: 0.57rem;
}
}
.item_text {
font-size: 0.37rem;
color: #000;
line-height: 1.6rem;
}
}
}
.popup_close {
font-size: 0.37rem;
font-weight: 500;
text-align: center;
border-top: 0.01rem solid #ccc;
line-height: 1.6rem;
}
}
}
</style>

View File

@@ -0,0 +1,26 @@
<template>
<div class="Read">打开app阅读全文</div>
</template>
<script>
export default {
name: "Read",
data() {
return {};
},
methods: {},
};
</script>
<style lang="less" scoped>
.Read {
width: 9.36rem;
text-align: center;
position: fixed;
bottom: 0;
border-radius: 0.107rem;
border: solid 0.027rem #d0302c;
left: 50%;
transform: translateX(-50%);
}
</style>

View File

@@ -0,0 +1,18 @@
<template>
<div class="Tv">
<TvListComponents :show="false"></TvListComponents>
</div>
</template>
<script>
import TvListComponents from "@/components/TvList";
export default {
name: "Tv",
components: {
TvListComponents
},
};
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,66 @@
<template>
<div class="TvList">
<router-link
tag="div"
:to="{ name: 'TvInfo', query: { url: item.play_url, id: item.id } }"
class="Tv_item"
v-for="(item, index) in arr"
:key="index"
>
<span>{{ item.title }}</span>
<img v-show="show && $route.query.id == item.id" src="../../static/img/act-list.gif" alt="" />
</router-link>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: true,
},
},
data() {
return {
arr: [],
};
},
created() {
this.getChannelList();
},
methods: {
async getChannelList() {
let res = await this.$http.index.channelList({
page: 1,
count: 15,
});
this.arr = res;
console.log(res);
},
},
};
</script>
<style lang="less" scoped>
.TvList {
.Tv_item {
display: flex;
align-items: center;
justify-content: space-between;
height: 1.6rem;
padding-left: 0.547rem;
padding-right: 0.36rem;
span {
font-size: 0.427rem;
color: #333333;
}
img {
width: 0.36rem;
height: 0.4rem;
}
}
}
</style>

View File

@@ -0,0 +1,65 @@
<template>
<div class="Video">
<video-player v-show="show" class="video-player-box"
ref="videoPlayer"
:options="playerOptions"
:playsinline="true"
customEventName="customstatechangedeventname">
</video-player>
</div>
</template>
<script>
export default {
name: 'Video',
props: {
url: {
type: Array ,
default: () => []
},
show: {
type: Boolean,
default: true
}
},
data () {
return {
playerOptions: {
muted: false,
language: 'en',
aspectRatio: "16:9", //视频的宽高比
playbackRates: [0.7, 1.0, 1.5, 2.0, 3.0],
sources: this.url,
poster: "/static/images/author.jpg",
}
}
},
watch: {
url(newVal) {
this.playerOptions.sources = newVal;
}
},
mounted(){
},
computed: {
player() {
return this.$refs.videoPlayer.player
}
},
methods: {
play() {
this.player.play()
},
pause() {
this.player.pause()
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@@ -0,0 +1,135 @@
<template>
<div class="comment">
<div class="comment_title">全部评论</div>
<ul v-if="list.length != 0">
<li v-for="(item, index) in data" :key="index">
<img
class="avter"
src="https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp"
alt=""
/>
<div class="comment_info">
<div class="comment_text">
<div class="comment_name">
<div class="name">{{ item.name }}</div>
<div class="zan">
<img class="zan_img" src="../../static/img/zan.png" alt="" />
<span>{{ item.num }}</span>
</div>
</div>
<div class="comment_time">{{ item.time }}</div>
<div class="comment_time">{{ item.text }}</div>
</div>
</div>
</li>
</ul>
<div class="comment_des" v-else>
<img class="leaf" src="../../static/img/zanwu.png" alt="" />
<p>快来发表你的评论吧</p>
</div>
</div>
</template>
<script>
export default {
name: "comment",
data() {
return {
list: []
};
},
props: {
data: {
type: Array,
default: () => []
},
},
methods: {},
};
</script>
<style lang="less" scoped>
.comment_title {
height: 51px;
font-size: 16px;
display: flex;
color: #333333;
align-items: center;
padding: 0 12px;
}
.comment ul {
padding: 14px 12px;
}
.comment ul li {
display: flex;
margin-bottom: 35px;
}
.comment li .avter {
width: 35px;
height: 36px;
margin-right: 10px;
border-radius: 100%;
}
.comment_text .comment_name {
display: flex;
justify-content: space-between;
align-items: center;
}
.comment_text .comment_name .name {
font-size: 14px;
color: #333333;
margin-bottom: 5px;
}
.comment_text .comment_name .zan {
display: flex;
align-items: center;
}
.comment_text .comment_name .zan img {
width: 13px;
height: 14px;
margin-right: 5px;
}
.comment_text .comment_name .zan span {
font-size: 12px;
color: #999999;
}
.comment_info .comment_text .comment_time {
font-size: 10px;
color: #999999;
margin-bottom: 19px;
}
.comment_des {
font-size: 14px;
color: #333333;
width: 100%;
display: flex;
align-content: center;
justify-content: center;
flex-direction: column;
align-items: center;
}
.comment .leaf {
width: 5.56rem;
height: 4.653rem;
margin-top: 1.093rem;
}
p {
font-size: 0.373rem;
color: #999999;
margin-top: 0.68rem;
}
</style>

View File

@@ -0,0 +1,53 @@
<template>
<div class="headers">
<div class="headers_item">
<img src="../../static/img/zbh_h5_img_logo.png" alt="" />
<div class="open">打开</div>
</div>
</div>
</template>
<script>
export default {
name: "headers",
data() {
return {};
},
methods: {},
};
</script>
<style lang="less" scoped>
.headers {
.headers_item {
height: 1.333rem;
background-color: rgb(0 0 0 / 70%);
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.32rem;
padding-right: 0.533rem;
position: fixed;
width: 100%;
top: 0;
left: 0;
box-sizing: border-box;
z-index: 999;
img {
height: 0.867rem;
}
.open {
width: 1.44rem;
height: 0.52rem;
background-color: #d0302c;
border-radius: 0.08rem;
font-size: 0.24rem;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
}
}
</style>

View File

@@ -0,0 +1,135 @@
<template>
<div class="recommend" ref="qwer">
<div class="title">相关推荐</div>
<van-tabs>
<ul class="text" v-if="them != 1">
<li @click="qqq" v-for="(item, index) in data" :key="index">
<div class="photo">
<img class="img" :src="item.cover" alt="" />
<span>03:07</span>
</div>
<span>{{ item.title }}</span>
</li>
</ul>
<ul class="list" v-else>
<li v-for="(item, index) in data" :key="index">
<div class="left_text">
<span>{{ item.title }}</span>
<p>2019-10-6</p>
</div>
<img :src="item.cover" alt="" />
</li>
</ul>
</van-tabs>
</div>
</template>
<script>
export default {
name: "recommend",
props: {
data: {
type: Array,
default: () => [],
},
them: {
type: Number,
default: 2,
},
},
data() {
return {
id: 147,
};
},
created() {
console.log(this.data);
},
methods:{
qqq(){
console.log(this.$refs.qwer);
}
},
};
</script>
// <style scoped lang="less">
.recommend {
.title {
font-size: 0.427rem;
color: #333333;
margin-top: 0.32rem;
margin-bottom: 0.37rem;
margin-left: 0.32rem;
}
.text {
display: flex;
overflow-x: scroll;
margin-left: 0.24rem;
margin-bottom: 0.4rem;
height: 100%;
li {
padding-right: 0.1rem;
.photo {
position: relative;
.img {
width: 3.653rem;
height: 2.08rem;
border-radius: 0.04rem;
}
span {
font-size: 0.22rem;
color: #ffffff;
position: absolute;
right: 0;
bottom: 0;
}
}
span {
font-size: 0.28rem;
color: #d0302c;
}
}
}
}
.recommend {
.title {
font-size: 0.427rem;
color: #333333;
margin-top: 0.48rem;
margin-bottom: 0.453rem;
margin-left: 0.32rem;
}
.list {
li {
display: flex;
box-sizing: border-box;
border-bottom: 0.01rem solid #ccc;
margin-top: 0.613rem;
.left_text {
margin-left: 0.307rem;
margin-right: 0.413rem;
span {
font-size: 0.427rem;
color: #333333;
}
p {
font-size: 0.32rem;
color: #999999;
margin-top: 0.533rem;
margin-bottom: 0.627rem;
}
}
img {
width: 3.013rem;
height: 2.267rem;
border-radius: 0.053rem;
margin-top: 0.42rem;
margin-right: 0.32rem;
margin-bottom: 0.413rem;
}
}
}
}
</style>

View File

@@ -0,0 +1,46 @@
import Vant from 'vant'
import 'vant/lib/index.css'
import VueVideoPlayer from 'vue-video-player'
import "videojs-contrib-hls"
import 'video.js/dist/video-js.css'
import service from '../service/_'
import utils from '../utils/index'
export default {
devBaseUrl: '/api', // 开发阶段地址
testBaseUrl: 'http://192.168.31.100:3000/api/json/test', // 测试阶段地址
prodBaseUrl: 'https://zbhapi.ahtv.cn/h5', // 上线后的地址
urlList: {
radio: "/radio",
channelList: "channelList",
videoDetail:"videoDetail",
comment: '/newsDetail', //评论
channelList: "/channelList",
interactDetail: "/interactDetail",
},
vuePlugins: [ Vant, VueVideoPlayer ], // vue插件
noVuePlugins: [
{ name: '$http', value: service },
{ name: '$utils', value: 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;
}
}
}

View File

@@ -0,0 +1,66 @@
import axios from 'axios'
import config from '@/config/index'
import { Toast } from 'vant';
class Http {
constructor() {
this.instance = axios.create({
baseURL: config.checkBaseUrl(),
timeout: 3000,
headers: {}
});
this.interceptors()
}
// { url: '/index', data: { id: 1, page: 1 } }
async get(params) {
return await this.instance.get(params.url, {
params: params.data
})
}
async post(params) {
return await this.instance.post(params.url, params.data)
}
interceptors() {
// 添加请求拦截器
this.instance.interceptors.request.use(function (config) {
Toast.loading({
message: '加载中...',
duration: 0,
});
// 在发送请求之前做些什么
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
// 添加响应拦截器
this.instance.interceptors.response.use(function (response) {
Toast.clear();
switch (response.data.resultCode) {
case "000":
return response.data.data;
break;
case "500":
Toast.loading({
type: 'fail',
message: response.data.message
});
throw new Error(response.data.message)
break;
default:
break;
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
}
}
export default Http;

View File

@@ -0,0 +1,23 @@
import 'amfe-flexible'
import Vue from 'vue'
import App from './App'
import router from './router'
import config from './config/index'
import Video from './components/Video'
Vue.config.productionTip = false
Vue.component("v-video", Video);
config.vuePlugins.forEach(v => Vue.use(v));
config.noVuePlugins.forEach(v => Vue.prototype[v.name] = v.value);
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,39 @@
<template>
<div class="TvInfo">
<h2>公共头部</h2>
<v-video :url="videoSrc"></v-video>
<van-tabs v-model="active">
<van-tab title="频道">
<TvListComponents></TvListComponents>
</van-tab>
<van-tab title="评论">评论</van-tab>
</van-tabs>
</div>
</template>
<script>
import TvListComponents from "@/components/TvList";
export default {
data() {
return {
videoSrc: [],
active: 0,
};
},
created() {
this.videoSrc = [
{
type: "application/x-mpegURL",
src: this.$route.query.url,
},
];
},
methods: {},
components: {
TvListComponents,
},
};
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,18 @@
<template>
<div class="about">
{{ title }}
</div>
</template>
<script>
export default {
data () {
return {
title: '我的'
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,151 @@
<template>
<div class="demand" v-if="Object.keys(aaa).length != 0">
<div class="video">
<div>
<Video :url="url"></Video></div>
<div class="title">{{ aaa.detail.title }}</div>
<div class="time">{{ aaa.detail.create_time }}</div>
<div class="item">
<div class="shoucang">
<img src="../../static/img/sc.png" alt="" />
<p>收藏</p>
</div>
<div class="dianzan">
<img src="../../static/img/dz.png" alt="" />
<p>点赞</p>
</div>
<div class="gengduo" style="height: 10px" @click="more()">
<p>简介</p>
<img class="jiantou" src="../../static/img/sf.png" alt="" />
</div>
</div>
<div class="jieshao" v-if="show">{{ aaa.detail.des }}</div>
</div>
<div class="recommend">
<recommendComponents
:them="2"
:data="aaa.recommend"
></recommendComponents>
</div>
</div>
</template>
<script>
import recommendComponents from "@/components/recommend";
import Video from "@/components/Video";
export default {
data() {
return {
id: null,
url: [],
aaa: {},
show: false,
};
},
created() {
this.getvideoDetail();
},
methods: {
more() {
this.show = !this.show
},
bbb(){
console.log(this.url);
console.log(this.aaa);
},
async getvideoDetail() {
var res = await this.$http.index.videoDetail({
id: 147,
});
this.aaa = res
console.log(res.detail.play_url);
this.url = {
type: "video/mp4",
src: res.detail.play_url,
}
this.bbb()
},
},
components: {
recommendComponents,
Video,
},
};
</script>
<style scoped lang="less">
.title {
font-size: 0.48rem;
color: #333333;
padding-left: 0.33rem;
}
.time {
font-size: 0.307rem;
color: #999999;
padding-left: 0.33rem;
margin-top: 0.64rem;
margin-bottom: 0.4rem;
}
.item {
display: flex;
align-items: center;
box-sizing: border-box;
.shoucang {
display: flex;
align-items: center;
img {
width: 0.373rem;
height: 0.373rem;
padding-left: 0.33rem;
padding-right: 0.107rem;
}
p {
font-size: 0.32rem;
color: #b75252;
margin-right: 0.8rem;
}
}
.dianzan {
display: flex;
align-items: center;
img {
width: 0.347rem;
height: 0.36rem;
margin-right: 0.133rem;
}
p {
font-size: 0.32rem;
color: #a82929;
margin-right: 0.628rem;
}
}
.gengduo {
display: flex;
align-items: center;
margin-left: 4rem;
p {
font-size: 0.32rem;
color: #999999;
}
.jiantou {
width: 0.227rem;
height: 0.133rem;
padding-right: 0.32rem;
}
}
}
.jieshao {
font-size: 0.373rem;
color: #999999;
margin-left: 0.32rem;
}
</style>

View File

@@ -0,0 +1,48 @@
<template>
<div class="home">
<van-tabs v-model="active"
line-width="0.32rem" swipeable
border title-inactive-color="#999"
title-active-color="#000">
<van-tab title="包河Radio">
<RadioComponents></RadioComponents>
</van-tab>
<van-tab title="包河Tv">
<TvComponents></TvComponents>
</van-tab>
<van-tab title="融媒直播">
<LiveComponents></LiveComponents>
</van-tab>
</van-tabs>
</div>
</template>
<script>
import RadioComponents from "@/components/Radio";
import TvComponents from "@/components/Tv";
import LiveComponents from "@/components/Live";
export default {
data () {
return {
active: 0,
}
},
created () {
},
methods: {
},
components: {
RadioComponents,
TvComponents,
LiveComponents
}
}
</script>
<style scoped lang='less'>
@import "~@page/home.less";
</style>

View File

@@ -0,0 +1,74 @@
<template>
<div class="newinfo">
<!-- 3使用组件 -->
<headerComponents></headerComponents>
<div class="text_content">
<h2>暴降17度,合肥天气明起大反转,还有暴雨来袭!</h2>
<span>2019-10-07 08:00 浏览量238.0万</span>
<div class="nr">梦寐以求的小长假就那么过去了 上班的心情总是那么沉重</div>
</div>
<commentComponents :list="list"></commentComponents>
</div>
</template>
<script>
// 1 导入
import commentComponents from "@/components/comment";
import headerComponents from "@/components/headers";
export default {
name: "comment",
created() {
this.__commentFn();
},
data () {
return {
list: []
};
},
methods: {
async __commentFn() {
let res = await this.$http.index.commentFn({
id: 62,
});
this.list = res;
console.log(this.list);
},
},
// 2注册
components: {
commentComponents,
headerComponents,
},
};
</script>
<style lang="less" scoped>
.text_content {
margin-top: 1.653rem;
margin-left: 0.307rem;
margin-right: 0.333rem;
}
.text_content h2 {
font-family: PingFang-SC-Bold;
font-size: 0.533rem;
color: #333333;
margin-bottom: 0.38rem;
}
.text_content span {
font-family: PingFang-SC-Medium;
font-size: 0.32rem;
color: #999999;
}
.text_content .nr {
font-family: PingFang-SC-Medium;
font-size: 0.427rem;
color: #000000;
margin-top: 0.9rem;
}
</style>

View File

@@ -0,0 +1,105 @@
<template>
<div class="postInfo">
<headersComponents></headersComponents>
<van-swipe
v-if="Object.keys(imgList).length != 0"
class="my-swipe"
:autoplay="3000"
indicator-color="white"
>
<van-swipe-item
v-for="(item, index) in imgList.detail.image"
:key="index"
>
<img :src="item" alt="" />
</van-swipe-item>
</van-swipe>
<!-- 网络请求过慢,imgList里面的数为空,求出对象里面的数组用legth做判断 -->
<div v-if="Object.keys(imgList).length != 0" class="Comment">
<div class="Comment_top">
<img src="../../static/img/program_list_icon.png" alt="" />
<div class="Comment_name">
<div class="man">{{ imgList.detail.nick_name }}</div>
<div class="time">{{ imgList.detail.create_time }}</div>
</div>
</div>
<div class="Comment_bottom">{{ imgList.detail.content }}</div>
</div>
<!-- <commentcomponents :data="imgList.comment"></commentcomponents> -->
<ReadComponents></ReadComponents>
</div>
</template>
<script>
import headersComponents from "@/components/headers";
import commentComponents from "@/components/comment";
import ReadComponents from "@/components/Read";
export default {
data() {
return {
imgList: {},
};
},
created() {
this.postinfoList();
},
methods: {
async postinfoList() {
let res = await this.$http.index.interactDetail({ id: 218 });
this.imgList = res;
console.log(this.imgList);
},
},
components: {
headersComponents,
commentComponents,
ReadComponents,
},
};
</script>
<style lang="less" scoped>
.my-swipe {
margin-top: 1.333rem;
.my-swipe .van-swipe-item {
color: #fff;
text-align: center;
background-color: #39a9ed;
width: 10rem;
height: 31.52rem;
width: 100%;
}
img{
width: 100%;
}
}
.Comment {
.Comment_top {
margin-top: 0.227rem;
margin-bottom: 0.32rem;
display: flex;
img {
width: 0.96rem;
height: 0.96rem;
padding-left: 0.32rem;
padding-right: 0.213rem;
}
.Comment_name {
.man {
font-size: 0.373rem;
color: #333333;
padding-bottom: 0.2rem;
}
.time {
font-size: 0.32rem;
color: #999999;
}
}
}
.Comment_bottom {
font-size: 0.427rem;
color: #333333;
}
}
</style>

View File

@@ -0,0 +1,57 @@
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: () => import(/* webpackChunkName: "home" */ '@/page/home'),
meta: {
keepAlive: true
}
},
{
path: '/about',
name: 'about',
component: () => import(/* webpackChunkName: "about" */ '@/page/about'),
meta: {
keepAlive: false
}
},
{
path: '/TvInfo',
name: 'TvInfo',
component: () => import(/* webpackChunkName: "TvInfo" */ '@/page/TvInfo'),
meta: {
keepAlive: false
}
},
{
path: '/demand',
name: 'demand',
component: () => import(/* webpackChunkName: "demand" */ '@/page/demand'),
meta: {
keepAlive: false
}
},
{
path: '/newInfo',
name: 'newInfo',
component: () => import(/* webpackChunkName: "newInfo" */ '@/page/newInfo'),
meta: {
keepAlive: false
}
},
{
path: '/postInfo',
name: 'postInfo',
component: () => import(/* webpackChunkName: "postInfo" */ '@/page/postInfo'),
meta: {
keepAlive: false
}
},
]
})

View File

@@ -0,0 +1,7 @@
import config from '@/config/index'
import http from '@/http/index'
class CarService {
}
export default CarService

View File

@@ -0,0 +1,43 @@
import config from '@/config/index'
import http from '@/http/index'
class IndexService {
async radio(data = {}) {
return await (new http()).get({
url: config.urlList.radio,
data: data
})
}
async channelList(data = {}) {
return await (new http()).get({
url: config.urlList.channelList,
data: data
})
}
async videoDetail(data = {}) {
return await (new http()).get({
url: config.urlList.videoDetail,
data: data
})
}
async commentFn(data = {}) {
return await (new http()).get({
url: config.urlList.comment,
data: data
})
}
async interactDetail(data = {}) {
return await (new http()).get({
url: config.urlList.interactDetail,
data: data
})
}
}
export default IndexService

View File

@@ -0,0 +1,7 @@
import IndexService from "@/service/IndexService"
import CarService from "@/service/CarService"
export default {
index: new IndexService(),
car: new CarService(),
}

View File

@@ -0,0 +1,9 @@
class Utils {
test () {
console.log("test")
}
}
export default new Utils();

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: 652 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

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