├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── README.md
├── Untitled-1
├── 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-lock.json
├── package.json
├── project.config.json
├── src
├── App.vue
├── components
│ └── card.vue
├── main.js
├── pages
│ ├── counter
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── store.js
│ ├── home
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_bonus
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_fenlei
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_geshui
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_shuilvbiao
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_shuilvbiao_geti
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_shuilvbiao_gongzi
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_info_shuilvbiao_qiye
│ │ ├── index.vue
│ │ └── main.js
│ ├── home_result
│ │ ├── index.vue
│ │ └── main.js
│ ├── index
│ │ ├── index.vue
│ │ └── main.js
│ └── logs
│ │ ├── index.vue
│ │ └── main.js
└── utils
│ └── index.js
└── static
├── .gitkeep
└── assets
├── arrayRight.png
├── dongbeishiyou.jpg
├── qrcode_calc.jpg
└── xihongshishoufu.jpg
/.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 | // http://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: false,
11 | node: true,
12 | es6: true
13 | },
14 | // required to lint *.vue files
15 | plugins: [
16 | 'html'
17 | ],
18 | // add your custom rules here
19 | 'rules': {
20 | // allow debugger during development
21 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
22 | },
23 | globals: {
24 | App: true,
25 | Page: true,
26 | wx: true,
27 | getApp: true,
28 | getPage: true,
29 | requirePlugin: true
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.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 | *.suo
11 | *.ntvs*
12 | *.njsproj
13 | *.sln
14 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-mpvue-wxss": {}
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 个税计算器
2 |
3 | > 使用mpvue框架,计算个税的小程序
4 |
5 | 
6 |
7 | # calc
8 |
9 | > calc money enjoy money enjoy calc
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 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
28 | # mpvue-calc
29 |
30 | # 其他个人作品参考
31 | 
--------------------------------------------------------------------------------
/Untitled-1:
--------------------------------------------------------------------------------
1 |
2 | "今日最热文"↑资讯新闻第一公众号,点击免费订阅本刊!
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 财经访谈
15 |
16 |
17 | 财经&资讯&论点
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | process.env.NODE_ENV = 'production'
4 |
5 | var ora = require('ora')
6 | var rm = require('rimraf')
7 | var path = require('path')
8 | var chalk = require('chalk')
9 | var webpack = require('webpack')
10 | var config = require('../config')
11 | var webpackConfig = require('./webpack.prod.conf')
12 |
13 | var spinner = ora('building for production...')
14 | spinner.start()
15 |
16 | rm(path.join(config.build.assetsRoot, '*'), err => {
17 | if (err) throw err
18 | webpack(webpackConfig, function (err, stats) {
19 | spinner.stop()
20 | if (err) throw err
21 | process.stdout.write(stats.toString({
22 | colors: true,
23 | modules: false,
24 | children: false,
25 | chunks: false,
26 | chunkModules: false
27 | }) + '\n\n')
28 |
29 | if (stats.hasErrors()) {
30 | console.log(chalk.red(' Build failed with errors.\n'))
31 | process.exit(1)
32 | }
33 |
34 | console.log(chalk.cyan(' Build complete.\n'))
35 | console.log(chalk.yellow(
36 | ' Tip: built files are meant to be served over an HTTP server.\n' +
37 | ' Opening index.html over file:// won\'t work.\n'
38 | ))
39 | })
40 | })
41 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var chalk = require('chalk')
2 | var semver = require('semver')
3 | var packageConfig = require('../package.json')
4 | var shell = require('shelljs')
5 | function exec (cmd) {
6 | return require('child_process').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 |
17 | if (shell.which('npm')) {
18 | versionRequirements.push({
19 | name: 'npm',
20 | currentVersion: exec('npm --version'),
21 | versionRequirement: packageConfig.engines.npm
22 | })
23 | }
24 |
25 | module.exports = function () {
26 | var warnings = []
27 | for (var i = 0; i < versionRequirements.length; i++) {
28 | var mod = versionRequirements[i]
29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
30 | warnings.push(mod.name + ': ' +
31 | chalk.red(mod.currentVersion) + ' should be ' +
32 | chalk.green(mod.versionRequirement)
33 | )
34 | }
35 | }
36 |
37 | if (warnings.length) {
38 | console.log('')
39 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
40 | console.log()
41 | for (var i = 0; i < warnings.length; i++) {
42 | var warning = warnings[i]
43 | console.log(' ' + warning)
44 | }
45 | console.log()
46 | process.exit(1)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/build/dev-client.js:
--------------------------------------------------------------------------------
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 | })
10 |
--------------------------------------------------------------------------------
/build/dev-server.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | var config = require('../config')
4 | if (!process.env.NODE_ENV) {
5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
6 | }
7 |
8 | // var opn = require('opn')
9 | var path = require('path')
10 | var express = require('express')
11 | var webpack = require('webpack')
12 | var proxyMiddleware = require('http-proxy-middleware')
13 | var portfinder = require('portfinder')
14 | var webpackConfig = require('./webpack.dev.conf')
15 |
16 | // default port where dev server listens for incoming traffic
17 | var port = process.env.PORT || config.dev.port
18 | // automatically open browser, if not set will be false
19 | var autoOpenBrowser = !!config.dev.autoOpenBrowser
20 | // Define HTTP proxies to your custom API backend
21 | // https://github.com/chimurai/http-proxy-middleware
22 | var proxyTable = config.dev.proxyTable
23 |
24 | var app = express()
25 | var compiler = webpack(webpackConfig)
26 |
27 | // var devMiddleware = require('webpack-dev-middleware')(compiler, {
28 | // publicPath: webpackConfig.output.publicPath,
29 | // quiet: true
30 | // })
31 |
32 | // var hotMiddleware = require('webpack-hot-middleware')(compiler, {
33 | // log: false,
34 | // heartbeat: 2000
35 | // })
36 | // force page reload when html-webpack-plugin template changes
37 | // compiler.plugin('compilation', function (compilation) {
38 | // compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
39 | // hotMiddleware.publish({ action: 'reload' })
40 | // cb()
41 | // })
42 | // })
43 |
44 | // proxy api requests
45 | Object.keys(proxyTable).forEach(function (context) {
46 | var options = proxyTable[context]
47 | if (typeof options === 'string') {
48 | options = { target: options }
49 | }
50 | app.use(proxyMiddleware(options.filter || context, options))
51 | })
52 |
53 | // handle fallback for HTML5 history API
54 | app.use(require('connect-history-api-fallback')())
55 |
56 | // serve webpack bundle output
57 | // app.use(devMiddleware)
58 |
59 | // enable hot-reload and state-preserving
60 | // compilation error display
61 | // app.use(hotMiddleware)
62 |
63 | // serve pure static assets
64 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
65 | app.use(staticPath, express.static('./static'))
66 |
67 | // var uri = 'http://localhost:' + port
68 |
69 | var _resolve
70 | var readyPromise = new Promise(resolve => {
71 | _resolve = resolve
72 | })
73 |
74 | // console.log('> Starting dev server...')
75 | // devMiddleware.waitUntilValid(() => {
76 | // console.log('> Listening at ' + uri + '\n')
77 | // // when env is testing, don't need open it
78 | // if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
79 | // opn(uri)
80 | // }
81 | // _resolve()
82 | // })
83 |
84 | module.exports = new Promise((resolve, reject) => {
85 | portfinder.basePort = port
86 | portfinder.getPortPromise()
87 | .then(newPort => {
88 | if (port !== newPort) {
89 | console.log(`${port}端口被占用,开启新端口${newPort}`)
90 | }
91 | var server = app.listen(newPort, 'localhost')
92 | // for 小程序的文件保存机制
93 | require('webpack-dev-middleware-hard-disk')(compiler, {
94 | publicPath: webpackConfig.output.publicPath,
95 | quiet: true
96 | })
97 | resolve({
98 | ready: readyPromise,
99 | close: () => {
100 | server.close()
101 | }
102 | })
103 | }).catch(error => {
104 | console.log('没有找到空闲端口,请打开任务管理器杀死进程端口再试', error)
105 | })
106 | })
107 |
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
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 |
15 | var cssLoader = {
16 | loader: 'css-loader',
17 | options: {
18 | minimize: process.env.NODE_ENV === 'production',
19 | sourceMap: options.sourceMap
20 | }
21 | }
22 |
23 | var postcssLoader = {
24 | loader: 'postcss-loader',
25 | options: {
26 | sourceMap: true
27 | }
28 | }
29 |
30 | var px2rpxLoader = {
31 | loader: 'px2rpx-loader',
32 | options: {
33 | baseDpr: 1,
34 | rpxUnit: 0.5
35 | }
36 | }
37 |
38 | // generate loader string to be used with extract text plugin
39 | function generateLoaders (loader, loaderOptions) {
40 | var loaders = [cssLoader, px2rpxLoader, postcssLoader]
41 | if (loader) {
42 | loaders.push({
43 | loader: loader + '-loader',
44 | options: Object.assign({}, loaderOptions, {
45 | sourceMap: options.sourceMap
46 | })
47 | })
48 | }
49 |
50 | // Extract CSS when that option is specified
51 | // (which is the case during production build)
52 | if (options.extract) {
53 | return ExtractTextPlugin.extract({
54 | use: loaders,
55 | fallback: 'vue-style-loader'
56 | })
57 | } else {
58 | return ['vue-style-loader'].concat(loaders)
59 | }
60 | }
61 |
62 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
63 | return {
64 | css: generateLoaders(),
65 | wxss: generateLoaders(),
66 | postcss: generateLoaders(),
67 | less: generateLoaders('less'),
68 | sass: generateLoaders('sass', { indentedSyntax: true }),
69 | scss: generateLoaders('sass'),
70 | stylus: generateLoaders('stylus'),
71 | styl: generateLoaders('stylus')
72 | }
73 | }
74 |
75 | // Generate loaders for standalone style files (outside of .vue)
76 | exports.styleLoaders = function (options) {
77 | var output = []
78 | var loaders = exports.cssLoaders(options)
79 | for (var extension in loaders) {
80 | var loader = loaders[extension]
81 | output.push({
82 | test: new RegExp('\\.' + extension + '$'),
83 | use: loader
84 | })
85 | }
86 | return output
87 | }
88 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var config = require('../config')
3 | // var isProduction = process.env.NODE_ENV === 'production'
4 | // for mp
5 | var isProduction = true
6 |
7 | module.exports = {
8 | loaders: utils.cssLoaders({
9 | sourceMap: isProduction
10 | ? config.build.productionSourceMap
11 | : config.dev.cssSourceMap,
12 | extract: isProduction
13 | }),
14 | transformToRequire: {
15 | video: 'src',
16 | source: 'src',
17 | img: 'src',
18 | image: 'xlink:href'
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var fs = require('fs')
3 | var utils = require('./utils')
4 | var config = require('../config')
5 | var vueLoaderConfig = require('./vue-loader.conf')
6 | var MpvuePlugin = require('webpack-mpvue-asset-plugin')
7 | var glob = require('glob')
8 |
9 | function resolve (dir) {
10 | return path.join(__dirname, '..', dir)
11 | }
12 |
13 | function getEntry (rootSrc, pattern) {
14 | var files = glob.sync(path.resolve(rootSrc, pattern))
15 | return files.reduce((res, file) => {
16 | var info = path.parse(file)
17 | var key = info.dir.slice(rootSrc.length + 1) + '/' + info.name
18 | res[key] = path.resolve(file)
19 | return res
20 | }, {})
21 | }
22 |
23 | const appEntry = { app: resolve('./src/main.js') }
24 | const pagesEntry = getEntry(resolve('./src'), 'pages/**/main.js')
25 | const entry = Object.assign({}, appEntry, pagesEntry)
26 |
27 | module.exports = {
28 | // 如果要自定义生成的 dist 目录里面的文件路径,
29 | // 可以将 entry 写成 {'toPath': 'fromPath'} 的形式,
30 | // toPath 为相对于 dist 的路径, 例:index/demo,则生成的文件地址为 dist/index/demo.js
31 | entry,
32 | target: require('mpvue-webpack-target'),
33 | output: {
34 | path: config.build.assetsRoot,
35 | filename: '[name].js',
36 | publicPath: process.env.NODE_ENV === 'production'
37 | ? config.build.assetsPublicPath
38 | : config.dev.assetsPublicPath
39 | },
40 | resolve: {
41 | extensions: ['.js', '.vue', '.json'],
42 | alias: {
43 | 'vue': 'mpvue',
44 | '@': resolve('src')
45 | },
46 | symlinks: false,
47 | aliasFields: ['mpvue', 'weapp', 'browser'],
48 | mainFields: ['browser', 'module', 'main']
49 | },
50 | module: {
51 | rules: [
52 | {
53 | test: /\.(js|vue)$/,
54 | loader: 'eslint-loader',
55 | enforce: 'pre',
56 | include: [resolve('src'), resolve('test')],
57 | options: {
58 | formatter: require('eslint-friendly-formatter')
59 | }
60 | },
61 | {
62 | test: /\.vue$/,
63 | loader: 'mpvue-loader',
64 | options: vueLoaderConfig
65 | },
66 | {
67 | test: /\.js$/,
68 | include: [resolve('src'), resolve('test')],
69 | use: [
70 | 'babel-loader',
71 | {
72 | loader: 'mpvue-loader',
73 | options: {
74 | checkMPEntry: true
75 | }
76 | },
77 | ]
78 | },
79 | {
80 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
81 | loader: 'url-loader',
82 | options: {
83 | limit: 10000,
84 | name: utils.assetsPath('img/[name].[ext]')
85 | }
86 | },
87 | {
88 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
89 | loader: 'url-loader',
90 | options: {
91 | limit: 10000,
92 | name: utils.assetsPath('media/[name].[ext]')
93 | }
94 | },
95 | {
96 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
97 | loader: 'url-loader',
98 | options: {
99 | limit: 10000,
100 | name: utils.assetsPath('fonts/[name].[ext]')
101 | }
102 | }
103 | ]
104 | },
105 | plugins: [
106 | new MpvuePlugin()
107 | ]
108 | }
109 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var webpack = require('webpack')
3 | var config = require('../config')
4 | var merge = require('webpack-merge')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | // var HtmlWebpackPlugin = require('html-webpack-plugin')
7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8 |
9 | // copy from ./webpack.prod.conf.js
10 | var path = require('path')
11 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
12 | var CopyWebpackPlugin = require('copy-webpack-plugin')
13 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
14 |
15 | // add hot-reload related code to entry chunks
16 | // Object.keys(baseWebpackConfig.entry).forEach(function (name) {
17 | // baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
18 | // })
19 |
20 | module.exports = merge(baseWebpackConfig, {
21 | module: {
22 | rules: utils.styleLoaders({
23 | sourceMap: config.dev.cssSourceMap,
24 | extract: true
25 | })
26 | },
27 | // cheap-module-eval-source-map is faster for development
28 | // devtool: '#cheap-module-eval-source-map',
29 | devtool: '#source-map',
30 | output: {
31 | path: config.build.assetsRoot,
32 | // filename: utils.assetsPath('js/[name].[chunkhash].js'),
33 | // chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
34 | filename: utils.assetsPath('js/[name].js'),
35 | chunkFilename: utils.assetsPath('js/[id].js')
36 | },
37 | plugins: [
38 | new webpack.DefinePlugin({
39 | 'process.env': config.dev.env
40 | }),
41 |
42 | // copy from ./webpack.prod.conf.js
43 | // extract css into its own file
44 | new ExtractTextPlugin({
45 | // filename: utils.assetsPath('css/[name].[contenthash].css')
46 | filename: utils.assetsPath('css/[name].wxss')
47 | }),
48 | // Compress extracted CSS. We are using this plugin so that possible
49 | // duplicated CSS from different components can be deduped.
50 | new OptimizeCSSPlugin({
51 | cssProcessorOptions: {
52 | safe: true
53 | }
54 | }),
55 | new webpack.optimize.CommonsChunkPlugin({
56 | name: 'vendor',
57 | minChunks: function (module, count) {
58 | // any required modules inside node_modules are extracted to vendor
59 | return (
60 | module.resource &&
61 | /\.js$/.test(module.resource) &&
62 | module.resource.indexOf('node_modules') >= 0
63 | ) || count > 1
64 | }
65 | }),
66 | new webpack.optimize.CommonsChunkPlugin({
67 | name: 'manifest',
68 | chunks: ['vendor']
69 | }),
70 | // copy custom static assets
71 | new CopyWebpackPlugin([
72 | {
73 | from: path.resolve(__dirname, '../static'),
74 | to: config.build.assetsSubDirectory,
75 | ignore: ['.*']
76 | }
77 | ]),
78 |
79 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
80 | // new webpack.HotModuleReplacementPlugin(),
81 | new webpack.NoEmitOnErrorsPlugin(),
82 | // https://github.com/ampedandwired/html-webpack-plugin
83 | // new HtmlWebpackPlugin({
84 | // filename: 'index.html',
85 | // template: 'index.html',
86 | // inject: true
87 | // }),
88 | new FriendlyErrorsPlugin()
89 | ]
90 | })
91 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var utils = require('./utils')
3 | var webpack = require('webpack')
4 | var config = require('../config')
5 | var merge = require('webpack-merge')
6 | var baseWebpackConfig = require('./webpack.base.conf')
7 | var UglifyJsPlugin = require('uglifyjs-webpack-plugin')
8 | var CopyWebpackPlugin = require('copy-webpack-plugin')
9 | // var HtmlWebpackPlugin = require('html-webpack-plugin')
10 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
11 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 |
13 | var env = config.build.env
14 |
15 | var webpackConfig = merge(baseWebpackConfig, {
16 | module: {
17 | rules: utils.styleLoaders({
18 | sourceMap: config.build.productionSourceMap,
19 | extract: true
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 | filename: utils.assetsPath('js/[name].js'),
28 | chunkFilename: utils.assetsPath('js/[id].js')
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 UglifyJsPlugin({
36 | sourceMap: true
37 | }),
38 | // extract css into its own file
39 | new ExtractTextPlugin({
40 | // filename: utils.assetsPath('css/[name].[contenthash].css')
41 | filename: utils.assetsPath('css/[name].wxss')
42 | }),
43 | // Compress extracted CSS. We are using this plugin so that possible
44 | // duplicated CSS from different components can be deduped.
45 | new OptimizeCSSPlugin({
46 | cssProcessorOptions: {
47 | safe: true
48 | }
49 | }),
50 | // generate dist index.html with correct asset hash for caching.
51 | // you can customize output by editing /index.html
52 | // see https://github.com/ampedandwired/html-webpack-plugin
53 | // new HtmlWebpackPlugin({
54 | // filename: config.build.index,
55 | // template: 'index.html',
56 | // inject: true,
57 | // minify: {
58 | // removeComments: true,
59 | // collapseWhitespace: true,
60 | // removeAttributeQuotes: true
61 | // // more options:
62 | // // https://github.com/kangax/html-minifier#options-quick-reference
63 | // },
64 | // // necessary to consistently work with multiple chunks via CommonsChunkPlugin
65 | // chunksSortMode: 'dependency'
66 | // }),
67 | // keep module.id stable when vender modules does not change
68 | new webpack.HashedModuleIdsPlugin(),
69 | // split vendor js into its own file
70 | new webpack.optimize.CommonsChunkPlugin({
71 | name: 'vendor',
72 | minChunks: function (module, count) {
73 | // any required modules inside node_modules are extracted to vendor
74 | return (
75 | module.resource &&
76 | /\.js$/.test(module.resource) &&
77 | module.resource.indexOf('node_modules') >= 0
78 | ) || count > 1
79 | }
80 | }),
81 | // extract webpack runtime and module manifest to its own file in order to
82 | // prevent vendor hash from being updated whenever app bundle is updated
83 | new webpack.optimize.CommonsChunkPlugin({
84 | name: 'manifest',
85 | chunks: ['vendor']
86 | }),
87 | // copy custom static assets
88 | new CopyWebpackPlugin([
89 | {
90 | from: path.resolve(__dirname, '../static'),
91 | to: config.build.assetsSubDirectory,
92 | ignore: ['.*']
93 | }
94 | ])
95 | ]
96 | })
97 |
98 | // if (config.build.productionGzip) {
99 | // var CompressionWebpackPlugin = require('compression-webpack-plugin')
100 |
101 | // webpackConfig.plugins.push(
102 | // new CompressionWebpackPlugin({
103 | // asset: '[path].gz[query]',
104 | // algorithm: 'gzip',
105 | // test: new RegExp(
106 | // '\\.(' +
107 | // config.build.productionGzipExtensions.join('|') +
108 | // ')$'
109 | // ),
110 | // threshold: 10240,
111 | // minRatio: 0.8
112 | // })
113 | // )
114 | // }
115 |
116 | if (config.build.bundleAnalyzerReport) {
117 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
118 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
119 | }
120 |
121 | module.exports = webpackConfig
122 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
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: false,
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 | // Run the build command with an extra argument to
19 | // View the bundle analyzer report after build finishes:
20 | // `npm run build --report`
21 | // Set to `true` or `false` to always turn it on or off
22 | bundleAnalyzerReport: process.env.npm_config_report
23 | },
24 | dev: {
25 | env: require('./dev.env'),
26 | port: 8080,
27 | // 在小程序开发者工具中不需要自动打开浏览器
28 | autoOpenBrowser: false,
29 | assetsSubDirectory: 'static',
30 | assetsPublicPath: '/',
31 | proxyTable: {},
32 | // CSS Sourcemaps off by default because relative paths are "buggy"
33 | // with this option, according to the CSS-Loader README
34 | // (https://github.com/webpack/css-loader#sourcemaps)
35 | // In our experience, they generally work as expected,
36 | // just be aware of this issue when enabling this option.
37 | cssSourceMap: false
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | calc
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "calc",
3 | "version": "1.0.0",
4 | "description": "calc money enjoy money enjoy calc",
5 | "author": "xulei",
6 | "private": true,
7 | "scripts": {
8 | "dev": "node build/dev-server.js",
9 | "start": "node build/dev-server.js",
10 | "build": "node build/build.js",
11 | "lint": "eslint --ext .js,.vue src"
12 | },
13 | "dependencies": {
14 | "mpvue": "^1.0.11",
15 | "vuex": "^3.0.1"
16 | },
17 | "devDependencies": {
18 | "mpvue-loader": "^1.0.13",
19 | "mpvue-webpack-target": "^1.0.0",
20 | "mpvue-template-compiler": "^1.0.11",
21 | "portfinder": "^1.0.13",
22 | "postcss-mpvue-wxss": "^1.0.0",
23 | "prettier": "~1.12.1",
24 | "px2rpx-loader": "^0.1.10",
25 | "babel-core": "^6.22.1",
26 | "glob": "^7.1.2",
27 | "webpack-mpvue-asset-plugin": "^0.0.2",
28 | "babel-eslint": "^8.2.3",
29 | "babel-loader": "^7.1.1",
30 | "babel-plugin-transform-runtime": "^6.22.0",
31 | "babel-preset-env": "^1.3.2",
32 | "babel-preset-stage-2": "^6.22.0",
33 | "babel-register": "^6.22.0",
34 | "chalk": "^2.4.0",
35 | "connect-history-api-fallback": "^1.3.0",
36 | "copy-webpack-plugin": "^4.5.1",
37 | "css-loader": "^0.28.11",
38 | "cssnano": "^3.10.0",
39 | "eslint": "^4.19.1",
40 | "eslint-friendly-formatter": "^4.0.1",
41 | "eslint-loader": "^2.0.0",
42 | "eslint-plugin-import": "^2.11.0",
43 | "eslint-plugin-node": "^6.0.1",
44 | "eslint-plugin-html": "^4.0.3",
45 | "eventsource-polyfill": "^0.9.6",
46 | "express": "^4.16.3",
47 | "extract-text-webpack-plugin": "^3.0.2",
48 | "file-loader": "^1.1.11",
49 | "friendly-errors-webpack-plugin": "^1.7.0",
50 | "html-webpack-plugin": "^3.2.0",
51 | "http-proxy-middleware": "^0.18.0",
52 | "webpack-bundle-analyzer": "^2.2.1",
53 | "semver": "^5.3.0",
54 | "shelljs": "^0.8.1",
55 | "uglifyjs-webpack-plugin": "^1.2.5",
56 | "optimize-css-assets-webpack-plugin": "^3.2.0",
57 | "ora": "^2.0.0",
58 | "rimraf": "^2.6.0",
59 | "url-loader": "^1.0.1",
60 | "vue-style-loader": "^4.1.0",
61 | "webpack": "^3.11.0",
62 | "webpack-dev-middleware-hard-disk": "^1.12.0",
63 | "webpack-merge": "^4.1.0",
64 | "postcss-loader": "^2.1.4"
65 | },
66 | "engines": {
67 | "node": ">= 4.0.0",
68 | "npm": ">= 3.0.0"
69 | },
70 | "browserslist": [
71 | "> 1%",
72 | "last 2 versions",
73 | "not ie <= 8"
74 | ]
75 | }
76 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": true,
5 | "es6": false,
6 | "postcss": true,
7 | "minified": true,
8 | "newFeature": true
9 | },
10 | "miniprogramRoot": "./dist/",
11 | "compileType": "miniprogram",
12 | "appid": "wxea832aba141f7f6f",
13 | "projectname": "calc",
14 | "condition": {
15 | "search": {
16 | "current": -1,
17 | "list": []
18 | },
19 | "conversation": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "game": {
24 | "currentL": -1,
25 | "list": []
26 | },
27 | "miniprogram": {
28 | "current": -1,
29 | "list": []
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
13 |
14 |
32 |
--------------------------------------------------------------------------------
/src/components/card.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
20 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 |
4 | Vue.config.productionTip = false
5 | App.mpType = 'app'
6 |
7 | const app = new Vue(App)
8 | app.$mount()
9 |
10 | export default {
11 | // 这个字段走 app.json
12 | config: {
13 | // 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去
14 | pages: [
15 | 'pages/logs/main',
16 | '^pages/home/main',
17 | 'pages/home_info/main',
18 | 'pages/home_info_geshui/main',
19 | 'pages/home_info_fenlei/main',
20 | 'pages/home_info_shuilvbiao/main',
21 | 'pages/home_info_shuilvbiao_gongzi/main',
22 | 'pages/home_info_shuilvbiao_geti/main',
23 | 'pages/home_info_shuilvbiao_qiye/main',
24 | 'pages/home_bonus/main',
25 | 'pages/home_result/main'],
26 | window: {
27 | backgroundTextStyle: 'light',
28 | navigationBarBackgroundColor: '#fff',
29 | navigationBarTitleText: '个税计算器新版',
30 | navigationBarTextStyle: 'black'
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/pages/counter/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Vuex counter:{{ count }}
4 |
5 |
6 |
7 |
8 |
9 |
去往首页
10 |
11 |
12 |
13 |
33 |
34 |
47 |
--------------------------------------------------------------------------------
/src/pages/counter/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/counter/store.js:
--------------------------------------------------------------------------------
1 | // https://vuex.vuejs.org/zh-cn/intro.html
2 | // make sure to call Vue.use(Vuex) if using a module system
3 | import Vue from 'vue'
4 | import Vuex from 'vuex'
5 |
6 | Vue.use(Vuex)
7 |
8 | const store = new Vuex.Store({
9 | state: {
10 | count: 0
11 | },
12 | mutations: {
13 | increment: (state) => {
14 | const obj = state
15 | obj.count += 1
16 | },
17 | decrement: (state) => {
18 | const obj = state
19 | obj.count -= 1
20 | }
21 | }
22 | })
23 |
24 | export default store
25 |
--------------------------------------------------------------------------------
/src/pages/home/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10月1日起实施新版个税5000元起征
4 |
快来算算你能多赚多少钱
5 |
6 |
7 |
8 | 税前金额
9 |
10 |
11 |
12 | 五险一金
13 |
14 |
15 |
16 |
17 | 年终奖计算
18 |
19 |
20 |
21 |
个税介绍
22 |

23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
90 |
91 |
152 |
--------------------------------------------------------------------------------
/src/pages/home/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_bonus/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 我的年终奖:
5 |
6 |
7 |
8 |
9 | 平均每个月
10 | {{monthMoney}}
11 |
12 |
13 | 纳税比例
14 | {{bili}}
15 |
16 |
17 | 应纳税款
18 | {{shui}}
19 |
20 |
21 | 税后收入
22 | {{shuihou}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
99 |
100 |
145 |
--------------------------------------------------------------------------------
/src/pages/home_bonus/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
个税介绍
4 |
5 |
6 |
个税税法
7 |

8 |
9 |
10 |
个税分类
11 |

12 |
13 |
14 |
个税税率表
15 |

16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
66 |
67 |
118 |
--------------------------------------------------------------------------------
/src/pages/home_info/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_fenlei/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
个人所得税分类
4 |
一、工资、薪金所得;
5 |
二、个体工商户的生产、经营所得;
6 |
三、对企事业单位的承包经营、承租经营所得;
7 |
四、劳务报酬所得;
8 |
五、稿酬所得;
9 |
六、特许权使用费所得;
10 |
七、利息、股息、红利所得;
11 |
八、财产租赁所得;
12 |
九、财产转让所得;
13 |
十、偶然所得;
14 |
十一、经国务院财政部门确定征税的其他所得。
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
51 |
52 |
89 |
--------------------------------------------------------------------------------
/src/pages/home_info_fenlei/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_geshui/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
中华人民共和国个人所得税法
4 |
5 |
6 | 第一条 在中国境内有住所,或者无住所而在境内居住满一年的个人,从中国境内和境外取得的所得,依照本法规定缴纳个人所得税。
7 | 在中国境内无住所又不居住或者无住所而在境内居住不满一年的个人,从中国境内取得的所得,依照本法规定缴纳个人所得税。
8 |
9 |
10 | 第二条 下列各项个人所得,应纳个人所得税:
11 | 一、工资、薪金所得;
12 | 二、个体工商户的生产、经营所得;
13 | 三、对企事业单位的承包经营、承租经营所得;
14 | 四、劳务报酬所得;
15 | 五、稿酬所得;
16 | 六、特许权使用费所得;
17 | 七、利息、股息、红利所得;
18 | 八、财产租赁所得;
19 | 九、财产转让所得;
20 | 十、偶然所得;
21 | 十一、经国务院财政部门确定征税的其他所得。
22 |
23 |
24 | 第三条 个人所得税的税率:
25 | 一、工资、薪金所得,适用超额累进税率,税率为百分之三至百分之四十五(税率表附后)。
26 | 二、个体工商户的生产、经营所得和对企事业单位的承包经营、承租经营所得,适用百分之五至百分之三十五的超额累进税率(税率表附后)。
27 | 三、稿酬所得,适用比例税率,税率为百分之二十,并按应纳税额减征百分之三十。
28 | 四、劳务报酬所得,适用比例税率,税率为百分之二十。对劳务报酬所得一次收入畸高的,可以实行加成征收,具体办法由国务院规定。
29 | 五、特许权使用费所得,利息、股息、红利所得,财产租赁所得,财产转让所得,偶然所得和其他所得,适用比例税率,税率为百分之二十。
30 |
31 |
32 | 第四条 下列各项个人所得,免纳个人所得税:
33 | 一、省级人民政府、国务院部委和中国人民解放军军以上单位,以及外国组织、国际组织颁发的科学、教育、技术、文化、卫生、体育、环境保护等方面的奖金;
34 | 二、国债和国家发行的金融债券利息;
35 | 三、按照国家统一规定发给的补贴、津贴;
36 | 四、福利费、抚恤金、救济金;
37 | 五、保险赔款;
38 | 六、军人的转业费、复员费;
39 | 七、按照国家统一规定发给干部、职工的安家费、退职费、退休工资、离休工资、离休生活补助费;
40 | 八、依照我国有关法律规定应予免税的各国驻华使馆、领事馆的外交代表、领事官员和其他人员的所得;
41 | 九、中国政府参加的国际公约、签订的协议中规定免税的所得;
42 | 十、经国务院财政部门批准免税的所得。
43 |
44 |
45 | 第五条 有下列情形之一的,经批准可以减征个人所得税:
46 | 一、残疾、孤老人员和烈属的所得;
47 | 二、因严重自然灾害造成重大损失的;
48 | 三、其他经国务院财政部门批准减税的。
49 |
50 |
51 | 第六条 应纳税所得额的计算:
52 | 一、工资、薪金所得,以每月收入额减除费用三千五百元后的余额,为应纳税所得额。
53 | 二、个体工商户的生产、经营所得,以每一纳税年度的收入总额减除成本、费用以及损失后的余额,为应纳税所得额。
54 | 三、对企事业单位的承包经营、承租经营所得,以每一纳税年度的收入总额,减除必要费用后的余额,为应纳税所得额。
55 | 四、劳务报酬所得、稿酬所得、特许权使用费所得、财产租赁所得,每次收入不超过四千元的,减除费用八百元;四千元以上的,减除百分之二十的费用,其余额为应纳税所得额。
56 | 五、财产转让所得,以转让财产的收入额减除财产原值和合理费用后的余额,为应纳税所得额。
57 | 六、利息、股息、红利所得,偶然所得和其他所得,以每次收入额为应纳税所得额。
58 | 个人将其所得对教育事业和其他公益事业捐赠的部分,按照国务院有关规定从应纳税所得中扣除。
59 | 对在中国境内无住所而在中国境内取得工资、薪金所得的纳税义务人和在中国境内有住所而在中国境外取得工资、薪金所得的纳税义务人,可以根据其平均收入水平、生活水平以及汇率变化情况确定附加减除费用,附加减除费用适用的范围和标准由国务院规定。
60 |
61 |
62 | 第七条 纳税义务人从中国境外取得的所得,准予其在应纳税额中扣除已在境外缴纳的个人所得税税额。但扣除额不得超过该纳税义务人境外所得依照本法规定计算的应纳税额。
63 |
64 |
65 | 第八条 个人所得税,以所得人为纳税义务人,以支付所得的单位或者个人为扣缴义务人。个人所得超过国务院规定数额的,在两处以上取得工资、薪金所得或者没有扣缴义务人的,以及具有国务院规定的其他情形的,纳税义务人应当按照国家规定办理纳税申报。扣缴义务人应当按照国家规定办理全员全额扣缴申报。
66 |
67 |
68 | 第九条 扣缴义务人每月所扣的税款,自行申报纳税人每月应纳的税款,都应当在次月十五日内缴入国库,并向税务机关报送纳税申报表。
69 | 工资、薪金所得应纳的税款,按月计征,由扣缴义务人或者纳税义务人在次月十五日内缴入国库,并向税务机关报送纳税申报表。特定行业的工资、薪金所得应纳的税款,可以实行按年计算、分月预缴的方式计征,具体办法由国务院规定。
70 | 个体工商户的生产、经营所得应纳的税款,按年计算,分月预缴,由纳税义务人在次月十五日内预缴,年度终了后三个月内汇算清缴,多退少补。
71 | 对企事业单位的承包经营、承租经营所得应纳的税款,按年计算,由纳税义务人在年度终了后三十日内缴入国库,并向税务机关报送纳税申报表。纳税义务人在一年内分次取得承包经营、承租经营所得的,应当在取得每次所得后的十五日内预缴,年度终了后三个月内汇算清缴,多退少补。
72 | 从中国境外取得所得的纳税义务人,应当在年度终了后三十日内,将应纳的税款缴入国库,并向税务机关报送纳税申报表。
73 |
74 |
75 | 第十条 各项所得的计算,以人民币为单位。所得为外国货币的,按照国家外汇管理机关规定的外汇牌价折合成人民币缴纳税款。
76 |
77 |
78 | 第十一条 对扣缴义务人按照所扣缴的税款,付给百分之二的手续费。
79 |
80 |
81 | 第十二条 对储蓄存款利息所得开征、减征、停征个人所得税及其具体办法,由国务院规定。
82 |
83 |
84 | 第十三条 个人所得税的征收管理,依照《中华人民共和国税收征收管理法》的规定执行。
85 |
86 |
87 | 第十四条 国务院根据本法制定实施条例。
88 |
89 |
90 | 第十五条 本法自公布之日起施行。
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
128 |
129 |
162 |
--------------------------------------------------------------------------------
/src/pages/home_info_geshui/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
个税税率表
4 |
5 |
6 |
工资、薪金所得
7 |

8 |
9 |
10 |
个体工商户的生产、经营所得
11 |

12 |
13 |
14 |
对企事业单位的承包经营、承租经营所得
15 |

16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
78 |
79 |
130 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_geti/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
个体工商户的生产、经营所得
4 |
5 |
6 |
级数
7 |
全年应纳税所得额
8 |
税率
9 |
速算扣除数
10 |
11 |
12 |
1
13 |
不超过15000元
14 |
5%
15 |
0
16 |
17 |
18 |
2
19 |
超过15000元至30000元的部分
20 |
10%
21 |
750
22 |
23 |
24 |
3
25 |
超过30000元至60000元的部分
26 |
20%
27 |
3750
28 |
29 |
30 |
4
31 |
超过60000元至100000元的部分
32 |
30%
33 |
9750
34 |
35 |
36 |
5
37 |
超过100000元的部分
38 |
35%
39 |
14750
40 |
41 |
42 |
计算方式:
43 |
应纳税=应纳税所得额×适用税率-速算扣除数
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
79 |
80 |
185 |
186 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_geti/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_gongzi/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
工资薪金所得
4 |
5 |
6 |
级数
7 |
全月应纳税所得额
8 |
全月应纳税所得额
9 |
税率
10 |
速算扣除数
11 |
12 |
13 |
1
14 |
不超过1500元
15 |
不超过1455元的
16 |
3%
17 |
0
18 |
19 |
20 |
2
21 |
超过1500元至4500元的部分
22 |
超过1455元至7755元的部分
23 |
10%
24 |
105
25 |
26 |
27 |
3
28 |
超过4500元至9000元的部分
29 |
超过4155元至7755元的部分
30 |
20%
31 |
555
32 |
33 |
34 |
4
35 |
超过9000元至35000元的部分
36 |
超过7755元至27255元的部分
37 |
25%
38 |
1005
39 |
40 |
41 |
5
42 |
超过35000元至55000元的部分
43 |
超过27255元至41255元的部分
44 |
30%
45 |
2775
46 |
47 |
48 |
6
49 |
超过55000元至80000元的部分
50 |
超过41255元至57505元的部分
51 |
35%
52 |
5505
53 |
54 |
55 |
7
56 |
超过80000元的部分
57 |
超过57505元的部分
58 |
45%
59 |
13505
60 |
61 |
62 |
计算方式:
63 |
应纳个人所得税税额=应纳税所得额×适用税率-速算扣除数
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
99 |
100 |
205 |
206 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_gongzi/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_qiye/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
对企事业单位的承包经营、承租经营所得
4 |
5 |
6 |
级数
7 |
全年应纳税所得额
8 |
税率
9 |
速算扣除数
10 |
11 |
12 |
1
13 |
不超过15000元
14 |
5%
15 |
0
16 |
17 |
18 |
2
19 |
超过15000元至30000元的部分
20 |
10%
21 |
750
22 |
23 |
24 |
3
25 |
超过30000元至60000元的部分
26 |
20%
27 |
3750
28 |
29 |
30 |
4
31 |
超过60000元至100000元的部分
32 |
30%
33 |
9750
34 |
35 |
36 |
5
37 |
超过100000元的部分
38 |
35%
39 |
14750
40 |
41 |
42 |
计算方式:
43 |
应纳税=应纳税所得额×适用税率-速算扣除数
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
79 |
80 |
185 |
186 |
--------------------------------------------------------------------------------
/src/pages/home_info_shuilvbiao_qiye/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/home_result/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
个税从3500元调整到5000元起征
4 |
我竟然多赚了{{result}}元
5 |
{{msg}}
6 |
7 |
8 | 税改前实发工资
9 | {{money_before_money}}元
10 |
11 |
12 | 税改前需纳税
13 | {{money_before}}元
14 |
15 |
16 | 税改后实发工资
17 | {{money_after_money}}元
18 |
19 |
20 | 税改后需纳税
21 | {{money_after}}元
22 |
23 |
24 |
25 | 总计多赚
26 | {{result}}元
27 |
28 |
29 | 增加霸气值
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
200 |
201 |
264 |
--------------------------------------------------------------------------------
/src/pages/home_result/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/index/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![]()
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
21 |
去往Vuex示例页面
22 |
23 |
24 |
25 |
68 |
69 |
106 |
--------------------------------------------------------------------------------
/src/pages/index/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/logs/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
32 |
33 |
44 |
--------------------------------------------------------------------------------
/src/pages/logs/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | navigationBarTitleText: '查看启动日志'
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | function formatNumber (n) {
2 | const str = n.toString()
3 | return str[1] ? str : `0${str}`
4 | }
5 |
6 | export function formatTime (date) {
7 | const year = date.getFullYear()
8 | const month = date.getMonth() + 1
9 | const day = date.getDate()
10 |
11 | const hour = date.getHours()
12 | const minute = date.getMinutes()
13 | const second = date.getSeconds()
14 |
15 | const t1 = [year, month, day].map(formatNumber).join('/')
16 | const t2 = [hour, minute, second].map(formatNumber).join(':')
17 |
18 | return `${t1} ${t2}`
19 | }
20 |
21 | export default {
22 | formatNumber,
23 | formatTime
24 | }
25 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuleileo/mpvue-calc/87d19ec0c013511b0fb0e3c3e3734456ca749a95/static/.gitkeep
--------------------------------------------------------------------------------
/static/assets/arrayRight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuleileo/mpvue-calc/87d19ec0c013511b0fb0e3c3e3734456ca749a95/static/assets/arrayRight.png
--------------------------------------------------------------------------------
/static/assets/dongbeishiyou.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuleileo/mpvue-calc/87d19ec0c013511b0fb0e3c3e3734456ca749a95/static/assets/dongbeishiyou.jpg
--------------------------------------------------------------------------------
/static/assets/qrcode_calc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuleileo/mpvue-calc/87d19ec0c013511b0fb0e3c3e3734456ca749a95/static/assets/qrcode_calc.jpg
--------------------------------------------------------------------------------
/static/assets/xihongshishoufu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuleileo/mpvue-calc/87d19ec0c013511b0fb0e3c3e3734456ca749a95/static/assets/xihongshishoufu.jpg
--------------------------------------------------------------------------------