From 5de5bdfb26dd25f853f89a62f634d2b1c46b034f Mon Sep 17 00:00:00 2001 From: CTP <630182278@qq.com> Date: Tue, 9 May 2023 23:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5vuex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 18 ++++++++++-------- src/pages/information/index.vue | 1 + src/pages/verify/index.vue | 5 ++--- src/store/index.js | 12 ++++++++++++ 4 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 src/store/index.js diff --git a/src/main.js b/src/main.js index 20883fb..7298c2a 100644 --- a/src/main.js +++ b/src/main.js @@ -1,12 +1,14 @@ -import Vue from 'vue' -import App from './App' -import './uni.promisify.adaptor' +import Vue from 'vue'; +import App from './App'; +import './uni.promisify.adaptor'; +import store from './store'; -Vue.config.productionTip = false +Vue.config.productionTip = false; -App.mpType = 'app' +App.mpType = 'app'; const app = new Vue({ - ...App -}) -app.$mount() + store, //引入vuex + ...App, +}); +app.$mount(); diff --git a/src/pages/information/index.vue b/src/pages/information/index.vue index 198b2cd..3b96eb5 100644 --- a/src/pages/information/index.vue +++ b/src/pages/information/index.vue @@ -50,6 +50,7 @@ export default { }; }, methods: {}, + onLoad() {}, };