登录逻辑+注册有礼

This commit is contained in:
2024-03-13 22:43:59 +08:00
parent c17b70af2d
commit 0602dc6c72
18 changed files with 289 additions and 44 deletions

View File

@@ -15,15 +15,15 @@
</view>
<view class='user-info-card'>
<image class='user-avatar' :src='bannerList[0]' mode='aspectFill' />
<text class='user-name primary-text-color'>设计小仙女</text>
<image class='user-avatar' :src='userInfo.image' mode='aspectFill' />
<text class='user-name primary-text-color'>{{ userInfo?.nickName }}</text>
<view class='integral-view primary-text-color'>
<text>1000</text>
<text>{{ userInfo?.integration }}</text>
<text>积分</text>
</view>
<view class='divider' style='height: 83rpx' />
<view class='balance-view'>
<text class='accent-text-color'>998.00</text>
<text class='accent-text-color'>{{ userInfo?.balance }}</text>
<text>余额</text>
</view>
</view>
@@ -67,9 +67,10 @@ import { getCompanyInfo } from '@/api/company';
import { useUserStore } from '@/store';
import { assetsUrl } from '@/utils/assets';
import { goPath } from '@/utils';
import { storeToRefs } from 'pinia';
const store = useUserStore();
const { userInfo } = storeToRefs(store);
const bannerList = ref<string[]>([]);
const currentBannerIndex = ref(0);
const recommendBannerList = ref<string[]>([]);
@@ -78,7 +79,7 @@ const submenuList = [
{
title: '注册有礼',
icon: assetsUrl('ic_register_gift.png'),
path: '/pages/order/order'
path: '/pages/common/register/index'
},
{
title: '团购秒杀',
@@ -102,8 +103,6 @@ onLoad(async (e) => {
const swiperChange = (e: any) => {
currentBannerIndex.value = e.detail.current;
};
console.log('store.user_name', store.user_name);
</script>
<style lang='scss'>