对部分影响追剧页面展示的请求进行额外处理
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user