├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
├── build.js
├── check-versions.js
├── dev-client.js
├── dev-server.js
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── index.html
├── package.json
├── resource
└── img
│ ├── apply@2x.png
│ ├── apply@3x.png
│ ├── applyed@2x.png
│ ├── applyed@3x.png
│ ├── arrow@2x.png
│ ├── arrow@3x.png
│ ├── detailtimebg@2x.png
│ ├── detailtimebg@3x.png
│ ├── line@2x.png
│ ├── line@3x.png
│ ├── listtimebg@2x.png
│ ├── listtimebg@3x.png
│ ├── more@2x.png
│ ├── more@3x.png
│ ├── return@2x.png
│ ├── return@3x.png
│ ├── share@2x.png
│ ├── share@3x.png
│ ├── star16_empty@2x.png
│ ├── star16_empty@3x.png
│ ├── star16_full@2x.png
│ ├── star16_full@3x.png
│ ├── star16_half@2x.png
│ ├── star16_half@3x.png
│ ├── yellow-arrow@2x.png
│ └── yellow-arrow@3x.png
├── src
├── App.vue
├── api
│ ├── config.js
│ ├── try.js
│ └── tryapi.js
├── base
│ ├── apply-list
│ │ └── apply-list.vue
│ ├── apply-persons
│ │ ├── apply-persons.vue
│ │ ├── more@2x.png
│ │ └── more@3x.png
│ ├── back
│ │ ├── back.vue
│ │ ├── return@2x.png
│ │ └── return@3x.png
│ ├── item-img
│ │ ├── detailtimebg@2x.png
│ │ ├── detailtimebg@3x.png
│ │ ├── item-img.vue
│ │ ├── listtimebg@2x.png
│ │ └── listtimebg@3x.png
│ ├── item-info
│ │ └── item-info.vue
│ ├── line
│ │ └── line.vue
│ ├── list-view
│ │ ├── list-view.vue
│ │ ├── yellow-arrow@2x.png
│ │ └── yellow-arrow@3x.png
│ ├── loading
│ │ ├── loading.gif
│ │ └── loading.vue
│ ├── scroll
│ │ └── scroll.vue
│ └── star
│ │ ├── star.vue
│ │ ├── star16_empty@2x.png
│ │ ├── star16_empty@3x.png
│ │ ├── star16_full@2x.png
│ │ ├── star16_full@3x.png
│ │ ├── star16_half@2x.png
│ │ └── star16_half@3x.png
├── common
│ ├── image
│ │ └── 1-3.gif
│ ├── js
│ │ ├── jsonp.js
│ │ └── utils.js
│ └── scss
│ │ ├── _base.scss
│ │ ├── _mixin.scss
│ │ ├── _variable.scss
│ │ └── index.scss
├── components
│ ├── apply-user-list
│ │ └── apply-user-list.vue
│ ├── applys-list
│ │ └── applys-list.vue
│ ├── try-list
│ │ └── try-list.vue
│ ├── tryend-detail
│ │ └── tryend-detail.vue
│ ├── tryend
│ │ └── tryend.vue
│ ├── trying-detail
│ │ ├── arrow@2x.png
│ │ ├── arrow@3x.png
│ │ └── trying-detail.vue
│ ├── trying
│ │ └── trying.vue
│ └── winner-list
│ │ └── winner-list.vue
├── main.js
├── router
│ └── index.js
└── store
│ ├── actions.js
│ ├── getters.js
│ ├── index.js
│ ├── mutation-types.js
│ ├── mutations.js
│ ├── readeMe
│ └── state.js
└── static
├── .gitkeep
├── css
└── reset.css
└── imgs
├── code.png
├── qq.png
├── wx2.jpg
├── yellow-arrow@2x.png
└── yellow-arrow@3x.png
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["istanbul"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
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
10 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // https://eslint.org/docs/user-guide/configuring
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | sourceType: 'module'
8 | },
9 | env: {
10 | browser: true,
11 | },
12 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md
13 | extends: 'standard',
14 | // required to lint *.vue files
15 | plugins: [
16 | 'html'
17 | ],
18 | // add your custom rules here
19 | 'rules': {
20 | // allow paren-less arrow functions
21 | 'arrow-parens': 0,
22 | // allow async-await
23 | 'generator-star-spacing': 0,
24 | // allow debugger during development
25 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
26 | 'semi': ["error", "always"],
27 | 'space-before-function-paren': ["error", "never"],
28 | "indent": 0,
29 | "eol-last": 0
30 | }
31 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | .vscode
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 | package-lock.json
16 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserslist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # fujun
2 |
3 | > 肤君试用 [PS:可以给一个star哦,tks~也可以加入QQ群:692337464一起探讨前端技术]
4 |
5 | ## 手机扫描查看效果
6 |
7 | 
8 |
9 | ## 先安装python2 [下载地址](https://www.python.org/download/releases/2.7.2/)
10 |
11 | ## Build Setup
12 |
13 | ``` bash
14 | # install dependencies
15 | npm install
16 |
17 | # serve with hot reload at localhost:8080
18 | npm run dev
19 |
20 | # build for production with minification
21 | npm run build
22 |
23 | # build for production and view the bundle analyzer report
24 | npm run build --report
25 | ```
26 |
27 | ## 前端学习交流群,QQ群
28 |
29 | 
30 |
31 |
32 | ## 喜欢可以给一个star哦
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, function (err, stats) {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false,
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 | function exec (cmd) {
7 | return require('child_process').execSync(cmd).toString().trim()
8 | }
9 |
10 | const versionRequirements = [
11 | {
12 | name: 'node',
13 | currentVersion: semver.clean(process.version),
14 | versionRequirement: packageConfig.engines.node
15 | }
16 | ]
17 |
18 | if (shell.which('npm')) {
19 | versionRequirements.push({
20 | name: 'npm',
21 | currentVersion: exec('npm --version'),
22 | versionRequirement: packageConfig.engines.npm
23 | })
24 | }
25 |
26 | module.exports = function () {
27 | const warnings = []
28 | for (let i = 0; i < versionRequirements.length; i++) {
29 | const mod = versionRequirements[i]
30 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
31 | warnings.push(mod.name + ': ' +
32 | chalk.red(mod.currentVersion) + ' should be ' +
33 | chalk.green(mod.versionRequirement)
34 | )
35 | }
36 | }
37 |
38 | if (warnings.length) {
39 | console.log('')
40 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
41 | console.log()
42 | for (let i = 0; i < warnings.length; i++) {
43 | const warning = warnings[i]
44 | console.log(' ' + warning)
45 | }
46 | console.log()
47 | process.exit(1)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | 'use strict'
3 | require('eventsource-polyfill')
4 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
5 |
6 | hotClient.subscribe(function (event) {
7 | if (event.action === 'reload') {
8 | window.location.reload()
9 | }
10 | })
11 |
--------------------------------------------------------------------------------
/build/dev-server.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | const config = require('../config')
5 | if (!process.env.NODE_ENV) {
6 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
7 | }
8 |
9 | const opn = require('opn')
10 | const path = require('path')
11 | const express = require('express')
12 | const webpack = require('webpack')
13 | const proxyMiddleware = require('http-proxy-middleware')
14 | const webpackConfig = require('./webpack.dev.conf')
15 | const axios = require('axios')
16 |
17 | // default port where dev server listens for incoming traffic
18 | const port = process.env.PORT || config.dev.port
19 | // automatically open browser, if not set will be false
20 | const autoOpenBrowser = !!config.dev.autoOpenBrowser
21 | // Define HTTP proxies to your custom API backend
22 | // https://github.com/chimurai/http-proxy-middleware
23 | const proxyTable = config.dev.proxyTable
24 |
25 | const app = express()
26 | const apiRoutes = express.Router();
27 |
28 | apiRoutes.get('/getTryList', function(req, res) {
29 | const url = 'https://tryapi.yoka.com/yokatry/gettrylist'
30 | axios.get(url, {
31 | headers: {
32 | referer: 'https://tryapi.yoka.com/',
33 | host: 'tryapi.yoka.com'
34 | },
35 | params: req.query
36 | }).then((response) => {
37 | res.json(response.data)
38 | }).catch((e) => {
39 | console.log(e)
40 | })
41 | })
42 |
43 | apiRoutes.get('/getTryDetail', function(req, res){
44 | const url = "https://tryapi.yoka.com/trydetail/gettrydetail";
45 |
46 | axios.get(url, {
47 | headers: {
48 | referer: 'https://tryapi.yoka.com/',
49 | host: 'tryapi.yoka.com'
50 | },
51 | params: req.query
52 | }).then((response) => {
53 | res.json(response.data)
54 | }).catch((e) => {
55 | console.log(e)
56 | })
57 | });
58 |
59 | apiRoutes.get('/getApplyList', function(req, res){
60 | const url = 'http://tryapi.yoka.com/yokatry/getuserlist';
61 |
62 | axios.get(url, {
63 | headers: {
64 | referer: 'https://tryapi.yoka.com/',
65 | host: 'tryapi.yoka.com'
66 | },
67 | params: req.query
68 | }).then((response) => {
69 | res.json(response.data);
70 | }).catch((e) => {
71 | console.log(e)
72 | });
73 | })
74 | app.use('/api',apiRoutes)
75 |
76 | const compiler = webpack(webpackConfig)
77 |
78 | const devMiddleware = require('webpack-dev-middleware')(compiler, {
79 | publicPath: webpackConfig.output.publicPath,
80 | quiet: true
81 | })
82 |
83 | const hotMiddleware = require('webpack-hot-middleware')(compiler, {
84 | log: false,
85 | heartbeat: 2000
86 | })
87 | // force page reload when html-webpack-plugin template changes
88 | // currently disabled until this is resolved:
89 | // https://github.com/jantimon/html-webpack-plugin/issues/680
90 | // compiler.plugin('compilation', function (compilation) {
91 | // compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
92 | // hotMiddleware.publish({ action: 'reload' })
93 | // cb()
94 | // })
95 | // })
96 |
97 | // enable hot-reload and state-preserving
98 | // compilation error display
99 | app.use(hotMiddleware)
100 |
101 | // proxy api requests
102 | Object.keys(proxyTable).forEach(function (context) {
103 | let options = proxyTable[context]
104 | if (typeof options === 'string') {
105 | options = { target: options }
106 | }
107 | app.use(proxyMiddleware(options.filter || context, options))
108 | })
109 |
110 | // handle fallback for HTML5 history API
111 | app.use(require('connect-history-api-fallback')())
112 |
113 | // serve webpack bundle output
114 | app.use(devMiddleware)
115 |
116 | // serve pure static assets
117 | const staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
118 | app.use(staticPath, express.static('./static'))
119 |
120 | const uri = 'http://localhost:' + port
121 |
122 | var _resolve
123 | var _reject
124 | var readyPromise = new Promise((resolve, reject) => {
125 | _resolve = resolve
126 | _reject = reject
127 | })
128 |
129 | var server
130 | var portfinder = require('portfinder')
131 | portfinder.basePort = port
132 |
133 | console.log('> Starting dev server...')
134 | devMiddleware.waitUntilValid(() => {
135 | portfinder.getPort((err, port) => {
136 | if (err) {
137 | _reject(err)
138 | }
139 | process.env.PORT = port
140 | var uri = 'http://localhost:' + port
141 | console.log('> Listening at ' + uri + '\n')
142 | // when env is testing, don't need open it
143 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
144 | opn(uri)
145 | }
146 | server = app.listen(port)
147 | _resolve()
148 | })
149 | })
150 |
151 | module.exports = {
152 | ready: readyPromise,
153 | close: () => {
154 | server.close()
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const config = require('../config')
4 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
5 |
6 | exports.assetsPath = function (_path) {
7 | const assetsSubDirectory = process.env.NODE_ENV === 'production'
8 | ? config.build.assetsSubDirectory
9 | : config.dev.assetsSubDirectory
10 | return path.posix.join(assetsSubDirectory, _path)
11 | }
12 |
13 | exports.cssLoaders = function (options) {
14 | options = options || {}
15 |
16 | const cssLoader = {
17 | loader: 'css-loader',
18 | options: {
19 | minimize: process.env.NODE_ENV === 'production',
20 | sourceMap: options.sourceMap
21 | }
22 | }
23 |
24 | // generate loader string to be used with extract text plugin
25 | function generateLoaders (loader, loaderOptions) {
26 | const loaders = [cssLoader]
27 | if (loader) {
28 | loaders.push({
29 | loader: loader + '-loader',
30 | options: Object.assign({}, loaderOptions, {
31 | sourceMap: options.sourceMap
32 | })
33 | })
34 | }
35 |
36 | // Extract CSS when that option is specified
37 | // (which is the case during production build)
38 | if (options.extract) {
39 | return ExtractTextPlugin.extract({
40 | use: loaders,
41 | fallback: 'vue-style-loader'
42 | })
43 | } else {
44 | return ['vue-style-loader'].concat(loaders)
45 | }
46 | }
47 |
48 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
49 | return {
50 | css: generateLoaders(),
51 | postcss: generateLoaders(),
52 | less: generateLoaders('less'),
53 | sass: generateLoaders('sass', { indentedSyntax: true }),
54 | scss: generateLoaders('sass'),
55 | stylus: generateLoaders('stylus'),
56 | styl: generateLoaders('stylus')
57 | }
58 | }
59 |
60 | // Generate loaders for standalone style files (outside of .vue)
61 | exports.styleLoaders = function (options) {
62 | const output = []
63 | const loaders = exports.cssLoaders(options)
64 | for (const extension in loaders) {
65 | const loader = loaders[extension]
66 | output.push({
67 | test: new RegExp('\\.' + extension + '$'),
68 | use: loader
69 | })
70 | }
71 | return output
72 | }
73 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 |
6 | module.exports = {
7 | loaders: utils.cssLoaders({
8 | sourceMap: isProduction
9 | ? config.build.productionSourceMap
10 | : config.dev.cssSourceMap,
11 | extract: isProduction
12 | }),
13 | transformToRequire: {
14 | video: 'src',
15 | source: 'src',
16 | img: 'src',
17 | image: 'xlink:href'
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const config = require('../config')
5 | const vueLoaderConfig = require('./vue-loader.conf')
6 |
7 | function resolve(dir) {
8 | return path.join(__dirname, '..', dir)
9 | }
10 |
11 | module.exports = {
12 | entry: {
13 | app: './src/main.js'
14 | },
15 | output: {
16 | path: config.build.assetsRoot,
17 | filename: '[name].js',
18 | publicPath: process.env.NODE_ENV === 'production' ?
19 | config.build.assetsPublicPath :
20 | config.dev.assetsPublicPath
21 | },
22 | resolve: {
23 | extensions: ['.js', '.vue', '.json'],
24 | alias: {
25 | 'vue$': 'vue/dist/vue.esm.js',
26 | '@': resolve('src'),
27 | 'common': resolve('./src/common'),
28 | 'base': resolve('./src/base'),
29 | 'components': resolve('./src/components'),
30 | 'api': resolve('./src/api')
31 | }
32 | },
33 | module: {
34 | rules: [{
35 | test: /\.(js|vue)$/,
36 | loader: 'eslint-loader',
37 | enforce: 'pre',
38 | include: [resolve('src'), resolve('test')],
39 | options: {
40 | formatter: require('eslint-friendly-formatter')
41 | }
42 | },
43 | {
44 | test: /\.vue$/,
45 | loader: 'vue-loader',
46 | options: vueLoaderConfig
47 | },
48 | {
49 | test: /\.js$/,
50 | loader: 'babel-loader',
51 | include: [resolve('src'), resolve('test')]
52 | },
53 | {
54 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
55 | loader: 'url-loader',
56 | options: {
57 | limit: 10000,
58 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
59 | }
60 | },
61 | {
62 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
63 | loader: 'url-loader',
64 | options: {
65 | limit: 10000,
66 | name: utils.assetsPath('media/[name].[hash:7].[ext]')
67 | }
68 | },
69 | {
70 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
71 | loader: 'url-loader',
72 | options: {
73 | limit: 10000,
74 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
75 | }
76 | }
77 | ]
78 | }
79 | }
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const webpack = require('webpack')
4 | const config = require('../config')
5 | const merge = require('webpack-merge')
6 | const baseWebpackConfig = require('./webpack.base.conf')
7 | const HtmlWebpackPlugin = require('html-webpack-plugin')
8 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
9 |
10 | // add hot-reload related code to entry chunks
11 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
12 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
13 | })
14 |
15 | module.exports = merge(baseWebpackConfig, {
16 | module: {
17 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
18 | },
19 | // cheap-module-eval-source-map is faster for development
20 | devtool: '#cheap-module-eval-source-map',
21 | plugins: [
22 | new webpack.DefinePlugin({
23 | 'process.env': config.dev.env
24 | }),
25 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
26 | new webpack.HotModuleReplacementPlugin(),
27 | new webpack.NoEmitOnErrorsPlugin(),
28 | // https://github.com/ampedandwired/html-webpack-plugin
29 | new HtmlWebpackPlugin({
30 | filename: 'index.html',
31 | template: 'index.html',
32 | inject: true
33 | }),
34 | new FriendlyErrorsPlugin()
35 | ]
36 | })
37 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const webpack = require('webpack')
5 | const config = require('../config')
6 | const merge = require('webpack-merge')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 |
13 | const env = config.build.env
14 |
15 | const webpackConfig = merge(baseWebpackConfig, {
16 | module: {
17 | rules: utils.styleLoaders({
18 | sourceMap: config.build.productionSourceMap,
19 | extract: false
20 | })
21 | },
22 | devtool: config.build.productionSourceMap ? '#source-map' : false,
23 | output: {
24 | path: config.build.assetsRoot,
25 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
26 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
27 | },
28 | plugins: [
29 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
30 | new webpack.DefinePlugin({
31 | 'process.env': env
32 | }),
33 | // UglifyJs do not support ES6+, you can also use babel-minify for better treeshaking: https://github.com/babel/minify
34 | new webpack.optimize.UglifyJsPlugin({
35 | compress: {
36 | warnings: false
37 | },
38 | sourceMap: false
39 | }),
40 | // extract css into its own file
41 | new ExtractTextPlugin({
42 | filename: utils.assetsPath('css/[name].[contenthash].css')
43 | }),
44 | // Compress extracted CSS. We are using this plugin so that possible
45 | // duplicated CSS from different components can be deduped.
46 | new OptimizeCSSPlugin({
47 | cssProcessorOptions: {
48 | safe: true
49 | }
50 | }),
51 | // generate dist index.html with correct asset hash for caching.
52 | // you can customize output by editing /index.html
53 | // see https://github.com/ampedandwired/html-webpack-plugin
54 | new HtmlWebpackPlugin({
55 | filename: config.build.index,
56 | template: 'index.html',
57 | inject: true,
58 | minify: {
59 | removeComments: true,
60 | collapseWhitespace: true,
61 | removeAttributeQuotes: true
62 | // more options:
63 | // https://github.com/kangax/html-minifier#options-quick-reference
64 | },
65 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
66 | chunksSortMode: 'dependency'
67 | }),
68 | // keep module.id stable when vender modules does not change
69 | new webpack.HashedModuleIdsPlugin(),
70 | // split vendor js into its own file
71 | new webpack.optimize.CommonsChunkPlugin({
72 | name: 'vendor',
73 | minChunks: function (module) {
74 | // any required modules inside node_modules are extracted to vendor
75 | return (
76 | module.resource &&
77 | /\.js$/.test(module.resource) &&
78 | module.resource.indexOf(
79 | path.join(__dirname, '../node_modules')
80 | ) === 0
81 | )
82 | }
83 | }),
84 | // extract webpack runtime and module manifest to its own file in order to
85 | // prevent vendor hash from being updated whenever app bundle is updated
86 | new webpack.optimize.CommonsChunkPlugin({
87 | name: 'manifest',
88 | chunks: ['vendor']
89 | }),
90 | // copy custom static assets
91 | new CopyWebpackPlugin([
92 | {
93 | from: path.resolve(__dirname, '../static'),
94 | to: config.build.assetsSubDirectory,
95 | ignore: ['.*']
96 | }
97 | ])
98 | ]
99 | })
100 |
101 | if (config.build.productionGzip) {
102 | const CompressionWebpackPlugin = require('compression-webpack-plugin')
103 |
104 | webpackConfig.plugins.push(
105 | new CompressionWebpackPlugin({
106 | asset: '[path].gz[query]',
107 | algorithm: 'gzip',
108 | test: new RegExp(
109 | '\\.(' +
110 | config.build.productionGzipExtensions.join('|') +
111 | ')$'
112 | ),
113 | threshold: 10240,
114 | minRatio: 0.8
115 | })
116 | )
117 | }
118 |
119 | if (config.build.bundleAnalyzerReport) {
120 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
121 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
122 | }
123 |
124 | module.exports = webpackConfig
125 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 |
2 | 'use strict'
3 | // Template version: 1.1.3
4 | // see http://vuejs-templates.github.io/webpack for documentation.
5 |
6 | const path = require('path')
7 |
8 | module.exports = {
9 | build: {
10 | env: require('./prod.env'),
11 | index: path.resolve(__dirname, '../dist/index.html'),
12 | assetsRoot: path.resolve(__dirname, '../dist'),
13 | assetsSubDirectory: 'static',
14 | assetsPublicPath: './',
15 | productionSourceMap: true,
16 | // Gzip off by default as many popular static hosts such as
17 | // Surge or Netlify already gzip all static assets for you.
18 | // Before setting to `true`, make sure to:
19 | // npm install --save-dev compression-webpack-plugin
20 | productionGzip: false,
21 | productionGzipExtensions: ['js', 'css'],
22 | // Run the build command with an extra argument to
23 | // View the bundle analyzer report after build finishes:
24 | // `npm run build --report`
25 | // Set to `true` or `false` to always turn it on or off
26 | bundleAnalyzerReport: process.env.npm_config_report
27 | },
28 | dev: {
29 | env: require('./dev.env'),
30 | port: process.env.PORT || 8080,
31 | autoOpenBrowser: true,
32 | assetsSubDirectory: 'static',
33 | assetsPublicPath: '/',
34 | proxyTable: {},
35 | // CSS Sourcemaps off by default because relative paths are "buggy"
36 | // with this option, according to the CSS-Loader README
37 | // (https://github.com/webpack/css-loader#sourcemaps)
38 | // In our experience, they generally work as expected,
39 | // just be aware of this issue when enabling this option.
40 | cssSourceMap: false
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fujun
6 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fujun",
3 | "version": "1.0.1",
4 | "description": "肤君试用",
5 | "author": "杨文毅 ",
6 | "private": true,
7 | "scripts": {
8 | "dev": "node build/dev-server.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js",
11 | "lint": "eslint --ext .js,.vue src"
12 | },
13 | "dependencies": {
14 | "axios": "^0.17.0",
15 | "better-scroll": "^1.3.1",
16 | "fastclick": "^1.0.6",
17 | "jsonp": "^0.2.1",
18 | "lib-flexible": "^0.3.2",
19 | "vue": "^2.5.2",
20 | "vue-lazyload": "^1.1.4",
21 | "vue-router": "^3.0.1",
22 | "vuex": "^3.0.0"
23 | },
24 | "devDependencies": {
25 | "autoprefixer": "^7.1.2",
26 | "babel-core": "^6.22.1",
27 | "babel-eslint": "^7.1.1",
28 | "babel-loader": "^7.1.1",
29 | "babel-plugin-transform-runtime": "^6.22.0",
30 | "babel-preset-env": "^1.3.2",
31 | "babel-preset-stage-2": "^6.22.0",
32 | "babel-register": "^6.22.0",
33 | "chalk": "^2.0.1",
34 | "connect-history-api-fallback": "^1.3.0",
35 | "copy-webpack-plugin": "^4.0.1",
36 | "css-loader": "^0.28.0",
37 | "eslint": "^3.19.0",
38 | "eslint-config-standard": "^10.2.1",
39 | "eslint-friendly-formatter": "^3.0.0",
40 | "eslint-loader": "^1.7.1",
41 | "eslint-plugin-html": "^3.0.0",
42 | "eslint-plugin-import": "^2.7.0",
43 | "eslint-plugin-node": "^5.2.0",
44 | "eslint-plugin-promise": "^3.4.0",
45 | "eslint-plugin-standard": "^3.0.1",
46 | "eventsource-polyfill": "^0.9.6",
47 | "express": "^4.14.1",
48 | "extract-text-webpack-plugin": "^3.0.0",
49 | "file-loader": "^1.1.4",
50 | "friendly-errors-webpack-plugin": "^1.6.1",
51 | "html-webpack-plugin": "^2.30.1",
52 | "http-proxy-middleware": "^0.17.3",
53 | "node-sass": "^4.5.3",
54 | "opn": "^5.1.0",
55 | "optimize-css-assets-webpack-plugin": "^3.2.0",
56 | "ora": "^1.2.0",
57 | "portfinder": "^1.0.13",
58 | "rimraf": "^2.6.0",
59 | "sass-loader": "^6.0.6",
60 | "semver": "^5.3.0",
61 | "shelljs": "^0.7.6",
62 | "url-loader": "^0.5.8",
63 | "vue-loader": "^13.3.0",
64 | "vue-style-loader": "^3.0.1",
65 | "vue-template-compiler": "^2.5.2",
66 | "webpack": "^3.6.0",
67 | "webpack-bundle-analyzer": "^2.9.0",
68 | "webpack-dev-middleware": "^1.12.0",
69 | "webpack-hot-middleware": "^2.18.2",
70 | "webpack-merge": "^4.1.0"
71 | },
72 | "engines": {
73 | "node": ">= 4.0.0",
74 | "npm": ">= 3.0.0"
75 | },
76 | "browserslist": [
77 | "> 1%",
78 | "last 2 versions",
79 | "not ie <= 8"
80 | ]
81 | }
82 |
--------------------------------------------------------------------------------
/resource/img/apply@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/apply@2x.png
--------------------------------------------------------------------------------
/resource/img/apply@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/apply@3x.png
--------------------------------------------------------------------------------
/resource/img/applyed@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/applyed@2x.png
--------------------------------------------------------------------------------
/resource/img/applyed@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/applyed@3x.png
--------------------------------------------------------------------------------
/resource/img/arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/arrow@2x.png
--------------------------------------------------------------------------------
/resource/img/arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/arrow@3x.png
--------------------------------------------------------------------------------
/resource/img/detailtimebg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/detailtimebg@2x.png
--------------------------------------------------------------------------------
/resource/img/detailtimebg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/detailtimebg@3x.png
--------------------------------------------------------------------------------
/resource/img/line@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/line@2x.png
--------------------------------------------------------------------------------
/resource/img/line@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/line@3x.png
--------------------------------------------------------------------------------
/resource/img/listtimebg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/listtimebg@2x.png
--------------------------------------------------------------------------------
/resource/img/listtimebg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/listtimebg@3x.png
--------------------------------------------------------------------------------
/resource/img/more@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/more@2x.png
--------------------------------------------------------------------------------
/resource/img/more@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/more@3x.png
--------------------------------------------------------------------------------
/resource/img/return@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/return@2x.png
--------------------------------------------------------------------------------
/resource/img/return@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/return@3x.png
--------------------------------------------------------------------------------
/resource/img/share@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/share@2x.png
--------------------------------------------------------------------------------
/resource/img/share@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/share@3x.png
--------------------------------------------------------------------------------
/resource/img/star16_empty@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_empty@2x.png
--------------------------------------------------------------------------------
/resource/img/star16_empty@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_empty@3x.png
--------------------------------------------------------------------------------
/resource/img/star16_full@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_full@2x.png
--------------------------------------------------------------------------------
/resource/img/star16_full@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_full@3x.png
--------------------------------------------------------------------------------
/resource/img/star16_half@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_half@2x.png
--------------------------------------------------------------------------------
/resource/img/star16_half@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/star16_half@3x.png
--------------------------------------------------------------------------------
/resource/img/yellow-arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/yellow-arrow@2x.png
--------------------------------------------------------------------------------
/resource/img/yellow-arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/resource/img/yellow-arrow@3x.png
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 进行中
6 |
7 |
8 | 已结束
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
25 |
55 |
--------------------------------------------------------------------------------
/src/api/config.js:
--------------------------------------------------------------------------------
1 | export const commonParams = {
2 | format: 'jsonp'
3 | };
4 |
5 | export const options = {
6 | param: 'callback'
7 | };
8 |
--------------------------------------------------------------------------------
/src/api/try.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | /**
3 | * 获取试用列表接口
4 | * @param pageNum
5 | * @param status
6 | * @returns {Promise.|*}
7 | */
8 | export function getTryList(pageNum, status) {
9 | const url = '/api/getTryList';
10 | const data = {
11 | status: status,
12 | page: pageNum,
13 | rnd: Math.random(),
14 | format: 'jsonp',
15 | callback: 'callback'
16 | };
17 | return axios.get(url, {
18 | params: data
19 | }).then((res) => {
20 | return Promise.resolve(res.data);
21 | });
22 | };
23 | /**
24 | * 获取试用底层页接口
25 | * @param status
26 | * @returns {Promise.|*}
27 | */
28 | export function getTryDetail(status, id) {
29 | const url = 'api/getTryDetail';
30 |
31 | const data = {
32 | status: status,
33 | try_id: id,
34 | rnd: Math.random(),
35 | format: 'json'
36 | };
37 |
38 | return axios.get(url, {
39 | params: data
40 | }).then((res) => {
41 | return Promise.resolve(res.data);
42 | });
43 | }
44 | /**
45 | * 获取申请名单列表
46 | * @param type
47 | * @param id
48 | * @returns {Promise.|*}
49 | */
50 | export function getApplyList(pageNum, type, id) {
51 | const url = '/api/getApplyList';
52 | const data = {
53 | page: pageNum,
54 | type: type,
55 | try_id: id,
56 | rnd: Math.random(),
57 | format: 'json'
58 | };
59 |
60 | return axios.get(url, {
61 | params: data
62 | }).then((res) => {
63 | return Promise.resolve(res.data);
64 | });
65 | }
66 |
--------------------------------------------------------------------------------
/src/api/tryapi.js:
--------------------------------------------------------------------------------
1 | import jsonp from 'common/js/jsonp';
2 | import {commonParams, options} from './config';
3 |
4 | export function getTryList(pageNum, status) {
5 | const url = 'https://tryapi.yoka.com/yokatry/gettrylist';
6 | const data = Object.assign({}, commonParams, {
7 | status: status,
8 | page: pageNum
9 | });
10 | return jsonp(url, data, options);
11 | };
12 |
13 | export function getTryDetail(status, id) {
14 | const url = 'https://tryapi.yoka.com/trydetail/gettrydetail';
15 | const data = Object.assign({}, commonParams, {
16 | status: status,
17 | try_id: id
18 | });
19 |
20 | return jsonp(url, data, options);
21 | };
22 |
23 | export function getApplyList(pageNum, type, id) {
24 | const url = 'http://tryapi.yoka.com/yokatry/getuserlist';
25 | const data = Object.assign({}, commonParams, {
26 | page: pageNum,
27 | type: type,
28 | try_id: id
29 | });
30 |
31 | return jsonp(url, data, options);
32 | };
33 |
--------------------------------------------------------------------------------
/src/base/apply-list/apply-list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
![]()
7 |
8 |
9 |
{{item.name}}
10 |
{{item.apply_content}}
11 |
12 |
13 | {{loadtip}}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
59 |
60 |
112 |
--------------------------------------------------------------------------------
/src/base/apply-persons/apply-persons.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
31 |
32 |
53 |
--------------------------------------------------------------------------------
/src/base/apply-persons/more@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/apply-persons/more@2x.png
--------------------------------------------------------------------------------
/src/base/apply-persons/more@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/apply-persons/more@3x.png
--------------------------------------------------------------------------------
/src/base/back/back.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
33 |
--------------------------------------------------------------------------------
/src/base/back/return@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/back/return@2x.png
--------------------------------------------------------------------------------
/src/base/back/return@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/back/return@3x.png
--------------------------------------------------------------------------------
/src/base/item-img/detailtimebg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/item-img/detailtimebg@2x.png
--------------------------------------------------------------------------------
/src/base/item-img/detailtimebg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/item-img/detailtimebg@3x.png
--------------------------------------------------------------------------------
/src/base/item-img/item-img.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
5 | 距离结束
{{item.try_end_date}}
6 | 距离结束
{{item.try_span_time}}
7 |
8 |
9 | 已结束
{{item.try_applys}}人申请
10 | 已结束
11 |
12 |
13 |
14 |
15 |
35 |
36 |
72 |
--------------------------------------------------------------------------------
/src/base/item-img/listtimebg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/item-img/listtimebg@2x.png
--------------------------------------------------------------------------------
/src/base/item-img/listtimebg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/item-img/listtimebg@3x.png
--------------------------------------------------------------------------------
/src/base/item-info/item-info.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{item.product.title}}
4 |
5 |
6 | {{item.is_trial_product?'试用装':'正装'}}{{item.spec}}
7 | {{item.price==0?'未知':'¥'+item.price}}
8 | {{item.amount}}份
9 | {{item.applayed.applay_num}}人已申请
10 |
11 |
12 |
13 |
14 |
15 |
40 |
41 |
110 |
--------------------------------------------------------------------------------
/src/base/line/line.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
17 |
--------------------------------------------------------------------------------
/src/base/list-view/list-view.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | 免费申请
11 |
12 |
13 | {{item.reportsnum}}篇试用报告
14 | 未公布中奖名单
15 |
16 |
17 |
18 |
19 |
20 |
{{item.try_applys}}人已申请
21 |
中奖名单已公布
22 |
23 |
24 | {{loadtip}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
92 |
93 |
178 |
--------------------------------------------------------------------------------
/src/base/list-view/yellow-arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/list-view/yellow-arrow@2x.png
--------------------------------------------------------------------------------
/src/base/list-view/yellow-arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/list-view/yellow-arrow@3x.png
--------------------------------------------------------------------------------
/src/base/loading/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/loading/loading.gif
--------------------------------------------------------------------------------
/src/base/loading/loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
{{title}}
5 |
6 |
7 |
17 |
28 |
--------------------------------------------------------------------------------
/src/base/scroll/scroll.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
108 |
111 |
--------------------------------------------------------------------------------
/src/base/star/star.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
46 |
47 |
79 |
--------------------------------------------------------------------------------
/src/base/star/star16_empty@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_empty@2x.png
--------------------------------------------------------------------------------
/src/base/star/star16_empty@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_empty@3x.png
--------------------------------------------------------------------------------
/src/base/star/star16_full@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_full@2x.png
--------------------------------------------------------------------------------
/src/base/star/star16_full@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_full@3x.png
--------------------------------------------------------------------------------
/src/base/star/star16_half@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_half@2x.png
--------------------------------------------------------------------------------
/src/base/star/star16_half@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/base/star/star16_half@3x.png
--------------------------------------------------------------------------------
/src/common/image/1-3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/common/image/1-3.gif
--------------------------------------------------------------------------------
/src/common/js/jsonp.js:
--------------------------------------------------------------------------------
1 | import originJSONP from 'jsonp';
2 |
3 | export default function jsonp(url, data, options) {
4 | url += (url.indexOf('?') < 0 ? '?' : '&') + param(data);
5 |
6 | return new Promise((resolve, reject) => {
7 | originJSONP(url, options, (err, data) => {
8 | if (!err) {
9 | resolve(data);
10 | } else {
11 | reject(err);
12 | }
13 | });
14 | });
15 | };
16 |
17 | function param(data) {
18 | let url = '';
19 | for (let i in data) {
20 | let value = data[i] !== undefined ? data[i] : '';
21 | url += `&${i}=${encodeURIComponent(value)}`;
22 | }
23 | return url ? url.substring(1) : '';
24 | }
25 |
--------------------------------------------------------------------------------
/src/common/js/utils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 解析URL参数
3 | * @example ?id=12345&a=b
4 | * @return Object {id: 12345, a:'b'}
5 | */
6 | export function urlParse() {
7 | let search = window.location.search;
8 | let obj = {};
9 | // 正则
10 | let reg = /[?&][^?&]+=[^?&]+]/g;
11 | // match方法可以在字符串内检索指定的值,返回一个或多个正则表达式的匹配
12 | let arr = search.match(reg); // 返回 ["?id=12345", "&a=b"]
13 | if (arr) {
14 | arr.forEach((item) => {
15 | let tempArr = item.substring(1).split('=');
16 | // decodeURIComponent() 函数可对 dencodeURIComponent() 函数编码的 URI 进行解码。
17 | let key = decodeURIComponent(tempArr[0]);
18 | let value = decodeURIComponent(tempArr[1]);
19 |
20 | obj[key] = value;
21 | });
22 | }
23 | return obj;
24 | }
25 |
--------------------------------------------------------------------------------
/src/common/scss/_base.scss:
--------------------------------------------------------------------------------
1 | @import "variable";
2 | html,body{
3 | line-height: 1;
4 | font-weight:200;
5 | font-family: 'PingFang SC','Helvetica Neue',Helvetica,STHeiTi,Arial,sans-serif;
6 | max-width: 540px;
7 | margin:0 auto;
8 | }
9 | .detailpage{
10 | position: fixed;
11 | top: 0;
12 | left: 0;
13 | right: 0;
14 | bottom: 0;
15 | z-index:200;
16 | background-color: #fff;
17 | overflow-y: auto;
18 | -webkit-overflow-scrolling:touch;
19 | }
20 | .origin-arrow{
21 | width:12*$n;
22 | height:22*$n;
23 | display: inline-block;
24 | margin-top:2*$n;
25 | margin-left:9*$n;
26 | background-repeat:no-repeat;
27 | background-size: 100% 100%;
28 | @include bg-image('../../../static/imgs/yellow-arrow');
29 | }
30 | .trygoods{
31 | max-width: 540px;
32 | }
33 | .list-load-tip{
34 | font-size: 24*$n;
35 | line-height: 40*$n;
36 | height: 40*$n;
37 | color: #000;
38 | width: 100%;
39 | text-align: center;
40 | }
41 | .loading-container{
42 | position: absolute;
43 | top: 50%;
44 | transform: translateY(-50%);
45 | width: 100%;
46 | }
47 |
--------------------------------------------------------------------------------
/src/common/scss/_mixin.scss:
--------------------------------------------------------------------------------
1 | @mixin border-1px($color){
2 | position: relative;
3 | &:after{
4 | content: '';
5 | display: block;
6 | width:100%;
7 | position: absolute;
8 | left:0;
9 | bottom:0;
10 | border-top:1px solid $color;
11 | transform: scaleY(0.6);
12 | }
13 | }
14 |
15 | @mixin border-none(){
16 | &:after{
17 | display: none;
18 | }
19 | }
20 |
21 | @mixin bg-image($name){
22 | background-image: url($name+'@2x.png');
23 | @media (-webkit-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
24 | background-image: url($name+'@3x.png');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/common/scss/_variable.scss:
--------------------------------------------------------------------------------
1 | //$n:1px/2;
2 | $n:1rem/75;
3 |
4 | /*字体颜色*/
5 |
6 | $black:#000;
7 | $origin:#FF8B3B;
8 | $color-e9:#E9E9E9;
9 | $color-153:rgb(153, 153, 153);
10 | $color-102:rgb(102, 102, 102);
11 |
12 | /*边框颜色*/
13 |
14 | $border-origin:#FF8B3B;
15 |
--------------------------------------------------------------------------------
/src/common/scss/index.scss:
--------------------------------------------------------------------------------
1 | @import "mixin";
2 | @import "base";
3 |
--------------------------------------------------------------------------------
/src/components/apply-user-list/apply-user-list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
138 |
139 |
191 |
--------------------------------------------------------------------------------
/src/components/applys-list/applys-list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
20 |
21 |
23 |
--------------------------------------------------------------------------------
/src/components/try-list/try-list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
92 |
93 |
107 |
--------------------------------------------------------------------------------
/src/components/tryend-detail/tryend-detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
有{{detaildata.try_report.reportsnum}}个试用报告
17 |
暂无数据
18 |
19 |
20 |
21 |
22 |
23 |
{{item.user_name}}
24 |
25 |
26 |
{{item.score}}
27 |
28 |
29 |
{{item.report_content}}
30 |
31 |
32 | ![]()
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
139 |
140 |
287 |
--------------------------------------------------------------------------------
/src/components/tryend/tryend.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
--------------------------------------------------------------------------------
/src/components/trying-detail/arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/components/trying-detail/arrow@2x.png
--------------------------------------------------------------------------------
/src/components/trying-detail/arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/components/trying-detail/arrow@3x.png
--------------------------------------------------------------------------------
/src/components/trying-detail/trying-detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
{{detaildata.applayed.applay_num}}人已申请
12 |
13 |
14 |
15 |
产品介绍
16 |
17 |
{{detaildata.product.description}}
18 |
{{detaildata.product.description}}
19 |
20 |
21 |
22 |
23 |
29 |
30 |
31 |
32 |
33 |
103 |
104 |
185 |
--------------------------------------------------------------------------------
/src/components/trying/trying.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
--------------------------------------------------------------------------------
/src/components/winner-list/winner-list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
22 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue';
4 | import App from './App';
5 | import router from './router';
6 | import store from './store';
7 | import FastClick from 'fastclick';
8 | import VueLazyload from 'vue-lazyload';
9 | // 引入flexible
10 | import 'lib-flexible/flexible';
11 | // 引入需要打包的外部样式
12 | import 'common/scss/index.scss';
13 |
14 | // 当fastclick和better-scroll冲突时,可以给标签加class="needsClick"
15 | FastClick.attach(document.body);
16 |
17 | /**
18 | * 懒加载组件配置
19 | */
20 | Vue.use(VueLazyload, {
21 | loading: require('common/image/1-3.gif')
22 | });
23 |
24 | Vue.config.productionTip = false;
25 |
26 | /* eslint-disable no-new */
27 | new Vue({
28 | el: '#app',
29 | router,
30 | store,
31 | template: '',
32 | components: { App }
33 | });
34 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Router from 'vue-router';
3 | import Trying from 'components/trying/trying';
4 | import Tryend from 'components/tryend/tryend';
5 | import TryingDetail from 'components/trying-detail/trying-detail';
6 | import TryendDetail from 'components/tryend-detail/tryend-detail';
7 | import ApplyList from 'components/applys-list/applys-list';
8 | import WinnerList from 'components/winner-list/winner-list';
9 |
10 | Vue.use(Router);
11 |
12 | const routes = [
13 | {
14 | path: '/',
15 | redirect: '/trying'
16 | },
17 | {
18 | path: '/trying',
19 | component: Trying,
20 | children: [
21 | {
22 | path: ':id',
23 | component: TryingDetail
24 | }
25 | ]
26 | },
27 | {
28 | path: '/tryend',
29 | component: Tryend,
30 | children: [
31 | {
32 | path: ':id',
33 | component: TryendDetail
34 | }
35 | ]
36 | },
37 | {
38 | path: '/applys-list/:id',
39 | name: 'applys-list',
40 | component: ApplyList
41 | },
42 | {
43 | path: '/winner-list/:id',
44 | name: 'winner-list',
45 | component: WinnerList
46 | }
47 | ];
48 | export default new Router({
49 | linkActiveClass: 'active',
50 | routes: routes
51 | });
52 |
--------------------------------------------------------------------------------
/src/store/actions.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/src/store/actions.js
--------------------------------------------------------------------------------
/src/store/getters.js:
--------------------------------------------------------------------------------
1 | export const tryItem = state => state.tryItem;
2 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 | import * as actions from './actions';
4 | import * as getters from './getters';
5 | import state from './state';
6 | import mutations from './mutations';
7 | import createLogger from 'vuex/dist/logger';
8 |
9 | Vue.use(Vuex);
10 |
11 | // 不建议线上使用
12 | const debug = process.env.NODE_ENV !== 'production';
13 |
14 | /**
15 | * export一个store的单例
16 | */
17 | export default new Vuex.Store({
18 | actions,
19 | getters,
20 | state,
21 | mutations,
22 | strict: debug,
23 | plugins: debug ? [createLogger()] : []
24 | });
25 |
--------------------------------------------------------------------------------
/src/store/mutation-types.js:
--------------------------------------------------------------------------------
1 | export const SET_TRYITEM = 'SET_TRYITEM';
2 |
--------------------------------------------------------------------------------
/src/store/mutations.js:
--------------------------------------------------------------------------------
1 | import * as types from './mutation-types';
2 |
3 | /**
4 | * mutation是一个对象,封装多个mutation操作
5 | * 可以接收两个参数state和提交的payload
6 | * @type {{}}
7 | */
8 | const mutations = {
9 | [types.SET_TRYITEM](state, tryItem) {
10 | state.tryItem = tryItem;
11 | }
12 | };
13 |
14 | export default mutations;
15 |
--------------------------------------------------------------------------------
/src/store/readeMe:
--------------------------------------------------------------------------------
1 | 文件说明:
2 | index.js: 入口文件
3 | state.js: 管理所有状态,一般是基础数据,可以通过基础数据计算的通过getters返回
4 | mutations.js: 改变store中的状态 vuex提供 mapMutations语法糖,写在methods中传入对象
5 | mutation-types.js: 和mutations相关的字符串常量,命名规则 SET_ 或 UPDATE_
6 | actions.js: 异步操作,如果在一个动作中多次提交mutation,可以在action中封装操作,可以接收 {commit, state},vuex提供mapActions语法糖,传入数组,写在methods中
7 | getters.js: 对state做映射,也可以返回一些计算属性的值,vuex提供mapGetters语法糖,写在computed中,传入数组
8 |
9 |
10 | 定义状态state
11 | -> 定义mutation-type常量
12 | -> mutation定义修改操作
13 | -> getter包装,在组件中获取数据
14 | ->定义action操作
15 | -> 入口文件
16 |
--------------------------------------------------------------------------------
/src/store/state.js:
--------------------------------------------------------------------------------
1 | /**
2 | 定义状态
3 | */
4 | const state = {
5 | tryItem: {}
6 | };
7 |
8 | export default state;
9 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/.gitkeep
--------------------------------------------------------------------------------
/static/css/reset.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
3 | * http://cssreset.com
4 | */
5 | html, body, div, span, applet, object, iframe,
6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
7 | a, abbr, acronym, address, big, cite, code,
8 | del, dfn, em, img, ins, kbd, q, s, samp,
9 | small, strike, strong, sub, sup, tt, var,
10 | b, u, i, center,
11 | dl, dt, dd, ol, ul, li,
12 | fieldset, form, label, legend,
13 | table, caption, tbody, tfoot, thead, tr, th, td,
14 | article, aside, canvas, details, embed,
15 | figure, figcaption, footer, header,
16 | menu, nav, output, ruby, section, summary,
17 | time, mark, audio, video, input {
18 | margin: 0;
19 | padding: 0;
20 | border: 0;
21 | font-size: 100%;
22 | font-weight: normal;
23 | vertical-align: baseline;
24 | }
25 |
26 | /* HTML5 display-role reset for older browsers */
27 | article, aside, details, figcaption, figure,
28 | footer, header, menu, nav, section {
29 | display: block;
30 | }
31 |
32 | body {
33 | line-height: 1;
34 | }
35 |
36 | blockquote, q {
37 | quotes: none;
38 | }
39 |
40 | blockquote:before, blockquote:after,
41 | q:before, q:after {
42 | content: none;
43 | }
44 |
45 | table {
46 | border-collapse: collapse;
47 | border-spacing: 0;
48 | }
49 |
50 | /* custom */
51 | a {
52 | color: #7e8c8d;
53 | text-decoration: none;
54 | -webkit-backface-visibility: hidden;
55 | }
56 |
57 | li {
58 | list-style: none;
59 | }
60 |
61 | ::-webkit-scrollbar {
62 | width: 5px;
63 | height: 5px;
64 | }
65 |
66 | ::-webkit-scrollbar-track-piece {
67 | background-color: rgba(0, 0, 0, 0.2);
68 | -webkit-border-radius: 6px;
69 | }
70 |
71 | ::-webkit-scrollbar-thumb:vertical {
72 | height: 5px;
73 | background-color: rgba(125, 125, 125, 0.7);
74 | -webkit-border-radius: 6px;
75 | }
76 |
77 | ::-webkit-scrollbar-thumb:horizontal {
78 | width: 5px;
79 | background-color: rgba(125, 125, 125, 0.7);
80 | -webkit-border-radius: 6px;
81 | }
82 |
83 | html, body {
84 | width: 100%;
85 | }
86 |
87 | body {
88 | -webkit-text-size-adjust: none;
89 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
90 | }
91 |
--------------------------------------------------------------------------------
/static/imgs/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/imgs/code.png
--------------------------------------------------------------------------------
/static/imgs/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/imgs/qq.png
--------------------------------------------------------------------------------
/static/imgs/wx2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/imgs/wx2.jpg
--------------------------------------------------------------------------------
/static/imgs/yellow-arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/imgs/yellow-arrow@2x.png
--------------------------------------------------------------------------------
/static/imgs/yellow-arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wenyiweb/vuejs-fujun/6a27a4db0a564317d4d206024841a163c164bede/static/imgs/yellow-arrow@3x.png
--------------------------------------------------------------------------------