This commit is contained in:
bb_pan 2025-06-02 17:07:05 +08:00
parent 42fc7f143f
commit 4d853cc5af
5 changed files with 21 additions and 11 deletions

View File

@ -246,6 +246,7 @@ const onJumpClassFilter = (type) => {
const handleMsg = (item) => {
console.log('🚀 ~ handleMsg ~ item:', item)
const params = item
params.noticeContent = decodeURIComponent(item.noticeContent)
uni.navigateTo({
url: `/pages/index/msgDetails?params=${JSON.stringify(params)}`,
})

View File

@ -12,7 +12,7 @@
<div>发布人: {{ msgItem.createBy }}</div>
<div>发布时间: {{ msgItem.createTime }}</div>
</div>
<p>{{ msgItem.noticeContent }}</p>
<div v-html="msgItem.noticeContent"></div>
</div>
</template>
@ -24,7 +24,7 @@ let msgItem: any = reactive({})
onLoad((opt: any) => {
console.log('🚀 ~ onLoad ~ opt:', opt)
msgItem = JSON.parse(opt.params)
msgItem = opt.params ? JSON.parse(opt.params) : {}
console.log('🚀 ~ onLoad ~ msgItem:', msgItem)
})
</script>

View File

@ -50,6 +50,7 @@ import { useMemberStore } from '@/stores/index.js'
import { onLoad, onShow, onHide, onUnload } from '@dcloudio/uni-app'
import { debounce } from 'lodash-es'
import { sendMessageAPI, getMessageInfoAPI, isReadMessageAPI } from '@/services/message/index.js'
const loading = ref(false)
const memberStore = useMemberStore()
const messageInterval = ref(null)
const messageList = ref([])
@ -85,13 +86,21 @@ const isReadMessageData = async () => {
//
const onSendMessage = debounce(async () => {
console.log('🚀 ~ onSendMessage ~ onSendMessage:', !sendParams.value.messageContent)
if (loading.value || !sendParams.value.messageContent) return
loading.value = true
try {
const res = await sendMessageAPI(sendParams.value)
loading.value = false
if (res.code === 200) {
getMessageInfoData()
sendParams.value.messageContent = ''
} else {
showNotify({ type: 'success', message: '发送失败' })
}
} catch (error) {
loading.value = false
}
}, 500)
onLoad((options) => {

View File

@ -53,7 +53,7 @@
<!-- <text class="message-count">
</text> -->
<van-badge dot v-if="item.isRead != 1"> </van-badge>
<van-badge dot v-if="item.isRead != 1 && userCompanyId == item.toCompany"> </van-badge>
</view>
</view>
</view>

View File

@ -47,12 +47,12 @@
<text>承租订单</text>
</view>
</van-grid-item>
<van-grid-item @click="handleEquipment">
<!-- <van-grid-item @click="handleEquipment">
<view>
<van-icon name="coupon" />
<text>出租设备查询</text>
</view>
</van-grid-item>
</van-grid-item> -->
</van-grid>
</van-cell-group>
</view>