🎈 perf(优化面料详情分享图):

This commit is contained in:
czm 2022-12-13 15:21:20 +08:00
parent b893c5a77d
commit b8a7d5634f
3 changed files with 13 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// export const BASE_URL = CURRENT_BASE_URL export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket`
@ -12,7 +12,7 @@
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
// export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境 // export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添 // export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷 // export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
// export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰 // export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰

View File

@ -30,14 +30,16 @@ const MoveBtn = ({ children = null, onClick, showList = [], orderInfo }: param)
const [showMoveBtn, setShowMoveBtn] = useState(false) const [showMoveBtn, setShowMoveBtn] = useState(false)
const screenWidthRef = useRef(0) const screenWidthRef = useRef(0)
useEffect(() => { useEffect(() => {
const res = Taro.getSystemInfoSync() Taro.nextTick(() => {
if (res.screenHeight) { const res = Taro.getSystemInfoSync()
const ratio = 750 / res.screenWidth if (res.screenHeight) {
const num = res.screenHeight * ratio const ratio = 750 / res.screenWidth
setScreenHeight(() => ({ shop: num - 460, customer: num - 580, order: num - 700 })) const num = res.screenHeight * ratio
screenWidthRef.current = res.screenWidth / 2 setScreenHeight(() => ({ shop: num - 460, customer: num - 580, order: num - 700 }))
} screenWidthRef.current = res.screenWidth / 2
setShowMoveBtn(true) }
setShowMoveBtn(true)
})
}, []) }, [])
useDidShow(() => { useDidShow(() => {

View File

@ -90,8 +90,7 @@ const Details = (props: Params) => {
type: ShareDetail.value, type: ShareDetail.value,
product_id: parseInt(params.id), product_id: parseInt(params.id),
}) })
const img = formatImgUrl(shareImg, '!w400') setSortCode({ ...userObj.sort_code, shareShortDetail: { title: productName as string, code: resDetail.md5_key, shareImg } })
setSortCode({ ...userObj.sort_code, shareShortDetail: { title: productName as string, code: resDetail.md5_key, img } })
} }
useDidShow(() => { useDidShow(() => {
judgeParam() judgeParam()