b51fd0fe by liding

初始化

0 parents
Showing 276 changed files with 4718 additions and 0 deletions
1 {
2 "presets": ["es2015", "stage-2"],
3 "plugins": ["transform-runtime"],
4 "comments": false,
5 "env": {
6 "test": {
7 "plugins": [ "istanbul" ]
8 }
9 }
10 }
1 {
2 "directory" : "src/assets/",
3 "json" : "",
4 "endpoint" : "",
5 "searchpath" : "",
6 "shorthand_resolver" : ""
7 }
...\ No newline at end of file ...\ No newline at end of file
1 root = true
2
3 [*]
4 charset = utf-8
5 indent_style = space
6 indent_size = 2
7 end_of_line = lf
8 insert_final_newline = true
9 trim_trailing_whitespace = true
1 /node_modules
1 #TpAPI
1 // https://github.com/shelljs/shelljs
2 require('./check-versions')()
3 require('shelljs/global')
4 env.NODE_ENV = 'production'
5
6 var path = require('path')
7 var config = require('../config')
8 var ora = require('ora')
9 var webpack = require('webpack')
10 var webpackConfig = require('./webpack.prod.conf')
11
12 console.log(
13 ' Tip:\n' +
14 ' Built files are meant to be served over an HTTP server.\n' +
15 ' Opening index.html over file:// won\'t work.\n'
16 )
17
18 var spinner = ora('building for production...')
19 spinner.start()
20
21 var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
22 rm('-rf', assetsPath)
23 mkdir('-p', assetsPath)
24 cp('-R', 'static/*', assetsPath)
25
26 webpack(webpackConfig, function (err, stats) {
27 spinner.stop()
28 if (err) throw err
29 process.stdout.write(stats.toString({
30 colors: true,
31 modules: false,
32 children: false,
33 chunks: false,
34 chunkModules: false
35 }) + '\n')
36 })
1 var semver = require('semver')
2 var chalk = require('chalk')
3 var packageConfig = require('../package.json')
4 var exec = function (cmd) {
5 return require('child_process')
6 .execSync(cmd).toString().trim()
7 }
8
9 var versionRequirements = [
10 {
11 name: 'node',
12 currentVersion: semver.clean(process.version),
13 versionRequirement: packageConfig.engines.node
14 },
15 {
16 name: 'npm',
17 currentVersion: exec('npm --version'),
18 versionRequirement: packageConfig.engines.npm
19 }
20 ]
21
22 module.exports = function () {
23 var warnings = []
24 for (var i = 0; i < versionRequirements.length; i++) {
25 var mod = versionRequirements[i]
26 if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
27 warnings.push(mod.name + ': ' +
28 chalk.red(mod.currentVersion) + ' should be ' +
29 chalk.green(mod.versionRequirement)
30 )
31 }
32 }
33
34 if (warnings.length) {
35 console.log('')
36 console.log(chalk.yellow('To use this template, you must update following to modules:'))
37 console.log()
38 for (var i = 0; i < warnings.length; i++) {
39 var warning = warnings[i]
40 console.log(' ' + warning)
41 }
42 console.log()
43 process.exit(1)
44 }
45 }
1 /* eslint-disable */
2 require('eventsource-polyfill')
3 var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4
5 hotClient.subscribe(function (event) {
6 if (event.action === 'reload') {
7 window.location.reload()
8 }
9 })
1 require('./check-versions')()
2 var config = require('../config')
3 if (!process.env.NODE_ENV) process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
4 var path = require('path')
5 var express = require('express')
6 var webpack = require('webpack')
7 var opn = require('opn')
8 var proxyMiddleware = require('http-proxy-middleware')
9 var webpackConfig = require('./webpack.dev.conf')
10
11 // default port where dev server listens for incoming traffic
12 var port = process.env.PORT || config.dev.port
13 // Define HTTP proxies to your custom API backend
14 // https://github.com/chimurai/http-proxy-middleware
15 var proxyTable = config.dev.proxyTable
16
17 var app = express()
18 var compiler = webpack(webpackConfig)
19
20 var devMiddleware = require('webpack-dev-middleware')(compiler, {
21 publicPath: webpackConfig.output.publicPath,
22 quiet: true
23 })
24
25 var hotMiddleware = require('webpack-hot-middleware')(compiler, {
26 log: () => {}
27 })
28 // force page reload when html-webpack-plugin template changes
29 compiler.plugin('compilation', function (compilation) {
30 compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
31 hotMiddleware.publish({ action: 'reload' })
32 cb()
33 })
34 })
35
36 // proxy api requests
37 Object.keys(proxyTable).forEach(function (context) {
38 var options = proxyTable[context]
39 if (typeof options === 'string') {
40 options = { target: options }
41 }
42 app.use(proxyMiddleware(context, options))
43 })
44
45 // handle fallback for HTML5 history API
46 app.use(require('connect-history-api-fallback')())
47
48 // serve webpack bundle output
49 app.use(devMiddleware)
50
51 // enable hot-reload and state-preserving
52 // compilation error display
53 app.use(hotMiddleware)
54
55 // serve pure static assets
56 var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
57 app.use(staticPath, express.static('./static'))
58
59 var uri = 'http://localhost:' + port
60
61 devMiddleware.waitUntilValid(function () {
62 console.log('> Listening at ' + uri + '\n')
63 })
64
65 module.exports = app.listen(port, function (err) {
66 if (err) {
67 console.log(err)
68 return
69 }
70
71 // when env is testing, don't need open it
72 if (process.env.NODE_ENV !== 'testing') {
73 opn(uri)
74 }
75 })
1 var path = require('path')
2 var config = require('../config')
3 var ExtractTextPlugin = require('extract-text-webpack-plugin')
4
5 exports.assetsPath = function (_path) {
6 var assetsSubDirectory = process.env.NODE_ENV === 'production'
7 ? config.build.assetsSubDirectory
8 : config.dev.assetsSubDirectory
9 return path.posix.join(assetsSubDirectory, _path)
10 }
11
12 exports.cssLoaders = function (options) {
13 options = options || {}
14 // generate loader string to be used with extract text plugin
15 function generateLoaders (loaders) {
16 var sourceLoader = loaders.map(function (loader) {
17 var extraParamChar
18 if (/\?/.test(loader)) {
19 loader = loader.replace(/\?/, '-loader?')
20 extraParamChar = '&'
21 } else {
22 loader = loader + '-loader'
23 extraParamChar = '?'
24 }
25 return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
26 }).join('!')
27
28 // Extract CSS when that option is specified
29 // (which is the case during production build)
30 if (options.extract) {
31 return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
32 } else {
33 return ['vue-style-loader', sourceLoader].join('!')
34 }
35 }
36
37 // http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
38 return {
39 css: generateLoaders(['css']),
40 postcss: generateLoaders(['css']),
41 less: generateLoaders(['css', 'less']),
42 sass: generateLoaders(['css', 'sass?indentedSyntax']),
43 scss: generateLoaders(['css', 'sass']),
44 stylus: generateLoaders(['css', 'stylus']),
45 styl: generateLoaders(['css', 'stylus'])
46 }
47 }
48
49 // Generate loaders for standalone style files (outside of .vue)
50 exports.styleLoaders = function (options) {
51 var output = []
52 var loaders = exports.cssLoaders(options)
53 for (var extension in loaders) {
54 var loader = loaders[extension]
55 output.push({
56 test: new RegExp('\\.' + extension + '$'),
57 loader: loader
58 })
59 }
60 return output
61 }
1 var path = require('path')
2 var config = require('../config')
3 var utils = require('./utils')
4 var projectRoot = path.resolve(__dirname, '../')
5
6 var env = process.env.NODE_ENV
7 // check env & config/index.js to decide whether to enable CSS source maps for the
8 // various preprocessor loaders added to vue-loader at the end of this file
9 var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
10 var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
11 var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
12
13 module.exports = {
14 entry: {
15 app: './src/main.js'
16 },
17 output: {
18 path: config.build.assetsRoot,
19 publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
20 filename: '[name].js'
21 },
22 resolve: {
23 extensions: ['', '.js', '.vue', '.json'],
24 fallback: [path.join(__dirname, '../node_modules')],
25 alias: {
26 'vue$': 'vue/dist/vue.common.js',
27 'src': path.resolve(__dirname, '../src'),
28 'assets': path.resolve(__dirname, '../src/assets'),
29
30 'components': path.resolve(__dirname, '../src/components'),
31
32 'common': path.resolve(__dirname, '../src/components/Common'),
33
34 'modules': path.resolve(__dirname, '../src/components/Modules'),
35
36 'demo': path.resolve(__dirname, '../src/components/Modules/Demo'),
37 'function': path.resolve(__dirname, '../src/components/Modules/Function'),
38
39 'config': path.resolve(__dirname, '../src/config'),
40 'store': path.resolve(__dirname, '../src/store'),
41 'libs': path.resolve(__dirname, '../src/libs'),
42 'util': path.resolve(__dirname, '../src/util'),
43 'register': path.resolve(__dirname, '../src/register'),
44 'plugins': path.resolve(__dirname, '../src/plugins'),
45 'mixin': path.resolve(__dirname, '../src/mixin'),
46 }
47 },
48 resolveLoader: {
49 fallback: [path.join(__dirname, '../node_modules')]
50 },
51 module: {
52 loaders: [{
53 test: /\.vue$/,
54 loader: 'vue'
55 }, {
56 test: /\.js$/,
57 loader: 'babel',
58 include: [
59 path.join(projectRoot, 'src')
60 ],
61 exclude: /node_modules/
62 }, {
63 test: /\.json$/,
64 loader: 'json'
65 }, {
66 test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
67 loader: 'url',
68 query: {
69 limit: 10000,
70 name: utils.assetsPath('img/[name].[hash:7].[ext]')
71 }
72 }, {
73 test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
74 loader: 'url',
75 query: {
76 limit: 10000,
77 name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
78 }
79 }]
80 },
81 vue: {
82 loaders: utils.cssLoaders({
83 sourceMap: useCssSourceMap
84 }),
85 postcss: [
86 require('autoprefixer')({
87 browsers: ['last 2 versions']
88 })
89 ]
90 }
91 }
...\ No newline at end of file ...\ No newline at end of file
1 var config = require('../config')
2 var webpack = require('webpack')
3 var merge = require('webpack-merge')
4 var utils = require('./utils')
5 var baseWebpackConfig = require('./webpack.base.conf')
6 var HtmlWebpackPlugin = require('html-webpack-plugin')
7 var FriendlyErrors = require('friendly-errors-webpack-plugin')
8
9 // add hot-reload related code to entry chunks
10 Object.keys(baseWebpackConfig.entry).forEach(function(name) {
11 baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
12 })
13
14 module.exports = merge(baseWebpackConfig, {
15 module: {
16 loaders: utils.styleLoaders({
17 sourceMap: config.dev.cssSourceMap
18 })
19 },
20 // eval-source-map is faster for development
21 devtool: '#eval-source-map',
22 plugins: [
23 new webpack.DefinePlugin({
24 'process.env': config.dev.env
25 }),
26 // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
27 new webpack.optimize.OccurrenceOrderPlugin(),
28 new webpack.HotModuleReplacementPlugin(),
29 new webpack.NoErrorsPlugin(),
30 // https://github.com/ampedandwired/html-webpack-plugin
31 new HtmlWebpackPlugin({
32 filename: 'index.html',
33 template: 'index.html',
34 inject: true
35 }),
36 new FriendlyErrors()
37 ]
38 })
...\ No newline at end of file ...\ No newline at end of file
1 var path = require('path')
2 var config = require('../config')
3 var utils = require('./utils')
4 var webpack = require('webpack')
5 var merge = require('webpack-merge')
6 var baseWebpackConfig = require('./webpack.base.conf')
7 var ExtractTextPlugin = require('extract-text-webpack-plugin')
8 var HtmlWebpackPlugin = require('html-webpack-plugin')
9 var env = config.build.env
10
11 var webpackConfig = merge(baseWebpackConfig, {
12 module: {
13 loaders: utils.styleLoaders({
14 sourceMap: config.build.productionSourceMap,
15 extract: true
16 })
17 },
18 devtool: config.build.productionSourceMap ? '#source-map' : false,
19 output: {
20 path: config.build.assetsRoot,
21 filename: utils.assetsPath('js/[name].[chunkhash].js'),
22 chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
23 },
24 vue: {
25 loaders: utils.cssLoaders({
26 sourceMap: config.build.productionSourceMap,
27 extract: true
28 })
29 },
30 plugins: [
31 // http://vuejs.github.io/vue-loader/en/workflow/production.html
32 new webpack.DefinePlugin({
33 'process.env': env
34 }),
35 new webpack.optimize.UglifyJsPlugin({
36 compress: {
37 warnings: false
38 }
39 }),
40 new webpack.optimize.OccurrenceOrderPlugin(),
41 // extract css into its own file
42 new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')),
43 // generate dist index.html with correct asset hash for caching.
44 // you can customize output by editing /index.html
45 // see https://github.com/ampedandwired/html-webpack-plugin
46 new HtmlWebpackPlugin({
47 filename: config.build.index,
48 template: 'index.html',
49 inject: true,
50 minify: {
51 removeComments: true,
52 collapseWhitespace: true,
53 removeAttributeQuotes: true
54 // more options:
55 // https://github.com/kangax/html-minifier#options-quick-reference
56 },
57 // necessary to consistently work with multiple chunks via CommonsChunkPlugin
58 chunksSortMode: 'dependency'
59 }),
60 // split vendor js into its own file
61 new webpack.optimize.CommonsChunkPlugin({
62 name: 'vendor',
63 minChunks: function(module, count) {
64 // any required modules inside node_modules are extracted to vendor
65 return (
66 module.resource &&
67 /\.js$/.test(module.resource) &&
68 module.resource.indexOf(
69 path.join(__dirname, '../node_modules')
70 ) === 0
71 )
72 }
73 }),
74 // extract webpack runtime and module manifest to its own file in order to
75 // prevent vendor hash from being updated whenever app bundle is updated
76 new webpack.optimize.CommonsChunkPlugin({
77 name: 'manifest',
78 chunks: ['vendor']
79 })
80 ]
81 })
82
83 if (config.build.productionGzip) {
84 var CompressionWebpackPlugin = require('compression-webpack-plugin')
85
86 webpackConfig.plugins.push(
87 new CompressionWebpackPlugin({
88 asset: '[path].gz[query]',
89 algorithm: 'gzip',
90 test: new RegExp(
91 '\\.(' +
92 config.build.productionGzipExtensions.join('|') +
93 ')$'
94 ),
95 threshold: 10240,
96 minRatio: 0.8
97 })
98 )
99 }
100
101 module.exports = webpackConfig
...\ No newline at end of file ...\ No newline at end of file
1 var merge = require('webpack-merge')
2 var prodEnv = require('./prod.env')
3
4 module.exports = merge(prodEnv, {
5 NODE_ENV: '"development"'
6 })
1 // see http://vuejs-templates.github.io/webpack for documentation.
2 var path = require('path');
3
4 module.exports = {
5 build: {
6 env: require('./prod.env'),
7 index: path.resolve(__dirname, '../dist/index.html'),
8 assetsRoot: path.resolve(__dirname, '../dist'),
9 assetsSubDirectory: 'static',
10 assetsPublicPath: './',
11 productionSourceMap: true,
12 // Gzip off by default as many popular static hosts such as
13 // Surge or Netlify already gzip all static assets for you.
14 // Before setting to `true`, make sure to:
15 // npm install --save-dev compression-webpack-plugin
16 productionGzip: false,
17 productionGzipExtensions: ['js', 'css']
18 },
19 dev: {
20 env: require('./dev.env'),
21 port: 8090,
22 assetsSubDirectory: 'static',
23 assetsPublicPath: '/',
24 proxyTable: {
25 '/vuedemo': {
26 target: 'http://127.0.0.1:8087',
27 changeOrigin: true,
28 pathRewrite: {
29 '^/vuedemo': '/vuedemo'
30 }
31 }
32 },
33 // CSS Sourcemaps off by default because relative paths are "buggy"
34 // with this option, according to the CSS-Loader README
35 // (https://github.com/webpack/css-loader#sourcemaps)
36 // In our experience, they generally work as expected,
37 // just be aware of this issue when enabling this option.
38 cssSourceMap: false
39 }
40 }
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 NODE_ENV: '"production"'
3 }
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
7 <link rel="stylesheet" href="static/font-awesome/css/font-awesome.min.css">
8 <link rel="stylesheet" href="static/libs/wangeditor/css/wangEditor.min.css">
9 <link rel="stylesheet" href="static/libs/highlight/styles/github.css">
10 <title>API管理</title>
11 <style>
12 * {
13 -webkit-box-sizing: border-box;
14 -moz-box-sizing: border-box;
15 box-sizing: border-box;
16 margin: 0px;
17 padding: 0px;
18 }
19 </style>
20 </head>
21
22 <body>
23 <div id="app"></div>
24
25 <script src='static/libs/jquery/jquery.min.js'></script>
26 <script src='static/libs/wangeditor/js/wangEditor.js'></script>
27 <script src='static/libs/highlight/highlight.pack.min.js'></script>
28 <script src='static/libs/highlight/highlightjs-line-numbers.min.js'></script>
29 <script>
30 $(function() {
31
32 });
33 </script>
34 </body>
35
36 </html>
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "name": "vuepro",
3 "version": "1.0.0",
4 "description": "vuepro",
5 "author": "test",
6 "private": true,
7 "scripts": {
8 "dev": "node build/dev-server.js",
9 "build": "node build/build.js"
10 },
11 "dependencies": {
12 "axios": "^0.15.3",
13 "css-loader": "^0.25.0",
14 "echarts": "^3.3.2",
15 "element-ui": "^1.1.2",
16 "font-awesome": "^4.7.0",
17 "iview": "^2.0.0-rc.10",
18 "less": "^2.7.2",
19 "less-loader": "^2.2.3",
20 "nprogress": "^0.2.0",
21 "vue": "^2.1.0",
22 "vue-axios": "^1.2.2",
23 "vue-bus": "^0.3.0",
24 "vue-router": "^2.1.1",
25 "vuex": "^2.1.1",
26 "wangeditor": "^2.1.22"
27 },
28 "devDependencies": {
29 "autoprefixer": "^6.4.0",
30 "babel-core": "^6.0.0",
31 "babel-loader": "^6.0.0",
32 "babel-plugin-transform-runtime": "^6.0.0",
33 "babel-preset-es2015": "^6.0.0",
34 "babel-preset-stage-2": "^6.0.0",
35 "babel-register": "^6.0.0",
36 "chalk": "^1.1.3",
37 "connect-history-api-fallback": "^1.1.0",
38 "css-loader": "^0.25.0",
39 "eventsource-polyfill": "^0.9.6",
40 "express": "^4.13.3",
41 "extract-text-webpack-plugin": "^1.0.1",
42 "file-loader": "^0.9.0",
43 "friendly-errors-webpack-plugin": "^1.1.2",
44 "function-bind": "^1.0.2",
45 "html-webpack-plugin": "^2.8.1",
46 "http-proxy-middleware": "^0.17.2",
47 "json-loader": "^0.5.4",
48 "semver": "^5.3.0",
49 "opn": "^4.0.2",
50 "ora": "^0.3.0",
51 "shelljs": "^0.7.4",
52 "url-loader": "^0.5.7",
53 "vue-loader": "^10.0.0",
54 "vue-style-loader": "^1.0.0",
55 "vue-template-compiler": "^2.1.0",
56 "webpack": "^1.13.2",
57 "webpack-dev-middleware": "^1.8.3",
58 "webpack-hot-middleware": "^2.12.2",
59 "webpack-merge": "^0.14.1"
60 },
61 "engines": {
62 "node": ">= 4.0.0",
63 "npm": ">= 3.0.0"
64 }
65 }
1 <template>
2 <div id="app">
3 <head-nav></head-nav>
4 <transition >
5 <router-view></router-view>
6 </transition>
7 </div>
8 </template>
9
10 <script>
11 import Layout from './components/Layout/';
12 export default {
13 name: 'app',
14 components: Layout,
15 methods:{
16
17 },
18 mounted(){
19
20 },
21 watch:{
22 $route(to,from){
23 // console.log(to);
24 if (!to.matched.length) {
25 this.$router.push('/404');
26 }
27 }
28 }
29 }
30 </script>
31 <style scoped lang='less'>
32 .bounce-enter-active {
33 animation: bounce-in .5s;
34 -webkit-animation:bounce-in .5s;
35 }
36
37 .bounce-leave-active {
38 animation: bounce-out .2s;
39 -webkit-animation: bounce-out .2s;
40 }
41
42 @keyframes bounce-in {
43 0% {
44 transform: scale(0);
45 }
46 50% {
47 transform: scale(1.05);
48 }
49 100% {
50 transform: scale(1);
51 }
52 }
53
54 @keyframes bounce-out {
55 0% {
56 transform: scale(1);
57 }
58 50% {
59 transform: scale(0.95);
60 }
61 100% {
62 transform: scale(0);
63 }
64 }
65 </style>
1 html,
2 body,
3 h1,
4 h2,
5 h3,
6 h4,
7 h5,
8 h6,
9 div,
10 dl,
11 dt,
12 dd,
13 ul,
14 ol,
15 li,
16 p,
17 blockquote,
18 pre,
19 hr,
20 figure,
21 table,
22 caption,
23 th,
24 td,
25 form,
26 fieldset,
27 legend,
28 input,
29 button,
30 textarea,
31 menu {
32 margin: 0;
33 padding: 0;
34 }
35
36 header,
37 footer,
38 section,
39 article,
40 aside,
41 nav,
42 hgroup,
43 address,
44 figure,
45 figcaption,
46 menu,
47 details {
48 display: block;
49 }
50
51 table {
52 border-collapse: collapse;
53 border-spacing: 0;
54 }
55
56 caption,
57 th {
58 text-align: left;
59 font-weight: normal;
60 }
61
62 html,
63 body,
64 fieldset,
65 img,
66 iframe,
67 abbr {
68 border: 0;
69 }
70
71 i,
72 cite,
73 em,
74 var,
75 address,
76 dfn {
77 font-style: normal;
78 }
79
80 [hidefocus],
81 summary {
82 outline: 0;
83 }
84
85 li {
86 list-style: none;
87 }
88
89 h1,
90 h2,
91 h3,
92 h4,
93 h5,
94 h6,
95 small {
96 font-size: 100%;
97 }
98
99 q:before,
100 q:after {
101 content: none;
102 }
103
104 textarea {
105 overflow: auto;
106 resize: none;
107 }
108
109 label,
110 summary {
111 cursor: default;
112 }
113
114 a,
115 button {
116 cursor: pointer;
117 }
118
119 blockquote {
120 display: block;
121 -webkit-margin-before: 1em;
122 -webkit-margin-after: 1em;
123 -webkit-margin-start: 40px;
124 -webkit-margin-end: 40px;
125 padding: 10px 20px;
126 margin: 0 0 20px;
127 font-size: 17.5px;
128 border-left: 5px solid #eeeeee;
129 font-size: 12px;
130 color: #407aaa;
131 }
132
133 .clear {
134 clear: both;
135 height: 0;
136 line-height: 0;
137 font-size: 0;
138 }
139
140 .code {
141 font-size: 12px;
142 color: #595959;
143 border: 1px dashed #cecfcf;
144 background-color: #f5f6f7;
145 padding: 6px 12px;
146 margin-top: 10px;
147 margin-bottom: 10px;
148 }
149
150 .code pre {
151 border: 0px;
152 color: #595959;
153 font-family: Tahoma, "SimSun"!important;
154 font-weight: 100;
155 line-height: 24px;
156 font-size: 12px;
157 white-space: pre-wrap;
158 word-wrap: break-word;
159 }
160
161 .layout {
162 /*border: 1px solid #d7dde4;*/
163 background: #f5f7f9;
164 }
165
166 .layout-breadcrumb {
167 margin-bottom: 5px;
168 border: 1px solid #f5f7f9;
169 background: #fff;
170 }
171
172 .layout-assistant {
173 width: 100%;
174 margin: 0 auto;
175 height: 50px;
176 line-height: 50px;
177 background: #B0C4DE;
178 /*background: #657180;*/
179 }
180
181 .layout-assistant .layout-assistant-content {
182 width: 95%;
183 margin: 0 auto;
184 padding-top: 10px;
185 }
186
187 .ass-input {
188 width: 300px;
189 float: right;
190 }
191
192 .layout-content {
193 min-height: 500px;
194 margin: 15px auto;
195 width: 95%;
196 overflow: hidden;
197 border-radius: 6px;
198 background: #fff;
199 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
200 }
201
202 .layout-content-main {
203 padding: 10px 10px 0 20px;
204 background: #fff;
205 }
206
207 .layout-content-main:after {
208 content: "";
209 display: block;
210 width: 1px;
211 background: #d7dde4;
212 position: absolute;
213 top: 0;
214 bottom: 0;
215 left: -1px;
216 }
217
218 .layout-copy {
219 text-align: center;
220 background: #fff;
221 padding: 10px 0 20px;
222 color: #9ea7b4;
223 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class='bread'>
3 <strong>
4 {{strong}}
5 </strong>
6 <Breadcrumb separator="/" class='el-bread'>
7 <Breadcrumb-item href="{ path: '/' }">首页</Breadcrumb-item>
8 <Breadcrumb-item v-for='(item,index) in $route.matched'>{{item.name}}</Breadcrumb-item>
9 </Breadcrumb>
10 </div>
11 </template>
12
13 <script>
14 export default {
15 name: 'bread',
16 data () {
17 return {
18 strong:''
19 }
20 },
21 methods:{
22 getPageText(name){
23 return name=name.replace('编辑',this.$route.query.id ? '修改' : '添加');
24 }
25 },
26 mounted(){
27
28 },
29 created(){
30 if (this.$route.matched.length) {
31 var name=this.$route.matched[this.$route.matched.length-1].name;
32 this.strong=this.getPageText(name);
33 }
34 },
35 watch:{
36 $route(to,from){
37 this.strong=this.getPageText(to.name);
38 }
39 }
40 }
41 </script>
42
43 <style scoped lang='less'>
44 .bread{
45 height: 40px;
46 line-height: 26px;
47 .el-bread{
48 display: inline-block;
49 float: right;
50 text-align: right;
51 line-height: 26px;
52 }
53 }
54 </style>
1 module.exports = {
2 name: 'dialog-info',
3 data() {
4 return {
5 dialog: this.Dialog || {}
6 }
7 },
8 methods: {
9 onClose() {
10 this.dialog.show = false;
11 }
12 },
13
14 computed: {
15 show() {
16 return this.dialog.show;
17 }
18 },
19
20 mounted() {
21 // console.log(this.Show);
22 },
23
24 /**
25 * 接收参数
26 * @type {Object}
27 */
28 props: {
29 Dialog: {
30 type: Object,
31 validator: (v) => {
32 return true;
33 }
34 }
35 },
36
37
38 /**
39 * 监控参数
40 * @type {Object}
41 */
42 watch: {
43
44 }
45 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="">
3 <el-dialog size="tiny"
4 :title="dialog.title"
5 v-model="show"
6 @close='onClose'>
7 <el-form style="margin:20px;width:60%;min-width:100%"
8 label-width="100px">
9 <el-form-item class='edit-form'
10 v-for='field in dialog.fields'
11 :label='field.label'>
12 {{dialog.data[field.key]}}
13 </el-form-item>
14 </el-form>
15 <span slot="footer" class="dialog-footer">
16 <el-button type="primary" @click="onClose">关 闭</el-button>
17 </span>
18 </el-dialog>
19 </div>
20 </template>
21
22 <script>
23 import DialogInfoJs from './DialogInfo.js';
24 module.exports=DialogInfoJs;
25 </script>
26 <style scoped lang='less'>
27 .demo-form-inline{
28 display: inline-block;
29 float: right;
30 }
31 .btm-action{
32 margin-top: 20px;
33 text-align: center;
34 }
35 .actions-top{
36 height: 46px;
37 }
38 .pagination{
39 display: inline-block;
40 }
41 </style>
1 import DialogInfo from './DialogInfo.vue';
2 module.exports = DialogInfo;
...\ No newline at end of file ...\ No newline at end of file
1 import echarts from 'echarts';
2 module.exports = {
3 name: 'echarts',
4 data() {
5 return {
6 chartDom: null,
7 data: {
8 id: this.id,
9 title: this.title,
10 subtext: this.subtext,
11 hover_title: this.hoverTitle,
12 text_list: this.textList,
13 value_list: this.valueList
14 },
15 }
16 },
17 methods: {
18 init() {
19 //基于准备好的dom,初始化echarts实例
20 if (this.data.id) {
21 this.chartDom = echarts.init(document.getElementById(this.data.id));
22 }
23 return this;
24 },
25 update() {
26 if (this.chartDom === null) {
27 this.init();
28 }
29
30 if (this.chartDom) {
31 this.chartDom.setOption({
32 title: {
33 text: this.data.title,
34 subtext: this.data.subtext
35 },
36 tooltip: {},
37 xAxis: {
38 data: this.data.text_list
39 },
40 yAxis: {},
41 series: [{
42 name: this.data.hover_title,
43 type: 'bar',
44 data: this.data.value_list
45 }]
46 });
47 }
48 }
49 },
50 mounted: function() {
51 this.init()
52 .update(this.data);
53 },
54 props: {
55 id: [String],
56 title: [String, Number],
57 subtext: [String, Number],
58 hoverTitle: [String, Number],
59 textList: {
60 type: Array,
61 required: true
62 },
63 valueList: {
64 type: Array,
65 required: true
66 }
67 },
68 watch: {
69 valueList(v) {
70 this.data.value_list = v;
71 this.update();
72 },
73 textList(v) {
74 this.data.text_list = v;
75 this.update();
76 },
77 title(v) {
78 this.data.title = v;
79 this.update();
80 },
81 subtext(v) {
82 this.data.subtext = v;
83 this.update();
84 },
85 hoverTitle(v) {
86 this.data.hover_title = v;
87 this.update();
88 }
89 }
90 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <section class="chart">
3 <el-row>
4 <el-col :span="24">
5 <div :id="data.id" style="width:100%; height:400px;"></div>
6 </el-col>
7 </el-row>
8 </section>
9 </template>
10 <script>
11 import DefaultJs from './Default.js';
12 module.exports=DefaultJs;
13 </script>
14 <style scoped>
15
16 </style>
1 import Default from './Default.vue';
2 module.exports = Default;
...\ No newline at end of file ...\ No newline at end of file
1 import echarts from 'echarts';
2 module.exports = {
3 name: 'echarts',
4 data() {
5 return {
6 chartDom: null,
7 data: {},
8 }
9 },
10 methods: {
11 init() {
12 //基于准备好的dom,初始化echarts实例
13 this.chartDom = echarts.init(document.getElementById('chartDom'));
14 return this;
15 },
16 update() {
17 if (this.chartDom === null) {
18 this.init();
19 }
20 this.chartDom.setOption({
21 title: {
22 text: 'Bar Chart',
23 subtext: '数据来自网络'
24 },
25 tooltip: {
26 trigger: 'axis',
27 axisPointer: {
28 type: 'shadow'
29 }
30 },
31 legend: {
32 data: ['2011年', '2012年']
33 },
34 grid: {
35 left: '3%',
36 right: '4%',
37 bottom: '3%',
38 containLabel: true
39 },
40 xAxis: {
41 type: 'value',
42 boundaryGap: [0, 0.01]
43 },
44 yAxis: {
45 type: 'category',
46 data: ['巴西', '印尼', '美国', '印度', '中国', '世界人口(万)']
47 },
48 series: [{
49 name: '2011年',
50 type: 'bar',
51 data: [18203, 23489, 29034, 104970, 131744, 630230]
52 }, {
53 name: '2012年',
54 type: 'bar',
55 data: [19325, 23438, 31000, 121594, 134141, 681807]
56 }]
57 });
58 }
59 },
60 mounted: function() {
61 this.init()
62 .update(this.data);
63 }
64 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <section class="chart">
3 <el-row>
4 <el-col :span="24">
5 <div id="chartDom" style="width:100%; height:400px;"></div>
6 </el-col>
7 </el-row>
8 </section>
9 </template>
10 <script>
11 import HorizontalJs from './Horizontal.js';
12 module.exports=HorizontalJs;
13 </script>
14 <style scoped>
15
16 </style>
1 import Horizontal from './Horizontal.vue';
2 module.exports = Horizontal;
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Default: require('./Default/'),
3 Horizontal: require('./Horizontal/')
4 };
...\ No newline at end of file ...\ No newline at end of file
1 import echarts from 'echarts';
2 module.exports = {
3 name: 'echarts',
4 data() {
5 return {
6 chartDom: null,
7 data: {
8 title: '垂直方向柱状标题',
9 subtext: '子标题描述信息',
10 },
11 }
12 },
13 methods: {
14 init() {
15 //基于准备好的dom,初始化echarts实例
16 this.chartDom = echarts.init(document.getElementById('chartDom'));
17 return this;
18 },
19 update() {
20 if (this.chartDom === null) {
21 this.init();
22 }
23 this.chartDom.setOption({
24 title: {
25 text: 'Line Chart'
26 },
27 tooltip: {
28 trigger: 'axis'
29 },
30 legend: {
31 data: ['邮件营销', '联盟广告', '搜索引擎']
32 },
33 grid: {
34 left: '3%',
35 right: '4%',
36 bottom: '3%',
37 containLabel: true
38 },
39 xAxis: {
40 type: 'category',
41 boundaryGap: false,
42 data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
43 },
44 yAxis: {
45 type: 'value'
46 },
47 series: [{
48 name: '邮件营销',
49 type: 'line',
50 stack: '总量',
51 data: [120, 132, 101, 134, 90, 230, 210]
52 }, {
53 name: '联盟广告',
54 type: 'line',
55 stack: '总量',
56 data: [220, 182, 191, 234, 290, 330, 310]
57 }, {
58 name: '搜索引擎',
59 type: 'line',
60 stack: '总量',
61 data: [820, 932, 901, 934, 1290, 1330, 1320]
62 }]
63 });
64 }
65 },
66 mounted: function() {
67 this.init()
68 .update();
69 }
70 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <section class="chart">
3 <el-row>
4 <el-col :span="24">
5 <div id="chartDom" style="width:100%; height:400px;"></div>
6 </el-col>
7 </el-row>
8 </section>
9 </template>
10 <script>
11 import DefaultJs from './Default.js';
12 module.exports=DefaultJs;
13 </script>
14 <style scoped>
15
16 </style>
1 import Default from './Default.vue';
2 module.exports = Default;
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Default: require('./Default/')
3 };
...\ No newline at end of file ...\ No newline at end of file
1 import echarts from 'echarts';
2 module.exports = {
3 name: 'echarts',
4 data() {
5 return {
6 chartDom: null,
7 data: {
8 id: this.id,
9 title: this.title,
10 subtext: this.subtext,
11 hover_title: this.hoverTitle,
12 data_list: this.dataList,
13 text_list: []
14 },
15 }
16 },
17 methods: {
18 init() {
19 //基于准备好的dom,初始化echarts实例
20 if (this.data.id) {
21 this.chartDom = echarts.init(document.getElementById(this.data.id));
22 }
23 return this;
24 },
25 update() {
26 if (this.chartDom === null) {
27 this.init();
28 }
29 this.chartDom.setOption({
30 title: {
31 text: this.data.title,
32 subtext: this.data.subtext,
33 x: 'center'
34 },
35 tooltip: {
36 trigger: 'item',
37 formatter: "{a} <br/>{b} : {c} ({d}%)"
38 },
39 legend: {
40 orient: 'vertical',
41 left: 'left',
42 data: this.data.text_list
43 },
44 series: [{
45 name: this.data.hover_title,
46 type: 'pie',
47 radius: '55%',
48 // center: ['50%', '60%'],
49 data: this.data.data_list,
50 itemStyle: {
51 emphasis: {
52 shadowBlur: 10,
53 shadowOffsetX: 0,
54 shadowColor: 'rgba(0, 0, 0, 0.5)'
55 }
56 }
57 }]
58 });
59 },
60
61 updateTextList() {
62 var data = this.data.data_list;
63 this.data.text_list = [];
64 for (var i = 0; i < data.length; i++) {
65 this.data.text_list.push(data[i].name);
66 }
67 return this;
68 }
69 },
70 mounted: function() {
71 this.updateTextList()
72 .init()
73 .update();
74 },
75 props: {
76 id: {
77 type: String,
78 required: true
79 },
80 title: [String, Number],
81 subtext: [String, Number],
82 hoverTitle: [String, Number],
83 dataList: {
84 type: Array,
85 required: true
86 }
87 },
88 watch: {
89 dataList(v) {
90 this.data.value_list = v;
91 this.updateTextList().update();
92 },
93 title(v) {
94 this.data.title = v;
95 this.update();
96 },
97 subtext(v) {
98 this.data.subtext = v;
99 this.update();
100 },
101 hoverTitle(v) {
102 this.data.hover_title = v;
103 this.update();
104 }
105 }
106 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <section class="chart">
3 <el-row>
4 <el-col :span="24">
5 <div :id="data.id" style="width:100%; height:400px;"></div>
6 </el-col>
7 </el-row>
8 </section>
9 </template>
10 <script>
11 import DefaultJs from './Default.js';
12 module.exports=DefaultJs;
13 </script>
14 <style scoped>
15
16 </style>
1 import Default from './Default.vue';
2 module.exports = Default;
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Default: require('./Default/')
3 };
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Bar: require('./Bar/'),
3 Pie: require('./Pie/'),
4 Line: require('./Line/')
5 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="form">
3 <el-form style=""
4 label-width="100px"
5 ref='form-data'
6 :rules='rules'
7 :model='submit_data'>
8 <el-form-item
9 class='edit-form'
10 v-for='field in fields'
11 :label="field.label"
12 :prop='field.key'
13 :style="field.item_style">
14
15 <!-- 单选CheckBox -->
16 <el-checkbox
17 v-if='field.type==="checkbox" && field.multiple!==true'
18 v-model="submit_data[field.key]">{{field.label}}</el-checkbox>
19
20
21 <!-- 复选CheckBox -->
22 <!-- 是否全选全不选 -->
23 <el-checkbox
24 v-if='field.checkall && typeof field.checkall==="object" && submit_data[field.key+checkall_temp]'
25 :indeterminate="submit_data[field.key+checkall_temp].indeterminate"
26 v-model="submit_data[field.key+checkall_temp].value"
27 @change='onCheckallChange(field.key)'>{{submit_data[field.key+checkall_temp].text}}</el-checkbox>
28 <!-- CheckBox选项列表 -->
29 <el-checkbox-group
30 v-if='(field.type==="checkbox" && field.multiple===true && !field.checkall) || (field.type==="checkbox" && field.multiple===true && field.checkall && submit_data[field.key+checkall_temp])'
31 v-model="submit_data[field.key+checkall_temp].checkbox_value"
32 @change='onCheckboxChange(field.key)'>
33 <el-checkbox
34 v-for='item in submit_data[field.key+checkall_temp].checkbox_list'
35 :label="item.value">{{item.text}}</el-checkbox>
36 </el-checkbox-group>
37
38 <!-- wangeditor -->
39 <div
40 v-if='field.type==="editor"'
41 :id="field.id"
42 :style="field.style"
43 v-html='submit_data[field.key]'></div>
44
45 <!--
46 input,textarea
47 -->
48 <el-input
49 v-if='!field.type || field.type==="input" || field.type==="textarea"'
50 :type='!field.type ? "input" : field.type'
51 v-model="submit_data[field.key]"
52 :placeholder='field.desc'></el-input>
53
54 <!--
55 radia,单选
56 -->
57 <el-radio-group
58 v-if='field.type==="radio"'
59 v-model="submit_data[field.key]">
60 <el-radio
61 v-for='item in field.value.list'
62 :label="item.value">{{item.text || item.value}}</el-radio>
63 </el-radio-group>
64
65 <!-- select,下拉框 -->
66 <el-select
67 v-if='field.type==="select" && submit_data[field.key]'
68 v-model="submit_data[field.key]"
69 :multiple='field.multiple ? true : false'
70 :placeholder="field.desc">
71 <el-option
72 v-for='item in field.value.list'
73 :value="item.value"
74 :label="item.text || item.value"></el-option>
75 </el-select>
76
77 <!--
78 switch,开关
79 -->
80 <el-switch
81 v-if='field.type==="switch"'
82 :on-text="field.value.on"
83 :off-text="field.value.off"
84 :disabled='field.disabled'
85 v-model="submit_data[field.key]"></el-switch>
86 </el-form-item>
87
88 <el-form-item>
89 <el-button type="primary" @click='onSubmit("form-data")'>提交</el-button>
90 </el-form-item>
91 </el-form>
92 </div>
93 </template>
94
95 <script>
96 import FormDataJs from './FormData.js';
97 module.exports=FormDataJs;
98 </script>
99 <style scoped lang='less'>
100 .demo-form-inline{
101 display: inline-block;
102 float: right;
103 }
104 .btm-action{
105 margin-top: 20px;
106 text-align: center;
107 }
108 .actions-top{
109 height: 46px;
110 }
111 .pagination{
112 display: inline-block;
113 }
114 </style>
1 import FormData from './FormData.vue';
2 module.exports = FormData;
...\ No newline at end of file ...\ No newline at end of file
1 import {
2 user as UserApi,
3 system as SystemApi
4 } from '../../../config/request.js';
5
6 module.exports = {
7 name: 'head-nav',
8 data() {
9 return {
10 dialog: {
11 show_set: false,
12 show_pass: false,
13 title: '修改密码',
14 user_info: this.$store.state.user.userinfo,
15
16 set_info: {
17 login_style: '',
18 disabled_update_pass: [],
19 select_users: []
20 },
21
22 user_info_rules: {
23 old_password: [{
24 required: true,
25 message: '旧密码不能为空!',
26 trigger: 'blur'
27 }],
28 password: [{
29 required: true,
30 message: '新密码不能为空!',
31 trigger: 'blur'
32 }, {
33 trigger: 'blur',
34 validator: (rule, value, callback) => {
35 if (value === '') {
36 callback(new Error('请再次输入密码'));
37 } else {
38 if ('' !== this.dialog.user_info.password) {
39 this.$refs.user_info.validateField('password_confirm');
40 }
41 callback();
42 }
43 }
44 }],
45 password_confirm: [{
46 required: true,
47 message: '确认密码不能为空!',
48 trigger: 'blur'
49 }, {
50 trigger: 'blur',
51 validator: (rule, value, callback) => {
52 if (value === '') {
53 callback(new Error('请再次输入密码'));
54 } else if (value !== this.dialog.user_info.password) {
55 callback(new Error('两次输入密码不一致!'));
56 } else {
57 callback();
58 }
59 }
60 }],
61 }
62 }
63 }
64 },
65 mounted() {
66 // this.onGetSetting();
67 },
68 methods: {
69 /**
70 * 退出登录
71 */
72 logout() {
73 this.$confirm('你确定退出登录么?', '确认退出', {
74 confirmButtonText: '确定',
75 cancelButtonText: '取消',
76 type: 'warning'
77 }).then(() => {
78 this.$store.dispatch('remove_userinfo').then(() => {
79 this.$router.push('/login');
80 });
81 });
82 },
83
84 /**
85 * 弹出框-修改密码或者系统设置
86 * @param {string} cmditem 弹框类型
87 */
88 setDialogInfo(cmditem) {
89 if (!cmditem) {
90 this.$message.error('菜单选项缺少command属性');
91 return;
92 }
93 switch (cmditem) {
94 case 'info':
95 this.$router.push({
96 path: '/demo/user/edit',
97 query: {
98 id: this.$store.state.user.userinfo.id
99 }
100 });
101 break;
102 case 'pass':
103 this.dialog.show_pass = true;
104 this.dialog.title = '修改密码';
105 break;
106 case 'set':
107 this.onGetSetting();
108 this.dialog.show_set = true;
109 this.dialog.title = '系统设置';
110 break;
111 }
112 },
113
114 /**
115 * 修改密码
116 * @param {object} userinfo 当前修改密码的表单信息
117 */
118 updUserPass(userinfo) {
119 this.$refs[userinfo].validate((valid) => {
120 if (valid) {
121 UserApi.updPass.call(this, {
122 old_password: this.dialog[userinfo].old_password,
123 password: this.dialog[userinfo].password,
124 password_confirm: this.dialog[userinfo].password_confirm
125 }, (data) => {
126 this.dialog.show_pass = false;
127 // this.$nextTick(() => {
128 this.$message.success('修改成功!');
129 // });
130 });
131 }
132 });
133 },
134
135 /**
136 * 获取系统设置信息
137 */
138 onGetSetting() {
139 //获取系统设置信息
140 if (this.$store.state.user.userinfo.pid == 0) {
141 SystemApi.getSetting.call(this, (data) => {
142 // console.log(data);
143 if (data.setting_info.disabled_update_pass) {
144 data.setting_info.disabled_update_pass = data.setting_info.disabled_update_pass.split(',');
145 } else {
146 data.setting_info.disabled_update_pass = [];
147 }
148 data.setting_info.login_style = data.setting_info.login_style + '';
149
150 this.dialog.set_info = data.setting_info;
151 });
152 } else {
153 this.$message.error('只有管理员才能操作!');
154 }
155 },
156
157 /**
158 * 修改系统设置信息
159 */
160 onUpdateSetting() {
161 // console.log(this.dialog.set_info.login_style);
162 // console.log(this.dialog.set_info.disabled_update_pass);
163 // console.log(this.dialog.set_info.id);
164
165 SystemApi.updateSetting.call(this, {
166 id: this.dialog.set_info.id,
167 login_style: this.dialog.set_info.login_style,
168 disabled_update_pass: this.dialog.set_info.disabled_update_pass && this.dialog.set_info.disabled_update_pass.length ? this.dialog.set_info.disabled_update_pass.join(',') : ''
169 }, (data) => {
170 // console.log(data);
171 this.dialog.show_set = false;
172 });
173 }
174 }
175 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <header class="head-nav">
3 <el-row>
4 <el-col :span="4" class='logo-container'>
5 <img src="../../../assets/logo-sm.png" class='logo' alt="">
6 </el-col>
7 <el-col :span="16">
8 <el-menu theme="dark" :default-active="$store.state.router.headerCurRouter" class="el-menu-demo" mode="horizontal" unique-opened router>
9 <!-- <el-submenu index="1">
10 <template slot="title">向导中心</template>
11 <el-menu-item index="1-1">快捷方式1</el-menu-item>
12 <el-menu-item index="1-2">快捷方式2</el-menu-item>
13 <el-menu-item index="1-3">快捷方式3</el-menu-item>
14 </el-submenu>
15 <el-submenu index="2">
16 <template slot="title">商城中心</template>
17 <el-menu-item index="2-1">订单统计</el-menu-item>
18 <el-menu-item index="2-2">其他</el-menu-item>
19 </el-submenu> -->
20 <!-- <el-menu-item index="2">商城中心</el-menu-item>
21 <el-menu-item index="3">系统设置</el-menu-item> -->
22
23 <!-- v-if='!item.hidden && $store.state.user.userinfo.access.indexOf(item.path)===-1' -->
24 <el-menu-item
25 :index="item.path"
26 v-for='(item,index) in $router.options.routes'
27 v-if='!item.hidden'>
28 {{item.name}}<!-- {{item.path}} -->
29 </el-menu-item>
30 </el-menu>
31 </el-col>
32 <el-col :span="4" class="userinfo">
33 <!-- <span class='username'><i class='fa fa-user'></i>{{this.$store.state.user.userinfo.username}}</span> -->
34 <span class='username'>
35 <el-dropdown
36 trigger="click"
37 @command='setDialogInfo'>
38 <span class="el-dropdown-link">
39 {{this.$store.state.user.userinfo.username}}<i class="el-icon-caret-bottom el-icon--right"></i>
40 </span>
41 <el-dropdown-menu slot="dropdown">
42 <el-dropdown-item command='info'>修改信息</el-dropdown-item>
43 <el-dropdown-item
44 command='pass'
45 v-if='$store.state.user.userinfo.is_update_pass'>修改密码</el-dropdown-item>
46 <el-dropdown-item
47 command='set'
48 v-if='$store.state.user.userinfo.pid==0'>系统设置</el-dropdown-item>
49 </el-dropdown-menu>
50 </el-dropdown>
51 </span>
52 <i class="fa fa-sign-out logout" @click='logout'></i>
53 </el-col>
54 </el-row>
55
56 <el-dialog size="tiny" :title="dialog.title"
57 v-model="dialog.show_pass">
58 <el-form style="margin:20px;width:80%;"
59 label-width="100px"
60 :model="dialog.user_info"
61 :rules="dialog.user_info_rules"
62 ref='user_info'>
63 <el-form-item class='edit-form'
64 label="邮箱"
65 prop='email'>
66 <el-input v-model="dialog.user_info.email" disabled placeholder='常用邮箱'></el-input>
67 </el-form-item>
68 <el-form-item class='edit-form'
69 label="用户名称"
70 prop='username'>
71 <el-input v-model="dialog.user_info.username" disabled placeholder='用户名'></el-input>
72 </el-form-item>
73 <el-form-item class='edit-form'
74 label="当前密码"
75 prop='old_password'>
76 <el-input
77 type='password'
78 placeholder='当前密码'
79 auto-complete='off'
80 v-model="dialog.user_info.old_password"></el-input>
81 </el-form-item>
82 <el-form-item class='edit-form'
83 label="新密码"
84 prop='password'>
85 <el-input
86 type='password'
87 placeholder='新密码'
88 auto-complete='off'
89 v-model="dialog.user_info.password"></el-input>
90 </el-form-item>
91 <el-form-item class='edit-form'
92 label="确认密码"
93 prop='password_confirm'>
94 <el-input
95 type='password'
96 placeholder='确认密码'
97 auto-complete='off'
98 v-model="dialog.user_info.password_confirm"></el-input>
99 </el-form-item>
100 </el-form>
101 <span slot="footer" class="dialog-footer">
102 <el-button @click="dialog.show_pass = false">取 消</el-button>
103 <el-button type="primary" @click="updUserPass('user_info')">确 定</el-button>
104 </span>
105 </el-dialog>
106
107
108 <el-dialog size="small" :title="dialog.title"
109 v-model="dialog.show_set">
110 <el-form style="margin:20px;width:80%;"
111 label-width="100px"
112 v-model='dialog.set_info'
113 ref='set_info'>
114 <el-form-item label="登录方式">
115 <el-select placeholder="请选择登录方式"
116 v-model='dialog.set_info.login_style'>
117 <el-option label="单一登录" value="1"></el-option>
118 <el-option label="多点登录" value="2"></el-option>
119 </el-select>
120 </el-form-item>
121 <el-form-item label="禁止修改密码">
122 <el-select placeholder="请选择用户"
123 multiple
124 v-model='dialog.set_info.disabled_update_pass'>
125 <!-- value的值的ID是number,disabled_update_pass的元素中的是字符串,
126 所以在value上,需要拼装一个空串,来转化
127 因为elementUI内部用了===
128 -->
129 <el-option
130 v-for='user in dialog.set_info.select_users'
131 :label='user.username'
132 :value='user.id+""'></el-option>
133 </el-select>
134 </el-form-item>
135 </el-form>
136 <span slot="footer" class="dialog-footer">
137 <el-button @click="dialog.show_set = false">取 消</el-button>
138 <el-button type="primary" @click="onUpdateSetting">确 定</el-button>
139 </span>
140 </el-dialog>
141 </header>
142 </template>
143
144 <script>
145 import HeadNavJs from './HeadNav.js';
146 export default HeadNavJs;
147 </script>
148
149 <style scoped lang='less'>
150 .logo-container{
151 height: 60px;
152 }
153 .logo{
154 height: 50px;
155 width: auto;
156 margin-left: 10px;
157 margin-top: 5px;
158 }
159 .fa-user{
160 position: relative;
161 top:-2px;
162 margin-right: 4px;
163 }
164 .head-nav{
165 width:100%;
166 height: 60px;
167 background: #324057;
168 position: fixed;
169 top:0px;
170 left:0px;
171 z-index: 999;
172 color:#FFF;
173 border-bottom: 1px solid #1F2D3D;
174
175 .logout{
176 width:60px;
177 height: 60px;
178 line-height: 60px;
179 text-align: center;
180 float: right;
181 cursor: pointer;
182 }
183 }
184 .userinfo{
185 text-align: right;
186 }
187 .username{
188 height: 60px;
189 line-height: 60px;
190 cursor: pointer;
191
192 .el-dropdown{
193 color:#FFF;
194 }
195 }
196 </style>
1 <template>
2 <div class="left" :style="{'height':win_size.height,'width':$store.state.leftmenu.width}" id='admin-left'>
3 <div id='left-menu'>
4 <Row class='tac'
5 v-for="(route,index) in $router.options.routes"
6 v-if='!route.hidden && $route.matched.length && $route.matched[0].path===route.path'>
7 <Col :span="24">
8 <el-menu
9 class="el-menu-vertical-demo"
10 theme="dark"
11 :default-active="$route.path"
12 unique-opened
13 router>
14 <!-- v-if="!item.hidden && $store.state.user.userinfo.access.indexOf(route.path+'/'+item.path)===-1" -->
15 <template
16 v-for="(item,index) in route.children"
17 v-if="!item.hidden">
18 <el-submenu
19 :index="item.path">
20 <template
21 slot="title">
22 <el-tooltip
23 class="item"
24 effect="dark"
25 placement="right"
26 :disabled="$store.state.leftmenu.menu_flag"
27 :content="item.name">
28 <i :class="'fa fa-'+item.icon"></i>
29 </el-tooltip>
30 <span
31 class='menu-name'
32 v-if="$store.state.leftmenu.menu_flag">{{item.name}}<!-- {{route.path+'/'+item.path}} --></span>
33 </template>
34
35 <!-- v-if="!child.hidden && $store.state.user.userinfo.access.indexOf(route.path+'/'+item.path+'/'+child.path)===-1" -->
36 <el-menu-item
37 v-for='(child,cindex) in item.children'
38 v-if="!child.hidden"
39 :style="{'padding-left':$store.state.leftmenu.menu_flag? '40px' : '23px'}"
40 :index='$store.state.router.headerCurRouter+"/"+item.path+"/"+child.path'>
41 <el-tooltip
42 class="item"
43 effect="dark"
44 placement="right"
45 :disabled="$store.state.leftmenu.menu_flag"
46 :content="child.name">
47 <i :class="'fa fa-'+child.icon"></i>
48 </el-tooltip>
49 <span
50 class='menu-name'
51 v-if="$store.state.leftmenu.menu_flag">{{child.name}}<!-- {{route.path+'/'+item.path+'/'+child.path}} --></span>
52 </el-menu-item>
53 </el-submenu>
54 </template>
55 </el-menu>
56 </Col>
57 </Row>
58 <div class="toggle-menu" @click='toggleMenu'>
59 <i class='el-icon-arrow-left'></i>
60 </div>
61 </div>
62 </div>
63 </template>
64
65 <script>
66 export default {
67 name: 'left-menu',
68 data () {
69 return {
70 menu_list:[],
71
72 win_size:{
73 height:'',
74 }
75 }
76 },
77 methods:{
78 setSize(){
79 this.win_size.height=$(window).height()+"px";
80 },
81
82 toggleMenu(){
83 this.$store.dispatch(this.$store.state.leftmenu.menu_flag?'set_menu_close':'set_menu_open');
84 },
85
86 updateCurMenu(route){
87 var route=route || this.$route;
88 if (route.matched.length) {
89 var rootPath=route.matched[0].path,
90 fullPath=route.path;
91 this.$store.dispatch('set_cur_route',{
92 rootPath,
93 fullPath
94 });
95 var routes=this.$router.options.routes;
96 for (var i = 0; i < routes.length; i++) {
97 if (routes[i].path===rootPath && !routes[i].hidden) {
98 this.menu_list=routes[i].children;
99 break;
100 }
101 }
102 }else{
103 this.$router.push('/404');
104 }
105 }
106
107 },
108 created(){
109 this.setSize();
110 $(window).resize(()=>{
111 this.setSize();
112 });
113
114 this.updateCurMenu();
115 },
116 mounted(){
117 // console.log(this.$store.state.user.userinfo.access);
118 },
119 watch:{
120 $route(to,from){
121 this.updateCurMenu(to);
122 }
123 }
124 }
125 </script>
126
127 <style scoped lang='less'>
128 .fa{
129 margin-right: 8px;
130 }
131 .left-fixed-right-auto{
132 padding-top: 60px;
133 }
134 .left{
135 position:fixed;
136 float:left;
137 /*width:190px;
138 margin-right:-190px;*/
139 top:60px;
140 }
141 .right-content{
142 float:right;
143 width:100%;
144 }
145 #left-menu{
146 height: 100%;
147 background: #324057;
148 position: relative;
149 overflow-x: hidden;
150
151
152 .toggle-menu{
153 width: 100%;
154 height: 50px;
155 background: #1f2f3d;
156 position: absolute;
157 bottom: 50px;
158 left: 0px;
159 z-index: 1000;
160 cursor: pointer;
161 line-height: 40px;
162 text-align: center;
163 color: #fff;
164 font-size: 14px;
165 }
166 }
167 </style>
1 module.exports = {
2 name: 'list-data',
3 data() {
4 return {
5 batch_flag: true, //符合批量删除为true,否则为false
6 batch_datas: [],
7 batch_ids: [],
8
9 list: this.List, //列表数组
10 fields: this.FieldList, //字段数组
11 selection: this.Selection, //是否需要批量选择
12 btn_info: this.BtnInfo,
13
14 pagination: this.Pagination,
15 }
16 },
17 methods: {
18 /**
19 * 表格列表触发CheckBox的事件
20 * @param {array} val 当前选中的用户信息数组,每个元素是用户信息对象
21 */
22 onSelectionChange(val) {
23 this.batch_datas = val;
24
25 this.batch_ids = [];
26 if (val.length) {
27 this.batch_flag = false;
28 for (var i = 0; i < val.length; i++) {
29 this.batch_ids.push(val[i].id);
30 }
31 } else {
32 this.batch_flag = true;
33 }
34
35 /**
36 * 改变CheckBox事件,第一个参数是ID数组,第二个参数二维数组,每个数组是选中的对象
37 */
38 this.$emit('onSelectionChange', this.batch_ids, this.batch_datas);
39 this.$emit('onSelectionChangeObj', {
40 ids: this.batch_ids,
41 datas: this.batch_datas
42 });
43 },
44
45
46
47 /**
48 * 删除事件
49 * @param {object || boolean} user 当前信息对象或者为布尔值,为布尔值时,代表是批量删除
50 * @param {number} index 当前列表索引
51 */
52 onDelete(data, index) {
53 var opts = {};
54 if (data === true) {
55 opts.batch_ids = this.batch_ids;
56 opts.batch_datas = this.batch_datas;
57 } else {
58 opts.data = data;
59 opts.index = index;
60 }
61
62 /**
63 * 删除事件,参数为对象
64 * 分两种情况,一种是单个删除,一种是批量删除,属性分别如下
65 * 1:单个删除
66 * opts.data 当前要删除的数据对象
67 * opts.index 当前要删除的索引
68 * opts.list 当前列表数组
69 * 2:批量删除
70 * opts.batch_ids 一维数组,需要删除的ID数组
71 * opts.batch_datas 二维数组,每个元素为对象(需要删除的数据对象)
72 */
73 this.$emit('onDelete', opts);
74 },
75
76 /**
77 * 获取行信息事件
78 * @param {object} row 当前行对象
79 * @param {number} index 当前行索引
80 * @param {array} list 当前列表数组
81 */
82 onGetInfo(row, index, list, type) {
83 this.$emit('onGetInfo', {
84 row,
85 index,
86 list,
87 type
88 });
89 },
90
91
92 onUpdateBtn(data, index, list) {
93 if (this.btn_info.update && this.btn_info.update.path) {
94 var path = this.btn_info.update.path,
95 param_keys = this.btn_info.update.param_keys || [],
96 query_keys = this.btn_info.update.query_keys || [],
97 query = {};
98
99 for (var i = 0; i < param_keys.length; i++) {
100 path += '/' + data[param_keys[i]];
101 }
102 for (var i = 0; i < query_keys.length; i++) {
103 query[query_keys[i]] = data[query_keys[i]];
104 }
105
106 // console.log(path);
107 // console.log(query);
108
109 this.$router.push({
110 path: path,
111 query: query
112 });
113 } else {
114 this.onGetInfo(data, index, list, 'update');
115 }
116
117 },
118
119
120 /**
121 * 内置删除事件执行成功后,更新列表方法
122 * 分两种情况,一种是批量删除,一种是单个删除
123 * 1:单个删除
124 * row 当前需要删除行的索引
125 * 2:批量删除
126 * row 一维数组,需要删除的ID数组
127 */
128 onUpdateList(row) {
129 if (!Array.isArray(row)) {
130 this.list.splice(row, 1);
131 } else {
132 this.list = this.list.filter(function(item, idx) {
133 return row.indexOf(item.id) === -1;
134 });
135 }
136 },
137
138 onChangeCurrentPage(page) {
139 this.$emit('onChangeCurrentPage', page);
140 },
141 onChangePageSize(page_size) {
142 this.$emit('onChangePageSize', page_size);
143 }
144 },
145
146 mounted() {
147 // console.log(this.list);
148 },
149
150 /**
151 * 接收参数
152 * @type {Object}
153 */
154 props: {
155 List: {
156 type: Array,
157 required: true
158 },
159 FieldList: {
160 type: Array,
161 required: true
162 },
163 BtnInfo: {
164 type: Object,
165 default: {}
166 },
167 Selection: {
168 type: Boolean,
169 default: false
170 },
171 Pagination: {
172 type: Object,
173 default: {}
174 }
175 },
176
177
178 /**
179 * 监控参数
180 * @type {Object}
181 */
182 watch: {
183 List(v) {
184 if (v) {
185 this.list = v;
186 }
187 },
188 FieldList(v) {
189 if (v) {
190 this.fields = v;
191 }
192 },
193 Selection(v) {
194 this.selection = v;
195 },
196 BtnInfo(v) {
197 this.btn_info = v;
198 },
199 Pagination(v) {
200 this.pagination = v;
201 }
202 }
203 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="list">
3 <el-col :span="24" class='actions-top'>
4 <el-button type='danger' icon='delete'
5 :disabled='batch_flag'
6 @click='onDelete(true)'>删除选中</el-button>
7 </el-col>
8
9 <el-table border style="width: 100%" align='center'
10 :data="list"
11 @selection-change='onSelectionChange'>
12 <el-table-column v-if='selection'
13 type="selection"
14 width="55">
15 </el-table-column>
16
17
18 <el-table-column v-for='field in fields'
19 :prop="field.key"
20 :label="field.label"
21 :align="field.align || 'center'"
22 :sortable="field.sort || false"
23 :formatter='field.formatter'
24 :filters='field.filter_list'
25 :filter-method="field.filter_method"
26 :filter-multiple="field.filter_multiple">
27 </el-table-column>
28
29
30
31 <el-table-column
32 v-if='btn_info.show!==false'
33 :label="btn_info.label || '操作'"
34 :width="btn_info.width || 160"
35 :context="_self">
36 <template scope='scope'>
37 <el-button
38 v-if='btn_info.select!==false'
39 type="info"
40 icon='view'
41 size="mini"
42 @click='onGetInfo(scope.row,scope.$index,list,"select")'></el-button>
43 <el-button
44 v-if='btn_info.update!==false'
45 type="info"
46 icon='edit'
47 size="mini"
48 @click='onUpdateBtn(scope.row,scope.$index,list)'></el-button>
49 <el-button
50 v-if='btn_info.delete!==false'
51 type="danger"
52 icon='delete'
53 size="mini"
54 @click='onDelete(scope.row,scope.$index)'></el-button>
55
56
57 <el-button
58 v-if='btn_info.list'
59 v-for='btn in btn_info.list'
60 :type="btn.type || 'info'"
61 size="mini"
62 @click='onGetInfo(scope.row,scope.$index,list,btn.fn_type || btn.text)'>{{btn.text}}</el-button>
63 </template>
64 </el-table-column>
65 </el-table>
66 <el-col :span="24" class='btm-action'>
67 <!--
68
69 -->
70 <el-pagination
71 v-if='pagination.total>0'
72 class='pagination'
73 :page-sizes="pagination.page_sizes"
74 :page-size="pagination.page_size"
75 :layout="pagination.layout"
76 :total="pagination.total"
77 :current-page='pagination.current_page'
78 @current-change='onChangeCurrentPage'
79 @size-change='onChangePageSize'>
80 </el-pagination>
81 </el-col>
82 </div>
83 </template>
84
85 <script>
86 import ListDataJs from './ListData.js';
87 module.exports=ListDataJs;
88 </script>
89 <style scoped lang='less'>
90 .demo-form-inline{
91 display: inline-block;
92 float: right;
93 }
94 .btm-action{
95 margin-top: 20px;
96 text-align: center;
97 }
98 .actions-top{
99 height: 46px;
100 }
101 .pagination{
102 display: inline-block;
103 }
104 </style>
1 import ListData from './ListData.vue';
2 module.exports = ListData;
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Bread: require('./Bread/Bread.vue'),
3 HeadNav: require('./HeadNav/HeadNav.vue'),
4 LeftMenu: require('./LeftMenu/LeftMenu.vue'),
5 Echarts: require('./Echarts/'),
6 ListData: require('./ListData/'),
7 FormData: require('./FormData/'),
8 DialogInfo: require('./DialogInfo/'),
9 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="layout-assistant">
3 <div class="layout-assistant-content">
4 <div class='bread'>
5
6 <Breadcrumb separator="/" class='el-bread'>
7 <!--<Breadcrumb-item href="{ path: '/' }">首页</Breadcrumb-item>-->
8 <Breadcrumb-item v-for='(item,index) in $route.matched' v-if="item.name">{{item.name}}</Breadcrumb-item>
9 </Breadcrumb>
10 </div>
11 <Input class="ass-input" placeholder="API搜索">
12 <Button slot="append" icon="ios-search"></Button>
13 </Input>
14 </div>
15
16 </div>
17 </template>
18
19 <script>
20 export default {
21 name: 'bread',
22 data() {
23 return {
24 strong: ''
25 }
26 },
27 methods: {
28 showStr(pa) {
29 console.log(pa);
30 },
31 // getPageText(name) {
32 // return name = name.replace('编辑', this.$route.query.id ? '修改' : '添加');
33 // }
34 },
35 mounted() {
36
37 },
38 created() {
39 // if (this.$route.matched.length) {
40 // var name = this.$route.matched[this.$route.matched.length - 1].name;
41 // this.strong = this.getPageText(name);
42 // }
43 },
44 watch: {
45 // $route(to, from) {
46 // this.strong = this.getPageText(to.name);
47 // }
48 }
49 }
50 </script>
51
52 <style scoped lang='less'>
53 .bread {
54 height: 30px;
55 line-height: 30px;
56 padding-left: 15px; // background: #f5f7f9;
57 float: left;
58 width: 500px;
59 .el-bread {
60 display: inline-block; // float: right;
61 text-align: right;
62 line-height: 30px;
63 color: #fff;
64 font-size: 12px;
65 }
66 }
67 .layout-assistant {
68 width: 100%;
69 margin: 0 auto;
70 height: 50px;
71 line-height: 50px;
72 background: #B0C4DE;
73 /*background: #657180;*/
74
75 }
76 .layout-assistant .layout-assistant-content {
77 width: 95%;
78 margin: 0 auto;
79 padding-top: 10px;
80 }
81
82 .ass-input{
83 width: 300px;
84 float: right;
85
86 }
87
88 //设置导航最后一个菜单的样式
89 .ivu-breadcrumb span:last-child {
90 // font-weight: 100;
91 // color: #fff
92 }
93 </style>
1 <style>
2 .layout-logo {
3 width: 100px;
4 height: 30px;
5 background: #5b6270;
6 border-radius: 3px;
7 float: left;
8 position: relative;
9 top: 15px;
10 left: 20px;
11
12 }
13
14 .layout-nav {
15 /*width: 620px;*/
16 float: left;
17 margin-left: 100px;
18 /*margin: 0 auto;*/
19
20 }
21
22 .layout-assistant {
23 width: 300px;
24 margin: 0 auto;
25 height: inherit;
26 }
27
28 .layout-ceiling-main {
29 float: right;
30 margin-right: 15px;
31 }
32
33 .layout-ceiling-main a {
34 color: #9ba7b5;
35 margin: 0 10px;
36 }
37
38 .layout-ceiling-main .down {
39 line-height: 10px;
40 }
41 </style>
42 <template>
43 <Menu mode="horizontal"
44 theme="dark"
45 @on-select="itemSelect"
46 active-name="1">
47 <div class="layout-logo"></div>
48 <div class="layout-nav">
49 <Menu-item name="/" >
50 <Icon type="home"></Icon>
51 首页
52 </Menu-item>
53 <Menu-item name="/interface" >
54 <Icon type="document"></Icon>
55 接口文档
56 </Menu-item>
57 <Menu-item name="/doc" >
58 <Icon type="information-circled"></Icon>
59 帮助文档
60 </Menu-item>
61 <Menu-item name="/support" >
62 <Icon type="ios-navigate"></Icon>
63 服务支持
64 </Menu-item>
65 </div>
66 <div class="layout-ceiling-main">
67 <Dropdown class="down" @on-click="clickDown">
68 <a href="javascript:void(0)">
69 admin
70 <Icon type="arrow-down-b"></Icon>
71 </a>
72 <Dropdown-menu slot="list">
73 <Dropdown-item name="1">修改密码</Dropdown-item>
74 <Dropdown-item name="2">帐号信息</Dropdown-item>
75 <Dropdown-item name="3">我的主页</Dropdown-item>
76 <Dropdown-item name="4" divided>退出登录</Dropdown-item>
77 </Dropdown-menu>
78 </Dropdown>|
79 <router-link to="/login">注册登录</router-link> |
80 <router-link to="/account">帐号中心</router-link>
81
82 </div>
83 </Menu>
84 </template>
85 <script>
86 module.exports = {
87 name: 'head-nav',
88 methods: {
89 itemSelect(name) {
90 this.$router.push(name)
91 },
92 clickDown(name){
93 this.$Modal.info({
94 title:"提示",
95 content: "你点击了:"+name,
96 onOk: () => {
97 this.$Message.info('点击了确定');
98 },
99 })
100 }
101 }
102 };
103 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>
3
4 <Menu
5 width="auto"
6 active-name="1"
7 @on-select="itemSelect"
8 >
9 <Submenu name="/1">
10 <template slot="title">
11 <Icon type="ios-paper"></Icon>
12 医链云API
13 </template>
14 <Menu-group title="用户模块">
15 <Menu-item name="/111">
16 获取用户信息API
17 </Menu-item>
18 <Menu-item name="2">
19 获取用户名API
20 </Menu-item>
21 </Menu-group>
22 <Menu-group title="订单模块">
23 <Menu-item name="3">
24 获取订单信息API
25 </Menu-item>
26 <Menu-item name="4">
27 获取订单状态API
28 </Menu-item>
29 </Menu-group>
30 </Submenu>
31
32 <Submenu name="/2">
33 <template slot="title">
34 <Icon type="ios-paper"></Icon>
35 四方云API
36 </template>
37 <Menu-group title="用户模块">
38 <Menu-item name="1">
39 获取用户信息API
40 </Menu-item>
41 <Menu-item name="2">
42 获取用户名API
43 </Menu-item>
44 </Menu-group>
45 <Menu-group title="订单模块">
46 <Menu-item name="3">
47 获取订单信息API
48 </Menu-item>
49 <Menu-item name="4">
50 获取订单状态API
51 </Menu-item>
52 </Menu-group>
53 </Submenu>
54 </Menu>
55 <!--<Menu active-name="1"
56 width="auto"
57 :open-names="['1']"
58 @on-select="itemSelect"
59 v-for="(route,index) in $router.options.routes"
60 v-if='!route.hidden && $route.matched.length && $route.matched[0].path===route.path'>
61 <template v-for="(item,index) in route.children">
62
63 <template v-if="item.children">
64 <Submenu :name="route.path+'/'+item.path">
65 <template slot="title">
66 <Icon type="ios-navigate"></Icon>
67 {{item.name}}
68 </template>
69 <Menu-item v-for='(child,cindex) in item.children'
70 :name="route.path+'/'+item.path+'/'+child.path">
71 {{child.name}}
72 </Menu-item>
73 </Submenu>
74 </template>
75 <template v-else>
76 <Menu-item :name="route.path+'/'+item.path">
77 <Icon type="ios-navigate"></Icon>
78 {{item.name}}
79 </Menu-item>
80 </template>
81
82 </template>
83
84 </Menu>-->
85
86 </div>
87 </template>
88
89 <script>
90 module.exports = {
91 name: 'left-menu',
92 data() {
93 return {
94 strong: ''
95 }
96 },
97 methods: {
98 itemSelect(name) {
99 this.$router.push($route.path+name)
100 }
101 }
102 };
103 </script>
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 HeadNav: require('./HeadNav.vue'),
3 Bread: require('./Bread.vue'),
4 LeftMenu: require('./LeftMenu.vue'),
5 };
...\ No newline at end of file ...\ No newline at end of file
1 // import {
2 // user as UserApi
3 // } from '../../config/request.js';
4
5 module.exports = {
6 name: 'login',
7 data() {
8 return {
9 winSize: {
10 width: '',
11 height: ''
12 },
13
14 formOffset: {
15 position: 'absolute',
16 left: '',
17 top: ''
18 },
19
20 remumber: this.$store.state.user.remumber,
21
22 login_actions: {
23 disabled: false
24 },
25
26 data: {
27 username: '',
28 password: '',
29 // token: ''
30 },
31
32 rule_data: {
33 username: [{
34 required: true,
35 message: '用户名不能为空!',
36 trigger: 'blur'
37 }],
38 password: [{
39 required: true,
40 message: '密码不能为空!',
41 trigger: 'blur'
42 }],
43 }
44 }
45 },
46 methods: {
47 setSize() {
48 this.winSize.width = $(window).width() + "px";
49 this.winSize.height = $(window).height() + "px";
50
51 this.formOffset.left = (parseInt(this.winSize.width) / 2 - 175) + 'px';
52 this.formOffset.top = (parseInt(this.winSize.height) / 2 - 178) + 'px';
53 },
54
55 // login(ref) {
56 // this.$refs[ref].validate((valid) => {
57 // if (valid) {
58 // this.login_actions.disabled = true;
59 // //如果记住密码,提交的信息包括真实token,密码则是假的
60 // //服务端登录验证优先级:用户名必须,其次先取token,不存在时再取密码
61 // UserApi.login.call(this, this[ref], data => {
62 // //登录成功之后,验证是否记住密码,如果记住密码,本地保存记住信息
63 // //如果没有记住,就初始化本地记住信息
64 // if (this.remumber.remumber_flag === true) {
65 // this.$store.dispatch('update_remumber', {
66 // remumber_flag: this.remumber.remumber_flag,
67 // remumber_login_info: {
68 // username: this[ref].username,
69 // token: data.userinfo.token
70 // }
71 // });
72 // } else {
73 // this.$store.dispatch('remove_remumber');
74 // }
75
76 // // this.$set(data.userinfo, 'access', ['/adv', '/demo/user', '/demo/user/list']);
77 // this.$store.dispatch('update_userinfo', {
78 // userinfo: data.userinfo
79 // }).then(() => {
80 // this.login_actions.disabled = false;
81 // this.$router.push('/demo/user/list');
82 // });
83 // }, () => {
84 // this.login_actions.disabled = false;
85 // }, () => {
86 // this.login_actions.disabled = false;
87 // });
88 // }
89 // });
90 // },
91
92 resetForm(ref) {
93 this.$refs[ref].resetFields();
94 }
95 },
96 created() {
97 this.setSize();
98 $(window).resize(() => {
99 this.setSize();
100 });
101 },
102 mounted() {
103 // console.log(this.remumber);
104
105 //如果上次登录选择的是记住密码并登录成功,则会保存状态,用户名以及token
106 // if (this.remumber.remumber_flag === true) {
107 // this.data.username = this.remumber.remumber_login_info.username;
108 // this.data.password = this.remumber.remumber_login_info.token.substring(0, 16);
109 // this.$set(this.data, 'token', this.remumber.remumber_login_info.token);
110 // }
111 }
112 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="login" :style="winSize">
3 <Row>
4 <Col span="24">
5 <div class="content">
6 <Form ref='data' :model="data" class="card-box loginform" :rules="rule_data" :style="formOffset">
7 <h3 class="title">系统登录</h3>
8
9 <Form-item prop="username">
10 <Input type="text" placeholder="用户名">
11 <Icon type="ios-person-outline" slot="prepend"></Icon>
12 </Input>
13 </Form-item>
14 <Form-item prop="password">
15 <Input type="password" placeholder="密码">
16 <Icon type="ios-locked-outline" slot="prepend"></Icon>
17 </Input>
18 </Form-item>
19 <Form-item label-width='0'>
20 <Button type="primary" long>登录</Button>
21
22 </Form-item>
23 <hr>
24 <div class="bottom">
25 <span>忘记密码</span>
26 <span><router-link to="/register">免费注册</router-link></span>
27 </div>
28 </Form>
29
30 </div>
31 </Col>
32 </Row>
33 </div>
34 </template>
35
36 <script>
37 import LoginJs from './Login.js';
38 module.exports = LoginJs;
39 </script>
40
41 <style scoped lang='less'>
42 .login {
43 background: #1F2D3D;
44 .ivu-form-item {
45 margin-bottom: 20px;
46 }
47 .bottom {
48 float: right;
49 margin-top: 10px; // color: red;
50 }
51 .bottom span {
52 margin-left: 20px;
53 }
54 .title {
55 // padding-left: 30px;
56 font-size: 20px;
57 }
58 .card-box {
59 box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
60 -webkit-border-radius: 5px;
61 border-radius: 5px;
62 -moz-border-radius: 5px;
63 background-clip: padding-box;
64 margin-bottom: 100px;
65 background-color: #F9FAFC;
66 border: 2px solid #8492A6;
67 }
68
69 .title {
70 margin: 0px auto 20px auto;
71 text-align: center;
72 color: #505458;
73 }
74
75 .loginform {
76 width: 350px;
77 padding: 25px 35px 15px 35px;
78 }
79 }
80 </style>
1 // import {
2 // user as UserApi
3 // } from '../../config/request.js';
4
5 module.exports = {
6 name: 'login',
7 data() {
8 return {
9 winSize: {
10 width: '',
11 height: ''
12 },
13
14 formOffset: {
15 position: 'absolute',
16 left: '',
17 top: ''
18 },
19
20 remumber: this.$store.state.user.remumber,
21
22 login_actions: {
23 disabled: false
24 },
25
26 data: {
27 username: '',
28 password: '',
29 // token: ''
30 },
31
32 rule_data: {
33 username: [{
34 required: true,
35 message: '用户名不能为空!',
36 trigger: 'blur'
37 }],
38 password: [{
39 required: true,
40 message: '密码不能为空!',
41 trigger: 'blur'
42 }],
43 }
44 }
45 },
46 methods: {
47 setSize() {
48 this.winSize.width = $(window).width() + "px";
49 this.winSize.height = $(window).height() + "px";
50
51 this.formOffset.left = (parseInt(this.winSize.width) / 2 - 175) + 'px';
52 this.formOffset.top = (parseInt(this.winSize.height) / 2 - 220) + 'px';
53 },
54
55 // login(ref) {
56 // this.$refs[ref].validate((valid) => {
57 // if (valid) {
58 // this.login_actions.disabled = true;
59 // //如果记住密码,提交的信息包括真实token,密码则是假的
60 // //服务端登录验证优先级:用户名必须,其次先取token,不存在时再取密码
61 // UserApi.login.call(this, this[ref], data => {
62 // //登录成功之后,验证是否记住密码,如果记住密码,本地保存记住信息
63 // //如果没有记住,就初始化本地记住信息
64 // if (this.remumber.remumber_flag === true) {
65 // this.$store.dispatch('update_remumber', {
66 // remumber_flag: this.remumber.remumber_flag,
67 // remumber_login_info: {
68 // username: this[ref].username,
69 // token: data.userinfo.token
70 // }
71 // });
72 // } else {
73 // this.$store.dispatch('remove_remumber');
74 // }
75
76 // // this.$set(data.userinfo, 'access', ['/adv', '/demo/user', '/demo/user/list']);
77 // this.$store.dispatch('update_userinfo', {
78 // userinfo: data.userinfo
79 // }).then(() => {
80 // this.login_actions.disabled = false;
81 // this.$router.push('/demo/user/list');
82 // });
83 // }, () => {
84 // this.login_actions.disabled = false;
85 // }, () => {
86 // this.login_actions.disabled = false;
87 // });
88 // }
89 // });
90 // },
91
92 resetForm(ref) {
93 this.$refs[ref].resetFields();
94 }
95 },
96 created() {
97 this.setSize();
98 $(window).resize(() => {
99 this.setSize();
100 });
101 },
102 mounted() {
103 // console.log(this.remumber);
104
105 //如果上次登录选择的是记住密码并登录成功,则会保存状态,用户名以及token
106 // if (this.remumber.remumber_flag === true) {
107 // this.data.username = this.remumber.remumber_login_info.username;
108 // this.data.password = this.remumber.remumber_login_info.token.substring(0, 16);
109 // this.$set(this.data, 'token', this.remumber.remumber_login_info.token);
110 // }
111 }
112 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div class="login" :style="winSize">
3 <Row>
4 <Col span="24">
5 <div class="content">
6 <Form ref='data' :model="data" class="card-box loginform" :rules="rule_data" :style="formOffset">
7 <h3 class="title">用户注册</h3>
8
9 <Form-item prop="username">
10 <Input type="text" placeholder="手机号">
11 <Icon type="ios-person-outline" slot="prepend"></Icon>
12 </Input>
13 </Form-item>
14 <Form-item prop="password">
15 <Input type="password" placeholder="密码">
16 <Icon type="ios-locked-outline" slot="prepend"></Icon>
17 </Input>
18 </Form-item>
19 <Form-item prop="password">
20 <Input type="password" placeholder="密码确认">
21 <Icon type="ios-locked-outline" slot="prepend"></Icon>
22 </Input>
23 </Form-item>
24 <Form-item prop="password">
25 <Input type="password" placeholder="安全邮箱">
26 <Icon type="ios-email-outline" slot="prepend"></Icon>
27 </Input>
28 </Form-item>
29 <Form-item label-width='0'>
30 <Button type="success" long>注册</Button>
31
32 </Form-item>
33 <hr>
34 <div class="bottom">
35 <span><router-link to="/login">立即登录</router-link></span>
36 </div>
37 </Form>
38
39 </div>
40 </Col>
41 </Row>
42 </div>
43 </template>
44
45 <script>
46 import RegisterJS from './Register.js';
47 module.exports = RegisterJS;
48 </script>
49
50 <style scoped lang='less'>
51 .login {
52 background: #1F2D3D;
53 .ivu-form-item {
54 margin-bottom: 20px;
55 }
56 .bottom {
57 float: right;
58 margin-top: 10px; // color: red;
59 }
60 .bottom span {
61 margin-left: 20px;
62 }
63 .title {
64 // padding-left: 30px;
65 font-size: 20px;
66 }
67 .card-box {
68 box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
69 -webkit-border-radius: 5px;
70 border-radius: 5px;
71 -moz-border-radius: 5px;
72 background-clip: padding-box;
73 margin-bottom: 100px;
74 background-color: #F9FAFC;
75 border: 2px solid #8492A6;
76 }
77
78 .title {
79 margin: 0px auto 20px auto;
80 text-align: center;
81 color: #505458;
82 }
83
84 .loginform {
85 width: 350px;
86 padding: 25px 35px 15px 35px;
87 }
88 }
89 </style>
1 module.exports = {
2 Login: require('./Login.vue'),
3 Register: require('./Register.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <Table border :columns="columns1" :data="data1"></Table>
3 </template>
4 <script>
5 export default {
6 data () {
7 return {
8 columns1: [
9 {
10 title: '帐号中心',
11 key: 'name',
12 width:300
13
14 },
15 {
16 title: '所属模块',
17 key: 'model',
18 width:200
19
20 },
21 {
22 title: '类型',
23 key: 'age',
24 width:100,
25 render (row, column, index) {
26 const color = index % 2 ==0 ? 'blue' : 'red';
27 const text = index % 2 ==0 ? '免费' : '收费';
28 return `<tag type="border" color="${color}">${text}</tag>`;
29 }
30 },
31 {
32 title: '描述',
33 key: 'address'
34 }
35 ],
36 data1: [
37 {
38 name: '王小明',
39 age: 18,
40 model:'用户管理',
41 address: '北京市朝阳区芍药居'
42 },
43 {
44 name: '张小刚',
45 age: 25,
46 model:'用户管理',
47 address: '北京市海淀区西二旗'
48 },
49 {
50 name: '李小红',
51 age: 30,
52 model:'用户管理',
53 address: '上海市浦东新区世纪大道'
54 },
55 {
56 name: '周小伟',
57 age: 26,
58 model:'订单管理',
59 address: '深圳市南山区深南大道'
60 },
61 {
62 name: '王小明',
63 age: 18,
64 model:'用户管理',
65 address: '北京市朝阳区芍药居'
66 },
67 {
68 name: '张小刚',
69 age: 25,
70 model:'用户管理',
71 address: '北京市海淀区西二旗'
72 },
73 {
74 name: '李小红',
75 age: 30,
76 model:'用户管理',
77 address: '上海市浦东新区世纪大道'
78 },{
79 name: '王小明',
80 age: 18,
81 model:'用户管理',
82 address: '北京市朝阳区芍药居'
83 },
84 {
85 name: '张小刚',
86 age: 25,
87 model:'用户管理',
88 address: '北京市海淀区西二旗'
89 },
90 {
91 name: '李小红',
92 age: 30,
93 model:'用户管理',
94 address: '上海市浦东新区世纪大道'
95 },{
96 name: '王小明',
97 age: 18,
98 model:'用户管理',
99 address: '北京市朝阳区芍药居'
100 },
101 {
102 name: '张小刚',
103 age: 25,
104 model:'用户管理',
105 address: '北京市海淀区西二旗'
106 },
107 {
108 name: '李小红',
109 age: 30,
110 model:'用户管理',
111 address: '上海市浦东新区世纪大道'
112 },{
113 name: '王小明',
114 age: 18,
115 model:'用户管理',
116 address: '北京市朝阳区芍药居'
117 },
118 {
119 name: '张小刚',
120 age: 25,
121 model:'用户管理',
122 address: '北京市海淀区西二旗'
123 },
124 {
125 name: '李小红',
126 age: 30,
127 model:'用户管理',
128 address: '上海市浦东新区世纪大道'
129 },{
130 name: '王小明',
131 age: 18,
132 model:'用户管理',
133 address: '北京市朝阳区芍药居'
134 },
135 {
136 name: '张小刚',
137 age: 25,
138 model:'用户管理',
139 address: '北京市海淀区西二旗'
140 },
141 {
142 name: '李小红',
143 age: 30,
144 model:'用户管理',
145 address: '上海市浦东新区世纪大道'
146 },{
147 name: '王小明',
148 age: 18,
149 model:'用户管理',
150 address: '北京市朝阳区芍药居'
151 },
152 {
153 name: '张小刚',
154 age: 25,
155 model:'用户管理',
156 address: '北京市海淀区西二旗'
157 },
158 {
159 name: '李小红',
160 age: 30,
161 model:'用户管理',
162 address: '上海市浦东新区世纪大道'
163 },
164 ]
165 }
166 }
167 }
168 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style scoped>
2
3 </style>
4 <template>
5 <div class="layout">
6 <bread></bread>
7 <div class="layout-content">
8
9 <Row>
10 <i-col span="5">
11 <Menu width="auto" @on-select="itemSelect">
12 <Menu-item name="/account/1">
13 帐号信息
14 </Menu-item>
15 <Menu-item name="/account/2">
16 调用统计
17 </Menu-item>
18 <Menu-item name="/account/3">
19 帐号安全
20 </Menu-item>
21 <Menu-item name="/account/4">
22 密钥管理
23 </Menu-item>
24 </Menu>
25 </i-col>
26 <i-col span="19">
27 <div class="layout-breadcrumb">
28
29 </div>
30 <div class="layout-content-main">
31 <router-view></router-view>
32 </div>
33 </i-col>
34 </Row>
35 </div>
36 <div class="layout-copy">
37 2011-2016 &copy;
38 </div>
39 </div>
40 </template>
41 <script>
42 export default {
43 name: 'home',
44 data() {
45 return {
46 // leftWidth:'5'
47 }
48 },
49 computed: {
50
51 },
52 methods: {
53 itemSelect(name) {
54 this.$router.push(name);
55 }
56 },
57 }
58 </script>
1 module.exports = {
2 AccountList: require('./AccountList.vue'),
3 AccountView: require('./AccountView.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 <style scoped>
2
3 </style>
4 <template>
5 <div class="layout">
6 <bread></bread>
7 <div class="layout-content">
8
9 <Row>
10 <i-col span="5">
11 <Menu width="auto" @on-select="itemSelect">
12 <Menu-item name="/interface">
13 目录
14 </Menu-item>
15 <Submenu name="/interface/1">
16 <template slot="title">
17 <Icon type="ios-paper"></Icon>
18 医链云
19 </template>
20 <Menu-item name="/interface/detail/111">
21 获取用户信息API
22 </Menu-item>
23 <Menu-item name="/interface/pro/222">
24 获取用户名API
25 </Menu-item>
26 <Menu-item name="/interface/debug/222">
27 获取订单信息API
28 </Menu-item>
29 <Menu-item name="4">
30 获取订单状态API
31 </Menu-item>
32 </Submenu>
33
34 <Submenu name="/2">
35 <template slot="title">
36 <Icon type="ios-paper"></Icon>
37 四方云
38 </template>
39 <Menu-item name="1">
40 获取用户信息API
41 </Menu-item>
42 <Menu-item name="2">
43 获取用户名API
44 </Menu-item>
45 <Menu-item name="3">
46 获取订单信息API
47 </Menu-item>
48 <Menu-item name="5">
49 获取订单状态API
50 </Menu-item>
51 </Submenu>
52 </Menu>
53 </i-col>
54 <i-col span="19">
55 <div class="layout-breadcrumb">
56
57 </div>
58 <div class="layout-content-main">
59 <router-view></router-view>
60 </div>
61 </i-col>
62 </Row>
63 </div>
64 <div class="layout-copy">
65 2011-2016 &copy;
66 </div>
67 </div>
68 </template>
69 <script>
70 export default {
71 name: 'home',
72 data() {
73 return {
74 // leftWidth:'5'
75 }
76 },
77 computed: {
78
79 },
80 methods: {
81 itemSelect(name) {
82 this.$router.push(name);
83 }
84 },
85 }
86 </script>
1 <template>
2 <Table border :columns="columns1" :data="data1"></Table>
3 </template>
4 <script>
5 export default {
6 data () {
7 return {
8 columns1: [
9 {
10 title: 'API名称',
11 key: 'name',
12 width:300
13
14 },
15 {
16 title: '所属模块',
17 key: 'model',
18 width:200
19
20 },
21 {
22 title: '类型',
23 key: 'age',
24 width:100,
25 render (row, column, index) {
26 const color = index % 2 ==0 ? 'blue' : 'red';
27 const text = index % 2 ==0 ? '免费' : '收费';
28 return `<tag type="border" color="${color}">${text}</tag>`;
29 }
30 },
31 {
32 title: '描述',
33 key: 'address'
34 }
35 ],
36 data1: [
37 {
38 name: '王小明',
39 age: 18,
40 model:'用户管理',
41 address: '北京市朝阳区芍药居'
42 },
43 {
44 name: '张小刚',
45 age: 25,
46 model:'用户管理',
47 address: '北京市海淀区西二旗'
48 },
49 {
50 name: '李小红',
51 age: 30,
52 model:'用户管理',
53 address: '上海市浦东新区世纪大道'
54 },
55 {
56 name: '周小伟',
57 age: 26,
58 model:'订单管理',
59 address: '深圳市南山区深南大道'
60 },
61 {
62 name: '王小明',
63 age: 18,
64 model:'用户管理',
65 address: '北京市朝阳区芍药居'
66 },
67 {
68 name: '张小刚',
69 age: 25,
70 model:'用户管理',
71 address: '北京市海淀区西二旗'
72 },
73 {
74 name: '李小红',
75 age: 30,
76 model:'用户管理',
77 address: '上海市浦东新区世纪大道'
78 },{
79 name: '王小明',
80 age: 18,
81 model:'用户管理',
82 address: '北京市朝阳区芍药居'
83 },
84 {
85 name: '张小刚',
86 age: 25,
87 model:'用户管理',
88 address: '北京市海淀区西二旗'
89 },
90 {
91 name: '李小红',
92 age: 30,
93 model:'用户管理',
94 address: '上海市浦东新区世纪大道'
95 },{
96 name: '王小明',
97 age: 18,
98 model:'用户管理',
99 address: '北京市朝阳区芍药居'
100 },
101 {
102 name: '张小刚',
103 age: 25,
104 model:'用户管理',
105 address: '北京市海淀区西二旗'
106 },
107 {
108 name: '李小红',
109 age: 30,
110 model:'用户管理',
111 address: '上海市浦东新区世纪大道'
112 },{
113 name: '王小明',
114 age: 18,
115 model:'用户管理',
116 address: '北京市朝阳区芍药居'
117 },
118 {
119 name: '张小刚',
120 age: 25,
121 model:'用户管理',
122 address: '北京市海淀区西二旗'
123 },
124 {
125 name: '李小红',
126 age: 30,
127 model:'用户管理',
128 address: '上海市浦东新区世纪大道'
129 },{
130 name: '王小明',
131 age: 18,
132 model:'用户管理',
133 address: '北京市朝阳区芍药居'
134 },
135 {
136 name: '张小刚',
137 age: 25,
138 model:'用户管理',
139 address: '北京市海淀区西二旗'
140 },
141 {
142 name: '李小红',
143 age: 30,
144 model:'用户管理',
145 address: '上海市浦东新区世纪大道'
146 },{
147 name: '王小明',
148 age: 18,
149 model:'用户管理',
150 address: '北京市朝阳区芍药居'
151 },
152 {
153 name: '张小刚',
154 age: 25,
155 model:'用户管理',
156 address: '北京市海淀区西二旗'
157 },
158 {
159 name: '李小红',
160 age: 30,
161 model:'用户管理',
162 address: '上海市浦东新区世纪大道'
163 },
164 ]
165 }
166 }
167 }
168 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style>
2 .ivu-form-item{
3 margin-bottom: 10px;
4 }
5 </style>
6 <template>
7 <Card>
8 <p slot="title">
9 接口调试
10 </p>
11 <p slot="extra">
12 <Button type="info" icon="navicon-round">调试历史</Button>
13 </p>
14 <Alert show-icon >
15 消息提示文案
16 <template slot="desc">
17 系统分配AppKey只能调用基础API,增值API需要填入自己申请的AppKey
18 </template>
19 </Alert>
20 <Row :gutter="32">
21 <Col span="12">
22 <Form :model="formItem" :label-width="80">
23 <Form-item label="返回格式">
24 <Radio-group v-model="formItem.radio">
25 <Radio label="JSON">JSON</Radio>
26 <Radio label="XML">XML</Radio>
27 </Radio-group>
28 </Form-item>
29 <Form-item label="API模块">
30 <Select v-model="formItem.select" placeholder="请选择">
31 <Option value="beijing">商品模块</Option>
32 <Option value="shanghai">用户模块</Option>
33 </Select>
34 </Form-item>
35 <Form-item label="API名称">
36 <Select v-model="formItem.select" placeholder="请选择">
37 <Option value="beijing">获取用户信息</Option>
38 <Option value="shanghai">获取用户名</Option>
39 </Select>
40 </Form-item>
41 <Form-item label="提交方式">
42 <Radio-group v-model="formItem.radio">
43 <Radio label="POST">POST</Radio>
44 <Radio label="GET">GET</Radio>
45 </Radio-group>
46 </Form-item>
47 <Form-item label="AppKey">
48 <Input v-model="formItem.input" placeholder="请输入"></Input>
49 </Form-item>
50 <Form-item label="AppSecret">
51 <Input v-model="formItem.input" placeholder="请输入"></Input>
52 </Form-item>
53 <Form-item label="参数1">
54 <Input v-model="formItem.input" placeholder="请输入"></Input>
55 </Form-item>
56 <Form-item label="参数2">
57 <Input v-model="formItem.input" placeholder="请输入"></Input>
58 </Form-item>
59 <Form-item label="参数3">
60 <Input v-model="formItem.input" placeholder="请输入"></Input>
61 </Form-item>
62 <Form-item>
63 <Row :gutter="64">
64 <Col span="12">
65 <Button type="primary" long>提交</Button>
66 </Col>
67 <Col span="12">
68 <Button type="ghost" long>保存</Button>
69 </Col>
70 </Row>
71
72
73 </Form-item>
74 </Form>
75 </Col>
76 <Col span="12">
77
78 <Form label-position="top">
79 <Form-item label="API请求参数">
80 <Input v-model="formItem.textarea" type="textarea" :autosize="{minRows: 5}" ></Input>
81 </Form-item>
82 <Form-item label="API返回参数">
83 <Input v-model="formItem.textarea" type="textarea" :autosize="{minRows: 5}" ></Input>
84 </Form-item>
85
86 </Form>
87
88 </Col>
89 </Row>
90 </Card>
91 </template>
92 <script>
93 export default {
94 data () {
95 return {
96 formItem: {
97 input: '',
98 select: '',
99 radio: 'male',
100 checkbox: [],
101 switch: true,
102 date: '',
103 time: '',
104 slider: [20, 50],
105 textarea: ''
106 }
107 }
108 }
109 }
110 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style>
2 .apidetail blockquote {
3 margin: 10px 0;
4 }
5
6 .apidetail-title-name {
7 float: left;
8 }
9
10 .apidetail-title-btn {
11 float: right;
12 }
13
14 .apidetail-title-name-1 {
15 display: block;
16 font-size: 25px;
17 font-weight: 100;
18 }
19
20 .apidetail-title-name-2 {
21 display: block;
22 margin: 10px 0;
23 }
24 </style>
25 <template>
26 <div class="apidetail">
27 <Back-top></Back-top>
28 <div class="apidetail-title">
29 <div class="apidetail-title-name">
30 <span class="apidetail-title-name-1"> taobao.product.update </span>
31 <span class="apidetail-title-name-2"> (修改一个产品,可以修改主图,不能修改子图片)</span>
32 </div>
33 <div class="apidetail-title-btn">
34
35 <Button-group>
36 <Button type="ghost"
37 icon="information-circled">
38
39 1.0</Button>
40 <Button type="primary"
41 icon="gear-a">
42 调试</Button>
43 </Button-group>
44 </div>
45 <div class="clear"></div>
46 </div>
47 <Tag type="border"
48 color="yellow">免费</Tag>
49 <Tag type="border"
50 color="yellow">需授权</Tag>
51 <blockquote>
52 接口说明信息说明信息说明信息说明信息说明信息说明信息说明信息说明信息 说明信息说明信息说明信息说明信息说明信息说明信息说明信息说明信息说明信息说明信息说 说明信息说明信息说明信息
53 </blockquote>
54
55 <Collapse v-model="openPanel">
56 <Panel name="0">
57 接口地址
58 <p slot="content">
59 <Table border
60 :columns="columns2"
61 :data="data2"></Table>
62 </p>
63 </Panel>
64 <Panel name="1">
65 公共参数
66 <p slot="content">
67 <Table border
68 :columns="columns1"
69 :data="data1"></Table>
70 </p>
71 </Panel>
72 <Panel name="2">
73 请求参数
74 <p slot="content">斯蒂夫·盖瑞·沃兹尼亚克(Stephen Gary Wozniak),美国电脑工程师,曾与史蒂夫·乔布斯合伙创立苹果电脑(今之苹果公司)。斯蒂夫·盖瑞·沃兹尼亚克曾就读于美国科罗拉多大学,后转学入美国著名高等学府加州大学伯克利分校(UC Berkeley)并获得电机工程及计算机(EECS)本科学位(1987年)。</p>
75 </Panel>
76 <Panel name="3">
77 响应参数
78 <p slot="content">乔纳森·伊夫是一位工业设计师,现任Apple公司设计师兼资深副总裁,英国爵士。他曾参与设计了iPod,iMac,iPhone,iPad等众多苹果产品。除了乔布斯,他是对苹果那些著名的产品最有影响力的人。</p>
79 </Panel>
80 <Panel name="4">
81 请求示例
82 <p slot="content"
83 class="code">
84 <pre>
85 {
86 "nu":"1093590637819",
87 "message":"ok",
88 "companytype":"ems",
89 "ischeck":"1",
90 "com":"ems",
91 "updatetime":"2016-08-22 01:37:27",
92 "status":"200",
93 "condition":"F00",
94 "codenumber":"1093590637819",
95 "data":[
96 {
97 "time":"2016-08-17 10:57:02",
98 "context":"【北京市】 投递并签收,签收人:他人收 前台",
99 "ftime":"2016-08-17 10:57:02"
100 },
101 {
102 "time":"2016-08-17 07:51:00",
103 "context":"【北京市】 北京邮政速递朝阳路区域分公司呼家楼营投部安排投递,预计23:59:00前投递(投递员姓名:徐龙会18519361767;联系电话:18519361767)",
104 "ftime":"2016-08-17 07:51:00"
105 },
106 {
107 "time":"2016-08-16 17:11:34",
108 "context":"北京市已收件(揽投员姓名:白中位,联系电话:)",
109 "ftime":"2016-08-16 17:11:34"
110 }
111 ],
112 "state":"3"
113 }
114 </pre>
115
116 </p>
117 </Panel>
118 <Panel name="5">
119 响应示例
120 <p slot="content">乔纳森·伊夫是一位工业设计师,现任Apple公司设计师兼资深副总裁,英国爵士。他曾参与设计了iPod,iMac,iPhone,iPad等众多苹果产品。除了乔布斯,他是对苹果那些著名的产品最有影响力的人。</p>
121 </Panel>
122 </Collapse>
123 </div>
124 </template>
125 <script>
126 export default {
127 data() {
128 return {
129 openPanel: [0,1, 2, 3, 4],
130 columns2:[{
131 title: '环境',
132 key: 'str1',
133 width: 200,
134 },{
135 title: '地址',
136 key: 'str2',
137
138 },
139 ],
140 data2:[
141 {
142 str1: '正式环境',
143 str2: 'http://www.baidu.com',
144 },
145 {
146 str1: '沙箱环境',
147 str2: 'http://www.baidu.com',
148 },
149 ],
150 columns1: [
151 {
152 title: '名称',
153 key: 'str1',
154 width: 200,
155 },
156 {
157 title: '类型',
158 key: 'str2',
159 width: 100,
160 },
161 {
162 title: '是否必填',
163 key: 'str3',
164 width: 100,
165 },
166 {
167 title: '描述',
168 key: 'str4'
169 }
170 ],
171 data1: [
172 {
173 str1: 'method',
174 str2: 'String',
175 str3: '是',
176 str4: '描述信息'
177 },
178 {
179 str1: 'app_key',
180 str2: 'String',
181 str3: '是',
182 str4: '描述信息'
183 },
184 {
185 str1: 'target_app_key',
186 str2: 'String',
187 str3: '是',
188 str4: '描述信息'
189 },
190 {
191 str1: 'sign_method',
192 str2: 'String',
193 str3: '是',
194 str4: '描述信息'
195 },
196 {
197 str1: 'session',
198 str2: 'String',
199 str3: '是',
200 str4: '描述信息'
201 },
202 {
203 str1: 'sign',
204 str2: 'String',
205 str3: '是',
206 str4: '描述信息'
207 }
208 ]
209
210 }
211 }
212 }
213 </script>
1 module.exports = {
2 ApiDetail: require('./ApiDetail.vue'),
3 ApiDebug: require('./ApiDebug.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>
3 <!--<div>11111</div>-->
4 <router-view></router-view>
5 </div>
6 </template>
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 Detail: require('./Detail/'),
3 ApiList: require('./ApiList.vue'),
4 DetailView: require('./DetailView.vue'),
5 ApiDocView: require('./ApiDocView.vue'),
6 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <Table border :columns="columns1" :data="data1"></Table>
3 </template>
4 <script>
5 export default {
6 data () {
7 return {
8 columns1: [
9 {
10 title: '文档名称',
11 key: 'name',
12 width:300
13
14 },
15 {
16 title: '所属模块',
17 key: 'model',
18 width:200
19
20 },
21 {
22 title: '类型',
23 key: 'age',
24 width:100,
25 render (row, column, index) {
26 const color = index % 2 ==0 ? 'blue' : 'red';
27 const text = index % 2 ==0 ? '免费' : '收费';
28 return `<tag type="border" color="${color}">${text}</tag>`;
29 }
30 },
31 {
32 title: '描述',
33 key: 'address'
34 }
35 ],
36 data1: [
37 {
38 name: '王小明',
39 age: 18,
40 model:'用户管理',
41 address: '北京市朝阳区芍药居'
42 },
43 {
44 name: '张小刚',
45 age: 25,
46 model:'用户管理',
47 address: '北京市海淀区西二旗'
48 },
49 {
50 name: '李小红',
51 age: 30,
52 model:'用户管理',
53 address: '上海市浦东新区世纪大道'
54 },
55 {
56 name: '周小伟',
57 age: 26,
58 model:'订单管理',
59 address: '深圳市南山区深南大道'
60 },
61 {
62 name: '王小明',
63 age: 18,
64 model:'用户管理',
65 address: '北京市朝阳区芍药居'
66 },
67 {
68 name: '张小刚',
69 age: 25,
70 model:'用户管理',
71 address: '北京市海淀区西二旗'
72 },
73 {
74 name: '李小红',
75 age: 30,
76 model:'用户管理',
77 address: '上海市浦东新区世纪大道'
78 },{
79 name: '王小明',
80 age: 18,
81 model:'用户管理',
82 address: '北京市朝阳区芍药居'
83 },
84 {
85 name: '张小刚',
86 age: 25,
87 model:'用户管理',
88 address: '北京市海淀区西二旗'
89 },
90 {
91 name: '李小红',
92 age: 30,
93 model:'用户管理',
94 address: '上海市浦东新区世纪大道'
95 },{
96 name: '王小明',
97 age: 18,
98 model:'用户管理',
99 address: '北京市朝阳区芍药居'
100 },
101 {
102 name: '张小刚',
103 age: 25,
104 model:'用户管理',
105 address: '北京市海淀区西二旗'
106 },
107 {
108 name: '李小红',
109 age: 30,
110 model:'用户管理',
111 address: '上海市浦东新区世纪大道'
112 },{
113 name: '王小明',
114 age: 18,
115 model:'用户管理',
116 address: '北京市朝阳区芍药居'
117 },
118 {
119 name: '张小刚',
120 age: 25,
121 model:'用户管理',
122 address: '北京市海淀区西二旗'
123 },
124 {
125 name: '李小红',
126 age: 30,
127 model:'用户管理',
128 address: '上海市浦东新区世纪大道'
129 },{
130 name: '王小明',
131 age: 18,
132 model:'用户管理',
133 address: '北京市朝阳区芍药居'
134 },
135 {
136 name: '张小刚',
137 age: 25,
138 model:'用户管理',
139 address: '北京市海淀区西二旗'
140 },
141 {
142 name: '李小红',
143 age: 30,
144 model:'用户管理',
145 address: '上海市浦东新区世纪大道'
146 },{
147 name: '王小明',
148 age: 18,
149 model:'用户管理',
150 address: '北京市朝阳区芍药居'
151 },
152 {
153 name: '张小刚',
154 age: 25,
155 model:'用户管理',
156 address: '北京市海淀区西二旗'
157 },
158 {
159 name: '李小红',
160 age: 30,
161 model:'用户管理',
162 address: '上海市浦东新区世纪大道'
163 },
164 ]
165 }
166 }
167 }
168 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style scoped>
2
3 </style>
4 <template>
5 <div class="layout">
6 <bread></bread>
7 <div class="layout-content">
8
9 <Row>
10 <i-col span="5">
11 <Menu width="auto" @on-select="itemSelect">
12 <Menu-item name="/interface">
13 开放平台
14 </Menu-item>
15 <Submenu name="/interface/1">
16 <template slot="title">
17 <Icon type="ios-paper"></Icon>
18 平台简介
19 </template>
20 <Menu-item name="/interface/detail/111">
21 业务接入
22 </Menu-item>
23 <Menu-item name="/interface/pro/222">
24 接口规范
25 </Menu-item>
26 <Menu-item name="/interface/debug/222">
27 调用说明
28 </Menu-item>
29 <Menu-item name="4">
30 错误编码
31 </Menu-item>
32 </Submenu>
33
34 <Submenu name="/2">
35 <template slot="title">
36 <Icon type="ios-paper"></Icon>
37 调用场景
38 </template>
39 <Menu-item name="1">
40 获取用户信息API
41 </Menu-item>
42 <Menu-item name="2">
43 获取用户名API
44 </Menu-item>
45 <Menu-item name="3">
46 获取订单信息API
47 </Menu-item>
48 <Menu-item name="5">
49 获取订单状态API
50 </Menu-item>
51 </Submenu>
52 </Menu>
53 </i-col>
54 <i-col span="19">
55 <div class="layout-breadcrumb">
56
57 </div>
58 <div class="layout-content-main">
59 <router-view></router-view>
60 </div>
61 </i-col>
62 </Row>
63 </div>
64 <div class="layout-copy">
65 2011-2016 &copy;
66 </div>
67 </div>
68 </template>
69 <script>
70 export default {
71 name: 'home',
72 data() {
73 return {
74 // leftWidth:'5'
75 }
76 },
77 computed: {
78
79 },
80 methods: {
81 itemSelect(name) {
82 this.$router.push(name);
83 }
84 },
85 }
86 </script>
1 module.exports = {
2 DocList: require('./DocList.vue'),
3 HelpDocView: require('./HelpDocView.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 <style scoped>
2 .demo-carousel {
3 height: 400px;
4 line-height: 400px;
5 text-align: center;
6 color: #fff;
7 font-size: 20px;
8 background: #657180;
9 }
10 .bg1{
11 background: #9ea7b4;
12 }
13 .bg2{
14 background: #c3cbd6;
15 }
16 </style>
17 <template>
18 <div class="layout">
19 <!--<bread></bread>-->
20 <Carousel autoplay v-model="value2">
21 <Carousel-item>
22 <div class="demo-carousel">1</div>
23 </Carousel-item>
24 <Carousel-item>
25 <div class="demo-carousel bg1">2</div>
26 </Carousel-item>
27 <Carousel-item>
28 <div class="demo-carousel bg2">3</div>
29 </Carousel-item>
30 <Carousel-item>
31 <div class="demo-carousel">4</div>
32 </Carousel-item>
33 </Carousel>
34 <div class="layout-content">
35
36 <div class="layout-content-main">
37 <router-view></router-view>
38 </div>
39 </div>
40 <div class="layout-copy">
41 2011-2016 &copy;
42 </div>
43 </div>
44 </template>
45 <script>
46 import Layout from '../Layout';
47 export default {
48 name: 'home',
49 data() {
50 return {
51 value2: 0
52 }
53 },
54 computed: {
55
56 },
57 components: Layout
58 }
59 </script>
1 <style>
2 .demo-carousel {
3 height: 400px;
4 line-height: 400px;
5 text-align: center;
6 color: #fff;
7 font-size: 20px;
8 background: #506b9e;
9 }
10 </style>
11 <template>
12 <div>
13 <Alert show-icon
14 style="width:100%">
15 最新公告
16 <template slot="desc">消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案</template>
17 </Alert>
18
19
20 <Row :gutter="16">
21 <Col span="8">
22 <Card>
23 <p slot="title" style="font-size:15px">接入指南</p>
24 <ul class="maincon-cart-ul">
25 <li v-for="n in 4">这里是内容-------{{n}}</li>
26 <li>更多</li>
27 </ul>
28 </Card>
29 </Col>
30 <Col span="8">
31 <Card>
32 <p slot="title" style="font-size:15px">平台规则</p>
33 <ul class="maincon-cart-ul">
34 <li v-for="n in 4">这里是内容-------{{n}}</li>
35 <li>更多</li>
36 </ul>
37 </Card>
38 </Col>
39 <Col span="8">
40 <Card>
41 <p slot="title" style="font-size:15px">基础技术</p>
42 <ul class="maincon-cart-ul">
43 <li v-for="n in 4">这里是内容-------{{n}}</li>
44 <li>更多</li>
45 </ul>
46 </Card>
47 </Col>
48 </Row>
49 <Row style="margin-top:20px">
50 <Col span="24">
51 <Card>
52 <p slot="title" style="font-size:15px">常用工具</p>
53 <ul class="maincon-cart-ul">
54 <li v-for="n in 4">这里是内容-------{{n}}</li>
55 </ul>
56 </Card>
57 </Col>
58 </Row>
59 </div>
60 </template>
61 <style>
62 .maincon-cart-ul li{
63 padding: 15px 0 10px 0;
64 border-bottom: 1px #e3e8ee dashed;
65 }
66 </style>
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 MainCon: require('./MainCon.vue')
3 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <Table border :columns="columns1" :data="data1"></Table>
3 </template>
4 <script>
5 export default {
6 data () {
7 return {
8 columns1: [
9 {
10 title: '文档名称',
11 key: 'name',
12 width:300
13
14 },
15 {
16 title: '所属模块',
17 key: 'model',
18 width:200
19
20 },
21 {
22 title: '类型',
23 key: 'age',
24 width:100,
25 render (row, column, index) {
26 const color = index % 2 ==0 ? 'blue' : 'red';
27 const text = index % 2 ==0 ? '免费' : '收费';
28 return `<tag type="border" color="${color}">${text}</tag>`;
29 }
30 },
31 {
32 title: '描述',
33 key: 'address'
34 }
35 ],
36 data1: [
37 {
38 name: '王小明',
39 age: 18,
40 model:'用户管理',
41 address: '北京市朝阳区芍药居'
42 },
43 {
44 name: '张小刚',
45 age: 25,
46 model:'用户管理',
47 address: '北京市海淀区西二旗'
48 },
49 {
50 name: '李小红',
51 age: 30,
52 model:'用户管理',
53 address: '上海市浦东新区世纪大道'
54 },
55 {
56 name: '周小伟',
57 age: 26,
58 model:'订单管理',
59 address: '深圳市南山区深南大道'
60 },
61 {
62 name: '王小明',
63 age: 18,
64 model:'用户管理',
65 address: '北京市朝阳区芍药居'
66 },
67 {
68 name: '张小刚',
69 age: 25,
70 model:'用户管理',
71 address: '北京市海淀区西二旗'
72 },
73 {
74 name: '李小红',
75 age: 30,
76 model:'用户管理',
77 address: '上海市浦东新区世纪大道'
78 },{
79 name: '王小明',
80 age: 18,
81 model:'用户管理',
82 address: '北京市朝阳区芍药居'
83 },
84 {
85 name: '张小刚',
86 age: 25,
87 model:'用户管理',
88 address: '北京市海淀区西二旗'
89 },
90 {
91 name: '李小红',
92 age: 30,
93 model:'用户管理',
94 address: '上海市浦东新区世纪大道'
95 },{
96 name: '王小明',
97 age: 18,
98 model:'用户管理',
99 address: '北京市朝阳区芍药居'
100 },
101 {
102 name: '张小刚',
103 age: 25,
104 model:'用户管理',
105 address: '北京市海淀区西二旗'
106 },
107 {
108 name: '李小红',
109 age: 30,
110 model:'用户管理',
111 address: '上海市浦东新区世纪大道'
112 },{
113 name: '王小明',
114 age: 18,
115 model:'用户管理',
116 address: '北京市朝阳区芍药居'
117 },
118 {
119 name: '张小刚',
120 age: 25,
121 model:'用户管理',
122 address: '北京市海淀区西二旗'
123 },
124 {
125 name: '李小红',
126 age: 30,
127 model:'用户管理',
128 address: '上海市浦东新区世纪大道'
129 },{
130 name: '王小明',
131 age: 18,
132 model:'用户管理',
133 address: '北京市朝阳区芍药居'
134 },
135 {
136 name: '张小刚',
137 age: 25,
138 model:'用户管理',
139 address: '北京市海淀区西二旗'
140 },
141 {
142 name: '李小红',
143 age: 30,
144 model:'用户管理',
145 address: '上海市浦东新区世纪大道'
146 },{
147 name: '王小明',
148 age: 18,
149 model:'用户管理',
150 address: '北京市朝阳区芍药居'
151 },
152 {
153 name: '张小刚',
154 age: 25,
155 model:'用户管理',
156 address: '北京市海淀区西二旗'
157 },
158 {
159 name: '李小红',
160 age: 30,
161 model:'用户管理',
162 address: '上海市浦东新区世纪大道'
163 },
164 ]
165 }
166 }
167 }
168 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style scoped>
2 .top-bar {
3 height: 320px;
4 line-height: 320px;
5 background-color: #0182c1;
6 margin-bottom: 48px;
7 text-align: center;
8 color: #fff;
9 font-size: 16px;
10 background: #273e4d url(//img.alicdn.com/tps/TB18wHKJVXXXXX_XVXXXXXXXXXX-1700-350.jpg) no-repeat;
11 }
12 </style>
13 <template>
14 <div class="layout">
15 <div class="top-bar">
16 服务中心
17
18 </div>
19 <div class="layout-content">
20
21 <div class="layout-content-main">
22 <router-view></router-view>
23 </div>
24 </div>
25 <div class="layout-copy">
26 2011-2016 &copy;
27 </div>
28 </div>
29 </template>
30 <script>
31 export default {
32 name: 'home',
33 data() {
34 return {
35 value2: 0
36 }
37 },
38 computed: {
39
40 },
41 }
42 </script>
1 module.exports = {
2 SupportList: require('./SupportList.vue'),
3 SupportView: require('./SupportView.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 MainCon: require('./MainCon/'),
3 ApiDoc: require('./ApiDoc/'),
4 HelpDoc: require('./HelpDoc/'),
5 Support: require('./Support/'),
6 Account: require('./Account/'),
7 HomeView: require('./HomeView.vue'),
8
9 };
...\ No newline at end of file ...\ No newline at end of file
1 module.exports = {
2 testaxios: require('./testaxios.vue'),
3 testaxios2: require('./testaxios2.vue'),
4 };
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>
3 <Row>
4 <Col span="24">
5 <div class="content">
6 <Form ref='data'
7 :model="data"
8 :label-width="80"
9 class="demo-ruleForm card-box loginform">
10 <h3 class="title">系统登录</h3>
11 <Form-item label="帐号"
12 prop="username">
13 <Input type="text"
14 v-model="data.username"></Input>
15 </Form-item>
16 <Form-item label="密码"
17 prop="password">
18 <Input type="password"
19 v-model="data.password"></Input>
20 </Form-item>
21 <Form-item>
22 <Button type="primary"
23 @click='login()'>提交</Button>
24 <Button type="primary"
25 @click='loginError()'>错误提交</Button>
26 <Button type="ghost"
27 style="margin-left: 8px">重置</Button>
28 </Form-item>
29
30 </Form>
31 </div>
32 </Col>
33 </Row>
34 </div>
35 </template>
36 <script>
37 export default {
38 name: 'content',
39 data() {
40 return {
41 data: {
42 username: '',
43 password: '',
44 // token: ''
45 },
46 }
47 },
48 methods: {
49 login() {
50 var self = this;
51 console.log(self.data.username);
52 this.axios.get("public/act/getAll").then((res) => {
53 console.log(JSON.stringify(error));
54 console.log("页面里面:" + res);
55 })
56 },
57 loginError(){
58 this.axios.get("test/axioserror").then((res) => {
59 console.log("页面里面:" + res);
60 }).catch((error)=>{
61 console.log(error);
62 })
63 }
64 },
65 created() {
66
67 },
68 mounted() {
69
70 }
71 }
72 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>
3 <blockquote> 22222222222222222222222222</blockquote>
4 </div>
5 </template>
6 <script>
7 export default {
8 name: 'content',
9 data() {
10 return {
11 data: {
12 username: '',
13 password: '',
14 // token: ''
15 },
16 }
17 },
18 methods: {
19 login() {
20 var self = this;
21 console.log(self.data.username);
22 this.axios.get("public/act/getAll").then((res) => {
23 console.log(JSON.stringify(error));
24 console.log("页面里面:" + res);
25 })
26 },
27 loginError(){
28 this.axios.get("test/axioserror").then((res) => {
29 console.log("页面里面:" + res);
30 }).catch((error)=>{
31 console.log(error);
32 })
33 }
34 },
35 created() {
36
37 },
38 mounted() {
39
40 }
41 }
42 </script>
...\ No newline at end of file ...\ No newline at end of file
1 import Login from './Login/';
2 import Test from './TestPages/';
3
4 // import NotFound from './Routeview/NotFound.vue';
5
6 import Modules from './Modules/';
7 import Layout from './Layout/';
8 module.exports = {
9 Login,
10 // NotFound,
11 Test,
12 Layout,
13 Modules
14 };
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!