删除setting页面

This commit is contained in:
Wang Kejun 2023-11-09 11:24:22 +08:00
parent 17974a9b9c
commit 5aa5cd8950
19 changed files with 0 additions and 339 deletions

View File

@ -1,4 +0,0 @@
/// <reference types="wechat-miniprogram" />
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../oak-app-domain").EntityDict, keyof import("../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -1,29 +0,0 @@
export default OakComponent({
isList: false,
formData({ features }) {
const userId = features.token.getUserId(true);
return {
userId,
};
},
methods: {
logout() {
this.features.token.logout();
this.navigateTo({
url: '/login',
}, undefined, true);
},
setVisible() {
this.setMessage({
type: 'warning',
content: '功能开发中',
});
},
goMyInfo() {
this.navigateTo({
url: '/user/info',
oakId: this.state.userId,
}, undefined, true);
},
},
});

View File

@ -1,7 +0,0 @@
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"usingComponents": {
"l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index"
}
}

View File

@ -1,15 +0,0 @@
@import "../../config/styles/mp/index.less";
@import "../../config/styles/mp/mixins.less";
.page-body {
height: 100vh;
display: flex;
flex: 1;
flex-direction: column;
background-color: @oak-bg-color-page;
}
.cell {
background-color: #fff;
padding: 0 20rpx;
}

View File

@ -1,7 +0,0 @@
<!-- index.wxml -->
<view class="page-body">
<view class="cell">
<l-list title="我的信息" icon="user" bind:lintap="goMyInfo" >
</l-list>
</view>
</view>

View File

@ -1,15 +0,0 @@
.container {
background: var(--oak-bg-color-page);
display: flex;
flex-direction: column;
flex: 1;
height: 100vh;
}
.list {
margin-top: 10px;
margin-bottom: 10px;
}
.logoutBox {
margin: 10px 16px;
}

View File

@ -1,12 +0,0 @@
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../oak-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'user', false, {
name: string;
mobile: string;
nickname: string;
avatarUrl: string;
userId: string;
}, {
logout: () => void;
setVisible: () => void;
}>): import("react/jsx-runtime").JSX.Element;

View File

@ -1,46 +0,0 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { List, Button } from 'antd-mobile';
import Style from './mobile.module.less';
const LIST_BTN = [
{
id: 1,
label: '个人信息保护政策',
},
{
id: 2,
label: '隐私摘要政策',
},
{
id: 3,
label: '个人信息手机清单',
},
{
id: 4,
label: '应用权限说明',
},
{
id: 5,
label: '个人信息共享清单',
},
// {
// id: 6,
// label: '注销账号',
// },
];
export default function render(props) {
const { data, methods } = props;
const { userId } = data;
const { logout, setVisible } = methods;
return (_jsxs("div", { className: Style.container, children: [_jsx(List, { className: Style.list, children: LIST_BTN.map((ele) => {
return (_jsx(List.Item, { arrow: true, onClick: () => {
setVisible();
}, children: ele.label }));
}) }), _jsx("div", { style: { flex: 1 } }), userId && (_jsx("div", { className: Style.logoutBox, children: _jsx(Button, { block: true,
// color="danger"
style: {
'--background-color': 'var(--oak-color-primary)',
'--text-color': 'var(--oak-bg-color-container)',
}, onClick: () => {
logout();
}, children: "\u9000\u51FA\u767B\u5F55" }) }))] }));
}

View File

@ -1,5 +0,0 @@
.container {
background: var(--oak-bg-color-page);
box-shadow: 0 2px 3px #0000001a;
border-radius: 3px;
}

View File

@ -1 +0,0 @@
export default function Render(): import("react/jsx-runtime").JSX.Element;

View File

@ -1,4 +0,0 @@
import { jsx as _jsx } from "react/jsx-runtime";
export default function Render() {
return _jsx("div", { children: "\u5C1A\u672A\u5B9E\u73B0" });
}

View File

@ -1,7 +0,0 @@
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"usingComponents": {
"l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index"
}
}

View File

@ -1,15 +0,0 @@
@import "../../config/styles/mp/index.less";
@import "../../config/styles/mp/mixins.less";
.page-body {
height: 100vh;
display: flex;
flex: 1;
flex-direction: column;
background-color: @oak-bg-color-page;
}
.cell {
background-color: #fff;
padding: 0 20rpx;
}

View File

@ -1,38 +0,0 @@
export default OakComponent({
isList: false,
formData({ features }) {
const userId = features.token.getUserId(true);
return {
userId,
};
},
methods: {
logout() {
this.features.token.logout();
this.navigateTo(
{
url: '/login',
},
undefined,
true
);
},
setVisible() {
this.setMessage({
type: 'warning',
content: '功能开发中',
});
},
goMyInfo() {
this.navigateTo(
{
url: '/user/info',
oakId: this.state.userId,
},
undefined,
true
);
},
},
});

View File

@ -1,7 +0,0 @@
<!-- index.wxml -->
<view class="page-body">
<view class="cell">
<l-list title="我的信息" icon="user" bind:lintap="goMyInfo" >
</l-list>
</view>
</view>

View File

@ -1,15 +0,0 @@
.container {
background: var(--oak-bg-color-page);
display: flex;
flex-direction: column;
flex: 1;
height: 100vh;
}
.list {
margin-top: 10px;
margin-bottom: 10px;
}
.logoutBox {
margin: 10px 16px;
}

View File

@ -1,5 +0,0 @@
.container {
background: var(--oak-bg-color-page);
box-shadow: 0 2px 3px #0000001a;
border-radius: 3px;
}

View File

@ -1,8 +0,0 @@
import React from 'react';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../oak-app-domain';
import Style from './web.module.less';
export default function Render() {
return <div></div>
}

View File

@ -1,99 +0,0 @@
import React from 'react';
import { List, Button } from 'antd-mobile';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../oak-app-domain';
import Style from './mobile.module.less';
type btnProps = {
id: number;
label: string;
};
const LIST_BTN: btnProps[] = [
{
id: 1,
label: '个人信息保护政策',
},
{
id: 2,
label: '隐私摘要政策',
},
{
id: 3,
label: '个人信息手机清单',
},
{
id: 4,
label: '应用权限说明',
},
{
id: 5,
label: '个人信息共享清单',
},
// {
// id: 6,
// label: '注销账号',
// },
];
export default function render(
props: WebComponentProps<
EntityDict,
'user',
false,
{
name: string;
mobile: string;
nickname: string;
avatarUrl: string;
userId: string;
},
{
logout: () => void;
setVisible: () => void;
}
>
) {
const { data, methods } = props;
const { userId } = data;
const { logout, setVisible } = methods;
return (
<div className={Style.container}>
<List className={Style.list}>
{LIST_BTN.map((ele) => {
return (
<List.Item
arrow
onClick={() => {
setVisible();
}}
>
{ele.label}
</List.Item>
);
})}
</List>
<div style={{ flex: 1 }} />
{userId && (
<div className={Style.logoutBox}>
<Button
block
// color="danger"
style={{
'--background-color': 'var(--oak-color-primary)',
'--text-color': 'var(--oak-bg-color-container)',
}}
onClick={() => {
logout();
}}
>
退
</Button>
</div>
)}
</div>
);
}