diff --git a/nxTemp/store/index.js b/nxTemp/store/index.js index 48444d7..a5abb56 100644 --- a/nxTemp/store/index.js +++ b/nxTemp/store/index.js @@ -6,13 +6,15 @@ const files = require.context("./modules", false, /\.js$/); let modules = { state: {}, mutations: {}, - actions: {} + actions: {}, + getters:{} }; files.keys().forEach((key) => { Object.assign(modules.state, files(key)["state"]); Object.assign(modules.mutations, files(key)["mutations"]); - Object.assign(modules.actions, files(key)["actions"]); + Object.assign(modules.actions, files(key)["actions"]); + Object.assign(modules.getters, files(key)["getters"]); }); const store = new Vuex.Store(modules); export default store; diff --git a/pages.json b/pages.json index be4c76c..54f1c82 100644 --- a/pages.json +++ b/pages.json @@ -124,7 +124,7 @@ "list": [ { "name": "登录页面", //模式名称 - "path": "pages/login/login", //启动页面,必选 + "path": "pages/index/index", //启动页面,必选 "query": "" //启动参数,在页面的onLoad函数里面得到 } ] diff --git a/pages/index/index.vue b/pages/index/index.vue index 8f021b6..1b493aa 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -18,9 +18,9 @@ - + - 活动赛事 + 活动赛事{{hasLogin}}+{{userInfo.mobile}} @@ -32,19 +32,20 @@