hyapp-template
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "hyapp-template", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "mvvm", | ||
@@ -17,3 +17,4 @@ "author": "yangbin <yangb@2345.com>", | ||
"vue": "^2.5.2", | ||
"vue-router": "^3.0.1" | ||
"vue-router": "^3.0.1", | ||
"vuex": "^3.0.1" | ||
}, | ||
@@ -20,0 +21,0 @@ "devDependencies": { |
@@ -6,2 +6,4 @@ // The Vue build version to load with the `import` command | ||
import router from './router' | ||
import store from './store' | ||
import './errorLog' | ||
import hyappUI from 'hyapp-ui' | ||
@@ -23,4 +25,5 @@ import hyapp from 'hyapp-utils' | ||
router, | ||
store, | ||
components: { App }, | ||
template: '<App/>' | ||
}) |
@@ -19,5 +19,3 @@ /** | ||
modules: { | ||
home, | ||
// order, | ||
// contract | ||
home | ||
}, | ||
@@ -27,2 +25,2 @@ strict: process.env.NODE_ENV !== 'production' | ||
export default store | ||
export default store |
/** | ||
* @author yangbin | ||
* @date 2018/4/18 | ||
* @Description: 获取未确认/已确认订单数 未确认/已确认合同数 | ||
* @Description: 用户信息 | ||
*/ | ||
import {initGetNum, getListObj} from '../../api/controller/HelloWorld/index' | ||
import {loginHandle} from '../../api/controller/HelloWorld/index' | ||
// mutationsType | ||
const GET_NUMBERS = 'GET_NUMBERS' | ||
const GET_LIST = 'GET_LIST' | ||
const GET_USER = 'GET_USER' | ||
//state | ||
// state | ||
const state = { | ||
initNum: {}, | ||
listObj: [] | ||
userInfo: {} | ||
} | ||
@@ -20,21 +18,13 @@ | ||
const mutations = { | ||
[GET_NUMBERS] (state, params) { | ||
state.initNum = params | ||
}, | ||
[GET_LIST] (state, params) { | ||
state.listObj = JSON.parse(params) | ||
[GET_USER] (state, params) { | ||
state.userInfo = params | ||
} | ||
} | ||
//action | ||
// action | ||
const actions = { | ||
getNumberHandle({commit}) { | ||
initGetNum().then(rst => { | ||
commit(GET_NUMBERS, rst.data.data) | ||
getUserInfoHandle ({commit}) { | ||
loginHandle().then(rst => { | ||
commit(GET_USER, rst.data.data) | ||
}) | ||
}, | ||
getListObjHandle({commit}, params) { | ||
getListObj(params).then(rst => { | ||
commit(GET_LIST, rst.data.data) | ||
}) | ||
} | ||
@@ -44,7 +34,4 @@ } | ||
const getters = { | ||
getNums(state) { | ||
getUserInfo (state) { | ||
return state.initNum | ||
}, | ||
getLists(state) { | ||
return state.listObj | ||
} | ||
@@ -51,0 +38,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47964
3
949
17
+ Addedvuex@^3.0.1
+ Addedvuex@3.6.2(transitive)