From c76d6f644803a56ab64842978cd8eff125b6bbb2 Mon Sep 17 00:00:00 2001
From: czm <2192718639@qq.com>
Date: Tue, 7 Jun 2022 19:33:17 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=94=AE=E5=90=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/orderBtns/index.module.scss | 2 +-
.../components/applyAfterSales/index.module.scss | 15 ++++++++++++++-
.../order/components/applyAfterSales/index.tsx | 9 ++++++++-
src/pages/order/index.tsx | 2 +-
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/components/orderBtns/index.module.scss b/src/components/orderBtns/index.module.scss
index 28023d0..a8f7963 100644
--- a/src/components/orderBtns/index.module.scss
+++ b/src/components/orderBtns/index.module.scss
@@ -1,7 +1,7 @@
.btns_list{
display: flex;
justify-content: flex-end;
- margin-top: 30px;
+ // margin-top: 30px;
.btns_item{
width: 152px;
height: 72px;
diff --git a/src/pages/order/components/applyAfterSales/index.module.scss b/src/pages/order/components/applyAfterSales/index.module.scss
index 594b36e..3c9be20 100644
--- a/src/pages/order/components/applyAfterSales/index.module.scss
+++ b/src/pages/order/components/applyAfterSales/index.module.scss
@@ -44,6 +44,7 @@
.color_item{
display: flex;
align-items: center;
+ margin: 20px 0;
}
.image{
width: 70px;
@@ -55,7 +56,19 @@
}
}
.name_and_number{
-
+ padding-left: 30px;
+ flex:1;
+ text{
+ &:nth-child(1) {
+ font-weight: 700;
+ font-size: $font_size;
+ }
+ &:nth-child(2) {
+ color: $color_font_two;
+ font-size: $font_size;
+ margin-left: 20px;
+ }
+ }
}
}
}
diff --git a/src/pages/order/components/applyAfterSales/index.tsx b/src/pages/order/components/applyAfterSales/index.tsx
index 1c6e31a..6edef79 100644
--- a/src/pages/order/components/applyAfterSales/index.tsx
+++ b/src/pages/order/components/applyAfterSales/index.tsx
@@ -22,7 +22,14 @@ export default memo(() => {
1# 薄荷绿x1
-
+
+
+
+
+
+
+ 1# 薄荷绿x1
+
diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx
index 060dc54..3c0304f 100644
--- a/src/pages/order/index.tsx
+++ b/src/pages/order/index.tsx
@@ -226,7 +226,7 @@ import styles from './index.module.scss'
getRemark(e)}/>
-
+ {/* */}
)
From 2c5c3a8ae379f9b326f53e85ae4919e131e7a1f1 Mon Sep 17 00:00:00 2001
From: czm <2192718639@qq.com>
Date: Wed, 8 Jun 2022 14:40:07 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=94=AE=E5=90=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/constant.js | 1 +
src/components/infiniteScroll/index.tsx | 10 +-
src/components/shopCart/index.tsx | 1 +
.../details/components/orderCount/index.tsx | 11 +-
src/pages/details/index.tsx | 1 +
src/pages/index/index.tsx | 27 +--
.../components/addressInfoDetail/index.tsx | 1 +
.../applyAfterSales/index.module.scss | 182 ++++++++++++++----
.../components/applyAfterSales/index.tsx | 108 +++++++++--
src/pages/order/index.tsx | 2 +-
src/use/useLogin.ts | 3 +-
11 files changed, 263 insertions(+), 84 deletions(-)
diff --git a/src/common/constant.js b/src/common/constant.js
index 40b4cdc..ffcd589 100644
--- a/src/common/constant.js
+++ b/src/common/constant.js
@@ -6,6 +6,7 @@
// export const BASE_URL = `http://192.168.1.165:40001/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:50001/lymarket` // 发
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
diff --git a/src/components/infiniteScroll/index.tsx b/src/components/infiniteScroll/index.tsx
index cb22671..450c77c 100644
--- a/src/components/infiniteScroll/index.tsx
+++ b/src/components/infiniteScroll/index.tsx
@@ -1,5 +1,5 @@
import { ScrollView, View } from "@tarojs/components"
-import { memo, ReactNode, useState } from "react"
+import { memo, ReactNode, useMemo, useState } from "react"
import style from "./index.module.scss"
import DotLoading from "@/components/dotLoading"
import LoadingCard from "../loadingCard"
@@ -64,6 +64,13 @@ export default memo(({
selfOnRefresherAbort?.()
}
+ //返回顶部
+ const scrollTop = useMemo(() => {
+ if(statusMore == 0) {
+ return 0.1
+ }
+ },[statusMore])
+
return (
<>
refresherRestore()}
onRefresherAbort = {() => refresherAbort()}
refresherBackground ='#F8F8F8'
+ scrollTop={scrollTop}
>
{!moreStatus&&<>
diff --git a/src/components/shopCart/index.tsx b/src/components/shopCart/index.tsx
index 1ca3aa5..8eb3d75 100644
--- a/src/components/shopCart/index.tsx
+++ b/src/components/shopCart/index.tsx
@@ -202,6 +202,7 @@ export default ({show = false, onClose}: param) => {
} else {
let ids = selectIds.current.join('-')
setParam({ids, sale_mode:selectIndex})
+ closePopup()
goLink('/pages/order/comfirm')
}
}, 500)
diff --git a/src/pages/details/components/orderCount/index.tsx b/src/pages/details/components/orderCount/index.tsx
index 11c80ea..ea3340a 100644
--- a/src/pages/details/components/orderCount/index.tsx
+++ b/src/pages/details/components/orderCount/index.tsx
@@ -27,15 +27,14 @@ type param = {
export default memo(({show = false, onClose, title = '', productId = 0}: param) => {
const {adminUserInfo} = useSelector(state => state.userInfo)
- const [selectList, setSelectList] = useState([
- {id: 0, step:1, digits:0, maxNum:100000, defaultNum:1, title:'大货', unit:'件', eunit:'kg', priceField:'bulk_price'},
+ const [selectList, _] = useState([
+ {id: 0, step:1, digits:0, maxNum:100000, defaultNum:1, title:'大货', unit:'条', eunit:'kg', priceField:'bulk_price'},
{id: 1, step:1, digits:2, maxNum:9.99, defaultNum:1, title:'剪板', unit:'米', eunit:'m', priceField:'length_cut_price'},
{id: 2, step:1, digits:2, minNum:10, maxNum:100000, defaultNum:10, title:'散剪', unit:'米', eunit:'kg', priceField:'weight_cut_price'},
])
const [selectIndex, setSelectIndex] = useState(0)
const selectProduct = (index:number) => {
setSelectIndex(() => index)
-
}
//重置数据
@@ -144,13 +143,13 @@ export default memo(({show = false, onClose, title = '', productId = 0}: param)
//添加购物车
const {getSelfUserInfo} = UseLogin()
const {fetchData:addFetchData} = AddShoppingCartApi()
- const addShopCart = debounce( async () => {
+ const addShopCart = async () => {
try {
await getSelfUserInfo()
} catch(msg) {
Taro.showToast({
icon:'none',
- title:msg
+ title:'授权失败,请求完善授权'
})
return false
}
@@ -178,7 +177,7 @@ export default memo(({show = false, onClose, title = '', productId = 0}: param)
})
}
- }, 500)
+ }
//筛选数据
const searchInput = useCallback((e) => {
diff --git a/src/pages/details/index.tsx b/src/pages/details/index.tsx
index b7afb2c..a7e6341 100644
--- a/src/pages/details/index.tsx
+++ b/src/pages/details/index.tsx
@@ -48,6 +48,7 @@ export default (props:Params) => {
useDidShow(() => {
checkLogin()
judgeParam()
+ setShowCart(false)
})
useEffect(() => {
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index 77a2031..1bde8b9 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -7,7 +7,7 @@ import MoveBtn from '@/components/moveBtn'
import ShopCart from '@/components/shopCart'
import { goLink } from '@/common/common'
import styles from './index.module.scss'
-import React, { useEffect, useMemo, useRef, useState } from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import Taro, { Events, useDidShow, usePullDownRefresh} from '@tarojs/taro'
import {GetProductKindListApi, GetProductListApi} from '@/api/material'
import useLogin from '@/use/useLogin'
@@ -56,22 +56,23 @@ export default () => {
//点击面料类型
- const getProductKindId = async (e) => {
+ const getProductKindId = useCallback((e) => {
pageNum.current.page = 1
- setFiltrate({...filtrate, size:5, product_kind_id:e.id})
- setHasMore(true)
- }
+ setProductData({list:[], total:0})
+ setFiltrate((list) => ({...list, size:5, product_kind_id:e.id}))
+ // setHasMore(true)
+ }, [])
//上拉加载数据
- const getScrolltolower = () => {
+ const getScrolltolower = useCallback(() => {
if(productData.list.length >= productData.total) {
setHasMore(false)
} else {
pageNum.current.page++
const newSize = pageNum.current.size * pageNum.current.page
- setFiltrate({...filtrate, size:newSize})
+ setFiltrate((e) => ({...e, size:newSize}))
}
- }
+ }, [productData])
const [showShopCart, setShowShopCart] = useState(false)
@@ -79,7 +80,7 @@ export default () => {
//列表下拉刷新
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
const getRefresherRefresh = async () => {
- pageNum.current.size = 1
+ pageNum.current.page = 1
setFiltrate({...filtrate, size:5})
setHasMore(true)
setRefresherTriggeredStatus(true)
@@ -88,9 +89,9 @@ export default () => {
//页面下拉刷新
// const res = useManualPullDownRefresh()
- usePullDownRefresh(() => {
- console.log('123')
- })
+ // usePullDownRefresh(() => {
+ // console.log('123')
+ // })
//数据加载状态
const statusMore = useMemo(() => {
@@ -108,7 +109,7 @@ export default () => {
- getScrolltolower()} sideBarOnClick={(e) => getProductKindId(e)} heightItem={150} refresherTriggered={refresherTriggeredStatus} selfOnRefresherRefresh={() => getRefresherRefresh()}>
+ getRefresherRefresh()}>
diff --git a/src/pages/order/components/addressInfoDetail/index.tsx b/src/pages/order/components/addressInfoDetail/index.tsx
index 7290ae6..d58b12b 100644
--- a/src/pages/order/components/addressInfoDetail/index.tsx
+++ b/src/pages/order/components/addressInfoDetail/index.tsx
@@ -116,6 +116,7 @@ export default memo(forwardRef(({onSelect, onChangeShipmentMode, defaultValue =
请选择收货地址
+
)
diff --git a/src/pages/order/components/applyAfterSales/index.module.scss b/src/pages/order/components/applyAfterSales/index.module.scss
index 3c9be20..22a31e0 100644
--- a/src/pages/order/components/applyAfterSales/index.module.scss
+++ b/src/pages/order/components/applyAfterSales/index.module.scss
@@ -22,55 +22,155 @@
}
}
.apply_after_sales_con{
- padding: 0 20px;
- .apply_after_sales_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- }
+ height: 80vh;
+ .scroll{
+ height: calc(100% - 80px);
}
- .color_list {
- .color_item{
+ .returnSaleInput{
+ margin: 0 20px;
+ padding-top: 30px;
+ border-top: 1px solid #F6F6F6;
+ .returnSaleInput_item{
display: flex;
align-items: center;
- margin: 20px 0;
- }
- .image{
- width: 70px;
- height: 70px;
- image{
- width: 100%;
- height: 100%;
- border-radius: 50%;
+ padding-bottom: 20px;
+ .title{
+ font-size: $font_size;
+ font-weight: 700;
}
- }
- .name_and_number{
- padding-left: 30px;
- flex:1;
- text{
- &:nth-child(1) {
- font-weight: 700;
- font-size: $font_size;
- }
- &:nth-child(2) {
- color: $color_font_two;
- font-size: $font_size;
- margin-left: 20px;
+ .select{
+ flex:1;
+ height: 60px;
+ border: 2px solid #e6e6e6;
+ border-radius: 10px;
+ margin-left: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 20px;
+ font-size: 26px;
+ color: $color_font_two;
+ .miconfont{
+ font-size: 30px;
}
}
+
+ .uploadImg{
+ width: 202px;
+ height: 150px;
+ background: #f0f0f0;
+ border: 2px dashed #cccccc;
+ margin-left: 20px;
+ border-radius: 10px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ .miconfont{
+ font-size: 50px;
+ }
+ .uploadText{
+ font-size: 26px;
+ color: $color_font_three;
+ }
+
+ }
+ }
+ }
+ .other_desc{
+ padding: 0 20px;
+ box-sizing: border-box;
+ .title{
+ font-size: $font_size;
+ font-weight: 700;
+ }
+ .uploadImg{
+ 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;
+ width: 100%;
+ font-size: 25px;
+ height: 165.4px;
+ padding: 20px 20px 30px 20px;
+ box-sizing: border-box;
+ margin-top: 20px;
}
}
}
+ .apply_after_sales_list{
+ padding: 0 20px;
+ .apply_after_sales_item{
+ margin-bottom: 30px;
+ .apply_after_sales_title{
+ display: flex;
+ align-items: center;
+ .tag{
+ font-size: $font_size_min;
+ background-color: #CDE5FF;
+ padding: 5px 10px;
+ border-radius: 6px;
+ color: $color_main;
+ }
+ .title{
+ font-weight: 700;
+ font-size: $font_size;
+ margin-left: 20px;
+ flex:1;
+ }
+ }
+ .color_list {
+ .color_item{
+ display: flex;
+ align-items: center;
+ margin: 20px 0;
+ }
+ .image{
+ width: 70px;
+ height: 70px;
+ image{
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ }
+ }
+ .name_and_number{
+ padding-left: 30px;
+ flex:1;
+ text{
+ &:nth-child(1) {
+ font-weight: 700;
+ font-size: $font_size;
+ }
+ &:nth-child(2) {
+ color: $color_font_two;
+ font-size: $font_size;
+ margin-left: 20px;
+ }
+ }
+ }
+ .btn_count{
+ width: 235px;
+ height: 64px;
+ background-color: #ECF5FF;
+ border-radius: 40px 0px 16px 0px;
+ padding: 0 20px;
+ display: flex;
+ align-items: center;
+ }
+ }
+ }
+
+ }
}
diff --git a/src/pages/order/components/applyAfterSales/index.tsx b/src/pages/order/components/applyAfterSales/index.tsx
index 6edef79..735e476 100644
--- a/src/pages/order/components/applyAfterSales/index.tsx
+++ b/src/pages/order/components/applyAfterSales/index.tsx
@@ -1,4 +1,4 @@
-import { Image, Text, View } from "@tarojs/components";
+import { Image, ScrollView, Text, Textarea, View } from "@tarojs/components";
import { memo, useState } from "react";
import classnames from "classnames";
import styles from './index.module.scss'
@@ -10,32 +10,98 @@ export default memo(() => {
const [showDesc, setShowDesc] = useState(true)
return (
- setShowDesc(false)} >
- 申请退货
- 2种面料,3种颜色,共6条
+ setShowDesc(false)} >
-
- 大货
- 0770# 21S单面平纹(食毛)
-
-
-
-
- 1# 薄荷绿x1
-
-
+ 申请退货
+ 2种面料,3种颜色,共6条
+
+
+
+
+ 大货
+ 0770# 21S单面平纹(食毛)
+
+
+
+
+ 1# 薄荷绿x1
+
+
+
+
+
+
+ 1# 薄荷绿x1
+
+
+
+
+
+
+
+
+ 大货
+ 0770# 21S单面平纹(食毛)
+
+
+
+
+ 1# 薄荷绿x1
+
+
+
+
+
+
+ 1# 薄荷绿x1
+
+
+
+
+
-
-
- 1# 薄荷绿x1
-
-
+
+
+ 退货原因
+
+ 请选择
+
+
+
+
+ 货物状况
+
+ 请选择
+
+
+
+
+ 退货说明
+
+ 请选择
+
+
+
+
+ 拍照上传
+
+
+ 上传照片
+
+
+
+
+
+ 其他说明
+
+
+ 0/100
-
+
+
-
)
diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx
index 3c0304f..060dc54 100644
--- a/src/pages/order/index.tsx
+++ b/src/pages/order/index.tsx
@@ -226,7 +226,7 @@ import styles from './index.module.scss'
getRemark(e)}/>
- {/* */}
+
)
diff --git a/src/use/useLogin.ts b/src/use/useLogin.ts
index 7085254..c06e543 100644
--- a/src/use/useLogin.ts
+++ b/src/use/useLogin.ts
@@ -83,7 +83,8 @@ export default () => {
}
},
fail:(e) => {
- reject(e)
+ console.log('授权失败::',e)
+ reject(e.errMsg)
}
})
})