this.$hideLoading()

This commit is contained in:
花有清香月有阴
2022-01-18 10:05:35 +08:00
parent b661481877
commit ffe3eb79f0
3 changed files with 25 additions and 76 deletions

View File

@@ -131,43 +131,25 @@ export default {
}, },
methods: { methods: {
getUser() { getUser() {
this.$loading() this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`).then((res) => {
this.$http if (res.code == 0) {
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`) this.userList = res.data
.then((res) => { }
if (res.code == 0) { })
this.userList = res.data
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
}, },
// 异常情况 // 异常情况
getErrThing() { getErrThing() {
this.$loading() this.$loading()
this.$http this.$http.post(`/app/appepidemichealthreport/list?memberId=${this.id}`).then((res) => {
.post(`/app/appepidemichealthreport/list?memberId=${this.id}`) if (res.code == 0) {
.then((res) => { this.datas = res.data.records
if (res.code == 0) { }
this.datas = res.data.records })
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
}, },
// 异常情况记录 // 异常情况记录
getRecord() { getRecord() {
this.$loading()
this.$http this.$http
.post(`/app/appepidemicunusuallog/list`, null, { .post(`/app/appepidemicunusuallog/list`, null, {
params: { params: {
@@ -179,14 +161,8 @@ export default {
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.$hideLoading()
} else {
this.$hideLoading()
} }
}) })
.catch(() => {
this.$hideLoading()
})
}, },
// 新增记录 // 新增记录

View File

@@ -147,22 +147,11 @@ export default {
}, },
getUserList() { getUserList() {
uni.showLoading({ this.$http.post(`/app/appepidemicreportmember/statistic?areaId=${this.areaId}`).then((res) => {
title: '加载数据中', if (res.code == 0) {
this.userList = res.data
}
}) })
this.$http
.post(`/app/appepidemicreportmember/statistic?areaId=${this.areaId}`)
.then((res) => {
if (res.code == 0) {
this.userList = res.data
uni.hideLoading()
} else {
uni.hideLoading()
}
})
.catch(() => {
uni.hideLoading()
})
}, },
goDetail(item) { goDetail(item) {

View File

@@ -157,38 +157,22 @@ export default {
methods: { methods: {
getUser() { getUser() {
this.$loading() this.$loading()
this.$http this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`).then((res) => {
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`) if (res.code == 0) {
.then((res) => { this.data = res.data
if (res.code == 0) { this.data.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2')
this.data = res.data }
this.data.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2") })
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
}, },
// 异常情况记录 // 异常情况记录
getRecord() { getRecord() {
this.$loading() this.$loading()
this.$http this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`).then((res) => {
.post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`) if (res.code == 0) {
.then((res) => { this.datas = res.data.records
if (res.code == 0) { }
this.datas = res.data.records })
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
}, },
callPhone(phone) { callPhone(phone) {