feat: 功能调整
This commit is contained in:
parent
85f73b6c35
commit
d8d5469671
@ -20,28 +20,13 @@ export default function CrabList() {
|
|||||||
})
|
})
|
||||||
console.log("getPlotDataList", data);
|
console.log("getPlotDataList", data);
|
||||||
if (Array.isArray(data)) setPlotDataList(data.map(item => ({
|
if (Array.isArray(data)) setPlotDataList(data.map(item => ({
|
||||||
...item, percent: (item.alreadyAmount * 100 / item.quantity).toFixed(2)
|
...item,
|
||||||
|
percent: (item.alreadyAmount * 100 / item.quantity).toFixed(2),
|
||||||
|
img: item.img?.replace("http://117.73.12.97:9000", "https://www.zhuangbeizz.cn/minio")
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
useEffect(() => { getPlotDataList() }, [])
|
useEffect(() => { getPlotDataList() }, [])
|
||||||
|
|
||||||
const [img, setImg] = useState<string>('')
|
|
||||||
const [dataList, setDataList] = useState<Array<any>>([
|
|
||||||
{
|
|
||||||
id: '1',
|
|
||||||
img: '',
|
|
||||||
name: '1号蟹塘',
|
|
||||||
price: '29.9元',
|
|
||||||
adoption: 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '2',
|
|
||||||
img: '',
|
|
||||||
name: '1号蟹塘',
|
|
||||||
price: '29.9元',
|
|
||||||
adoption: 21
|
|
||||||
},
|
|
||||||
])
|
|
||||||
const CrabItemsWrapper = () => {
|
const CrabItemsWrapper = () => {
|
||||||
return (
|
return (
|
||||||
<View className="p-3">
|
<View className="p-3">
|
||||||
|
@ -24,3 +24,11 @@ export const tickPage = (params) => {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getOrderInfoById = (params) => {
|
||||||
|
return request({
|
||||||
|
url: 'wechat/v1/ticket/page',
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
@ -4,13 +4,9 @@ import './app.scss'
|
|||||||
class App extends Component<PropsWithChildren> {
|
class App extends Component<PropsWithChildren> {
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
console.log("componentDidMount");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidShow () {
|
componentDidShow () {
|
||||||
console.log("componentDidShow");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidHide () {}
|
componentDidHide () {}
|
||||||
|
@ -55,9 +55,9 @@ export default function MyOrder() {
|
|||||||
dataList.map(item => (
|
dataList.map(item => (
|
||||||
<View className="bg-white p-4 px-5 shadow-md rounded-md mb-2">
|
<View className="bg-white p-4 px-5 shadow-md rounded-md mb-2">
|
||||||
<View className="flex justify-between items-start py-1 pb-2">
|
<View className="flex justify-between items-start py-1 pb-2">
|
||||||
<View className="pr-2">{item.planName}</View>
|
<View className="pr-3 grow">{item.planName}</View>
|
||||||
<View
|
<View
|
||||||
className="text-[#fa6642] w-[4rem]"
|
className="text-[#fa6642] w-[4rem] break-normal"
|
||||||
style={{
|
style={{
|
||||||
color: item.status === '0' ? '#fa6642' : '#1ed76d'
|
color: item.status === '0' ? '#fa6642' : '#1ed76d'
|
||||||
}}
|
}}
|
||||||
|
@ -31,7 +31,7 @@ export default function AdoptionCircle() {
|
|||||||
id: item.orderNumber,
|
id: item.orderNumber,
|
||||||
name: item.nickName || '匿名塘主',
|
name: item.nickName || '匿名塘主',
|
||||||
avatar: item.buyerImg,
|
avatar: item.buyerImg,
|
||||||
count: item.productAmount + (item.orderType === '0' ? '只' : '亩'),
|
count: item.productAmount + "份",
|
||||||
level: index + 1
|
level: index + 1
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,10 @@ export default function Adoption() {
|
|||||||
if (_item) {
|
if (_item) {
|
||||||
console.log("选中地块", _item);
|
console.log("选中地块", _item);
|
||||||
|
|
||||||
setSelectedPlotInfo(_item)
|
setSelectedPlotInfo({
|
||||||
|
..._item,
|
||||||
|
img: _item.img?.replace("http://117.73.12.97:9000", "https://www.zhuangbeizz.cn/minio")
|
||||||
|
})
|
||||||
setShowConfirmPlot(true)
|
setShowConfirmPlot(true)
|
||||||
} else {
|
} else {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
|
@ -98,7 +98,7 @@ export default function HomeLayout() {
|
|||||||
return (
|
return (
|
||||||
<OuterFrame>
|
<OuterFrame>
|
||||||
<View className='index relative'>
|
<View className='index relative'>
|
||||||
<View style={{
|
<View className="relative z-[3]" style={{
|
||||||
height: APP_HEAD_HEIGHT + 'px',
|
height: APP_HEAD_HEIGHT + 'px',
|
||||||
backgroundColor: '#fff'
|
backgroundColor: '#fff'
|
||||||
}}></View>
|
}}></View>
|
||||||
|
@ -6,7 +6,7 @@ import { APP_FULL_HEIGHT, formatMoney, IMG_BASE_URL } from "../../config";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import arrow from './assets/arrow.png'
|
import arrow from './assets/arrow.png'
|
||||||
import Taro, { getCurrentInstance, useDidShow } from "@tarojs/taro"
|
import Taro, { getCurrentInstance, useDidShow } from "@tarojs/taro"
|
||||||
import { adoptionOrderUpdate, orderPage } from "../../api/order";
|
import { adoptionOrderUpdate, orderPage, getOrderInfoById } from "../../api/order";
|
||||||
import * as dayjs from 'dayjs'
|
import * as dayjs from 'dayjs'
|
||||||
import useStore from "../../storage";
|
import useStore from "../../storage";
|
||||||
import { addressPage } from "../../api/me";
|
import { addressPage } from "../../api/me";
|
||||||
@ -52,17 +52,14 @@ export default function ConfirmOrder() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
const [orderInfo, setOrderInfo] = useState<any>({})
|
const [orderInfo, setOrderInfo] = useState<any>({})
|
||||||
|
|
||||||
const [regionSelected, setRegionSelected] = useState<any>()
|
|
||||||
const { router } = getCurrentInstance()
|
const { router } = getCurrentInstance()
|
||||||
console.log("ID" , router && router.params && router.params.id);
|
console.log("ID" , router && router.params && router.params.id);
|
||||||
const OrderId = router && router.params && router.params.id
|
const OrderId = router && router.params && router.params.id
|
||||||
const getOrderInfo = async () => {
|
const getOrderInfo = async () => {
|
||||||
if (!OrderId) return
|
if (!OrderId) return
|
||||||
const userOpenId = Taro.getStorageSync("USER_OPEN_ID")
|
const userOpenId = Taro.getStorageSync("USER_OPEN_ID")
|
||||||
const { data } = await orderPage({
|
const { data } = await getOrderInfoById({
|
||||||
pageNo: 1,
|
id: OrderId,
|
||||||
pageSize: 5,
|
|
||||||
serialNumber: 'JHLS202407012565376',
|
serialNumber: 'JHLS202407012565376',
|
||||||
openId: userOpenId
|
openId: userOpenId
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user