diff --git a/page.html b/page.html
new file mode 100644
index 0000000..db31592
--- /dev/null
+++ b/page.html
@@ -0,0 +1,480 @@
+
+
+
+
+
+
+ å½å
æ°é»_æ°é»ä¸å¿_æ°æµªç½
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ä¸è½½æ°æµªæ°é»
+
+
+
+
+ æ°æµªæ°é»App
+
+

+
+
+
+ æè§åé¦
+
+
+
+
+ è¿åé¡¶é¨
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/buyer/index.js b/pages/buyer/index.js
index 7d5d0df..8b1cc66 100644
--- a/pages/buyer/index.js
+++ b/pages/buyer/index.js
@@ -640,7 +640,7 @@ Page({
region: product.region || '', // 【新增】添加地区字段
grossWeight: grossWeightValue, // 确保不为null
displayGrossWeight: formatGrossWeight(grossWeightValue, product.weight),
- seller: product.seller && product.seller.nickName ? product.seller.nickName : '未知卖家',
+ seller: product.seller && (product.seller.name || product.seller.nickName) ? (product.seller.name || product.seller.nickName) : '未知卖家',
status: product.status || 'published',
imageUrls: product.imageUrls || [],
reservedCount: reservedCount,
@@ -838,7 +838,7 @@ Page({
region: product.region || '', // 【新增】添加地区字段
grossWeight: grossWeightValue,
displayGrossWeight: formatGrossWeight(grossWeightValue, product.weight),
- seller: product.seller && product.seller.nickName ? product.seller.nickName : '未知卖家',
+ seller: product.seller && (product.seller.name || product.seller.nickName) ? (product.seller.name || product.seller.nickName) : '未知卖家',
status: product.status || 'published',
imageUrls: product.imageUrls || [],
createdAt: product.created_at || product.createTime || null,
@@ -1517,7 +1517,7 @@ Page({
const userInfo = {
userId: res.data.id,
openid: openid,
- nickname: res.data.nickname || '',
+ name: res.data.name || res.data.nickname || '',
avatarUrl: res.data.avatar || '',
type: res.data.type
};
@@ -1618,9 +1618,9 @@ Page({
// 获取用户名
getUserName: function (e) {
console.log('获取用户名:', e);
- const { nickname } = e.detail.value;
+ const { name } = e.detail.value;
- if (!nickname || nickname.trim() === '') {
+ if (!name || name.trim() === '') {
wx.showToast({
title: '昵称不能为空',
icon: 'none'
@@ -1629,7 +1629,7 @@ Page({
}
const userInfo = {
- nickname: nickname.trim(),
+ name: name.trim(),
avatarUrl: this.data.avatarUrl
};
@@ -1727,7 +1727,7 @@ Page({
const userInfo = {
openid: res.data.openid,
userId: res.data.userId,
- nickname: userProfile.userInfo.nickName,
+ name: userProfile.userInfo.name || userProfile.userInfo.nickName,
avatarUrl: userProfile.userInfo.avatarUrl,
type: this.data.pendingUserType
};
@@ -1767,7 +1767,7 @@ Page({
const userInfo = {
openid: res.data.openid,
userId: res.data.userId,
- nickname: '微信用户',
+ name: '微信用户',
avatarUrl: '/images/default-avatar.png',
type: this.data.pendingUserType
};
diff --git a/pages/buyer/index.wxml b/pages/buyer/index.wxml
index e0aec79..3120189 100644
--- a/pages/buyer/index.wxml
+++ b/pages/buyer/index.wxml
@@ -173,7 +173,7 @@