diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue index 26f5fc0..54bb30a 100644 --- a/pages/mine/details2.vue +++ b/pages/mine/details2.vue @@ -561,7 +561,7 @@ this.init(info) }, - + methods: { // 关闭弹窗 close() { @@ -1113,18 +1113,19 @@ carId: that.customerId, itemId: that.buildingID }).then(data => { - if (data.data.code == 10000) { + console.log(data) + if (!data || data.code == 10000) { that.status = 1 uni.showToast({ title: '取消成功', duration: 2000 }); - } else { - uni.showToast({ - title: data.data.message, - duration: 2000 - }); } + }).catch(e => { + uni.showToast({ + title: e.message, + duration: 2000 + }); }) } else if (res.cancel) { console.log('用户点击取消'); @@ -1147,19 +1148,18 @@ "itemId": that.buildingID, } that.$u.post(config.service.addATD, objdata).then(data => { - - if (data.data.code == 10000) { + if (!data || data.code == 10000) { that.status = 0 uni.showToast({ title: '加精成功', duration: 2000 }); - } else { - uni.showToast({ - title: data.data.message, - duration: 2000 - }); } + }).catch(e => { + uni.showToast({ + title: e.message, + duration: 2000 + }); }) } else if (res.cancel) { console.log('用户点击取消'); @@ -1579,14 +1579,14 @@ asd.isshow = false; }) }, - - + + //录音实例 zyAudio() { console.log('this.recordPath', this.recordPath) this.$refs.zyAudio.setSrc(this.recordPath) }, - + }, } diff --git a/uview-ui/index.js b/uview-ui/index.js index d38a3bf..d6924d0 100644 --- a/uview-ui/index.js +++ b/uview-ui/index.js @@ -3,7 +3,7 @@ import mixin from './libs/mixin/mixin.js' // 引入关于是否mixin集成小程序分享的配置 // import wxshare from './libs/mixin/mpShare.js' // 全局挂载引入http相关请求拦截插件 -import http from './libs/request' +import http from './libs/request/index.js' function wranning(str) { // 开发环境进行信息输出,主要是一些报错信息