|
|
@ -3046,6 +3046,23 @@ Page({ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 记录用户点击对比价格的踪迹
|
|
|
|
|
|
const traceData = { |
|
|
|
|
|
action: 'click_compare_price', |
|
|
|
|
|
productId: this.data.goodsDetail.productId || this.data.goodsDetail.id, |
|
|
|
|
|
productName: this.data.goodsDetail.name || '', |
|
|
|
|
|
timestamp: new Date().toISOString(), |
|
|
|
|
|
page: 'goods-detail/goods-detail' |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 调用用户踪迹记录API
|
|
|
|
|
|
API.addUserTrace(traceData).then(res => { |
|
|
|
|
|
console.log('用户对比价格点击记录成功:', res); |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.error('用户对比价格点击记录失败:', err); |
|
|
|
|
|
// 即使记录失败,也不影响主流程
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 检查用户身份证认证状态
|
|
|
// 检查用户身份证认证状态
|
|
|
let idcardstatus = 0; |
|
|
let idcardstatus = 0; |
|
|
const users = wx.getStorageSync('users') || {}; |
|
|
const users = wx.getStorageSync('users') || {}; |
|
|
|