测试问题修复

This commit is contained in:
bb_pan 2025-02-19 14:11:07 +08:00
parent 0fefd38625
commit 2701deb9cc
5 changed files with 65 additions and 6 deletions

View File

@ -11,12 +11,12 @@
</view>
<view class="address-box">
<van-text-ellipsis :content="`${goodsInfo.companyName}`" />
<van-text-ellipsis :content="` ${goodsInfo.companyName}`" />
</view>
<view>
<!-- <view>
<van-text-ellipsis :content="`${goodsInfo.companyName}`" />
</view>
</view> -->
<view>
<view>
<van-icon name="phone-o" />

View File

@ -174,6 +174,13 @@
"style": {
"navigationStyle": "custom"
}
},
//
{
"path": "pages/index/msgDetails",
"style": {
"navigationBarTitleText": "公告详情"
}
}
],
"tabBar": {

View File

@ -20,7 +20,10 @@
class="notice-swipe"
>
<van-swipe-item :key="item.noticeId" v-for="item in noticeListMessage">
<van-text-ellipsis :content="item.noticeTitle" />
<van-text-ellipsis
:content="item.noticeTitle"
@click="handleMsg(item)"
/>
</van-swipe-item>
</van-swipe>
</van-notice-bar>
@ -200,6 +203,15 @@ const onJumpClassFilter = (type) => {
})
}
//
const handleMsg = (item) => {
console.log('🚀 ~ handleMsg ~ item:', item)
const params = item
uni.navigateTo({
url: `/pages/index/msgDetails?params=${JSON.stringify(params)}`,
})
}
onLoad(() => {
finished.value = true
userCompanyName.value = memberStore?.userCompanyName

View File

@ -0,0 +1,40 @@
<template>
<div class="container">
<h4>{{ msgItem.noticeTitle }}</h4>
<div
style="
display: flex;
justify-content: space-between;
line-height: 1.9;
margin-bottom: 20px;
"
>
<div>发布人: {{ msgItem.createBy }}</div>
<div>发布时间: {{ msgItem.createTime }}</div>
</div>
<p>{{ msgItem.noticeContent }}</p>
</div>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { reactive } from 'vue'
let msgItem: any = reactive({})
onLoad((opt: any) => {
console.log('🚀 ~ onLoad ~ opt:', opt)
msgItem = JSON.parse(opt.params)
console.log('🚀 ~ onLoad ~ msgItem:', msgItem)
})
</script>
<style scoped lang="scss">
.container {
padding: 20px;
//
word-wrap: break-word;
word-break: break-all;
white-space: pre-wrap;
}
</style>

View File

@ -3,7 +3,7 @@
<view class="h5-container message-pages">
<view style="padding: 15px">
<van-icon name="arrow-left" @click="onClickLeft" />
<text style="color: #000"> {{ sendParams.toCompanyName }} </text>
<text style="color: #000"> {{ sendParams.toCompanyName || '' }} </text>
</view>
<scroll-view scroll-y style="padding-bottom: 60px">
@ -98,7 +98,7 @@ onLoad((options) => {
myCompanyId.value = memberStore.userInfo?.companyId
sendParams.value.toCompany = options?.id
sendParams.value.toUser = options?.ownId
sendParams.value.toCompanyName = options?.name
sendParams.value.toCompanyName = options?.name == 'null' ? '系统通知' : options?.name
sendParams.value.fromCompanyName = memberStore.userCompanyName
})