update: 消息类型跳转相关

This commit is contained in:
admin 2024-04-12 17:03:48 +08:00
parent 9110ec39c1
commit 28230fe3af
3 changed files with 32 additions and 7 deletions

View File

@ -10,7 +10,7 @@
:height="0"
:isLoading="pageList.isLoading"
>
<view class="msg-box">
<view class="msg-box" v-if="pageList.list.length > 0">
<view class="u-page">
<u-list>
<u-list-item v-for="(item, index) in pageList.list" :key="index">
@ -37,6 +37,7 @@
<script setup lang="ts">
import PageView from "@/components/PageView/index.vue";
import { MessageApi } from "@/services";
import { MsgType } from "@/utils/enum";
const pageList: PageResult<any> = reactive({
isLoading: false,
noMoreData: false,
@ -81,16 +82,33 @@ const getList = (v?: boolean) => {
});
};
const handleItem = (item:any) => {
const handleItem = (item: any) => {
if (item.status === 0) {
MessageApi.readNotice({ids: [item.id]}).then(res => {
MessageApi.readNotice({ ids: [item.id] }).then((res) => {
if (res.code === 200) {
resetPageList();
getList();
}
})
});
}
}
if (MsgType.ToBePriced === item.msgType) {
uni.navigateTo({
url: "/pagesReceive/pricing?scaleStatus=0", //
});
} else if (MsgType.ToBeReview === item.msgType) {
uni.navigateTo({
url: "/pagesReceive/payReview?scaleStatus=2", //
});
} else if (MsgType.ToBeShipment === item.msgType) {
uni.navigateTo({
url: "/pagesShipment/shipmenting?scaleStatus=0", //
});
} else if (MsgType.ToBeShipmentReview === item.msgType) {
uni.navigateTo({
url: "/pagesShipment/shipmentSettlement?scaleStatus=2", //
});
}
};
onMounted(() => {
getList();
});
@ -99,7 +117,6 @@ onMounted(() => {
.msg-box {
background: #f8f8f8;
width: 100%;
height: 100%;
.title {
font-size: 28rpx;
font-family: Source Han Sans CN;

View File

@ -95,7 +95,7 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleScenePhoto = (imagesId: number) => {
uni.redirectTo({
uni.navigateTo({
url: `/pagesScenePhoto/index?orderType=1&id=${imagesId}&imagesType=1`, //
});
};

View File

@ -94,4 +94,12 @@ export enum TimeRange {
Month = 3,
Year = 4,
Custom = 5
}
// 消息跳转类型 0=收货待定价1=收货待审核2=待出库3=出库审核
export enum MsgType {
ToBePriced = 0,
ToBeReview = 1,
ToBeShipment = 2,
ToBeShipmentReview = 3
}