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,14 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
//翻译的最新的写法,还没有正式用的
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
//jsx的插件,有就转换,没有就空着
"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',
'no-compare-neg-zero': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

View File

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

View File

@@ -0,0 +1,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 @@
# vuecli2x
> vue 学习项目
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

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

View File

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

View File

@@ -0,0 +1,99 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json', '.less'],
// 路径别名
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@less': resolve('src/assets/less/page/'),
'@pub': resolve('src/assets/less/pub/'),
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
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: /\.less$/,
loader: "style-loader!css-loader!less-loader"
},
{
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({
filename: '[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,79 @@
'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: 9090, // 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
//是否开启zip压缩
productionGzip: true,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View File

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

View File

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

View File

@@ -0,0 +1,82 @@
{
"name": "vuecli2x",
"version": "1.0.0",
"description": "vue 学习项目",
"author": "zhangsan <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": {
"@vant/area-data": "^1.4.1",
"amfe-flexible": "^2.2.1",
"axios": "^1.4.0",
"vant": "^2.12.54",
"vue": "^2.5.2",
"vue-hot-reload-api": "^2.3.4",
"vue-router": "^3.0.1"
},
"devDependencies": {
"postcss-pxtorem": "^5.1.1",
"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",
"compression-webpack-plugin": "^1.1.11",
"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.3",
"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-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,16 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
@import "~@pub/clear";
@import "~@pub/reset";
</style>

View File

@@ -0,0 +1,63 @@
import axios from 'axios';
import config from '@/config';
import { Toast } from 'vant';
export default class Api {
constructor(isBase = null ) {
this.instance = axios.create({
baseURL: isBase == null ? config.checkEnvironment() : "",
timeout: 10000
});
this.interceptors()
}
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, {
headers: Object.assign({
"Content-Type": "application/json",
}, params.headers)
})
}
interceptors() {
this.instance.interceptors.request.use(function (config) {
Toast.loading({
duration: 0,
forbidClick: true,
message: '加载中....',
});
return config;
}, function (error) {
return Promise.reject(error);
});
this.instance.interceptors.response.use(function (response) {
Toast.clear();
switch (response.data.status) {
case 200:
return response.data.result
break;
case 404:
Toast.fail({
message: response.data.message
});
throw new Error(response.data.message)
break;
default:
break;
}
}, function (error) {
return Promise.reject(error);
});
}
}

View File

@@ -0,0 +1,128 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.home {
background-color: #fff;
.top {
background-color: #ffd23c;
height: 160px;
padding-top: 25px;
border-bottom-right-radius: 80rpx;
border-bottom-left-radius: 80rpx;
padding-top: 30rpx;
// box-sizing: border-box;
width: 100%;
border-radius: 0 0 30px 30px;
display: flex;
justify-content: center;
align-items: center;
.imgone{
display: block;
width: 100%;
height: 140px;
}
}
.my-swipe {
height: 147px;
width: 80%;
}
.searchcont {
display: flex;
align-items: center;
width: 90%;
height: 30px !important;
margin: 0 auto;
border: 2px solid #8e8c8c;
border-radius: 30px;
margin-top: -10px;
box-shadow: 0.02667rem 0.13333rem 0.32rem #a7a1a1;
background-color: #ffffff;
// background-color: red;
height: 20px;
box-sizing: border-box;
padding-left: 10px;
.searchtext {
color: #8e8c8c;
font-size: 16px;
}
}
.fabu {
display: flex;
justify-content: space-evenly;
margin-top: 30px;
.enterpush {
background-color: #ffffff;
box-shadow: 0.02667rem 0.13333rem 0.32rem #a7a1a1;
width: 40%;
border-radius: 10px;
// height: 85px;
display: grid;
.leftenter {
display: flex;
justify-content: space-around;
padding-top: 10px;
margin-bottom: 20px;
.imgico {
width: 25%;
}
.textset {
width: 50%;
background-color: #ffd23c;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
}
}
.absone{
font-size: 13px;
padding: 0 10px 20px;
}
.lastset {
margin-top: 17px;
font-size: 13px;
}
}
}
.tps{
font-size: 12px;
color: #8e8c8c;
padding: 0 20px;
margin-bottom: 20px;
margin-top: 15px;
}
.lastbottom{
padding: 0 17px;
box-shadow: 0.02667rem 0.13333rem 0.32rem #a7a1a1;
background-color: #ffffff;
border-radius: 18px;
width: 80%;
margin: 0 auto;
.titlelast{
display: flex;
padding: 20px 0 10px 0;
.textone{
font-size: 14px;
color: #000;
}
}
.context{
display: flex;
align-items: center;
padding-bottom: 20px;
.contextlast{
font-size: 14px;
}
}
}
}

View File

@@ -0,0 +1,98 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.individual{
width: 100%;
.indi{
width: 100%;
background-color: #ffffff;
box-shadow: 1px 1px 1px #c9c6c6bb;
.indi_li{
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 25px;
.indi_li_zi{
font-size: 15px
}
.indi_li_you{
display: flex;
align-items: center;
.indi_li_you_ssd{
width: 45px;
height: 45px;
margin-right: 8px;
position: relative;
.indi_li_you_ssd_butt{
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
}
.indi_li_you_zi{
font-size: 16px;
margin-right: 8px;
color: var(--cell-value-color,#969799);
}
.indi_li_you_img{
width: 45px;
height: 45px;
border-radius: 1.26667rem;
margin-right: 8px;
}
img{
width: 20px;
height: 20px;
}
}
}
}
.indi_buttom{
margin-top: 10;
width: 256px;
height: 50px;
margin: 0 auto;
background: #ffd23c;
border-color: #ffd23c;
margin-top: 40px;
.flex();
color: #ffffff;
font-size: 19px;border-radius: 15px;
}
.school{
background-color: #f4f4f6;
.school_titie{
padding-top: 18px;
text-align: center;
font-size: 22px;
background-color: #ffffff;
}
.school_text{
background-color: #ffffff;
display: inline-block;
//height: 50px;
}
.school_buttom{
height: 50px;
background-color: #ffffff;
margin-top: 10px;
//font-size: 28px;
color: #919191;
.flex();
}
}
}

View File

@@ -0,0 +1,36 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.Inquire{
background-color: rgb(246, 248, 249);
.Square{
height: 65px;
background-color: #ffffff;
padding: 10px 12px;
box-sizing: border-box;
.Square_frame{
}
}
.Square-search{
height: 40px;
background-color: rgba(247, 247, 248, 0.971);
border-radius: 35px;
overflow: hidden;
//box-sizing: border-box;
.flex();
.Square-img{
width: 30px;
height: 30px;
margin-left: 10px;
}
.Square-text{
flex: 1;
height: 100%;
margin-right: 10px;
background-color: rgba(247, 247, 248, 0.971);
border: none;
padding-left: 15px;
}
}
}

View File

@@ -0,0 +1,241 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.me {
position: relative;
.me-s {
background: #ffd23c;
width: 100%;
height: 32.2vh;
box-sizing: border-box;
position: absolute;
z-index: -1;
}
.cencer {
margin-bottom: 55px;
margin: 0 12px;
box-sizing: border-box;
//我的
.user_tips {
padding-top: 45px;
.user_tips_title {
font-size: 21px;
font-weight: bolder;
margin-bottom: 9px;
color: #ffffff;
}
.user_tips_desc {
font-size: 13px;
color: rgba(251, 251, 251, 0.74);
}
}
//三层框框
.user_card {
width: 100%;
height: 150.8px;
border-radius: 10px;
margin-top: 60px;
background-color: #7acc6c;
position: relative;
.user_card_One {
position: absolute;
width: 100%;
height: 100%;
border-radius: 10px;
background-color: #ffffff;
box-shadow: 1px 5px 12px #a7a1a1;
padding: 12px 14px;
z-index: 3;
box-sizing: border-box;
.user_card_One_s {
height: 45%;
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
.user_card_One_s_div {
height: 100%;
display: flex;
align-items: center;
img {
width: 57px;
height: 100%;
background-size: cover;
border-radius: 30px;
}
}
img {
width: 13px;
height: 13px;
}
.user_card_One_s_div1 {
flex: 1;
height: 100%;
margin-left: 8px;
padding-top: 10px;
.user_card_One_s_div1_l {
height: 45%;
font-size: 19px;
}
.user_card_One_s_div1_l1 {
height: 45%;
font-size: 11px;
color: #a7a1a1;
}
}
}
.user_card_One_x {
border-top: 0.01px solid #a7a1a142;
padding-top: 20px;
display: flex;
justify-content: space-around;
box-sizing: border-box;
.user_card_One_x_div {
width: 134px;
height: 100%;
text-align: center;
.user_card_One_x_z {
font-size: 12px;
color: #a7a1a1;
margin-bottom: 6px;
.ellipsis()
}
.user_card_One_x_z1 {
font-size: 20px;
.ellipsis()
}
}
}
}
.user_card_Two {
width: 321.4px;
height: 55.4px;
background-color: #ffffff;
position: absolute;
left: 50%;
top: -15px;
transform: translateX(-50%);
border-radius: 10px;
box-shadow: 1px 5px 12px #a7a1a1;
z-index: 2;
}
.user_card_Three {
width: 280px;
height: 55px;
background-color: #ffffff;
position: absolute;
left: 50%;
top: -30px;
transform: translateX(-50%);
border-radius: 10px;
box-shadow: 1px 5px 12px #a7a1a1;
z-index: 1;
}
}
//我的地址
.user_address {
height: 90px;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 1px 5px 12px #a7a1a1;
margin-top: 25px;
display: flex;
justify-content: space-around;
.address_div{
width: 50%;
.flex();
flex-direction: column;
.address_div_z{
font-size: 10px;
color: #a7a1a1;
}
.address_div_z1{
margin-top: 8px;
font-size: 14px;
}
}
}
//我的列表
.user_list {
background-color: #ffffff;
border-radius: 10px;
box-shadow: 1px 5px 10px #a7a1a1;
margin-top: 25px;
padding: 14px 21px;
li {
display: flex;
justify-content: space-between;
padding: 12px 0;
div {
display: flex;
justify-content: center;
align-items: center;
div {
font-size: 16px;
margin-left: 5px;
}
}
img {
width: 20px;
height: 20px;
}
}
.user_list_buttom{
height: 25px;
border-radius: 10px;
background-color: #ffd23c;
display: flex;
justify-content: center;
align-items: center;
font-size: 19px;
color: #ffffff;
margin-top: 35px;
}
}
}
}

View File

@@ -0,0 +1,61 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.push {
.active {
background: #ffd23c !important;
}
.shang {
margin-left: 10px !important;
margin-right: 10px !important;
.shangchaun{
margin-left: 10px !important;
margin-right: 10px !important;
}
}
.last {
margin-left: 10px !important;
margin-right: 10px !important;
.lasttitle {
margin: 15px 0px 10px 10px;
color: rgba(69, 90, 100, .6);
font-size: 13px;
}
.lastBottom {
display: inline-block;
background-color: rgba(82, 66, 66, 0.089);
border-radius: 30px;
margin-right: 10px;
margin: 5px;
color: black;
font-size: 14px;
padding: 10px;
}
}
.zuilast {
margin: 0, 10px, 0, 10px !important;
display: flex;
align-items: center;
justify-content: center;
.zuilastclcl {
display: flex;
align-items: center;
justify-content: center;
height: 50px;
width: 50px;
background-color: yellow;
border-radius: 50px;
// position: fixed;
// bottom: 5%;
// left: 31%;
}
}
}

View File

@@ -0,0 +1,22 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.Square {
/deep/ .van-tabs__wrap {
position: fixed;
width: 100%;
z-index: 999;
}
/deep/ .fa {
.van-tabs__wrap {
top: 45px;
}
}
/deep/ .chil {
.van-tabs__wrap {
top: 88px;
}
}
}

View File

@@ -0,0 +1,25 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.user {
.login {
.set_icon {
margin-right: 20px;
}
.login_but {
.flex();
flex-direction: column;
margin-top: 30px;
.van-button {
width: 70%;
background: linear-gradient(90deg, #8817cd , #c63ba2);
}
.reg_tx {
text-align: center;
margin-top: 10px;
font-size: 14px;
color: #bdbaba;
}
}
}
}

View File

@@ -0,0 +1,104 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.history {
box-sizing: border-box;
overflow: hidden;
position: relative;
/deep/ .van-tabs__wrap {
position: fixed;
width: 100%;
z-index: 999;
}
/deep/ .fa {
.van-tabs__wrap {
top: 45px;
}
}
.tabvan {
// position: absolute;
// top: 46px;
// height: 100vh;
.content {
box-sizing: border-box;
margin-left: 20px;
height: 80px;
margin-top: 20px !important;
display: flex;
align-items: center;
justify-content: center;
.contentone {
display: flex;
// width: 92% !important;
.img {
width: 25%;
border-radius: 15px;
margin-right: 10px;
position: relative;
.search {
position: absolute;
top: 2px;
left: 3px;
display: inline-block;
background-color: red;
color: white;
border: 1px solid red;
border-radius: 0 10px 10px 0;
font-size: 13px;
}
}
.right {
.title {
font-weight: 700;
font-size: 15px;
margin-bottom: 6px;
}
.context {
font-size: 13px;
color: #ae9f9f;
}
}
}
.queren {
position: absolute;
color: blue;
font-size: 15px;
right: 5px;
border: 1px solid blue;
z-index: 99;
}
.querene {
// display: inline-block;
font-size: 15px;
color: green;
// padding: 10px;
border: 1px solid green;
position: absolute;
// bottom: 5px;
right: 5px;
z-index: 99;
}
}
}
}

View File

@@ -0,0 +1,164 @@
@import "../pub/mixins.less";
@import "../pub/vars.less";
.info {
width: 100%;
// height: calc(100% - 50px);
// background-color: aliceblue;
position: relative;
box-sizing: border-box;
overflow: hidden;
.top {
background-color: #fff;
display: flex;
position: relative;
padding: 0 15px;
.toplist {
display: flex;
align-items: center;
padding: 20px 0;
.imgtop {
// background-size: 20%;
// background-repeat: repeat;
width: 13%;
border-radius: 80px;
margin-right: 10px;
}
.name {
font-size: 19px;
font-weight: 600;
}
.message {
font-size: 13px;
color: #999;
}
}
.toprigth {
position: absolute;
position: absolute;
right: 0;
background-color: yellow;
transform: rotate(34deg);
bottom: 21px;
color: #000000;
font-size: 21px;
padding: 10px;
border-radius: 16px;
}
.toprigthw {
position: absolute;
position: absolute;
right: 0;
background-color: red;
transform: rotate(34deg);
bottom: 21px;
color: #000000;
font-size: 21px;
padding: 10px;
border-radius: 16px;
}
}
.ceshitext {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 15px 15px 15px;
.leftceshi {
.leftext {
font-size: 16px;
color: #000;
}
.lefttime {
font-size: 13px;
color: #bfb7b7;
}
}
.righttext {
color: red;
font-size: 15px;
border: 1px solid yellow;
padding: 4px;
border-radius: 10px;
}
}
.foot {
width: 90%;
margin: 0 auto;
.foottext {
margin-bottom: 8px;
line-height: 21px;
font-size: 14px;
}
.footimga {
display: flex;
align-items: center;
justify-content: center;
.footimg {
width: 90%;
height: auto;
}
}
}
.shouone {
position: absolute;
font-size: 14px;
}
.imgthree {
display: flex;
align-items: center;
justify-content: center;
.wrapper {
width: 70%;
background-color: rgb(92, 83, 83);
height: 47vh;
border-radius: 10px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: space-around;
.imgtitle {
width: 40%;
border-radius: 70px;
}
.tetext {
color: #ecb600;
font-size: 14px;
padding: 8px;
border-radius: 10px;
border: 1px solid #ecb600;
}
.lasttext {
font-size: 12px;
color: #bfb7b7;
}
}
}
}

View File

@@ -0,0 +1,406 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
body {
// font-size: 0;
}
html {
line-height: 1;
-webkit-text-size-adjust: 100%;
/* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body,
ul,
li,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
list-style: none;
}
::-webkit-scrollbar {
width: 0;
height: 0;
}
.content {
margin-top: 1rem;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* 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;
}
/* Grouping content
========================================================================== */
/**
* 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 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
text-decoration: none;
color: #000;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 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 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* 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;
width: 100%;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */
}
/**
* 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;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* 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;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 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 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
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 in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 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 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@@ -0,0 +1,51 @@
.line (@position: "left") {
border-@{position}: 1px solid #8d8d8d;
}
.clearfix() {
&:after,
&:before {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
// 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;
}
.flex(@align: center, @justify: center) {
display: flex;
align-items: @align;
justify-content: @justify;
}
//超出显示省略号
.ellipsis() {
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; //溢出不换行
}

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,25 @@
<template>
<van-nav-bar fixed :title="title"
:left-arrow="showBack" @click-left="$router.back()"/>
</template>
<script>
export default {
name: "navbar",
props: {
title: {
type: String,
default: ''
},
showBack: {
type: Boolean,
default: true
}
},
data() {
return {}
}
}
</script>
<style lang="less" scoped></style>

View File

@@ -0,0 +1,41 @@
<template>
<div class="item">
<van-row>
<van-col @click="enterInfo(item.thing_id)" v-for="item, index in list" :key="index" span="12">
<img :src="item.thing_img" alt="">
<p>{{ item.thing_title }}</p>
</van-col>
</van-row>
</div>
</template>
<script>
export default {
name: "item",
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {
}
},
async created() { },
methods: {
enterInfo(id) {
this.$router.push({
path: "/info",
query: {
id
}
})
}
}
}
</script>
<style scoped lang='less'></style>

View File

@@ -0,0 +1,26 @@
<template>
<div class="page" :style="{ marginTop: `${top}px`, marginBottom: `${bottom}px` }">
<slot></slot>
</div>
</template>
<script>
export default {
name: "page",
props: {
top: {
type: Number,
default: 45
},
bottom: {
type: Number,
default: 50
}
},
data() {
return {}
}
}
</script>
<style lang="less" scoped></style>

View File

@@ -0,0 +1,37 @@
<template>
<van-tabbar route v-model="active" active-color="#ffd23c">
<van-tabbar-item to="/home">
<template #icon>
<img src="/static/images/icon/index.png" alt="">
</template>
首页
</van-tabbar-item>
<van-tabbar-item to="/square">
<template #icon>
<img src="/static/images/icon/dating.png" alt="">
</template>
广场
</van-tabbar-item>
<van-tabbar-item to="/me">
<template #icon>
<img src="/static/images/icon/user.png" alt="">
</template>
我的
</van-tabbar-item>
</van-tabbar>
</template>
<script>
export default {
name: "tabbar",
data() {
return {
active: 0
}
}
}
</script>
<style lang="less" scoped></style>

View File

@@ -0,0 +1,45 @@
import Header from '../components/header';
import Tabbar from '../components/tabbar';
import Page from '../components/page';
import Item from '../components/item';
import Vant from 'vant';
import 'vant/lib/index.css';
export default {
devBaseUrl: "http://127.0.0.1:3030",
testBaseUrl: "http://127.0.0.1:3000/api/json/test",
prodBaseUrl: "http://127.0.0.1:3000/api/json/prod",
aliOss: {
host: 'https://losta.oss-cn-shanghai.aliyuncs.com',
},
apiList: {
add: '/user/add',
login: '/user/login',
push: '/home/push',
token: '/home/token',
tab: "/home/tab",
notice: "/home/notice",//首页
info: "/home/info",//详情
Statistics:"/user/Statistics",
edit:"/user/edit",
search:"/home/search",
history:"/user/history",//历史记录
changeStatus:"/user/changeStatus",//接口状态
},
vueComponents: [ Header, Tabbar, Page, Item ],
vuePlugs: [ Vant ],
checkEnvironment() {
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,23 @@
import "amfe-flexible";
import Vue from 'vue'
import App from './App'
import router from './router'
import service from './service/_'
import utils from './utils'
import config from './config'
config.vueComponents.forEach(v => Vue.component(v.name, v))
config.vuePlugs.forEach(v => Vue.use(v))
Vue.prototype.$http = service;
Vue.prototype.$utils = utils;
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,93 @@
<template>
<div class="home">
<navbar title="失物招领" :show-back="false"></navbar>
<page :top="46">
<div class="top">
<van-swipe class="my-swipe" :autoplay="3000" :show-indicators="false" :loop="false" indicator-color="white">
<van-swipe-item><img class="imgone" src="../../static/images/Rotating/1.jpg" alt=""></van-swipe-item>
<van-swipe-item><img class="imgone" src="../../static/images/Rotating/2.jpg" alt=""></van-swipe-item>
<van-swipe-item><img class="imgone" src="../../static/images/Rotating/3.jpg" alt=""></van-swipe-item>
<van-swipe-item><img class="imgone" src="../../static/images/Rotating/news.png" alt=""></van-swipe-item>
</van-swipe>
</div>
<div class="searchcont" @click="entersearch()">
<van-icon size="25" name="search" />
<div class="searchtext">搜索更多..</div>
</div>
<div class="fabu">
<div @click="enterPush(item)" class="enterpush" v-for=" item, index in action " :key="index">
<div class="leftenter">
<img v-if="item.id==1" class="imgico" src="../../static/images/icon/release.png" alt="">
<img v-else class="imgico" src="../../static/images/icon/search.png" alt="">
<div class="textset">+发布</div>
</div>
<div class="absone">
{{ item.text }}
</div>
</div>
</div>
<p class="tps">tps:听说点击小飞机和放大镜,会进入神秘世界...</p>
<div class="lastbottom">
<div class="titlelast">
<van-icon name="volume-o" />
<div textone>最新消息</div>
</div>
<div class="context" v-for=" item, index in a " :key="index">
<van-icon name="circle" color="yellow" />
<div class="contextlast">{{ item }}</div>
</div>
</div>
</page>
</div>
</template>
<script>
export default {
data() {
return {
action: [
{ text: '失物招领', id: 1 },
{ text: '寻物启事', id: 2 },
],
a:[]
}
},
created() {
this.getNoticeList()
// console.log(2222);
},
methods: {
entersearch() {
this.$router.push({
name:"inq"
})
},
enterPush({ id }) {
this.$router.push({
name: "Push",
query: { id }
})
},
async getNoticeList() {
let res = await this.$http.home.notice();
console.log(res)
for (let i in res) {
this.a.push(res[i].notice_text);
}
},
Inquire(){
this.$router.push({
name:"inq"
})
}
}
}
</script>
<style scoped lang='less'>
@import "~@less/Home";
</style>

View File

@@ -0,0 +1,150 @@
<template>
<div class="individual">
<navbar title="个人信息" style="background-color: gold;"></navbar>
<page>
<ul class="indi">
<li class="indi_li">
<div class="indi_li_zi">头像</div>
<div class="indi_li_you">
<div class="indi_li_you_ssd">
<img class="indi_li_you_img" :src="induser.user_portrait" @click="indimg()">
<van-uploader preview-size="38px" class="indi_li_you_ssd_butt" :after-read="afterRead" />
</div>
<img src="../../static/images/common/next.png">
</div>
</li>
<li class="indi_li" @click="nameshow = true">
<div class="indi_li_zi">昵称</div>
<div class="indi_li_you">
<div class="indi_li_you_zi">{{ induser.user_name }}</div>
<img src="../../static/images/common/next.png">
</div>
</li>
<li class="indi_li">
<div class="indi_li_zi">手机</div>
<div class="indi_li_you">
<div class="indi_li_you_zi">15675526951</div>
<img src="../../static/images/common/next.png">
</div>
</li>
<li class="indi_li" @click="addressshow = true">
<div class="indi_li_zi">城市</div>
<div class="indi_li_you">
<div class="indi_li_you_zi">{{ induser.user_city == "" ? "请选择城市" : induser.user_city }}</div>
<img src="../../static/images/common/next.png">
</div>
</li>
<li class="indi_li" @click="schoolshow = true">
<div class="indi_li_zi">学校</div>
<div class="indi_li_you">
<div class="indi_li_you_zi">{{ induser.user_school == "" ? "请填写" : induser.user_school }} </div>
<img src="../../static/images/common/next.png">
</div>
</li>
</ul>
<div class="indi_buttom" @click="submit()">
提交
</div>
<van-popup class="school" v-model="schoolshow" position="bottom" closeable :style="{ height: '25%' }">
<div class="school_titie">学校</div>
<van-cell-group>
<van-field :clearable="true" :boder="false" class="school_text" v-model="induser.user_school"
placeholder="请输入学校的名称" maxlength="20" />
</van-cell-group>
<div class="school_buttom" @click="indclose()">完成</div>
</van-popup>
<van-popup class="school" v-model="nameshow" position="bottom" closeable :style="{ height: '25%' }">
<div class="school_titie">昵称</div>
<van-cell-group>
<van-field :clearable="true" :boder="false" class="school_text" v-model="induser.user_name"
placeholder="请输入学校的名称" maxlength="20" />
</van-cell-group>
<div class="school_buttom" @click="indclose()">完成</div>
</van-popup>
<!-- 日历 -->
<van-popup class="school" v-model="addressshow" position="bottom" :style="{ height: '45%' }">
<!-- :columns-placeholder="dddfd" -->
<van-area :columns-num="3" title="标题" :area-list="areaList" @cancel="addressshow=false" @confirm="confirm" />
</van-popup>
</page>
</div>
</template>
<script>
import { areaList } from '@vant/area-data';
import config from '@/config';
export default {
data() {
return {
areaList,
schoolshow: false,//学校显示
nameshow: false,//昵称显示
addressshow: false,
induser: [],//用户初始数据
induserall: [],//最终数据
dddfd:['请选择','请选择','请选择'],
}
},
created() {
this.induser = this.$utils.getItem("token") //获取用户信息
this.induserall = this.induser;
//设置地址默认值
//this.dddfd = this.induser.user_city.split(",")
console.log(this.dddfd)
},
methods: {
indclose() {
if (this.schoolshow == true) {
this.induserall.user_school = this.induser.user_school
this.schoolshow = false
} else if (this.nameshow == true) {
this.induserall.user_name = this.induser.user_name
this.nameshow = false
}
},
confirm(e) {
this.induserall.user_city=[]
e.forEach(v => {
this.induserall.user_city += `${v.name},`
})
this.induserall.user_city = this.induserall.user_city.substr(0, this.induserall.user_city.length - 1) //获取地址
console.log(this.induserall.user_city)
this.addressshow = false;
},
async afterRead(fileImg) {
let aliyunOssToken = await this.$http.home.token();
let form = new FormData()
form.append("OSSAccessKeyId", aliyunOssToken.OSSAccessKeyId)
form.append("policy", aliyunOssToken.policy)
form.append("Signature", aliyunOssToken.signature)
form.append("key", fileImg.file.name)
form.append("file", fileImg.file)
await this.$http.home.uploadFile(form, {
"Content-Type": "multipart/form-data",
});
this.induser.user_portrait = `${config.aliOss.host}/${fileImg.file.name}`
this.induserall.user_portrait = `${config.aliOss.host}/${fileImg.file.name}`
},
async submit(){
let ret = await this.$http.me.meinfo(this.induserall);
this.$utils.setItem("token",this.induserall)
this.$toast.success('修改成功');
}
}
}
</script>
<style scoped lang="less">
@import "~@less/individual";
</style>

View File

@@ -0,0 +1,76 @@
<template>
<div class="Inquire">
<navbar title="搜索" :show-back="true" style="background-color: gold;"></navbar>
<page>
<div>
<div class="Square">
<div class="Square-search">
<img @click="trigger(clicks)" class="Square-img" src="../../static/images/icon/search.png">
<input v-model="initext" @change="trigger(clicks)" class="Square-text" type="text" >
</div>
</div>
</div>
<van-list v-model="dd" :immediate-check="false" :finished="dd" finished-text="没有更多了" @load="getTabList">
<div class="nodata" v-if="Ininfo.length == 0">
<img src="../../static/images/img/noLogin.png">
<p style="text-align: center;">没有数据</p>
</div>
<template v-else>
<item :list="Ininfo"></item>
</template>
</van-list>
</page>
</div>
</template>
<script>
export default {
data() {
return {
dd: false,
dd1: false,
Ininfo: [],//存储数据
initext: "",//搜索值
pagemax:6,//最大页数
pageindex:1,//初始页数
clicks:"click"
}
},
created() {
}
,
methods: {
async trigger(cka) {
if (this.initext != "") {
if(cka=="click"){
this.Ininfo=[]; //搜索内容改变数据制空
this.pageindex=1;
}
let res = await this.$http.home.trigger({keyword: this.initext,page:2});//获取搜索内容
res.forEach(v=>{ this.Ininfo.push(v)}) //循环添加数据
}else{
this.Ininfo=[] //搜索内容为空 数据制空
}
},
getTabList(){
this.pageindex+=1 //页数加一
this.trigger()//再次获取搜索内容
//判断页数是否达到最大页数
if(this.pageindex>this.pagemax){
this.dd1=true; //加载完成后不再触发load事件
}else{
this.dd=false; // 触发 load 事件
}
}
}
}
</script>
<style scoped lang="less">
@import "~@less/Inquire";
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div class="layout">
<router-view/>
<tabbar></tabbar>
</div>
</template>
<script>
export default {
data () {
return {}
}
}
</script>
<style scoped lang='less'>
</style>

View File

@@ -0,0 +1,195 @@
<template>
<div class="me">
<page :top="0">
<div class="me-s"> </div>
<div class="cencer">
<div class="user_tips">
<div class="user_tips_title">我的</div>
<div class="user_tips_desc">浏览和管理您的设置</div>
</div>
<div class="user_card">
<div class="user_card_One">
<div class="user_card_One_s" @click="Individual">
<div class="user_card_One_s_div">
<img :src="meuser.user_portrait" alt="">
</div>
<div class="user_card_One_s_div1">
<div class="user_card_One_s_div1_l">{{ meuser.user_name }}</div>
<div class="user_card_One_s_div1_l1">暂未填写</div>
</div>
<img src="../../static/images/common/next.png">
</div>
<!-- //寻回历史记录 -->
<ul class="user_card_One_x">
<li @click="Recruitment(v)" v-for="v, i in mething" :key="i" class="user_card_One_x_div">
<div class="user_card_One_x_z">{{ v.name }}</div>
<div class="user_card_One_x_z1">{{ v.index }}</div>
</li>
</ul>
</div>
<div class="user_card_Two"></div>
<div class="user_card_Three"></div>
</div>
<ul class="user_address">
<li class="address_div" v-for="v, i in meaddress" :key="i">
<div class="address_div_z">{{ v.name }}</div>
<div class="address_div_z1">{{ v.text }}</div>
</li>
</ul>
<ul class="user_list">
<li @click="concerning(v.index)" v-for="v, i in melist" :key="i">
<div>
<img :src="v.src">
<div>{{ v.text }}</div>
</div>
<img src="../../static/images/common/next.png">
</li>
<li @click="mebuttom()" class="user_list_buttom">{{ button }}</li>
</ul>
</div>
</page>
</div>
</template>
<script>
import page from '../components/page.vue'
export default {
components: { page },
data() {
return {
button: "退出登录",
//历史记录
mething: [
{
name: '失物招领',
id: 1,
index: 0
},
{
name: '寻物启事',
id: 2,
index: 0
}
],
//电话 地址
meaddress: [
{
name: '城市',
text: null,
},
{
name: '电话',
text: null,
}
],
//列表
melist: [
{
src: "../../static/images/icon/edit.png",
text: '关于',
index: 1,
txt: "校园失物招领管理系统(拾金小程序)的主要功能就是帮助校内同学更快的找到自己的丢失之物。小程序系统UI界面简洁清晰、用户操作简易、没有繁杂的信息流、广告弹窗等众多干扰元素、减少使用成本提高使用效率增强用户粘性和归属感,为同学们提供最便捷优质的服务。"
},
{
src: "../../static/images/icon/edit.png",
text: '反馈',
index: 2,
txt: ""
},
{
src: "../../static/images/icon/edit.png",
text: '帮助',
index: 3,
txt: ""
},
{
src: "../../static/images/icon/edit.png",
text: '协议',
index: 4,
txt: ""
}
],
meuser: []
}
},
async created() {
this.meuser = this.$utils.getItem("token") //获取用户信息
let ret = await this.$http.me.history({ id: this.meuser.user_id }) //获取历史
console.log(ret)
this.meaddress[0].text = this.meuser.user_city == "" ? "暂未选择" : this.meuser.user_city;//地址
this.meaddress[1].text = this.meuser.user_phone//电话号码
this.mething.index = ret.lose_matter//失物
this.mething[0].index = ret.lose_matter//寻物
console.log(this.meuser)
},
methods: {
Recruitment({ id }) {
//进入历史界面修改这个name 便可!
this.$router.push({
name: "history",
query: {
id
}
})
},
//列表弹窗提示 目前只有关于 其他有的时候将 && v.index==1 删了即可
concerning(id) {
this.melist.forEach((v, i) => {
if (id == v.index && v.index == 1) {
this.$dialog.alert({
title: v.text,
message: v.txt,
});
}
})
},
//进入个人编辑
Individual() {
this.$router.push({
name: "ind"
})
},
mebuttom() {
this.$dialog.confirm({
title: '提示',
message: '确定退出当前账号吗?',
})
.then(() => {
localStorage.removeItem("token")
// on confirm
this.$router.push({
name: "Home"
})
})
.catch(() => {
// on cancel
});
}
}
}
</script>
<style scoped lang='less'>
@import "~@less/Me";
</style>

View File

@@ -0,0 +1,141 @@
<template>
<div class="push">
<navbar title="发布信息"></navbar>
<page :bottom="0">
<div class="shang">
<van-field v-model="pushParmas.thing_title" maxlength="50" :clearable="true" rows="2" type="textarea" :autosize="minHeightTa"
placeholder="物品的标题" />
<van-field v-model="pushParmas.thing_introduce" :clearable="true" rows="5" type="textarea" maxlength="500"
placeholder="请描述清楚时间,地点,物品特征等基本信息(限500字)" show-word-limit />
<van-uploader v-model="uploadFileList" class="shangchaun" :after-read="afterRead" :max-count="1"/>
</div>
<div class="last">
<div class="lasttitle">物品类型</div>
<div :class="thingTypeIndex == index ? 'active lastBottom' : 'lastBottom'" @click="clickOne(index)"
v-for="(item, index) in typeOne" :key="index">
{{ item.title }}
</div>
</div>
<div class="last">
<div class="lasttitle">物品类别</div>
<div :class="thingCategoryIndex == index ? 'active lastBottom' : 'lastBottom'" @click="clickTwo(index)"
v-for="(item, index) in typeTwo" :key="index">
{{ item.title }}
</div>
</div>
<div class="zuilast">
<van-icon class="zuilastclcl" name="smile-o" @click="pushEvent"/>
</div>
</page>
</div>
</template>
<script>
import config from '@/config';
export default {
data() {
return {
pushParmas: {
user_id: 0,
thing_title: "",
thing_introduce: "",
thing_img: null,
thing_type: null,
thing_category: null,
},
minHeightTa: { maxHeight: 100, minHeight: 0 },
uploadFileList: [],
thingTypeIndex: 0,
thingCategoryIndex: 0,
typeOne: [
{ title: '失物招领', type: 1 },
{ title: '寻物启事', type: 2 },
],
typeTwo: [
{ title: '证件', type: 1 },
{ title: '服装', type: 2 },
{ title: '数码', type: 3 },
{ title: '日用品', type: 4 },
{ title: '其他', type: 5 },
],
}
},
created() {
this.pushParmas.user_id = this.$utils.getItem("token").user_id
this.thingTypeIndex = this.$route.query.id ? this.$route.query.id - 1 : this.thingTypeIndex
console.log(this.$route.query.id )
this.pushParmas.thing_type = this.typeOne[this.thingTypeIndex].type
this.pushParmas.thing_category = this.typeTwo[this.thingCategoryIndex].type
},
methods: {
clickOne(index) {
this.pushParmas.thing_type = this.typeOne[index].type
this.thingTypeIndex = index
},
clickTwo(index) {
this.thingCategoryIndex = index
this.pushParmas.thing_category = this.typeTwo[index].type
},
async afterRead(fileImg) {
let aliyunOssToken = await this.$http.home.token();
let form = new FormData()
for (const key in aliyunOssToken) {
form.append(key, aliyunOssToken[key])
}
form.append("key", fileImg.file.name)
form.append("file", fileImg.file)
await this.$http.home.uploadFile(form,{
"Content-Type": "multipart/form-data",
});
this.pushParmas.thing_img = `${config.aliOss.host}/${fileImg.file.name}`
},
async pushEvent() {
if (this.pushParmas.thing_title.length == 0) {
this.$toast("标题不能为空")
return;
}
if (this.pushParmas.thing_introduce.length == 0) {
this.$toast("内容不能为空")
return;
}
console.log("pushParmas: ",this.pushParmas);
let res = await this.$http.home.push(this.pushParmas);
this.$toast({
message: "发布成功",
onClose: () => {
this.$router.push({ name: "Square" })
}
})
}
}
}
</script>
<style scoped lang='less'>
@import "~@less/Push";
</style>

View File

@@ -0,0 +1,104 @@
<template>
<div class="Square">
<navbar title="广场" :show-back="false"></navbar>
<page :top="133">
<van-tabs v-model="active" class="fa" @change="childrenChange">
<van-tab v-for="item, index in hall" :title="item.title" :key="index">
<van-tabs swipeable v-model="item.index" @change="childrenChange" class="chil">
<van-tab v-for="v, i in item.children" :title="v.title" :key="i">
<van-list v-model="v.loading" :immediate-check="false" :finished="v.finished" finished-text="没有更多了"
@load="getTabList">
<div class="nodata" v-if="v.content.length == 0">
<p>没有数据</p>
</div>
<template v-else>
<item :list="v.content"></item>
</template>
</van-list>
</van-tab>
</van-tabs>
</van-tab>
</van-tabs>
</page>
</div>
</template>
<script>
export default {
data() {
return {
active: 0,
hall: [
{
type: 1,
title: '失物招领',
index: 0,
children: [
{ title: '全部', type: -1, page: 1, loading: false, finished: false, totalpage: 3, content: [] },
{ title: '证件', type: 1, page: 1, loading: false, finished: false, totalpage: 3, content: [] },
{ title: '服装', type: 2, page: 1, loading: false, finished: false, totalpage: 5, content: [] },
{ title: '数码', type: 3, page: 1, loading: false, finished: false, totalpage: 2, content: [] },
{ title: '日用品', type: 4, page: 1, loading: false, finished: false, totalpage: 1, content: [] },
{ title: '其他', type: 5, page: 1, loading: false, finished: false, totalpage: 4, content: [] },
]
},
{
type: 2,
title: '寻物启事',
index: 0,
children: [
{ title: '全部', type: -1, page: 1, loading: false, finished: false, totalpage: 4, content: [] },
{ title: '证件', type: 1, page: 1, loading: false, finished: false, totalpage: 3, content: [] },
{ title: '服装', type: 2, page: 1, loading: false, finished: false, totalpage: 5, content: [] },
{ title: '数码', type: 3, page: 1, loading: false, finished: false, totalpage: 2, content: [] },
{ title: '日用品', type: 4, page: 1, loading: false, finished: false, totalpage: 1, content: [] },
{ title: '其他', type: 5, page: 1, loading: false, finished: false, totalpage: 4, content: [] },
]
}
]
}
},
created() {
this.getTabList("click")
},
methods: {
async getTabList(type) {
let childrenObj = this.hall[this.active].children[this.hall[this.active].index]
let a = async () => {
let res = await this.$http.home.tab({
thing_type: this.hall[this.active].type,
thing_category: childrenObj.type,
page: childrenObj.page
});
childrenObj.content = [
...childrenObj.content,
...res
]
childrenObj.page += 1;
if (childrenObj.page > childrenObj.totalpage) {
childrenObj.finished = true
} else {
childrenObj.loading = false
}
}
type == "click"
? childrenObj.content.length == 0 ? a() : null
: a()
},
childrenChange() {
this.getTabList("click")
// console.log('99',click)
}
}
}
</script>
<style scoped lang='less'>
@import "~@less/Square";
</style>

View File

@@ -0,0 +1,131 @@
<template>
<div class="user">
<img src="/static/images/img/loginBack.png" alt="">
<div v-if="status" class="login">
<van-cell-group :border="false">
<van-field v-model="loginParams.phone" :maxlength="11" type="number" :clearable="true" placeholder="输入手机号">
<template #left-icon>
<van-icon class="set_icon" name="phone-o" size="23" />
</template>
</van-field>
<van-field v-model="loginParams.pwd" type="password" :clearable="true" placeholder="输入密码">
<template #left-icon>
<van-icon class="set_icon" name="shield-o" size="23" />
</template>
</van-field>
</van-cell-group>
<div class="login_but">
<van-button type="primary" round @click="UserLogin">登 录</van-button>
<div class="reg_tx" @click="status = false">注册账号</div>
</div>
</div>
<div v-else class="reg login">
<van-cell-group :border="false">
<van-field v-model="addParams.phone" :clearable="true" :maxlength="11" type="number" placeholder="输入手机号">
<template #left-icon>
<van-icon class="set_icon" name="phone-o" size="23" />
</template>
</van-field>
<van-field v-model="addParams.pwd" type="password" :clearable="true" placeholder="输入密码">
<template #left-icon>
<van-icon class="set_icon" name="shield-o" size="23" />
</template>
</van-field>
<van-field v-model="addParams.againPwd" type="password" :clearable="true" placeholder="输入确认密码">
<template #left-icon>
<van-icon class="set_icon" name="shield-o" size="23" />
</template>
</van-field>
</van-cell-group>
<div class="login_but">
<van-button type="primary" round @click="UserAdd">注 册</van-button>
<div class="reg_tx" @click="status = true">登录账号</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
status: true, // true 登录 false 注册
loginParams: {
phone: '15155145354',
pwd: 'Lb714500.'
},
addParams: {
phone: '15155145354',
pwd: 'Lb714500.',
againPwd: 'Lb714500.'
}
}
},
methods: {
async UserAdd() {
if (!this.$utils.isPhone(this.addParams.phone)) {
this.$toast("手机号不正确")
return;
}
if (!this.$utils.checkPwd(this.addParams.pwd)) {
this.$toast("密码不符合要求")
return;
}
if (this.addParams.pwd != this.addParams.againPwd) {
this.$toast("确认密码不符合要求")
return;
}
delete this.addParams.againPwd
let res = await this.$http.user.add(this.addParams);
this.$toast({
message: "恭喜注册成功",
onClose: () => {
this.status = true
}
})
},
async UserLogin() {
if (!this.$utils.isPhone(this.loginParams.phone)) {
this.$toast("手机号不正确")
return;
}
if (!this.$utils.checkPwd(this.loginParams.pwd)) {
this.$toast("密码不符合要求")
return;
}
let userInfo = await this.$http.user.login(this.loginParams);
this.$utils.setItem("token", userInfo);
this.$toast({
message: "恭喜登录成功",
onClose: () => {
if (this.$route.query.from) {
this.$router.push(this.$route.query.from)
} else {
this.$router.push("/")
}
}
})
}
}
}
</script>
<style scoped lang='less'>
@import "~@less/User";
</style>

View File

@@ -0,0 +1,159 @@
<template>
<div class="history">
<navbar title="历史记录" :show-back="true"></navbar>
<page :top="90">
<van-tabs v-model="active" class="fa" @change="childrenChange">
<!-- //头部z -->
<van-tab class="tabvan" v-for="item, index in historyArr" :title="item.title" :key="index">
<!-- //内容z -->
<div class="content" v-for="v, i in historyList" :title="v.title" :key="i">
<div class="nodata" v-if="v.length == 0">
<img src="../../static/images/img/noLogin.png">
<p style="text-align: center;">没有数据</p>
</div>
<div v-else class="contentone">
<div class="img" @click="enterInfo(v.thing_id)">
<img :src="v.thing_img">
<div class="search" v-if="v.thing_status == 1 && item.thing == 1">已认领</div>
<div class="search" v-else-if="v.thing_status == 0 && item.thing == 1">未认领</div>
<div class="search" v-else-if="v.thing_status == 1 && item.thing == 2">已寻回</div>
<div class="search" v-else-if="v.thing_status == 0 && item.thing == 2">未寻回</div>
</div>
<div class="right" @click="enterInfo(v.thing_id)">
<div class="title">{{ v.thing_title }}</div>
<div class="context">{{ v.thing_introduce }}</div>
</div>
</div>
<template>
<div class="queren" @click="telphonek(v.thing_id)"
v-if="v.thing_status == 0 && item.thing == 1">确认被认领
</div>
<div class="querene" @click="telphonek(v.thing_id)"
v-else-if="v.thing_status == 0 && item.thing == 2">确认已寻回
</div>
</template>
</div>
</van-tab>
</van-tabs>
</page>
</div>
</template>
<script>
import { Dialog } from 'vant';
export default {
data() {
return {
active: 0,
historyArr: [
{
title: '失物招领',
thing: 1,
},
{
title: '寻物启事',
thing: 2,
},
],
//接口反的
historyList: [],
zhuangtai: 0,
tokenid: 0,
success: '',
}
},
created() {
//获取本地user_id
this.tokenid = this.$utils.getItem("token").user_id
console.log("本地token", this.tokenid);
this.zhuangtai = this.$route.query.id;
this.active = this.$route.query.id - 1;
console.log('传过来的', this.zhuangtai);
this.getHistoryList();
},
methods: {
//进入详情
enterInfo(id) {
this.$router.push({
path: "/info",
query: {
id
}
})
},
telphonek(id) {
//弹窗
Dialog.confirm({
message: '请确定已与【失主】或【物主】进行详细沟通并成功拿到丢失物品,一但确定不可取消!',
})
.then(async () => {
// 接口改变状态
console.log("id", id)
let ayay = await this.$http.home.changeStatus({
user_id: this.tokenid,//用户id
thing_id: id,//物品的id
thing_status: 1, // 要修改的状态
});
this.message = ayay
console.log("this.message 修改 :", this.message);
this.getHistoryList()
})
.catch(() => {
// Toast('提示内容');
console.log(5555);
});
},
childrenChange() {
if (this.zhuangtai == 1) {
this.zhuangtai = 2
this.getHistoryList();
console.log("1变2", this.zhuangtai);
} else if (this.zhuangtai == 2) {
this.zhuangtai = 1
this.getHistoryList();
console.log("2变1", this.zhuangtai);
}
},
async getHistoryList() {
let res = await this.$http.home.history({
user_id: this.tokenid,
thing_type: this.zhuangtai,
});
this.historyList = res
},
// async getChangeStatusList() {
// let ayay = await this.$http.home.changeStatus({
// user_id: this.tokenid,
// thing_id: this.zhuangtai,//物品的id
// // 要修改的状态
// thing_status: 1,
// });
// this.message = ayay
// console.log("this.message 修改 :", this.message);
// },
}
}
</script>
<style scoped lang='less'>
@import "~@less/history";
</style>

View File

@@ -0,0 +1,108 @@
<template>
<div class="info">
<navbar title="详情" :show-back="true"></navbar>
<page :top="46">
<div class="top">
<div class="toplist">
<img class="imgtop" :src="infolistL.user_portrait" alt="">
<div>
<div class="name">{{ infolistL.user_name }}</div>
<div class="message" v-if="infolistL.user_school !== ''">{{ infolistL.user_school }}</div>
<div v-else class="message">用户未填写学校信息</div>
</div>
</div>
<div class="toprigth" @click="clickone" v-if="infolistL.thing_status == 0">我要认领</div>
<div class="toprigthw" v-else @click="showPopup">已经认领
<!-- <van-cell is-link>展示弹出层</van-cell> -->
</div>
</div>
<div class="ceshitext">
<div class="leftceshi">
<div class="leftext">{{ infolistL.thing_title }}</div>
<div class="lefttime">{{ infolistL.thing_createdtime }}</div>
</div>
<div v-if="infolistL.thing_category == 1" class="righttext">证件</div>
<div v-else-if="infolistL.thing_category == 2" class="righttext">服装</div>
<div v-else-if="infolistL.thing_category == 3" class="righttext">数码</div>
<div v-else-if="infolistL.thing_category == 4" class="righttext">日用品</div>
<div v-else class="righttext">其他</div>
</div>
<div class="foot">
<div class="foottext">
{{ infolistL.thing_introduce }}
</div>
<div class="footimga">
<img class="footimg" :src="infolistL.thing_img">
</div>
</div>
<div class="shouone">
<van-popup v-model="show">抱歉已经认领了哦</van-popup>
</div>
</page>
<van-overlay class="imgthree" :show="shouad" @click="clickone">
<div class="wrapper">
<img class="imgtitle" :src="infolistL.user_portrait" alt="">
<div class="tetext" @click="telphonek">电话联系我</div>
<div class="lasttext">请勿轻易相信他人,线下见面请注意个人安全</div>
</div>
</van-overlay>
</div>
</template>
<script>
import { Dialog } from 'vant';
export default {
data() {
return {
infolistL: [],
show: false,
shouad: false,
iphone: ''
}
},
created() {
this.getInfoList()
},
methods: {
telphonek() {
//弹窗
Dialog.confirm({
title: '标题',
message: '拨打' + `${this.iphone}`,
})
.then(() => {
this.shouad = false
})
.catch(() => {
this.shouad = false
});
},
showPopup() {
this.show = true;
},
clickone() {
this.shouad = true
},
async getInfoList() {
let res = await this.$http.home.info({
thing_id: this.$route.query.id
});
this.infolistL = res
this.iphone = res.user_phone
console.log(55555, this.iphone);
},
}
}
</script>
<style scoped lang='less'>
@import "~@less/info";
// .tetext{
// color: red;
// }
</style>

View File

@@ -0,0 +1,136 @@
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
let router = new Router({
routes: [
{
path: '/',
name: 'Layout',
redirect: "/home",
// 路由懒加载
component: () => import(/* webpackChunkName: "Layout" */ '@/page/Layout'),
children: [
{
path: 'home',
name: 'Home',
meta: {
requiresAuth: false,
title: '首页'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "home" */ '@/page/Home')
},
{
path: 'me',
name: 'Me',
meta: {
requiresAuth: true,
title: '我的'
},
component: () => import(/* webpackChunkName: "Me" */ '@/page/Me')
},
{
path: 'square',
name: 'Square',
meta: {
requiresAuth: true,
title: '广场'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "square" */ '@/page/Square')
},
{
path: 'info',
name: 'info',
meta: {
requiresAuth: true,
title: '详情'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "info" */ '@/page/info')
},
]
},
{
path: '/push',
name: 'Push',
meta: {
requiresAuth: true,
title: '发布'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "push" */ '@/page/Push')
},
{
path: '/history',
name: 'history',
meta: {
requiresAuth: true,
title: '历史记录'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "history" */ '@/page/history')
},
{
path: '/user',
name: 'User',
meta: {
requiresAuth: false,
title: '登录/注册'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "user" */ '@/page/User')
},
{
path: '/Individual',
name: 'ind',
meta: {
requiresAuth: true,
title: '个人编辑页面'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "user" */ '@/page/Individual')
}
, {
path: '/Inquire',
name: 'inq',
meta: {
requiresAuth: false,
title: '个人编辑页面'
},
// 路由懒加载
component: () => import(/* webpackChunkName: "user" */ '@/page/Inquire')
}
]
})
// 登录状态检查
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
// 未登录
if (localStorage.getItem("token") == null) {
// 你访问的页面还需要登录
if (to.meta.requiresAuth) {
next({
name: 'User',
query: {
from: to.fullPath
}
})
} else {
next()
}
} else {
next()
}
})
//处理动态路由
export default router

