fix: request without token; request before getting id in detailframework
parent
8b2ed25109
commit
86398ff9a9
|
|
@ -50,6 +50,7 @@ interface TicketDetailState {
|
||||||
comment: boolean;
|
comment: boolean;
|
||||||
status: boolean;
|
status: boolean;
|
||||||
reminder: boolean;
|
reminder: boolean;
|
||||||
|
framework: boolean;
|
||||||
};
|
};
|
||||||
isDisable: {
|
isDisable: {
|
||||||
oreo: boolean;
|
oreo: boolean;
|
||||||
|
|
@ -94,6 +95,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
comment: false,
|
comment: false,
|
||||||
status: false,
|
status: false,
|
||||||
reminder: false,
|
reminder: false,
|
||||||
|
framework: true,
|
||||||
},
|
},
|
||||||
isDisable: {
|
isDisable: {
|
||||||
oreo: false,
|
oreo: false,
|
||||||
|
|
@ -122,6 +124,12 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
isMember: wechatUser.getAccess(),
|
isMember: wechatUser.getAccess(),
|
||||||
});
|
});
|
||||||
getDisable(this, id);
|
getDisable(this, id);
|
||||||
|
this.setState({
|
||||||
|
isLoading: {
|
||||||
|
...this.state.isLoading,
|
||||||
|
framework: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddToOreo(): void {
|
onAddToOreo(): void {
|
||||||
|
|
@ -675,11 +683,13 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
>
|
>
|
||||||
{sheetItemsRenderer}
|
{sheetItemsRenderer}
|
||||||
</AtActionSheet>
|
</AtActionSheet>
|
||||||
<DetailFramework
|
{!this.state.isLoading.framework && (
|
||||||
middleButton={middleButton}
|
<DetailFramework
|
||||||
id={this.state.id}
|
middleButton={middleButton}
|
||||||
isInfoShow={isInfoShow}
|
id={this.state.id}
|
||||||
/>
|
isInfoShow={isInfoShow}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<PageFooter />
|
<PageFooter />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ export function getDisable(that: TicketDetail, id: number) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
|
token: wechatUser.getToken(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import Taro from '@tarojs/taro';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { FixStatus } from '@/common';
|
import { FixStatus } from '@/common';
|
||||||
import pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
import { getUrl } from '.';
|
import { getUrl } from '.';
|
||||||
|
|
||||||
const mapStatusStep: Map<FixStatus, 0 | 1 | 2 | 3> = new Map([
|
const mapStatusStep: Map<FixStatus, 0 | 1 | 2 | 3> = new Map([
|
||||||
|
|
@ -23,6 +24,7 @@ export function getTicketInfo(that: DetailFramework, id: number) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
|
token: wechatUser.getToken(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue