🎈 perf(下单返现): BD标识下隐藏活动栏

This commit is contained in:
xuan 2023-03-11 18:44:41 +08:00
parent 89fc49b297
commit eea90ce2ac
16 changed files with 346 additions and 285 deletions

View File

@ -54,6 +54,7 @@ export const HOME_ITEM1 = getCDNSource('/mall/home_item1.png')
export const HOME_ITEM2 = getCDNSource('/mall/home_item2.png') export const HOME_ITEM2 = getCDNSource('/mall/home_item2.png')
export const HOME_ITEM3 = getCDNSource('/mall/home_item3.png') export const HOME_ITEM3 = getCDNSource('/mall/home_item3.png')
export const HOME_ITEM4 = getCDNSource('/mall/home_item4.png') export const HOME_ITEM4 = getCDNSource('/mall/home_item4.png')
export const BUSINESS_MANAGER = getCDNSource('/color_card/businessManager.png')
// 场景值 // 场景值
export const SCENE = { export const SCENE = {

View File

@ -0,0 +1,3 @@
.input_bar {
width: 100%;
}

View File

@ -1,6 +1,8 @@
import { CustomWrapper, Input, View } from '@tarojs/components' import { CustomWrapper, Input, View } from '@tarojs/components'
import classNames from 'classnames'
import type { FC } from 'react' import type { FC } from 'react'
import React from 'react' import React from 'react'
import styes from './index.module.scss'
// 解决 input 组件输入过快会出现闪烁的问题 // 解决 input 组件输入过快会出现闪烁的问题
// https://github.com/NervJS/taro/issues/9664 // https://github.com/NervJS/taro/issues/9664
interface PropsType { interface PropsType {
@ -13,7 +15,7 @@ interface PropsType {
const InputX: FC<PropsType> = (props) => { const InputX: FC<PropsType> = (props) => {
const { customClassName, customStyle, customInputStyle, customInputClassName, ...inputProps } = props const { customClassName, customStyle, customInputStyle, customInputClassName, ...inputProps } = props
return ( return (
<View className={customClassName} style={customStyle}> <View className={classNames(styes.input_bar, customClassName)} style={customStyle}>
<CustomWrapper> <CustomWrapper>
<Input className={customInputClassName} style={customInputStyle} {...inputProps} ></Input> <Input className={customInputClassName} style={customInputStyle} {...inputProps} ></Input>
</CustomWrapper> </CustomWrapper>

View File

@ -2,6 +2,7 @@ import { CustomWrapper, Input, View } from '@tarojs/components'
import { memo, useEffect, useMemo, useRef, useState } from 'react' import { memo, useEffect, useMemo, useRef, useState } from 'react'
import Big from 'big.js' import Big from 'big.js'
import IconFont from '../iconfont/iconfont' import IconFont from '../iconfont/iconfont'
import InputX from '../InputX'
import styles from './index.module.scss' import styles from './index.module.scss'
interface params { interface params {

View File

@ -126,7 +126,7 @@ const MoveBtn = ({ orderObj = {}, children = null, onShopClick, showList = [], m
x="630rpx" x="630rpx"
y={`${screenHeight.customer}rpx`} y={`${screenHeight.customer}rpx`}
> >
<Image mode="aspectFit" src={formatImgUrl('/color_card/businessManager.png')} /> <Image mode="aspectFit" src={formatImgUrl('/mall/float_button_customer_service.png')} />
</MovableView>} </MovableView>}
{showCode && <CodeSelect orderObj={orderObj} y={screenHeight.code as number} />} {showCode && <CodeSelect orderObj={orderObj} y={screenHeight.code as number} />}
<Customer messageTitle={messageTitle} messagePath={messageTitle} show={customer_service_show} showCard={showCart} onClose={customerClose} /> <Customer messageTitle={messageTitle} messagePath={messageTitle} show={customer_service_show} showCard={showCart} onClose={customerClose} />

View File

@ -13,7 +13,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
input { .input_bar {
overflow: hidden;
font-size: 27px; font-size: 27px;
background: #f6f7f9; background: #f6f7f9;
width: 100%; width: 100%;

View File

@ -1,6 +1,7 @@
import { Input, View } from '@tarojs/components' import { Input, View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react' import { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react'
import InputX from '../InputX'
import styles from './index.module.scss' import styles from './index.module.scss'
import CloseBtn from '@/components/closeBtn' import CloseBtn from '@/components/closeBtn'
import { debounce } from '@/common/util' import { debounce } from '@/common/util'
@ -80,18 +81,18 @@ const Search = (
)} )}
></View> ></View>
)} )}
<Input <InputX
style={{ borderRadius }} customInputStyle={{ borderRadius }}
alwaysEmbed alwaysEmbed
cursorSpacing={150} cursorSpacing={150}
placeholderStyle="color:#ABABAB; font-size:26rpx" placeholderStyle="color:#ABABAB; font-size:26rpx"
onConfirm={onSearch} onConfirm={onSearch}
className={classnames(placeIcon == 'out' && styles.input_out)} customInputClassName={classnames(styles.input_bar, placeIcon == 'out' && styles.input_out)}
disabled={disabled} disabled={disabled}
value={inputCon} value={inputCon}
placeholder={placeholder} placeholder={placeholder}
onInput={e => onInputEven(e)} onInput={e => onInputEven(e)}
></Input> />
{!!inputCon && ( {!!inputCon && (
<View className={styles.search_closeBtn}> <View className={styles.search_closeBtn}>
<CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', border: '0' }} /> <CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', border: '0' }} />

View File

@ -3,7 +3,7 @@
width: 100%; width: 100%;
position: relative; position: relative;
.swiper_item { .swiper_item {
height: 100%; height: 450px;
width: 100%; width: 100%;
} }
.image_item { .image_item {

View File

@ -1,8 +1,23 @@
page {
height: 100vh;
display: flex;
flex-flow: column nowrap;
overflow: hidden;
}
.main { .main {
min-height: 100%;
background-color: $color_bg_one; background-color: $color_bg_one;
padding: 20px 20px 100px 20px; display: flex;
height: 100%;
flex-flow: column nowrap;
overflow: hidden;
.content {
flex: 1 1 auto;
overflow: scroll;
display: flex;
flex-flow: column nowrap;
.product_header { .product_header {
margin: 20px;
margin-bottom: 0;
padding: 20px 20px 0 20px; padding: 20px 20px 0 20px;
display: flex; display: flex;
height: 163.57px; height: 163.57px;
@ -57,9 +72,10 @@
} }
} }
.des_data { .des_data {
margin: 20px;
margin-bottom: 0;
background-color: #fff; background-color: #fff;
padding: 24px; padding: 24px;
margin-top: 16px;
border-radius: 16px; border-radius: 16px;
.flexBox { .flexBox {
display: flex; display: flex;
@ -107,8 +123,8 @@
} }
.product_color { .product_color {
margin: 20px;
background-color: #fff; background-color: #fff;
margin-top: 16px;
padding: 30px 20px 0; padding: 30px 20px 0;
color: $color_font_one; color: $color_font_one;
font-size: $font_size_medium; font-size: $font_size_medium;
@ -156,17 +172,18 @@
.product_detail { .product_detail {
// padding: 20px; // padding: 20px;
background-color: #fff; background-color: #fff;
margin-top: 16px; margin: 20px;
}
} }
.product_buy { .product_buy {
position: relative;
z-index: 9999;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 95px; padding: 20px;
box-shadow: 6px 0px 12px 0px rgba(0, 0, 0, 0.16);
width: 100vw; width: 100vw;
position: fixed;
bottom: 0;
left: 0;
background-color: #fff; background-color: #fff;
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);

View File

@ -277,6 +277,7 @@ const Details = (props: Params) => {
return ( return (
<MoveBtn showList={['order']}> <MoveBtn showList={['order']}>
<View className={styles.main}> <View className={styles.main}>
<View className={styles.content}>
<DesSwiper list={productInfo.texture_url ? productInfo.texture_url.toString().split(',') : []} /> <DesSwiper list={productInfo.texture_url ? productInfo.texture_url.toString().split(',') : []} />
<View className={styles.product_header}> <View className={styles.product_header}>
<View className={styles.title}> <View className={styles.title}>
@ -332,7 +333,11 @@ const Details = (props: Params) => {
</View> </View>
</View> </View>
</View> </View>
{!!productInfo?.product_screw_id && <Recommend onClick={openProduct} data={recommendData} />}
{!!productInfo?.product_screw_id
&& <View style={{ margin: '20rpx' }}>
<Recommend onClick={openProduct} data={recommendData} />
</View>}
<View className={styles.product_color}> <View className={styles.product_color}>
<View className={styles.title}> ({productInfo?.product_color_list?.length})</View> <View className={styles.title}> ({productInfo?.product_color_list?.length})</View>
<View className={styles.list}> <View className={styles.list}>
@ -358,6 +363,7 @@ const Details = (props: Params) => {
<View className={styles.product_detail}> <View className={styles.product_detail}>
<RichText nodes={html}></RichText> <RichText nodes={html}></RichText>
</View> </View>
</View>
<View className={styles.product_buy}> <View className={styles.product_buy}>
<View className={styles.icon_btn}> <View className={styles.icon_btn}>
{/* <View className={styles.customer_service}> {/* <View className={styles.customer_service}>
@ -443,7 +449,6 @@ const Details = (props: Params) => {
</View> </View>
</Dialog> </Dialog>
<PopupSelectColor onSelected={onCutSampleList} show={showColorSelect} product_id={productInfo.id} onClose={() => setShowColorSelect(false)} /> <PopupSelectColor onSelected={onCutSampleList} show={showColorSelect} product_id={productInfo.id} onClose={() => setShowColorSelect(false)} />
<View className="common_safe_area_y"></View>
</View> </View>
</MoveBtn> </MoveBtn>
) )

View File

@ -4,6 +4,7 @@ page {
flex-flow: column nowrap; flex-flow: column nowrap;
} }
.order_main { .order_main {
height: 100%;
background-color: $color_bg_one; background-color: $color_bg_one;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
@ -24,7 +25,6 @@ page {
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
align-items: center;
text-align: center; text-align: center;
.flexBox { .flexBox {
display: flex; display: flex;
@ -37,7 +37,6 @@ page {
height: 24px; height: 24px;
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
background-color: #ffac00; background-color: #ffac00;
font-size: 20px; font-size: 20px;
@ -112,6 +111,8 @@ page {
} }
} }
.submit_order { .submit_order {
position: relative;
z-index: 9999;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;

View File

@ -223,7 +223,9 @@ const Comfirm = () => {
</View> </View>
</View> </View>
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}> <Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark defaultValue={submitOrderData?.remark} onSave={e => getRemark(e)} /> {
showDesc && <Remark defaultValue={submitOrderData?.remark} onSave={e => getRemark(e)} />
}
</Popup> </Popup>
</View> </View>
</MoveBtn> </MoveBtn>

View File

@ -1,13 +1,24 @@
page {
height: 100vh;
display: flex;
flex-flow: column nowrap;
}
.movable_area { .movable_area {
width: 100%; width: 100%;
} }
.order_main { .order_main {
min-height: 100%;
background-color: $color_bg_one; background-color: $color_bg_one;
padding: 20px;
padding-bottom: 190px;
box-sizing: border-box; box-sizing: border-box;
display: flex;
height: 100%;
flex-flow: column nowrap;
overflow: hidden;
.order_content {
flex: 1 1 auto;
display: flex;
flex-flow: column nowrap;
overflow-y: scroll;
}
.order_title { .order_title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -68,14 +79,15 @@
} }
} }
.submit_order_con { .submit_order_con {
position: fixed; position: relative;
bottom: 0; z-index: 9999;
left: 0;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
box-shadow: 6px 0px 12px 0px rgba(0, 0, 0, 0.16); box-shadow: 6px 0px 12px 0px rgba(0, 0, 0, 0.16);
padding: 20px 20px; padding: 20px 20px;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.order_btn { .order_btn {
width: 152px; width: 152px;
height: 72px; height: 72px;

View File

@ -303,10 +303,13 @@ const Order = () => {
return ( return (
<MoveBtn orderObj={orderDetail} showList={['order']} messageTitle={orderDetail?.order_no} messagePath={`/pages/order/index?id=${orderDetail?.id}`} showCart> <MoveBtn orderObj={orderDetail} showList={['order']} messageTitle={orderDetail?.order_no} messagePath={`/pages/order/index?id=${orderDetail?.id}`} showCart>
<View className={styles.order_main}> <View className={styles.order_main}>
<View className={styles.order_content}>
<View style={{ margin: '20rpx', marginBottom: '0' }}>
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState picUrl={orderDetail?.picUrl} orderInfo={orderDetail} />) || ( {(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState picUrl={orderDetail?.picUrl} orderInfo={orderDetail} />) || (
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} /> <AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
)} )}
<View> </View>
<View style={{ margin: '0 20rpx' }}>
<AddressInfoDetail <AddressInfoDetail
orderInfo={defaultAddress} orderInfo={defaultAddress}
onLogistics={getLogistics} onLogistics={getLogistics}
@ -315,7 +318,11 @@ const Order = () => {
ref={addressRef} ref={addressRef}
/> />
</View> </View>
<View style={{ margin: '0 20rpx' }}>
<KindList order={formatPreViewOrderMemo} /> <KindList order={formatPreViewOrderMemo} />
</View>
<View style={{ margin: '0 20rpx' }}>
<View className={styles.order_info}> <View className={styles.order_info}>
<View className={styles.order_info_title}></View> <View className={styles.order_info_title}></View>
<SearchInput showBorder={false} title="单号" height="50rpx"> <SearchInput showBorder={false} title="单号" height="50rpx">
@ -335,6 +342,8 @@ const Order = () => {
</SearchInput> </SearchInput>
)} )}
</View> </View>
</View>
<View style={{ margin: '0 20rpx' }}>
<View className={styles.order_desc} onClick={descOpen}> <View className={styles.order_desc} onClick={descOpen}>
<View className={styles.order_desc_con}></View> <View className={styles.order_desc_con}></View>
{(orderRemark && <View className={styles.order_desc_text}>{orderDetail?.remark}</View>) || ( {(orderRemark && <View className={styles.order_desc_text}>{orderDetail?.remark}</View>) || (
@ -342,21 +351,23 @@ const Order = () => {
)} )}
<View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View> <View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View>
</View> </View>
</View>
</View>
{orderDetail?.status != SaleOrderStatusCancel.value && ( {orderDetail?.status != SaleOrderStatusCancel.value && (
<View className={styles.submit_order_con}> <View className={styles.submit_order_con}>
<OrderBtns orderInfo={orderInfo} onClick={orderStateClick} /> <OrderBtns orderInfo={orderInfo} onClick={orderStateClick} />
<View className="common_safe_area_y"></View>
</View> </View>
)} )}
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}> <Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark onSave={e => getRemark(e)} defaultValue={orderDetail?.remark} /> {
showDesc && <Remark onSave={e => getRemark(e)} defaultValue={orderDetail?.remark} />
}
</Popup> </Popup>
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={orderDetail} /> <Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={orderDetail} />
<ScanPayCheck show={showScanPayCheck} onClose={() => setShowScanPayCheck(false)} orderInfo={orderDetail} /> <ScanPayCheck show={showScanPayCheck} onClose={() => setShowScanPayCheck(false)} orderInfo={orderDetail} />
<ApplyRefund show={refundShow} onSuccess={applyRefundSuccess} onClose={applyRefundClose} orderId={orderDetail?.id} /> <ApplyRefund show={refundShow} onSuccess={applyRefundSuccess} onClose={applyRefundClose} orderId={orderDetail?.id} />
<ShopCart intoStatus="again" show={showCart} onClose={() => setShowCart(false)} /> <ShopCart intoStatus="again" show={showCart} onClose={() => setShowCart(false)} />
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} /> <ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} />
<View className="common_safe_area_y"></View>
</View> </View>
</MoveBtn> </MoveBtn>
) )

View File

@ -225,13 +225,13 @@ const SpeedComfirm = () => {
</View> </View>
</View> </View>
} }
<View style={{ margin: '20rpx' }}> <View style={{ margin: '0 20rpx' }}>
<AddressInfoDetail orderInfo={defaultAddress} onSelect={getAddress} onChangeShipmentMode={selectShipmentMode} status={1} /> <AddressInfoDetail orderInfo={defaultAddress} onSelect={getAddress} onChangeShipmentMode={selectShipmentMode} status={1} />
</View> </View>
<View style={{ margin: '20rpx', marginTop: '0' }}> <View style={{ margin: '0 20rpx' }}>
<KindList order={formatPreViewOrderMemo} comfirm /> <KindList order={formatPreViewOrderMemo} comfirm />
</View> </View>
<View style={{ margin: '20rpx' }}> <View style={{ margin: '0 20rpx' }}>
<View className={styles.order_desc} onClick={() => setShowDesc(true)}> <View className={styles.order_desc} onClick={() => setShowDesc(true)}>
<View className={styles.order_desc_con}></View> <View className={styles.order_desc_con}></View>
{(submitOrderData?.remark && <View className={styles.order_desc_text}>{submitOrderData?.remark}</View>) || <View className={styles.order_desc_text_hint}></View>} {(submitOrderData?.remark && <View className={styles.order_desc_text}>{submitOrderData?.remark}</View>) || <View className={styles.order_desc_text_hint}></View>}
@ -253,7 +253,9 @@ const SpeedComfirm = () => {
</View> </View>
</View> </View>
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}> <Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark defaultValue={submitOrderData?.remark} onSave={e => getRemark(e)} /> {
showDesc && <Remark defaultValue={submitOrderData?.remark} onSave={e => getRemark(e)} />
}
</Popup> </Popup>
</View> </View>
</MoveBtn> </MoveBtn>

View File

@ -181,7 +181,8 @@ export default () => {
</View> </View>
</View> </View>
<View className={classnames(styles.nav_list, styles.earnings_list)}> {
!userInfo?.adminUserInfo?.is_bd && <View className={classnames(styles.nav_list, styles.earnings_list)}>
<View className={styles.nav_list__title}> <View className={styles.nav_list__title}>
<Text className={styles.title_text}></Text> <Text className={styles.title_text}></Text>
</View> </View>
@ -193,6 +194,7 @@ export default () => {
<View className={styles.more} onClick={() => goLink('/pages/activityIncome/index')}><Text></Text><IconFont name="icon-rukou" size={30} /></View> <View className={styles.more} onClick={() => goLink('/pages/activityIncome/index')}><Text></Text><IconFont name="icon-rukou" size={30} /></View>
</View> </View>
</View> </View>
}
<View className={styles.nav_list}> <View className={styles.nav_list}>
<View className={styles.nav_list__title}> <View className={styles.nav_list__title}>
<Text className={styles.title_text}></Text> <Text className={styles.title_text}></Text>