View File

@@ -0,0 +1,79 @@
import Api from '@/api'
import config from '@/config'
export default class HomeService {
async token (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.token,
data,
headers
})
}
async push (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.push,
data,
headers
})
}
async notice (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.notice,
data,
headers
})
}
//详情
async info (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.info,
data,
headers
})
}
//获取用户发布的历史记录信息
async history (data = {}, headers = {}) {
console.log(1)
console.log("data",data)
return await (new Api).post({
url: config.apiList.history,
data,
headers
})
}
//修改 失物招领 和 寻物启事 的状态
async changeStatus (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.changeStatus,
data,
headers
})
}
async tab (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.tab,
data,
headers
})
}
async uploadFile (data = {}, headers = {}) {
return await (new Api("noBaseUrl")).post({
url: config.aliOss.host,
data,
headers
})
}
async trigger(data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.search,
data,
headers
})
}
}

View File

@@ -0,0 +1,22 @@
import Api from '@/api'
import config from '@/config'
export default class MeService {
async history (data = {}, headers = {}){
console.log(4)
return await (new Api).post({
url: config.apiList.Statistics,
data,
headers
})
}
async meinfo (data = {}, headers = {}){
console.log(4)
return await (new Api).post({
url: config.apiList.edit,
data,
headers
})
}
}

