🐞 fix(ID1001438): 【面料优选】领取色卡剪样时,若用户没有登陆,在商品详情点击领色卡和领剪样时弹出需要授权手机号
【【面料优选】领取色卡剪样时,若用户没有登陆,在商品详情点击领色卡和领剪样时弹出需要授权手机号】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001438
This commit is contained in:
parent
a0b010c874
commit
b5b33a27ea
@ -127,7 +127,7 @@ export default () => {
|
|||||||
const { fetchData: addressListFetchData, state } = addressListApi()
|
const { fetchData: addressListFetchData, state } = addressListApi()
|
||||||
const getAddressDefault = async() => {
|
const getAddressDefault = async() => {
|
||||||
const res = await addressListFetchData()
|
const res = await addressListFetchData()
|
||||||
let defaultInfo: AddressItem|null = null
|
let defaultInfo: AddressItem = {} as AddressItem
|
||||||
res?.data.list?.map((item) => {
|
res?.data.list?.map((item) => {
|
||||||
if (item.is_default) {
|
if (item.is_default) {
|
||||||
defaultInfo = {
|
defaultInfo = {
|
||||||
@ -138,7 +138,7 @@ export default () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
submitData.current.address_id = defaultInfo!.id
|
submitData.current.address_id = defaultInfo?.id
|
||||||
setAddressInfo(defaultInfo!)
|
setAddressInfo(defaultInfo!)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,7 @@ interface CurrentDialogDetail {
|
|||||||
last_bulk_price: number
|
last_bulk_price: number
|
||||||
}
|
}
|
||||||
const Details = (props: Params) => {
|
const Details = (props: Params) => {
|
||||||
|
// const userInfo = useSelector(state => state.userInfo)
|
||||||
const { getPhoneNumber, userInfo } = useLogin()
|
const { getPhoneNumber, userInfo } = useLogin()
|
||||||
|
|
||||||
// 获取参数(有两种参数:1.商品id, 2.页面分享)
|
// 获取参数(有两种参数:1.商品id, 2.页面分享)
|
||||||
@ -238,6 +239,9 @@ const Details = (props: Params) => {
|
|||||||
|
|
||||||
const { fetchData: colorCardFetchData } = GetColorCardOrderByProductApi()
|
const { fetchData: colorCardFetchData } = GetColorCardOrderByProductApi()
|
||||||
const getColorCardData = async() => {
|
const getColorCardData = async() => {
|
||||||
|
if (!userInfo?.adminUserInfo?.phone) {
|
||||||
|
return goLink('/pages/login/index')
|
||||||
|
}
|
||||||
const res = await colorCardFetchData({ product_id: productInfo.id })
|
const res = await colorCardFetchData({ product_id: productInfo.id })
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
res.data.count = 1
|
res.data.count = 1
|
||||||
@ -250,6 +254,9 @@ const Details = (props: Params) => {
|
|||||||
|
|
||||||
const [showColorSelect, setShowColorSelect] = useState(false)
|
const [showColorSelect, setShowColorSelect] = useState(false)
|
||||||
const openColorSelect = () => {
|
const openColorSelect = () => {
|
||||||
|
if (!userInfo?.adminUserInfo?.phone) {
|
||||||
|
return goLink('/pages/login/index')
|
||||||
|
}
|
||||||
setShowColorSelect(true)
|
setShowColorSelect(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user