main
wwl 2024-05-10 10:15:18 +08:00
parent d148a32332
commit b380d3c704
3 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
APP_BASE_URL=https://test.birkenstock.net.cn/api/h5app/wxapp
APP_WEBSOCKET=wss://test.birkenstock.net.cn/ws
APP_BASE_URL=https://slb.birkenstock.net.cn/api/h5app/wxapp
APP_WEBSOCKET=wss://slb.birkenstock.net.cn/ws
APP_COMPANY_ID=1
APP_PLATFORM=standard
APP_CUSTOM_SERVER=https://test.birkenstock.net.cn/
APP_CUSTOM_SERVER=https://slb.birkenstock.net.cn/
APP_HOME_PAGE=/pages/index
APP_TRACK=youshu
APP_YOUSHU_TOKEN=bi281e87ab2424481a

View File

@ -74,11 +74,11 @@ function SpSkuSelect (props, ref) {
const key = [a.skuValue[0].specId, b.skuValue[0].specId, c.skuValue[0].specId].join('_')
const item = skuDictRef.current[key]
// && item.store > 0
selItem = key && item && ['onsale'].includes(item.approveStatus) ? item : null
selItem = key && item && ['onsale', 'offline_sale'].includes(item.approveStatus) ? item : null
}
}
// 默认选中有库存并且前端可销售的sku
const defaultSpecItem = selItem ?? specItems.find((item) => item.store > 0 && ['onsale'].includes(item.approveStatus))
const defaultSpecItem = selItem ?? specItems.find((item) => item.store > 0 && ['onsale', 'offline_sale'].includes(item.approveStatus))
let selection = Array(specItems.length).fill(null)
if (defaultSpecItem) {
selection = defaultSpecItem.specItem.map((item) => item.specId)
@ -105,7 +105,7 @@ function SpSkuSelect (props, ref) {
return Object.keys(skuDictRef.current).some((key) => {
if (key == reg) {
return skuDictRef.current[key].store > 0 && ['onsale'].includes(skuDictRef.current[key].approveStatus)
return skuDictRef.current[key].store > 0 && ['onsale', 'offline_sale'].includes(skuDictRef.current[key].approveStatus)
} else {
return false
}
@ -198,7 +198,7 @@ function SpSkuSelect (props, ref) {
console.log("🚀 ~ _selKey:", _selKey, _selection)
const isNotStore = ((idx === 0 && isClickPattern) || idx === 1) && Object.keys(skuDictRef.current).every((key) => {
if (key.indexOf(_selKey) === 0) {
return skuDictRef.current[key].store <= 0 && ['onsale'].includes(skuDictRef.current[key].approveStatus)
return skuDictRef.current[key].store <= 0 && ['onsale', 'offline_sale'].includes(skuDictRef.current[key].approveStatus)
} else {
return true
}

View File

@ -341,7 +341,7 @@ function Home () {
const getSwiperList = async () => {
const { status, activity_info = {}, total_count } = await api.user.registrationActivity({ activity_id: 2 })
const activeSwiper = activity_info.pics.map(item => ({
const activeSwiper = (activity_info.pics || [])?.map(item => ({
type: 'image',
src: item,
goods: []
@ -574,8 +574,8 @@ function Home () {
const indexUrl = 'https://mp.weixin.qq.com/s/LBXthKa-P9gNK8FCv3n1pA'
const handleGoWx = () => {
// handleApply()
Taro.navigateTo({ url: '/pages/webview?url=' + encodeURIComponent(indexUrl) })
handleApply()
// Taro.navigateTo({ url: '/pages/webview?url=' + encodeURIComponent(indexUrl) })
}
return (
<SpPage