diff --git a/package.json b/package.json index 20d028e..a599f93 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "axios": "^0.19.0", "babel-plugin-import": "^1.12.2", "core-js": "^3.3.2", "node-sass": "^4.13.0", diff --git a/src/Answer.vue b/src/Answer.vue new file mode 100644 index 0000000..c508904 --- /dev/null +++ b/src/Answer.vue @@ -0,0 +1,165 @@ + + + \ No newline at end of file diff --git a/src/index.vue b/src/index.vue index fc65de1..e4db1d7 100644 --- a/src/index.vue +++ b/src/index.vue @@ -32,6 +32,9 @@ export default { components: { list, heads + }, + mounted(){ + this.axios.get("") } }; \ No newline at end of file diff --git a/src/main.js b/src/main.js index 67d80d5..f6435f1 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,9 @@ import router from "./router" import { Popup } from 'vant'; Vue.use(Popup); Vue.config.productionTip = false - +import axios from "axios" +axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; +Vue.prototype.axios = axios new Vue({ render: h => h(App), router diff --git a/src/router.js b/src/router.js index 80f2e5b..6063fe5 100644 --- a/src/router.js +++ b/src/router.js @@ -11,6 +11,7 @@ import IndexArticleDetail from "./IndexArticleDetail" import login from "./login" import loginpwd from "./loginpwd" import indexfind from "./IndexFind" +import Answer from "./Answer" const router=new Router({ routes: [ { @@ -41,6 +42,11 @@ const router=new Router({ path: '/PersonalHomepage', component: PersonalHomepage } + , + { + path: '/Answer', + component: Answer + } ] }); diff --git a/yarn.lock b/yarn.lock index af9b91c..c06d2dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1516,6 +1516,14 @@ aws4@^1.8.0: resolved "https://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8= +axios@^0.19.0: + version "0.19.0" + resolved "https://registry.npm.taobao.org/axios/download/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" + integrity sha1-jgm/89kSLhM/e4EByPvdAO09Krg= + dependencies: + follow-redirects "1.5.10" + is-buffer "^2.0.2" + babel-eslint@^10.0.3: version "10.0.3" resolved "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a" @@ -2701,6 +2709,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" +debug@=3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE= + dependencies: + ms "2.0.0" + debug@^3.0.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -3614,6 +3629,13 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio= + dependencies: + debug "=3.1.0" + follow-redirects@^1.0.0: version "1.9.0" resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" @@ -4437,6 +4459,11 @@ is-buffer@^1.1.5: resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha1-76ouqdqg16suoTqXsritUf776L4= +is-buffer@^2.0.2: + version "2.0.4" + resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha1-PlcvI8hBGlz9lVfISeNmXgspBiM= + is-callable@^1.1.4: version "1.1.4" resolved "https://registry.npm.taobao.org/is-callable/download/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"