87 lines
1.7 KiB
Vue
87 lines
1.7 KiB
Vue
|
|
<template>
|
|||
|
|
<view class="content">
|
|||
|
|
<view class="add" @click="handleAdd" v-if="token">+新增记事</view>
|
|||
|
|
<view v-if="list.length" class="tipsList">
|
|||
|
|
<view class="tips" v-for="(ite,ind) in list" :key="ind">
|
|||
|
|
<view class="title">{{ite.recordtime}}</view>
|
|||
|
|
<uni-swipe-action>
|
|||
|
|
<uni-swipe-action-item :right-options="ite.options">
|
|||
|
|
<view class="list">
|
|||
|
|
<icon class="t-icon t-icon-a-ziyuan265"></icon>
|
|||
|
|
<view class="info">
|
|||
|
|
<view class="time">{{petInfo.name}}</view>
|
|||
|
|
<text>记事内容:</text>
|
|||
|
|
<text>{{ite.content}}</text>
|
|||
|
|
</view>
|
|||
|
|
</view>
|
|||
|
|
|
|||
|
|
</uni-swipe-action-item>
|
|||
|
|
</uni-swipe-action>
|
|||
|
|
</view>
|
|||
|
|
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
|||
|
|
</view>
|
|||
|
|
<view class="nolist mt-15" v-if="!lastPage">
|
|||
|
|
<image src="../../static/none.png"></image>
|
|||
|
|
<text>暂无数据!</text>
|
|||
|
|
</view>
|
|||
|
|
</view>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import {
|
|||
|
|
mapState
|
|||
|
|
} from "vuex";
|
|||
|
|
export default {
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
token: "",
|
|||
|
|
list: [],
|
|||
|
|
page: 1,
|
|||
|
|
lastPage: 0,
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
computed: {
|
|||
|
|
...mapState(["petList", "petInfo"]),
|
|||
|
|
},
|
|||
|
|
onShow() {
|
|||
|
|
let that = this
|
|||
|
|
that.page = 1
|
|||
|
|
that.list = []
|
|||
|
|
},
|
|||
|
|
methods: {}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<style lang="scss" scoped>
|
|||
|
|
.add {
|
|||
|
|
width: 100%;
|
|||
|
|
text-align: center;
|
|||
|
|
background: #fff;
|
|||
|
|
height: 45px;
|
|||
|
|
line-height: 45px;
|
|||
|
|
border-radius: 5px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
font-size: 16px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.content {
|
|||
|
|
padding: 15px
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.info {
|
|||
|
|
// height: 50px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
text {
|
|||
|
|
margin-top: 3px !important;
|
|||
|
|
width: auto !important;
|
|||
|
|
font-size: 13px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.nolist {
|
|||
|
|
text {
|
|||
|
|
margin: -15px auto 15px !important;
|
|||
|
|
width: 100% !important;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</style>
|