乡村相册

This commit is contained in:
yanran200730
2022-05-18 18:06:39 +08:00
parent 5e92053f60
commit ddc813efd1
18 changed files with 746 additions and 574 deletions

View File

@@ -10,11 +10,11 @@
<div class="album-total">
<div class="album-total__item">
<span>今日拍照人数</span>
<i>5</i>
<i>{{ countPhotographer || 0 }}</i>
</div>
<div class="album-total__item">
<span>今日拍照数量</span>
<i>5</i>
<i>{{ countPhotoNo || 0 }}</i>
</div>
</div>
<div class="album-operate">
@@ -45,11 +45,11 @@
<div class="album-list">
<h2>工作相册</h2>
<div class="album-list__wrapper">
<div class="item" v-for="(item, index) in 3" :key="index" @click="linkTo('./AlbumDetail')">
<div class="item" v-for="(item, index) in list" :key="index" @click="linkTo('./AlbumDetail?id=' + item.id)">
<span>未查看</span>
<image src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fa50994a01ff415294729ac6e0623845~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?" />
<div class="item-bottom">
<h2>工作相册</h2>
<h2>{{ item.albumName }}</h2>
<div class="item-bottom__info">
<div class="left">
<span>今日新增</span>
@@ -69,7 +69,6 @@
</div>
</div>
</div>
<img :src="src">
</div>
</template>
@@ -79,12 +78,15 @@
data () {
return {
src: ''
countPhotoNo: '',
countPhotographer: '',
list: []
}
},
onLoad () {
mounted () {
this.getCountPhotoNo()
this.getAlbumList()
},
methods: {
@@ -94,6 +96,31 @@
})
},
getCountPhotoNo () {
this.$http.post('/api/appalbumphoto/countPhotoNo').then(res => {
if (res.code === 0) {
this.countPhotoNo = res.data
}
})
this.$http.post('/api/appalbumphoto/countPhotographer').then(res => {
if (res.code === 0) {
this.countPhotographer = res.data
}
})
},
getAlbumList () {
this.$http.post('/api/appalbum/list', null, {
parmas: {
size: 100
}
}).then(res => {
if (res.code === 0) {
this.list = res.data.records
}
})
},
addPhoto () {
uni.chooseImage({
count: 1,