1
This commit is contained in:
parent
f0cdb49ebc
commit
f1cc28bd0b
@ -6,11 +6,11 @@
|
|||||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||||
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
||||||
export const BASE_URL = `http://192.168.1.30:50001/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://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.4:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `http://192.168.1.224:50001/lymarket` // 添
|
export const BASE_URL = `http://192.168.1.224:50001/lymarket` // 添
|
||||||
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
@ -22,6 +22,7 @@ export const UPLOAD_CDN_URL = `https://v0.api.upyun.com/`
|
|||||||
export const IMG_CND_Prefix = CURRENT_ENV.includes('development')? "https://test.cdn.zzfzyc.com":"https://cdn.zzfzyc.com"
|
export const IMG_CND_Prefix = CURRENT_ENV.includes('development')? "https://test.cdn.zzfzyc.com":"https://cdn.zzfzyc.com"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 上传图片视频
|
// 上传图片视频
|
||||||
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`;
|
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`;
|
||||||
|
|
||||||
|
@ -142,5 +142,22 @@ export const toDecimal2 = (x) => {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const formatImgUrl = (url, suffix="!w200") => {
|
export const formatImgUrl = (url, suffix="!w200") => {
|
||||||
return url?IMG_CND_Prefix + url + suffix:'https://cdn.zzfzyc.com/mall/no_img.png'
|
return url?IMG_CND_Prefix + url + suffix:IMG_CND_Prefix +'/mall/no_img.png'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {纹理图} imgurl
|
||||||
|
* @param {rgb} rgb
|
||||||
|
* @param {} suffix
|
||||||
|
* @returns 1 有纹理图,2 有rgb 3默认图
|
||||||
|
*/
|
||||||
|
export const isLabImage = (imgurl, rgb, suffix="!w200") => {
|
||||||
|
if(imgurl) {
|
||||||
|
return {status:1, value: IMG_CND_Prefix+'/'+imgurl+suffix}
|
||||||
|
} else if(rgb.r != 0 || rgb.g != 0 || rgb.b != 0) {
|
||||||
|
return {status:2, value: rgb}
|
||||||
|
} else {
|
||||||
|
return {status:3, value: IMG_CND_Prefix+'/mall/no_img.png'}
|
||||||
|
}
|
||||||
}
|
}
|
@ -71,12 +71,12 @@ export default memo(forwardRef(({
|
|||||||
<View className={styles.search_main} >
|
<View className={styles.search_main} >
|
||||||
<View className={styles.search_con}>
|
<View className={styles.search_con}>
|
||||||
{showIcon&&<View className={classnames('iconfont', 'icon-sousuo', styles.icon_a_sousuo1_self, placeIcon=='inner'?styles.icon_inner:styles.icon_out)}></View>}
|
{showIcon&&<View className={classnames('iconfont', 'icon-sousuo', styles.icon_a_sousuo1_self, placeIcon=='inner'?styles.icon_inner:styles.icon_out)}></View>}
|
||||||
<Input placeholderStyle='color:#ABABAB; font-size:26rpx' className={classnames(placeIcon=='out'&&styles.input_out)} disabled={disabled} value={inputCon} placeholder={placeholder} onInput={(e) => onInputEven(e)}></Input>
|
<Input placeholderStyle='color:#ABABAB; font-size:26rpx' onConfirm={onSearch} className={classnames(placeIcon=='out'&&styles.input_out)} disabled={disabled} value={inputCon} placeholder={placeholder} onInput={(e) => onInputEven(e)}></Input>
|
||||||
{!!inputCon&&<View className={styles.search_closeBtn}>
|
{!!inputCon&&<View className={styles.search_closeBtn}>
|
||||||
<CloseBtn onClose={() => clearInput()} styleObj={{width: '20rpx', height:'20rpx', backgroundColor:'#fff', border:'0'}}/>
|
<CloseBtn onClose={() => clearInput()} styleObj={{width: '20rpx', height:'20rpx', backgroundColor:'#fff', border:'0'}}/>
|
||||||
</View>}
|
</View>}
|
||||||
</View>
|
</View>
|
||||||
{showBtn&&<View style={btnStyle} className={styles.btn} onClick = {() => onSearch()}>{btnTitle}</View>}
|
{showBtn&&<View style={btnStyle} className={styles.btn} onClick = {onSearch}>{btnTitle}</View>}
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -226,7 +226,7 @@ import styles from './index.module.scss'
|
|||||||
<Remark onSave={(e) => getRemark(e)}/>
|
<Remark onSave={(e) => getRemark(e)}/>
|
||||||
</Popup>
|
</Popup>
|
||||||
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={payOrderInfo} />
|
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={payOrderInfo} />
|
||||||
{/* <ApplyAfterSales/> */}
|
<ApplyAfterSales/>
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -108,6 +108,7 @@ export default () => {
|
|||||||
|
|
||||||
//获取筛选条件
|
//获取筛选条件
|
||||||
const getFiltr = (e) => {
|
const getFiltr = (e) => {
|
||||||
|
setMaterialList(() => ({list:[], total:0}))
|
||||||
const {data} = e
|
const {data} = e
|
||||||
setSearchField({
|
setSearchField({
|
||||||
...searchField,
|
...searchField,
|
||||||
@ -123,7 +124,6 @@ export default () => {
|
|||||||
//筛选条件格式化
|
//筛选条件格式化
|
||||||
const [selectList , setSelectList] = useState<ListProps[]>()
|
const [selectList , setSelectList] = useState<ListProps[]>()
|
||||||
const formatSelectList = (val = {data:{}, field:{}}) => {
|
const formatSelectList = (val = {data:{}, field:{}}) => {
|
||||||
console.log('data123::',val.data)
|
|
||||||
let data:ListProps[] = []
|
let data:ListProps[] = []
|
||||||
for(let key in val.data) {
|
for(let key in val.data) {
|
||||||
if(key !== 'seriesId'&& val.data[key] != '') {
|
if(key !== 'seriesId'&& val.data[key] != '') {
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
.main{
|
.main{
|
||||||
|
position: relative;
|
||||||
.search{
|
.search{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
.up_search{
|
||||||
|
color: $color_main;
|
||||||
|
font-size: $font_size;
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
.hot {
|
.hot {
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
.hot_header {
|
.hot_header {
|
||||||
@ -18,10 +24,9 @@
|
|||||||
color: $color_font_one;
|
color: $color_font_one;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.hot_header_up{
|
|
||||||
color: $color_main;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.list{
|
.list{
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
|
@ -69,18 +69,18 @@ export default () => {
|
|||||||
<View className={styles.search}>
|
<View className={styles.search}>
|
||||||
<Search style={{width: '100%'}} placeholder="请输入面料关键词" placeIcon="out" showBtn={true} clickOnSearch={(e) => searchEvent(e)}/>
|
<Search style={{width: '100%'}} placeholder="请输入面料关键词" placeIcon="out" showBtn={true} clickOnSearch={(e) => searchEvent(e)}/>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.hot}>
|
<View className={styles.up_search} onClick={() => goLink('/pages/searchList/searchList')}>高级搜索</View>
|
||||||
|
{searchData?.hotField.length > 0 && <View className={styles.hot}>
|
||||||
<View className={styles.hot_header}>
|
<View className={styles.hot_header}>
|
||||||
<View className={styles.hot_header_title}>热门面料</View>
|
<View className={styles.hot_header_title}>热门面料</View>
|
||||||
<View className={styles.hot_header_up} onClick={() => goLink('/pages/searchList/searchList')}>高级搜索</View>
|
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.list}>
|
<View className={styles.list}>
|
||||||
{searchData?.hotField?.map((item, index) => {
|
{searchData.hotField.map((item, index) => {
|
||||||
return <View key={index} className={styles.item} onClick={() => searchEvent(item.search_key, false)}>{item.search_key}</View>
|
return <View key={index} className={styles.item} onClick={() => searchEvent(item.search_key, false)}>{item.search_key}</View>
|
||||||
})}
|
})}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>}
|
||||||
<View className={styles.history}>
|
{searchData?.historyField.length > 0 && <View className={styles.history}>
|
||||||
<View className={styles.history_header}>
|
<View className={styles.history_header}>
|
||||||
<View className={styles.history_header_title}>历史搜索</View>
|
<View className={styles.history_header_title}>历史搜索</View>
|
||||||
<View className={classnames('iconfont icon-lajixiang', styles.miconfont)}></View>
|
<View className={classnames('iconfont icon-lajixiang', styles.miconfont)}></View>
|
||||||
@ -88,7 +88,7 @@ export default () => {
|
|||||||
<View className={styles.list}>
|
<View className={styles.list}>
|
||||||
{searchData?.historyField?.map((item, index) => <View key={index} className={styles.item} onClick={() => searchEvent(item.search_key, false)}>{item.search_key}</View>)}
|
{searchData?.historyField?.map((item, index) => <View key={index} className={styles.item} onClick={() => searchEvent(item.search_key, false)}>{item.search_key}</View>)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,10 @@ import SelectData, {ListProps} from "./components/selectData";
|
|||||||
import { goLink } from "@/common/common";
|
import { goLink } from "@/common/common";
|
||||||
import styles from './searchList.module.scss'
|
import styles from './searchList.module.scss'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import useManualPullDownRefresh from "@/use/useManualPullDownRefresh";
|
|
||||||
import {GetProductListApi} from "@/api/material"
|
import {GetProductListApi} from "@/api/material"
|
||||||
import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
|
import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
|
||||||
import { formatHashTag, formatImgUrl } from "@/common/fotmat";
|
import { formatHashTag, formatImgUrl } from "@/common/fotmat";
|
||||||
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
||||||
import LoadingCard from "@/components/loadingCard";
|
|
||||||
import useLogin from "@/use/useLogin";
|
import useLogin from "@/use/useLogin";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
@ -95,6 +93,7 @@ export default () => {
|
|||||||
//获取筛选条件
|
//获取筛选条件
|
||||||
const getFiltr = (e) => {
|
const getFiltr = (e) => {
|
||||||
pageNum.current.page = 1
|
pageNum.current.page = 1
|
||||||
|
setMaterialList(() => ({list:[], total:0}))
|
||||||
const {data} = e
|
const {data} = e
|
||||||
setSearchField({
|
setSearchField({
|
||||||
...searchField,
|
...searchField,
|
||||||
@ -110,14 +109,12 @@ export default () => {
|
|||||||
//筛选条件格式化
|
//筛选条件格式化
|
||||||
const [selectList , setSelectList] = useState<ListProps[]>()
|
const [selectList , setSelectList] = useState<ListProps[]>()
|
||||||
const formatSelectList = (val = {data:{}, field:{}}) => {
|
const formatSelectList = (val = {data:{}, field:{}}) => {
|
||||||
console.log('data123::',val.data)
|
|
||||||
let data:ListProps[] = []
|
let data:ListProps[] = []
|
||||||
for(let key in val.data) {
|
for(let key in val.data) {
|
||||||
if(key !== 'seriesId'&& val.data[key] != '') {
|
if(key !== 'seriesId'&& val.data[key] != '') {
|
||||||
data.push({title:val.field[key], value:val.data[key]})
|
data.push({title:val.field[key], value:val.data[key]})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('data::',data)
|
|
||||||
setSelectList([...data])
|
setSelectList([...data])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,8 +153,8 @@ export default () => {
|
|||||||
<View className={classnames(styles.list_num, scrollStatus&&styles.list_num_shadow)}>搜索结果 ({materialList.total}条记录)</View>
|
<View className={classnames(styles.list_num, scrollStatus&&styles.list_num_shadow)}>搜索结果 ({materialList.total}条记录)</View>
|
||||||
<View className={styles.scroll}>
|
<View className={styles.scroll}>
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
selfonScrollToLower={() => getScrolltolower()}
|
selfonScrollToLower={getScrolltolower}
|
||||||
selfOnScroll={(e) => onscroll(e)}
|
selfOnScroll={onscroll}
|
||||||
statusMore={statusMore}
|
statusMore={statusMore}
|
||||||
>
|
>
|
||||||
<View className={styles.product_list}>
|
<View className={styles.product_list}>
|
||||||
|
@ -79,6 +79,7 @@ export default () => {
|
|||||||
reslove(user_res.data)
|
reslove(user_res.data)
|
||||||
getAdminUserInfo()
|
getAdminUserInfo()
|
||||||
} else {
|
} else {
|
||||||
|
console.log('aaa:::',user_res.msg)
|
||||||
reject(user_res.msg)
|
reject(user_res.msg)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user