JING 10 months ago
commit f40222e4b9
  1. 57
      pagesA/photo/photo_1.vue

@ -41,7 +41,7 @@
<view class="photo_list_div_one_img" > <view class="photo_list_div_one_img" >
<image <image
:src="item.url" :src="root+item.back_image"
mode="aspectFill" /> mode="aspectFill" />
</view> </view>
<view class="photo_list_div_one_text"> <view class="photo_list_div_one_text">
@ -84,7 +84,9 @@
curPage: 0, curPage: 0,
total: 0, total: 0,
temList:[] temList:[],
root:''
} }
}, },
@ -96,6 +98,7 @@
onLoad(){ onLoad(){
this.getList(); this.getList();
this.root = this.$api.getOssurl();
}, },
methods: { methods: {
@ -130,48 +133,46 @@
let that = this; let that = this;
setTimeout(function(){ setTimeout(function(){
that.getList(); 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(){ getList(){
let sex = '';
if(this.this_tab == 0){
sex =2;
}else{
sex =1;
}
let params = { let params = {
page: this.curPage + 1, page: this.curPage + 1,
limit: 10, limit: 10,
sex: this.this_tab, type: sex,
text:this.search_text title:this.search_text
}; };
let res = this.getListData(); let that = this;
this.$api.get('/api/album/list',params,function(rs){
that.curPage = rs.current_page;
that.total = rs.total;
this.curPage = params.page; let datas = [...that.temList];
this.total = res.total;
if (params.page > 1) {
datas.push(...rs.data)
} else {
datas = rs.data;
}
that.temList = datas;
})
let datas = [...this.temList];
if (params.page > 1) {
datas.push(...res.list)
} else {
datas = res.list;
}
this.temList = datas;
}, },
goThis(id){ goThis(id){

Loading…
Cancel
Save