|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="attachment-open">
|
|
|
+ <view class="attachment-open" v-show="isLock">
|
|
|
<view class="open-data sys-background-yellow sys-radius-200">
|
|
|
<image class="open-img" src="/static/img/common/lock.png" mode="aspectFill"></image>
|
|
|
<view class="open-text sys-color-black sys-weight-500" >立即解锁</view>
|
|
@@ -34,13 +34,16 @@ import tools from "@/service/tools";
|
|
|
export default {
|
|
|
name: "attachment-list",
|
|
|
components: {},
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
page:1,
|
|
|
total:undefined,
|
|
|
isAjax:false,
|
|
|
list:[],
|
|
|
+ isLock:false
|
|
|
}
|
|
|
},
|
|
|
watch: {},
|
|
@@ -48,22 +51,45 @@ export default {
|
|
|
this.getAttachmentList()
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
async getAttachmentList(){
|
|
|
+ if(this.isLock && this.page>1 ){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.total<=this.list.length){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.isAjax){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.isAjax=true
|
|
|
let locationData=await tools.getLocation()
|
|
|
getNearbyList({'pageNo':this.page,'pageSize':20,'longitude':locationData.longitude,'latitude':locationData.latitude}).then((res)=>{
|
|
|
+ this.isAjax=false
|
|
|
if(res.code===0){
|
|
|
-
|
|
|
+ this.page++
|
|
|
+ this.total=res.total
|
|
|
+ res.data.data.forEach( (item)=>{
|
|
|
+ let galleryUrls=item.galleryUrls
|
|
|
+ let age=tools.getAge(item.dateOfBirth)
|
|
|
+ if(galleryUrls.length>0){
|
|
|
+ if(galleryUrls.length>8){
|
|
|
+ galleryUrls=galleryUrls.slice(0,7)
|
|
|
+ }
|
|
|
+ let newdata = {
|
|
|
+ img: galleryUrls[0],
|
|
|
+ age: age,
|
|
|
+ name: item.nickname,
|
|
|
+ userId: item.userId,
|
|
|
+ sex: '女',
|
|
|
+ constellation: '处女座',
|
|
|
+ }
|
|
|
+ this.list.push(newdata)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- let list=[
|
|
|
- {'name':'仰看辉煌仰看辉煌仰看辉煌仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/1.png'},
|
|
|
- {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/2.png'},
|
|
|
- {'name':'仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/3.png'},
|
|
|
- {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/1.png'},
|
|
|
- {'name':'仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/2.png'},
|
|
|
- {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/3.png'},
|
|
|
- ];
|
|
|
- this.list.push(...list)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -128,7 +154,7 @@ export default {
|
|
|
.attachment-open{
|
|
|
position: fixed;
|
|
|
left: 0;
|
|
|
- bottom: 0;
|
|
|
+ bottom: 80rpx;
|
|
|
width: 100vw;
|
|
|
height: 190rpx;
|
|
|
background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
|