my.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. <template>
  2. <view class="tab_page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <up-navbar title=" " bgColor="transparent">
  4. <template #left></template>
  5. </up-navbar>
  6. <image src="https://oss.familydaf.cn/sxsnfile/20251218/0ac9931a34bd432a8a44ef619fa51362.png" class="top_bg_img" mode="widthFix"></image>
  7. <view class="info">
  8. <view class="info-top adfacjb">
  9. <view class="info-top-left adfac">
  10. <image class="avatar" :src="userInfo?.avatarPath||'https://oss.familydaf.cn/sxsnfile/20251218/3821654e080945998d464f3c3aa64122.png'" @click="handleTurnPage('/pagesMy/information')"></image>
  11. <view class="text" @click.prevent="showLogin">
  12. <view class="text-top adfac">{{userInfo?userInfo?.realName:'未登录'}}<text class="lv-inline" v-if="userInfo&&isFamilyMember" @click.stop="handleTurnPage('/pagesMy/levelDetail')">&nbsp;Lv&nbsp;{{userInfo?.userLevel||0}}&nbsp;</text></view>
  13. <view class="text-bottom no adfac" v-if="userInfo&&!isFamilyMember">编号:{{userInfo?.uniqueNo||''}}</view>
  14. <view class="text-bottom" v-if="!userInfo">去登录注册&nbsp;>></view>
  15. </view>
  16. </view>
  17. <div class="info-top-change adfac" v-if="userInfo" @click="handleChangeUser">
  18. <image src="https://oss.familydaf.cn/sxsnfile/20260105/7242f7d209f646a29e5570fa73da352d.png"></image>
  19. <text>切换用户</text>
  20. </div>
  21. </view>
  22. <view class="info-tip">
  23. <view class="info-tip-pre adfacjb" @click="handleTurnPage('/pagesMy/information')">
  24. <view class="left">{{isFamilyMember?'个人':'家庭'}}公益名称:<text v-if="userInfo">{{userInfo?.welfareName||''}}</text><text style="color: #657588;" v-else>暂无,快去填写吧~</text></view>
  25. <view class="right">
  26. <image src="https://oss.familydaf.cn/sxsnfile/20251218/938f573288ad401fbd1e57404a870059.png"></image>
  27. </view>
  28. </view>
  29. <view class="info-tip-pre adfacjb" @click="handleTurnPage('/pagesMy/information')">
  30. <view class="left">{{isFamilyMember?'个人':'家庭'}}公益口号:<text v-if="userInfo">{{userInfo?.welfareSlogan||''}}</text><text style="color: #657588;" v-else>暂无,快去填写吧~</text></view>
  31. <view class="right">
  32. <image src="https://oss.familydaf.cn/sxsnfile/20251218/938f573288ad401fbd1e57404a870059.png"></image>
  33. </view>
  34. </view>
  35. <view class="info-tip-pre adfacjb" v-if="isFamilyMember&&numInfo?.channelNames">
  36. <view class="left">所属渠道:<text>{{numInfo?.channelNames}}</text></view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="box" style="margin-top: 40rpx;">
  41. <view class="box-title">公益记录</view>
  42. <view class="box-card adfacjb">
  43. <view class="box-card-pre adffcac red" @click="handleTurnPage('/pagesMy/heartNumber?loveValue='+(isFamilyMember?(numInfo?.loveValueBalance??0):numInfo?.loveValue))">
  44. <image class="top" src="https://oss.familydaf.cn/sxsnfile/20251218/046c057625704329a478d535cd1b4364.png"></image>
  45. <view class="num">{{isFamilyMember?((numInfo?.loveValueBalance||0)).toFixed(2):((numInfo?.loveValue||0)).toFixed(2)}}</view>
  46. <view class="text adf">
  47. <text>{{isFamilyMember?'爱心值余额':'我的爱心值'}}</text>
  48. <image src="https://oss.familydaf.cn/sxsnfile/20251218/2e8332c5f36a45cab3af336aa324d20c.png"></image>
  49. </view>
  50. </view>
  51. <view class="box-card-pre adffcac purple" @click="handleTurnPage('/pagesMy/archives')">
  52. <image class="top" src="https://oss.familydaf.cn/sxsnfile/20251218/ee5fffc2b10647ef9492150aed6bb29d.png"></image>
  53. <view class="num">{{(numInfo?.myArchives||0).toFixed(2)}}</view>
  54. <view class="text adf">
  55. <text>我的档案</text>
  56. <image src="https://oss.familydaf.cn/sxsnfile/20251218/6e9e879da03944a4911b48550e915641.png"></image>
  57. </view>
  58. </view>
  59. <view class="box-card-pre adffcac orange" @click="handleTurnPage('/pagesMy/volunteerHours?volunteerHours='+numInfo?.volunteerHours)">
  60. <image class="top" src="https://oss.familydaf.cn/sxsnfile/20251218/3fdb7e3c0d3c444ab03dd5f51a5e3fe0.png"></image>
  61. <view class="num">{{(numInfo?.volunteerHours||0).toFixed(2)}}</view>
  62. <view class="text adf">
  63. <text>义工时长(h)</text>
  64. <image src="https://oss.familydaf.cn/sxsnfile/20251218/625a9a7d454c4e7985bd7e12a9f1af93.png"></image>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="box" @click="handleTurnPage('/pagesMy/achievement')" v-if="isFamilyMember">
  70. <view class="box-title">我的成就</view>
  71. <view class="box-achievement adfacjb">
  72. <view class="box-achievement-left">收获<span>{{numInfo?.myMedals||0}}</span>项成就</view>
  73. <view class="box-achievement-right adfacjb">
  74. <view class="imgs"></view>
  75. <view class="jt">
  76. <image src="https://oss.familydaf.cn/sxsnfile/20251218/938f573288ad401fbd1e57404a870059.png"></image>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="box">
  82. <view class="box-title">其他功能</view>
  83. <view class="box-other adfacjb">
  84. <view class="box-other-pre adffcac" @click="handleTurnPage('/pagesMy/practice')">
  85. <image src="https://oss.familydaf.cn/sxsnfile/20251218/f6d2c342d9414909b4626e34909917c7.png"></image>
  86. <text>申领社会实践记录</text>
  87. </view>
  88. <view class="box-other-pre adffcac" @click="handleTurnPage('/pagesMy/familyMember')">
  89. <image src="https://oss.familydaf.cn/sxsnfile/20251218/248ed751f8bf4821b29cd236ec2dc78b.png"></image>
  90. <text>家庭成员</text>
  91. </view>
  92. <view class="box-other-pre adffcac" @click="handleTurnPage('/pagesMy/exclusiveScroll')" v-if="!isFamilyMember">
  93. <image src="https://oss.familydaf.cn/sxsnfile/20251218/7ee3c42e8408489fb0768406d72b73b4.png"></image>
  94. <text>我的专享券</text>
  95. </view>
  96. <view class="box-other-pre adffcac" @click="handleBackUser" v-else>
  97. <image src="https://oss.familydaf.cn/sxsnfile/20260105/5b8a24ffd1e34486a6aa5d88260677d0.png"></image>
  98. <text>返回家庭页</text>
  99. </view>
  100. </view>
  101. </view>
  102. <div class="dialog adffc" v-if="changeShow">
  103. <div class="change adffc">
  104. <div class="change-top adfacjc">
  105. <text>切换用户</text>
  106. <image src="https://oss.familydaf.cn/sxsnfile/20260105/2ffe44b1abef403788b21aca09f6a8c3.png" @click="changeShow=false"></image>
  107. </div>
  108. <div class="change-list">
  109. <div class="change-list-item adfacjb" v-for="(item,index) in familyMemberList" :key="item.id" @click="selectFamilyMember(index)">
  110. <div class="change-list-item-left">
  111. <view class="change-list-item-left-top adfac">
  112. <view class="name">{{item.name||''}}</view>
  113. <image class="sex" v-if="item.gender==1" src="https://oss.familydaf.cn/sxsnfile/20251218/473d5677fbdb4106acdb9a163377d27f.png"></image>
  114. <image class="sex" v-else-if="item.gender==0" src="https://oss.familydaf.cn/sxsnfile/20251218/02bc40a1c47b40f1a36b55cd0553211c.png"></image>
  115. <view class="age" :class="{'women':item.gender==1,'man':item.gender==0}">{{item.age}}岁</view>
  116. </view>
  117. <view class="change-list-item-left-bottom">
  118. 身份证 {{item.idCardCopy}}
  119. </view>
  120. </div>
  121. <div class="change-list-item-right">
  122. <image v-if="item.select" src="https://oss.familydaf.cn/sxsnfile/20251218/c11b9a1b56f34e1189621f4270f0349a.png"></image>
  123. <image v-else src="https://oss.familydaf.cn/sxsnfile/20251218/2a2f7bdefb474a3e93faa00aef6d0e1f.png"></image>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="change-btn" @click="changeUserConfirm">确定</div>
  128. </div>
  129. </div>
  130. <CusTabbar :tabbarIndex="2"></CusTabbar>
  131. <login-register></login-register>
  132. </view>
  133. </template>
  134. <script setup name="">
  135. import CusTabbar from '@/components/CusTabbar/index.vue'
  136. import { ref, onMounted, watch, nextTick, getCurrentInstance } from 'vue'
  137. const { proxy } = getCurrentInstance();
  138. import { useUserStore } from '@/common/stores/user';
  139. const userStore = useUserStore();
  140. import { useGlobalShare } from '@/common/composables/useGlobalShare';
  141. const { isLogin } = useGlobalShare();
  142. const userInfo = ref(null)
  143. const numInfo = ref(null)
  144. const isFamilyMember = ref(false)
  145. const changeShow = ref(false)
  146. const familyMemberList = ref([])
  147. const familyMemberInfo = ref(null)
  148. const memberId = ref('')
  149. const showLogin = () => {
  150. if(!isLogin()) return
  151. handleTurnPage('/pagesMy/information')
  152. }
  153. const handleChangeUser = () => {
  154. changeShow.value = true;
  155. getMemberList();
  156. }
  157. const getMemberList = () => {
  158. const userId = uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo'))?.id:'';
  159. proxy.$api.get('/core/family/member/page',{page:1,limit:-1,userId}).then(({data:res})=>{
  160. if(res.code!==0) return proxy.$showToast(res.msg)
  161. familyMemberList.value = res.data.list;
  162. familyMemberList.value.forEach(l=>{
  163. l.select = false;
  164. l.age = getAge(l.idCard)
  165. l.idCardCopy = l.idCard.replace(/^(\d{6})(\d{8})(\d{3}[\dX])$/i,'$1********$3')
  166. })
  167. })
  168. }
  169. const isValid = (idCard) => {
  170. // 正则表达式校验18位身份证号码(最后一位可以是数字或X/x)
  171. const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  172. return typeof idCard === 'string' && regex.test(idCard);
  173. }
  174. const getAge = (idCard) => {
  175. if (!isValid(idCard)) return 0
  176. // 从身份证的第7位开始,截取8位作为出生日期字符串 (YYYYMMDD)
  177. const birthDateStr = idCard.substring(6, 14);
  178. const birthYear = parseInt(birthDateStr.substring(0, 4), 10);
  179. const birthMonth = parseInt(birthDateStr.substring(4, 6), 10);
  180. const birthDay = parseInt(birthDateStr.substring(6, 8), 10);
  181. const today = new Date();
  182. const currentYear = today.getFullYear();
  183. const currentMonth = today.getMonth() + 1; // getMonth() 返回 0-11
  184. const currentDay = today.getDate();
  185. // 计算周岁
  186. let age = currentYear - birthYear;
  187. // 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
  188. if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
  189. age--;
  190. }
  191. return age < 0 ? 0 : age;
  192. }
  193. const selectFamilyMember = index => {
  194. familyMemberList.value.forEach((f,i)=>{
  195. familyMemberList.value[i].select = index===i;
  196. })
  197. }
  198. const handleBackUser = () => {
  199. memberId.value = '';
  200. familyMemberInfo.value = null;
  201. isFamilyMember.value = false;
  202. uni.removeStorageSync('isFamilyMember');
  203. uni.removeStorageSync('familyMemberInfo');
  204. }
  205. const changeUserConfirm = () => {
  206. const selectedUser = familyMemberList.value.find(f=>f.select)
  207. if(!selectedUser) return proxy.$showToast('请选择要切换的用户')
  208. memberId.value = selectedUser?.id||'';
  209. familyMemberInfo.value = selectedUser;
  210. isFamilyMember.value = true;
  211. userInfo.value = {...deepClone(userInfo.value),...deepClone(selectedUser)};
  212. uni.setStorageSync('isFamilyMember',true);
  213. uni.setStorageSync('familyMemberInfo',JSON.stringify(familyMemberInfo.value));
  214. changeShow.value = false;
  215. }
  216. const handleTurnPage = (url) => {
  217. if(!isLogin()) return
  218. if(url == '/pagesMy/information'){
  219. if(isFamilyMember.value){
  220. uni.navigateTo({
  221. url:'/pagesMy/familyMemberVindicate?id='+(JSON.parse(uni.getStorageSync('familyMemberInfo'))?.id||'')+'&type=my'
  222. })
  223. return
  224. }
  225. }
  226. if(url == '/pagesMy/achievement'){
  227. url = `/pagesMy/achievement?numInfo=`+JSON.stringify(numInfo.value)+`&userLevel=`+userInfo.value?.userLevel
  228. }
  229. uni.navigateTo({ url })
  230. }
  231. const deepClone = (obj) => {
  232. if (obj === null || typeof obj !== 'object') {
  233. return obj;
  234. }
  235. if (Array.isArray(obj)) {
  236. return obj.map(item => deepClone(item));
  237. }
  238. const clonedObj = {};
  239. for (const key in obj) {
  240. clonedObj[key] = deepClone(obj[key]);
  241. }
  242. return clonedObj;
  243. }
  244. const getUserInfo = () => {
  245. try{
  246. let mid = deepClone(memberId.value);
  247. if(uni.getStorageSync('isFamilyMember')) mid = uni.getStorageSync('familyMemberInfo')?JSON.parse(uni.getStorageSync('familyMemberInfo')).id:'';
  248. proxy.$api.get(`/wx/userWelfareData`,{memberId:mid}).then(({data:res})=>{
  249. if(res.code!==0) return proxy.$showToast(res.msg)
  250. userInfo.value = res.data;
  251. numInfo.value = res.data;
  252. if(uni.getStorageSync('isFamilyMember')){
  253. uni.setStorageSync('isFamilyMember',JSON.stringify(res.data));
  254. }else {
  255. uni.setStorageSync('userInfo',JSON.stringify({...JSON.parse(uni.getStorageSync('userInfo')),...res.data}));
  256. }
  257. })
  258. }catch(e){
  259. userInfo.value = null
  260. numInfo.value = null
  261. }
  262. }
  263. watch(()=>userStore.token,(newVal,oldVal)=>{
  264. if(oldVal!=newVal&&newVal){
  265. setTimeout(()=>{
  266. uni.showToast({
  267. title: '登录成功',
  268. icon: 'success'
  269. });
  270. },200)
  271. nextTick(()=>{
  272. getUserInfo()
  273. })
  274. }
  275. })
  276. watch(()=>memberId.value,(newVal,oldVal)=>{
  277. if(oldVal!=newVal){
  278. nextTick(()=>{
  279. getUserInfo()
  280. })
  281. }
  282. })
  283. onMounted(()=>{
  284. isFamilyMember.value = uni.getStorageSync('isFamilyMember')?true:false;
  285. if(uni.getStorageSync('familyMemberInfo')) memberId.value = JSON.parse(uni.getStorageSync('familyMemberInfo')).id;
  286. if(uni.getStorageSync('userInfo')){
  287. getUserInfo()
  288. }
  289. })
  290. </script>
  291. <style scoped lang="scss">
  292. .dialog{
  293. position: fixed;
  294. left: 0;
  295. right: 0;
  296. top: 0;
  297. bottom: 0;
  298. background: rgba(0, 0, 0, .4);
  299. z-index: 1001;
  300. justify-content: flex-end;
  301. .change{
  302. width: 100%;
  303. height: 920rpx;
  304. background: #FFFFFF;
  305. border-radius: 24rpx 24rpx 0rpx 0rpx;
  306. padding: 48rpx 30rpx 64rpx;
  307. box-sizing: border-box;
  308. &-top{
  309. position: relative;
  310. text{
  311. font-family: PingFang-SC, PingFang-SC;
  312. font-weight: bold;
  313. font-size: 36rpx;
  314. color: #151B29;
  315. line-height: 36rpx;
  316. }
  317. image{
  318. width: 36rpx;
  319. height: 36rpx;
  320. position: absolute;
  321. right: 0;
  322. }
  323. }
  324. &-list{
  325. flex: 1;
  326. margin-top: 48rpx;
  327. overflow-y: auto;
  328. &-item{
  329. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #E5E7EB;
  330. width: 100%;
  331. padding: 36rpx 0;
  332. &-left{
  333. &-top{
  334. .name{
  335. font-family: PingFang-SC, PingFang-SC;
  336. font-weight: bold;
  337. font-size: 32rpx;
  338. color: #151B29;
  339. line-height: 32rpx;
  340. }
  341. .sex{
  342. width: 44rpx;
  343. height: 32rpx;
  344. margin-left: 16rpx;
  345. }
  346. .age{
  347. border-radius: 13rpx;
  348. font-family: PingFangSC, PingFang SC;
  349. font-weight: 400;
  350. font-size: 20rpx;
  351. line-height: 24rpx;
  352. padding: 4rpx 10rpx;
  353. margin-left: 13rpx;
  354. &.women{
  355. background: rgba(244,101,122,0.14);
  356. color: #F4657A;
  357. }
  358. &.man{
  359. background: rgba(5,169,254,0.12);
  360. color: #05A9FE;
  361. }
  362. }
  363. }
  364. &-bottom{
  365. font-family: PingFangSC, PingFang SC;
  366. font-weight: 400;
  367. font-size: 24rpx;
  368. color: #989998;
  369. line-height: 24rpx;
  370. margin-top: 23rpx;
  371. }
  372. }
  373. &-right{
  374. image{
  375. width: 36rpx;
  376. height: 36rpx;
  377. }
  378. }
  379. }
  380. }
  381. &-btn{
  382. width: 100%;
  383. height: 90rpx;
  384. background: #B7F358;
  385. border-radius: 45rpx;
  386. font-family: PingFang-SC, PingFang-SC;
  387. font-weight: bold;
  388. font-size: 32rpx;
  389. color: #151B29;
  390. line-height: 90rpx;
  391. text-align: center;
  392. letter-spacing: 2rpx;
  393. margin-top: 20rpx;
  394. }
  395. }
  396. }
  397. .tab_page{
  398. .info{
  399. margin-top: 40rpx;
  400. position: relative;
  401. padding: 0 24rpx 0 16rpx;
  402. &-top{
  403. position: relative;
  404. &-left{
  405. .avatar{
  406. width: 148rpx;
  407. height: 148rpx;
  408. border-radius: 50%;
  409. }
  410. .text{
  411. margin-left: 24rpx;
  412. &-top{
  413. font-family: PingFang-SC, PingFang-SC;
  414. font-weight: bold;
  415. font-size: 40rpx;
  416. color: #151B29;
  417. line-height: 40rpx;
  418. .lv-inline{
  419. display: inline-block;
  420. width: 137rpx;
  421. height: 42rpx;
  422. background: url('https://oss.familydaf.cn/sxsnfile/20251218/b6e6f5b45ad34f91bbaf66c9890fc2cd.png') no-repeat;
  423. background-size: 100% 100%;
  424. font-family: PingFangSC, PingFang SC;
  425. font-weight: 600;
  426. font-size: 26rpx;
  427. color: #FFFFFF;
  428. line-height: 42rpx;
  429. padding-left: 16rpx;
  430. box-sizing: border-box;
  431. vertical-align: middle;
  432. }
  433. }
  434. &-bottom{
  435. font-family: PingFangSC, PingFang SC;
  436. font-weight: 400;
  437. font-size: 26rpx;
  438. color: #151B29;
  439. line-height: 26rpx;
  440. margin-top: 26rpx;
  441. &.lv{
  442. width: 137rpx;
  443. height: 42rpx;
  444. background: url('https://oss.familydaf.cn/sxsnfile/20251218/b6e6f5b45ad34f91bbaf66c9890fc2cd.png') no-repeat;
  445. background-size: 100% 100%;
  446. font-family: PingFangSC, PingFang SC;
  447. font-weight: 600;
  448. font-size: 26rpx;
  449. color: #FFFFFF;
  450. line-height: 38rpx;
  451. padding-left: 16rpx;
  452. box-sizing: border-box;
  453. margin-top: 18rpx;
  454. }
  455. &.no{
  456. font-family: PingFangSC, PingFang SC;
  457. font-weight: 400;
  458. font-size: 26rpx;
  459. color: #657588;
  460. line-height: 26rpx;
  461. }
  462. }
  463. }
  464. }
  465. &-right{
  466. image{
  467. width: 48rpx;
  468. height: 48rpx;
  469. }
  470. }
  471. &-change{
  472. padding: 0 20rpx 0 16rpx;
  473. height: 60rpx;
  474. background: #B7F358;
  475. border-radius: 30rpx 0rpx 0rpx 30rpx;
  476. position: absolute;
  477. top: 24rpx;
  478. right: -48rpx;
  479. image{
  480. width: 32rpx;
  481. height: 32rpx;
  482. }
  483. text{
  484. font-family: PingFang-SC, PingFang-SC;
  485. font-weight: bold;
  486. font-size: 24rpx;
  487. color: #151B29;
  488. line-height: 30rpx;
  489. margin-left: 8rpx;
  490. }
  491. }
  492. }
  493. &-tip{
  494. margin-top: 4rpx;
  495. &-pre{
  496. margin-top: 36rpx;
  497. .left{
  498. font-family: PingFangSC, PingFang SC;
  499. font-weight: 400;
  500. font-size: 28rpx;
  501. color: #252525;
  502. line-height: 28rpx;
  503. }
  504. .right{
  505. image{
  506. width: 32rpx;
  507. height: 32rpx;
  508. }
  509. }
  510. }
  511. }
  512. }
  513. .box{
  514. background: #FFFFFF;
  515. border-radius: 24rpx;
  516. padding: 40rpx 24rpx 36rpx;
  517. margin-top: 20rpx;
  518. position: relative;
  519. &-title{
  520. font-family: PingFang-SC, PingFang-SC;
  521. font-weight: bold;
  522. font-size: 36rpx;
  523. color: #151B29;
  524. line-height: 40rpx;
  525. }
  526. &-card{
  527. margin-top: 72rpx;
  528. &-pre{
  529. width: calc(100% / 3 - 8rpx);
  530. height: 200rpx;
  531. position: relative;
  532. background-size: 100% 100%;
  533. background-repeat: no-repeat;
  534. .top{
  535. width: 82rpx;
  536. height: 82rpx;
  537. position: absolute;
  538. left: 50%;
  539. margin-left: -41rpx;
  540. top: -32rpx;
  541. }
  542. .num{
  543. font-family: DINAlternate, DINAlternate;
  544. font-weight: bold;
  545. font-size: 40rpx;
  546. line-height: 40rpx;
  547. text-align: center;
  548. margin-top: 86rpx;
  549. }
  550. .text{
  551. margin-top: 20rpx;
  552. text{
  553. font-family: PingFangSC, PingFang SC;
  554. font-weight: 400;
  555. font-size: 24rpx;
  556. line-height: 24rpx;
  557. }
  558. image{
  559. width: 26rpx;
  560. height: 26rpx;
  561. margin-left: 6rpx;
  562. }
  563. }
  564. &.red{
  565. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/57acefa1a0084d1e980002e165668bc9.png');
  566. .num,.text text{
  567. color: #FC5768;
  568. }
  569. }
  570. &.purple{
  571. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/e0f97b6ca8864d2ca0c3dc48b07dae58.png');
  572. .num,.text text{
  573. color: #8360E8;
  574. }
  575. }
  576. &.orange{
  577. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/eabb899f7ab14010b61fb30ed24bd818.png');
  578. .num,.text text{
  579. color: #FF8200;
  580. }
  581. }
  582. }
  583. }
  584. &-achievement{
  585. margin-top: 24rpx;
  586. &-left{
  587. width: 210rpx;
  588. font-family: PingFangSC, PingFang SC;
  589. font-weight: 400;
  590. font-size: 24rpx;
  591. color: #676775;
  592. line-height: 24rpx;
  593. label{
  594. font-weight: bold;
  595. font-size: 32rpx;
  596. color: #EA3044;
  597. line-height: 32rpx;
  598. margin: 0 7rpx;
  599. }
  600. }
  601. &-right{
  602. width: calc(100% - 210rpx);
  603. .jt{
  604. image{
  605. width: 32rpx;
  606. height: 32rpx;
  607. }
  608. }
  609. }
  610. }
  611. &-other{
  612. margin-top: 39rpx;
  613. &-pre{
  614. width: calc(100% / 3);
  615. image{
  616. width: 48rpx;
  617. height: 48rpx;
  618. }
  619. text{
  620. font-family: PingFangSC, PingFang SC;
  621. font-weight: 400;
  622. font-size: 24rpx;
  623. color: #151B29;
  624. line-height: 33rpx;
  625. text-align: center;
  626. margin-top: 16rpx;
  627. }
  628. }
  629. }
  630. }
  631. }
  632. </style>