🐞 fix: 解决由于文件夹名称相同导致build时页面空白问题
This commit is contained in:
parent
765a9b63fa
commit
5d5b809942
@ -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`
|
||||
@ -10,9 +10,9 @@
|
||||
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||
// export const BASE_URL = `https://www.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.42:50002/lymarket' // 杰
|
||||
// export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
|
||||
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
|
||||
|
||||
@ -1,49 +1,49 @@
|
||||
.topItem {
|
||||
.colorCardTopItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.orderNo {
|
||||
.colorCardOrderNo {
|
||||
font-size: 28px;
|
||||
font-weight: 550;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.status {
|
||||
.colorCardStatus {
|
||||
font-size: 28px;
|
||||
font-weight: 550;
|
||||
color: #0d7cff;
|
||||
}
|
||||
}
|
||||
.flexBox {
|
||||
.colorCardFlexBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.pussName {
|
||||
.colorCardPussName {
|
||||
margin-right: 10px;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
.tag {
|
||||
.colorCardTag {
|
||||
background-color: #e3ecff;
|
||||
border-color: transparent;
|
||||
color: #337fff;
|
||||
}
|
||||
}
|
||||
|
||||
.contBox {
|
||||
.colorCardContBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
.leftCont {
|
||||
.colorCardLeftCont {
|
||||
width: 134px;
|
||||
height: 134px;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
.colorCardRightCont {
|
||||
width: calc(100% - 134px);
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
@ -51,13 +51,13 @@
|
||||
overflow: hidden;
|
||||
margin-left: 24px;
|
||||
justify-content: space-between;
|
||||
.rightTop {
|
||||
.colorCardRightTop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
|
||||
.productName {
|
||||
.colorCardProductName {
|
||||
width: 70%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@ -67,7 +67,7 @@
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.shipMode {
|
||||
.colorCardShipMode {
|
||||
width: 25%;
|
||||
font-size: 28px;
|
||||
color: #000000;
|
||||
@ -79,11 +79,11 @@
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
|
||||
.colorsBox {
|
||||
.colorCardColorsBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.colorName {
|
||||
.colorCardColorName {
|
||||
flex: 1;
|
||||
font-size: 28px;
|
||||
color: #797979;
|
||||
@ -93,38 +93,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
.lineOne {
|
||||
// width: 638px;
|
||||
margin-right: 32px;
|
||||
height: 1px;
|
||||
background: #e7e7e7;
|
||||
// opacity: 0.1;
|
||||
margin-left: 32px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.bottomMsg {
|
||||
.colorCardBottomMsg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.msgLeft {
|
||||
.colorCardMsgLeft {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
|
||||
.msgRight {
|
||||
.colorCardMsgRight {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
}
|
||||
.paymentMethod {
|
||||
.colorCardPaymentMethod {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.msgRightOne {
|
||||
.colorCardMsgRightOne {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #f64861;
|
||||
@ -132,7 +122,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
.colorCardBottomBox {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 32px;
|
||||
@ -0,0 +1,94 @@
|
||||
import type { ITouchEvent } from '@tarojs/components'
|
||||
import { ScrollView, View } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import { formatRemoveHashTag } from '@/common/format'
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import Divider from '@/components/divider'
|
||||
import Tag from '@/components/tag'
|
||||
import LayoutBlock from '@/components/layoutBlock'
|
||||
import { goLink } from '@/common/common'
|
||||
|
||||
interface PropsType {
|
||||
data?: any
|
||||
cancel?: (e: ITouchEvent) => void
|
||||
}
|
||||
const ItemList = (props: PropsType) => {
|
||||
const { data, cancel } = props
|
||||
console.log('data===>', data)
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
return { lab: item?.lab, rgb: item?.rgb, texture_url: item?.texture_url }
|
||||
}, [])
|
||||
// // 进入详情页
|
||||
const navTo = () => {
|
||||
goLink('/pages/getColorCard/colorCardDetail/index', { id: data?.order_id })
|
||||
}
|
||||
|
||||
return (
|
||||
<LayoutBlock onClick={navTo} circle>
|
||||
<View className={styles.colorCardTopItem}>
|
||||
<View className={styles.colorCardOrderNo}>单号:{data.order_no}</View>
|
||||
<View className={styles.colorCardStatus}>{data.order_status_name}</View>
|
||||
</View>
|
||||
<View className={styles.colorCardFlexBox}>
|
||||
<View className={styles.colorCardPussName}>{data.purchaser_name}</View>
|
||||
{
|
||||
data.sale_user_name && <Tag type="primary" size="normal" circle customClassName={styles.colorCardTag} plain>
|
||||
{data.sale_user_name}
|
||||
</Tag>
|
||||
}
|
||||
</View>
|
||||
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
|
||||
<View className={styles.colorCardContBox}>
|
||||
<View style={{ minWidth: '24%' }}>
|
||||
<View className={styles.colorCardLeftCont}>
|
||||
<LabAndImg value={labAndImgObj(data.color_card_info?.[0])} />
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className={styles.colorCardRightCont}>
|
||||
<View className={styles.colorCardRightTop}>
|
||||
<View className={styles.colorCardProductName}>{data?.color_card_info[0]?.name}</View>
|
||||
<View className={styles.colorCardShipMode}>{data?.shipment_mode_name}</View>
|
||||
</View>
|
||||
<View className={styles.colorCardRightContTags}>
|
||||
{data?.color_card_info[0]?.affiliation_product?.map((item, index) => {
|
||||
return <Tag customStyle={{ marginRight: '5px', marginBottom: '2px', padding: '5px', background: '#e3ecff', color: '#558cff', borderColor: '#e3ecff' }} key={index} size="small" circle>{formatRemoveHashTag(item.code)}</Tag>
|
||||
})
|
||||
}
|
||||
|
||||
</View>
|
||||
<View className={styles.colorCardColorsBox}>
|
||||
<View className={styles.colorCardColorName}>x{data?.color_card_info?.[0]?.count || 0}本</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
|
||||
<View className={styles.colorCardBottomMsg}>
|
||||
<View className={styles.colorCardMsgLeft}>色卡信息:</View>
|
||||
<View className={styles.colorCardMsgRight}>{data?.color_card_count || 0} 种色卡,共 {data?.color_card_number || 0} 本</View>
|
||||
</View>
|
||||
<View className={styles.colorCardPaymentMethod}>
|
||||
<View className={styles.colorCardMsgRightOne}>快递到付</View>
|
||||
</View>
|
||||
<View className={styles.colorCardBottomBox}>
|
||||
{
|
||||
data?.order_status === 1 && <NormalButton
|
||||
customStyles={{ fontSize: '14px' }}
|
||||
type="info"
|
||||
size="normal"
|
||||
round
|
||||
plain
|
||||
onClick={cancel}
|
||||
>
|
||||
取消订单
|
||||
</NormalButton>
|
||||
}
|
||||
|
||||
</View>
|
||||
</LayoutBlock>
|
||||
)
|
||||
}
|
||||
export default memo(ItemList)
|
||||
@ -1,95 +0,0 @@
|
||||
import type { ITouchEvent } from '@tarojs/components'
|
||||
import { ScrollView, View } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import Divider from '@/components/divider'
|
||||
import Tag from '@/components/tag'
|
||||
import LayoutBlock from '@/components/layoutBlock'
|
||||
import { goLink } from '@/common/common'
|
||||
import { formatRemoveHashTag } from '@/common/format'
|
||||
|
||||
interface PropsType {
|
||||
data?: any
|
||||
cancel?: (e: ITouchEvent) => void
|
||||
}
|
||||
const ItemList = (props: PropsType) => {
|
||||
const { data, cancel } = props
|
||||
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
return { lab: item?.lab, rgb: item?.rgb, texture_url: item?.texture_url }
|
||||
}, [])
|
||||
// 进入详情页
|
||||
const navTo = () => {
|
||||
goLink('/pages/getColorCard/colorCardDetail/index', { id: data.order_id })
|
||||
}
|
||||
|
||||
return (
|
||||
<LayoutBlock onClick={navTo} circle>
|
||||
<View className={styles.topItem}>
|
||||
<View className={styles.orderNo}>单号:{data.order_no}</View>
|
||||
<View className={styles.status}>{data.order_status_name}</View>
|
||||
</View>
|
||||
<View className={styles.flexBox}>
|
||||
<View className={styles.pussName}>{data.purchaser_name}</View>
|
||||
{
|
||||
data.sale_user_name && <Tag type="primary" size="normal" circle customClassName={styles.tag} plain>
|
||||
{data.sale_user_name}
|
||||
</Tag>
|
||||
}
|
||||
|
||||
</View>
|
||||
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
|
||||
<View className={styles.contBox}>
|
||||
<View style={{ minWidth: '24%' }}>
|
||||
<View className={styles.leftCont}>
|
||||
<LabAndImg value={labAndImgObj(data.color_card_info?.[0])} />
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className={styles.rightCont}>
|
||||
<View className={styles.rightTop}>
|
||||
<View className={styles.productName}>{data.color_card_info?.[0]?.name}</View>
|
||||
<View className={styles.shipMode}>{data.shipment_mode_name}</View>
|
||||
</View>
|
||||
<View className={styles.rightContTags}>
|
||||
{
|
||||
data.color_card_info?.[0]?.affiliation_product?.map((item, index) => {
|
||||
return <Tag customStyle={{ marginRight: '5px', marginBottom: '2px', padding: '5px', background: '#e3ecff', color: '#558cff', borderColor: '#e3ecff' }} key={index} size="small" circle>{formatRemoveHashTag(item.code)}</Tag>
|
||||
})
|
||||
}
|
||||
|
||||
</View>
|
||||
<View className={styles.colorsBox}>
|
||||
<View className={styles.colorName}>x{data.color_card_info?.[0]?.count || 0}本</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
|
||||
<View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>色卡信息:</View>
|
||||
<View className={styles.msgRight}>{data?.color_card_count || 0} 种色卡,共 {data?.color_card_number || 0} 本</View>
|
||||
</View>
|
||||
<View className={styles.paymentMethod}>
|
||||
<View className={styles.msgRightOne}>快递到付</View>
|
||||
</View>
|
||||
<View className={styles.bottomBox}>
|
||||
{
|
||||
data.order_status === 1 && <NormalButton
|
||||
customStyles={{ fontSize: '14px' }}
|
||||
type="info"
|
||||
size="normal"
|
||||
round
|
||||
plain
|
||||
onClick={cancel}
|
||||
>
|
||||
取消订单
|
||||
</NormalButton>
|
||||
}
|
||||
|
||||
</View>
|
||||
</LayoutBlock>
|
||||
)
|
||||
}
|
||||
export default memo(ItemList)
|
||||
@ -1,9 +1,8 @@
|
||||
import type { ITouchEvent } from '@tarojs/components'
|
||||
import { View } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import Taro, { useReady } from '@tarojs/taro'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import ItemList from './components/itemList'
|
||||
import ItemList from './components/colorCardItemList'
|
||||
import Search from '@/components/search'
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
@ -25,8 +24,8 @@ const GetColorCard = () => {
|
||||
setRefresherTriggeredStatus(false)
|
||||
}
|
||||
|
||||
// status 1 申请中 2 已完成
|
||||
// 页码和页数
|
||||
// // status 1 申请中 2 已完成
|
||||
// // 页码和页数
|
||||
const [searchField, setSearchField] = useState<{ name?: string; status?: number; page: number; size: number }>({
|
||||
name: '',
|
||||
status: 0,
|
||||
@ -35,9 +34,9 @@ const GetColorCard = () => {
|
||||
})
|
||||
const [colorList, setColorList] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
|
||||
|
||||
// 列表下拉刷新
|
||||
// // 列表下拉刷新
|
||||
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
||||
// 数据加载状态
|
||||
// // 数据加载状态
|
||||
const statusMore = useMemo(() => {
|
||||
return dataLoadingStatus({ list: colorList.list, total: colorList.total, status: state.loading! })
|
||||
}, [colorList, state.loading])
|
||||
@ -87,7 +86,7 @@ const GetColorCard = () => {
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
const handleCancel = (e: ITouchEvent, id: number) => {
|
||||
const handleCancel = (e, id: number) => {
|
||||
e.stopPropagation()
|
||||
Taro.showModal({
|
||||
content: '确定取消该订单?',
|
||||
@ -102,12 +101,6 @@ const GetColorCard = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 监听选择的类型
|
||||
// useEffect(() => {
|
||||
// setSearchObj(search)
|
||||
// if (search.goodsId) { getGoodList() }
|
||||
// }, [search])
|
||||
|
||||
return <View className={styles.main}>
|
||||
<View className={styles.search}>
|
||||
<Search placeholder="请输入客户或业务员" showBtn={false} changeOnSearch={getSearchData} />
|
||||
@ -123,10 +116,10 @@ const GetColorCard = () => {
|
||||
selfOnRefresherRefresh={getRefresherRefresh}
|
||||
safeAreaInsetBottom={false}
|
||||
>
|
||||
{colorList?.list?.map((item, index) => {
|
||||
{colorList?.list?.map((item) => {
|
||||
return (
|
||||
<View key={item.id} className={styles.order_item}>
|
||||
<ItemList data={item} key={index} cancel={e => handleCancel(e, item.order_id)}></ItemList>
|
||||
<ItemList data={item} cancel={e => handleCancel(e, item.order_id)}></ItemList>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
|
||||
@ -8,7 +8,6 @@ import Search from '@/components/search'
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
|
||||
import FilterButton from '@/components/filterButton'
|
||||
import { alert, goLink } from '@/common/common'
|
||||
import Empty from '@/components/empty'
|
||||
import { COLOR_CARD_LIST_EMPTY_IMAGE } from '@/common/constant'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user