修改用户搜索部分代码问题,删去日期cookie记录
This commit is contained in:
parent
639bcd4848
commit
6be1272d04
|
|
@ -1,6 +1,6 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import router from "@/router/index.js";
|
import router from "@/router/index.js";
|
||||||
const baseURL = "https://gep.ljsea.top/";
|
const baseURL = "https://gep.ljsea.xyz/";
|
||||||
//const baseURL= "http://localhost:8082";
|
//const baseURL= "http://localhost:8082";
|
||||||
const request = axios.create({
|
const request = axios.create({
|
||||||
baseURL: baseURL,
|
baseURL: baseURL,
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,8 @@ export default {
|
||||||
if (localStorage.getItem("token") === null) {
|
if (localStorage.getItem("token") === null) {
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}
|
}
|
||||||
this.search_id = Cookies.get("search_id")?cookies.get("search_id"):2002;
|
this.search_id = Cookies.get("search_id")?Cookies.get("search_id"):2002;
|
||||||
this.keyword = Cookies.get("keyword")?cookies.get("keyword"):"";
|
this.keyword = Cookies.get("keyword")?Cookies.get("keyword"):"";
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import axios from "axios";
|
||||||
import { getVideoListService, quashVideoService } from "@/api/video.js";
|
import { getVideoListService, quashVideoService } from "@/api/video.js";
|
||||||
import { delayVideoService } from "@/api/video.js";
|
import { delayVideoService } from "@/api/video.js";
|
||||||
import router from "@/router/index.js";
|
import router from "@/router/index.js";
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -31,15 +32,18 @@ export default {
|
||||||
async getVideoList() {
|
async getVideoList() {
|
||||||
let result = {};
|
let result = {};
|
||||||
try {
|
try {
|
||||||
if(this.tokenData.entrydate.length > 0) {
|
// console.log("this entrydate:", this.tokenData.entrydate[0]);
|
||||||
Cookies.set("entrydate", this.tokenData.entrydate);
|
// console.log("type time:",typeof this.tokenData.entrydate[0])
|
||||||
}
|
// if(this.tokenData.entrydate.length > 0) {
|
||||||
|
// // get the date from the date picker
|
||||||
|
// Cookies.set("entrydate", [this.tokenData.entrydate[0], this.tokenData.entrydate[1]]);
|
||||||
|
// }
|
||||||
result = await getVideoListService(this.tokenData);
|
result = await getVideoListService(this.tokenData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
let data = result.data;
|
let data = result.data;
|
||||||
let len = data.length;
|
let len = data?data.length:0;
|
||||||
|
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
//this.file_sum_size += parseFloat(data[i].file_size);
|
//this.file_sum_size += parseFloat(data[i].file_size);
|
||||||
|
|
@ -208,7 +212,11 @@ export default {
|
||||||
}
|
}
|
||||||
// console.log("mounted");
|
// console.log("mounted");
|
||||||
await this.getIpClient();
|
await this.getIpClient();
|
||||||
this.tokenData.entrydate = Cookies.get("entrydate")? Cookies.get("entrydate"): [];
|
// if( Cookies.get("entrydate")){
|
||||||
|
// console.log("entrydate:",Cookies.get("entrydate"));
|
||||||
|
// this.tokenData.entrydate = [Object(Cookies.get("entrydate")[0]),Object(Cookies.get("entrydate")[1])];
|
||||||
|
// }
|
||||||
|
|
||||||
this.getVideoList();
|
this.getVideoList();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue