| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777 |
- <template>
- <view class="container" :style="{ '--font-scale': fontScale }">
- <!-- 登录浮层(全局组件,页面内弹出底部登录) -->
- <login-sheet ref="loginSheet" @success="onSheetLoginSuccess" />
- <!-- 未登录 -->
- <view v-if="!isLoggedIn">
- <view class="gp-page">
- <!-- 登录大卡 -->
- <view class="gp-login">
- <view class="gp-logo"><view class="gp-logo-heart"></view></view>
- <text class="gp-login-title">登录浠艾福</text>
- <text class="gp-login-desc">登录后查看个人资料、管理积分与家庭。</text>
- <view class="gp-login-btn" @click="goLogin">
- <view class="gp-login-btn-ic"></view>
- <text class="gp-login-btn-text">登录 / 注册</text>
- </view>
- <view class="gp-ghost-btn" @click="goSkip">
- <text class="gp-ghost-btn-text">暂不登录,先逛逛</text>
- <view class="gp-ghost-chev"></view>
- </view>
- </view>
- <!-- 登录后开启 -->
- <view class="gp-block">
- <view class="gp-tag-row">
- <text class="gp-tag">登录后开启</text>
- </view>
- <view class="gp-rows">
- <view class="gp-row">
- <view class="gp-ic gp-ic-body"></view>
- <view class="gp-row-info">
- <text class="gp-row-name">个人身份档案</text>
- <text class="gp-row-sub">资料、角色标签与会员状态</text>
- </view>
- <view class="gp-lock"></view>
- </view>
- <view class="gp-row">
- <view class="gp-ic gp-ic-wisdom"></view>
- <view class="gp-row-info">
- <text class="gp-row-name">我的家庭</text>
- <text class="gp-row-sub">成员档案、家庭报告与关系管理</text>
- </view>
- <view class="gp-lock"></view>
- </view>
- <view class="gp-row">
- <view class="gp-ic gp-ic-wealth"></view>
- <view class="gp-row-info">
- <text class="gp-row-name">积分与能量</text>
- <text class="gp-row-sub">积分记录、能量数据与健康资产</text>
- </view>
- <view class="gp-lock"></view>
- </view>
- </view>
- </view>
- <!-- 理念卡 -->
- <view class="gp-philosophy">
- <view class="gp-philosophy-ic"></view>
- <view class="gp-philosophy-body">
- <text class="gp-philosophy-title">照顾家庭,从照顾好自己开始</text>
- <text class="gp-philosophy-desc">你的状态,就是家的状态。先安顿好自己,才有余力温暖家人。</text>
- </view>
- </view>
- <!-- 登录引导(模板内联:本页未注册 LoginGuideCard,等价结构本地实现) -->
- <view class="gp-guide">
- <view class="gp-guide-head">
- <view class="gp-guide-ic"></view>
- <text class="gp-guide-title">登录后,和家庭一起开始</text>
- </view>
- <view class="gp-guide-list">
- <view class="gp-guide-item">
- <view class="gp-guide-check"></view>
- <text class="gp-guide-text">查看家庭报告与成员档案</text>
- </view>
- <view class="gp-guide-item">
- <view class="gp-guide-check"></view>
- <text class="gp-guide-text">管理积分与能量数据</text>
- </view>
- <view class="gp-guide-item">
- <view class="gp-guide-check"></view>
- <text class="gp-guide-text">参与家庭挑战与里程碑</text>
- </view>
- </view>
- <view class="gp-guide-btn" @click="goLogin">
- <text class="gp-guide-btn-text">手机号快捷登录</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 已登录 -->
- <template v-else>
- <!-- 退出切换 -->
- <view class="exit-switch" v-if="isSwitchedChild" @click="onExitSwitch">
- <text>🔄 退出切换</text>
- </view>
- <!-- 身份卡 -->
- <view class="user-card">
- <view class="user-card-left">
- <view class="avatar-wrap" @click="goToEditInfo">
- <image v-if="userInfo.avatar" class="avatar-img" :src="userInfo.avatar" mode="aspectFill" />
- <text v-else class="avatar-text">{{ nickname.charAt(0) || '👤' }}</text>
- </view>
- <view class="user-meta">
- <view class="user-name-row">
- <text class="nickname">{{ nickname || '未设置昵称' }}</text>
- <text v-if="roleLabel" class="role-tag">{{ roleLabel }}</text>
- </view>
- <view class="user-sub" v-if="memberLevel">
- <view class="level-badge" :class="'level-' + memberLevel">{{ memberLevelText }}</view>
- <text v-if="isLifetime" class="days-left">永久有效</text>
- <text v-else-if="membershipDays > 0 && membershipDays <= 30" class="days-left">剩余 {{ membershipDays }} 天</text>
- <view v-if="hasUpgradeSpace" class="upgrade-btn" @click="goUpgrade">
- <text class="upgrade-btn-text">{{ upgradeBtnText }}</text>
- </view>
- </view>
- <view class="user-sub" v-else>
- <text class="days-left">开通会员解锁更多权益</text>
- <view class="upgrade-btn" @click="goUpgrade">
- <text class="upgrade-btn-text">立即开通</text>
- </view>
- </view>
- </view>
- </view>
- <view class="user-card-right" @click="goToPoints">
- <text class="points-num">{{ totalPoints }}</text>
- <text class="points-label">积分</text>
- </view>
- </view>
- <!-- 团队邀请浮动按钮(纯 CSS 二维码图标):点按直接调起微信转发,不再生成海报。
- 用透明 <button open-type="share"> 覆盖原入口,保留既有视觉与布局,仅由原生按钮接管点击。
- 分享 path 由页面 onShareAppMessage 返回,直达服务角色申请表并携带本人 refCode。 -->
- <view class="share-qr-float">
- <view class="qr-glyph">
- <view class="qr-eye qr-eye-tl"></view>
- <view class="qr-eye qr-eye-tr"></view>
- <view class="qr-eye qr-eye-bl"></view>
- <view class="qr-mid"></view>
- <view class="qr-cluster">
- <view class="qr-pip"></view>
- <view class="qr-pip"></view>
- <view class="qr-pip"></view>
- <view class="qr-pip"></view>
- </view>
- </view>
- <button class="share-overlay-btn" open-type="share" @tap="ensureShareCode"></button>
- </view>
- <!-- 家族成员速览 -->
- <view class="family-strip" v-if="familyMembers.length > 0">
- <view class="family-strip-header">
- <text class="family-strip-title">我的家庭</text>
- <text class="family-strip-count">{{ familyMembers.length }} 位成员</text>
- </view>
- <view class="family-avatars">
- <view
- v-for="member in familyMembers"
- :key="member.id"
- class="family-avatar-item"
- @click="goMemberDetail(member)"
- >
- <view class="family-avatar-wrap">
- <image v-if="member.avatar" class="family-avatar-img" :src="member.avatar" mode="aspectFill" />
- <text v-else class="family-avatar-text">{{ member.nickname ? member.nickname.charAt(0) : '?' }}</text>
- <view class="family-avatar-tag" :class="'tag-' + (member.effectiveRole || member.source || 'member')">{{ member.roleLabel || memberRoleLabel(member.effectiveRole) }}</view>
- </view>
- <text class="family-avatar-name">{{ member.nickname || member.realName || '成员' }}</text>
- </view>
- <view class="family-avatar-item" @click="goToFamily">
- <view class="family-avatar-wrap family-avatar-add">
- <text class="family-avatar-plus">+</text>
- </view>
- <text class="family-avatar-name">添加</text>
- </view>
- </view>
- </view>
- <!-- 我的成就(纯成就指标) -->
- <view class="achievement-section">
- <view class="section-header-row">
- <text class="section-title">🏆 我的成就</text>
- <text class="section-sub">持续成长,看见改变</text>
- </view>
- <view class="achievement-grid cols-5">
- <view class="ach-item" @click="goToStreak">
- <view class="ach-icon-wrap" style="background:rgba(255,140,66,0.12)">
- <text class="ach-icon">🔥</text>
- </view>
- <text class="ach-num">{{ streakDays }}</text>
- <text class="ach-label">连续打卡</text>
- </view>
- <view class="ach-item" @click="goToTaskHistory">
- <view class="ach-icon-wrap" style="background:rgba(99,102,241,0.12)">
- <text class="ach-icon">✅</text>
- </view>
- <text class="ach-num">{{ completedTasks }}</text>
- <text class="ach-label">完成任务</text>
- </view>
- <view class="ach-item" @click="goToBadges">
- <view class="ach-icon-wrap" style="background:rgba(236,72,153,0.12)">
- <text class="ach-icon">🏅</text>
- </view>
- <text class="ach-num">{{ badgesCollected }}</text>
- <text class="ach-label">收集勋章</text>
- </view>
- <view class="ach-item" @click="goToGrowth">
- <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
- <text class="ach-icon">📈</text>
- </view>
- <text class="ach-num">{{ growthRecords }}</text>
- <text class="ach-label">成长记录</text>
- </view>
- <view class="ach-item" @click="goToChallenges">
- <view class="ach-icon-wrap" style="background:rgba(255,107,157,0.12)">
- <text class="ach-icon">🎯</text>
- </view>
- <text class="ach-num">{{ challengesJoined }}</text>
- <text class="ach-label">参加挑战</text>
- </view>
- </view>
- </view>
- <!-- 我的团队(团队管理 + 推广收益 + 邀请成员) -->
- <view class="achievement-section">
- <view class="section-header-row">
- <text class="section-title">👥 我的团队</text>
- <text class="section-sub">团队网络与推广收益</text>
- </view>
- <view class="achievement-grid team-grid">
- <view class="ach-item" @click="goTeamTree">
- <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
- <text class="ach-icon">🌳</text>
- </view>
- <text class="ach-num">{{ teamMembers }}</text>
- <text class="ach-label">我的团队</text>
- </view>
- <view class="ach-item" @click="goToWealthCenter">
- <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
- <text class="ach-icon">💰</text>
- </view>
- <text class="ach-num">{{ referralEarnings }}</text>
- <text class="ach-label">推广收益</text>
- </view>
- <view class="ach-item ach-item-share">
- <view class="ach-icon-wrap" style="background:rgba(99,102,241,0.12)">
- <text class="ach-icon">🤝</text>
- </view>
- <text class="ach-num">+</text>
- <text class="ach-label">邀请成员</text>
- <!-- 团队邀请:透明原生分享按钮覆盖网格项,点按直接调起微信转发(不再生成海报) -->
- <button class="share-overlay-btn" open-type="share" @tap="ensureShareCode"></button>
- </view>
- </view>
- </view>
- <!-- 我的订单(电商风格) -->
- <view class="order-section">
- <view class="order-section-header">
- <text class="section-title">🛒 我的订单</text>
- <text class="order-all-link" @click="goToOrders">全部订单 ›</text>
- </view>
- <view class="order-card">
- <view class="order-grid">
- <view class="order-grid-item" @click="goToOrderStatus('pending')">
- <view class="order-icon-wrap">
- <text class="order-icon">💳</text>
- <text class="order-badge" v-if="orderPending > 0">{{ orderPending }}</text>
- </view>
- <text class="order-grid-text">待付款</text>
- </view>
- <view class="order-grid-item" @click="goToOrderStatus('paid')">
- <view class="order-icon-wrap">
- <text class="order-icon">📦</text>
- <text class="order-badge" v-if="orderUnpaid > 0">{{ orderUnpaid }}</text>
- </view>
- <text class="order-grid-text">待发货</text>
- </view>
- <view class="order-grid-item" @click="goToOrderStatus('shipped')">
- <view class="order-icon-wrap">
- <text class="order-icon">🚚</text>
- <text class="order-badge" v-if="orderShipped > 0">{{ orderShipped }}</text>
- </view>
- <text class="order-grid-text">待收货</text>
- </view>
- <view class="order-grid-item" @click="goToOrderStatus('refunding')">
- <view class="order-icon-wrap">
- <text class="order-icon">🔧</text>
- <text class="order-badge" v-if="orderAfterSale > 0">{{ orderAfterSale }}</text>
- </view>
- <text class="order-grid-text">售后</text>
- </view>
- <view class="order-grid-item" @click="goToOrders">
- <view class="order-icon-wrap">
- <text class="order-icon">📋</text>
- </view>
- <text class="order-grid-text">全部</text>
- </view>
- </view>
- <view class="order-extra-row">
- <view class="order-extra-item" @click="goToCart">
- <text class="order-extra-icon">🛒</text>
- <text class="order-extra-text">购物车</text>
- <text class="order-extra-badge" v-if="cartCount > 0">{{ cartCount > 99 ? '99+' : cartCount }}</text>
- </view>
- <view class="order-extra-divider"></view>
- <view class="order-extra-item" @click="goToAddress">
- <text class="order-extra-icon">📍</text>
- <text class="order-extra-text">收货地址</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 卡券中心(我的优惠券 + 获得奖励) -->
- <view class="achievement-section">
- <view class="section-header-row">
- <text class="section-title">🎫 卡券中心</text>
- <text class="section-sub">优惠券与权益</text>
- </view>
- <view class="achievement-grid">
- <view class="ach-item" @click="goToCoupons">
- <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
- <text class="ach-icon">🎟️</text>
- </view>
- <text class="ach-num">{{ couponCount }}</text>
- <text class="ach-label">我的优惠券</text>
- </view>
- <view class="ach-item" @click="goToWishes">
- <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
- <text class="ach-icon">🎁</text>
- </view>
- <text class="ach-num">{{ rewardsEarned }}</text>
- <text class="ach-label">获得奖励</text>
- </view>
- </view>
- </view>
- <!-- 健康档案(上传报告) -->
- <view class="menu-row" @click="goToHealthReports">
- <text class="menu-row-icon">📋</text>
- <text class="menu-row-text">我的健康报告</text>
- <text class="menu-row-sub">{{ healthReports }} 份</text>
- <text class="menu-row-arrow">›</text>
- </view>
- <!-- 规划师服务中心入口(仅规划师可见) -->
- <view class="service-center-section" v-if="isTeacherUser && teacherStatus === 'approved'">
- <view class="service-center-card" @click="goToServiceCenter">
- <view class="service-center-icon">👨🏫</view>
- <view class="service-center-info">
- <text class="service-center-title">服务中心</text>
- <text class="service-center-desc">待处理任务:{{ pendingTasks }} 条 · 消息:{{ unreadMessages }} 条</text>
- </view>
- <text class="service-center-arrow">›</text>
- </view>
- </view>
- <!-- 规划师待审核提示 -->
- <view class="service-center-section" v-if="isTeacherUser && teacherStatus !== 'approved'">
- <view class="service-center-card disabled-card">
- <view class="service-center-icon">👨🏫</view>
- <view class="service-center-info">
- <text class="service-center-title">服务中心</text>
- <text class="service-center-desc">{{ teacherStatus === 'pending' ? '申请审核中,暂未开放' : teacherStatus === 'rejected' ? '申请未通过,请联系管理员' : '规划师服务' }}</text>
- </view>
- </view>
- </view>
- <!-- 设置 + 退出 -->
- <view class="bottom-menu-section">
- <view class="menu-row" v-if="memberActive" @click="goToMessageHistory">
- <text class="menu-row-icon">📨</text>
- <text class="menu-row-text">历史消息</text>
- <text class="menu-row-arrow">›</text>
- </view>
- <view class="menu-row" @click="goToSettings">
- <text class="menu-row-icon">⚙️</text>
- <text class="menu-row-text">设置</text>
- <text class="menu-row-arrow">›</text>
- </view>
- <view class="logout-btn" @click="logout">
- <text class="logout-text">退出登录</text>
- </view>
- </view>
- </template>
- <!-- 我的分享海报:复用文章/活动/商品同一套 ContentSharePoster 组件(canvas 绘制 + 保存到相册) -->
- <ContentSharePoster
- :show="showSharePoster"
- :title="shareHeadline"
- :energyData="posterEnergyData"
- :brandFallback="true"
- :qrCodeBase64="posterQrCode || ''"
- typeLabel="邀友加入"
- :summary="posterSummary"
- ctaText="长按识别二维码 · 加入浠艾福"
- :inviteText="posterInviteText"
- @close="closeSharePoster"
- />
- </view>
- </template>
- <script>
- import ContentSharePoster from '../../components/ContentSharePoster.vue'
- import {
- getChildren, getFamilyMemberList,
- getTodayTasksByCategory, getChallengeList, getMyMembership,
- verifyPassword, getPointsBalance, getUserInfo,
- cartCount, getOrderCounts, getCfSummary,
- getProfileStats, getMyReferrer, getVendorTeamList, getVendorHierarchyInfo, getMyCoupons,
- getTeacherInfo, getTeacherPendingTasks, getTeacherUnreadCount, getUserRoles,
- getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox,
- vendorStatus
- } from '../../utils/api.js'
- import { BrandColors } from '../../utils/brand-colors.js'
- import { isApprovedActivityProvider } from '../../utils/activity-role.js'
- import fontScaleMixin from '@/mixins/font-scale.js'
- import { isActiveMember } from '@/utils/membershipGate.js'
- import shareMixin from '../../components/share-mixin.js'
- // 团队邀请:本人推广码本地缓存 key(模块级常量,供同步分享钩子使用,不依赖组件 this)。
- // 与用户级 storage.refCode(被邀请人码)、记录级 storage.serviceRoleApplyRefCode 均不同,互不覆盖。
- var TEAM_INVITE_SHARE_CODE_KEY = 'myReferralCode'
- export default {
- mixins: [fontScaleMixin, shareMixin],
- components: { ContentSharePoster },
- data() {
- return {
- nickname: '',
- role: 'parent',
- isSwitchedChild: false,
- userRoles: [],
- isTeacherUser: false,
- userInfo: {},
- memberLevel: null,
- membershipDays: 0,
- // 会员有效态(isActive):控制「历史消息」等入口可见性,默认 false(fail-closed)
- memberActive: false,
- totalPoints: 0,
- referralEarnings: 0,
- teamMembers: 0,
- // 个人成就
- completedTasks: 0,
- streakDays: 0,
- rewardsEarned: 0,
- badgesCollected: 0,
- growthRecords: 0,
- challengesJoined: 0,
- healthReports: 0,
- // 家庭
- familyMembers: [],
- // 商城
- orderPending: 0,
- orderUnpaid: 0,
- orderShipped: 0,
- orderAfterSale: 0,
- cartCount: 0,
- couponCount: 0,
- // 待办
- pendingTasks: 0,
- unreadMessages: 0,
- teacherStatus: 'pending',
- isVendor: false,
- profileProgress: 0,
- myReferrer: null,
- // 分享推广码
- showSharePoster: false,
- referralCode: '',
- posterQrCode: '',
- posterEnergyData: null,
- referralCodeLoaded: false,
- // 登录态:响应式字段(非 computed)。computed 依赖非响应式的 Storage 读取,
- // 登录成功写入 token 后不会触发重算,导致页面仍显示登录前状态。
- // 改为 data 字段并在 onShow / 登录成功回调中重新赋值,登录后页面即时刷新。
- isLoggedIn: !!uni.getStorageSync('token'),
- }
- },
- computed: {
- roleLabel() {
- var map = { parent: '', child: '成员', teacher: '规划师' }
- return map[this.role] || '用户'
- },
- memberLevelText() {
- var map = { FREE: '免费用户', BASIC: '体验会员', FAMILY: '家庭会员', PREMIUM: '高级会员', LIFETIME: '终身会员' }
- return map[this.memberLevel] || this.memberLevel || ''
- },
- isLifetime() {
- return this.memberLevel === 'LIFETIME'
- },
- hasUpgradeSpace() {
- return this.memberLevel === 'FREE' || this.memberLevel === 'FAMILY'
- },
- upgradeBtnText() {
- return this.hasUpgradeSpace ? '升级' : '立即开通'
- },
- // 分享海报标题:XXX邀请你关注家庭健康(昵称过长自动截断)
- shareHeadline() {
- var name = (this.nickname || '').trim()
- if (!name) return '邀请你关注家庭健康'
- if (name.length > 8) name = name.substring(0, 8) + '…'
- return name + '邀请你关注家庭健康'
- },
- posterSummary() {
- return '身体 · 心理 · 智慧 · 行动 · 财富,一家专注全家健康的成长平台'
- },
- posterInviteText() {
- var name = (this.nickname || '').trim()
- if (!name) return '扫码加入浠艾福,一起照顾好这个家'
- if (name.length > 8) name = name.substring(0, 8) + '…'
- return '「' + name + '」邀请你加入浠艾福'
- }
- },
- /**
- * 团队邀请:页面级微信转发配置(覆盖 share-mixin.js 的同名 hook 返回值)。
- * 已核实 mp.runtime 的 __call_hook 按 mixin→页面顺序调用并返回最后一个 ret,
- * 故这里的返回值生效,mixin 的默认首页分享不再覆盖本页邀请 path。
- * 分享 path 直达服务角色申请表,携带本人推广码作为 refCode(用户级/记录级两级共用此码)。
- */
- onShareAppMessage() {
- // 同步钩子:data 未就绪时读本地缓存兜底,确保 refCode 不为空(否则推荐人丢失)
- var code = (this.referralCode || '') || uni.getStorageSync(TEAM_INVITE_SHARE_CODE_KEY) || ''
- return {
- title: '邀请你加入浠艾福服务团队',
- path: '/pages/profile/service-role-apply' + (code ? '?refCode=' + code : ''),
- imageUrl: '/static/logo.png'
- }
- },
- onShow() {
- // 重新读取登录态(登录浮层成功后 mixin 会触发 onShow),驱动页面切换到已登录视图
- this.isLoggedIn = !!uni.getStorageSync('token')
- if (!this.isLoggedIn) {
- return
- }
- // 团队邀请:进入即预热本人推广码,保证任意时刻点分享时 refCode 已就绪;
- // 已缓存则 loadReferralCode 内部直接复用,不重复请求。
- this.loadReferralCode()
- // 每次进入刷新会员有效态(覆盖从升级/续费页返回)
- this.refreshMemberActive()
- var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
- this.role = role
- this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
- this.nickname = (uni.getStorageSync('userInfo') || {}).nickname || ''
- // 服务商身份判断(成就区「我的团队」入口按此分发)
- this.checkVendorStatus()
- // 规划师身份探测(主角色 teacher 或 roles 含 teacher 均生效),并加载其待办/消息数据
- this.loadTeacherIdentity()
- // 主角色为 parent 时加载本人/家庭数据;教师主角色保持原逻辑(不加载家庭区块)
- if (role !== 'teacher') {
- this.loadAllData()
- this.loadMyReferrer()
- }
- },
- methods: {
- // 会员有效态刷新:唯一判据 /api/ai/gate 的 data.isActive(不随运营开关,fail-closed)
- refreshMemberActive: function() {
- var self = this
- isActiveMember().then(function(active) {
- self.memberActive = active
- })
- },
- // 服务商身份:兼容两条申请/审核链路(vendor 入驻 / 服务角色申请)
- // 用 isApprovedActivityProvider 统一判定,避免只认 vendorStatus 漏掉服务角色申请链路
- checkVendorStatus() {
- var self = this
- vendorStatus().then(function(res) {
- self.isVendor = isApprovedActivityProvider((res && res.data) || {})
- }).catch(function() {
- self.isVendor = false
- })
- },
- loadTeacherStatus() {
- var self = this
- getTeacherInfo().then(function(res) {
- if (res && res.code === 200 && res.data) {
- self.teacherStatus = res.data.verificationStatus || res.data.status || 'pending'
- }
- }).catch(function() {})
- },
- loadTeacherIdentity() {
- var self = this
- var rolesP = (typeof getUserRoles === 'function' ? getUserRoles() : Promise.resolve({ data: [] }))
- .catch(function() { return { data: [] } })
- rolesP.then(function(res) {
- var rolesData = (res && res.data) || []
- self.userRoles = Array.isArray(rolesData) ? rolesData : []
- uni.setStorageSync('userRoles', self.userRoles)
- self.isTeacherUser = self.role === 'teacher' || self.userRoles.indexOf('teacher') > -1
- // 仅对规划师拉取认证状态与待办/消息,避免普通家长额外请求
- if (self.isTeacherUser) {
- var teacherP = (typeof getTeacherInfo === 'function' ? getTeacherInfo() : Promise.resolve({}))
- .catch(function() { return {} })
- teacherP.then(function(tres) {
- var t = (tres && tres.data) || {}
- self.teacherStatus = t.verificationStatus || t.status || 'pending'
- uni.setStorageSync('teacherStatus', self.teacherStatus)
- if (self.teacherStatus === 'approved') {
- self.loadTeacherData()
- }
- })
- }
- })
- },
- loadTeacherData() {
- var self = this
- // 并行加载待处理任务和未读消息
- getTeacherPendingTasks().then(function(res) {
- if (res && res.data && Array.isArray(res.data)) {
- self.pendingTasks = res.data.length
- } else if (res && res.data && res.data.pendingCount != null) {
- self.pendingTasks = res.data.pendingCount
- } else if (res && res.data && res.data.pendingReviewTasks != null) {
- self.pendingTasks = res.data.pendingReviewTasks
- }
- }).catch(function() {})
- getTeacherUnreadCount().then(function(res) {
- if (res && res.data != null) {
- self.unreadMessages = res.data
- }
- }).catch(function() {})
- },
- loadAllData() {
- this.loadUserInfo()
- this.loadMembership()
- this.loadPoints()
- this.loadFamily()
- this.loadTasks()
- this.loadChallenges()
- this.loadOrderCounts()
- this.loadCartCount()
- this.loadProfileStats()
- this.loadReferralEarnings()
- this.loadTeamInfo()
- this.loadCoupons()
- },
- loadUserInfo() {
- var self = this
- getUserInfo().then(function(res) {
- if (res && res.code === 200 && res.data) {
- self.userInfo = res.data
- if (!self.nickname) self.nickname = res.data.nickname || ''
- }
- }).catch(function() {})
- },
- loadMembership() {
- var self = this
- getMyMembership().then(function(res) {
- if (res && res.data) {
- self.memberLevel = res.data.memberLevel || res.data.levelCode || null
- self.membershipDays = res.data.membershipDays || res.data.daysRemaining || 0
- }
- }).catch(function() {})
- },
- loadPoints() {
- // 累计积分由 loadProfileStats 汇总家庭成员积分,此处不再单独覆盖
- },
- loadFamily() {
- var self = this
- getFamilyMemberList({ visibleOnly: true }).then(function(res) {
- var data = res && res.data ? res.data : []
- self.familyMembers = Array.isArray(data) ? data : []
- }).catch(function() {
- self.familyMembers = []
- })
- },
- loadTasks() {
- var self = this
- var memberId = uni.getStorageSync('currentChildId') || uni.getStorageSync('userId')
- if (!memberId) return
- getTodayTasksByCategory(memberId, 'action').then(function(res) {
- if (res && res.data) {
- self.pendingTasks = Array.isArray(res.data) ? res.data.length : 0
- }
- }).catch(function() {})
- // fallback to storage
- if (!self.pendingTasks) {
- self.pendingTasks = parseInt(uni.getStorageSync('pendingTaskCount') || 0)
- }
- },
- loadChallenges() {
- var self = this
- getChallengeList({}).then(function(res) {
- if (res && res.data) {
- // 不在此处使用,仅确保请求
- }
- }).catch(function() {})
- },
- loadOrderCounts() {
- var self = this
- getOrderCounts().then(function(res) {
- if (res && res.data) {
- self.orderPending = res.data.pending || 0
- self.orderUnpaid = res.data.paid || 0
- self.orderShipped = res.data.shipped || 0
- self.orderAfterSale = res.data.refunding || 0
- }
- }).catch(function() {})
- },
- loadCartCount() {
- var self = this
- cartCount().then(function(res) {
- if (res && res.data != null) {
- self.cartCount = res.data || 0
- }
- }).catch(function() {})
- },
- loadProfileStats() {
- var self = this
- getProfileStats().then(function(res) {
- if (res && res.code === 200 && res.data) {
- var d = res.data
- if (d.totalPoints != null) self.totalPoints = d.totalPoints
- if (d.streakDays != null) self.streakDays = d.streakDays
- if (d.completedTasks != null) self.completedTasks = d.completedTasks
- if (d.rewardsEarned != null) self.rewardsEarned = d.rewardsEarned
- if (d.badgesCollected != null) self.badgesCollected = d.badgesCollected
- if (d.growthRecords != null) self.growthRecords = d.growthRecords
- if (d.challengesJoined != null) self.challengesJoined = d.challengesJoined
- if (d.healthReports != null) self.healthReports = d.healthReports
- }
- }).catch(function() {})
- },
- loadReferralEarnings() {
- var self = this
- // CF 总览口径:与推广中心 promotion/index.vue 收益总览("累计获取CF")保持一致。
- // promotion 用 cfVal(summary.totalEarned) 直接展示原始值(cfVal 不做分→元换算),
- // 因此这里也不除 100,保证"我的团队"推广收益 = 推广中心"累计获取CF"数字一致。
- getCfSummary().then(function(res) {
- if (res && res.code === 200 && res.data) {
- self.referralEarnings = res.data.totalEarned || 0
- }
- }).catch(function() {})
- },
- loadTeamInfo() {
- var self = this
- getVendorTeamList().then(function(res) {
- var teams = (res && res.data) || []
- if (!teams.length) {
- self.teamMembers = 0
- return
- }
- var reqs = teams.map(function(t) {
- return getVendorHierarchyInfo(t.id).then(function(h) {
- return (h && h.data && h.data.totalChildren) || 0
- }).catch(function() {
- return 0
- })
- })
- Promise.all(reqs).then(function(counts) {
- self.teamMembers = counts.reduce(function(a, b) { return a + b }, 0)
- }).catch(function() {
- self.teamMembers = 0
- })
- }).catch(function() {
- self.teamMembers = 0
- })
- },
- loadCoupons() {
- var self = this
- getMyCoupons().then(function(res) {
- if (res && res.code === 200 && res.data) {
- var list = Array.isArray(res.data) ? res.data : (res.data.list || [])
- self.couponCount = list.length
- }
- }).catch(function() {})
- },
- async loadMyReferrer() {
- try {
- var memberId = uni.getStorageSync('currentMemberId') || uni.getStorageSync('currentChildId') || 0
- var res = await getMyReferrer(memberId)
- if (res && res.code === 200 && res.data && res.data.hasReferrer) {
- this.myReferrer = res.data
- }
- } catch (e) {
- console.error('获取推荐人失败', e)
- }
- },
- // ===== 分享海报(复用 ContentSharePoster,与文章/活动/商品同一套生成逻辑)=====
- async showShareQr() {
- uni.showLoading({ title: '生成海报中...' })
- try {
- if (!this.referralCodeLoaded) {
- await this.loadReferralCode()
- }
- var scene = 'ref=' + (this.referralCode || '')
- if (scene.length > 32) {
- scene = scene.substring(0, 32)
- }
- // 首页路径,扫码后进入首页并绑定推荐人
- // 注意:微信 getwxacodeunlimit 的 page 不能带前导斜杠,否则报 errcode 41030 invalid page rid
- var res = await getShareQrCode('pages/index-home/index', scene)
- if (res && res.code === 200 && res.data && res.data.qrCodeBase64) {
- this.posterQrCode = res.data.qrCodeBase64
- // 必须在 showSharePoster=true 之前取到数据:组件 watch 到 show 后 300ms 即开始绘制
- await this.loadPosterEnergy()
- this.showSharePoster = true
- } else {
- uni.showToast({ title: '生成失败,请重试', icon: 'none' })
- }
- } catch (e) {
- console.error('生成分享海报失败', e)
- uni.showToast({ title: '生成失败,请重试', icon: 'none' })
- } finally {
- uni.hideLoading()
- }
- },
- closeSharePoster() {
- this.showSharePoster = false
- },
- // 五维能量数据卡数据(方案C):家庭聚合视角;未解锁全景/取数失败时置空,海报降级为品牌卡
- loadPosterEnergy() {
- var self = this
- return getEnergySandbox('family').then(function(res) {
- self.posterEnergyData = self.mapPosterEnergy(res)
- }).catch(function(e) {
- console.error('获取五维能量失败,海报降级为品牌卡', e)
- self.posterEnergyData = null
- })
- },
- mapPosterEnergy(res) {
- if (!res || res.code !== 200 || !res.data) return null
- // locked=true 表示用户未解锁全景,此时不展示任何数据,改为品牌卡
- if (res.data.locked) return null
- // 只认家庭聚合视角;仅当接口返回的是裸 DTO(无 personalData/familyData 包装)时才直接取 res.data
- var d = res.data.familyData || null
- if (!d) {
- if (res.data.personalData) return null
- d = res.data
- }
- if (!d || typeof d !== 'object') return null
- var defs = [
- { key: 'body', label: '身', color: BrandColors.body },
- { key: 'mind', label: '心', color: BrandColors.mind },
- { key: 'wisdom', label: '智', color: BrandColors.wisdom },
- { key: 'action', label: '行', color: BrandColors.action },
- { key: 'wealth', label: '富', color: BrandColors.wealth }
- ]
- var dims = []
- var sum = 0
- for (var i = 0; i < defs.length; i++) {
- var raw = d[defs[i].key + 'Score']
- if (raw === null || raw === undefined || raw === '' || isNaN(raw)) continue
- var n = Number(raw)
- if (n < 0) n = 0
- if (n > 100) n = 100
- sum += n
- dims.push({ key: defs[i].key, label: defs[i].label, score: n, color: defs[i].color })
- }
- if (dims.length === 0) return null
- var overall = d.overallScore
- if (overall === null || overall === undefined || overall === '' || isNaN(overall)) {
- overall = Math.round(sum / dims.length)
- }
- return { label: '我们家的能量', overall: Number(overall), dims: dims }
- },
- async loadReferralCode() {
- if (this.referralCodeLoaded) return
- var self = this
- try {
- var res = await getReferralCode()
- self.referralCode = extractReferralCode(res) || ''
- // 团队邀请:写本地缓存,供同步 onShareAppMessage 在 data 尚未就绪时兜底读,保证 refCode 非空
- if (self.referralCode) {
- uni.setStorageSync(TEAM_INVITE_SHARE_CODE_KEY, self.referralCode)
- }
- } catch (e) {
- console.error('获取推广码失败', e)
- } finally {
- self.referralCodeLoaded = true
- }
- },
- // 团队邀请:分享按钮点按时的前置兜底。onShow 已预热缓存,这里再确保一次:
- // 若本地无码且 data 也为空(如冷启动首帧即点),因 onShareAppMessage 是同步钩子无法 await,
- // 只能提示用户「请稍候重试」——但正常路径 onShow 预热已完成,此分支仅为极端时序保险。
- ensureShareCode() {
- var code = (this.referralCode || '') || uni.getStorageSync(TEAM_INVITE_SHARE_CODE_KEY) || ''
- if (!code) {
- uni.showToast({ title: '邀请码准备中,请稍候重试', icon: 'none' })
- this.loadReferralCode()
- }
- },
- goToServiceCenter() {
- uni.navigateTo({ url: '/pages/service-center/index' })
- },
- goTeamTree() {
- // 服务商 → 服务商团队;非服务商 → 引导申请
- if (this.isVendor) {
- uni.navigateTo({ url: '/pages/vendor/team-system/team-system' })
- return
- }
- uni.showModal({
- title: '提示',
- content: '您尚未申请任何服务角色,是否立即申请?',
- confirmText: '去申请',
- cancelText: '取消',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({ url: '/pages/profile/service-role-apply' })
- }
- }
- })
- },
- goLogin: function() {
- this.openLoginSheet()
- },
- // 登录浮层成功回调:立即切换到已登录视图并刷新个人资料与登录后数据
- onLoginSuccess: function() {
- this.isLoggedIn = true
- if (this.loadUserInfo) this.loadUserInfo()
- },
- goSkip: function() {
- uni.switchTab({ url: '/pages/index-home/index' })
- },
- goToEditInfo: function() {
- uni.navigateTo({ url: '/pages/user-edit/user-edit' })
- },
- goToPoints: function() {
- uni.navigateTo({ url: '/pages/points/points' })
- },
- goToStreak: function() {
- var memberId = uni.getStorageSync('currentMemberId') || uni.getStorageSync('currentChildId')
- var url = '/pages/stats/completion-rate'
- if (memberId) {
- url += '?memberId=' + memberId
- } else {
- url += '?familyView=1'
- }
- uni.navigateTo({ url: url })
- },
- goToTasks: function() {
- uni.navigateTo({ url: '/pages/tasks/tasks' })
- },
- goToTaskHistory: function() {
- uni.navigateTo({ url: '/pages/tasks/history' })
- },
- goToWishes: function() {
- uni.navigateTo({ url: '/pages/wishes/index' })
- },
- goToBadges: function() {
- uni.navigateTo({ url: '/pages/rewards/badge' })
- },
- goToGrowth: function() {
- uni.navigateTo({ url: '/pages/growth/history' })
- },
- goToChallenges: function() {
- uni.navigateTo({ url: '/pages/health/challenge-manage' })
- },
- goToHealthReports: function() {
- uni.navigateTo({ url: '/pages/health/report-list' })
- },
- goToWealthCenter: function() {
- uni.navigateTo({ url: '/pages/promotion/index' })
- },
- goToCoupons: function() {
- uni.navigateTo({ url: '/pages/profile-extra/coupons' })
- },
- goUpgrade: function() {
- uni.navigateTo({ url: '/pages/membership/upgrade' })
- },
- goToFamily: function() {
- uni.navigateTo({ url: '/pages/profile-extra/family-members' })
- },
- goMemberDetail: function(member) {
- uni.navigateTo({ url: '/pages/home-pages/member-home-detail?memberId=' + member.id })
- },
- goToAppointments: function() {
- uni.navigateTo({ url: '/pages/parent/appointments' })
- },
- goToOrders: function() {
- uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
- },
- goToOrderStatus: function(status) {
- uni.navigateTo({ url: '/pages/shop/order-list/order-list?status=' + status })
- },
- goToCart: function() {
- uni.navigateTo({ url: '/pages/shop/cart/cart' })
- },
- goToAddress: function() {
- uni.navigateTo({ url: '/pages/shop/address/address' })
- },
- goToMessageHistory: function() {
- uni.navigateTo({ url: '/pages/profile/message-history' })
- },
- goToSettings: function() {
- uni.showActionSheet({
- itemList: ['完善信息', '家庭成员', '隐私政策', '用户协议', '我的画像', '提醒设置'],
- success: function(res) {
- var urls = {
- 0: '/pages/user-edit/user-edit',
- 1: '/pages/profile-extra/family-members',
- 2: '/pages/policy/privacy',
- 3: '/pages/policy/agreement',
- 4: '/pages/profile/portrait-edit',
- 5: '/pages/reminder-config/index'
- }
- if (urls[res.tapIndex]) {
- uni.navigateTo({ url: urls[res.tapIndex] })
- }
- }
- })
- },
- memberRoleLabel: function(role) {
- var map = { parent: '本人', child: '成员', teacher: '规划师' }
- return map[role] || '成员'
- },
- onExitSwitch: function() {
- var self = this
- uni.showModal({
- title: '退出切换',
- content: '请输入家庭主账号密码以确认退出',
- editable: true,
- success: function(res) {
- if (res.confirm && res.content) {
- verifyPassword(res.content).then(function(result) {
- if (result.code === 200) {
- self.$store.commit('switchBackToParent')
- self.isSwitchedChild = false
- self.role = 'parent'
- uni.showToast({ title: '已退出切换', icon: 'success' })
- uni.reLaunch({ url: '/pages/index-home/index' })
- } else {
- uni.showToast({ title: '密码错误', icon: 'none' })
- }
- }).catch(function() {
- uni.showToast({ title: '验证失败', icon: 'none' })
- })
- }
- }
- })
- },
- logout: function() {
- uni.showModal({
- title: '确认退出',
- content: '确定要退出登录吗?',
- success: function(res) {
- if (res.confirm) {
- this.$store.commit('logout')
- uni.reLaunch({ url: '/pages/index-home/index' })
- }
- }.bind(this)
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- // ===== 页面级局部调色板(单页专有色阶;同值才映射全局令牌,约定见 uni.scss §14) =====
- $c-text-gray-400: $facade-text-gray-400;
- $c-fill-2b: #F2F2F2;
- .container {
- min-height: 100vh;
- background: $facade-fill-warm-gray;
- padding-bottom: calc(160rpx + env(safe-area-inset-bottom));
- }
- /* ===== 访客态(设计稿 page-profile 落地 · 令牌化) ===== */
- // 页面级局部色令牌:仅声明 uni.scss 未收录、本页专属的值;其余全部走共享令牌
- $gp-cta-from: #D1440B; // 深橙·亮端(白字 4.62:1)
- $gp-cta-to: $brand-primary; // 深橙·暗端(#C2410C 白字 5.18:1)
- $gp-cta-hover-from: #B93D0B;
- $gp-cta-hover-to: #A9330A;
- $gp-cta-press-from: #A9330A;
- $gp-cta-press-to: #962D08;
- $gp-logo-from: #FFE9D6; // logo 渐变亮端
- $gp-logo-to: #FFD6AE; // logo 渐变暗端
- $gp-tint-soft: $tint-warm-soft; // 暖白浅底 #FFF1E6
- $gp-guide-bg-from: #FFF8F2; // 引导卡顶(暖白偏橙)
- $gp-guide-bg-to: #FFFDFB; // 引导卡底
- $gp-guide-ic-bg: $dim-body-deep;
- // data-URI SVG icon 构造(mp-weixin 模板内禁写 <svg>,与 login-sheet 落地同款方案)
- @function gp-icon($color, $inner) {
- @return url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23#{$color}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
- }
- $gp-white-bg: str-slice('#{$app-surface}', 2);
- $gp-ghost-bg: str-slice('#{$facade-text-slate}', 2);
- $gp-brand-bg: str-slice('#{$brand-primary}', 2);
- $gp-body-bg: str-slice('#{$dim-body-deep}', 2);
- $gp-wisdom-bg: str-slice('#{$dim-wisdom-deep}', 2);
- $gp-wealth-bg: str-slice('#{$dim-wealth-deep}', 2);
- $gp-guide-ic-b: str-slice('#{$gp-guide-ic-bg}', 2);
- $gp-success-bg: str-slice('#{$status-success-strong}', 2);
- $gp-ghost-hex: '#{$facade-text-ghost}';
- $gp-ghost: str-slice($gp-ghost-hex, 2);
- .gp-page { background: $app-bg; min-height: 100vh; padding: 28rpx 0 40rpx; }
- /* 登录大卡 */
- .gp-login { margin: 0 32rpx 24rpx; background: linear-gradient(165deg, $gp-guide-bg-to 0%, $app-bg 100%); border: 1rpx solid $app-border-subtle; border-radius: 32rpx; padding: 48rpx 36rpx 40rpx; display: flex; flex-direction: column; }
- .gp-logo { width: 112rpx; height: 112rpx; border-radius: 28rpx; background: linear-gradient(135deg, $gp-logo-from 0%, $gp-logo-to 100%); display: flex; flex-direction: row; align-items: center; justify-content: center; }
- .gp-logo-heart {
- width: 56rpx; height: 56rpx;
- background-repeat: no-repeat;
- background-position: center;
- background-size: 56rpx 56rpx;
- background-image: gp-icon($gp-brand-bg, '%3Cpath d=%22M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z%22/%3E');
- }
- .gp-login-title { font-size: calc(44rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; margin-top: 24rpx; letter-spacing: 1rpx; }
- .gp-login-desc { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.65; margin-top: 14rpx; }
- .gp-login-btn { margin-top: 32rpx; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: center; padding: 28rpx 0; border-radius: 24rpx; background: linear-gradient(135deg, $gp-cta-from 0%, $gp-cta-to 100%); box-shadow: 0 10rpx 24rpx rgba($brand-primary, 0.2); }
- .gp-login-btn:active { opacity: 0.9; }
- .gp-login-btn-ic {
- width: 36rpx; height: 36rpx; flex-shrink: 0;
- background-repeat: no-repeat;
- background-position: center;
- background-size: 36rpx 36rpx;
- background-image: gp-icon($gp-white-bg, '%3Cpath d=%22M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%2212%22 cy=%227%22 r=%224%22/%3E');
- }
- .gp-login-btn-text { font-size: calc(30rpx * var(--font-scale, 1)); font-weight: 700; color: $app-surface; margin-left: 12rpx; }
- .gp-ghost-btn { margin-top: 10rpx; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: center; padding: 24rpx 0; border-radius: 24rpx; background: $app-surface; border: 1rpx solid $app-border-subtle; }
- .gp-ghost-btn:active { opacity: 0.85; }
- .gp-ghost-btn-text { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-slate; }
- .gp-ghost-chev {
- width: 30rpx; height: 30rpx; margin-left: 10rpx; flex-shrink: 0;
- background-repeat: no-repeat;
- background-position: center;
- background-size: 30rpx 30rpx;
- background-image: gp-icon($gp-ghost-bg, '%3Cpolyline points=%229 18 15 12 9 6%22/%3E');
- }
- /* 登录后开启 */
- .gp-block { margin: 0 32rpx 24rpx; background: $app-surface; border-radius: 24rpx; padding: 24rpx; border: 1rpx solid $app-border-subtle; }
- .gp-tag-row { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; }
- .gp-tag { font-size: calc(24rpx * var(--font-scale, 1)); font-weight: 700; color: $brand-primary; letter-spacing: 1rpx; }
- .gp-rows { margin-top: 8rpx; display: flex; flex-direction: column; }
- .gp-row { display: flex; flex-direction: row; align-items: center; padding: 20rpx 12rpx; border: 1rpx solid $app-border-subtle; border-radius: 20rpx; background: $app-surface; }
- .gp-row + .gp-row { margin-top: 12rpx; }
- .gp-ic { width: 68rpx; height: 68rpx; border-radius: 18rpx; flex-shrink: 0; }
- .gp-ic-body {
- background-color: $dim-body-tint;
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
- background-image: gp-icon($gp-body-bg, '%3Cpath d=%22M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%2212%22 cy=%227%22 r=%224%22/%3E');
- }
- .gp-ic-wisdom {
- background-color: $dim-wisdom-tint;
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
- background-image: gp-icon($gp-wisdom-bg, '%3Cpath d=%22M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%229%22 cy=%227%22 r=%224%22/%3E%3Cpath d=%22M23 21v-2a4 4 0 0 0-3-3.87%22/%3E%3Cpath d=%22M16 3.13a4 4 0 0 1 0 7.75%22/%3E');
- }
- .gp-ic-wealth {
- background-color: $dim-wealth-tint;
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
- background-image: gp-icon($gp-wealth-bg, '%3Cline x1=%2218%22 y1=%2220%22 x2=%2218%22 y2=%2210%22/%3E%3Cline x1=%2212%22 y1=%2220%22 x2=%2212%22 y2=%224%22/%3E%3Cline x1=%226%22 y1=%2220%22 x2=%226%22 y2=%2214%22/%3E');
- }
- .gp-row-info { flex: 1; min-width: 0; margin-left: 20rpx; display: flex; flex-direction: column; }
- .gp-row-name { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-strong; }
- .gp-row-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; margin-top: 6rpx; }
- .gp-lock {
- width: 32rpx; height: 32rpx; flex-shrink: 0; margin-left: 12rpx;
- background-repeat: no-repeat;
- background-position: center;
- background-size: 32rpx 32rpx;
- background-image: gp-icon($gp-ghost, '%3Crect x=%223%22 y=%2211%22 width=%2218%22 height=%2211%22 rx=%222%22/%3E%3Cpath d=%22M7 11V7a5 5 0 0 1 10 0v4%22/%3E');
- }
- /* 理念卡 */
- .gp-philosophy { margin: 0 32rpx 24rpx; display: flex; flex-direction: row; align-items: flex-start; background: $app-surface; border-radius: 24rpx; padding: 28rpx 24rpx; border: 1rpx solid $app-border-subtle; }
- .gp-philosophy-ic {
- width: 68rpx; height: 68rpx; flex-shrink: 0; border-radius: 18rpx;
- background-color: $dim-action-tint;
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
- background-image: gp-icon($gp-guide-ic-b, '%3Cpath d=%22M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z%22/%3E');
- }
- .gp-philosophy-body { flex: 1; min-width: 0; margin-left: 20rpx; display: flex; flex-direction: column; }
- .gp-philosophy-title { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-text-strong; line-height: 1.45; }
- .gp-philosophy-desc { font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.7; margin-top: 12rpx; }
- /* 登录引导(模板内联:本页未注册 LoginGuideCard) */
- .gp-guide { margin: 0 32rpx 8rpx; display: flex; flex-direction: column; background: linear-gradient(150deg, $gp-guide-bg-from 0%, $gp-guide-bg-to 100%); border-radius: 24rpx; padding: 32rpx 28rpx; border: 1rpx solid $app-border-subtle; }
- .gp-guide-head { display: flex; flex-direction: row; align-items: center; }
- .gp-guide-ic {
- width: 36rpx; height: 36rpx; flex-shrink: 0;
- background-repeat: no-repeat; background-position: center; background-size: 36rpx 36rpx;
- background-image: gp-icon($gp-brand-bg, '%3Crect x=%223%22 y=%2211%22 width=%2218%22 height=%2211%22 rx=%222%22/%3E%3Cpath d=%22M7 11V7a5 5 0 0 1 10 0v4%22/%3E');
- }
- .gp-guide-title { flex: 1; min-width: 0; margin-left: 14rpx; font-size: calc(30rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; line-height: 1.4; }
- .gp-guide-list { margin-top: 20rpx; display: flex; flex-direction: column; }
- .gp-guide-item { display: flex; flex-direction: row; align-items: flex-start; margin-top: 14rpx; }
- .gp-guide-item:first-child { margin-top: 0; }
- .gp-guide-check {
- width: 28rpx; height: 28rpx; flex-shrink: 0; margin-top: 6rpx;
- background-repeat: no-repeat; background-position: center; background-size: 28rpx 28rpx;
- background-image: gp-icon($gp-success-bg, '%3Cpolyline points=%2220 6 9 17 4 12%22/%3E');
- }
- .gp-guide-text { flex: 1; min-width: 0; margin-left: 12rpx; font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; }
- .gp-guide-btn { margin-top: 28rpx; padding: 24rpx 0; border-radius: 999rpx; background: linear-gradient(135deg, $gp-cta-from 0%, $gp-cta-to 100%); display: flex; flex-direction: row; align-items: center; justify-content: center; box-shadow: 0 10rpx 24rpx rgba($brand-primary, 0.18); }
- .gp-guide-btn:active { opacity: 0.9; }
- .gp-guide-btn-text { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $app-surface; }
- /* 退出切换 */
- .exit-switch {
- margin: 0 $uni-space-lg 16rpx;
- background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
- color: $app-surface;
- padding: 16rpx;
- border-radius: 16rpx;
- text-align: center;
- font-size: calc(26rpx * var(--font-scale, 1));
- }
- /* 身份卡 */
- .user-card {
- margin: 24rpx $uni-space-lg 20rpx;
- background: linear-gradient(135deg, $brand-primary 0%, $brand-primary-light 100%);
- border-radius: 24rpx;
- padding: 32rpx 32rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-shadow: 0 8rpx 32rpx rgba($accent-indigo, 0.3);
- }
- .user-card-left {
- display: flex;
- align-items: center;
- flex: 1;
- }
- .avatar-wrap {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- background: rgba($app-surface, 0.2);
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- overflow: hidden;
- border: 3rpx solid rgba($app-surface, 0.3);
- }
- .avatar-img {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- }
- .avatar-text {
- font-size: calc(44rpx * var(--font-scale, 1));
- color: $app-surface;
- }
- .user-meta { flex: 1; }
- .user-name-row {
- display: flex;
- align-items: center;
- gap: 12rpx;
- margin-bottom: 8rpx;
- }
- .nickname {
- font-size: calc(34rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $app-surface;
- }
- .role-tag {
- font-size: calc(20rpx * var(--font-scale, 1));
- background: rgba($app-surface, 0.2);
- color: $app-surface;
- padding: 4rpx 14rpx;
- border-radius: 24rpx;
- }
- .referrer-line {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: rgba($app-surface, 0.7);
- margin-bottom: 6rpx;
- }
- .user-sub {
- display: flex;
- align-items: center;
- gap: 12rpx;
- }
- .level-badge {
- font-size: calc(22rpx * var(--font-scale, 1));
- padding: 6rpx 20rpx;
- border-radius: 24rpx;
- font-weight: bold;
- border: 2rpx solid rgba($app-surface, 0.35);
- display: flex;
- align-items: center;
- gap: 6rpx;
- box-sizing: border-box;
- height: 40rpx;
- }
- .level-badge::before {
- content: '👑';
- font-size: calc(18rpx * var(--font-scale, 1));
- }
- .level-FREE { background: linear-gradient(135deg, $c-text-gray-400, $facade-text-slate); color: $app-surface; }
- .level-FREE::before { content: ''; }
- .level-FAMILY { background: linear-gradient(135deg, $dim-wealth, $status-warning-deep); color: $app-surface; }
- .level-PREMIUM { background: linear-gradient(135deg, $dim-wisdom, $dim-wisdom-deep); color: $app-surface; }
- .level-LIFETIME {
- background: linear-gradient(135deg, $accent-pink, $accent-pink-deep);
- color: $app-surface;
- box-shadow: 0 4rpx 16rpx rgba($accent-pink, 0.45);
- border-color: rgba($app-surface, 0.55);
- }
- .days-left {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: rgba($app-surface, 0.85);
- }
- .upgrade-btn {
- background: rgba($app-surface, 0.22);
- border: 2rpx solid rgba($app-surface, 0.6);
- border-radius: 24rpx;
- padding: 6rpx 20rpx;
- flex-shrink: 0;
- box-sizing: border-box;
- height: 40rpx;
- display: flex;
- align-items: center;
- }
- .upgrade-btn-text {
- font-size: calc(20rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $app-surface;
- line-height: 1;
- }
- .user-card-right {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6rpx;
- background: rgba($app-surface, 0.15);
- padding: 12rpx 24rpx;
- border-radius: 16rpx;
- }
- .points-num {
- font-size: calc(36rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $app-surface;
- }
- .points-label {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: rgba($app-surface, 0.7);
- }
- /* 家庭成员速览 */
- .family-strip {
- margin: 0 $uni-space-lg 20rpx;
- background: $app-surface;
- border-radius: 24rpx;
- padding: 20rpx 24rpx 16rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .family-strip-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 14rpx;
- }
- .family-strip-title {
- font-size: calc(26rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $facade-text-strong;
- }
- .family-strip-count {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- }
- .family-avatars {
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 16rpx;
- overflow-x: auto;
- padding-bottom: 4rpx;
- }
- .family-avatar-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6rpx;
- flex-shrink: 0;
- }
- .family-avatar-wrap {
- width: 72rpx;
- height: 72rpx;
- border-radius: 50%;
- background: $facade-fill;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- position: relative;
- }
- .family-avatar-img {
- width: 72rpx;
- height: 72rpx;
- border-radius: 50%;
- }
- .family-avatar-text {
- font-size: calc(28rpx * var(--font-scale, 1));
- color: $facade-text-body;
- }
- .family-avatar-wrap.family-avatar-add {
- background: $facade-fill-warm-gray;
- border: 2rpx dashed $facade-text-ghost;
- }
- .family-avatar-plus {
- font-size: calc(36rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- }
- .family-avatar-tag {
- position: absolute;
- bottom: -4rpx;
- right: -4rpx;
- font-size: calc(14rpx * var(--font-scale, 1));
- padding: 2rpx 6rpx;
- border-radius: 8rpx;
- color: $app-surface;
- }
- .family-avatar-tag.tag-parent { background: $dim-wisdom; }
- .family-avatar-tag.tag-child { background: $brand-primary; }
- .family-avatar-tag.tag-teacher { background: $dim-action; }
- .family-avatar-tag.tag-member { background: $c-text-gray-400; }
- .family-avatar-name {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: $facade-text-body;
- white-space: nowrap;
- }
- /* 个人成就 */
- .achievement-section {
- margin: 0 $uni-space-lg 20rpx;
- background: $app-surface;
- border-radius: 24rpx;
- padding: 24rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .section-header-row {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- margin-bottom: 16rpx;
- }
- .section-title {
- font-size: calc(28rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $facade-text-strong;
- }
- .section-sub {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- }
- .achievement-grid {
- display: flex;
- flex-wrap: wrap;
- gap: 0;
- }
- .ach-item {
- width: 25%;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6rpx;
- padding: 10rpx 0;
- }
- .ach-icon-wrap {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 4rpx;
- }
- .ach-icon {
- font-size: calc(32rpx * var(--font-scale, 1));
- line-height: 1;
- }
- .ach-num {
- font-size: calc(28rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $facade-text-strong;
- line-height: 1;
- }
- .ach-label {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- line-height: 1;
- }
- /* 我的团队网格:3 列(我的团队 / 推广收益 / 邀请成员)等宽,保持既有视觉协调 */
- .achievement-grid.team-grid .ach-item {
- width: 33.33%;
- }
- /* 我的成就网格:5 列固定等分(连续打卡/完成任务/收集勋章/成长记录/参加挑战) */
- .achievement-grid.cols-5 .ach-item {
- width: 20%;
- }
- /* 我的订单(电商风格) */
- .order-section {
- margin: 0 $uni-space-lg 20rpx;
- }
- .order-section-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 14rpx;
- }
- .order-all-link {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- }
- .order-card {
- background: $app-surface;
- border-radius: 24rpx;
- padding: 24rpx 12rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .order-grid {
- display: flex;
- flex-wrap: wrap;
- }
- .order-grid-item {
- width: 20%;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 10rpx;
- padding: 8rpx 0;
- }
- .order-icon-wrap {
- position: relative;
- width: 64rpx;
- height: 64rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .order-icon {
- font-size: calc(40rpx * var(--font-scale, 1));
- line-height: 1;
- }
- .order-badge {
- position: absolute;
- top: -8rpx;
- right: -14rpx;
- min-width: 30rpx;
- height: 30rpx;
- line-height: 30rpx;
- border-radius: 16rpx;
- background: $status-danger-2;
- color: $app-surface;
- font-size: calc(18rpx * var(--font-scale, 1));
- text-align: center;
- padding: 0 6rpx;
- }
- .order-grid-text {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $facade-text-body;
- line-height: 1;
- }
- .order-extra-row {
- display: flex;
- align-items: center;
- margin-top: 20rpx;
- padding-top: 20rpx;
- border-top: 1rpx solid $c-fill-2b;
- }
- .order-extra-item {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8rpx;
- }
- .order-extra-icon {
- font-size: calc(28rpx * var(--font-scale, 1));
- }
- .order-extra-text {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $facade-text-strong;
- }
- .order-extra-badge {
- min-width: 30rpx;
- height: 30rpx;
- line-height: 30rpx;
- border-radius: 16rpx;
- background: $brand-primary;
- color: $app-surface;
- font-size: calc(18rpx * var(--font-scale, 1));
- text-align: center;
- padding: 0 6rpx;
- }
- .order-extra-divider {
- width: 1rpx;
- height: 30rpx;
- background: $c-fill-2b;
- }
- /* 规划师服务中心入口 */
- .service-center-section {
- margin: 0 $uni-space-lg 20rpx;
- }
- .service-center-card {
- background: linear-gradient(135deg, $brand-primary 0%, $brand-primary-light 100%);
- border-radius: 24rpx;
- padding: 24rpx;
- display: flex;
- align-items: center;
- gap: 20rpx;
- box-shadow: 0 4rpx 16rpx rgba($brand-primary, 0.25);
- }
- .service-center-card.disabled-card {
- background: linear-gradient(135deg, $uni-border-color-light, $app-text-subtle);
- box-shadow: none;
- opacity: 0.8;
- }
- .service-center-icon {
- font-size: calc(48rpx * var(--font-scale, 1));
- }
- .service-center-info {
- flex: 1;
- }
- .service-center-title {
- font-size: calc(30rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $app-surface;
- display: block;
- }
- .service-center-desc {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: rgba($app-surface, 0.8);
- margin-top: 6rpx;
- display: block;
- }
- .service-center-card.disabled-card .service-center-title {
- color: $app-surface;
- }
- .service-center-card.disabled-card .service-center-desc {
- color: rgba($app-surface, 0.9);
- }
- .service-center-arrow {
- font-size: calc(40rpx * var(--font-scale, 1));
- color: $app-surface;
- }
- /* 设置 + 退出 */
- .bottom-menu-section {
- margin: 0 $uni-space-lg;
- padding-bottom: 20rpx;
- }
- .menu-row {
- width: 100%;
- background: $app-surface;
- border-radius: 16rpx;
- padding: 24rpx;
- display: flex;
- align-items: center;
- gap: 14rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- margin-bottom: 20rpx;
- }
- .menu-row-icon {
- font-size: calc(30rpx * var(--font-scale, 1));
- }
- .menu-row-text {
- flex: 1;
- font-size: calc(26rpx * var(--font-scale, 1));
- color: $facade-text-strong;
- }
- .menu-row-sub {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $facade-text-muted;
- margin-right: 8rpx;
- }
- .menu-row-arrow {
- font-size: calc(28rpx * var(--font-scale, 1));
- color: $facade-text-ghost;
- }
- .logout-btn {
- width: 100%;
- background: $app-surface;
- border-radius: 16rpx;
- padding: 24rpx;
- text-align: center;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- }
- .logout-text {
- font-size: calc(26rpx * var(--font-scale, 1));
- color: $status-danger-2;
- font-weight: 500;
- }
- /* 团队邀请:透明原生分享按钮,绝对定位铺满父入口,仅由微信接管点击、不改变任何视觉。
- 彻底重置 uni-app <button> 默认样式(margin/padding/line-height/border/背景),
- 用 opacity:0 而非 display:none(后者会使按钮不可点击)。父入口需为定位上下文。 */
- .share-overlay-btn {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- border: none;
- border-radius: inherit;
- background: transparent;
- line-height: 1;
- font-size: 0;
- opacity: 0;
- z-index: 2;
- }
- .share-overlay-btn::after {
- border: none;
- }
- /* 网格「邀请成员」项作为透明分享按钮的定位上下文;项本身已是 flex 布局,仅补定位 */
- .ach-item-share {
- position: relative;
- overflow: hidden;
- }
- /* 分享推广码浮动按钮 */
- .share-qr-float {
- position: fixed;
- top: 180rpx;
- right: 30rpx;
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- background: $app-surface;
- box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.15);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 99;
- }
- /* 二维码图标(纯 CSS 绘制,不依赖 emoji 字体) */
- .qr-glyph {
- position: relative;
- width: 46rpx;
- height: 46rpx;
- }
- .qr-eye {
- position: absolute;
- width: 16rpx;
- height: 16rpx;
- border: 4rpx solid $uni-text-color;
- border-radius: 8rpx;
- box-sizing: border-box;
- }
- .qr-eye-tl { left: 0; top: 0; }
- .qr-eye-tr { right: 0; top: 0; }
- .qr-eye-bl { left: 0; bottom: 0; }
- .qr-mid {
- position: absolute;
- left: 20rpx;
- top: 20rpx;
- width: 7rpx;
- height: 7rpx;
- background: $uni-text-color;
- border-radius: 8rpx;
- }
- .qr-cluster {
- position: absolute;
- right: 0;
- bottom: 0;
- width: 18rpx;
- display: flex;
- flex-wrap: wrap;
- }
- .qr-pip {
- width: 7rpx;
- height: 7rpx;
- margin: 1rpx;
- background: $uni-text-color;
- border-radius: 8rpx;
- }
- </style>
|