diff --git a/api/list.js b/api/list.js index f83bc41..048b9e2 100644 --- a/api/list.js +++ b/api/list.js @@ -20,4 +20,5 @@ export function getMessageInfo(params) { useNetWork(); return fetch.get(MessageInfo,params).then(res => res); -} \ No newline at end of file +} + diff --git a/api/list.js b/api/list.js index f83bc41..048b9e2 100644 --- a/api/list.js +++ b/api/list.js @@ -20,4 +20,5 @@ export function getMessageInfo(params) { useNetWork(); return fetch.get(MessageInfo,params).then(res => res); -} \ No newline at end of file +} + diff --git a/pages/list/list.vue b/pages/list/list.vue index 0e67c11..3420dcf 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -209,22 +209,24 @@ } debounce(this.searchList(),10000) }, - async exportClick() { - let ids - this.checkboxList.length === 0 ? ids = this.list.map(item=>item.id).join() : ids = this.checkboxList.map(item=> item.id).join() - wx.downloadFile({ - url: BASE_URL + `/visitor/exportMessage?ids=${ids}`, + //确定导出 + async exportClick() { + let ids + ids = this.checkboxList.length === 0 ? this.list.map(item=>item.id).join() : this.checkboxList.map(item=> item.id).join() + wx.downloadFile({ + url: `https://visitor.gd.smartlog.work/visitor/exportMessage?ids=${ids}`, success: function (res) { const filePath = res.tempFilePath + console.log(res) wx.openDocument({ filePath: filePath, success: function (res) { - console.log('打开文档成功') + console.log(res) } }) } }) - }, + }, //根据条件搜索 async searchList(){ const res = await getList(this.queryList)