refactor: merge index & member page
This commit is contained in:
@@ -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(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user