yujialong 2 weeks ago
parent e48bea77a9
commit 123a0f1b24
  1. 2
      src/components/UserExchangeSuccessModal/index.less
  2. 5
      src/components/UserExchangeSuccessModal/index.tsx
  3. 7
      src/pages/Home/index.tsx
  4. 7
      src/pages/Listen/index.tsx
  5. 1
      src/pages/Subscribe/index.tsx
  6. 2
      src/pages/UserHome/index.tsx

@ -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;

@ -51,16 +51,17 @@ export default function UserExchangeModal({ isOpen, setIsOpen, exchangeState, pr
<View className='exchange_content'>
<Text className='exchange_suc'>{
exchangeState === '207' ?
'该兑换码已被使用,请核对后再来兑换' :
'该兑换码/二维码已被兑换,请核对后再来兑换' :
exchangeState === '205' ?
'兑换码/二维码有误,请核对后再来兑换' :
exchangeState === '206' ?
'兑换码已过有效期' :
exchangeState === '217' ?
'该兑换码你已兑换过,兑换商品:' :
'该兑换码/二维码你已兑换过,兑换商品:' :
'兑换商品:'
}</Text>
{prdtNames !== '' && <Text className='exchange_prod_name'>{prdtNames}</Text>}
{/* <Text className='exchange_prod_name'>防守反击双联单控记录卡发撒登记卡理发手打风扇电机开了房防守打法防守打法</Text> */}
</View>
<View

@ -1,5 +1,5 @@
import { View, Image, Text, ScrollView, Swiper, SwiperItem } from '@tarojs/components'
import Taro, { useDidShow, useLoad, useShareAppMessage, useShareTimeline } from '@tarojs/taro'
import Taro, { useDidShow, useDidHide, useLoad, useShareAppMessage, useShareTimeline } from '@tarojs/taro'
import { useEffect, useState } from 'react'
import './index.less'
import GetPhoneNumber from '../../components/getPhoneModal'
@ -194,6 +194,11 @@ export default function Home() {
})
useDidHide(() => {
setisGetUsePhone(false)
setisLoginOpen(false)
})
//用户登录后重新请求爆品
useEffect(() => {
if(isGetUsePhone){

@ -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({

@ -327,6 +327,7 @@ export default function Subscribe() {
useDidHide(() => {
setisGetUsePhone(false)
setisLoginOpen(false)
})
useEffect(() => {

@ -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)
})

Loading…
Cancel
Save