diff --git a/src/views/system/jd-instruction/index.vue b/src/views/system/jd-instruction/index.vue index ee0011d..e6a8a54 100644 --- a/src/views/system/jd-instruction/index.vue +++ b/src/views/system/jd-instruction/index.vue @@ -5,43 +5,34 @@ 京东指令台 - - - - - - - - 执行 - 菜单 - 清空 - - - - - - - - - - - - + + + + + + 执行 + 菜单 + 清空 + + + + 响应 + +
+ +
+
+
+
+ 第 {{ idx + 1 }} 段 + 复制此段 +
+ +
+
+ 复制全部 +
+
@@ -55,7 +46,6 @@ export default { return { form: { command: '' }, loading: false, - result: '', resultList: [] } }, @@ -69,11 +59,6 @@ export default { const text = this.resultList.join('\n\n') this.doCopy(text) }, - copyResult() { - if (!this.result) return - const text = this.result - this.doCopy(text) - }, doCopy(text) { if (navigator.clipboard) { navigator.clipboard.writeText(text).then(() => { @@ -101,13 +86,9 @@ export default { this.loading = false if (res && (res.code === 200 || res.msg === '操作成功')) { const data = res.data - if (Array.isArray(data)) { - this.resultList = data - this.result = '' - } else { - this.result = data || res.msg || '' - this.resultList = [] - } + if (Array.isArray(data)) this.resultList = data + else if (typeof data === 'string') this.resultList = data ? [data] : [] + else this.resultList = [] } else { this.$modal.msgError(res && res.msg ? res.msg : '执行失败') } @@ -121,7 +102,6 @@ export default { }, clearAll() { this.form.command = '' - this.result = '' this.resultList = [] } } @@ -130,6 +110,8 @@ export default {