View File

@@ -0,0 +1,20 @@
import Api from '@/api'
import config from '@/config'
export default class UserService {
async add (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.add,
data,
headers
})
}
async login (data = {}, headers = {}) {
return await (new Api).post({
url: config.apiList.login,
data,
headers
})
}
}

View File

@@ -0,0 +1,9 @@
import HomeService from './Home';
import UserService from './User';
import MeService from './Me';
export default {
home: new HomeService,
user: new UserService,
me:new MeService
}

View File

@@ -0,0 +1,28 @@
class Utils {
isPhone(phone) {
let myreg = /^1[3-9]\d{9}$/;
return myreg.test(phone)
}
// 密码中必须包含大小写 字母、数字、特称字符,至少6个字符,最多20个字符;
checkPwd(pwd) {
// 这个正则有问题,自己找个
let pwdRegex = /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[`~!@#$%^&*()-=_+;':",./<>?])(?=\S+$).{6,32}/;
return pwdRegex.test(pwd)
}
setItem(key, value) {
localStorage.setItem(
key,
value.constructor == Object || value.constructor == Array
? JSON.stringify(value)
: value
)
}
getItem(key) {
return localStorage.getItem(key) == null ? false : JSON.parse(localStorage.getItem(key))
}
}
export default new Utils

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,44 @@
冯文焌:
贡婉宝:
页面部分:
【冯文焌】1:首页
接口:http://127.0.0.1:3030/home/notice
页面编写 和 跳转
【贡婉宝】2:搜索
接口:http://127.0.0.1:3030/home/search
调用公共组件 item,传入数组
【冯文焌】3:详情
接口:http://127.0.0.1:3030/home/info
注意:按钮的状态 和 文字显示
【贡婉宝】4:我的页面
接口:http://127.0.0.1:3030/user/Statistics
注意:从本地读取用户信息,显示在页面上
注意:退出登录 点击 清除本地的 token, 然后跳转到首页
注意:需要登录才可以访问
【冯文焌】5:历史记录界面 (我的 进入)
接口:http://127.0.0.1:3030/user/history
接口:http://127.0.0.1:3030/user/changeStatus
注意:按钮阻止事件冒泡,按照写法来
【贡婉宝】6:个人信息
接口:http://127.0.0.1:3030/user/edit
注意:修改个人信息后,要重新覆盖更新本地用户信息
注意:接口参数其实就是 本地的 token
公共组件封装:
1:列表item,详情 我来写

View File

@@ -0,0 +1,64 @@
webpack 运行的各种配置文件
build/ webpcak 核心运行文件
config/ webpcak 自定配置
src/ 存放源代码
assets/ 静态资源(图片,视频,字体) 会被webpack进行处理,符合条件(10kb)会被合并到app.js
components/ 存放公共组件的地方
router/ vue-router 的配置文件
App.vue 最外层的顶级路由出口
main.js 程序的启动文件(入口)
static/ 静态资源(图片,视频,字体) 只是进行复制到dist文件夹
.babelrc babel的配置文件
.editorconfig 编辑器配置文件
.eslintignore 忽略文件
.eslintrc.js eslint 的配置文件
.gitignore git 忽略文件
.postcssrc.js postcss 插件的配置文件
index.html spa 单页web应用
README.md 帮助文档
vendor.js
manifest.js
Source Map xxxx.map 代码地图
webpack
插件: xxxx-loader
xxx.vue --webpack---> xxx.js
html
css
js
xxx.lb --webpack---> xxx.js
webpack 是 代码编译(打包)工具,有入口、出口、loader 和插件。webpack 是一个用于现代 JavaScript 应用程序的静态模块打包工具
babel????
JavaScript 编译器
新的js语法 --babel--> 转换成所有浏览器通用的js代码 ---> v8
vue 插件
非vue插件 axios
vue插件 vuex
css
css 预处理器
less
sass scss
stylus