修改红包问题

This commit is contained in:
cbb
2026-01-20 09:57:30 +08:00
parent 651d20b909
commit 91e445e381
4 changed files with 30 additions and 10 deletions

2
.env
View File

@@ -1,5 +1,5 @@
# API # API
# VITE_SYSTEM_URL = "http://w6972efb.natappfree.cc" # VITE_SYSTEM_URL = "http://ha699de6.natappfree.cc"
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api" VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
# 第三方客户 channelId # 第三方客户 channelId

View File

@@ -286,6 +286,7 @@
} from '../../../../api/tui-kit' } from '../../../../api/tui-kit'
import { navigateTo } from '../../../../utils/router' import { navigateTo } from '../../../../utils/router'
import { useUI } from '../../../../utils/use-ui' import { useUI } from '../../../../utils/use-ui'
import { useUserStore } from '../../../../stores/user'
interface IEmits { interface IEmits {
(e: 'closeInputToolBar'): void (e: 'closeInputToolBar'): void
@@ -610,7 +611,9 @@
}) })
} }
const { showDialog } = useUI() const { showToast, showDialog } = useUI()
const { getIntegral } = useUserStore()
const customRefMessage = ref(null) const customRefMessage = ref(null)
/** 领取红包 */ /** 领取红包 */
const onClaim = (item: IMessageModel, index: number) => { const onClaim = (item: IMessageModel, index: number) => {
@@ -637,6 +640,8 @@
await receiveRedEnvelope({ await receiveRedEnvelope({
redPacketId: data.id redPacketId: data.id
}) })
await getIntegral()
await showToast('领取成功', 'success')
navigateTo('/pages/red-packet/details', { navigateTo('/pages/red-packet/details', {
id: data.id, id: data.id,
type: conversationType type: conversationType
@@ -673,6 +678,8 @@
await receiveRedEnvelope({ await receiveRedEnvelope({
redPacketId: data.id redPacketId: data.id
}) })
await getIntegral()
await showToast('领取成功', 'success')
navigateTo('/pages/red-packet/details', { navigateTo('/pages/red-packet/details', {
id: data.id, id: data.id,
type: conversationType type: conversationType

View File

@@ -2,8 +2,8 @@
"name" : "uniapp-imitate-wx", "name" : "uniapp-imitate-wx",
"appid" : "__UNI__9EFDC69", "appid" : "__UNI__9EFDC69",
"description" : "", "description" : "",
"versionName" : "1.0.1", "versionName" : "1.0.2",
"versionCode" : "100", "versionCode" : 101,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -43,8 +43,8 @@
<view class="red-envelope-person"> <view class="red-envelope-person">
<view class="name-box"> <view class="name-box">
<image <image
v-if="userInfo?.avatar" v-if="viewData.avatar"
:src="userInfo?.avatar" :src="viewData.avatar"
mode="aspectFill" mode="aspectFill"
class="avatar" class="avatar"
></image> ></image>
@@ -53,7 +53,7 @@
type="contact-filled" type="contact-filled"
size="54rpx" size="54rpx"
></uni-icons> ></uni-icons>
<text>{{ userInfo?.userName }}发出的的红包</text> <text>{{ viewData.userName }}发出的的红包</text>
</view> </view>
<text class="tips">{{ viewData?.title }}</text> <text class="tips">{{ viewData?.title }}</text>
</view> </view>
@@ -77,16 +77,29 @@
:key="item.id" :key="item.id"
class="red-envelope-card" class="red-envelope-card"
> >
<view class="avatar"></view> <image
v-if="item?.avatar"
:src="item?.avatar"
mode="aspectFill"
class="avatar"
></image>
<uni-icons
v-else
type="contact-filled"
size="80rpx"
></uni-icons>
<view class="right-box"> <view class="right-box">
<view class="top-name"> <view class="top-name">
<text>用户名称</text> <text>{{ item.userName }}</text>
<text>{{ item.receiveAmount }}积分</text> <text>{{ item.receiveAmount }}积分</text>
</view> </view>
<view class="bottom-name"> <view class="bottom-name">
<text class="date">{{ item.receiveTime }}</text> <text class="date">{{ item.receiveTime }}</text>
<view <view
v-if="viewData.luckyReceive.userId === item.userId" v-if="
!isPersonal &&
viewData.luckyReceive.userId === item.userId
"
class="tisp" class="tisp"
> >
<image <image