Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -92,7 +92,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
remove () {
|
remove () {
|
||||||
this.$confirm('确定删除该相册?').then(() => {
|
this.$confirm('确定删除该相册?相册删除后,相册内的照片会同步删除!').then(() => {
|
||||||
this.$http.post(`/api/appalbum/delete?ids=${this.id}`).then(res => {
|
this.$http.post(`/api/appalbum/delete?ids=${this.id}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$u.toast('删除成功')
|
this.$u.toast('删除成功')
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<div class="message-item" v-for="(item, index) in 10" :key="index">
|
<div class="message-item" v-for="(item, index) in list" :key="index">
|
||||||
<h2>2022-2-14 10:02</h2>
|
<h2>{{ item.createTime }}</h2>
|
||||||
<div>您于2月13日发布的《打卡相册》的照片已被XXX查看</div>
|
<div>{{ item.msg }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -14,16 +15,83 @@
|
|||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
size: 15,
|
||||||
|
current: 1,
|
||||||
|
isMore: false,
|
||||||
|
list: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad () {
|
onLoad () {
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
mapType (type) {
|
||||||
|
return {
|
||||||
|
'0': '照片查看',
|
||||||
|
'1': '照片上传',
|
||||||
|
'2': '打卡统计'
|
||||||
|
}[type]
|
||||||
|
},
|
||||||
|
|
||||||
|
getList () {
|
||||||
|
if (this.isMore) return
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/api/sysmessage/list`, null, {
|
||||||
|
params: {
|
||||||
|
size: 10,
|
||||||
|
current: this.current
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (this.current > 1) {
|
||||||
|
this.list = [...this.list, ...res.data.records].map(v => {
|
||||||
|
let msg = v.content
|
||||||
|
if (v.channel === '2') {
|
||||||
|
msg = ''
|
||||||
|
JSON.parse(v.content).forEach((item, index) => {
|
||||||
|
msg = msg + `${item.key}:${item.value}人` + (JSON.parse(v.content).length === index + 1 ? '' : ',')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
msg,
|
||||||
|
typeName: this.mapType(v.channel)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.list = res.data.records.map(v => {
|
||||||
|
let msg = v.content
|
||||||
|
if (v.channel === '2') {
|
||||||
|
msg = ''
|
||||||
|
JSON.parse(v.content).forEach((item, index) => {
|
||||||
|
msg = msg + `${item.key}:${item.value}人` + (JSON.parse(v.content).length === index + 1 ? '' : ',')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
msg,
|
||||||
|
typeName: this.mapType(v.channel)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.data.records.length < 10) {
|
||||||
|
this.isMore = true
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.current = this.current + 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom () {
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="album-home" ref="home">
|
<div class="album-home" ref="home">
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<image src="https://pica.zhimg.com/v2-abed1a8c04700ba7d72b45195223e0ff_is.jpg?source=32738c0c" />
|
<image :src="$cdn + 'avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h2><AiOpenData v-if="user.wxOpenUserId" type="userName" :openid="user.wxOpenUserId"></AiOpenData></h2>
|
<h2><AiOpenData v-if="user.wxOpenUserId" type="userName" :openid="user.wxOpenUserId"></AiOpenData></h2>
|
||||||
<p>欢迎使用工作相册</p>
|
<p>欢迎使用工作相册</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user