|
@@ -5,9 +5,10 @@ export function getUnlimitedQRCode(data = {}) {
|
|
|
// 从本地存储获取用户类型和用户ID
|
|
|
const userType = uni.getStorageSync('userType') || 1;
|
|
|
const userId = uni.getStorageSync('userId') || '';
|
|
|
+ const version = data.version || '';
|
|
|
|
|
|
// 打印日志,便于调试
|
|
|
- console.log('从本地存储获取用户信息:', { userType, userId });
|
|
|
+ console.log('从本地存储获取用户信息:', { userType, userId, version });
|
|
|
|
|
|
return request({
|
|
|
url: '/core/InviteUser/getInviteQrCode',
|
|
@@ -24,7 +25,7 @@ export function getUnlimitedQRCode(data = {}) {
|
|
|
referrerType: userType, // 使用本地存储的 userType
|
|
|
referrerId: userId, // 使用本地存储的 userId
|
|
|
page:'pages/login',
|
|
|
- scene: data.scene || `${userType}:${userId}`, // 同样使用本地存储的值生成 scene
|
|
|
+ scene: data.scene || (version ? `${userType}:${userId}:${version}` : `${userType}:${userId}`), // 只有当版本号存在时才添加到scene
|
|
|
},
|
|
|
responseType: 'arraybuffer', // 设置响应类型为arraybuffer,因为返回的是图片二进制内容
|
|
|
})
|