main
wwl 2024-03-27 19:37:36 +08:00
parent 820b1ea5cf
commit b7d4ac0428
14 changed files with 336 additions and 33 deletions

View File

@ -38,7 +38,8 @@
border-radius: 5px;
justify-content: center;
align-items: center;
border: 1px solid#d0d0d0;
/* prettier-ignore */
border: 1PX solid#d0d0d0;
}
}
&__bd {

View File

@ -138,7 +138,7 @@ class AtInputNumber extends AtComponent {
style={inputStyle}
type={type}
value={inputValue}
disabled={disabled}
disabled={true}
onInput={this.handleInput}
onBlur={this.handleBlur}
/>

View File

@ -133,7 +133,8 @@
// }
.at-input-number {
border: 1px solid #999;
/* prettier-ignore */
border: 1PX solid #999;
border-radius: 0;
height: 40px;
&__input {

View File

@ -53,7 +53,7 @@ export default class MemberCode extends Component {
return (
<SpPage>
<View className='member-code-wrap' style={
styleNames({
styleNames({ //member-bg
background: `url(${process.env.APP_IMAGE_CDN_NEW}/member/member-bg.png) no-repeat`,
"backgroundSize": "100% 100%"
})
@ -67,7 +67,7 @@ export default class MemberCode extends Component {
<View className='grade_name'>{gradeInfo.grade_name}</View>
<View className='member-code-box'>
{/* <Image className='member-code-bar' mode='aspectFill' src={info.barcode_url} /> */}
<SpImage className='member-code-box-logo' width={214} mode='aspectFill' src="member/logo-lan.png" isNew />
<SpImage className='member-code-box-logo' height={40} mode='aspectFit' src="member/logo-black.png" isNew />
<Image className='member-code-box-qr' mode='aspectFit' src={info.qrcode_url} />
{/* <View>{info.userCardCode}</View> */}
<View className='member-code-box-txt'>向门店出示二维码</View>

View File

@ -293,7 +293,7 @@ function CartIndex () {
</SpLogin>
</View>
)} */}
{isLogin && (
{!loading && isLogin && groupsList?.length > 0 && (
<View>
{/* <SpTabs current={current} tablist={tablist} onChange={onChangeSpTab} /> */}
<View className='valid-cart-block'>
@ -471,14 +471,16 @@ function CartIndex () {
)}
{/* && invalidCart.length == 0 */}
{validCart.length == 0 && (
{!loading && validCart.length == 0 && (
<View className='empty-box'>
{/* <SpDefault type='cart' message=''>
<AtButton type='primary' circle onClick={navigateTo.bind(this, '/pages/index', true)}>
去选购
</AtButton>
</SpDefault> */}
<SpImage className='default-img' src='cart/logo-hui.png' width={160} isNew />
<View className='default-img' style={{ height: '80px', width: '100%', display: 'flex', justifyContent: 'center' }} >
<SpImage src='cart/logo-hui.png' width={160} isNew />
</View>
<View className="empty-box-tit">购物车还是空的</View>
<View className="empty-box-sub-tit">快去挑选自己喜欢的宝贝吧~</View>
<SpLogin onChange={() => { }}>
@ -532,9 +534,9 @@ function CartIndex () {
</sView>}
{/* 猜你喜欢 */}
<SpRecommend className='recommend-block' info={recommendList} />
{/* <SpRecommend className='recommend-block' info={recommendList} /> */}
<SpPrivacyModal open={policyModal} onCancel={onPolicyChange} onConfirm={onPolicyChange} />
{/* <SpPrivacyModal open={policyModal} onCancel={onPolicyChange} onConfirm={onPolicyChange} /> */}
</SpPage>
)
}

View File

@ -299,7 +299,7 @@
flex-direction: column;
justify-content: center;
align-items: center;
.sp-image {
.default-img {
margin-bottom: 50px;
}
.at-button {

View File

@ -324,6 +324,7 @@ page {
flex-direction: column;
position: absolute;
bottom: 10%;
opacity: 0;
&-title {
font-size: 40px;
color: #fff;

View File

@ -213,6 +213,43 @@ function Home () {
const { list: BOSTON_List = [] } = await api.item.search({ ...req, tag_id: 5 })
const { list: ARIZONA_List = [] } = await api.item.search({ ...req, tag_id: 6 })
const { list: LONDON_List = [] } = await api.item.search({ ...req, tag_id: 7 })
const newSort = {
"BK023": 1,
"BK066": 2,
"BK053": 3,
"BK038": 4,
"BK064": 5,
"BK014": 6
}
const hotSort = {
"BK014": 1,
"BK031": 2,
"BK018": 3,
"BK020": 4,
"BK052": 5,
"BK064": 6,
}
const BOSTON_sort = {
"BK020": 1,
"BK023": 2,
"BK025": 3,
"BK029": 4,
"BK030": 5,
"BK031": 6,
}
const ARIZONA_sort = {
"BK001": 1,
"BK017": 2,
"BK007": 3,
"BK010": 4,
"BK011": 5,
"BK014": 6,
}
const LONDON_sort = {
"BK052": 1,
"BK053": 2,
"BK051": 3,
}
setState((draft) => {
draft.recommend = [{
type: 'new',
@ -220,32 +257,55 @@ function Home () {
btnTxt: '查看更多',
postions: 'left',
url: '',
tag_id: 4,
img: 'index/rec/new.png?v=1',
list: newList.map(item => ({ ...item, price: (item.price / 100) }))
list: newList.map(item => ({ ...item, price: (item.price / 100) })).sort((a, b) => {
return newSort[a.item_name_3] - newSort[b.item_name_3]
})
}, {
type: 'hot',
text: "热销单品",
btnTxt: '查看更多',
postions: 'left',
url: '',
tag_id: 3,
img: 'index/rec/hot.png?v=1',
list: hotList.map(item => ({ ...item, price: (item.price / 100) }))
list: hotList.map(item => ({ ...item, price: (item.price / 100) })).sort((a, b) => {
return hotSort[a.item_name_3] - hotSort[b.item_name_3]
})
}, {
type: 'BOSTON',
text: "BOSTON",
btnTxt: 'BOSTON',
postions: 'right',
postions: 'left',
url: '',
tag_id: 5,
img: 'index/rec/Boston.png',
list: BOSTON_List.map(item => ({ ...item, price: (item.price / 100) }))
list: BOSTON_List.map(item => ({ ...item, price: (item.price / 100) })).sort((a, b) => {
return BOSTON_sort[a.item_name_3] - BOSTON_sort[b.item_name_3]
})
}, {
type: 'ARIZONA',
text: "ARIZONA",
btnTxt: 'ARIZONA',
url: '',
postions: 'left',
tag_id: 6,
img: 'index/rec/Arizona.png',
list: ARIZONA_List.map(item => ({ ...item, price: (item.price / 100) }))
list: ARIZONA_List.map(item => ({ ...item, price: (item.price / 100) })).sort((a, b) => {
return ARIZONA_sort[a.item_name_3] - ARIZONA_sort[b.item_name_3]
})
}, {
type: 'LONDON',
text: "LONDON",
btnTxt: 'LONDON',
url: '',
postions: 'left',
tag_id: 7,
img: 'index/rec/London.png',
list: LONDON_List.map(item => ({ ...item, price: (item.price / 100) }))
list: LONDON_List.map(item => ({ ...item, price: (item.price / 100) })).sort((a, b) => {
return LONDON_sort[a.item_name_3] - LONDON_sort[b.item_name_3]
})
}
]
// bak
@ -286,10 +346,11 @@ function Home () {
goods: []
}))
const res = await api.shop.homeSwiperList({ page: 1, pageSize: 999 })
const list = res?.list?.map((item) => {
const list = (res?.list?.map((item) => {
return {
type: item.type || 'image',
src: item.pic,
sort: item.sort,
goods: (item.goods_info_detail || []).map((ite) => {
return {
itemName: ite.item_name,
@ -303,7 +364,7 @@ function Home () {
}
})
}
}) || []
}) || []).sort((a, b) => a.sort - b.sort)
setState((draft) => {
draft.swiperList = [...activeSwiper, ...list]
draft.goodList = list[0].goods || []
@ -493,6 +554,13 @@ function Home () {
url: url + activeInfo.activity_id
})
}
const handleGoRecommendGoods = (item) => {
const url = `/pages/item/list?tag_id=${item.tag_id || ''}`
Taro.navigateTo({
url: url
})
}
return (
<SpPage
className='page-index'
@ -645,10 +713,10 @@ function Home () {
{isUpOperation && showRecommend && <>
{recommend.length > 0 && recommend.map((_item, id) => <View key={id + '__item'} className="fadeIn" >
<SpImage width={windowWidth * 2} height={windowWidth >= 400 ? 920 : 800} mode='scaleToFill' src={_item.img} isShowMenuByLongpress={false} lazyLoad isNew >
{/* <View className="recommend_btn" style={{ [_item.postions]: '70rpx' }}>
<View onClick={() => handleGoRecommendGoods(_item)} className="recommend_btn" style={{ [_item.postions]: '70rpx', opacity: 0 }}>
<View className="recommend_btn-title">{_item.text}</View>
<View className="recommend_btn-btn">{_item.btnTxt}</View>
</View> */}
</View>
</SpImage>
<ScrollView scrollX scrollWithAnimation showScrollbar={true} scrollLeft={0} className="shop-box fadeIn" >
{_item.list?.map((item, idx) => (

View File

@ -50,7 +50,15 @@ const initialState = {
routerParams: null,
card_id: null, // 兑换券
total: undefined,
historyList: []
historyList: [],
loading: true,
tagItem: {
4: 'SS24新品推荐',
3: '热销单品',
5: 'Boston系列',
6: 'Arizona系列',
7: 'London系列',
}
}
function ItemList () {
@ -70,7 +78,9 @@ function ItemList () {
fixTop,
routerParams,
total,
historyList
historyList,
loading,
tagItem
} = state
const [isShowSearch, setIsShowSearch] = useState(false)
const { cat_id, main_cat_id, tag_id, card_id, user_card_id } = routerParams || {}
@ -229,6 +239,7 @@ function ItemList () {
v.rightList[pageIndex - 1] = resRightList
v.brandList = pickBy(brand_list?.list, doc.goods.WGT_GOODS_BRAND)
v.historyList = _historyList?.list || []
v.loading = false
if (v.tagList.length < 1) {
if (select_tags_list.length > 0) {
v.tagList = [
@ -344,6 +355,7 @@ function ItemList () {
<SpPage
scrollToTopBtn
showNavCartIcon
title={tag_id ? tagItem[tag_id] : '搜索列表'}
className={classNames('page-item-list has-navbar', {
'has-tagbar': tagList.length > 0
})}

View File

@ -19,7 +19,8 @@ const initState = {
formInfo: {},
status: '',
isShare: false,
alwaysBackUrl: "/pages/index"
alwaysBackUrl: "/pages/index",
isSub: false,
}
export default function detail () {
const $instance = getCurrentInstance()
@ -79,7 +80,7 @@ export default function detail () {
}, [userInfo, isLogin])
const { isLoading, activeInfo = {}, visible, formInfo, checked, status, isShare, alwaysBackUrl } = state
const { isLoading, activeInfo = {}, visible, formInfo, checked, status, isShare, alwaysBackUrl, isSub } = state
const handleConfirm = async () => {
if (!isLogin || !userInfo) return
@ -141,6 +142,12 @@ export default function detail () {
}
const handleSubmit = async () => {
if (isSub) {
return
}
setState((draft) => {
draft.isSub = true
})
if (isShare) {
handeleShare()
return
@ -194,6 +201,9 @@ export default function detail () {
}
})
}
setState((draft) => {
draft.isSub = false
})
}
const onClickShare = () => {
setState((draft) => {

View File

@ -1,6 +1,6 @@
import React, { useEffect } from 'react'
import { View, Text, Input, Image } from '@tarojs/components'
import Taro, { getCurrentInstance, useDidShow } from '@tarojs/taro'
import { View, Text, Input, Image, Button } from '@tarojs/components'
import Taro, { getCurrentInstance, useDidShow, useShareAppMessage } from '@tarojs/taro'
import { SpPage, SpHtml, SpCheckbox, SpImage } from '@/components'
import { useSelector } from 'react-redux'
import { getActiveDetail } from '@/api/community'
@ -17,12 +17,13 @@ const initState = {
cur_activity_info: [],
loading: true,
activeInfo: {},
qrUrl: ''
qrUrl: '',
visible: false
}
export default function status () {
const $instance = getCurrentInstance()
const [state, setState] = useImmer(initState)
const { cur_activity_info, loading, activeInfo, qrUrl } = state
const { cur_activity_info, loading, activeInfo, qrUrl, visible } = state
useEffect(() => {
getActiveDetail()
@ -127,12 +128,35 @@ export default function status () {
})
navigateTo('/pages/index')
}
const onClickShare = () => {
setState((draft) => {
draft.visible = true
})
}
const handleClose = () => {
setState((draft) => {
draft.visible = false
})
}
useShareAppMessage(() => {
return {
title: activeInfo.activity_name,
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
// imageUrl: activeInfo.pics[0]
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share-logo.jpg`
}
})
return (
<SpPage loading={loading} title={activeInfo.status === 'pending' ? '待审核' : '预约成功'} className='page-recommend-status' alwaysBackUrl="/pages/index" isBlack>
<View className="">
<SpCheckbox checked={true} colors="#000" label={activeInfo.status === 'pending' ? '待审核' : activeInfo.status === 'done' ? '已签到' : "已预约"}></SpCheckbox>
</View>
<View className="activity_name">{activeInfo?.activity_name || ''}</View>
<View className="name-box">
<View className="activity_name">{activeInfo.activity_name}</View>
<Image onClick={onClickShare} className="share_icon" src={require('../../assets/share.jpg')} mode='widthFix' ></Image>
</View>
<View className="activity_info">
<View className="activity_info-item flex-col">
<Text className="title">姓名</Text>
@ -162,6 +186,28 @@ export default function status () {
<View className="code-box-txt">入场请出示预约凭证</View>
</View> : <View style={'height:315px;'}></View>}
{activeInfo.status !== 'done' && <View className="cancel-txt" onClick={handleCancel}>取消预约</View>}
<View className="sp-picker">
<View
className={classNames('mask', {
visible: visible
})}
onTap={handleClose}
catchtouchmove
></View>
<View
className={classNames('sp-picker-cnt', {
visible: visible
})}
>
<View className={classNames('sp-picker-hd')} catchtouchmove>
<Text className='center'>{'分享'}</Text>
<AtIcon onClick={handleClose} value='close' size={14} color='#000' ></AtIcon>
</View>
<View className='sp-picker-bd'>
<Button openType="share" className={"btn share"} onClick={handleClose} plain>发送给朋友</Button>
</View>
</View>
</View>
</SpPage>
)
}

View File

@ -96,4 +96,156 @@
margin-top: 30px;
text-decoration: underline;
}
.name-box {
display: flex;
align-items: flex-start;
justify-content: space-between;
.share_icon {
height: 40px;
width: 60px;
padding: 10px 0 10px 20px;
}
}
.sp-picker {
.mask {
position: fixed;
z-index: 302;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
visibility: hidden;
opacity: 0;
transition: all 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
// color: #fff;
&.visible {
visibility: visible;
opacity: 1;
}
}
&-cnt {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
transition: all 0.3s ease-in-out;
transform: translateY(100%);
z-index: 503;
background-color: #fff;
border-radius: 30rpx 30rpx 0 0;
&.visible {
transform: translateY(0);
}
}
&-hd {
padding: 30px 50px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: none;
position: relative;
font-size: 26px;
.center {
margin: auto;
}
.at-icon-close {
padding: 20px 30px;
position: absolute;
right: 20px;
}
}
&-bd {
padding: 0 50px 50px;
&-item {
display: flex;
align-items: center;
border-bottom: none;
padding: 0 90px;
view {
color: #000;
font-size: 26px;
line-height: 1;
}
.tit {
padding: 28px 50px 28px 30px;
box-sizing: border-box;
}
.content {
display: flex;
flex: 1;
color: #000;
.icon-qianwang-01 {
font-size: 20px;
}
}
}
.btn {
margin-top: 130px;
display: flex;
height: 80px;
align-items: center;
justify-content: center;
font-size: 32px;
line-height: 1;
background: #000;
color: #fff;
border-radius: 6px;
&.notop {
margin-top: 10px;
}
&-disabled {
background: #666;
}
&.share {
margin: 80px 0;
}
}
.user-form {
margin-top: 30px;
&-item {
margin-bottom: 50px;
&-title {
font-size: 24px;
color: #000;
margin-bottom: 10px;
}
&-input {
background: #e5e5e5;
border-radius: 6px;
padding: 20px 40px;
color: #000;
position: relative;
.icon-arrowRight {
font-size: 34px;
position: absolute;
right: 30px;
top: 30%;
// transform: translateY(-50%);
color: #000;
rotate: 90deg;
}
}
&-phone {
width: 100%;
}
.picker {
height: 40px;
width: 100%;
color: #a5a5a5;
&-value {
color: #000;
&.placeholder {
color: #a5a5a5 !important;
}
}
}
}
}
}
}
}

View File

@ -44,10 +44,17 @@ const data = [{
{ subTit: `可以补开发票吗?`, subCon: `可以,您可以通过联系我们的在线客服申请开具已完成订单的发票。` },
{ subTit: `发票抬头如何修改?`, subCon: `如您购买的商品还未付款建议您在有库存的情况下重新下单填并写正确的开票信息。如您购买的商品全部发货未满7天客服查询到您的订单处于未完成状态目前还不能为您更改发票相关信息。待您的订单发货时长达到7天后可联系客服办理。如您购买的商品发货时间达到7天请您提供正确的相关信息给到客服客服会在1-5个工作日为您修改正确的发票抬头并更新在您的订单信息内。` }]
},
{
title: '意见反馈', isOpen: false, content: [{ subTit: `如何反馈其他问题?`, subCon: '如果您对本平台显示的材料或者购物过程中又任何疑虑或异议或希望提供建议和意见您可以联系我们的客服021-62716091或者写信给我们bscn_mp_store@birkenstock.com。' }]
},
{
title: '退换货政策', isOpen: false, content: [
{ subTit: `一、政策适用范围`, subCon: `诚挚欢迎您光临BIRKENSTOCK微信小程序官方店以下是我们的退换货政策。` },
{ subTit: `二、退换货条件`, subCon: `为了确保您的购物体验顺利愉快,我们需要您注意以下退换货条件:`, subContents: ['1.商品应保持完好,包括商品本身及其鞋盒、配件、吊牌等完整无损。', '2.请提供原始收银凭证或购物凭证以办理退换货。', '3.申请退换货应在签收之日起7天内进行。'] },
// { subTit: ``, subCon: `1.商品应保持完好,包括商品本身及其鞋盒、配件、吊牌等完整无损。` },
// { subTit: ``, subCon: `1.商品应保持完好,包括商品本身及其鞋盒、配件、吊牌等完整无损。` },
// { subTit: ``, subCon: `1.商品应保持完好,包括商品本身及其鞋盒、配件、吊牌等完整无损。` },
]
}
]

View File

@ -48,7 +48,10 @@ export default function qaPage () {
{v.subTit}
{/* <Text className="title"></Text> */}
</View>
<View className="title-desc">{v.subCon}</View>
<View className="title-desc">
<View>{v.subCon}</View>
{v.subContents ? v.subContents.map(s => <View> {s}</View >) : null}
</View>
</View>
))}
</View>