change prettier format
This commit is contained in:
@@ -10,7 +10,7 @@ export function getDutyInfo(that: MainPage) {
|
||||
token: 'token_test',
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
if (data.isInDuty) {
|
||||
that.setState({
|
||||
@@ -30,7 +30,7 @@ export function getDutyInfo(that: MainPage) {
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
dutyData: {
|
||||
|
||||
@@ -10,7 +10,7 @@ export function setLocaleData(lang: Lang) {
|
||||
token: 'token_test',
|
||||
lang: lang,
|
||||
},
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
console.log(res.data);
|
||||
});
|
||||
}
|
||||
@@ -22,7 +22,7 @@ export function getLocaleData() {
|
||||
data: {
|
||||
token: 'token_test',
|
||||
},
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
console.log(res.data);
|
||||
pt.setLang(res.data.data.lang);
|
||||
Taro.reLaunch({
|
||||
|
||||
@@ -12,7 +12,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
||||
token: 'token_test',
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (!res.data.success) {
|
||||
that.setState({
|
||||
rs: {
|
||||
@@ -28,7 +28,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
||||
success: true,
|
||||
},
|
||||
fixList: res.data.data.list.map(
|
||||
item =>
|
||||
(item) =>
|
||||
new TicketListItem(
|
||||
item.id,
|
||||
item.device,
|
||||
@@ -39,7 +39,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
||||
),
|
||||
});
|
||||
})
|
||||
.catch(reason => {
|
||||
.catch((reason) => {
|
||||
that.setState({
|
||||
rs: {
|
||||
loading: false,
|
||||
|
||||
@@ -21,7 +21,7 @@ export function submitTicket(that: RepairPage) {
|
||||
accessories: that.state.checkedList,
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
@@ -31,7 +31,7 @@ export function submitTicket(that: RepairPage) {
|
||||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
||||
@@ -12,7 +12,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
let former = that.state.rs;
|
||||
if (!res.data.success) {
|
||||
that.setState({
|
||||
@@ -30,7 +30,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
||||
status: data.status,
|
||||
};
|
||||
const notes: Array<TicketNote> = [];
|
||||
data.notes.map(item => {
|
||||
data.notes.map((item) => {
|
||||
notes.push({
|
||||
id: item.id,
|
||||
op: item.op,
|
||||
@@ -46,7 +46,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(reason => {
|
||||
.catch((reason) => {
|
||||
let former = that.state.rs;
|
||||
that.setState({
|
||||
rs: former.trans(false),
|
||||
|
||||
@@ -16,7 +16,7 @@ export function updateUserInfo(that: InformPage) {
|
||||
phone: that.state.phone,
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
@@ -26,7 +26,7 @@ export function updateUserInfo(that: InformPage) {
|
||||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
||||
Reference in New Issue
Block a user