AiCard #custom #menu
This commit is contained in:
@@ -8,27 +8,32 @@
|
||||
<u-search class="serach_content" placeholder="请输入公开标题" :show-action="false" v-model="keyword" @clear="clearSearch" @search="search"></u-search>
|
||||
|
||||
<template v-if="datas.length > 0">
|
||||
<u-card v-for="(item, index) in datas" :key="index" :foot-border-top="false" :head-border-bottom="false" :show-head="false" :border-radius="32" @click="goDetail(item, 1)">
|
||||
<view class="body" slot="body">
|
||||
<view class="u-body-item">
|
||||
<div class="title">{{ item.createUserName }}</div>
|
||||
</view>
|
||||
<AiCard v-for="(item, i) in datas" :key="i" @click.native="toAdd(item, 1)">
|
||||
<template #custom>
|
||||
<div class="title">{{ item.createUserName }}</div>
|
||||
|
||||
<view class="u-body-item">
|
||||
<div class="flex">
|
||||
<span class="left">
|
||||
<span class="garydiv">财务公开</span>
|
||||
<span class="times">2021-12-16</span>
|
||||
</span>
|
||||
<div class="flex">
|
||||
<span class="left">
|
||||
<span class="garydiv">财务公开</span>
|
||||
<span class="times">2021-12-16</span>
|
||||
</span>
|
||||
|
||||
<span class="right">
|
||||
<span class="font">1111</span>
|
||||
<span>人看过</span>
|
||||
</span>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</u-card>
|
||||
<span class="right">
|
||||
<span class="font">1111</span>
|
||||
<span>人看过</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="imgs">
|
||||
<!-- <img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" @click.stop="previewImage(item.images, items.url)" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #menu>
|
||||
<div class="menu" @tap.stop="toAdd(item, 2)">编辑</div>
|
||||
<div class="menu" @tap.stop="toDetele(item)">删除</div>
|
||||
</template>
|
||||
</AiCard>
|
||||
|
||||
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
|
||||
</template>
|
||||
@@ -38,6 +43,8 @@
|
||||
<AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
|
||||
</AiFixedBtn>
|
||||
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -57,6 +64,8 @@ export default {
|
||||
current: 1,
|
||||
size: 10,
|
||||
pages: 0,
|
||||
deletShow: false,
|
||||
deletId: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -92,20 +101,37 @@ export default {
|
||||
},
|
||||
|
||||
areaSelect(e) {
|
||||
if (e.type == 5) {
|
||||
this.areaId = e.id
|
||||
} else {
|
||||
return this.$u.toast('请选择到村')
|
||||
}
|
||||
this.areaId = e.id
|
||||
this.getList()
|
||||
},
|
||||
|
||||
goDetail(item) {
|
||||
uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
toAdd(item, type) {
|
||||
if (type == '1') {
|
||||
console.log('详情')
|
||||
uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
}
|
||||
if (type == '2') {
|
||||
console.log('编辑')
|
||||
uni.navigateTo({ url: `./Add?id=${item.id}` })
|
||||
}
|
||||
if (type == null) {
|
||||
console.log('添加')
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
}
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
},
|
||||
|
||||
delet() {
|
||||
this.$http.post(`/app/appvisitvondolence/delete?ids=${this.deletId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -135,45 +161,58 @@ uni-page-body {
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.u-card {
|
||||
::v-deep .u-card__body {
|
||||
.body {
|
||||
position: relative;
|
||||
.u-body-item {
|
||||
.title {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16px;
|
||||
::v-deep .AiCard {
|
||||
background: #f3f6f9;
|
||||
.start {
|
||||
background: #fff;
|
||||
padding: 32px;
|
||||
border-radius: 16px;
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left {
|
||||
.garydiv {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
background: #eeeeee;
|
||||
border-radius: 24px;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left {
|
||||
.garydiv {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
background: #eeeeee;
|
||||
border-radius: 24px;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
.times {
|
||||
margin-left: 16px;
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.times {
|
||||
margin-left: 16px;
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
.font {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
.font {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mask {
|
||||
.moreMenu {
|
||||
.menu {
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.AiFixedBtn {
|
||||
|
||||
Reference in New Issue
Block a user