Real Name: ' + jsonData.result.realname + '
'; - resultDiv.innerHTML += 'ID Card: ' + jsonData.result.idcard + '
'; - resultDiv.innerHTML += 'Order ID: ' + jsonData.result.orderid + '
'; - resultDiv.innerHTML += 'Result: ' + jsonData.result.res + '
'; - } else { - resultDiv.innerHTML += 'Result information is not available.
'; - // 这里假设你有一个发起支付的方法,传入所选行的数据 - // startPayment(this.selectedRow); - console.log(row) - window.open("http://localhost:9701/alipay/pay?middlePrice="+row.middlePrice) - this.$message.success('付款成功') +show(){ + // 创建一个容器来展示数据 + var container = document.getElementById('news-list'); + // 清空容器内容 + container.innerHTML = ''; - } + // 创建一个div来存放结果 + var resultDiv = document.createElement('div'); - // 将结果div添加到容器中 - container.appendChild(resultDiv); + // 检查jsonData.reason + if (jsonData.reason !== undefined) { + // 移除reason中的感叹号(如果存在) + resultDiv.innerHTML += 'Real Name: ' + jsonData.result.realname + '
'; + resultDiv.innerHTML += 'ID Card: ' + jsonData.result.idcard + '
'; + resultDiv.innerHTML += 'Order ID: ' + jsonData.result.orderid + '
'; + resultDiv.innerHTML += 'Result: ' + jsonData.result.res + '
'; + } else { + resultDiv.innerHTML += 'Result information is not available.
'; + } + + // 将结果div添加到容器中 + container.appendChild(resultDiv); - } //测试次数-1 reducetestcount(this.myapi).then(response=>{}) } diff --git a/src/views/market/orders/index.vue b/src/views/market/orders/index.vue index 968cabc..1b49bcf 100644 --- a/src/views/market/orders/index.vue +++ b/src/views/market/orders/index.vue @@ -97,6 +97,7 @@