Browse Source

会员福利:登录后获取数据

Xiao_123 1 month ago
parent
commit
4ae25ab751
2 changed files with 4 additions and 10 deletions
  1. 3 3
      pages/index/my.vue
  2. 1 7
      pages/index/welfare.vue

+ 3 - 3
pages/index/my.vue

@@ -4,7 +4,7 @@
 		<layout-page>
 			<view :style="{'padding-top': navbarHeight + 'px'}">
 				<view class="commonBackground"></view>
-				<view class="defaultBgc" style="padding-bottom: 100rpx;">
+				<view class="defaultBgc" style="padding-bottom: 100px;">
 					<view class="ss-p-x-30 d-flex justify-space-between align-center" @tap="handleTap">
 						<view class="img-box" :class="vip ? 'vipBox' : ''">
 							<img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img default-border">
@@ -55,7 +55,7 @@
 						</uni-list>
 					</view>
 						
-					<button v-if="useUserStore.isLogin" class="send-button" style="margin-bottom: 50px;" @tap="handleLogout">退出登录</button>
+					<button v-if="useUserStore.isLogin" class="send-button" style="margin-bottom: 100px;" @tap="handleLogout">退出登录</button>
 						
 					<uni-popup ref="popup" type="dialog">
 						<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="系统提示" content="确认退出账号?" @confirm="handleLogoutConfirm"
@@ -254,7 +254,7 @@ const handleLogoutClose = () => {
 }
 const handleLogoutConfirm = () => {
 	list.value = defaultList.filter(e => !e.hide) // 重置菜单
-  useUserStore.handleLogout()
+	useUserStore.handleLogout()
 }
 </script>
 

+ 1 - 7
pages/index/welfare.vue

@@ -142,8 +142,8 @@ const balance = ref({})
 
 watch([() => useUserStore.refreshToken, () => useUserStore.isLogin], () => {
   if (useUserStore.isLogin) {
-    // getSummary()
     getBalance()
+    getTask()
   }
 })
 
@@ -179,12 +179,6 @@ function handleLogin () {
 	}
 }
 
-function toInfo () {
-  uni.navigateTo({
-		url: '/pagesA/info/index'
-	})
-}
-
 function handleTo (page) {
   if (!useUserStore.isLogin) {
 		showAuthModal()