68 lines
2.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Button, Canvas, Navigator, ScrollView, Text, View } from "@tarojs/components"
import "./index.scss"
import { depositInfoApi } from "@/api/deposit"
import { useEffect } from "react";
import { formatPriceDiv, toDecimal2 } from "@/common/fotmat";
import { setClipboardData } from "@tarojs/taro";
import Message from "@/components/Message";
export default ()=>{
const {fetchData, state} = depositInfoApi();
const getData = async ()=>{
fetchData();
}
useEffect(() => {
getData();
}, []);
// 复制
const handleCopy = ()=>{
setClipboardData({data: state.data?.transfer_remittance_account})
}
return (
<View className="deposit-beforehand">
<Message text="汇款成功后1-5分钟自动到账。"/>
<View className="deposit-beforehand-card">
<View className="deposit-beforehand-balance">
<View className="deposit-beforehand-balance-title"> ()</View>
<Text className="deposit-beforehand-balance-price">{toDecimal2(formatPriceDiv(state.data?.amount)).toLocaleString()}</Text>
<View className="deposit-beforehand-balance-button"></View>
</View>
</View>
<View className="deposit-beforehand-card">
<View className="deposit-beforehand-info">
<View className="deposit-beforehand-info-title">
<View className="deposit-beforehand-info-title-left"><Text></Text> </View>
<View className="deposit-beforehand-info-title-copy" onClick={handleCopy}></View>
</View>
<View className="deposit-beforehand-info-content">
<View className="deposit-beforehand-info-list">
<View className="deposit-beforehand-info-list-left"></View>
<View className="deposit-beforehand-info-list-right">{state.data?.account_name}</View>
</View>
<View className="deposit-beforehand-info-list">
<View className="deposit-beforehand-info-list-left"></View>
<View className="deposit-beforehand-info-list-right">{state.data?.bank_of_deposit}</View>
</View>
<View className="deposit-beforehand-info-list">
<View className="deposit-beforehand-info-list-left"></View>
<View className="deposit-beforehand-info-list-right">{state.data?.transfer_remittance_account}</View>
</View>
</View>
</View>
</View>
<View className="deposit-beforehand-card">
<View className="deposit-beforehand-particulars">
<View className="deposit-beforehand-particulars-left"></View>
<Navigator hoverClass="none" url="/pages/depositList/index" className="deposit-beforehand-particulars-right">
<Text className="iconfont icon-a-moreback"></Text>
</Navigator>
</View>
</View>
</View>
)
}