From f929fd568a538d83bb7f09fae5567b1c8efb4fa6 Mon Sep 17 00:00:00 2001 From: Default User Date: Sat, 31 Jan 2026 15:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/detail/index.js | 2 ++ pages/order/detail/index.wxml | 12 +++++++++++ pages/order/detail/index.wxss | 38 ++++++++++++++++++++++++++++++++++ server-example/server-mysql.js | 5 +++++ 4 files changed, 57 insertions(+) diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index b87dbd8..366ed87 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -47,6 +47,8 @@ Page({ API.request(`/api/orders/detail/${orderId}`, 'GET', {}) .then(res => { console.log('获取订单详情成功:', res); + console.log('订单详情数据结构:', JSON.stringify(res.data, null, 2)); + console.log('是否包含QR_code字段:', 'QR_code' in (res.data || {})); if (res.success) { this.setData({ orderDetail: res.data, diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 0ccd5fc..0ee08c0 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -97,6 +97,18 @@ + + + + 二维码 + + + + 二维码暂无 + QR_code: {{orderDetail.QR_code}} + + + diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss index 89a03c2..aa2ef79 100644 --- a/pages/order/detail/index.wxss +++ b/pages/order/detail/index.wxss @@ -204,3 +204,41 @@ font-size: 32rpx; color: #999; } + +/* 二维码 */ +.qrcode-container { + display: flex; + justify-content: center; + align-items: center; + background-color: #f9f9f9; + border-radius: 8rpx; + padding: 40rpx; +} + +.qrcode-image { + width: 300rpx; + height: 300rpx; + border-radius: 8rpx; +} + +.qrcode-placeholder { + width: 300rpx; + height: 300rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: #f0f0f0; + border-radius: 8rpx; + color: #999; + font-size: 24rpx; + text-align: center; +} + +.qrcode-placeholder text { + margin-bottom: 10rpx; +} + +.qrcode-placeholder text:last-child { + margin-bottom: 0; +} diff --git a/server-example/server-mysql.js b/server-example/server-mysql.js index 122a1e9..85e0252 100644 --- a/server-example/server-mysql.js +++ b/server-example/server-mysql.js @@ -2195,6 +2195,11 @@ JdSalesMain.init({ type: DataTypes.STRING(255), allowNull: true, comment: '车牌' + }, + QR_code: { + type: DataTypes.TEXT, + allowNull: true, + comment: '二维码' } }, { sequelize: tradeLibrarySequelize,