补分销中心页面
This commit is contained in:
64
src/dealer/index.tsx
Normal file
64
src/dealer/index.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
import {useEffect} from 'react'
|
||||
import { View } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import NavigationBar from "./components/NavigationBar"
|
||||
import UserCard from "./components/UserCard"
|
||||
import EarningsCard from "./components/EarningsCard"
|
||||
import FunctionMenu from "./components/FunctionMenu"
|
||||
import './index.scss'
|
||||
function Index() {
|
||||
|
||||
useEffect(() => {
|
||||
// 设置页面标题
|
||||
Taro.setNavigationBarTitle({
|
||||
title: '分销中心'
|
||||
})
|
||||
}, []);
|
||||
|
||||
const handleWithdraw = () => {
|
||||
Taro.showModal({
|
||||
title: '提现',
|
||||
content: '确定要进行提现操作吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
Taro.showToast({
|
||||
title: '提现申请已提交',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleBack = () => {
|
||||
Taro.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
const handleMore = () => {
|
||||
Taro.showActionSheet({
|
||||
itemList: ['分享给朋友', '客服咨询', '使用帮助'],
|
||||
success: (res) => {
|
||||
const actions = ['分享给朋友', '客服咨询', '使用帮助']
|
||||
Taro.showToast({
|
||||
title: actions[res.tapIndex],
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className="min-h-screen" style={{
|
||||
paddingTop: '20px',
|
||||
background: 'linear-gradient(180deg, #60A5FA 0%, #3B82F6 50%, #1D4ED8 100%)'
|
||||
}}>
|
||||
<UserCard />
|
||||
<EarningsCard onWithdraw={handleWithdraw} />
|
||||
<FunctionMenu />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default Index
|
||||
Reference in New Issue
Block a user