From 843fce64ee0c83315d91d4feea9a44d67b4809ff Mon Sep 17 00:00:00 2001 From: wulunyi Date: Sun, 10 May 2020 13:48:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(master):=20=E5=8A=A0=E5=85=A5=20vuex=20?= =?UTF-8?q?=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/App.vue | 4 +- src/main.js | 17 +++++++ src/main.ts | 18 -------- src/pages/addArddess/addArddess.vue | 2 +- src/pages/index/index.vue | 92 ++++++++++++++++++++----------------- src/pages/myOrder/myOrder.vue | 10 ++-- src/store/index.js | 24 ++++++++++ src/store/modules/test.js | 41 +++++++++++++++++ 9 files changed, 142 insertions(+), 67 deletions(-) create mode 100644 src/main.js delete mode 100644 src/main.ts create mode 100644 src/store/index.js create mode 100644 src/store/modules/test.js diff --git a/.gitignore b/.gitignore index 908df90..b2cc0a4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ unpackage/ dist/ +.history # local env files .env.local diff --git a/src/App.vue b/src/App.vue index 078c0d0..a789f9f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,7 @@ console.log('App Launch') }, onShow() { - + console.log('App Show') }, onHide() { @@ -17,4 +17,4 @@ + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..d743e22 --- /dev/null +++ b/src/main.js @@ -0,0 +1,17 @@ +import Vue from 'vue' +import App from './App.vue' +import store from './store/index' + +Vue.config.productionTip = false +Vue.prototype.sendRequest = function(param){ + let _self = this, + url = param.url, + data = param.data, + header = param.header, + token = ''; + //拼接完整请求url + let requestUrl = this.baseUrl + url; +} + + +new App({store}).$mount() diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index c297f79..0000000 --- a/src/main.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' - - -Vue.config.productionTip = false -Vue.prototype.sendRequest = function(param:any){ - let _self = this, - url = param.url, - data = param.data, - header = param.header, - token = ''; - //拼接完整请求url - let requestUrl = this.baseUrl + url; - - - -} -new App().$mount() diff --git a/src/pages/addArddess/addArddess.vue b/src/pages/addArddess/addArddess.vue index 565c241..1a1847e 100644 --- a/src/pages/addArddess/addArddess.vue +++ b/src/pages/addArddess/addArddess.vue @@ -30,7 +30,7 @@