refactor: merge index & member page

This commit is contained in:
Dawn1Ocean
2024-03-22 10:23:39 +08:00
parent a7c96b2e8c
commit f3f5be793b
21 changed files with 268 additions and 468 deletions
+9 -2
View File
@@ -4,6 +4,8 @@ import { AtTimeline } from 'taro-ui';
import pt from '@/plain-text';
import tick from '@/assets/icons/MainPage/tick.svg';
import cross from '@/assets/icons/MainPage/cross.svg';
import clock from '@/assets/icons/MemberPage/clock.svg';
import wechatUser from '@/wechat';
export class DutyData {
constructor() {
@@ -17,7 +19,7 @@ export class DutyData {
isInDuty: boolean;
inDutyCnt?: number;
currentDuty?: 'off' | '1' | '2' | '3';
currentDuty?: 'off' | '1' | '2' | '3' | 'others';
offDutyReason?: string;
dutyRecoverTime?: string;
place: string;
@@ -33,7 +35,7 @@ class Card extends Component {
const place = this.props.place;
const dc = pt.get().mainPage.dutyCard;
const title = inDuty ? dc.inDuty.title : dc.offDuty.title;
const iconsrc = inDuty ? tick : cross;
const iconsrc = inDuty ? tick : wechatUser.getAccess() ? clock : cross;
return (
<View>
<View
@@ -66,6 +68,11 @@ class Card extends Component {
}
export class DutyInfo extends Component {
state: {
isLoading: false;
isDisable: false;
};
props = {
data: new DutyData(),
};