diff --git a/pages/API/unicloud-call-function/unicloud-call-function.uvue b/pages/API/unicloud-call-function/unicloud-call-function.uvue index 290927ef1040f36c4bce58040d403d6ab7036685..f632adf9a8d780e123a69ec032915c819d20ff76 100644 --- a/pages/API/unicloud-call-function/unicloud-call-function.uvue +++ b/pages/API/unicloud-call-function/unicloud-call-function.uvue @@ -55,13 +55,13 @@ num: 1, str: 'ABC' } - }).then(res => { + }).then(res => { const result = res.result this.callFunctionResult = result console.log(JSON.stringify(result)) uni.hideLoading() this.notify(result['showMessage'] as string, '提示') - }).catch((err : any | null) => { + }).catch((err : any | null) => { const error = err as UniCloudError this.callFunctionError = { errCode: error.errCode, @@ -76,4 +76,4 @@ \ No newline at end of file + diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue index 8e2726abcecbcb1c09ee2e498c1cd6694de040b2..2d2e9734600e5d345c42729d1325ad6c4b9ae6df 100644 --- a/pages/API/unicloud-database/unicloud-database.uvue +++ b/pages/API/unicloud-database/unicloud-database.uvue @@ -67,16 +67,15 @@ .add({ num: 1, tag: 'default-tag', - date: new Date(), - point: new db.Geo.Point(116, 38) + date: new Date() }) - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.addId = res.id this.notify(`新增成功,id: ${res.id}`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -95,7 +94,7 @@ num: 3, tag: 'default-tag', }]) - .then((res) => { + .then((res) => { uni.hideLoading() console.log(res) console.log('JSON.stringify(res.inserted)', JSON.stringify(res.inserted)) @@ -103,7 +102,7 @@ this.batchAddinserted = res.inserted this.notify(`新增成功条数${res.inserted}, id列表: ${res.ids.join(',')}`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -123,13 +122,13 @@ .skip(1) .limit(2) .get() - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.getData = res.data this.notify(`获取成功,取到了${res.data.length}条数据`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -149,13 +148,13 @@ .skip(1) .limit(2) .get() - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.getWithCommandData = res.data this.notify(`获取成功,取到了${res.data.length}条数据`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -173,13 +172,13 @@ .update({ num: 4 }) - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.updateUpdated = res.updated this.notify(`更新成功,更新了${res.updated}条数据`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -195,13 +194,13 @@ 'tag == "default-tag"' ) .remove() - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.removeDeleted = res.deleted this.notify(`删除成功,删掉了${res.deleted}条数据`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -246,11 +245,11 @@ tag: "default-tag" }]) }) - .then((_) : void => { + .then((_) : void => { uni.hideLoading() this.notify('数据初始化成功', '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() console.error(err) const error = err as UniCloudError @@ -270,13 +269,13 @@ .getTemp() db.collection(local, foreign) .get() - .then(res => { + .then(res => { uni.hideLoading() console.log(res) this.lookupData = res.data this.notify(`联表查询成功,取到了${res.data.length}条数据`, '提示') }) - .catch((err : any | null) => { + .catch((err : any | null) => { uni.hideLoading() const error = err as UniCloudError this.notify(error.errMsg, '错误') @@ -287,4 +286,4 @@ \ No newline at end of file + diff --git a/pages/API/unicloud-file-api/unicloud-file-api.uvue b/pages/API/unicloud-file-api/unicloud-file-api.uvue index a37cc58735a52d4bb6ec2eaa54c7136d4fca1ac7..049d9cf1f662a9cb7d5798a4685213fdf87ade99 100644 --- a/pages/API/unicloud-file-api/unicloud-file-api.uvue +++ b/pages/API/unicloud-file-api/unicloud-file-api.uvue @@ -38,7 +38,7 @@ filePath: tempFilePath, cloudPath: 'test.jpg' }) - .then(function (res) { + .then(function (res) { uni.hideLoading() console.log(res) uni.showModal({ @@ -46,7 +46,7 @@ showCancel: false }); }) - .catch(function (err : any | null) { + .catch(function (err : any | null) { uni.hideLoading() const error = err as UniCloudError uni.showModal({ @@ -68,4 +68,4 @@ \ No newline at end of file + diff --git a/pages/API/unicloud-import-object/unicloud-import-object.uvue b/pages/API/unicloud-import-object/unicloud-import-object.uvue index ff42363115401a1c1cc301b067a07292fec70fc0..a07e62e32be3217bc6836bfcd193c77c92dc081c 100644 --- a/pages/API/unicloud-import-object/unicloud-import-object.uvue +++ b/pages/API/unicloud-import-object/unicloud-import-object.uvue @@ -63,11 +63,11 @@ }) const title = this.todoTitle const content = this.todoContent - todo.add(title, content).then((res : UTSJSONObject) : void => { + todo.add(title, content).then((res : UTSJSONObject) : void => { this.returnTodoTitle = res['title'] as string this.returnTodoContent = res['content'] as string this.notify(res['showMessage'] as string, '提示') - }).catch((err : any | null) : void => { + }).catch((err : any | null) : void => { const error = err as UniCloudError console.error(error) }) @@ -78,9 +78,9 @@ retry: true } }) - todoObj.randomFail().then((res : UTSJSONObject) : void => { + todoObj.randomFail().then((res : UTSJSONObject) : void => { this.notify(res['showMessage'] as string, '提示') - }).catch((err : any | null) : void => { + }).catch((err : any | null) : void => { const error = err as UniCloudError console.error(error) }) @@ -89,10 +89,10 @@ const todo = uniCloud.importObject('todo', { customUI: this.isUniTest }) - todo.fail().then((res : UTSJSONObject) : void => { + todo.fail().then((res : UTSJSONObject) : void => { this.notify('todo.fail应调用失败,此处错误的触发了成功回调', '错误') console.log('todo.fail: ', res); - }).catch((err : any | null) : void => { + }).catch((err : any | null) : void => { const error = err as UniCloudError this.failErrCode = error.errCode as string console.error(error) @@ -107,10 +107,10 @@ const todo = uniCloud.importObject('todo', { customUI: this.isUniTest }) - todo.success().then((res : UTSJSONObject) : void => { + todo.success().then((res : UTSJSONObject) : void => { this.successErrCode = res['errCode'] as number this.notify(res['showMessage'] as string, '提示') - }).catch((err : any | null) : void => { + }).catch((err : any | null) : void => { const error = err as UniCloudError console.error(error) }) @@ -121,4 +121,4 @@ \ No newline at end of file +