├── static
├── .gitkeep
└── img
│ └── girl.png
├── .eslintignore
├── dist
├── app.wxss
├── static
│ ├── css
│ │ ├── vendor.wxss
│ │ ├── pages
│ │ │ ├── logs
│ │ │ │ └── main.wxss
│ │ │ ├── counter
│ │ │ │ └── main.wxss
│ │ │ └── index
│ │ │ │ └── main.wxss
│ │ └── app.wxss
│ ├── img
│ │ └── girl.png
│ └── js
│ │ ├── manifest.js
│ │ ├── pages
│ │ ├── counter
│ │ │ └── main.js
│ │ ├── logs
│ │ │ └── main.js
│ │ └── index
│ │ │ └── main.js
│ │ ├── app.js
│ │ └── vendor.js
├── components
│ ├── slots.wxml
│ ├── card$79c1b934.wxml
│ ├── logs$31942962.wxml
│ ├── counter$6c3d87bf.wxml
│ └── index$622cddd6.wxml
├── pages
│ ├── logs
│ │ ├── main.json
│ │ ├── main.wxss
│ │ ├── main.wxml
│ │ └── main.js
│ ├── index
│ │ ├── main.wxss
│ │ ├── main.wxml
│ │ └── main.js
│ └── counter
│ │ ├── main.wxss
│ │ ├── main.wxml
│ │ └── main.js
├── app.js
├── copy-asset
│ └── assets
│ │ └── logo.png
└── app.json
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── configH5
├── prod.env.js
├── dev.env.js
└── index.js
├── src
├── assets
│ └── logo.png
├── pages
│ ├── counter
│ │ ├── main.js
│ │ └── index.vue
│ ├── index
│ │ ├── main.js
│ │ └── index.vue
│ └── logs
│ │ ├── main.js
│ │ └── index.vue
├── components
│ └── card.vue
├── store
│ └── index.js
├── api
│ ├── httpService.js
│ └── wxService.js
├── utils
│ └── index.js
├── router
│ └── index.js
├── mainH5.js
├── main.js
├── App.vue
└── AppH5.vue
├── distH5
├── static
│ ├── img
│ │ ├── girl.png
│ │ └── logo.png
│ ├── js
│ │ ├── manifest.js
│ │ └── app.js
│ └── css
│ │ └── app.css
└── index.html
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── .babelrc
├── index.html
├── .eslintrc.js
├── project.config.json
├── package.json
└── README.md
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 |
--------------------------------------------------------------------------------
/dist/app.wxss:
--------------------------------------------------------------------------------
1 | @import "./static/css/app.wxss";
--------------------------------------------------------------------------------
/dist/static/css/vendor.wxss:
--------------------------------------------------------------------------------
1 | .card{padding:20rpx;margin:0}
--------------------------------------------------------------------------------
/dist/components/slots.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/dist/pages/logs/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/dist/pages/logs/main.wxss:
--------------------------------------------------------------------------------
1 | @import "../../static/css/pages/logs/main.wxss";
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/dist/pages/index/main.wxss:
--------------------------------------------------------------------------------
1 | @import "../../static/css/pages/index/main.wxss";
--------------------------------------------------------------------------------
/configH5/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/dist/pages/counter/main.wxss:
--------------------------------------------------------------------------------
1 | @import "../../static/css/pages/counter/main.wxss";
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/static/img/girl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/static/img/girl.png
--------------------------------------------------------------------------------
/dist/static/img/girl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/dist/static/img/girl.png
--------------------------------------------------------------------------------
/distH5/static/img/girl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/distH5/static/img/girl.png
--------------------------------------------------------------------------------
/distH5/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/distH5/static/img/logo.png
--------------------------------------------------------------------------------
/dist/app.js:
--------------------------------------------------------------------------------
1 |
2 | require('./static/js/manifest')
3 | require('./static/js/vendor')
4 | require('./static/js/app')
5 |
--------------------------------------------------------------------------------
/dist/copy-asset/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aimee1608/mpvuedemo/HEAD/dist/copy-asset/assets/logo.png
--------------------------------------------------------------------------------
/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/index/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/dist/pages/logs/main.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dist/pages/index/main.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dist/pages/counter/main.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dist/pages/logs/main.js:
--------------------------------------------------------------------------------
1 |
2 | require('../../static/js/manifest')
3 | require('../../static/js/vendor')
4 | require('../../static/js/pages/logs/main')
5 |
--------------------------------------------------------------------------------
/dist/pages/index/main.js:
--------------------------------------------------------------------------------
1 |
2 | require('../../static/js/manifest')
3 | require('../../static/js/vendor')
4 | require('../../static/js/pages/index/main')
5 |
--------------------------------------------------------------------------------
/dist/pages/counter/main.js:
--------------------------------------------------------------------------------
1 |
2 | require('../../static/js/manifest')
3 | require('../../static/js/vendor')
4 | require('../../static/js/pages/counter/main')
5 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/configH5/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 |
--------------------------------------------------------------------------------
/dist/components/card$79c1b934.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{text}}
3 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | #dist/
4 | #distH5/
5 | npm-debug.log*
6 | yarn-debug.log*
7 | yarn-error.log*
8 |
9 | # Editor directories and files
10 | .idea
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 |
--------------------------------------------------------------------------------
/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/components/card.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
21 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // "postcss-mpvue-wxss": {},
6 | "postcss-import": {},
7 | "postcss-url": {},
8 | // to edit target browsers: use "browserslist" field in package.json
9 | "autoprefixer": {}
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/dist/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/main",
4 | "pages/counter/main",
5 | "pages/logs/main"
6 | ],
7 | "window": {
8 | "backgroundTextStyle": "light",
9 | "navigationBarBackgroundColor": "#fff",
10 | "navigationBarTitleText": "mpvue demo",
11 | "navigationBarTextStyle": "black"
12 | }
13 | }
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/dist/static/css/pages/logs/main.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/css/vendor.wxss";
2 | .counter-warp.data-v-12d7d1ff{text-align:center;padding-top:0}.log-list.data-v-12d7d1ff{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:5.33333333vw}.log-item.data-v-12d7d1ff{margin:1.33333333vw}.home.data-v-12d7d1ff{display:inline-block;margin:20rpx auto;padding:10rpx 20rpx;color:blue;border:2rpx solid blue}
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | // import * as getters from './getters.js'
4 |
5 | Vue.use(Vuex)
6 |
7 | /** 状态定义 */
8 |
9 | const store = new Vuex.Store({
10 | state: {
11 | count: 0
12 | },
13 | mutations: {
14 | increment: (state) => {
15 | const obj = state
16 | obj.count += 1
17 | },
18 | decrement: (state) => {
19 | const obj = state
20 | obj.count -= 1
21 | }
22 | }
23 | })
24 |
25 | export default store
26 |
--------------------------------------------------------------------------------
/dist/components/logs$31942962.wxml:
--------------------------------------------------------------------------------
1 | 去往首页
--------------------------------------------------------------------------------
/dist/components/counter$6c3d87bf.wxml:
--------------------------------------------------------------------------------
1 | Vuex counter:{{ count }} 去往首页
--------------------------------------------------------------------------------
/src/api/httpService.js:
--------------------------------------------------------------------------------
1 | export default {
2 | //ajax请求
3 | async httpRequest(option = {}) {
4 | if (option.methods == 'GET' || option.methods == 'get') {
5 | return await axios.get(
6 | option.url, {
7 | params: option.data
8 | }
9 | )
10 | } else if (option.methods == 'POST' || option.methods == 'post') {
11 | return await axios.post(
12 | option.url, option.data
13 | )
14 | } else {
15 | console.log('method not allow!')
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/dist/static/css/pages/counter/main.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/css/vendor.wxss";
2 | .counter-warp{text-align:center;padding-top:200rpx}.home{display:inline-block;margin:200rpx auto;padding:10rpx 20rpx;color:blue;border:2rpx solid blue}.btn{width:100%;position:relative;display:block;padding-left:28rpx;padding-right:28rpx;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:36rpx;text-align:center;text-decoration:none;line-height:2.55555556;border-radius:10rpx;overflow:hidden;color:#000;background-color:#f8f8f8;-webkit-tap-highlight-color:rgba(255,255,255,0);-webkit-user-select:none;-moz-user-focus:none;-moz-user-select:none;-webkit-appearance:none;outline:none}
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mpvue demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import index from '../pages/index/index.vue'
4 | import logs from '../pages/logs/index.vue'
5 | import counter from '../pages/counter/index.vue'
6 |
7 | Vue.use(Router)
8 |
9 | export default new Router({
10 | routes: [{
11 | path: '/',
12 | name: 'index',
13 | component: index,
14 | alias: '/pages/index/main'
15 | }, {
16 | path: '/logs',
17 | name: 'logs',
18 | component: logs,
19 | alias: '/pages/logs/main'
20 | }, {
21 | path: '/counter',
22 | name: 'counter',
23 | component: counter,
24 | alias: '/pages/counter/main'
25 | }]
26 | })
27 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/dist/static/js/manifest.js:
--------------------------------------------------------------------------------
1 | !function(r){var e=global.webpackJsonp;global.webpackJsonp=function(n,u,c){for(var l,f,a,p=0,i=[];p 去往Vuex示例页面 去往logs页面
--------------------------------------------------------------------------------
/distH5/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mpvue demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/dist/static/css/pages/index/main.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/css/vendor.wxss";
2 | .userinfo.data-v-161afc18{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.userinfo-avatar.data-v-161afc18{width:17.06666667vw;height:17.06666667vw;margin:2.66666667vw;border-radius:50%}.userinfo-nickname.data-v-161afc18{color:#aaa}.usermotto.data-v-161afc18{margin-top:300rpx}.form-control.data-v-161afc18{display:block;padding:0 24rpx;margin-bottom:10rpx;border:2rpx solid #ccc;height:50rpx;text-overflow:clip;overflow:hidden;white-space:nowrap;-webkit-tap-highlight-color:rgba(255,255,255,0);-webkit-user-select:none;-moz-user-focus:none;-moz-user-select:none;-webkit-appearance:none;outline:none}.counter.data-v-161afc18{display:inline-block;margin:20rpx auto;padding:10rpx 20rpx;color:blue;border:2rpx solid blue}.container .girl.data-v-161afc18{width:550rpx;height:800rpx}.container .logo.data-v-161afc18{width:400rpx;height:400rpx}
--------------------------------------------------------------------------------
/src/api/wxService.js:
--------------------------------------------------------------------------------
1 | export default {
2 | async getUserInfo() {
3 | let data = await new Promise((resolve, reject) => {
4 | wx.login({
5 | success: () => {
6 | wx.getUserInfo({
7 | success: resolve,
8 | fail: reject
9 | })
10 | }
11 | })
12 | })
13 | return data
14 | },
15 | async httpRequest(options = {}) {
16 | let data = await new Promise((resolve, reject) => {
17 | switch (options.type) {
18 | case 0:
19 | options.url = 'https://stocks.liangplus.com' + options.url.split('/liang')[1]
20 | break
21 | case 1:
22 | options.url = 'http://www.liangplus.com' + options.url.split('/api')[1]
23 | break;
24 | default:
25 | break
26 | }
27 | wx.request({
28 | url: options.url,
29 | data: Object.assign({}, options.data),
30 | method: options.methods || 'GET',
31 | header: {
32 | 'Content-Type': 'application/json'
33 | },
34 | success: resolve,
35 | fail: reject
36 | })
37 | })
38 | return data
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/dist/static/js/pages/counter/main.js:
--------------------------------------------------------------------------------
1 | global.webpackJsonp([4],{BScH:function(t,n,e){"use strict";n.a={computed:{count:function(){return this.$store.state.count}},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)},increment:function(){this.$store.commit("increment")},decrement:function(){this.$store.commit("decrement")}}}},HqHh:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var c=e("5nAL"),i=e.n(c),o=e("Wzh0");new i.a(o.a).$mount()},Wzh0:function(t,n,e){"use strict";var c=e("BScH"),i=e("n1Hj");var o=function(t){e("YI7k")},s=e("ybqe")(c.a,i.a,o,null,null);n.a=s.exports},YI7k:function(t,n){},n1Hj:function(t,n,e){"use strict";var c={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"counter-warp"},[e("p",[t._v("Vuex counter:"+t._s(t.count))]),t._v(" "),e("p",[e("button",{staticClass:"btn",attrs:{eventid:"0"},on:{click:t.increment}},[t._v("+")]),t._v(" "),e("button",{staticClass:"btn",attrs:{eventid:"1"},on:{click:t.decrement}},[t._v("-")])],1),t._v(" "),e("a",{staticClass:"home",attrs:{eventid:"2"},on:{click:function(n){t.gotoGame("pages/index/main")}}},[t._v("去往首页")])],1)},staticRenderFns:[]};n.a=c}},["HqHh"]);
--------------------------------------------------------------------------------
/src/pages/logs/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
36 |
37 |
59 |
--------------------------------------------------------------------------------
/src/mainH5.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 Vuex from 'vuex'
5 | import App from './AppH5'
6 | import router from './router'
7 | import wxService from './api/wxService'
8 | import httpService from './api/httpService'
9 | import store from './store'
10 |
11 | Vue.config.productionTip = false
12 | Vue.use(Vuex)
13 | Vue.mixin({
14 | data () {
15 | return {
16 | service: '', // 服务
17 | router: '/', // 路由路径
18 | imgSrc: '' // 图片路径
19 | }
20 | },
21 | methods: {
22 | newroot () {
23 | return this.$route
24 | },
25 | navigatePageTo (url) {
26 | this.$router.push(url)
27 | },
28 | reLaunchPageTo (url) {
29 | this.$router.replace(url)
30 | },
31 | setStorageSync (name, data) {
32 | sessionStorage.setItem(name, JSON.stringify(data))
33 | },
34 | getStorageSync (name) {
35 | return JSON.parse(sessionStorage.getItem(name))
36 | }
37 | },
38 | created () {
39 | console.log('chrome')
40 | this.service = httpService
41 | }
42 | })
43 | /* eslint-disable no-new */
44 | new Vue({
45 | el: '#app',
46 | router,
47 | components: { App },
48 | template: '',
49 | store
50 | })
51 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 | import store from './store'
4 | import wxService from './api/wxService'
5 | import httpService from './api/httpService'
6 |
7 | Vue.config.productionTip = false
8 | App.mpType = 'app'
9 | Vue.prototype.$store = store
10 |
11 | Vue.mixin({
12 | data() {
13 | return {
14 | service: '',
15 | router: '/',
16 | imgSrc: '/'
17 | }
18 | },
19 | methods: {
20 | newroot () { //
21 | return this.$root.$mp
22 | },
23 | navigatePageTo (url) {
24 | wx.navigateTo({url: url})
25 | },
26 | reLaunchPageTo (url) {
27 | wx.reLaunch({url: url})
28 | },
29 | setStorageSync (name, data) {
30 | wx.setStorageSync(name, data)
31 | },
32 | getStorageSync (name) {
33 | return wx.getStorageSync(name)
34 | }
35 | },
36 | created() {
37 | // console.log('wx')
38 | this.service = wxService
39 | }
40 | })
41 |
42 | const app = new Vue(App)
43 | app.$mount()
44 |
45 | export default {
46 | // 这个字段走 app.json
47 | config: {
48 | // 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去
49 | pages: ['^pages/index/main'],
50 | window: {
51 | backgroundTextStyle: 'light',
52 | navigationBarBackgroundColor: '#fff',
53 | navigationBarTitleText: 'mpvue demo',
54 | navigationBarTextStyle: 'black'
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/dist/static/js/pages/logs/main.js:
--------------------------------------------------------------------------------
1 | global.webpackJsonp([2],{"0xDb":function(t,n,e){"use strict";function a(t){var n=t.toString();return n[1]?n:"0"+n}function o(t){var n=t.getFullYear(),e=t.getMonth()+1,o=t.getDate(),i=t.getHours(),r=t.getMinutes(),s=t.getSeconds();return[n,e,o].map(a).join("/")+" "+[i,r,s].map(a).join(":")}n.a=o},"5HO/":function(t,n){},GbXl:function(t,n,e){"use strict";var a={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"counter-warp"},[e("a",{staticClass:"home",attrs:{eventid:"0"},on:{click:function(n){t.gotoGame("pages/index/main")}}},[t._v("去往首页")]),t._v(" "),e("ul",{staticClass:"container log-list"},t._l(t.logs,function(t,n){return e("li",{key:n,staticClass:"log-item"},[e("card",{attrs:{text:n+1+" . "+t,mpcomid:"0-"+n}})],1)}))],1)},staticRenderFns:[]};n.a=a},HnWL:function(t,n,e){"use strict";var a=e("0xDb"),o=e("UCfo");n.a={components:{card:o.a},data:function(){return{logs:[]}},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)}},created:function(){var t=this.getStorageSync("logs")||[];this.logs=t.map(function(t){return Object(a.a)(new Date(t))})}}},WRn3:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("5nAL"),o=e.n(a),i=e("xqpF");new o.a(i.a).$mount(),n.default={config:{navigationBarTitleText:"查看启动日志"}}},xqpF:function(t,n,e){"use strict";var a=e("HnWL"),o=e("GbXl");var i=function(t){e("5HO/")},r=e("ybqe")(a.a,o.a,i,"data-v-12d7d1ff",null);n.a=r.exports}},["WRn3"]);
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/src/pages/counter/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Vuex counter:{{ count }}
4 |
5 |
6 |
7 |
8 |
9 |
去往首页
10 |
11 |
12 |
13 |
35 |
36 |
71 |
--------------------------------------------------------------------------------
/dist/static/js/pages/index/main.js:
--------------------------------------------------------------------------------
1 | global.webpackJsonp([3],{"5vTQ":function(t,o,e){"use strict";var a=e("UCfo");o.a={data:function(){return{motto:"Hello World"}},components:{card:a.a},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)}}}},LbwD:function(t,o){},MhDc:function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=e("5nAL"),n=e.n(a),s=e("Qt9A");new n.a(s.a).$mount()},Qt9A:function(t,o,e){"use strict";var a=e("5vTQ"),n=e("pBzR");var s=function(t){e("LbwD")},r=e("ybqe")(a.a,n.a,s,"data-v-161afc18",null);o.a=r.exports},pBzR:function(t,o,e){"use strict";var a={render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"container"},[e("img",{staticClass:"girl",attrs:{src:t.imgSrc+"static/img/girl.png",alt:""}}),t._v(" "),e("img",{staticClass:"logo",attrs:{src:"../../assets/logo.png",alt:""}}),t._v(" "),e("card",{attrs:{text:t.motto,mpcomid:"0"}}),t._v(" "),e("form",{staticClass:"form-container"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.motto,expression:"motto"}],staticClass:"form-control",attrs:{type:"text",placeholder:"v-model",eventid:"0"},domProps:{value:t.motto},on:{input:function(o){o.target.composing||(t.motto=o.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model.lazy",value:t.motto,expression:"motto",modifiers:{lazy:!0}}],staticClass:"form-control",attrs:{type:"text",placeholder:"v-model.lazy",eventid:"1"},domProps:{value:t.motto},on:{change:function(o){t.motto=o.target.value}}})]),t._v(" "),e("a",{staticClass:"counter",attrs:{eventid:"2"},on:{click:function(o){t.gotoGame("pages/counter/main")}}},[t._v("去往Vuex示例页面")]),t._v(" "),e("a",{staticClass:"counter",attrs:{eventid:"3"},on:{click:function(o){t.gotoGame("pages/logs/main")}}},[t._v("去往logs页面")])],1)},staticRenderFns:[]};o.a=a}},["MhDc"]);
--------------------------------------------------------------------------------
/dist/static/css/app.wxss:
--------------------------------------------------------------------------------
1 | .container{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-sizing:border-box;box-sizing:border-box}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;width:100%;height:100%;position:relative}._a,._abbr,._address,._article,._aside,._audio,._b,._blockquote,._canvas,._caption,._cite,._code,._dd,._del,._details,._dfn,._div,._dl,._dt,._em,._embed,._fieldset,._figcaption,._figure,._footer,._form,._h1,._h2,._h3,._h4,._h5,._h6,._header,._i,._iframe,._img,._ins,._kbd,._label,._legend,._li,._mark,._menu,._nav,._object,._ol,._output,._p,._pre,._q,._ruby,._s,._samp,._section,._small,._span,._strong,._sub,._summary,._sup,._tbody,._td,._tfoot,._th,._thead,._time,._tr,._u,._ul,._var,._video,acronym,applet,big,center,page,strike,tt{margin:0;padding:0;border:0;font:inherit}page{font-family:Arial,STHeiti,Helvetica,sans-serif;background:#efefef;font-size:28rpx;color:#444!important;overflow-x:hidden;-webkit-overflow-x:hidden;-webkit-tap-highlight-color:transparent}._table{border-collapse:collapse;border-spacing:0}._fieldset,._img{border:0}._legend{display:none}._ol,._ul{list-style:none}._caption,._th{text-align:left}._h1,._h2,._h3,._h4,._h5,._h6{font-size:100%;font-weight:400}._q:after,._q:before{content:""}._abbr,acronym{border:0}._a{text-decoration:none}page{-webkit-text-size-adjust:none;width:100%;height:100%}._input[type=button],._input[type=search],._input[type=submit],._input[type=text]{-webkit-appearance:none;border-radius:0}page{height:100%;width:auto;overflow-x:hidden;-webkit-text-size-adjust:100%!important;-moz-text-size-adjust:100%!important;-ms-text-size-adjust:100%!important;text-size-adjust:100%!important}.bg{width:100%;height:100%}
--------------------------------------------------------------------------------
/src/pages/index/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
37 |
38 |
94 |
--------------------------------------------------------------------------------
/dist/static/js/app.js:
--------------------------------------------------------------------------------
1 | global.webpackJsonp([1],{IcnI:function(n,t,e){"use strict";var a=e("5nAL"),r=e.n(a),o=e("NYxO");r.a.use(o.a);var u=new o.a.Store({state:{count:0},mutations:{increment:function(n){n.count+=1},decrement:function(n){n.count-=1}}});t.a=u},IrvC:function(n,t){},M93x:function(n,t,e){"use strict";var a=e("Mw+1");var r=function(n){e("IrvC")},o=e("ybqe")(a.a,null,r,null,null);t.a=o.exports},"Mw+1":function(n,t,e){"use strict";t.a={created:function(){var n=this.getStorageSync("logs")||[];n.unshift(Date.now()),this.setStorageSync("logs",n)}}},NHnr:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("5nAL"),r=e.n(a),o=e("M93x"),u=e("IcnI"),c=e("x/O6");e("SWAV");r.a.config.productionTip=!1,o.a.mpType="app",r.a.prototype.$store=u.a,r.a.mixin({data:function(){return{service:"",router:"/",imgSrc:"/"}},methods:{newroot:function(){return this.$root.$mp},navigatePageTo:function(n){wx.navigateTo({url:n})},reLaunchPageTo:function(n){wx.reLaunch({url:n})},setStorageSync:function(n,t){wx.setStorageSync(n,t)},getStorageSync:function(n){return wx.getStorageSync(n)}},created:function(){this.service=c.a}}),new r.a(o.a).$mount(),t.default={config:{pages:["^pages/index/main"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"mpvue demo",navigationBarTextStyle:"black"}}}},SWAV:function(n,t,e){"use strict";var a=e("Xxa5"),r=(e.n(a),e("exGp"));e.n(r)},"x/O6":function(n,t,e){"use strict";var a=e("woOf"),r=e.n(a),o=e("Xxa5"),u=e.n(o),c=e("//Fk"),i=e.n(c),s=e("exGp"),f=e.n(s);t.a={getUserInfo:function(){var n=this;return f()(u.a.mark(function t(){var e;return u.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,new i.a(function(n,t){wx.login({success:function(){wx.getUserInfo({success:n,fail:t})}})});case 2:return e=n.sent,n.abrupt("return",e);case 4:case"end":return n.stop()}},t,n)}))()},httpRequest:function(){var n=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f()(u.a.mark(function e(){var a;return u.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,new i.a(function(n,e){switch(t.type){case 0:t.url="https://stocks.liangplus.com"+t.url.split("/liang")[1];break;case 1:t.url="http://www.liangplus.com"+t.url.split("/api")[1]}wx.request({url:t.url,data:r()({},t.data),method:t.methods||"GET",header:{"Content-Type":"application/json"},success:n,fail:e})});case 2:return a=n.sent,n.abrupt("return",a);case 4:case"end":return n.stop()}},e,n)}))()}}}},["NHnr"]);
--------------------------------------------------------------------------------
/configH5/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 | // Use Eslint Loader?
24 | // If true, your code will be linted during bundling and
25 | // linting errors and warnings will be shown in the console.
26 | useEslint: true,
27 | // If true, eslint errors and warnings will also be shown in the error overlay
28 | // in the browser.
29 | showEslintErrorsInOverlay: false,
30 |
31 | /**
32 | * Source Maps
33 | */
34 |
35 | // https://webpack.js.org/configuration/devtool/#development
36 | devtool: 'cheap-module-eval-source-map',
37 |
38 | // If you have problems debugging vue-files in devtools,
39 | // set this to false - it *may* help
40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
41 | cacheBusting: true,
42 |
43 | cssSourceMap: true
44 | },
45 |
46 | build: {
47 | // Template for index.html
48 | index: path.resolve(__dirname, '../distH5/index.html'),
49 |
50 | // Paths
51 | assetsRoot: path.resolve(__dirname, '../distH5'),
52 | assetsSubDirectory: 'static',
53 | assetsPublicPath: '/',
54 |
55 | /**
56 | * Source Maps
57 | */
58 |
59 | productionSourceMap: false,
60 | // https://webpack.js.org/configuration/devtool/#production
61 | devtool: '#source-map',
62 |
63 | // Gzip off by default as many popular static hosts such as
64 | // Surge or Netlify already gzip all static assets for you.
65 | // Before setting to `true`, make sure to:
66 | // npm install --save-dev compression-webpack-plugin
67 | productionGzip: false,
68 | productionGzipExtensions: ['js', 'css'],
69 |
70 | // Run the build command with an extra argument to
71 | // View the bundle analyzer report after build finishes:
72 | // `npm run build --report`
73 | // Set to `true` or `false` to always turn it on or off
74 | bundleAnalyzerReport: process.env.npm_config_report
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mpvuedemo",
3 | "version": "1.0.0",
4 | "description": "A Mpvue project",
5 | "author": "aimee",
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 | "devH5": "webpack-dev-server --inline --progress --config buildH5/webpack.devH5.conf.js",
13 | "all": "npm run dev && npm run devH5",
14 | "buildH5": "node buildH5/build.js"
15 | },
16 | "dependencies": {
17 | "mpvue": "^1.0.11",
18 | "vue": "^2.5.16",
19 | "vue-router": "^3.0.1",
20 | "vuex": "^3.0.1"
21 | },
22 | "devDependencies": {
23 | "autoprefixer": "^8.6.3",
24 | "babel-core": "^6.22.1",
25 | "babel-eslint": "^8.2.3",
26 | "babel-loader": "^7.1.1",
27 | "babel-plugin-transform-runtime": "^6.22.0",
28 | "babel-preset-env": "^1.3.2",
29 | "babel-preset-stage-2": "^6.22.0",
30 | "babel-register": "^6.22.0",
31 | "chalk": "^2.4.0",
32 | "clean-webpack-plugin": "^0.1.19",
33 | "connect-history-api-fallback": "^1.3.0",
34 | "copy-webpack-plugin": "^4.5.1",
35 | "css-loader": "^0.28.11",
36 | "cssnano": "^3.10.0",
37 | "eslint": "^4.19.1",
38 | "eslint-friendly-formatter": "^4.0.1",
39 | "eslint-loader": "^2.0.0",
40 | "eslint-plugin-html": "^4.0.3",
41 | "eslint-plugin-import": "^2.11.0",
42 | "eslint-plugin-node": "^6.0.1",
43 | "eventsource-polyfill": "^0.9.6",
44 | "express": "^4.16.3",
45 | "extract-text-webpack-plugin": "^3.0.2",
46 | "file-loader": "^1.1.11",
47 | "friendly-errors-webpack-plugin": "^1.7.0",
48 | "glob": "^7.1.2",
49 | "html-webpack-plugin": "^3.2.0",
50 | "http-proxy-middleware": "^0.18.0",
51 | "less": "^3.0.4",
52 | "less-loader": "^4.1.0",
53 | "mpvue-loader": "^1.0.13",
54 | "mpvue-template-compiler": "^1.0.11",
55 | "mpvue-webpack-target": "^1.0.0",
56 | "node-notifier": "^5.2.1",
57 | "optimize-css-assets-webpack-plugin": "^3.2.0",
58 | "ora": "^2.0.0",
59 | "portfinder": "^1.0.13",
60 | "postcss-import": "^11.1.0",
61 | "postcss-loader": "^2.1.4",
62 | "postcss-mpvue-wxss": "^1.0.0",
63 | "postcss-url": "^7.3.2",
64 | "prettier": "~1.12.1",
65 | "px2rpx-loader": "^0.1.10",
66 | "rimraf": "^2.6.0",
67 | "semver": "^5.3.0",
68 | "shelljs": "^0.8.1",
69 | "uglifyjs-webpack-plugin": "^1.2.5",
70 | "url-loader": "^1.0.1",
71 | "vue-loader": "^13.3.0",
72 | "vue-style-loader": "^4.1.0",
73 | "vue-template-compiler": "^2.5.16",
74 | "webpack": "^3.11.0",
75 | "webpack-bundle-analyzer": "^2.2.1",
76 | "webpack-cli": "^3.0.8",
77 | "webpack-dev-middleware-hard-disk": "^1.12.0",
78 | "webpack-dev-server": "^3.0.0",
79 | "webpack-merge": "^4.1.0",
80 | "webpack-mpvue-asset-plugin": "^0.0.2"
81 | },
82 | "engines": {
83 | "node": ">= 4.0.0",
84 | "npm": ">= 3.0.0"
85 | },
86 | "browserslist": [
87 | "> 1%",
88 | "last 2 versions",
89 | "not ie <= 8"
90 | ]
91 | }
92 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
12 |
13 |
122 |
--------------------------------------------------------------------------------
/src/AppH5.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
140 |
--------------------------------------------------------------------------------
/distH5/static/js/app.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([1],{"0yef":function(t,e){},"4ctZ":function(t,e){},"7Otq":function(t,e,n){t.exports=n.p+"static/img/logo.png?v=82b9c7a"},UvA9:function(t,e){},hXBy:function(t,e){},j7op:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("mvHQ"),a=n.n(o),r=n("7+uW"),s=n("NYxO"),c={name:"App",created:function(){var t=this.getStorageSync("logs")||[];t.unshift(Date.now()),this.setStorageSync("logs",t)}},i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var u=n("VU/8")(c,i,!1,function(t){n("4ctZ")},null,null).exports,l=n("/ocq"),m={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("p",{staticClass:"card"},[this._v("\n "+this._s(this.text)+"\n ")])])},staticRenderFns:[]};var p=n("VU/8")({props:["text"]},m,!1,function(t){n("hXBy")},null,null).exports,g={data:function(){return{motto:"Hello World"}},components:{card:p},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)}}},d={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"container"},[o("img",{staticClass:"girl",attrs:{src:t.imgSrc+"static/img/girl.png",alt:""}}),t._v(" "),o("img",{staticClass:"logo",attrs:{src:n("7Otq"),alt:""}}),t._v(" "),o("card",{attrs:{text:t.motto}}),t._v(" "),o("form",{staticClass:"form-container"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.motto,expression:"motto"}],staticClass:"form-control",attrs:{type:"text",placeholder:"v-model"},domProps:{value:t.motto},on:{input:function(e){e.target.composing||(t.motto=e.target.value)}}}),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model.lazy",value:t.motto,expression:"motto",modifiers:{lazy:!0}}],staticClass:"form-control",attrs:{type:"text",placeholder:"v-model.lazy"},domProps:{value:t.motto},on:{change:function(e){t.motto=e.target.value}}})]),t._v(" "),o("a",{staticClass:"counter",on:{click:function(e){t.gotoGame("pages/counter/main")}}},[t._v("去往Vuex示例页面")]),t._v(" "),o("a",{staticClass:"counter",on:{click:function(e){t.gotoGame("pages/logs/main")}}},[t._v("去往logs页面")])],1)},staticRenderFns:[]};var f=n("VU/8")(g,d,!1,function(t){n("rgNK")},"data-v-161afc18",null).exports;function v(t){var e=t.toString();return e[1]?e:"0"+e}function h(t){var e=t.getFullYear(),n=t.getMonth()+1,o=t.getDate(),a=t.getHours(),r=t.getMinutes(),s=t.getSeconds();return[e,n,o].map(v).join("/")+" "+[a,r,s].map(v).join(":")}var _={components:{card:p},data:function(){return{logs:[]}},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)}},created:function(){var t=this.getStorageSync("logs")||[];this.logs=t.map(function(t){return h(new Date(t))})}},x={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"counter-warp"},[n("a",{staticClass:"home",on:{click:function(e){t.gotoGame("pages/index/main")}}},[t._v("去往首页")]),t._v(" "),n("ul",{staticClass:"container log-list"},t._l(t.logs,function(t,e){return n("li",{key:e,staticClass:"log-item"},[n("card",{attrs:{text:e+1+" . "+t}})],1)}))])},staticRenderFns:[]};var S=n("VU/8")(_,x,!1,function(t){n("UvA9")},"data-v-12d7d1ff",null).exports,C={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"counter-warp"},[n("p",[t._v("Vuex counter:"+t._s(t.count))]),t._v(" "),n("p",[n("button",{staticClass:"btn",on:{click:t.increment}},[t._v("+")]),t._v(" "),n("button",{staticClass:"btn",on:{click:t.decrement}},[t._v("-")])]),t._v(" "),n("a",{staticClass:"home",on:{click:function(e){t.gotoGame("pages/index/main")}}},[t._v("去往首页")])])},staticRenderFns:[]};var w=n("VU/8")({computed:{count:function(){return this.$store.state.count}},methods:{gotoGame:function(t){this.reLaunchPageTo(this.router+t)},increment:function(){this.$store.commit("increment")},decrement:function(){this.$store.commit("decrement")}}},C,!1,function(t){n("0yef")},null,null).exports;r.a.use(l.a);var y=new l.a({routes:[{path:"/",name:"index",component:f,alias:"/pages/index/main"},{path:"/logs",name:"logs",component:S,alias:"/pages/logs/main"},{path:"/counter",name:"counter",component:w,alias:"/pages/counter/main"}]}),k=(n("woOf"),n("Xxa5")),b=n.n(k),$=(n("//Fk"),n("exGp")),G=n.n($),P={httpRequest:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return G()(b.a.mark(function n(){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("GET"!=e.methods&&"get"!=e.methods){t.next=6;break}return t.next=3,axios.get(e.url,{params:e.data});case 3:return t.abrupt("return",t.sent);case 6:if("POST"!=e.methods&&"post"!=e.methods){t.next=12;break}return t.next=9,axios.post(e.url,e.data);case 9:return t.abrupt("return",t.sent);case 12:console.log("method not allow!");case 13:case"end":return t.stop()}},n,t)}))()}};r.a.use(s.a);var T=new s.a.Store({state:{count:0},mutations:{increment:function(t){t.count+=1},decrement:function(t){t.count-=1}}});r.a.config.productionTip=!1,r.a.use(s.a),r.a.mixin({data:function(){return{service:"",router:"/",imgSrc:""}},methods:{newroot:function(){return this.$route},navigatePageTo:function(t){this.$router.push(t)},reLaunchPageTo:function(t){this.$router.replace(t)},setStorageSync:function(t,e){sessionStorage.setItem(t,a()(e))},getStorageSync:function(t){return JSON.parse(sessionStorage.getItem(t))}},created:function(){console.log("chrome"),this.service=P}}),new r.a({el:"#app",router:y,components:{App:u},template:"",store:T})},rgNK:function(t,e){}},["j7op"]);
--------------------------------------------------------------------------------
/distH5/static/css/app.css:
--------------------------------------------------------------------------------
1 |
2 | body {
3 | height: 100%;
4 | width: auto;
5 | overflow-x: hidden;
6 | -webkit-text-size-adjust: 100%!important;
7 | -moz-text-size-adjust: 100%!important;
8 | -ms-text-size-adjust: 100%!important;
9 | text-size-adjust: 100%!important;
10 | }
11 | .container {
12 | height: 100%;
13 | display: -webkit-box;
14 | display: -ms-flexbox;
15 | display: flex;
16 | -webkit-box-orient: vertical;
17 | -webkit-box-direction: normal;
18 | -ms-flex-direction: column;
19 | flex-direction: column;
20 | -webkit-box-align: center;
21 | -ms-flex-align: center;
22 | align-items: center;
23 | -webkit-box-pack: justify;
24 | -ms-flex-pack: justify;
25 | justify-content: space-between;
26 | -webkit-box-sizing: border-box;
27 | box-sizing: border-box;
28 | }
29 | /* this rule will be remove */
30 | * {
31 | transition: width 2s;
32 | -moz-transition: width 2s;
33 | -webkit-transition: width 2s;
34 | -o-transition: width 2s;
35 | }
36 | #app {
37 | font-family: 'Avenir', Helvetica, Arial, sans-serif;
38 | -webkit-font-smoothing: antialiased;
39 | -moz-osx-font-smoothing: grayscale;
40 | text-align: center;
41 | color: #2c3e50;
42 | width: 100%;
43 | height: 100%;
44 | position: relative;
45 | }
46 | /******reset********/
47 | html,
48 | body,
49 | div,
50 | span,
51 | applet,
52 | object,
53 | iframe,
54 | h1,
55 | h2,
56 | h3,
57 | h4,
58 | h5,
59 | h6,
60 | p,
61 | blockquote,
62 | pre,
63 | a,
64 | abbr,
65 | acronym,
66 | address,
67 | big,
68 | cite,
69 | code,
70 | del,
71 | dfn,
72 | em,
73 | img,
74 | ins,
75 | kbd,
76 | q,
77 | s,
78 | samp,
79 | small,
80 | strike,
81 | strong,
82 | sub,
83 | sup,
84 | tt,
85 | var,
86 | b,
87 | u,
88 | i,
89 | center,
90 | dl,
91 | dt,
92 | dd,
93 | ol,
94 | ul,
95 | li,
96 | fieldset,
97 | form,
98 | label,
99 | legend,
100 | caption,
101 | tbody,
102 | tfoot,
103 | thead,
104 | tr,
105 | th,
106 | td,
107 | article,
108 | aside,
109 | canvas,
110 | details,
111 | embed,
112 | figure,
113 | figcaption,
114 | footer,
115 | header,
116 | menu,
117 | nav,
118 | output,
119 | ruby,
120 | section,
121 | summary,
122 | time,
123 | mark,
124 | audio,
125 | video {
126 | margin: 0;
127 | padding: 0;
128 | border: 0;
129 | font: inherit;
130 | }
131 | body {
132 | font-family: Arial, "STHeiti", Helvetica, sans-serif;
133 | background: #efefef;
134 | font-size: 14px;
135 | color: #444!important;
136 | width: 100%;
137 | overflow-x: hidden;
138 | -webkit-overflow-x: hidden;
139 | -webkit-tap-highlight-color: transparent;
140 | }
141 | table {
142 | border-collapse: collapse;
143 | border-spacing: 0;
144 | }
145 | fieldset,
146 | img {
147 | border: 0;
148 | }
149 | legend {
150 | display: none;
151 | }
152 | ol,
153 | ul {
154 | list-style: none;
155 | }
156 | caption,
157 | th {
158 | text-align: left;
159 | }
160 | h1,
161 | h2,
162 | h3,
163 | h4,
164 | h5,
165 | h6 {
166 | font-size: 100%;
167 | font-weight: normal;
168 | }
169 | q:before,
170 | q:after {
171 | content: '';
172 | }
173 | abbr,
174 | acronym {
175 | border: 0;
176 | }
177 | a {
178 | text-decoration: none;
179 | }
180 | html {
181 | -webkit-text-size-adjust: none;
182 | width: 100%;
183 | height: 100%;
184 | }
185 | /*????iphone??safari????????????*/
186 | input[type="text"],
187 | input[type="button"],
188 | input[type="submit"],
189 | input[type="search"] {
190 | -webkit-appearance: none;
191 | border-radius: 0;
192 | }
193 | html,
194 | body {
195 | height: 100%;
196 | width: auto;
197 | overflow-x: hidden;
198 | -webkit-text-size-adjust: 100%!important;
199 | -moz-text-size-adjust: 100%!important;
200 | -ms-text-size-adjust: 100%!important;
201 | text-size-adjust: 100%!important;
202 | }
203 | .bg {
204 | width: 100%;
205 | height: 100%;
206 | }
207 |
208 | .userinfo[data-v-161afc18] {
209 | display: -webkit-box;
210 | display: -ms-flexbox;
211 | display: flex;
212 | -webkit-box-orient: vertical;
213 | -webkit-box-direction: normal;
214 | -ms-flex-direction: column;
215 | flex-direction: column;
216 | -webkit-box-align: center;
217 | -ms-flex-align: center;
218 | align-items: center;
219 | }
220 | .userinfo-avatar[data-v-161afc18] {
221 | width: 17.06666667vw;
222 | height: 17.06666667vw;
223 | margin: 2.66666667vw;
224 | border-radius: 50%;
225 | }
226 | .userinfo-nickname[data-v-161afc18] {
227 | color: #aaa;
228 | }
229 | .usermotto[data-v-161afc18] {
230 | margin-top: 150px;
231 | }
232 | .form-control[data-v-161afc18] {
233 | display: block;
234 | padding: 0 12px;
235 | margin-bottom: 5px;
236 | border: 1px solid #ccc;
237 | height: 25px;
238 | text-overflow: clip;
239 | overflow: hidden;
240 | white-space: nowrap;
241 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
242 | -webkit-user-select: none;
243 | -moz-user-focus: none;
244 | -moz-user-select: none;
245 | -webkit-appearance: none;
246 | outline: none;
247 | }
248 | .counter[data-v-161afc18] {
249 | display: inline-block;
250 | margin: 10px auto;
251 | padding: 5px 10px;
252 | color: blue;
253 | border: 1px solid blue;
254 | }
255 | .container .girl[data-v-161afc18] {
256 | width: 275px;
257 | height: 400px;
258 | }
259 | .container .logo[data-v-161afc18] {
260 | width: 200px;
261 | height: 200px;
262 | }
263 |
264 | .card {
265 | padding: 10px;
266 | margin: 0;
267 | }
268 |
269 | .counter-warp[data-v-12d7d1ff] {
270 | text-align: center;
271 | padding-top: 0;
272 | }
273 | .log-list[data-v-12d7d1ff] {
274 | display: -webkit-box;
275 | display: -ms-flexbox;
276 | display: flex;
277 | -webkit-box-orient: vertical;
278 | -webkit-box-direction: normal;
279 | -ms-flex-direction: column;
280 | flex-direction: column;
281 | padding: 5.33333333vw;
282 | }
283 | .log-item[data-v-12d7d1ff] {
284 | margin: 1.33333333vw;
285 | }
286 | .home[data-v-12d7d1ff] {
287 | display: inline-block;
288 | margin: 10px auto;
289 | padding: 5px 10px;
290 | color: blue;
291 | border: 1px solid blue;
292 | }
293 |
294 | .counter-warp {
295 | text-align: center;
296 | padding-top: 100px;
297 | }
298 | .home {
299 | display: inline-block;
300 | margin: 100px auto;
301 | padding: 5px 10px;
302 | color: blue;
303 | border: 1px solid blue;
304 | }
305 | .btn {
306 | width: 100%;
307 | position: relative;
308 | display: block;
309 | padding-left: 14px;
310 | padding-right: 14px;
311 | -webkit-box-sizing: border-box;
312 | box-sizing: border-box;
313 | font-size: 18px;
314 | text-align: center;
315 | text-decoration: none;
316 | line-height: 2.55555556;
317 | border-radius: 5px;
318 | overflow: hidden;
319 | color: #000000;
320 | background-color: #F8F8F8;
321 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
322 | -webkit-user-select: none;
323 | -moz-user-focus: none;
324 | -moz-user-select: none;
325 | -webkit-appearance: none;
326 | outline: none;
327 | }
328 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # mpvue demo
2 |
3 | > A Mpvue project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # 安装依赖(注意查看package.json里面模块的安装版本号)
9 | npm install
10 |
11 | # 小程序运行
12 | npm run dev
13 |
14 | # H5运行
15 | npm run devH5
16 |
17 | # 小程序打包(打包到dist目录)
18 | npm run build
19 |
20 | # H5打包(打包到distH5目录)
21 | npm run buildH5
22 |
23 | ```
24 |
25 |
26 | 博客详细说明 https://blog.csdn.net/Aimee1608/article/details/81084553
27 |
28 |
29 | ## 开始
30 | 这个项目是一个mpvue 的demo, 没有具体的业务实现方法,只有简单的页面切换,还有常用的一些方法封装,总体提供分开打包开发的思路
31 | >github源码 => https://github.com/Aimee1608/mpvuedemo
32 |
33 | 需要看详细版有项目内容的,可以看这篇文章,有详细说明 https://blog.csdn.net/aimee1608/article/details/80757077
34 | ## 目录结构
35 |
36 | ```bash
37 | .
38 | ├── README.md
39 | ├── build 小程序运行打包配置文件
40 | │ ├── build.js
41 | │ ├── check-versions.js
42 | │ ├── dev-client.js
43 | │ ├── dev-server.js
44 | │ ├── utils.js
45 | │ ├── vue-loader.conf.js
46 | │ ├── webpack.base.conf.js
47 | │ ├── webpack.dev.conf.js
48 | │ └── webpack.prod.conf.js
49 | ├── buildH5 H5运行打包配置文件
50 | │ ├── build.js
51 | │ ├── check-versions.js
52 | │ ├── dev-client.js
53 | │ ├── utils.js
54 | │ ├── vue-loader.conf.js
55 | │ ├── webpack.baseH5.conf.js
56 | │ ├── webpack.devH5.conf.js
57 | │ └── webpack.prodH5.conf.js
58 | ├── config 小程序运行打包配置文件
59 | │ ├── dev.env.js
60 | │ ├── index.js
61 | │ └── prod.env.js
62 | ├── configH5 H5运行打包配置文件
63 | │ ├── dev.env.js
64 | │ ├── index.js
65 | │ └── prod.env.js
66 | ├── dist 小程序打包生成的文件目录
67 | │ ├── app.js
68 | │ ├── app.json
69 | │ ├── app.wxss
70 | │ ├── components
71 | │ │ ├── card$79c1b934.wxml
72 | │ │ ├── counter$6c3d87bf.wxml
73 | │ │ ├── index$622cddd6.wxml
74 | │ │ ├── logs$31942962.wxml
75 | │ │ └── slots.wxml
76 | │ ├── copy-asset
77 | │ │ └── assets
78 | │ │ └── logo.png
79 | │ ├── pages
80 | │ │ ├── counter
81 | │ │ │ ├── main.js
82 | │ │ │ ├── main.wxml
83 | │ │ │ └── main.wxss
84 | │ │ ├── index
85 | │ │ │ ├── main.js
86 | │ │ │ ├── main.wxml
87 | │ │ │ └── main.wxss
88 | │ │ └── logs
89 | │ │ ├── main.js
90 | │ │ ├── main.json
91 | │ │ ├── main.wxml
92 | │ │ └── main.wxss
93 | │ └── static
94 | │ ├── css
95 | │ │ ├── app.wxss
96 | │ │ ├── pages
97 | │ │ │ ├── counter
98 | │ │ │ │ └── main.wxss
99 | │ │ │ ├── index
100 | │ │ │ │ └── main.wxss
101 | │ │ │ └── logs
102 | │ │ │ └── main.wxss
103 | │ │ └── vendor.wxss
104 | │ ├── img
105 | │ │ └── girl.png
106 | │ └── js
107 | │ ├── app.js
108 | │ ├── manifest.js
109 | │ ├── pages
110 | │ │ ├── counter
111 | │ │ │ └── main.js
112 | │ │ ├── index
113 | │ │ │ └── main.js
114 | │ │ └── logs
115 | │ │ └── main.js
116 | │ └── vendor.js
117 | ├── distH5 H5打包生成的文件目录
118 | │ ├── index.html
119 | │ └── static
120 | │ ├── css
121 | │ │ └── app.css
122 | │ ├── img
123 | │ │ ├── girl.png
124 | │ │ └── logo.png
125 | │ └── js
126 | │ ├── app.js
127 | │ ├── manifest.js
128 | │ └── vendor.js
129 | ├── index.html 入口index.html 页面
130 | ├── package-lock.json
131 | ├── package.json 安装配置文件
132 | ├── project.config.json
133 | ├── src
134 | │ ├── App.vue 小程序入口vue
135 | │ ├── AppH5.vue H5入口vue
136 | │ ├── api 小程序和H5分别封装的方法
137 | │ │ ├── httpService.js
138 | │ │ └── wxService.js
139 | │ ├── assets 静态资源文件
140 | │ │ └── logo.png
141 | │ ├── components 组件
142 | │ │ └── card.vue
143 | │ ├── main.js 小程序入口js
144 | │ ├── mainH5.js H5入口js
145 | │ ├── pages 页面内容
146 | │ │ ├── counter
147 | │ │ │ ├── index.vue
148 | │ │ │ └── main.js
149 | │ │ ├── index
150 | │ │ │ ├── index.vue
151 | │ │ │ └── main.js
152 | │ │ └── logs
153 | │ │ ├── index.vue
154 | │ │ └── main.js
155 | │ ├── router H5路由
156 | │ │ └── index.js
157 | │ ├── store vuex存储
158 | │ │ └── index.js
159 | │ └── utils js封装方法
160 | │ └── index.js
161 | └── static 静态资源文件
162 | └── img
163 | └── girl.png
164 | ```
165 |
166 | ## 简易说明
167 | ### 路由跳转
168 |
169 | ```bash
170 |
171 |
184 |
185 |
186 |
206 | ```
207 |
208 | ### 分别封装方法
209 |
210 | > H5 mainH5.js方法
211 | ```bash
212 | Vue.mixin({
213 | data () {
214 | return {
215 | service: '', // 服务
216 | router: '/', // 路由路径
217 | imgSrc: '' // 图片路径
218 | }
219 | },
220 | methods: {
221 | newroot () {
222 | return this.$route
223 | },
224 | navigatePageTo (url) {
225 | this.$router.push(url)
226 | },
227 | reLaunchPageTo (url) {
228 | this.$router.replace(url)
229 | },
230 | setStorageSync (name, data) {
231 | sessionStorage.setItem(name, JSON.stringify(data))
232 | },
233 | getStorageSync (name) {
234 | return JSON.parse(sessionStorage.getItem(name))
235 | }
236 | },
237 | created () {
238 | console.log('chrome')
239 | this.service = httpService
240 | }
241 | })
242 | ```
243 | > 小程序main.js
244 |
245 | ```bash
246 | Vue.mixin({
247 | data() {
248 | return {
249 | service: '',
250 | router: '/',
251 | imgSrc: '/'
252 | }
253 | },
254 | methods: {
255 | newroot () {
256 | return this.$root.$mp
257 | },
258 | navigatePageTo (url) {
259 | wx.navigateTo({url: url})
260 | },
261 | reLaunchPageTo (url) {
262 | wx.reLaunch({url: url})
263 | },
264 | setStorageSync (name, data) {
265 | wx.setStorageSync(name, data)
266 | },
267 | getStorageSync (name) {
268 | return wx.getStorageSync(name)
269 | }
270 | },
271 | created() {
272 | // console.log('wx')
273 | this.service = wxService
274 | }
275 | })
276 | ```
277 |
278 | ### vuex 数据存储
279 | >小程序store 直接挂在 Vue原型上
280 |
281 | ```bash
282 | Vue.prototype.$store = store
283 | ```
284 |
285 | >H5vue 还是和之前一样
286 |
287 | ```bash
288 | new Vue({
289 | el: '#app',
290 | router,
291 | components: { App },
292 | template: '',
293 | store
294 | })
295 | ```
296 |
--------------------------------------------------------------------------------
/dist/static/js/vendor.js:
--------------------------------------------------------------------------------
1 | global.webpackJsonp([0],{"+E39":function(t,e,n){t.exports=!n("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+ZMJ":function(t,e,n){var r=n("lOnJ");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"+tPU":function(t,e,n){n("xGkn");for(var r=n("7KvD"),o=n("hJx8"),i=n("/bQp"),a=n("dSzd")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c=0&&Math.floor(e)===e&&isFinite(t)}function u(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var d=Object.prototype.hasOwnProperty;function v(t,e){return d.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var m=/-(\w)/g,g=y(function(t){return t.replace(m,function(t,e){return e?e.toUpperCase():""})}),_=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),b=/([^-])([A-Z])/g,x=y(function(t){return t.replace(b,"$1-$2").replace(b,"$1-$2").toLowerCase()});function w(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function $(t,e){for(var n in e)t[n]=e[n];return t}function A(t,e,n){}var j=function(t,e,n){return!1},k=function(t){return t};function S(t,e){var n=i(t),r=i(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return t===e}}function E(t,e){for(var n=0;n0),z=(U&&U.indexOf("android"),U&&/iphone|ipad|ipod|ios/.test(U)),H=(U&&/chrome\/\d+/.test(U),{}.watch);if(G)try{var J={};Object.defineProperty(J,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,J)}catch(t){}var q=function(){return void 0===B&&(B=!G&&void 0!==e&&"server"===e.process.env.VUE_ENV),B},Q=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function W(t){return"function"==typeof t&&/native code/.test(t.toString())}var Y,X="undefined"!=typeof Symbol&&W(Symbol)&&"undefined"!=typeof Reflect&&W(Reflect.ownKeys),Z=function(){var t,e=[],n=!1;function r(){n=!1;var t=e.slice(0);e.length=0;for(var r=0;rte&&Qt[n].id>t.id;)n--;Qt.splice(n+1,0,t)}else Qt.push(t);Xt||(Xt=!0,Z(ee))}}(this)},re.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){N(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},re.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},re.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},re.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var oe=new Y;var ie={enumerable:!0,configurable:!0,get:A,set:A};function ae(t,e,n){ie.get=function(){return this[e][n]},ie.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ie)}function se(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;at.shouldConvert=i;var a=function(i){o.push(i);var a=wt(i,e,n,t);pt(r,i,a),i in t||ae(t,"_props",i)};for(var s in e)a(s);at.shouldConvert=!0}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?A:w(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;s(e=t._data="function"==typeof e?function(t,e){try{return t.call(e)}catch(t){return N(t,e,"data()"),{}}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);for(;o--;){var i=n[o];r&&v(r,i)||(void 0,36!==(a=(i+"").charCodeAt(0))&&95!==a&&ae(t,"_data",i))}var a;ft(e,!0)}(t):ft(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null);for(var r in e){var o=e[r],i="function"==typeof o?o:o.get;n[r]=new re(t,i,A,ce),r in t||ue(t,r,o)}}(t,e.computed),e.watch&&e.watch!==H&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(t[o])<0)&&r.push(t[o]);return r}return t}function De(t){this._init(t)}function Le(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=bt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)ae(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)ue(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,M.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=$({},a.options),o[r]=a,a}}De.prototype._init=function(t){var e=this;e._uid=Pe++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options);n.parent=e.parent,n.propsData=e.propsData,n._parentVnode=e._parentVnode,n._parentListeners=e._parentListeners,n._renderChildren=e._renderChildren,n._componentTag=e._componentTag,n._parentElm=e._parentElm,n._refElm=e._refElm,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=bt(Me(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Bt(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$vnode=t.$options._parentVnode,n=e&&e.context;t.$slots=Vt(t.$options._renderChildren,n),t.$scopedSlots=L,t._c=function(e,n,r,o){return be(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return be(t,e,n,r,o,!0)};var r=e&&e.data;pt(t,"$attrs",r&&r.attrs,0,!0),pt(t,"$listeners",r&&r.on,0,!0)}(e),qt(e,"beforeCreate"),function(t){var e=le(t.$options.inject,t);e&&(at.shouldConvert=!1,Object.keys(e).forEach(function(n){pt(t,n,e[n])}),at.shouldConvert=!0)}(e),se(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),qt(e,"created"),e.$options.el&&e.$mount(e.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=lt,t.prototype.$delete=ht,t.prototype.$watch=function(t,e,n){if(s(e))return pe(this,t,e,n);(n=n||{}).user=!0;var r=new re(this,t,e,n);return n.immediate&&e.call(this,r.value),function(){r.teardown()}}}(De),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){if(Array.isArray(t))for(var r=0,o=t.length;r1?O(e):e;for(var n=O(arguments,1),r=0,o=e.length;r-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===a.call(n)&&t.test(e));var n}function Ne(t,e,n){for(var r in t){var o=t[r];if(o){var i=Ie(o.componentOptions);i&&!n(i)&&(o!==e&&Be(o),t[r]=null)}}}function Be(t){t&&t.componentInstance.$destroy()}var Ve={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Re,exclude:Re},created:function(){this.cache=Object.create(null)},destroyed:function(){for(var t in this.cache)Be(this.cache[t])},watch:{include:function(t){Ne(this.cache,this._vnode,function(e){return Fe(t,e)})},exclude:function(t){Ne(this.cache,this._vnode,function(e){return!Fe(t,e)})}},render:function(){var t=function(t){if(Array.isArray(t))for(var e=0;e-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=bt(this.options,t),this}}(t),Le(t),function(t){M.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&s(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}(t)}(De),Object.defineProperty(De.prototype,"$isServer",{get:q}),Object.defineProperty(De.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),De.version="2.4.1",De.mpvueVersion="1.0.11";var Ge=p("template,script,style,element,content,slot,link,meta,svg,view,a,div,img,image,text,span,richtext,input,switch,textarea,spinner,select,slider,slider-neighbor,indicator,trisition,trisition-group,canvas,list,cell,header,loading,loading-indicator,refresh,scrollable,scroller,video,web,embed,tabbar,tabheader,datepicker,timepicker,marquee,countdown",!0),Ue=p("style,class");p("web,spinner,switch,video,textarea,canvas,indicator,marquee,countdown",!0),p("embed,img,image,input,link,meta",!0);function Ke(t){return t&&t.$attrs?t.$attrs.mpcomid:"0"}var ze={tap:["tap","click"],touchstart:["touchstart"],touchmove:["touchmove"],touchcancel:["touchcancel"],touchend:["touchend"],longtap:["longtap"],input:["input"],blur:["change","blur"],submit:["submit"],focus:["focus"],scrolltoupper:["scrolltoupper"],scrolltolower:["scrolltolower"],scroll:["scroll"]},He={};var Je=Object.freeze({createElement:function(t,e){return He},createElementNS:function(t,e){return He},createTextNode:function(t){return He},createComment:function(t){return He},insertBefore:function(t,e,n){},removeChild:function(t,e){},appendChild:function(t,e){},parentNode:function(t){return He},nextSibling:function(t){return He},tagName:function(t){return"div"},setTextContent:function(t,e){return He},setAttribute:function(t,e,n){return He}}),qe={create:function(t,e){Qe(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Qe(t,!0),Qe(e))},destroy:function(t){Qe(t,!0)}};function Qe(t,e){var n=t.data.ref;if(n){var r=t.context,o=t.componentInstance||t.elm,i=r.$refs;e?Array.isArray(i[n])?h(i[n],o):i[n]===o&&(i[n]=void 0):t.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}var We=new At("",{},[]),Ye=["create","activate","update","remove","destroy"];function Xe(e,o){return e.key===o.key&&(e.tag===o.tag&&e.isComment===o.isComment&&n(e.data)===n(o.data)&&function(t,e){if("input"!==t.tag)return!0;var r,o=n(r=t.data)&&n(r=r.attrs)&&r.type,i=n(r=e.data)&&n(r=r.attrs)&&r.type;return o===i}(e,o)||r(e.isAsyncPlaceholder)&&e.asyncFactory===o.asyncFactory&&t(o.asyncFactory.error))}function Ze(t,e,r){var o,i,a={};for(o=e;o<=r;++o)n(i=t[o].key)&&(a[i]=o);return a}var tn=function(e){var i,a,s={},c=e.modules,u=e.nodeOps;for(i=0;id?_(e,t(o[m+1])?null:o[m+1].elm,o,h,m,i):h>m&&x(0,r,p,d)}(c,h,d,i,a):n(d)?(n(e.text)&&u.setTextContent(c,""),_(c,null,d,0,d.length-1,i)):n(h)?x(0,h,0,h.length-1):n(e.text)&&u.setTextContent(c,""):e.text!==o.text&&u.setTextContent(c,o.text),n(p)&&n(f=p.hook)&&n(f=f.postpatch)&&f(e,o)}}}function $(t,e,o){if(r(o)&&n(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;ie?(clearTimeout(a),a=null,s=p,i=t.apply(r,o),a||(r=o=null)):a||!1===n.trailing||(a=setTimeout(c,l)),i}}(function(t,e){t(e)},50);function on(t){var e=t.$root.$mp||{},n=e.mpType;void 0===n&&(n="");var r=e.page;if("app"!==n&&r&&"function"==typeof r.setData)return r}return De.config.mustUseProp=function(){},De.config.isReservedTag=Ge,De.config.isReservedAttr=Ue,De.config.getTagNamespace=function(){},De.config.isUnknownElement=function(){},De.prototype.__patch__=function(){tn.apply(this,arguments),this.$updateDataToMP()},De.prototype.$mount=function(t,e){var n=this,r=this.$options;if(r&&(r.render||r.mpType)){var o=r.mpType;return void 0===o&&(o="page"),this._initMP(o,function(){return zt(n,void 0,void 0)})}return zt(this,void 0,void 0)},De.prototype._initMP=function(t,n){var r=this.$root;r.$mp||(r.$mp={});var o,i,a=r.$mp;if(a.status)return"app"===t?en(this,"onLaunch",a.appOptions):(en(this,"onLoad",a.query),en(this,"onReady")),n();if(a.mpType=t,a.status="register","app"===t)e.App({globalData:{appOptions:{}},handleProxy:function(t){return r.$handleProxyWithVue(t)},onLaunch:function(t){void 0===t&&(t={}),a.app=this,a.status="launch",this.globalData.appOptions=a.appOptions=t,en(r,"onLaunch",t),n()},onShow:function(t){void 0===t&&(t={}),a.status="show",this.globalData.appOptions=a.appOptions=t,en(r,"onShow",t)},onHide:function(){a.status="hide",en(r,"onHide")},onError:function(t){en(r,"onError",t)}});else if("component"===t)i=(o=r)._mpProps={},Object.keys(o.$options.properties||{}).forEach(function(t){t in o||(ae(o,"_mpProps",t),i[t]=void 0)}),ft(i,!0),e.Component({properties:function(t){var e,n=t.$options.properties||{},r={},o=function(o){e=s(n[o])?n[o]:{type:n[o]},r[o]={type:e.type,value:e.value,observer:function(n,r){t[o]=n,"function"==typeof e.observer&&e.observer.call(t,n,r)}}};for(var i in n)o(i);return r}(r),data:{$root:{}},methods:{handleProxy:function(t){return r.$handleProxyWithVue(t)}},created:function(){a.status="created",a.page=this},attached:function(){a.status="attached",en(r,"attached")},ready:function(){a.status="ready",en(r,"onReady"),n(),r.$nextTick(function(){r._initDataToMP()})},moved:function(){en(r,"moved")},detached:function(){a.status="detached",en(r,"detached")}});else{var c=e.getApp();e.Page({data:{$root:{}},handleProxy:function(t){return r.$handleProxyWithVue(t)},onLoad:function(t){a.page=this,a.query=t,a.status="load",function(t,e){var n=e.$mp;t&&t.globalData&&(n.appOptions=t.globalData.appOptions)}(c,r),en(r,"onLoad",t)},onShow:function(){a.page=this,a.status="show",en(r,"onShow"),r.$nextTick(function(){r._initDataToMP()})},onReady:function(){a.status="ready",en(r,"onReady"),n()},onHide:function(){a.status="hide",en(r,"onHide"),a.page=null},onUnload:function(){a.status="unload",en(r,"onUnload"),a.page=null},onPullDownRefresh:function(){en(r,"onPullDownRefresh")},onReachBottom:function(){en(r,"onReachBottom")},onShareAppMessage:r.$options.onShareAppMessage?function(t){return en(r,"onShareAppMessage",t)}:null,onPageScroll:function(t){en(r,"onPageScroll",t)},onTabItemTap:function(t){en(r,"onTabItemTap",t)}})}},De.prototype.$updateDataToMP=function(){var t=on(this);if(t){var e=nn(this);rn(t.setData.bind(t),e)}},De.prototype._initDataToMP=function(){var t=on(this);if(t){var e=function t(e,n){void 0===n&&(n={});var r=e.$children;return r&&r.length&&r.forEach(function(e){return t(e,n)}),Object.assign(n,nn(e))}(this.$root);t.setData(e)}},De.prototype.$handleProxyWithVue=function(t){var e=this.$root,n=t.type,r=t.target;void 0===r&&(r={});var o=(t.currentTarget||r).dataset;void 0===o&&(o={});var i=o.comkey;void 0===i&&(i="");var a=o.eventid,s=function(t,e){void 0===e&&(e=[]);var n=e.slice(1);return n.length?n.reduce(function(t,e){for(var n=t.$children.length,r=0;ri;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&D(t)})}},D=function(t){m.call(c,function(){var e,n,r,o=t._v,i=L(t);if(i&&(e=b(function(){S?$.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=S||L(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){m.call(c,function(){var e;S?$.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},I=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),T(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=M(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(I,r,1))}catch(t){I.call(r,t)}}):(n._v=t,n._s=1,T(n,!1))}catch(t){I.call({_w:n,_d:!1},t)}}};P||(k=function(t){d(this,k,"Promise","_h"),h(t),r.call(this);try{t(u(F,this,1),u(I,this,1))}catch(t){I.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("xH/j")(k.prototype,{then:function(t,e){var n=C(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(I,t,1)},_.f=C=function(t){return t===k||t===a?new i(t):o(t)}),p(p.G+p.W+p.F*!P,{Promise:k}),n("e6n0")(k,"Promise"),n("bRrM")("Promise"),a=n("FeBl").Promise,p(p.S+p.F*!P,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),p(p.S+p.F*(s||!P),"Promise",{resolve:function(t){return w(s&&this===a?k:this,t)}}),p(p.S+p.F*!(P&&n("dY0y")(function(t){k.all(t).catch(E)})),"Promise",{all:function(t){var e=this,n=C(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;v(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=C(e),r=n.reject,o=b(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},D2L2:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},EGZi:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},EqBC:function(t,e,n){"use strict";var r=n("kM2E"),o=n("FeBl"),i=n("7KvD"),a=n("t8x9"),s=n("fJUb");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},EqjI:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},FeBl:function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},Ibhu:function(t,e,n){var r=n("D2L2"),o=n("TcQ7"),i=n("vFc/")(!1),a=n("ax3d")("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},Kh2v:function(t,e,n){"use strict";var r={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("p",{staticClass:"card"},[this._v("\n "+this._s(this.text)+"\n ")])],1)},staticRenderFns:[]};e.a=r},L42u:function(t,e,n){var r,o,i,a=n("+ZMJ"),s=n("knuC"),c=n("RPLV"),u=n("ON07"),f=n("7KvD"),p=f.process,l=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},_=function(t){g.call(t.data)};l&&h||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n("R9M2")(p)?r=function(t){p.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:l,clear:h}},M6a0:function(t,e){},MU5D:function(t,e,n){var r=n("R9M2");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Mhyx:function(t,e,n){var r=n("/bQp"),o=n("dSzd")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},MmMw:function(t,e,n){var r=n("EqjI");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"NWt+":function(t,e,n){var r=n("+ZMJ"),o=n("msXi"),i=n("Mhyx"),a=n("77Pl"),s=n("QRG4"),c=n("3fs2"),u={},f={};(e=t.exports=function(t,e,n,p,l){var h,d,v,y,m=l?function(){return t}:c(t),g=r(n,p,e?2:1),_=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>_;_++)if((y=e?g(a(d=t[_])[0],d[1]):g(t[_]))===u||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===u||y===f)return y}).BREAK=u,e.RETURN=f},NYxO:function(t,e,n){"use strict";
2 | /**
3 | * vuex v3.0.1
4 | * (c) 2017 Evan You
5 | * @license MIT
6 | */var r=function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}},o="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}var a=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},s={namespaced:{configurable:!0}};s.namespaced.get=function(){return!!this._rawModule.namespaced},a.prototype.addChild=function(t,e){this._children[t]=e},a.prototype.removeChild=function(t){delete this._children[t]},a.prototype.getChild=function(t){return this._children[t]},a.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},a.prototype.forEachChild=function(t){i(this._children,t)},a.prototype.forEachGetter=function(t){this._rawModule.getters&&i(this._rawModule.getters,t)},a.prototype.forEachAction=function(t){this._rawModule.actions&&i(this._rawModule.actions,t)},a.prototype.forEachMutation=function(t){this._rawModule.mutations&&i(this._rawModule.mutations,t)},Object.defineProperties(a.prototype,s);var c=function(t){this.register([],t,!1)};c.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},c.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},c.prototype.update=function(t){!function t(e,n,r){0;n.update(r);if(r.modules)for(var o in r.modules){if(!n.getChild(o))return void 0;t(e.concat(o),n.getChild(o),r.modules[o])}}([],this.root,t)},c.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new a(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&i(e.modules,function(e,o){r.register(t.concat(o),e,n)})},c.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var u;var f=function(t){var e=this;void 0===t&&(t={}),!u&&"undefined"!=typeof window&&window.Vue&&g(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1);var i=t.state;void 0===i&&(i={}),"function"==typeof i&&(i=i()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new c(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new u;var a=this,s=this.dispatch,f=this.commit;this.dispatch=function(t,e){return s.call(a,t,e)},this.commit=function(t,e,n){return f.call(a,t,e,n)},this.strict=r,v(this,i,[],this._modules.root),d(this,i),n.forEach(function(t){return t(e)}),u.config.devtools&&function(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){o.emit("vuex:mutation",t,e)}))}(this)},p={state:{configurable:!0}};function l(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function h(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;v(t,n,[],t._modules.root,!0),d(t,n,e)}function d(t,e,n){var r=t._vm;t.getters={};var o={};i(t._wrappedGetters,function(e,n){o[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var a=u.config.silent;u.config.silent=!0,t._vm=new u({data:{$$state:e},computed:o}),u.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){0},{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit(function(){r._data.$$state=null}),u.nextTick(function(){return r.$destroy()}))}function v(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a]=r),!i&&!o){var s=y(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){u.set(s,c,r.state)})}var f=r.context=function(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=m(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=m(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach(function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return y(t.state,n)}}}),o}(t,a,n);r.forEachMutation(function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,r.state,e)})}(t,a+n,e,f)}),r.forEachAction(function(e,n){var r=e.root?n:a+n,o=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push(function(e,o){var i,a=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,o);return(i=a)&&"function"==typeof i.then||(a=Promise.resolve(a)),t._devtoolHook?a.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):a})}(t,r,o,f)}),r.forEachGetter(function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,f)}),r.forEachChild(function(r,i){v(t,e,n.concat(i),r,o)})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function m(t,e,n){var r;return null!==(r=t)&&"object"==typeof r&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function g(t){u&&t===u||r(u=t)}p.state.get=function(){return this._vm._data.$$state},p.state.set=function(t){0},f.prototype.commit=function(t,e,n){var r=this,o=m(t,e,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit(function(){c.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,r.state)}))},f.prototype.dispatch=function(t,e){var n=this,r=m(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s)return this._actionSubscribers.forEach(function(t){return t(a,n.state)}),s.length>1?Promise.all(s.map(function(t){return t(i)})):s[0](i)},f.prototype.subscribe=function(t){return l(t,this._subscribers)},f.prototype.subscribeAction=function(t){return l(t,this._actionSubscribers)},f.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},f.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},f.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),n.preserveState),d(this,this.state)},f.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=y(e.state,t.slice(0,-1));u.delete(n,t[t.length-1])}),h(this)},f.prototype.hotUpdate=function(t){this._modules.update(t),h(this,!0)},f.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(f.prototype,p);var _=$(function(t,e){var n={};return O(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=A(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0}),n}),b=$(function(t,e){var n={};return O(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=A(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}}),n}),x=$(function(t,e){var n={};return O(e).forEach(function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||A(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0}),n}),w=$(function(t,e){var n={};return O(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=A(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}}),n});function O(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function $(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function A(t,e,n){return t._modulesNamespaceMap[n]}var j={Store:f,install:g,version:"3.0.1",mapState:_,mapMutations:b,mapGetters:x,mapActions:w,createNamespacedHelpers:function(t){return{mapState:_.bind(null,t),mapGetters:x.bind(null,t),mapMutations:b.bind(null,t),mapActions:w.bind(null,t)}}};e.a=j},NpIQ:function(t,e){e.f={}.propertyIsEnumerable},O4g8:function(t,e){t.exports=!0},ON07:function(t,e,n){var r=n("EqjI"),o=n("7KvD").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},PzxK:function(t,e,n){var r=n("D2L2"),o=n("sB3e"),i=n("ax3d")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},QRG4:function(t,e,n){var r=n("UuGF"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},R4wc:function(t,e,n){var r=n("kM2E");r(r.S+r.F,"Object",{assign:n("To3L")})},R9M2:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},RPLV:function(t,e,n){var r=n("7KvD").document;t.exports=r&&r.documentElement},"RY/4":function(t,e,n){var r=n("R9M2"),o=n("dSzd")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},S82l:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},SfB7:function(t,e,n){t.exports=!n("+E39")&&!n("S82l")(function(){return 7!=Object.defineProperty(n("ON07")("div"),"a",{get:function(){return 7}}).a})},SldL:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,f=e.regeneratorRuntime;if(f)u&&(t.exports=f);else{(f=e.regeneratorRuntime=u?t.exports:{}).wrap=b;var p="suspendedStart",l="suspendedYield",h="executing",d="completed",v={},y={};y[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(P([])));g&&g!==r&&o.call(g,a)&&(y=g);var _=$.prototype=w.prototype=Object.create(y);O.prototype=_.constructor=$,$.constructor=O,$[c]=O.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===O||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,$):(t.__proto__=$,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(_),t},f.awrap=function(t){return{__await:t}},A(j.prototype),j.prototype[s]=function(){return this},f.AsyncIterator=j,f.async=function(t,e,n,r){var o=new j(b(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},A(_),_[c]="Generator",_[a]=function(){return this},_.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=P,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=p;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?d:l,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function O(){}function $(){}function A(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function j(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},a)}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++ru;)for(var l,h=s(arguments[u++]),d=f?r(h).concat(f(h)):r(h),v=d.length,y=0;v>y;)p.call(h,l=d[y++])&&(n[l]=h[l]);return n}:c},U5ju:function(t,e,n){n("M6a0"),n("zQR9"),n("+tPU"),n("CXw9"),n("EqBC"),n("jKW+"),t.exports=n("FeBl").Promise},UCfo:function(t,e,n){"use strict";var r=n("c1FY"),o=n("Kh2v");var i=function(t){n("84AC")},a=n("ybqe")(r.a,o.a,i,null,null);e.a=a.exports},UuGF:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},V3tA:function(t,e,n){n("R4wc"),t.exports=n("FeBl").Object.assign},X8DO:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},Xxa5:function(t,e,n){t.exports=n("jyFz")},Yobk:function(t,e,n){var r=n("77Pl"),o=n("qio6"),i=n("xnc9"),a=n("ax3d")("IE_PROTO"),s=function(){},c=function(){var t,e=n("ON07")("iframe"),r=i.length;for(e.style.display="none",n("RPLV").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("