From 658f070cc1fc4744f8de041635471e8af009dd04 Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Tue, 4 Apr 2023 10:40:11 +0800 Subject: [PATCH] =?UTF-8?q?a1300399510@qq.com=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8E=202023/04/04=20-10:40:02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 10 +++------- src/views/detail/detailIndex.vue | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 1436046..4d0314f 100755 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -22,7 +22,8 @@ const service = axios.create({ service.interceptors.request.use(config => { //发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加 //注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie - // console.log(config, "config"); + console.log(config, "config"); + config['baseURL'] = "https://offer.gter.net/details/iem04u0WK0mH" config['headers']['authorization'] = "qj2q1qk1on0curclipghjtv5ja1g9eq2" return config }, error => { @@ -52,8 +53,7 @@ service.interceptors.response.use(response => { error.message = '拒绝访问' break; case 404: - // error.message = '请求错误,未找到该资源' - // window.location.href = "/NotFound" + error.message = '请求错误,未找到该资源' break; case 405: error.message = '请求方法未允许' @@ -121,7 +121,3 @@ const http = { } // 导出 export default http - - -//4.导入文件 -// export default service diff --git a/src/views/detail/detailIndex.vue b/src/views/detail/detailIndex.vue index 51ebac9..c18f51f 100755 --- a/src/views/detail/detailIndex.vue +++ b/src/views/detail/detailIndex.vue @@ -7,15 +7,15 @@ {{ info.views }}
- {{ info.replies }} + {{ info.replies }}
-
精华
-
{{info.typename}}
- {{info.subject}} +
精华
+
{{ info.typename }}
+ {{ info.subject }}
@@ -291,7 +291,7 @@ export default { }, methods: { - + // 获取详细信息 getDetail() { this.$http.post("/api/thread", { @@ -304,10 +304,17 @@ export default { this.type = data.type this.token = data.token - + if (this.type == 6) { + this.getOfferDetail() + } }) }, + // 获取offer详情 + getOfferDetail() { + + }, + // 点击点赞 tapLike() {