From 8cef73f504fda452f4882fad0aec3c1fdb0880ba Mon Sep 17 00:00:00 2001
From: "SD-20230427NBFT\\Administrator" <609306725@qq.com>
Date: Thu, 1 Aug 2024 18:27:15 +0800
Subject: [PATCH] 111
---
pagesA/photo/photo_1.vue | 61 ++++++++++++++++++++--------------------
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/pagesA/photo/photo_1.vue b/pagesA/photo/photo_1.vue
index 289fca7..f0bcf6e 100644
--- a/pagesA/photo/photo_1.vue
+++ b/pagesA/photo/photo_1.vue
@@ -41,7 +41,7 @@
@@ -84,7 +84,9 @@
curPage: 0,
total: 0,
- temList:[]
+ temList:[],
+ root:''
+
}
},
@@ -96,6 +98,7 @@
onLoad(){
this.getList();
+ this.root = this.$api.getOssurl();
},
methods: {
@@ -130,48 +133,46 @@
let that = this;
setTimeout(function(){
that.getList();
- },1000)
+ },500)
},
- getListData(){
- let list = [];
- let n= 0;
- for(n=0;n<10;n++){
- let t = {};
- t.url = 'https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg'
- t.id = '123';
- t.title = '哈哈哈哈哈哈哈哈哈哈或或或哈哈哈哈哈哈哈哈哈哈或或或';
- list.push(t);
- }
-
- return {total:32,list:list};
- },
getList(){
+ let sex = '';
+ if(this.this_tab == 0){
+ sex =2;
+ }else{
+ sex =1;
+ }
let params = {
page: this.curPage + 1,
limit: 10,
- sex: this.this_tab,
- text:this.search_text
+ type: sex,
+ title:this.search_text
};
- let res = this.getListData();
-
-
- this.curPage = params.page;
- this.total = res.total;
+ let that = this;
- let datas = [...this.temList];
+ this.$api.get('/api/album/list',params,function(rs){
+ that.curPage = rs.current_page;
+ that.total = rs.total;
+
+ let datas = [...that.temList];
+
+ if (params.page > 1) {
+ datas.push(...rs.data)
+ } else {
+ datas = rs.data;
+ }
+
+ that.temList = datas;
+
+ })
- if (params.page > 1) {
- datas.push(...res.list)
- } else {
- datas = res.list;
- }
+
- this.temList = datas;
},
goThis(id){