change prettier format

This commit is contained in:
Dawn1Ocean
2024-03-12 21:55:53 +08:00
parent e11a58dbb5
commit e1c3b464a6
14 changed files with 46 additions and 47 deletions
+2 -2
View File
@@ -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: {
+2 -2
View File
@@ -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({
+3 -3
View File
@@ -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,
+2 -2
View File
@@ -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,
+3 -3
View File
@@ -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),
+2 -2
View File
@@ -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,