135 lines
4.4 KiB
HTML
135 lines
4.4 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.van-doc-card {
|
|
margin: 14px;
|
|
padding: 6px;
|
|
background-color: #fff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
line-height: 25px;
|
|
font-size: 12px;
|
|
}
|
|
.van-cell {
|
|
padding: 4px 16px;
|
|
}
|
|
.van-cell-group--inset {
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
|
|
<m-page-loading v-if="mLoading"></m-page-loading>
|
|
|
|
<van-nav-bar title="我收到的祝福" left-arrow placeholder fixed
|
|
@click-left="history.back()"></van-nav-bar>
|
|
|
|
<div class="search-fixed">
|
|
<van-search
|
|
v-model="pageForm.username"
|
|
shape="round"
|
|
maxlength="10"
|
|
@search="doSearch"
|
|
placeholder="请输入教职工姓名进行查询"
|
|
>
|
|
</van-search>
|
|
</div>
|
|
|
|
<div style="margin-top: 70px">
|
|
<van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''"
|
|
@load="onLoad">
|
|
|
|
<div v-for="o in giftInfo" :key="o.id" class="van-doc-card">
|
|
<div>
|
|
<div style="font-size: 15px;
|
|
font-weight: bold;
|
|
flex: 1;
|
|
margin-left: 15px;
|
|
overflow: hidden;
|
|
white-space: nowrap;">
|
|
<span style="color: #3ea1ec">{{o.username}}</span>
|
|
<span style="color: #3ea1ec">|</span>
|
|
<span style="font-size: 10px;font-weight: normal;color: #a0a1a1">{{o.name}}</span>
|
|
</div>
|
|
</div>
|
|
<div style="font-size: 10px">
|
|
<van-cell-group inset >
|
|
<van-cell :border="false" title="赠送日期">{{o.giftTime}}</van-cell>
|
|
<van-cell :border="false" title="祝福语">
|
|
<span v-if="o.message.length==0">无</span>
|
|
<span v-if="o.message.length>0">{{o.message}}</span>
|
|
</van-cell>
|
|
<van-cell :border="false" title="生日贺卡" @click="showHk(o)"
|
|
v-if="o.isSend==1" is-link value="点击展示"></van-cell>
|
|
<van-cell :border="false" title="赠送礼物">
|
|
<van-image style="width: 50px;height: 50px" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
|
</van-cell>
|
|
</van-cell-group>
|
|
</div>
|
|
</div>
|
|
|
|
</van-list>
|
|
<van-empty
|
|
v-if="mLoading==false&&giftInfo.length==0"
|
|
class="custom-image"
|
|
image="/none.svg"
|
|
description="暂无数据"
|
|
></van-empty>
|
|
</div>
|
|
|
|
</div>
|
|
<script>
|
|
new Vue({
|
|
el:'#app',
|
|
mixins: [mobileMixins],
|
|
data(){
|
|
return{
|
|
show: false,
|
|
images:'',
|
|
giftInfo:[],
|
|
}
|
|
},
|
|
methods:{
|
|
doSearch(){
|
|
this.pageForm.pageNumber = 1
|
|
this.giftInfo = []
|
|
this.finished = false
|
|
this.onLoad()
|
|
},
|
|
async onLoad() {
|
|
this.mLoading = true
|
|
const res = await $.post('/mobile/birthday/greeting/giftInfo', this.pageForm)
|
|
this.mLoading = false
|
|
if (res.code === 0) {
|
|
res.data.list.forEach(v => {
|
|
if(!(typeof v.files =='object')){
|
|
v.files = JSON.parse(v.files)
|
|
}
|
|
})
|
|
this.giftInfo = this.giftInfo.concat(res.data.list)
|
|
if (this.giftInfo.length >= res.data.totalCount) {
|
|
this.finished = true
|
|
} else {
|
|
this.pageForm.pageNumber++
|
|
}
|
|
}
|
|
},
|
|
showGift(data){
|
|
vant.ImagePreview([data])
|
|
},
|
|
showHk(o){
|
|
window.location.href='/mobile/birthday/greeting/hk?id='+o.id
|
|
},
|
|
},
|
|
created(){
|
|
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|