Commit 0665293a authored by GuanHua's avatar GuanHua

feat:店铺收藏判断店铺是否正常状态才可以跳转

parent 21512abe
import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import { Rate, Pagination, Modal } from 'antd'
import { Rate, Pagination, Modal, message } from 'antd'
import { StarFilled } from '@ant-design/icons'
import shop_icon from '@/assets/imgs/shop_icon.png'
import credit_icon from '@/assets/imgs/credit_icon.png'
......@@ -67,10 +67,15 @@ const Shops: React.FC = () => {
}
const linkToDetail = (detail) => {
let el = document.createElement('a')
el.href = `/shop?shopId=${btoa(JSON.stringify({ shopId: detail.id, memberId: detail.memberId }))}`;
el.target = '_blank';
el.click()
if (detail.status === 1) {
let el = document.createElement('a')
el.href = `/shop?shopId=${btoa(JSON.stringify({ shopId: detail.id, memberId: detail.memberId }))}`;
el.target = '_blank';
el.click()
} else {
message.destroy()
message.info("该店铺已冻结")
}
}
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment