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