From d12f35e078bbb40a152336a0490f776fc7415ba8 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 30 Dec 2024 17:36:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=83=A8=E5=88=86=E5=BD=B1=E5=93=8D?= =?UTF-8?q?=E8=BF=BD=E5=89=A7=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E8=BF=9B=E8=A1=8C=E9=A2=9D=E5=A4=96=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/httpRequest.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/httpRequest.js b/common/httpRequest.js index 3683f5b..9adb7c2 100644 --- a/common/httpRequest.js +++ b/common/httpRequest.js @@ -1,8 +1,13 @@ import configdata from './config' import cache from './cache' import { - cacheClearAll + cacheClearAll,cacheClear } from '@/store/cashe.js' +function successCallBack(url){ + if(url.includes('app/courseCollect/insertCourseCollect')){ + cacheClear('chasingDrama') + } +} module.exports = { config: function(name) { var info = null; @@ -24,7 +29,6 @@ module.exports = { } } } - console.log(info); return info; }, logout: function() { @@ -152,7 +156,11 @@ module.exports = { success: function(result) { if (result.data.code == 401) { that.logout(); + }else{ + successCallBack(url) + // cacheClear('chasingDrama') } + succ.call(self, result.data) }, fail: function(e) { @@ -186,7 +194,6 @@ module.exports = { let that = this; header = header || "application/x-www-form-urlencoded"; url = that.config("APIHOST1") + url.replace(/^\//, ""); - console.log(url); // let token = uni.getStorageSync("token"); let token = uni.getStorageSync("token"); if (token) {