my.vue 21 KB

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