diff --git a/.env.production b/.env.production index 133da8c..008f505 100755 --- a/.env.production +++ b/.env.production @@ -1,8 +1,8 @@ -APP_BASE_URL=https://slb.birkenstock.net.cn/api/h5app/wxapp -APP_WEBSOCKET=wss://slb.birkenstock.net.cn/ws +APP_BASE_URL=https://test.birkenstock.net.cn/api/h5app/wxapp +APP_WEBSOCKET=wss://test.birkenstock.net.cn/ws APP_COMPANY_ID=1 APP_PLATFORM=standard -APP_CUSTOM_SERVER=https://slb.birkenstock.net.cn/ +APP_CUSTOM_SERVER=https://test.birkenstock.net.cn/ APP_HOME_PAGE=/pages/index APP_TRACK=youshu APP_YOUSHU_TOKEN=bi281e87ab2424481a diff --git a/src/components/sp-page/index.js b/src/components/sp-page/index.js index eac447f..e22e5de 100755 --- a/src/components/sp-page/index.js +++ b/src/components/sp-page/index.js @@ -304,6 +304,7 @@ function SpPage (props, ref) { // 'icon-home1': cusCurrentPage == 1, 'icon-fanhui': alwaysBackUrl ? true : cusCurrentPage != 1 })} + style={{ color: isBlack ? 'white' : 'black' }} onClick={() => { if (alwaysBackUrl) { Taro.navigateTo({ diff --git a/src/pages/home/index.scss b/src/pages/home/index.scss index 37dd5f7..546cb00 100755 --- a/src/pages/home/index.scss +++ b/src/pages/home/index.scss @@ -167,14 +167,15 @@ page { .spot-pagination-bullet { // margin-right: 5px; // border-radius: 20%; - height: 4px; + height: 6px; width: 30px; - background: #ddd; + background: #d9d9d9; transition: all 0.3s ease-in-out 0s; } // 当前指示点样式 .spot-pagination-bullet-active { - background: #fff; + // background: #fff; + background: #818181; } } .icon-kf { diff --git a/src/pages/index.js b/src/pages/index.js index e5a6ea3..560b280 100755 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -366,9 +366,17 @@ function Home () { }) } }) || []).sort((a, b) => a.sort - b.sort) + const _swiperList = [...activeSwiper, { + type: 'image', + src: process.env.APP_IMAGE_CDN_NEW + '/1774/kv.jpg?t' + new Date().getTime(), + goods: [], + onClick: () => { + // Taro.navigateTo({ url: '/pages/other/goods' }) + } + }, ...list] setState((draft) => { - draft.swiperList = [...activeSwiper, ...list] - draft.goodList = list[0].goods || [] + draft.swiperList = _swiperList + draft.goodList = _swiperList[0].goods || [] draft.loading = false draft.activeInfo = { ...activity_info, @@ -480,7 +488,7 @@ function Home () { }, 500) } } else if (deltaY < 0) { - if (currentIndex === 0) return + if (goodList?.length == 0) return // 上滑操作 setState((draft) => { draft.showBottom = true @@ -524,7 +532,8 @@ function Home () { const onSwiperChange = (e) => { const { current } = e.detail - if (current === 0) { + const _goodList = swiperList[current].goods || [] + if (current === 0 || _goodList.length === 0) { setState((draft) => { draft.showBottom = false draft.isUpOperation = false @@ -532,7 +541,7 @@ function Home () { } setState((draft) => { draft.currentIndex = current - draft.goodList = swiperList[current].goods || [] + draft.goodList = _goodList }) } @@ -562,6 +571,11 @@ function Home () { url: url }) } + + const indexUrl = 'https://mp.weixin.qq.com/s/LBXthKa-P9gNK8FCv3n1pA' + const handleGoWx = () => { + Taro.navigateTo({ url: '/pages/webview?url=' + encodeURIComponent(indexUrl) }) + } return ( {state.swiperList.map((item, index) => ( {item.type === "image" && ( ))} + {!isUpOperation && currentIndex === 0 ? + { + + } + : null} {!isUpOperation && <> - {currentIndex === 0 ? + {/* currentIndex === -1 ? {activeInfo.activity_name} - {/* */} {activeInfo.end_time * 1000 >= Date.now() && handleApply()}> {activeInfo.total_count ? '已报名' : '活动申请'} - {/* */} } - {/* */} - : + : */} + {goodList?.length > 0 && 滑 动 探 索 diff --git a/src/pages/item/espier-detail.js b/src/pages/item/espier-detail.js index fae4bce..1926fa2 100755 --- a/src/pages/item/espier-detail.js +++ b/src/pages/item/espier-detail.js @@ -756,11 +756,13 @@ function EspierDetail (props) { {info?.itemName} - */} - {true ? <> + + false ? <> {goods_1774[1].map((item, index) => )} - : <> + : + */} + {<> {isArray(info.intro) ? ( {info.intro.map((item, idx) => ( @@ -768,18 +770,15 @@ function EspierDetail (props) { {item.name === 'film' && } {item.name === 'slider' && } {item.name === 'writing' && } - {/* {item.name === 'heading' && } */} {item.name === 'headline' && } {item.name === 'goods' && } ))} - ) : ( + ) : <> - {/* */} - - )} - {introList.length ? introList.map((item, index) => + } + {introList.length ? introList.length === 2 ? : introList.map((item, index) => */} - {isArray(historyList) ? + {isArray(historyList) && introList?.length > 2 ? 浏览历史 {historyList.map((item, idx) => ( diff --git a/src/pages/other/goods.js b/src/pages/other/goods.js index 3566f77..e732622 100644 --- a/src/pages/other/goods.js +++ b/src/pages/other/goods.js @@ -7,7 +7,8 @@ import { View, Text, Picker, Input } from "@tarojs/components" import './goods.scss' const initState = { - loading: false + loading: false, + shopList: [] } function goods () { const [state, setState] = useImmer(initState) @@ -15,13 +16,24 @@ function goods () { const { windowHeight, windowWidth } = Taro.getSystemInfoSync() const width = windowWidth * 2 const goods_1774 = [1, 2, 3, 4, 5, 6, 7] + const { shopList } = state const handleBackToIndex = () => { Taro.redirectTo({ url: '/pages/index' }) } const handleGoBuy = (item, index) => { - console.log("🚀 ~ file: goods.js:22 ~ item:", item, index) + if (index === 3) { + Taro.navigateTo({ + url: `/pages/item/espier-detail?id=${shopList[0]?.itemId}` + }) + } + if (index === 5) { + Taro.navigateTo({ + url: `/pages/item/espier-detail?id=${shopList[1]?.itemId}` + }) + } } useEffect(() => { + getShop() setTimeout(() => { setState((draft) => { draft.loading = false @@ -29,6 +41,23 @@ function goods () { }, 300) }, []) + const getShop = async () => { + let params = { + page: 1, + pageSize: 10, + keywords: '', + approve_status: 'onsale,only_show,offline_sale', + item_type: 'normal', + is_point: 'false', + goodsSort: 6 + } + const { list: BK_075List = [] } = await api.item.search({ ...params, keywords: 'BK075' }) + const { list: BK_074List = [] } = await api.item.search({ ...params, keywords: 'BK074' }) + setState((draft) => { + draft.shopList = [...BK_075List, ...BK_074List] + }) + } + return ( diff --git a/src/pages/other/goods.scss b/src/pages/other/goods.scss index 415f341..b0f71f2 100644 --- a/src/pages/other/goods.scss +++ b/src/pages/other/goods.scss @@ -1,6 +1,11 @@ .page-other-goods { .custom-navigation { background-color: #000 !important; + .left-container { + .icon-fanhui { + color: #fff !important; + } + } } .content-btn { margin: 0 auto;