diff --git a/src/common/constant.ts b/src/common/constant.ts index 32af514..2f06165 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -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.89: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://www.zzfzyc.com/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.42:50002/lymarket` // 杰 diff --git a/src/components/moveBtn/index.tsx b/src/components/moveBtn/index.tsx index f504e6d..82644d5 100644 --- a/src/components/moveBtn/index.tsx +++ b/src/components/moveBtn/index.tsx @@ -30,14 +30,16 @@ const MoveBtn = ({ children = null, onClick, showList = [], orderInfo }: param) const [showMoveBtn, setShowMoveBtn] = useState(false) const screenWidthRef = useRef(0) useEffect(() => { - const res = Taro.getSystemInfoSync() - if (res.screenHeight) { - const ratio = 750 / res.screenWidth - const num = res.screenHeight * ratio - setScreenHeight(() => ({ shop: num - 460, customer: num - 580, order: num - 700 })) - screenWidthRef.current = res.screenWidth / 2 - } - setShowMoveBtn(true) + Taro.nextTick(() => { + const res = Taro.getSystemInfoSync() + if (res.screenHeight) { + const ratio = 750 / res.screenWidth + const num = res.screenHeight * ratio + setScreenHeight(() => ({ shop: num - 460, customer: num - 580, order: num - 700 })) + screenWidthRef.current = res.screenWidth / 2 + } + setShowMoveBtn(true) + }) }, []) useDidShow(() => { diff --git a/src/pages/details/index.tsx b/src/pages/details/index.tsx index 1709664..9924c67 100644 --- a/src/pages/details/index.tsx +++ b/src/pages/details/index.tsx @@ -90,8 +90,7 @@ const Details = (props: Params) => { type: ShareDetail.value, product_id: parseInt(params.id), }) - const img = formatImgUrl(shareImg, '!w400') - setSortCode({ ...userObj.sort_code, shareShortDetail: { title: productName as string, code: resDetail.md5_key, img } }) + setSortCode({ ...userObj.sort_code, shareShortDetail: { title: productName as string, code: resDetail.md5_key, shareImg } }) } useDidShow(() => { judgeParam()