213
This commit is contained in:
parent
5a40da8586
commit
a34e0fcf20
|
|
@ -490,6 +490,9 @@ export default {
|
|||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync("userinfo") || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
title: this.$config.getAppSetting("app_name") +
|
||||
`${this.pageData.goods.title}系列 第${this.pageData.goods.num}套`,
|
||||
|
|
@ -498,7 +501,7 @@ export default {
|
|||
this.$c.qs({
|
||||
goods_id: this.pageData.goods.id,
|
||||
goods_num: this.pageData.goods.num,
|
||||
pid: uni.getStorageSync("userinfo").ID,
|
||||
pid: pid,
|
||||
}),
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -554,6 +554,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
title: this.$config.getAppSetting("app_name") + `${this.pageData.goods.title}系列`,
|
||||
imageUrl: this.pageData.goods.imgurl_detail,
|
||||
|
|
@ -561,7 +564,7 @@
|
|||
this.$c.qs({
|
||||
goods_id: this.pageData.goods.id,
|
||||
goods_num: this.pageData.goods.num,
|
||||
pid: uni.getStorageSync('userinfo').ID
|
||||
pid: pid
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -51,10 +51,13 @@ export default {
|
|||
},
|
||||
onShareAppMessage() {
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting('share_title') || "哈尼盲盒上线,来就送!",
|
||||
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
path: '/pages/shouye/index?pid=' + pid
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -28,10 +28,13 @@ export default {
|
|||
},
|
||||
onShareAppMessage() {
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting('share_title') || "哈尼盲盒上线,来就送!",
|
||||
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
path: '/pages/shouye/index?pid=' + pid
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -113,10 +113,13 @@ export default {
|
|||
},
|
||||
onShareAppMessage() {
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting('share_title') || "哈尼盲盒上线,来就送!",
|
||||
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
path: '/pages/shouye/index?pid=' + pid
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -256,6 +256,9 @@
|
|||
return co;
|
||||
}
|
||||
}
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync("userinfo") || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
title: this.$config.getAppSetting("app_name") +
|
||||
`${this.pageData.goods.title}系列 第${this.pageData.goods.num}套`,
|
||||
|
|
@ -264,7 +267,7 @@
|
|||
this.$c.qs({
|
||||
goods_id: this.pageData.goods.id,
|
||||
goods_num: this.pageData.goods.num,
|
||||
pid: uni.getStorageSync("userinfo").ID,
|
||||
pid: pid,
|
||||
}),
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -323,6 +323,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
title: this.$config.getAppSetting("app_name") + `${this.pageData.goods.title}系列`,
|
||||
imageUrl: this.pageData.goods.imgurl_detail,
|
||||
|
|
@ -330,7 +333,7 @@
|
|||
this.$c.qs({
|
||||
goods_id: this.pageData.goods.id,
|
||||
goods_num: this.pageData.goods.num,
|
||||
pid: uni.getStorageSync('userinfo').ID
|
||||
pid: pid
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -216,14 +216,24 @@
|
|||
uni.setStorageSync("page", this.$mp.page.route);
|
||||
},
|
||||
onLoad(v) {
|
||||
console.log("参数", v);
|
||||
console.log("=== 首页 onLoad 开始 ===");
|
||||
console.log("接收到的参数 v:", JSON.stringify(v));
|
||||
console.log("v.pid:", v.pid);
|
||||
console.log("v.scene:", v.scene);
|
||||
console.log("当前存储的 pid:", uni.getStorageSync("pid"));
|
||||
|
||||
if (v.pid) {
|
||||
console.log("设置 pid 到 storage:", v.pid);
|
||||
uni.setStorageSync("pid", v.pid);
|
||||
}
|
||||
if (v.scene) {
|
||||
console.log("设置 scene 作为 pid 到 storage:", v.scene);
|
||||
uni.setStorageSync("pid", v.scene);
|
||||
}
|
||||
|
||||
console.log("设置后存储的 pid:", uni.getStorageSync("pid"));
|
||||
console.log("=== 首页 onLoad 结束 ===");
|
||||
|
||||
this.tabList = this.$config.getGoodType();
|
||||
this.tabCur = 0;
|
||||
|
||||
|
|
@ -247,11 +257,14 @@
|
|||
|
||||
onShareAppMessage() {
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync("userinfo") || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting("app_name") + ",正版潮玩手办一番赏",
|
||||
|
||||
path: "/pages/shouye/index?pid=" + uni.getStorageSync("userinfo").ID,
|
||||
path: "/pages/shouye/index?pid=" + pid,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@
|
|||
if (userInfo) {
|
||||
this.avatarUrl = userInfo.headimg || "";
|
||||
this.nickname = userInfo.nickname || "";
|
||||
this.id = userInfo.ID;
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
this.id = userInfo.id || userInfo.ID;
|
||||
this.uid = userInfo.uid;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -214,10 +214,13 @@
|
|||
},
|
||||
onShareAppMessage() {
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting('share_title_detail') || "哈尼盲盒,正版潮玩手办一番赏",
|
||||
path: '/pages/user/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
path: '/pages/user/index?pid=' + pid
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
|
|
|||
|
|
@ -148,14 +148,24 @@ export default {
|
|||
let that = this;
|
||||
console.log();
|
||||
let imageUrl = this.$config.getShareImageUrl();
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
console.log('=== 分享邀请 ===');
|
||||
console.log('userinfo:', JSON.stringify(userinfo));
|
||||
console.log('分享 pid:', pid);
|
||||
return {
|
||||
imageUrl: imageUrl,
|
||||
title: this.$config.getAppSetting('share_title') || "哈尼盲盒上线,来就送!",
|
||||
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
path: '/pages/shouye/index?pid=' + pid
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log(uni.getStorageSync('userinfo').ID)
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
console.log('=== 推广页 onLoad ===');
|
||||
console.log('userinfo:', JSON.stringify(userinfo));
|
||||
console.log('userinfo.id:', userinfo.id);
|
||||
console.log('userinfo.ID:', userinfo.ID);
|
||||
console.log(this.$platform.code);
|
||||
if (this.$platform.code == 'WEB_APP' || this.$platform.code == 'APP_IOS' || this.$platform.code == 'APP_ANDROID') {
|
||||
this.isApp = true;
|
||||
|
|
@ -180,14 +190,19 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
yaoaing() {
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
uni.setClipboardData({
|
||||
data: window.location.origin + '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
|
||||
data: window.location.origin + '/pages/shouye/index?pid=' + pid
|
||||
});
|
||||
this.$c.msg("链接已复制,快去分享吧~")
|
||||
},
|
||||
copyMyInviteCode() {
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const pid = this.userInfo.id || this.userInfo.ID || '';
|
||||
uni.setClipboardData({
|
||||
data: this.userInfo.ID + ''
|
||||
data: pid + ''
|
||||
});
|
||||
this.$c.msg("邀请码已复制")
|
||||
},
|
||||
|
|
@ -198,7 +213,10 @@ export default {
|
|||
})
|
||||
},
|
||||
getHaiBao() {
|
||||
return this.$baseUrl + '/api/generate_urllinks?userId=' + uni.getStorageSync('userinfo').ID;
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const userId = userinfo.id || userinfo.ID || '';
|
||||
return this.$baseUrl + '/api/generate_urllinks?userId=' + userId;
|
||||
},
|
||||
getXiaZai() {
|
||||
return this.$baseUrl + '/dow.png';
|
||||
|
|
@ -216,7 +234,10 @@ export default {
|
|||
},
|
||||
fenxiang() {
|
||||
var image = this.$baseUrl + "/storage/topic/20240617/30a73c0d5061f700a66f653deeb60f6d.jpg";
|
||||
var path = '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID;
|
||||
// 使用小写 id,兼容新版 .NET API
|
||||
const userinfo = uni.getStorageSync('userinfo') || {};
|
||||
const pid = userinfo.id || userinfo.ID || '';
|
||||
var path = '/pages/shouye/index?pid=' + pid;
|
||||
this.$c.$fenxiang(this.$config.getAppSetting('share_title_detail') || '哈尼盲盒,正版潮玩手办一番赏', '', path, image);
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace HoneyBox.Model.Models.Auth;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -6,13 +8,21 @@ namespace HoneyBox.Model.Models.Auth;
|
|||
public class UserInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// 用户ID (小写,新版API)
|
||||
/// </summary>
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID (大写,兼容旧版前端)
|
||||
/// </summary>
|
||||
[JsonPropertyName("ID")]
|
||||
public int ID => Id;
|
||||
|
||||
/// <summary>
|
||||
/// 用户唯一标识
|
||||
/// </summary>
|
||||
[JsonPropertyName("uid")]
|
||||
public string? Uid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user