提交vue前端代码
|
|
@ -0,0 +1,21 @@
|
||||||
|
# y
|
||||||
|
|
||||||
|
> y
|
||||||
|
|
||||||
|
## 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).
|
||||||
|
|
@ -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'
|
||||||
|
))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 6.7 KiB |
|
|
@ -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')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
'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)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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'),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.vue$/,
|
||||||
|
loader: 'vue-loader',
|
||||||
|
options: vueLoaderConfig
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
@ -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
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
'use strict'
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
|
module.exports = merge(prodEnv, {
|
||||||
|
NODE_ENV: '"development"'
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
'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-
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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: true,
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
'use strict'
|
||||||
|
module.exports = {
|
||||||
|
NODE_ENV: '"production"'
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"name": "shop",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "shop",
|
||||||
|
"author": "shop",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||||
|
"start": "npm run dev",
|
||||||
|
"build": "node build/build.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"mint-ui": "^2.2.13",
|
||||||
|
"vue": "^2.5.2",
|
||||||
|
"vue-router": "^3.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer": "^7.1.2",
|
||||||
|
"babel-core": "^6.22.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",
|
||||||
|
"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",
|
||||||
|
"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-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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>4.4.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-vue-ui</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#app {
|
||||||
|
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
text-align: center;
|
||||||
|
color: #2c3e50;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
|
@ -0,0 +1,115 @@
|
||||||
|
<template>
|
||||||
|
<div class="shop-field">
|
||||||
|
<div class="shop-field-left" v-if="show">
|
||||||
|
<p>+86</p>
|
||||||
|
<i class="field-allow-right"></i>
|
||||||
|
</div>
|
||||||
|
<div class="shop-field-mid">
|
||||||
|
<input :type="thisType" :placeholder="placeholder" v-model="val" />
|
||||||
|
</div>
|
||||||
|
<div class="shop-field-right" v-if="type === 'password'" @click="showPassword">
|
||||||
|
<div class="icon-box" :class="[showPwd ? 'eye-open' : 'eye-close']"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Field } from 'mint-ui';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'field',
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请输入手机号'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'text'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
val: '',
|
||||||
|
showPwd: false,
|
||||||
|
thisType: 'text',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.thisType = this.type;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
back() {
|
||||||
|
this.$router.back();
|
||||||
|
},
|
||||||
|
showPassword() {
|
||||||
|
this.showPwd = !this.showPwd;
|
||||||
|
if(this.thisType === 'password') {
|
||||||
|
this.thisType = 'text';
|
||||||
|
} else {
|
||||||
|
this.thisType = 'password';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.shop-field {
|
||||||
|
display: flex;
|
||||||
|
padding: 10px 1px;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.shop-field-left, .shop-field-right {
|
||||||
|
padding-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.field-allow-right {
|
||||||
|
border: solid 2px #999;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
display: block;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 3px;
|
||||||
|
-webkit-transform: translateY(-50%) rotate(45deg);
|
||||||
|
transform: translateY(-50%) rotate(45deg);
|
||||||
|
}
|
||||||
|
.shop-field-mid {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.shop-field-mid > input {
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
outline: none;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.icon-box {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: cadetblue;
|
||||||
|
}
|
||||||
|
.eye-close {
|
||||||
|
background: url(../assets/eye-close.png) center center no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.eye-open {
|
||||||
|
background: url(../assets/eye-open.png) center center no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="shop-header-normal"></div>
|
||||||
|
<div class="shop-header-fixed">
|
||||||
|
<div v-if="type === 'close'" class="shop-header-left" @click="back">
|
||||||
|
<img src="../assets/close.png" />
|
||||||
|
</div>
|
||||||
|
<div v-else class="shop-header-left" @click="back">
|
||||||
|
<i class="header-allow-left"></i>
|
||||||
|
<p v-if="backName" class="back-name">{{ backName }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="shop-header-mid">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
<div class="shop-header-right">
|
||||||
|
<span>{{ more }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Header',
|
||||||
|
props: {
|
||||||
|
more: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
backName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
back() {
|
||||||
|
if(this.type === 'close') {
|
||||||
|
this.$emit('close');
|
||||||
|
} else {
|
||||||
|
this.$router.back();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.shop-header-normal {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.shop-header-fixed {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 99;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
background-color: #fff;
|
||||||
|
color: #000;
|
||||||
|
/* box-shadow: 0 0 0.1rem #00000029; */
|
||||||
|
}
|
||||||
|
.shop-header-left, .shop-header-right {
|
||||||
|
width: 20%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.shop-header-left > img {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
.shop-header-right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.shop-header-right > span {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.shop-header-mid {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.header-allow-left {
|
||||||
|
border: solid 2px #666;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
display: block;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 3px;
|
||||||
|
-webkit-transform: translateY(-50%) rotate(225deg);
|
||||||
|
transform: translateY(-50%) rotate(225deg);
|
||||||
|
}
|
||||||
|
.back-name {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
<template>
|
||||||
|
<div class="components-order-body">
|
||||||
|
<div class="components-order-title">
|
||||||
|
<span>订单: {{ orderInfo.num }}</span>
|
||||||
|
<span class="components-order-status">{{ orderInfo.status }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="components-order-content">
|
||||||
|
<img :src="orderInfo.logo" />
|
||||||
|
<div class="components-orde-desc">
|
||||||
|
<div class="components-orde-desc-cont">
|
||||||
|
<p class="components-orde-desc-title">
|
||||||
|
{{ orderInfo.name }}
|
||||||
|
</p>
|
||||||
|
<p class="components-orde-desc-quantity">
|
||||||
|
¥{{ orderInfo.amount }}
|
||||||
|
<br>
|
||||||
|
x{{ orderInfo.quantity }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>{{ orderInfo.amount }}福豆</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="components-order-foot">
|
||||||
|
<p>共计{{orderInfo.quantity}}件商品 合计:¥{{ orderInfo.total }}</p>
|
||||||
|
<div class="components-order-button-box" v-if="orderInfo.status === '待收货'">
|
||||||
|
<div class="components-order-button">确认收货</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Button } from 'mint-ui';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Button,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
orderInfo: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.components-order-body {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 0.1rem #00000029;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.components-order-title {
|
||||||
|
padding: 10px 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.components-order-title > .components-order-status {
|
||||||
|
color: #F49D4D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-order-content {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.components-order-content > img {
|
||||||
|
width: 30%;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.components-order-content > .components-orde-desc {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.components-orde-desc-cont {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.components-orde-desc-title {
|
||||||
|
flex: 1;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
box-orient: vertical;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.components-orde-desc-quantity {
|
||||||
|
padding-left: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-order-foot {
|
||||||
|
padding: 10px 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
.components-order-foot > div > p{
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.components-order-button-box {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.components-order-button {
|
||||||
|
width: auto;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border: 1px solid #F49D4D;
|
||||||
|
border-radius: 50px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
min-width: 60px;
|
||||||
|
color: #F49D4D;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
// The Vue build version to load with the `import` command
|
||||||
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||||||
|
import Vue from 'vue'
|
||||||
|
import MintUI from 'mint-ui'
|
||||||
|
import 'mint-ui/lib/style.css'
|
||||||
|
import App from './App'
|
||||||
|
import router from './router'
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
Vue.use(MintUI);
|
||||||
|
/* eslint-disable no-new */
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
router,
|
||||||
|
components: { App },
|
||||||
|
template: '<App/>'
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
import Vue from 'vue'
|
||||||
|
import Router from 'vue-router'
|
||||||
|
import Home from '../views/home'
|
||||||
|
import User from '../views/user'
|
||||||
|
import MyOrder from '../views/my-order'
|
||||||
|
import Login from '../views/login'
|
||||||
|
import TypeList from '../views/type-list'
|
||||||
|
import Detail from '../views/detail'
|
||||||
|
|
||||||
|
Vue.use(Router)
|
||||||
|
|
||||||
|
export default new Router({
|
||||||
|
routes: [
|
||||||
|
{
|
||||||
|
path: '/home',
|
||||||
|
name: 'Home',
|
||||||
|
component: Home
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/user',
|
||||||
|
name: 'User',
|
||||||
|
component: User
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/my-order',
|
||||||
|
name: 'MyOrder',
|
||||||
|
component: MyOrder
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/type-list',
|
||||||
|
name: 'TypeList',
|
||||||
|
component: TypeList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/detail',
|
||||||
|
name: 'Detail',
|
||||||
|
component: Detail
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
name: 'Login',
|
||||||
|
component: Login
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
const verbs = {
|
||||||
|
POST(url, params) {
|
||||||
|
/* istanbul ignore next */
|
||||||
|
return fetch(url, {
|
||||||
|
method: 'POST',
|
||||||
|
mode: 'cors',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const request = (params = {}, url) => {
|
||||||
|
return verbs['POST'](url, params)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.ok) {
|
||||||
|
return res.json();
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
errCode: 'NETWORK_ERROR',
|
||||||
|
errMsg: 'Network Error',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log('e >>> ', e);
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
errorCode: 'NETWORK_ERROR',
|
||||||
|
errorMessage: 'Network Error',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default (params = {}, url) => {
|
||||||
|
let timeHandle;
|
||||||
|
const timeout = 20 * 1000;
|
||||||
|
const promiseTimeout = new Promise((resolve) => {
|
||||||
|
timeHandle = setTimeout(() => {
|
||||||
|
resolve({
|
||||||
|
success: false,
|
||||||
|
errorCode: 'NETWORK_TIMEOUT',
|
||||||
|
errorMessage: 'Network Timeout',
|
||||||
|
});
|
||||||
|
}, timeout);
|
||||||
|
});
|
||||||
|
|
||||||
|
return Promise.race([
|
||||||
|
request(params, url).then((result) => {
|
||||||
|
clearTimeout(timeHandle);
|
||||||
|
return result;
|
||||||
|
}),
|
||||||
|
promiseTimeout,
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<template>
|
||||||
|
<div class="shop-detail">
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header>商城</shop-header>
|
||||||
|
<!-- banner -->
|
||||||
|
<div class="banner-box">
|
||||||
|
<mt-swipe :auto="4000">
|
||||||
|
<mt-swipe-item>
|
||||||
|
<img src="../assets/1.jpeg" />
|
||||||
|
</mt-swipe-item>
|
||||||
|
<mt-swipe-item>
|
||||||
|
<img src="../assets/2.jpeg" />
|
||||||
|
</mt-swipe-item>
|
||||||
|
</mt-swipe>
|
||||||
|
</div>
|
||||||
|
<!-- 详情 -->
|
||||||
|
<div class="detail-des">
|
||||||
|
<div class="detail-des-amout">{{ detailInfo.amount }}福豆</div>
|
||||||
|
<h3>{{ detailInfo.title }}</h3>
|
||||||
|
<p>{{ detailInfo.desc }}</p>
|
||||||
|
<p class="shipping">运费: {{ detailInfo.shipping }}</p>
|
||||||
|
</div>
|
||||||
|
<!-- 兑换按钮 -->
|
||||||
|
<div class="detail-button" @click="exchange">立即兑换</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Header from '../components/header';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
detailInfo: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
// const url = 'https://api.apiopen.top/getJoke?page=1&count=2&type=video';
|
||||||
|
// const res = await request({}, url);
|
||||||
|
// console.log('res >>> ', res);
|
||||||
|
this.detailInfo = {
|
||||||
|
amount: '336.00',
|
||||||
|
title: '正宗潜江油焖大虾',
|
||||||
|
desc: '正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾',
|
||||||
|
shipping: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exchange() {
|
||||||
|
confirm('您确定要兑换此商品吗?');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h3,p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.shop-detail {
|
||||||
|
|
||||||
|
}
|
||||||
|
/* banner */
|
||||||
|
.banner-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.mint-swipe-item > img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/*详情*/
|
||||||
|
.detail-des {
|
||||||
|
padding: 0 15px 10px 15px;
|
||||||
|
text-align: left;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
.detail-des-amout {
|
||||||
|
padding: 10px 0;
|
||||||
|
color: #E2778A;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.detail-des > h3 {
|
||||||
|
padding: 10px 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.shipping {
|
||||||
|
margin-top: 5px;
|
||||||
|
color: #E2778A;
|
||||||
|
}
|
||||||
|
/*兑换按钮*/
|
||||||
|
.detail-button {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #EB544D;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,279 @@
|
||||||
|
<template>
|
||||||
|
<div class="shop-home-body">
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header>商城</shop-header>
|
||||||
|
<!-- banner -->
|
||||||
|
<div class="banner-box">
|
||||||
|
<mt-swipe :auto="4000">
|
||||||
|
<mt-swipe-item>
|
||||||
|
<img src="../assets/1.jpeg" />
|
||||||
|
</mt-swipe-item>
|
||||||
|
<mt-swipe-item>
|
||||||
|
<img src="../assets/2.jpeg" />
|
||||||
|
</mt-swipe-item>
|
||||||
|
<mt-swipe-item>
|
||||||
|
<img src="../assets/3.jpeg" />
|
||||||
|
</mt-swipe-item>
|
||||||
|
</mt-swipe>
|
||||||
|
</div>
|
||||||
|
<!-- 中间专区按钮 -->
|
||||||
|
<div class="home-special">
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, key) in specialData" :key="key" @click="gotoTypeList">
|
||||||
|
<div class="img-box">
|
||||||
|
<img :src="item.logo" />
|
||||||
|
</div>
|
||||||
|
<span>{{ item.desc }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- 热门 -->
|
||||||
|
<div class="home-hot">
|
||||||
|
<div class="home-hot-title">
|
||||||
|
<p class="hot-list-title">热门榜单</p>
|
||||||
|
<div class="more-list">
|
||||||
|
<p>更多</p>
|
||||||
|
<i class="more-list-allow-right"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="home-hot-list">
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, key) in commodityData" :key="key">
|
||||||
|
<img :src="item.logo" />
|
||||||
|
<p>{{ item.description }}</p>
|
||||||
|
<span>¥{{ item.price }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 底部导航 -->
|
||||||
|
<mt-tabbar v-model="selected" :fixed="true">
|
||||||
|
<mt-tab-item id="商城">
|
||||||
|
<img slot="icon" src="../assets/home.png">
|
||||||
|
福豆商城
|
||||||
|
</mt-tab-item>
|
||||||
|
<mt-tab-item id="我的">
|
||||||
|
<img slot="icon" src="../assets/my.png">
|
||||||
|
我的
|
||||||
|
</mt-tab-item>
|
||||||
|
</mt-tabbar>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Toast } from 'mint-ui';
|
||||||
|
import { Swipe, SwipeItem } from 'mint-ui';
|
||||||
|
import { Tabbar, TabItem } from 'mint-ui';
|
||||||
|
import Header from '../components/header';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Swipe,
|
||||||
|
SwipeItem,
|
||||||
|
Tabbar,
|
||||||
|
TabItem,
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selected: '商城',
|
||||||
|
specialData: [
|
||||||
|
{ desc: '全部商品', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '图文资讯', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '我的收藏', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '优惠券', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '拼团专区', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '积分签到', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '秒杀专区', logo: require('../assets/home.png') },
|
||||||
|
{ desc: '砍价签到', logo: require('../assets/home.png') },
|
||||||
|
],
|
||||||
|
commodityData: [
|
||||||
|
{
|
||||||
|
description: '超级好吃的蛋糕',
|
||||||
|
price: '1.99',
|
||||||
|
logo: require('../assets/cake.jpg'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
description: '超级便宜的蛋糕',
|
||||||
|
price: '0.09',
|
||||||
|
logo: require('../assets/cake.jpg'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
description: '好吃又便宜的蛋糕',
|
||||||
|
price: '0.01',
|
||||||
|
logo: require('../assets/cake.jpg'),
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
gotoTypeList() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/type-list',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected() {
|
||||||
|
if (this.selected === '我的') {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/user',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.shop-home-body {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
/* banner */
|
||||||
|
.banner-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.mint-swipe-item > img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 中间专区按钮 */
|
||||||
|
.home-special {
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
.home-special > ul {
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.home-special > ul >li {
|
||||||
|
width: 25%;
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.home-special > ul >li >span {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.img-box {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #F3F5F4;
|
||||||
|
}
|
||||||
|
.img-box > img {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*热门*/
|
||||||
|
.home-hot {
|
||||||
|
height: 100px;
|
||||||
|
background-color: darkcyan;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.home-hot::after {
|
||||||
|
content: '';
|
||||||
|
width: 100%;
|
||||||
|
height: 20px;
|
||||||
|
background: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -5px;
|
||||||
|
left: 0;
|
||||||
|
border-top-left-radius: 200px 20px;
|
||||||
|
border-top-right-radius: 200px 20px;
|
||||||
|
}
|
||||||
|
.home-hot-title {
|
||||||
|
padding: 15px 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.hot-list-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.more-list {
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.more-list-allow-right {
|
||||||
|
border: solid 2px #fff;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
display: block;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
-webkit-transform: translateY(-50%) rotate(45deg);
|
||||||
|
transform: translateY(-50%) rotate(45deg);
|
||||||
|
}
|
||||||
|
.home-hot-list {
|
||||||
|
/* height: 100px; */
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 9;
|
||||||
|
padding: 10px;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
|
.home-hot-list > ul {
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.home-hot-list > ul >li {
|
||||||
|
width: 45%;
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.home-hot-list > ul >li > img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 0.1rem #00000029;
|
||||||
|
}
|
||||||
|
.home-hot-list > ul >li > p {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.home-hot-list > ul >li > span {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
color: darkcyan;
|
||||||
|
}
|
||||||
|
/*底部导航*/
|
||||||
|
.mint-tabbar {
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<template>
|
||||||
|
<div class="login-body">
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header type="close" more="帮助" @close="close"></shop-header>
|
||||||
|
<div class="login-box">
|
||||||
|
<div class="login-title">欢迎登录</div>
|
||||||
|
<text-field ref="shopPhone" show type="number" placeholder="请输入手机号" />
|
||||||
|
<text-field ref="shopPwd" type="password" placeholder="请输入密码" />
|
||||||
|
<mt-button type="primary" size="large" @click="login">登录</mt-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Field } from 'mint-ui';
|
||||||
|
import { Button } from 'mint-ui';
|
||||||
|
import request from '../utils/request.js';
|
||||||
|
import { Toast } from 'mint-ui';
|
||||||
|
import { MessageBox } from 'mint-ui';
|
||||||
|
import field from '../components/field';
|
||||||
|
import Header from '../components/header';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Field,
|
||||||
|
Button,
|
||||||
|
Toast,
|
||||||
|
MessageBox,
|
||||||
|
TextField: field,
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
const url = 'https://api.apiopen.top/getJoke?page=1&count=2&type=video';
|
||||||
|
const res = await request({}, url);
|
||||||
|
console.log('res >>> ', res);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
login() {
|
||||||
|
const username = this.$refs.shopPhone.val;
|
||||||
|
const password = this.$refs.shopPwd.val;
|
||||||
|
if(!username && !password) {
|
||||||
|
MessageBox({
|
||||||
|
title: '提示',
|
||||||
|
message: '账号或密码不能为空!',
|
||||||
|
showCancelButton: false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/home',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
alert('close');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.login-body {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.login-box {
|
||||||
|
width: 80%;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.login-title {
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: 28px;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
.mint-button {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
<template>
|
||||||
|
<div class="order-body">
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header>订单列表</shop-header>
|
||||||
|
|
||||||
|
<div class="order-tabs">
|
||||||
|
<ul>
|
||||||
|
<li v-for="(tab, key) in tabs" :key="key" :class="{'is-tabs-active': (key === index)}" @click="changeTab(key)">
|
||||||
|
<p>{{ tab }}</p>
|
||||||
|
<p class="order-tabs-line"></p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div style="height: 40px;"></div>
|
||||||
|
<div class="order-list" v-if="index === 0">
|
||||||
|
<order v-for="(item, key) in orderInfo" :orderInfo="item" :key="key"></order>
|
||||||
|
</div>
|
||||||
|
<div class="order-list" v-else-if="index === 1">
|
||||||
|
<order v-for="(item, key) in orderInfo" :orderInfo="item" :key="key" v-if="item.status === '待付款'"></order>
|
||||||
|
</div>
|
||||||
|
<div class="order-list" v-else-if="index === 2">
|
||||||
|
<order v-for="(item, key) in orderInfo" :orderInfo="item" :key="key" v-if="item.status === '待发货'"></order>
|
||||||
|
</div>
|
||||||
|
<div class="order-list" v-else-if="index === 3">
|
||||||
|
<order v-for="(item, key) in orderInfo" :orderInfo="item" :key="key" v-if="item.status === '待收货'"></order>
|
||||||
|
</div>
|
||||||
|
<div class="order-list" v-else-if="index === 4">
|
||||||
|
<order v-for="(item, key) in orderInfo" :orderInfo="item" :key="key" v-if="item.status === '已完成'"></order>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import order from '../components/order';
|
||||||
|
import Header from '../components/header';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
order,
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabs: ['待付款', '待发货', '待收货', '已完成'],
|
||||||
|
index: 0,
|
||||||
|
orderInfo: [
|
||||||
|
{
|
||||||
|
num: 'SP12345678901',
|
||||||
|
status: '待付款',
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾正宗潜江油焖大虾',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
num: 'SP12345678902',
|
||||||
|
status: '待发货',
|
||||||
|
logo: require('../assets/danta.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '正宗皇冠蛋挞',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
num: 'SP12345678903',
|
||||||
|
status: '待发货',
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '超级好吃的混沌',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
num: 'SP12345678903',
|
||||||
|
status: '待收货',
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '超级好吃的混沌',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
num: 'SP12345678903',
|
||||||
|
status: '待收货',
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '超级好吃的混沌',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
num: 'SP12345678903',
|
||||||
|
status: '已完成',
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '超级好吃的混沌',
|
||||||
|
quantity: 1,
|
||||||
|
total: 1498,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buildImg() {
|
||||||
|
return require('../assets/1.jpeg');
|
||||||
|
},
|
||||||
|
changeTab(key) {
|
||||||
|
this.index = key;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.order-body {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #F3F3F3;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
.order-tabs {
|
||||||
|
overflow: hidden;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 48px;
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.order-tabs > ul {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.order-tabs > ul > li {
|
||||||
|
list-style: none;
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.order-tabs > ul > li.is-tabs-active {
|
||||||
|
color: #F49D4D;
|
||||||
|
}
|
||||||
|
.order-tabs > ul > li.is-tabs-active > .order-tabs-line{
|
||||||
|
width: 20%;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #F49D4D;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.order-list {
|
||||||
|
padding: 10px 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,211 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header>商品列表</shop-header>
|
||||||
|
|
||||||
|
<div class="shop-type-list">
|
||||||
|
<!-- 左边导航 -->
|
||||||
|
<div class="left-nav">
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, key) in dataList" :key="key" :class="{'is-active': item.type === actionType}" @click="clickAction(item.type)">{{ item.type }}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- 右边列表 -->
|
||||||
|
<div class="right-list-box">
|
||||||
|
<ul v-for="(item, key) in dataList" :key="key" v-if="item.type === actionType">
|
||||||
|
<li v-for="(infos, key) in item.data" @click="gotoDetail">
|
||||||
|
<img :src="infos.logo" />
|
||||||
|
<span class="info-name">{{ infos.name }}</span>
|
||||||
|
<span class="info-amount">{{ infos.amount }}福豆</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Header from '../components/header';
|
||||||
|
import request from '../utils/request.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
actionType: '',
|
||||||
|
dataList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
// const url = 'https://api.apiopen.top/getJoke?page=1&count=2&type=video';
|
||||||
|
// const res = await request({}, url);
|
||||||
|
// console.log('res >>> ', res);
|
||||||
|
this.dataList = [
|
||||||
|
{
|
||||||
|
type: '个人清洁',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '个人清洁',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '个人清洁',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '个人清洁',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '美妆护肤',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '美妆护肤',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '美妆护肤',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '厨房用品',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '厨房用品',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '厨房用品',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '家用电器',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '家用电器',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '家用电器',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '手机数码',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
logo: require('../assets/xiazi.jpg'),
|
||||||
|
amount: 1498,
|
||||||
|
name: '手机数码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
logo: require('../assets/hundun.jpg'),
|
||||||
|
amount: 6666,
|
||||||
|
name: '手机数码',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
this.actionType = this.dataList[0].type;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickAction(actionType) {
|
||||||
|
this.actionType = actionType;
|
||||||
|
},
|
||||||
|
gotoDetail() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/detail',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
ul,li,p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-type-list {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100vh - 51px);
|
||||||
|
display: flex;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
/*左边导航*/
|
||||||
|
.left-nav {
|
||||||
|
width: 23%;
|
||||||
|
height: calc(100vh - 51px);
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: #555C66;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
.left-nav ul li {
|
||||||
|
list-style: none;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
color: #fff;
|
||||||
|
border-bottom: 1px solid #7F848A;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.left-nav ul li:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
.left-nav ul li.is-active {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #0000FF;
|
||||||
|
}
|
||||||
|
/*右边列表*/
|
||||||
|
.right-list-box {
|
||||||
|
flex: 1;
|
||||||
|
height: calc(100vh - 51px);
|
||||||
|
padding: 10px 5px;
|
||||||
|
overflow-y: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.right-list-box ul {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.right-list-box ul li {
|
||||||
|
list-style: none;
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.right-list-box ul li > img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.info-name {
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
.info-amount {
|
||||||
|
color: #E2778A;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,361 @@
|
||||||
|
<template>
|
||||||
|
<div class="shop-user-body">
|
||||||
|
<!-- header -->
|
||||||
|
<shop-header>我的</shop-header>
|
||||||
|
|
||||||
|
<div class="user-body-lower">
|
||||||
|
<div class="user-body-lower-header"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="user-body-upper">
|
||||||
|
<!-- 头像 -->
|
||||||
|
<div class="user-info">
|
||||||
|
<img src="../assets/touxiang.jpeg" />
|
||||||
|
<div>
|
||||||
|
{{ user.name }}
|
||||||
|
<p>绑定手机号</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 余额 -->
|
||||||
|
<div class="user-balance">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
福豆余额<br>(充值)
|
||||||
|
<p>{{ user.info.balance }}</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
可用福豆
|
||||||
|
<p>{{ user.info.available }}</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
团队福豆
|
||||||
|
<p>{{ user.info.team }}</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
专项福豆
|
||||||
|
<p>{{ user.info.item }}</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
福豆田
|
||||||
|
<p>{{ user.info.field }}</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 我的订单 -->
|
||||||
|
<div class="user-order">
|
||||||
|
<div class="user-order-title">
|
||||||
|
<p class="my-order">我的订单</p>
|
||||||
|
<div class="all-order" @click="gotoAllOrder">
|
||||||
|
<p>全部订单</p>
|
||||||
|
<i class="all-order-allow-right"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="user-order-content">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<img src="../assets/home.png" />
|
||||||
|
<p>待付款</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<img src="../assets/home.png" />
|
||||||
|
<p>待发货</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<img src="../assets/home.png" />
|
||||||
|
<p>待收货</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<img src="../assets/home.png" />
|
||||||
|
<p>已完成</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 列表 -->
|
||||||
|
<div class="user-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="user-list-cell">
|
||||||
|
<img src="../assets/my.png" />
|
||||||
|
我的团队
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="user-list-cell">
|
||||||
|
<img src="../assets/my.png" />
|
||||||
|
福豆充值
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="user-list-cell">
|
||||||
|
<img src="../assets/my.png" />
|
||||||
|
兑换记录
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="user-list-cell">
|
||||||
|
<img src="../assets/my.png" />
|
||||||
|
福豆兑现
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 底部导航 -->
|
||||||
|
<mt-tabbar v-model="selected" :fixed="true">
|
||||||
|
<mt-tab-item id="商城">
|
||||||
|
<img slot="icon" src="../assets/home.png">
|
||||||
|
福豆商城
|
||||||
|
</mt-tab-item>
|
||||||
|
<mt-tab-item id="我的">
|
||||||
|
<img slot="icon" src="../assets/my.png">
|
||||||
|
我的
|
||||||
|
</mt-tab-item>
|
||||||
|
</mt-tabbar>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Toast } from 'mint-ui';
|
||||||
|
import { Swipe, SwipeItem } from 'mint-ui';
|
||||||
|
import { Cell } from 'mint-ui';
|
||||||
|
import { Tabbar, TabItem } from 'mint-ui';
|
||||||
|
import Header from '../components/header';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Swipe,
|
||||||
|
SwipeItem,
|
||||||
|
Cell,
|
||||||
|
Tabbar,
|
||||||
|
TabItem,
|
||||||
|
shopHeader: Header,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selected: '我的',
|
||||||
|
user: {
|
||||||
|
name: '隐形少女',
|
||||||
|
info: {
|
||||||
|
balance: 1000,
|
||||||
|
available: 0,
|
||||||
|
team: 0,
|
||||||
|
item: 0,
|
||||||
|
field: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
gotoAllOrder() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/my-order',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected() {
|
||||||
|
if (this.selected === '商城') {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/home',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.shop-user-body {
|
||||||
|
|
||||||
|
}
|
||||||
|
.user-body-lower {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #F3F3F3;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
}
|
||||||
|
.user-body-lower-header {
|
||||||
|
width: 100%;
|
||||||
|
height: 160px;
|
||||||
|
background-color: #1AB773;
|
||||||
|
/* border-radius: 0 0 50% 50%; */
|
||||||
|
border-radius: 0 0 90% 90%/30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-body-upper {
|
||||||
|
width: 94%;
|
||||||
|
min-height: 100vh;
|
||||||
|
left: 3%;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
/*头像*/
|
||||||
|
.user-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.user-info > div {
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: 22px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.user-info > div p {
|
||||||
|
margin-top: 5px;
|
||||||
|
padding: 2px 10px;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #CC1817;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
.user-info > img {
|
||||||
|
display: block;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
/*余额*/
|
||||||
|
.user-balance {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 15px 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.user-balance > ul {
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.user-balance > ul > li {
|
||||||
|
list-style: none;
|
||||||
|
flex: 1;
|
||||||
|
font-size: 12px;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.user-balance > ul > li:nth-of-type(5n + 0) {
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
.user-balance > ul > li > p {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*我的订单*/
|
||||||
|
.user-order {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.user-order-title {
|
||||||
|
padding: 15px 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #CCCCCC;
|
||||||
|
}
|
||||||
|
.my-order {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.all-order {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.all-order-allow-right {
|
||||||
|
border: solid 2px #c8c8cd;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
display: block;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
-webkit-transform: translateY(-50%) rotate(45deg);
|
||||||
|
transform: translateY(-50%) rotate(45deg);
|
||||||
|
}
|
||||||
|
.user-order-content {
|
||||||
|
padding: 15px 30px;
|
||||||
|
}
|
||||||
|
.user-order-content > ul {
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.user-order-content > ul > li {
|
||||||
|
list-style: none;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.user-order-content > ul > li > img {
|
||||||
|
width: 30px;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*列表*/
|
||||||
|
.user-list {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.user-list > ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.user-list > ul > li {
|
||||||
|
list-style: none;
|
||||||
|
text-align: left;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.user-list-cell {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 0;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.user-list > ul > li:last-child > .user-list-cell {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.user-list-cell > img {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.user-list-cell:after {
|
||||||
|
content: '';
|
||||||
|
border: solid 2px #c8c8cd;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translateY(-50%) rotate(45deg);
|
||||||
|
transform: translateY(-50%) rotate(45deg);
|
||||||
|
}
|
||||||
|
/*底部导航*/
|
||||||
|
.mint-tabbar {
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
</style>
|
||||||