获取到红包信息后更新UI

This commit is contained in:
cbb
2026-01-08 17:54:09 +08:00
parent c0619ea4ec
commit f2cabe99f1
4 changed files with 105 additions and 39 deletions

View File

@@ -78,14 +78,14 @@
"
>
<!-- 红包 -->
<view class="red-envelope">
<view class="red-envelope" @click="onClaim">
<view class="top-title">
<Icon :file="unopenedEnvelope" width="78rpx" height="80rpx" />
<text class="title">
{{ customData.title }}
</text>
</view>
<text class="bottom-text">积分红包</text>
<text class="bottom-text">积分红包{{ customData.isOpen }}</text>
</view>
</template>
<template v-else>
@@ -112,11 +112,19 @@
content: any
}
interface IEmit {
(key: 'claim'): void
}
const emits = defineEmits<IEmit>()
const props = withDefaults(defineProps<Props>(), {
messageItem: undefined,
content: undefined
})
console.log(props.messageItem, '获取到红包信息后更新UI')
const custom = ref()
const message = ref<IMessageModel>()
const extension = ref()
@@ -137,6 +145,12 @@
const openLink = (url: any) => {
window.open(url)
}
/** 红包领取 */
const onClaim = () => {
// console.log(customData.value)
emits('claim')
}
</script>
<style lang="scss" scoped>
@import '../../../../assets/styles/common';