| 1234567891011121314151617181920212223 |
- import Buttons from "@/components/Buttons";
- import { clear, logout } from "@/services/user";
- import { View,Text,Button } from "@tarojs/components";
- import { useDispatch } from "react-redux";
- export default function Page(){
- const dispatch = useDispatch();
- function logoutF() {
- dispatch(logout() as any);
- }
- function clearF() {
- dispatch(clear() as any);
- }
-
- return <View>
- <Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />
- <Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} />
- </View>
- }
|