| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <template>
- <div class="noticeListsj">
- <div
- v-for="item in list"
- class="list-row"
- @click="
- jumpPage(
- '/pages/subPackages/sj_history/detail?id=' + item.formId,
- item.id
- )
- "
- >
- <img src="./1.png" alt="" style="width: 80rpx; height: 80rpx" />
- <div class="lefttext">
- <div :class="item.userReadStatus ? 'text' : 'text fwbold'">
- {{ item.messageContent }}
- </div>
- <div class="text1">{{ item.createTime }}</div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { bizMessageListPage, bizReadMessage } from "@/js_sdk/noticeList";
- import { getUserLocalStorageInfo } from "@/js_sdk/localUserInfo.js";
- export default {
- data() {
- return {
- searchData: {
- pageNum: 1,
- pageSize: 10,
- },
- list: [],
- };
- },
- onReachBottom() {
- // 触底加载更多
- this.searchData.pageNum += 1;
- this.bizMessageListPage();
- },
- onLoad() {
- (this.searchData.bizId = getUserLocalStorageInfo().biz.id),
- this.bizMessageListPage();
- // userId: getUserLocalStorageInfo().user.id,
- },
- methods: {
- async jumpPage(path, id) {
- let data = await bizReadMessage({ id });
- console.log(path);
- uni.navigateTo({
- url: path,
- fail: (fail) => {},
- });
- },
- async bizMessageListPage() {
- let { data } = await bizMessageListPage(this.searchData);
- if (this.list.length != data.total) {
- this.list.push(...data.list);
- }
- },
- },
- };
- </script>
- <style lang="scss">
- .noticeListsj {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- .list-row {
- width: 606rpx;
- background: #ffffff;
- .fwbold {
- font-weight: bold;
- }
- .lefttext {
- margin-left: 12rpx;
- .text {
- width: 500rpx;
- font-weight: 400;
- font-size: 32rpx;
- color: #222222;
- }
- .text1 {
- font-weight: 400;
- font-size: 28rpx;
- color: #888888;
- margin-top: 12rpx;
- }
- }
- }
- }
- </style>
|