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) {