✨ feat:状态按钮重新对接完成进度20%
This commit is contained in:
@@ -2,7 +2,7 @@ import { View, Input, Button, Image } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Taro, { faceVerifyForPay, useDidShow, useRouter } from '@tarojs/taro'
|
||||
import Taro, { faceVerifyForPay, useDidShow, useRouter, usePullDownRefresh } from '@tarojs/taro'
|
||||
import ItemList from './components/itemList'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import {
|
||||
@@ -15,8 +15,12 @@ import AddressDetailBox from './components/addressDetailBox'
|
||||
import { IMG_CND_Prefix } from "@/common/constant";
|
||||
import Popup from '@/components/popup';
|
||||
import UploadImage from '@/components/uploadImage'
|
||||
|
||||
import { alert } from '@/common/common';
|
||||
export default () => {
|
||||
//页面下拉刷新
|
||||
usePullDownRefresh(() => {
|
||||
getDetail()
|
||||
})
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
getDetail()
|
||||
@@ -58,6 +62,8 @@ export default () => {
|
||||
setOrderMsg([...orderMsg])
|
||||
setPicList([...res.data?.accessory_url !== null ? res.data?.accessory_url : []])
|
||||
Taro.hideLoading()
|
||||
// 小程序提供的api,通知页面停止下拉刷新效果
|
||||
Taro.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +185,10 @@ export default () => {
|
||||
const { fetchData: sureFetch } = returnApplyOrderuploadAccessory()
|
||||
const handSure = () => {
|
||||
let arr: any = []
|
||||
arr = [...picUrl.current, ...PicList]
|
||||
arr = [...picUrl.current]
|
||||
if (arr == 0) {
|
||||
return alert.error('请先添加附件')
|
||||
}
|
||||
Taro.showModal({
|
||||
content: "确定要提交吗?",
|
||||
confirmText: "确认",
|
||||
@@ -193,8 +202,9 @@ export default () => {
|
||||
})
|
||||
if (res.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '取消成功'
|
||||
title: '成功'
|
||||
})
|
||||
setShowPic(false)
|
||||
Taro.hideLoading()
|
||||
getDetail()
|
||||
} else {
|
||||
@@ -285,11 +295,13 @@ export default () => {
|
||||
</View>
|
||||
}
|
||||
<Popup title={'查看/修改物流回单'} show={ShowPic} onClose={() => setShowPic(false)}>
|
||||
<UploadImage onChange={getImageList} defaultList={PicList} onlyRead={onlyRead} />
|
||||
{
|
||||
<>
|
||||
<UploadImage onChange={getImageList} defaultList={PicList} onlyRead={onlyRead} />
|
||||
{
|
||||
|
||||
!onlyRead && <View className={styles.picBtn} onClick={() => handSure()}>确认修改</View>
|
||||
}
|
||||
!onlyRead && <View className={styles.picBtn} onClick={() => handSure()}>确认修改</View>
|
||||
}
|
||||
</>
|
||||
</Popup>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user