Files
xk-client-wx/pages/index/system.vue
2024-09-19 12:51:35 +08:00

122 lines
2.2 KiB
Vue

<template>
<view class="content safe-area-inset-bottom">
<!-- 描述 -->
<view class="info" v-for="item in list" :key="item.id" @click="next(item.base_type,item.id,item.data)">
<view class="infos_title">
<text class="infos">系统消息</text>
<text class="time">{{item.notice_at}}</text>
</view>
<view class="preview">
{{item.content}}
</view>
</view>
<!-- 为空 -->
<view class="empty">
<u-empty text="暂无系统消息" mode="list" v-if="list.length==0"></u-empty>
</view>
</view>
</template>
<script>
import {
getseesionSystem
} from '../../request/api/api'
export default {
data() {
return {
list: []
}
},
onLoad() {
},
methods: {
goInfo() {
getseesionSystem({
method: "get",
data: {
store_id: uni.getStorageSync('store_id') || 11001
}
}).then((res) => {
// console.log(res, 'res');
this.list = res.data.data.list
})
},
next(type,id,data){
// if(type==7&&id){
// uni.navigateTo({
// url: '/subPackages/my/my-drug/drug-info?id=' + id
// })
// }
if(type==4&&data){
uni.navigateTo({
url: "/subPackages/my/myrecord-detail?no=" + data
})
}
}
},
mounted() {
this.goInfo()
}
}
</script>
<style lang="scss" scoped>
.content {
width: 750rpx;
max-height: 100%;
min-height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
background: #F5F5F5;
.empty {
width: 100vw;
max-height: 100vh;
margin: 0 auto;
padding: 300rpx 0;
}
.info {
width: 750rpx;
padding: 32rpx 40rpx;
height: 156rpx;
background: #FFFFFF;
font-family: PingFang SC-Medium, PingFang SC;
margin-bottom: 20rpx;
.infos_title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8rpx;
.infos {
font-size: 28rpx;
font-weight: bold;
color: #232323;
line-height: 42rpx;
}
.time {
font-size: 22rpx;
font-weight: 400;
color: #999999;
}
}
.preview {
font-size: 24rpx;
font-weight: 400;
color: #999999;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 16rpx;
}
}
}
</style>