Commit 38613fae authored by lg's avatar lg

chore: 注册完返回后页面刷新

parent 1dc28651
...@@ -20,7 +20,10 @@ async function onRegisterConfirm(data) { ...@@ -20,7 +20,10 @@ async function onRegisterConfirm(data) {
console.log('注册确认:', data); console.log('注册确认:', data);
showRegisterLayer.value = false; showRegisterLayer.value = false;
await userStore.loadUserInfo() await Promise.all([
userStore.loadMemberInfo(),
userStore.loadUserInfo(),
])
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
......
...@@ -668,6 +668,7 @@ import {getHealthField} from "@/api/common"; ...@@ -668,6 +668,7 @@ import {getHealthField} from "@/api/common";
import MonthGift from '../components/pointRightsCom/monthGift.vue'; import MonthGift from '../components/pointRightsCom/monthGift.vue';
import YearGift from '../components/pointRightsCom/yearGift.vue'; import YearGift from '../components/pointRightsCom/yearGift.vue';
import ShengriliTipPanel from '../components/quanyi/shengriliTipPanel.vue'; import ShengriliTipPanel from '../components/quanyi/shengriliTipPanel.vue';
import {onShow} from "@dcloudio/uni-app";
//todo 测试入口 待删除 //todo 测试入口 待删除
function clickTest() { function clickTest() {
...@@ -1500,6 +1501,7 @@ const memberInfo = ref({ ...@@ -1500,6 +1501,7 @@ const memberInfo = ref({
points: 0 points: 0
}); });
const needReinit = ref(false)
const willExpiredPoints = ref(0);//即将过期积分 const willExpiredPoints = ref(0);//即将过期积分
...@@ -1743,6 +1745,12 @@ onBeforeMount(async () => { ...@@ -1743,6 +1745,12 @@ onBeforeMount(async () => {
}) })
onShow(async () => {
if (needReinit.value) {
needReinit.value = false
initNetData()
}
})
onMounted(async () => { onMounted(async () => {
showLoading(); showLoading();
...@@ -2269,6 +2277,7 @@ const handleExchargeClick = () => { ...@@ -2269,6 +2277,7 @@ const handleExchargeClick = () => {
//会员权益点击跳转 //会员权益点击跳转
const handlePrivilegeClick = (item, index) => { const handlePrivilegeClick = (item, index) => {
if (!islogin.value) { if (!islogin.value) {
needReinit.value = true
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: "/pages/activity/register",
...@@ -2514,6 +2523,7 @@ const handleGoToShop_suyuanyou = (data) => { ...@@ -2514,6 +2523,7 @@ const handleGoToShop_suyuanyou = (data) => {
const handleVipClick = () => { const handleVipClick = () => {
if (!islogin.value) { if (!islogin.value) {
needReinit.value = true
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: "/pages/activity/register",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment