Browse Source

fix issue

tags/v1.22.4.1^2
zhoupzh 3 years ago
parent
commit
7a1e0afd5a
1 changed files with 0 additions and 9 deletions
  1. +0
    -9
      web_src/js/components/images/Images.vue

+ 0
- 9
web_src/js/components/images/Images.vue View File

@@ -539,7 +539,6 @@ export default {
this.$axios.get('/explore/images/public',{ this.$axios.get('/explore/images/public',{
params:this.paramsPublic params:this.paramsPublic
}).then((res)=>{ }).then((res)=>{
console.log("res",res.data)
this.totalNumPublic = res.data.count this.totalNumPublic = res.data.count
this.tableDataPublic = res.data.images this.tableDataPublic = res.data.images
this.loadingPublic = false this.loadingPublic = false
@@ -551,7 +550,6 @@ export default {
this.$axios.get('/explore/images/custom',{ this.$axios.get('/explore/images/custom',{
params:this.paramsCustom params:this.paramsCustom
}).then((res)=>{ }).then((res)=>{
console.log("res",res)
this.totalNumCustom = res.data.count this.totalNumCustom = res.data.count
this.tableDataCustom = res.data.images this.tableDataCustom = res.data.images
this.tableDataCustom.forEach(element => { this.tableDataCustom.forEach(element => {
@@ -567,7 +565,6 @@ export default {
this.$axios.get('/explore/images/star',{ this.$axios.get('/explore/images/star',{
params:this.paramsStar params:this.paramsStar
}).then((res)=>{ }).then((res)=>{
console.log("res",res)
this.totalNumStar = res.data.count this.totalNumStar = res.data.count
this.tableDataStar = res.data.images this.tableDataStar = res.data.images
this.loadingStar = false this.loadingStar = false
@@ -575,7 +572,6 @@ export default {
}, },


deleteImage(id){ deleteImage(id){
console.log("deleteImage")
let flag=1 let flag=1
let _this = this let _this = this
$('.ui.basic.modal.images') $('.ui.basic.modal.images')
@@ -585,7 +581,6 @@ export default {
}, },
onApprove: function() { onApprove: function() {
_this.$axios.delete('/image/'+id).then((res)=>{ _this.$axios.delete('/image/'+id).then((res)=>{
console.log(res)
_this.getImageListCustom() _this.getImageListCustom()
}) })
flag = true flag = true
@@ -606,7 +601,6 @@ export default {
imageStar(index,id,isStar){ imageStar(index,id,isStar){
if(isStar){ if(isStar){
this.$axios.put(`/image/${id}/action/unstar`).then((res)=>{ this.$axios.put(`/image/${id}/action/unstar`).then((res)=>{
console.log(res)
if(res.data.Code==0){ if(res.data.Code==0){
this.tableDataPublic[index].numStars = this.tableDataPublic[index].numStars - 1 this.tableDataPublic[index].numStars = this.tableDataPublic[index].numStars - 1
this.tableDataPublic[index].isStar = false this.tableDataPublic[index].isStar = false
@@ -617,7 +611,6 @@ export default {
}) })
}else{ }else{
this.$axios.put(`/image/${id}/action/star`).then((res)=>{ this.$axios.put(`/image/${id}/action/star`).then((res)=>{
console.log(res)
if(res.data.Code==0){ if(res.data.Code==0){
this.tableDataPublic[index].numStars = this.tableDataPublic[index].numStars + 1 this.tableDataPublic[index].numStars = this.tableDataPublic[index].numStars + 1
this.tableDataPublic[index].isStar = true this.tableDataPublic[index].isStar = true
@@ -679,7 +672,6 @@ export default {
} }
}, },
transformTimestamp(timestamp){ transformTimestamp(timestamp){
// let a = new Date(timestamp).getTime();
const date = new Date(parseInt(timestamp) * 1000); const date = new Date(parseInt(timestamp) * 1000);
const Y = date.getFullYear() + '-'; const Y = date.getFullYear() + '-';
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
@@ -688,7 +680,6 @@ export default {
const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes()) + ':' ; const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes()) + ':' ;
const s = (date.getSeconds() <10 ? '0'+date.getSeconds() : date.getSeconds()) ; // 秒 const s = (date.getSeconds() <10 ? '0'+date.getSeconds() : date.getSeconds()) ; // 秒
const dateString = Y + M + D + h + m + s; const dateString = Y + M + D + h + m + s;
// console.log('dateString', dateString); // > dateString 2021-07-06 14:23
return dateString; return dateString;
}, },
}, },


Loading…
Cancel
Save