接口
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {queryTask, taskOperation} from '@/utils/getData2.js'
|
||||
import {tasks, taskoperation} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
@@ -60,11 +60,11 @@
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._queryTask(this.keyword, this.startPoint, this.endPoint)
|
||||
this._tasks(this.keyword, this.startPoint, this.endPoint)
|
||||
},
|
||||
methods: {
|
||||
async _queryTask () {
|
||||
let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
|
||||
async _tasks () {
|
||||
let res = await tasks(this.keyword, this.startPoint, this.endPoint)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...res.result]
|
||||
} else {
|
||||
@@ -74,14 +74,14 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
async _taskOperation (type) {
|
||||
async _taskoperation (type) {
|
||||
try {
|
||||
let res = await taskOperation(this.pkId, type)
|
||||
let res = await taskoperation(type, this.pkId)
|
||||
if (res.code === '1') {
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this._queryTask()
|
||||
this._tasks()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
@@ -108,7 +108,7 @@
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
this._taskOperation(type)
|
||||
this._taskoperation(type)
|
||||
},
|
||||
toSure2 (type) {
|
||||
this.disabled2 = true
|
||||
@@ -116,7 +116,7 @@
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
this._taskOperation(type)
|
||||
this._taskoperation(type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user