mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-12 22:35:37 +08:00
bug(custom):
This commit is contained in:
@@ -28,9 +28,10 @@ const initialState = {
|
||||
}
|
||||
|
||||
const SpLogin = forwardRef((props, ref) => {
|
||||
const { children, className, newUser = false, visible, onPolicyClose, onChange, onClose } = props
|
||||
const { children, className, visible, onPolicyClose, onChange, onClose } = props
|
||||
const { updateAddress } = useLocation()
|
||||
const { shopInfo } = useSelector((state) => state.shop)
|
||||
const { isNewUser } = useSelector((state) => state.user)
|
||||
|
||||
const { isLogin, login, setToken, checkPolicyChange } = useLogin({
|
||||
policyUpdateHook: (isUpdate) => {
|
||||
@@ -41,7 +42,6 @@ const SpLogin = forwardRef((props, ref) => {
|
||||
!visible && updateAddress && updateAddress()
|
||||
}
|
||||
})
|
||||
const [isNewUser, setIsNewUser] = useState(false)
|
||||
const [policyModal, setPolicyModal] = useState(false)
|
||||
const [loginModal, setLoginModal] = useState(false)
|
||||
const [state, setState] = useImmer(initialState)
|
||||
@@ -54,12 +54,7 @@ const SpLogin = forwardRef((props, ref) => {
|
||||
}
|
||||
}, [visible])
|
||||
|
||||
useEffect(() => {
|
||||
if (newUser) {
|
||||
setIsNewUser(true)
|
||||
}
|
||||
}, [newUser])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (loginModal) {
|
||||
fetchPrivacyData()
|
||||
|
||||
@@ -112,7 +112,7 @@ function MemberIndex(props) {
|
||||
// console.log('===>getCurrentPages==>', getCurrentPages(), getCurrentInstance())
|
||||
const $instance = getCurrentInstance()
|
||||
const { updateAddress } = useLocation()
|
||||
const { isLogin, isNewUser, getUserInfo } = useLogin({
|
||||
const { isLogin, getUserInfo } = useLogin({
|
||||
autoLogin: false,
|
||||
// policyUpdateHook: (isUpdate) => {
|
||||
// // isUpdate && setPolicyModal(true)
|
||||
@@ -541,7 +541,7 @@ function MemberIndex(props) {
|
||||
</View>
|
||||
</>
|
||||
) : (
|
||||
<SpLogin newUser={isNewUser}>
|
||||
<SpLogin>
|
||||
<Text className='login-text font-medium text-34'>点击登录</Text>
|
||||
</SpLogin>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user