From 123a0f1b24ac13f8c4981f7496660e9df57cfe76 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 8 Nov 2024 11:04:45 +0800 Subject: [PATCH] fix --- src/components/UserExchangeSuccessModal/index.less | 2 -- src/components/UserExchangeSuccessModal/index.tsx | 5 +++-- src/pages/Home/index.tsx | 7 ++++++- src/pages/Listen/index.tsx | 7 ++++++- src/pages/Subscribe/index.tsx | 1 + src/pages/UserHome/index.tsx | 2 ++ 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/UserExchangeSuccessModal/index.less b/src/components/UserExchangeSuccessModal/index.less index 227d894..5263a62 100644 --- a/src/components/UserExchangeSuccessModal/index.less +++ b/src/components/UserExchangeSuccessModal/index.less @@ -40,13 +40,11 @@ } .exchange_content { - display: flex; margin: .5rem 0; } .exchange_suc { font-size: .9rem; color: #333; - white-space: nowrap; } .exchange_prod_name { margin-bottom: .3rem; diff --git a/src/components/UserExchangeSuccessModal/index.tsx b/src/components/UserExchangeSuccessModal/index.tsx index 692b8d5..8e8613e 100644 --- a/src/components/UserExchangeSuccessModal/index.tsx +++ b/src/components/UserExchangeSuccessModal/index.tsx @@ -51,16 +51,17 @@ export default function UserExchangeModal({ isOpen, setIsOpen, exchangeState, pr { exchangeState === '207' ? - '该兑换码已被使用,请核对后再来兑换' : + '该兑换码/二维码已被兑换,请核对后再来兑换' : exchangeState === '205' ? '兑换码/二维码有误,请核对后再来兑换' : exchangeState === '206' ? '兑换码已过有效期' : exchangeState === '217' ? - '该兑换码你已兑换过,兑换商品:' : + '该兑换码/二维码你已兑换过,兑换的商品为:' : '兑换商品:' } {prdtNames !== '' && {prdtNames}} + {/* 防守反击双联单控记录卡发撒登记卡理发手打风扇电机开了房防守打法防守打法 */} { + setisGetUsePhone(false) + setisLoginOpen(false) + }) + //用户登录后重新请求爆品 useEffect(() => { if(isGetUsePhone){ diff --git a/src/pages/Listen/index.tsx b/src/pages/Listen/index.tsx index 6366fbe..afa0c9e 100644 --- a/src/pages/Listen/index.tsx +++ b/src/pages/Listen/index.tsx @@ -1,6 +1,6 @@ import { Swiper, SwiperItem, View, Image, Text } from '@tarojs/components' import React, { useEffect, useState } from 'react' -import Taro, { useDidShow } from '@tarojs/taro' +import Taro, { useDidShow, useDidHide } from '@tarojs/taro' import './index.less' import GetPhoneNumber from '../../components/getPhoneModal' import Gift from '../../components/gift' @@ -146,6 +146,11 @@ export default function Listen() { } }) + useDidHide(() => { + setisGetUsePhone(false) + setisLoginOpen(false) + }) + useEffect(() => { if(isGetUsePhone){ Taro.request({ diff --git a/src/pages/Subscribe/index.tsx b/src/pages/Subscribe/index.tsx index 58863b2..7562c8f 100644 --- a/src/pages/Subscribe/index.tsx +++ b/src/pages/Subscribe/index.tsx @@ -327,6 +327,7 @@ export default function Subscribe() { useDidHide(() => { setisGetUsePhone(false) + setisLoginOpen(false) }) useEffect(() => { diff --git a/src/pages/UserHome/index.tsx b/src/pages/UserHome/index.tsx index e8a57f2..2204198 100644 --- a/src/pages/UserHome/index.tsx +++ b/src/pages/UserHome/index.tsx @@ -154,6 +154,8 @@ export default function UserHome() { if(Taro.getStorageSync('UserToken')){ setuserAvator(Taro.getStorageSync('UserAvatar')) setuserNickName(Taro.getStorageSync('UserNickName')) + } else { + setisLoginOpen(false) } setisGetUsePhone(false) })