feat(dealer): 优化分享码页面加载和保存功能
- 修改配置文件环境接口地址为本地调试 - 更新分享二维码页面标题为“账户管理中心”,启用分享按钮 - 新增分享小程序功能,支持转发给朋友和分享到朋友圈 - 改进生成小程序码的加载状态及错误处理 - 增加保存小程序码到相册的权限申请和下载容错机制 - 处理保存失败时授权提示和异常提醒 - 显示加载失败及重试按钮,避免未授权用户界面死循环 - 未成为分销商时增加跳转申请页面引导 - 更新邀请文案和页面UI细节优化 - 在useDealerUser钩子中新增无经销商数据自动跳转申请页逻辑
This commit is contained in:
@@ -231,16 +231,20 @@ const AddUserAddress = () => {
|
|||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
// 注册成功后等待1.5秒,让权限同步生效
|
||||||
Taro.navigateBack();
|
await new Promise(resolve => setTimeout(resolve, 1500));
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
} catch (error) {
|
// 重新登录刷新用户状态(包括最新权限)
|
||||||
console.error('验证邀请人失败:', error);
|
Taro.removeStorageSync('Token');
|
||||||
|
Taro.removeStorageSync('UserId');
|
||||||
|
Taro.reLaunch({ url: '/pages/index/index' });
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error('注册失败:', error);
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
title: '注册失败,请重试',
|
title: error?.message || '注册失败,请重试',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
})
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setSubmitting(false)
|
setSubmitting(false)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ const DealerQrcode: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<View className="text-lg font-semibold text-gray-800 mb-2">
|
<View className="text-lg font-semibold text-gray-800 mb-2">
|
||||||
桂乐淘伙伴计划
|
南南佐顿门窗伙伴计划
|
||||||
</View>
|
</View>
|
||||||
<View className="text-sm text-gray-500 mb-4">
|
<View className="text-sm text-gray-500 mb-4">
|
||||||
自购省 | 分享赚 | 好友惠
|
自购省 | 分享赚 | 好友惠
|
||||||
|
|||||||
Reference in New Issue
Block a user