| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <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 == 1 ? 'text' : 'text fwbold'">
- {{ item.messageContent }}
- </div>
- <div class="text1">{{ item.createTime }}</div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { driverMessageListPage, driverReadMessage } 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.driverMessageListPage();
- },
- onShow() {
- this.searchData.userId = getUserLocalStorageInfo().user.id;
- this.driverMessageListPage();
- // userId: getUserLocalStorageInfo().user.id,
- },
- methods: {
- async jumpPage(path, id) {
- let data = await driverReadMessage({ id });
- // return;
- console.log(path);
- uni.navigateTo({
- url: path,
- fail: (fail) => {},
- });
- },
- async driverMessageListPage() {
- let { data } = await driverMessageListPage(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 !important;
- }
- .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>
|