Merge branch 'dev' of http://git.online.zzfzyc.com/mp/EShop into dev
This commit is contained in:
commit
674e9062e1
@ -84,9 +84,19 @@ export const SaleOrderApi = () => {
|
|||||||
/**
|
/**
|
||||||
* 作废销售单
|
* 作废销售单
|
||||||
*/
|
*/
|
||||||
export const CancelOrderApi = () => {
|
export const CancelOrderApi = () => {
|
||||||
return useRequest({
|
return useRequest({
|
||||||
url: `/v1/mall/saleOrder/cancel`,
|
url: `/v1/mall/saleOrder/cancel`,
|
||||||
method: "put",
|
method: "put",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认收货
|
||||||
|
*/
|
||||||
|
export const ReceiveOrderApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/saleOrder/receive`,
|
||||||
|
method: "put",
|
||||||
|
})
|
||||||
|
}
|
@ -164,6 +164,12 @@ export default {
|
|||||||
pages: [
|
pages: [
|
||||||
"index",
|
"index",
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
root: "pages/applyAfterSales",
|
||||||
|
pages: [
|
||||||
|
"index",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,15 @@
|
|||||||
// 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` // 正式环境
|
||||||
|
<<<<<<< HEAD
|
||||||
// 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.5:40001/lymarket` // 王霞
|
||||||
|
>>>>>>> 订单售后v2
|
||||||
|
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 +26,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'}
|
||||||
|
}
|
||||||
}
|
}
|
@ -129,22 +129,4 @@ const uploadCDNImg = (file, secene, type) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const taroChooseImg = () => {
|
|
||||||
Taro.chooseImage({
|
|
||||||
count: 1,
|
|
||||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
|
||||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
|
||||||
success: (res) => {
|
|
||||||
console.log('res:', res)
|
|
||||||
Taro.chooseMessageFile({
|
|
||||||
count: 1,
|
|
||||||
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
console.log('图片选择失败:', err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default uploadCDNImg
|
export default uploadCDNImg
|
@ -2,13 +2,23 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
// margin-top: 30px;
|
// margin-top: 30px;
|
||||||
|
.scroll{
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.list_scroll{
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
.btns_item{
|
.btns_item{
|
||||||
width: 152px;
|
padding: 0 10px;
|
||||||
height: 72px;
|
height: 60px;
|
||||||
border: 2px solid #dddddd;
|
border: 2px solid #dddddd;
|
||||||
border-radius: 38px;
|
border-radius: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 72px;
|
line-height: 60px;
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
color: $color_font_three;
|
color: $color_font_three;
|
||||||
&:nth-child(n+2) {
|
&:nth-child(n+2) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { CancelOrderApi } from "@/api/order"
|
import { CancelOrderApi, ReceiveOrderApi } from "@/api/order"
|
||||||
import { alert } from "@/common/common"
|
import { alert } from "@/common/common"
|
||||||
import { ORDER_STATUS } from "@/common/enum"
|
import { ORDER_STATUS } from "@/common/enum"
|
||||||
import { View } from "@tarojs/components"
|
import { ScrollView, View } from "@tarojs/components"
|
||||||
import Taro from "@tarojs/taro"
|
import Taro from "@tarojs/taro"
|
||||||
import { useCallback, useRef, memo } from "react"
|
import { useCallback, useRef, memo, useState, useEffect } from "react"
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
type Param = {
|
type Param = {
|
||||||
@ -24,7 +24,6 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
SaleOrderStatusArranged,
|
SaleOrderStatusArranged,
|
||||||
SaleOrderStatusWaitingDelivery,
|
SaleOrderStatusWaitingDelivery,
|
||||||
SaleOrderStatusComplete,
|
SaleOrderStatusComplete,
|
||||||
SaleOrderStatusCancel,
|
|
||||||
SaleOrderStatusRefund,
|
SaleOrderStatusRefund,
|
||||||
SaleOrderStatusWaitingPayment,
|
SaleOrderStatusWaitingPayment,
|
||||||
SaleOrderStatusWaitingReceipt,
|
SaleOrderStatusWaitingReceipt,
|
||||||
@ -73,23 +72,27 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
if(orderInfo) {
|
if(orderInfo) {
|
||||||
if(item.id == 1) {
|
if(item.id == 1) {
|
||||||
//取消订单按钮
|
//取消订单按钮
|
||||||
return( orderInfo.actual_amount == 0 && item.value.includes(orderInfo.status)) //在代发货之前没有付过款
|
return( orderInfo.actual_amount == 0 && item.value.includes(orderInfo.status)) //在待发货之前没有付过款
|
||||||
} else if (item.id == 2) {
|
} else if (item.id == 2) {
|
||||||
//去付款按钮
|
//去付款按钮
|
||||||
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示
|
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示
|
||||||
} else if(item.id == 3) {
|
} else if(item.id == 3) {
|
||||||
//申请退款
|
//申请退款
|
||||||
return (orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //在代发货之前付过款
|
return (orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //在待发货之前付过款
|
||||||
} else {
|
} else {
|
||||||
|
//其他按钮
|
||||||
return item.value.includes(orderInfo.status)
|
return item.value.includes(orderInfo.status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},[orderInfo])
|
},[orderInfo])
|
||||||
|
|
||||||
//点击按钮操作
|
//点击按钮操作
|
||||||
const submitBtns = (val) => {
|
const submitBtns = (val, index) => {
|
||||||
|
clickEvent(val, index);
|
||||||
(val == 1)&&cancelOrder(); //取消订单按钮
|
(val == 1)&&cancelOrder(); //取消订单按钮
|
||||||
(val == 2)&&onClick?.(val); //去付款按钮
|
(val == 2)&&onClick?.(2); //去付款按钮
|
||||||
|
(val == 6)&&receiveOrder(); //确认收货
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//取消订单
|
//取消订单
|
||||||
@ -113,11 +116,53 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//确认订单
|
||||||
|
const {fetchData: receiveOrderFetchData} = ReceiveOrderApi()
|
||||||
|
const receiveOrder = async () => {
|
||||||
|
console.log('123456')
|
||||||
|
Taro.showModal({
|
||||||
|
title: '确定收货?',
|
||||||
|
success: async function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
let res = await receiveOrderFetchData({sale_order_id: orderInfo?.orderId})
|
||||||
|
if(res.success){
|
||||||
|
onClick?.(6)
|
||||||
|
alert.success('收货成功')
|
||||||
|
} else {
|
||||||
|
alert.error('收货失败')
|
||||||
|
}
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//按钮点击滚动
|
||||||
|
const [selectInfo, setSelectInfo] = useState({
|
||||||
|
selected: -1, //当前选中的id
|
||||||
|
tabId: '', //需要滚动到的id
|
||||||
|
})
|
||||||
|
const clickEvent = (id, index) => {
|
||||||
|
console.log(id, index)
|
||||||
|
const num = index > 0?( index - 1) : 0
|
||||||
|
console.log('num::',orderBtnsList.current[num].id)
|
||||||
|
setSelectInfo((e) => ({...e, tabId:orderBtnsList.current[num].id.toString(), selected: id}))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.btns_list}>
|
<View className={styles.btns_list}>
|
||||||
{orderBtnsList.current.map((item) =>
|
<ScrollView scrollX scrollIntoView={`orderBtns_${selectInfo.tabId}`} scrollWithAnimation={true} className={styles.scroll}>
|
||||||
orderBtnsShow(item)&&<View key={item.id} className={styles.btns_item} onClick={() => submitBtns(item.id)}>{item.label}</View>
|
<View className={styles.list_scroll}>
|
||||||
|
{orderBtnsList.current.map((item, index) =>
|
||||||
|
orderBtnsShow(item)&&<View key={item.id} className={styles.btns_item} onClick={() => submitBtns(item.id, index)}>{item.label}</View>
|
||||||
|
// <View key={item.id} id={`orderBtns_${item.id}`} className={styles.btns_item} onClick={() => submitBtns(item.id, index)}>{item.label}</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
@ -62,7 +62,7 @@ export default memo((
|
|||||||
</View>}
|
</View>}
|
||||||
|
|
||||||
<View className={style.drawer_container_context}>
|
<View className={style.drawer_container_context}>
|
||||||
{children}
|
{show&&children}
|
||||||
</View>
|
</View>
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -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>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -117,8 +117,6 @@ export default ({show = false, onClose}: param) => {
|
|||||||
if(item.select) select_count++
|
if(item.select) select_count++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('list_count::',list_count)
|
|
||||||
console.log('select_count::',select_count)
|
|
||||||
setSelectStatus(select_count == list_count)
|
setSelectStatus(select_count == list_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
.other_desc{
|
||||||
|
padding: 0 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title{
|
||||||
|
font-size: $font_size;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.textarea{
|
||||||
|
position: relative;
|
||||||
|
height: 165.4px;
|
||||||
|
.descDataNum{
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
bottom: 10px;
|
||||||
|
font-size: 22px;
|
||||||
|
color: #ABABAB;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.textarea_con, .textarea_con_pretend{
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
border: 2px solid #e6e6e6;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 25px;
|
||||||
|
height: 165.4px;
|
||||||
|
padding: 20px 20px 30px 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.textarea_con_pretend{
|
||||||
|
color: $color_font_two;
|
||||||
|
}
|
||||||
|
.textarea_con_pretend_ed{
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
}
|
37
src/pages/applyAfterSales/components/otherReason/index.tsx
Normal file
37
src/pages/applyAfterSales/components/otherReason/index.tsx
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import {Textarea, View } from "@tarojs/components";
|
||||||
|
import { memo, useMemo, useState } from "react";
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import classnames from "classnames";
|
||||||
|
|
||||||
|
//其他说明
|
||||||
|
export default memo(() => {
|
||||||
|
const [descData, setDescData] = useState({
|
||||||
|
number: 0,
|
||||||
|
value: '',
|
||||||
|
count: 200,
|
||||||
|
show: false
|
||||||
|
})
|
||||||
|
const getDesc = (e) => {
|
||||||
|
let value = e.detail.value
|
||||||
|
let res = value
|
||||||
|
if(value.length > descData.count) {
|
||||||
|
res = value.slice(0, descData.count)
|
||||||
|
}
|
||||||
|
setDescData({...descData, number:res.length, value: res})
|
||||||
|
}
|
||||||
|
|
||||||
|
const toggleShowRealTextarea = (show) => {
|
||||||
|
setDescData({...descData, show:show})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<View className={styles.other_desc}>
|
||||||
|
<View className={styles.title}>其他说明</View>
|
||||||
|
<View className={styles.textarea}>
|
||||||
|
{descData.show&&<Textarea autoFocus value={descData.value} onBlur={() => toggleShowRealTextarea(false)} className={styles.textarea_con} cursorSpacing={100} maxlength={descData.count} onInput={(e) => getDesc(e)}></Textarea>||
|
||||||
|
<View className={classnames(styles.textarea_con_pretend, descData.value&&styles.textarea_con_pretend_ed)} onClick={() => toggleShowRealTextarea(true)}>{descData.value||'一般情况下选填,当退货说明=“其它问题”时,必填'}</View>
|
||||||
|
}
|
||||||
|
<View className={styles.descDataNum}>{descData.number +'/'+ descData.count}</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
})
|
@ -0,0 +1,27 @@
|
|||||||
|
.reason_return_con{
|
||||||
|
height: 50vh;
|
||||||
|
.reason_title{
|
||||||
|
padding: 10px 20px 0 20px;
|
||||||
|
height: 60px;
|
||||||
|
border-bottom: 1PX solid #F3F3F3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
Text{
|
||||||
|
font-size: 26px;
|
||||||
|
border-bottom: 3px solid #000;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.reason_scroll{
|
||||||
|
height: calc(100% - 70px);
|
||||||
|
.reason_list{
|
||||||
|
font-size: 26px;
|
||||||
|
padding: 30px 20px 0 20px;
|
||||||
|
color: #707070;
|
||||||
|
.reason_item{
|
||||||
|
margin-bottom: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
44
src/pages/applyAfterSales/components/reasonPopup/index.tsx
Normal file
44
src/pages/applyAfterSales/components/reasonPopup/index.tsx
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import Popup from "@/components/popup";
|
||||||
|
import { ScrollView, Text, View } from "@tarojs/components";
|
||||||
|
import { memo, useMemo } from "react";
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
|
type ReasonParam = 1|2|3 //1 退货原因 2 货物状况 3 退货说明
|
||||||
|
//原因选择
|
||||||
|
type ReasonInfoParam = {
|
||||||
|
show?: boolean,
|
||||||
|
onClose?: () => void,
|
||||||
|
status: ReasonParam
|
||||||
|
}
|
||||||
|
export default memo(({show = false, onClose, status}: ReasonInfoParam) => {
|
||||||
|
const title = useMemo(() => {
|
||||||
|
if(status == 1) return '退货原因'
|
||||||
|
if(status == 2) return '货物状况'
|
||||||
|
if(status == 3) return '退货说明'
|
||||||
|
},[status])
|
||||||
|
return (
|
||||||
|
<Popup showIconButton={false} show={show} title="申请退货" onClose={onClose} >
|
||||||
|
<View className={styles.reason_return_con}>
|
||||||
|
<View className={styles.reason_title}><Text>{title}</Text></View>
|
||||||
|
<ScrollView scrollY className={styles.reason_scroll}>
|
||||||
|
<View className={styles.reason_list}>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
<View className={styles.reason_item}>完好无损带原标签</View>
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
</Popup>
|
||||||
|
)
|
||||||
|
})
|
4
src/pages/applyAfterSales/index.config.ts
Normal file
4
src/pages/applyAfterSales/index.config.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export default {
|
||||||
|
navigationBarTitleText: '申请售后',
|
||||||
|
enableShareAppMessage: true,
|
||||||
|
}
|
@ -10,6 +10,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
border-bottom: 1PX solid #f3f3f3;
|
||||||
text{
|
text{
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -22,9 +23,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.apply_after_sales_con{
|
.apply_after_sales_con{
|
||||||
height: 80vh;
|
|
||||||
.scroll{
|
.scroll{
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 170px);
|
||||||
|
}
|
||||||
|
.scroll_con{
|
||||||
|
padding: 20px 0 150px 0;
|
||||||
}
|
}
|
||||||
.returnSaleInput{
|
.returnSaleInput{
|
||||||
margin: 0 20px;
|
margin: 0 20px;
|
||||||
@ -34,9 +37,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
flex-wrap: wrap;
|
||||||
.title{
|
.title{
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
width: 119px;
|
||||||
}
|
}
|
||||||
.select{
|
.select{
|
||||||
flex:1;
|
flex:1;
|
||||||
@ -67,6 +72,8 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
position: relative;
|
||||||
.miconfont{
|
.miconfont{
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
}
|
}
|
||||||
@ -75,39 +82,38 @@
|
|||||||
color: $color_font_three;
|
color: $color_font_three;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
.ImgItem{
|
||||||
}
|
width: 202px;
|
||||||
.other_desc{
|
height: 150px;
|
||||||
padding: 0 20px;
|
background: #f0f0f0;
|
||||||
box-sizing: border-box;
|
margin-left: 20px;
|
||||||
.title{
|
margin-bottom: 20px;
|
||||||
font-size: $font_size;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.uploadImg{
|
|
||||||
position: relative;
|
position: relative;
|
||||||
.descDataNum{
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
bottom: 10px;
|
|
||||||
font-size: 22px;
|
|
||||||
color: #ABABAB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Textarea{
|
|
||||||
background-color: #f3f3f3;
|
|
||||||
border: 2px solid #e6e6e6;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 25px;
|
height: 100%;
|
||||||
height: 165.4px;
|
border-radius: 10px;
|
||||||
padding: 20px 20px 30px 20px;
|
}
|
||||||
box-sizing: border-box;
|
.miconfont_close{
|
||||||
margin-top: 20px;
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
background-color: #ccc;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
right: -10px;
|
||||||
|
top: -10px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
.apply_after_sales_list{
|
.apply_after_sales_list{
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
.apply_after_sales_item{
|
.apply_after_sales_item{
|
||||||
@ -172,5 +178,42 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.btns_con{
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom:0;
|
||||||
|
padding: 0 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: constant(safe-area-inset-bottom);
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
.btns_two{
|
||||||
|
display: flex;
|
||||||
|
height: 82px;
|
||||||
|
// border: 1PX solid #007aff;
|
||||||
|
font-size: $font_size_big;
|
||||||
|
border-radius: 40px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.rest_btn{
|
||||||
|
flex:1;
|
||||||
|
border: 1PX solid #007aff;
|
||||||
|
border-radius: 40px 0 0 40px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 82px;
|
||||||
|
color: $color_main;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
.verify_btn{
|
||||||
|
flex:1;
|
||||||
|
border-radius: 0 40px 40px 0;
|
||||||
|
background: #007aff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 82px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,20 +1,36 @@
|
|||||||
import { Image, ScrollView, Text, Textarea, View } from "@tarojs/components";
|
import { Image, ScrollView, Text, Textarea, View } from "@tarojs/components";
|
||||||
import { memo, useState } from "react";
|
import { memo, useCallback, useMemo, useState } from "react";
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import Popup from "@/components/popup";
|
|
||||||
import { formatImgUrl } from "@/common/fotmat";
|
import { formatImgUrl } from "@/common/fotmat";
|
||||||
import Counter from "@/components/counter";
|
import Counter from "@/components/counter";
|
||||||
|
import ReasonPopup from "./components/reasonPopup";
|
||||||
|
import OtherReason from "./components/otherReason";
|
||||||
|
import Taro from "@tarojs/taro";
|
||||||
|
import uploadCDNImg from "@/common/uploadImage";
|
||||||
|
|
||||||
export default memo(() => {
|
type ReasonParam = 1|2|3 //1 退货原因 2 货物状况 3 退货说明
|
||||||
|
export default () => {
|
||||||
const [showDesc, setShowDesc] = useState(true)
|
const [showDesc, setShowDesc] = useState(true)
|
||||||
|
|
||||||
|
//退货选择弹窗
|
||||||
|
const [showReason, setShowReason] = useState<{show:true|false, status:ReasonParam}>({show:false, status:1})
|
||||||
|
const closeReason = useCallback(() => setShowReason({...showReason, show:false}), [])
|
||||||
|
const onShowReason = (status) => setShowReason({...showReason, status, show:true})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//底部按钮
|
||||||
|
const onSubmit = (val) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.apply_after_sales_main}>
|
<View className={styles.apply_after_sales_main}>
|
||||||
<Popup showIconButton={true} show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
|
||||||
<View className={styles.apply_after_sales_con}>
|
<View className={styles.apply_after_sales_con}>
|
||||||
<View className={styles.apply_after_sales_head}>申请退货</View>
|
|
||||||
<View className={styles.kind_number}><Text>2种面料,3种颜色,共6条</Text></View>
|
<View className={styles.kind_number}><Text>2种面料,3种颜色,共6条</Text></View>
|
||||||
<ScrollView scrollY className={styles.scroll}>
|
<ScrollView scrollY className={styles.scroll}>
|
||||||
|
<View className={styles.scroll_con}>
|
||||||
<View className={styles.apply_after_sales_list}>
|
<View className={styles.apply_after_sales_list}>
|
||||||
<View className={styles.apply_after_sales_item}>
|
<View className={styles.apply_after_sales_item}>
|
||||||
<View className={styles.apply_after_sales_title}>
|
<View className={styles.apply_after_sales_title}>
|
||||||
@ -64,45 +80,74 @@ export default memo(() => {
|
|||||||
<View className={styles.returnSaleInput}>
|
<View className={styles.returnSaleInput}>
|
||||||
<View className={styles.returnSaleInput_item}>
|
<View className={styles.returnSaleInput_item}>
|
||||||
<View className={styles.title}>退货原因</View>
|
<View className={styles.title}>退货原因</View>
|
||||||
<View className={styles.select}>
|
<View className={styles.select} onClick={() => onShowReason(1)}>
|
||||||
<Text>请选择</Text>
|
<Text>请选择</Text>
|
||||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.returnSaleInput_item}>
|
<View className={styles.returnSaleInput_item}>
|
||||||
<View className={styles.title}>货物状况</View>
|
<View className={styles.title}>货物状况</View>
|
||||||
<View className={styles.select}>
|
<View className={styles.select} onClick={() => onShowReason(2)}>
|
||||||
<Text>请选择</Text>
|
<Text>请选择</Text>
|
||||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.returnSaleInput_item}>
|
<View className={styles.returnSaleInput_item}>
|
||||||
<View className={styles.title}>退货说明</View>
|
<View className={styles.title}>退货说明</View>
|
||||||
<View className={styles.select}>
|
<View className={styles.select} onClick={() => onShowReason(3)}>
|
||||||
<Text>请选择</Text>
|
<Text>请选择</Text>
|
||||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.returnSaleInput_item}>
|
<View className={styles.returnSaleInput_item}>
|
||||||
<View className={styles.title}>拍照上传</View>
|
<View className={styles.title}>拍照上传</View>
|
||||||
<View className={styles.uploadImg}>
|
<PictureItem/>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<OtherReason/>
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
<View className="common_safe_area_y"></View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.btns_con}>
|
||||||
|
<View className={styles.btns_two}>
|
||||||
|
<View className={styles.rest_btn} onClick={() => onSubmit(1)}>取消</View>
|
||||||
|
<View className={styles.verify_btn } onClick={() => onSubmit(2)}>确认</View>
|
||||||
|
</View >
|
||||||
|
</View >
|
||||||
|
<ReasonPopup show={showReason.show} onClose={closeReason} status={showReason.status}/>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
//图片列表
|
||||||
|
const PictureItem = memo(() => {
|
||||||
|
|
||||||
|
//图片
|
||||||
|
const uploadImage = () => {
|
||||||
|
Taro.chooseImage({
|
||||||
|
count: 1, // 默认9
|
||||||
|
sizeType: ['original', 'compressed'],
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: function (res) {
|
||||||
|
// var tempFilePaths = res.tempFilePaths
|
||||||
|
const file = res.tempFiles[0]
|
||||||
|
console.log('res:::',res.tempFiles[0])
|
||||||
|
// uploadCDNImg(file, 'product', 'product')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<View className={styles.ImgItem}>
|
||||||
|
<Image mode="aspectFill" src={formatImgUrl('')} ></Image>
|
||||||
|
<View className={classnames(styles.miconfont_close, 'iconfont icon-qingkong')}></View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.uploadImg } onClick={uploadImage}>
|
||||||
<Text className={classnames(styles.miconfont, 'iconfont icon-saomazhifu')}></Text>
|
<Text className={classnames(styles.miconfont, 'iconfont icon-saomazhifu')}></Text>
|
||||||
<Text className={styles.uploadText}>上传照片</Text>
|
<Text className={styles.uploadText}>上传照片</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</>
|
||||||
|
|
||||||
</View>
|
|
||||||
<View className={styles.other_desc}>
|
|
||||||
<View className={styles.title}>其他说明</View>
|
|
||||||
<View className={styles.uploadImg}>
|
|
||||||
<Textarea placeholder="一般情况下选填,当退货说明=“其它问题”时,必填" cursorSpacing={100}></Textarea>
|
|
||||||
<View className={styles.descDataNum}>0/100</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="common_safe_area_y"></View>
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
|
||||||
</Popup>
|
|
||||||
</View>
|
|
||||||
)
|
)
|
||||||
})
|
})
|
@ -101,12 +101,17 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
.order_address_list {
|
.order_address_list {
|
||||||
height: 900px;
|
height:80vh;
|
||||||
.order_address_title{
|
.order_address_title{
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px 0 30px 0;
|
padding: 20px 0 30px 0;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.addressList_con{
|
||||||
|
padding-bottom: 20px;
|
||||||
|
height: calc(100% - 160px);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -114,9 +114,10 @@ export default memo(forwardRef(({onSelect, onChangeShipmentMode, defaultValue =
|
|||||||
<Popup show={showAddressList} showTitle={false} onClose={() => setShowAddressList(false)}>
|
<Popup show={showAddressList} showTitle={false} onClose={() => setShowAddressList(false)}>
|
||||||
<View className={styles.order_address_list}>
|
<View className={styles.order_address_list}>
|
||||||
<View className={styles.order_address_title}>请选择收货地址</View>
|
<View className={styles.order_address_title}>请选择收货地址</View>
|
||||||
|
<View className={styles.addressList_con}>
|
||||||
<AddressList onSelect={getAddress}/>
|
<AddressList onSelect={getAddress}/>
|
||||||
</View>
|
</View>
|
||||||
<View className="common_safe_area_y"></View>
|
</View>
|
||||||
</Popup>
|
</Popup>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -16,7 +16,6 @@ import classnames from "classnames";
|
|||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import order from "../orderList/components/order";
|
import order from "../orderList/components/order";
|
||||||
import AddressInfoDetail from "./components/addressInfoDetail";
|
import AddressInfoDetail from "./components/addressInfoDetail";
|
||||||
import ApplyAfterSales from "./components/applyAfterSales";
|
|
||||||
import KindList from "./components/kindList";
|
import KindList from "./components/kindList";
|
||||||
import OrderState from "./components/orderState";
|
import OrderState from "./components/orderState";
|
||||||
import Payment from "./components/payment";
|
import Payment from "./components/payment";
|
||||||
@ -143,12 +142,10 @@ import styles from './index.module.scss'
|
|||||||
|
|
||||||
//获取底部按钮点击, 获取按钮状态
|
//获取底部按钮点击, 获取按钮状态
|
||||||
const orderStateClick = useCallback((val) => {
|
const orderStateClick = useCallback((val) => {
|
||||||
console.log('val::', val)
|
if(val == 1 || val == 6) {
|
||||||
if(val == 1) {
|
|
||||||
//取消订单
|
//取消订单
|
||||||
getSaleOrderPreView()
|
getSaleOrderPreView()
|
||||||
}
|
}else if(val == 2) {
|
||||||
if(val == 2) {
|
|
||||||
//待付款
|
//待付款
|
||||||
toPay()
|
toPay()
|
||||||
}
|
}
|
||||||
@ -226,7 +223,6 @@ 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/> */}
|
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -42,6 +42,9 @@
|
|||||||
border-radius: 0px 20px 0px 20px;
|
border-radius: 0px 20px 0px 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.product_con{
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
.product_title{
|
.product_title{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -99,7 +99,6 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
||||||
</View>
|
</View>
|
||||||
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -96,7 +96,10 @@ export default () => {
|
|||||||
|
|
||||||
//监听点击的按钮
|
//监听点击的按钮
|
||||||
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
||||||
if(status == 2) {
|
console.log('status:::', status)
|
||||||
|
if(status == 1 || status == 6) {
|
||||||
|
getOrderList()
|
||||||
|
} else if(status == 2) {
|
||||||
//去支付
|
//去支付
|
||||||
setPayOrderInfo({orderId:orderInfo.should_collect_order_id, payment_method:orderInfo.payment_method})
|
setPayOrderInfo({orderId:orderInfo.should_collect_order_id, payment_method:orderInfo.payment_method})
|
||||||
toPay()
|
toPay()
|
||||||
|
@ -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}>
|
||||||
|
@ -39,6 +39,7 @@ export type UserAdminParam = {
|
|||||||
wechat_user_open_id?: number
|
wechat_user_open_id?: number
|
||||||
is_authorize_name?: false|true,
|
is_authorize_name?: false|true,
|
||||||
is_authorize_phone?: false|true,
|
is_authorize_phone?: false|true,
|
||||||
|
phone?:string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SortCodeParam = {
|
export type SortCodeParam = {
|
||||||
|
@ -8,8 +8,6 @@ import { GetShortCodeApi } from "@/api/share"
|
|||||||
export default () => {
|
export default () => {
|
||||||
const {setUserInfo, setAdminUserInfo, setSortCode, userInfo} = useUserInfo()
|
const {setUserInfo, setAdminUserInfo, setSortCode, userInfo} = useUserInfo()
|
||||||
|
|
||||||
console.log('userInfo:::', userInfo)
|
|
||||||
|
|
||||||
//登录请求 (调用这个就不能再useHttp中使用,当前这个hook, 否则会死循环内存溢出)
|
//登录请求 (调用这个就不能再useHttp中使用,当前这个hook, 否则会死循环内存溢出)
|
||||||
// const {fetchData} = LoginApi()
|
// const {fetchData} = LoginApi()
|
||||||
|
|
||||||
@ -28,7 +26,7 @@ export default () => {
|
|||||||
const {fetchData: useFetchData} = GetAdminUserInfoApi()
|
const {fetchData: useFetchData} = GetAdminUserInfoApi()
|
||||||
const getAdminUserInfo = async () => {
|
const getAdminUserInfo = async () => {
|
||||||
let res = await useFetchData()
|
let res = await useFetchData()
|
||||||
setAdminUserInfo(res.data)
|
setAdminUserInfo({...res.data})
|
||||||
getShortCode(res.data.user_id)
|
getShortCode(res.data.user_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +74,10 @@ export default () => {
|
|||||||
})
|
})
|
||||||
if(user_res.success) {
|
if(user_res.success) {
|
||||||
setUserInfo({...user_res.data})
|
setUserInfo({...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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -94,7 +93,7 @@ export default () => {
|
|||||||
|
|
||||||
//获取手机号码
|
//获取手机号码
|
||||||
const {fetchData: fetchDataUserPhone} = GetPhoneNumberApi()
|
const {fetchData: fetchDataUserPhone} = GetPhoneNumberApi()
|
||||||
const getPhoneNumber = (code) =>{
|
const getPhoneNumber = (code) => {
|
||||||
return new Promise( async (reslove, reject) => {
|
return new Promise( async (reslove, reject) => {
|
||||||
if(userInfo.adminUserInfo?.is_authorize_phone) {
|
if(userInfo.adminUserInfo?.is_authorize_phone) {
|
||||||
reslove(true)
|
reslove(true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user