forked from gxwebsoft/mp-10550
feat(admin): 从文章详情页面改为文章管理页面
- 修改页面配置,设置新的导航栏标题和样式 - 重新设计页面布局,增加搜索栏、文章列表和操作按钮 - 添加文章搜索、分页加载和删除功能 - 优化文章列表项的样式和交互 - 新增礼品卡相关API和组件 - 更新优惠券组件,增加到期提醒和筛选功能
This commit is contained in:
@@ -1,64 +1,37 @@
|
||||
import {useEffect} from 'react'
|
||||
import { View } from '@tarojs/components'
|
||||
import React from 'react'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { Cell, Button } from '@nutui/nutui-react-taro'
|
||||
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'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const DealerIndex: React.FC = () => {
|
||||
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 className="p-4">
|
||||
<Text className="text-lg font-bold mb-4">分销中心</Text>
|
||||
|
||||
<Cell.Group>
|
||||
<Cell
|
||||
title="我的团队"
|
||||
description="查看团队成员"
|
||||
extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/team/index'})}>查看</Button>}
|
||||
/>
|
||||
<Cell
|
||||
title="我的订单"
|
||||
description="查看分销订单"
|
||||
extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/orders/index'})}>查看</Button>}
|
||||
/>
|
||||
<Cell
|
||||
title="提现管理"
|
||||
description="申请提现"
|
||||
extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/withdraw/index'})}>提现</Button>}
|
||||
/>
|
||||
<Cell
|
||||
title="推广二维码"
|
||||
description="生成推广码"
|
||||
extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/qrcode/index'})}>生成</Button>}
|
||||
/>
|
||||
</Cell.Group>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default Index
|
||||
export default DealerIndex
|
||||
|
||||
Reference in New Issue
Block a user