my.vue 20 KB

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