|
@@ -192,7 +192,7 @@ export struct UserCenter {
|
|
|
await UserUtil.getUserInfoByCode(code).then(async ()=>{
|
|
await UserUtil.getUserInfoByCode(code).then(async ()=>{
|
|
|
// 登录后同步本地会员到线上(仅本地有会员且线上无会员时)
|
|
// 登录后同步本地会员到线上(仅本地有会员且线上无会员时)
|
|
|
Utility.getLocalNobleExpireDate().then((expireDate)=>{
|
|
Utility.getLocalNobleExpireDate().then((expireDate)=>{
|
|
|
- if (Utility.isNoble() && !this.hasActiveSubscription && expireDate) {
|
|
|
|
|
|
|
+ if (Utility.isNobleForOld() && !this.hasActiveSubscription && expireDate) {
|
|
|
UserUtil.syncLocalNobleToServer(expireDate).then((success)=>{
|
|
UserUtil.syncLocalNobleToServer(expireDate).then((success)=>{
|
|
|
if (success) {
|
|
if (success) {
|
|
|
ToastUtil.showToast('本地会员已同步到账号');
|
|
ToastUtil.showToast('本地会员已同步到账号');
|
|
@@ -214,7 +214,7 @@ export struct UserCenter {
|
|
|
await UserUtil.getUserInfoByHuawei(openID, unionID, nickname, avatarUri).then(async (data)=>{
|
|
await UserUtil.getUserInfoByHuawei(openID, unionID, nickname, avatarUri).then(async (data)=>{
|
|
|
// 登录后同步本地会员到线上(仅本地有会员且线上无会员时)
|
|
// 登录后同步本地会员到线上(仅本地有会员且线上无会员时)
|
|
|
Utility.getLocalNobleExpireDate().then((expireDate)=>{
|
|
Utility.getLocalNobleExpireDate().then((expireDate)=>{
|
|
|
- if (Utility.isNoble() && !this.hasActiveSubscription && expireDate) {
|
|
|
|
|
|
|
+ if (Utility.isNobleForOld() && !this.hasActiveSubscription && expireDate) {
|
|
|
UserUtil.syncLocalNobleToServer(expireDate).then((success)=>{
|
|
UserUtil.syncLocalNobleToServer(expireDate).then((success)=>{
|
|
|
if (success) {
|
|
if (success) {
|
|
|
ToastUtil.showToast('本地会员已同步到账号');
|
|
ToastUtil.showToast('本地会员已同步到账号');
|
|
@@ -262,8 +262,9 @@ export struct UserCenter {
|
|
|
if (this.isLogin) {
|
|
if (this.isLogin) {
|
|
|
void this.fetchUserInfo();
|
|
void this.fetchUserInfo();
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log('Heanup isLogin:'+this.isLogin)
|
|
|
// 新增:未登录但本地是会员,弹窗提示登录同步会员
|
|
// 新增:未登录但本地是会员,弹窗提示登录同步会员
|
|
|
- if (!this.isLogin && Utility.isNoble()) {
|
|
|
|
|
|
|
+ if (!this.isLogin && Utility.isNobleForOld()) {
|
|
|
DialogHelper.showCustomContentDialog({
|
|
DialogHelper.showCustomContentDialog({
|
|
|
dialogId: 'syncNobleDialog',
|
|
dialogId: 'syncNobleDialog',
|
|
|
title: '会员同步提示',
|
|
title: '会员同步提示',
|