my.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  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">去登录注册&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 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)" v-if="isFamilyMember">
  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) return proxy.$showToast(res.msg)
  251. userInfo.value = res.data;
  252. numInfo.value = res.data;
  253. if(uni.getStorageSync('isFamilyMember')){
  254. uni.setStorageSync('isFamilyMember',JSON.stringify(res.data));
  255. }else {
  256. uni.setStorageSync('userInfo',JSON.stringify({...JSON.parse(uni.getStorageSync('userInfo')),...res.data}));
  257. }
  258. })
  259. }catch(e){
  260. userInfo.value = null
  261. numInfo.value = null
  262. }
  263. }
  264. watch(()=>userStore.token,(newVal,oldVal)=>{
  265. if(oldVal!=newVal&&newVal){
  266. setTimeout(()=>{
  267. uni.showToast({
  268. title: '登录成功',
  269. icon: 'success'
  270. });
  271. },200)
  272. nextTick(()=>{
  273. getUserInfo()
  274. })
  275. }
  276. })
  277. watch(()=>memberId.value,(newVal,oldVal)=>{
  278. if(oldVal!=newVal){
  279. nextTick(()=>{
  280. getUserInfo()
  281. })
  282. }
  283. })
  284. onMounted(()=>{
  285. isFamilyMember.value = uni.getStorageSync('isFamilyMember')?true:false;
  286. if(uni.getStorageSync('familyMemberInfo')) memberId.value = JSON.parse(uni.getStorageSync('familyMemberInfo')).id;
  287. if(uni.getStorageSync('userInfo')){
  288. getUserInfo()
  289. }
  290. })
  291. </script>
  292. <style scoped lang="scss">
  293. .dialog{
  294. position: fixed;
  295. left: 0;
  296. right: 0;
  297. top: 0;
  298. bottom: 0;
  299. background: rgba(0, 0, 0, .4);
  300. z-index: 1001;
  301. justify-content: flex-end;
  302. .change{
  303. width: 100%;
  304. height: 920rpx;
  305. background: #FFFFFF;
  306. border-radius: 24rpx 24rpx 0rpx 0rpx;
  307. padding: 48rpx 30rpx 64rpx;
  308. box-sizing: border-box;
  309. &-top{
  310. position: relative;
  311. text{
  312. font-family: PingFang-SC, PingFang-SC;
  313. font-weight: bold;
  314. font-size: 36rpx;
  315. color: #151B29;
  316. line-height: 36rpx;
  317. }
  318. image{
  319. width: 36rpx;
  320. height: 36rpx;
  321. position: absolute;
  322. right: 0;
  323. }
  324. }
  325. &-list{
  326. flex: 1;
  327. margin-top: 48rpx;
  328. overflow-y: auto;
  329. &-item{
  330. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #E5E7EB;
  331. width: 100%;
  332. padding: 36rpx 0;
  333. &-left{
  334. &-top{
  335. .name{
  336. font-family: PingFang-SC, PingFang-SC;
  337. font-weight: bold;
  338. font-size: 32rpx;
  339. color: #151B29;
  340. line-height: 32rpx;
  341. }
  342. .sex{
  343. width: 44rpx;
  344. height: 32rpx;
  345. margin-left: 16rpx;
  346. }
  347. .age{
  348. border-radius: 13rpx;
  349. font-family: PingFangSC, PingFang SC;
  350. font-weight: 400;
  351. font-size: 20rpx;
  352. line-height: 24rpx;
  353. padding: 4rpx 10rpx;
  354. margin-left: 13rpx;
  355. &.women{
  356. background: rgba(244,101,122,0.14);
  357. color: #F4657A;
  358. }
  359. &.man{
  360. background: rgba(5,169,254,0.12);
  361. color: #05A9FE;
  362. }
  363. }
  364. }
  365. &-bottom{
  366. font-family: PingFangSC, PingFang SC;
  367. font-weight: 400;
  368. font-size: 24rpx;
  369. color: #989998;
  370. line-height: 24rpx;
  371. margin-top: 23rpx;
  372. }
  373. }
  374. &-right{
  375. image{
  376. width: 36rpx;
  377. height: 36rpx;
  378. }
  379. }
  380. }
  381. }
  382. &-btn{
  383. width: 100%;
  384. height: 90rpx;
  385. background: #B7F358;
  386. border-radius: 45rpx;
  387. font-family: PingFang-SC, PingFang-SC;
  388. font-weight: bold;
  389. font-size: 32rpx;
  390. color: #151B29;
  391. line-height: 90rpx;
  392. text-align: center;
  393. letter-spacing: 2rpx;
  394. margin-top: 20rpx;
  395. }
  396. }
  397. }
  398. .tab_page{
  399. .info{
  400. margin-top: 40rpx;
  401. position: relative;
  402. padding: 0 24rpx 0 16rpx;
  403. &-top{
  404. position: relative;
  405. &-left{
  406. .avatar{
  407. width: 148rpx;
  408. height: 148rpx;
  409. border-radius: 50%;
  410. }
  411. .text{
  412. margin-left: 24rpx;
  413. &-top{
  414. font-family: PingFang-SC, PingFang-SC;
  415. font-weight: bold;
  416. font-size: 40rpx;
  417. color: #151B29;
  418. line-height: 40rpx;
  419. .lv-inline{
  420. display: inline-block;
  421. width: 137rpx;
  422. height: 42rpx;
  423. background: url('https://oss.familydaf.cn/sxsnfile/20251218/b6e6f5b45ad34f91bbaf66c9890fc2cd.png') no-repeat;
  424. background-size: 100% 100%;
  425. font-family: PingFangSC, PingFang SC;
  426. font-weight: 600;
  427. font-size: 26rpx;
  428. color: #FFFFFF;
  429. line-height: 42rpx;
  430. padding-left: 16rpx;
  431. box-sizing: border-box;
  432. vertical-align: middle;
  433. }
  434. }
  435. &-bottom{
  436. font-family: PingFangSC, PingFang SC;
  437. font-weight: 400;
  438. font-size: 26rpx;
  439. color: #151B29;
  440. line-height: 26rpx;
  441. margin-top: 26rpx;
  442. &.lv{
  443. width: 137rpx;
  444. height: 42rpx;
  445. background: url('https://oss.familydaf.cn/sxsnfile/20251218/b6e6f5b45ad34f91bbaf66c9890fc2cd.png') no-repeat;
  446. background-size: 100% 100%;
  447. font-family: PingFangSC, PingFang SC;
  448. font-weight: 600;
  449. font-size: 26rpx;
  450. color: #FFFFFF;
  451. line-height: 38rpx;
  452. padding-left: 16rpx;
  453. box-sizing: border-box;
  454. margin-top: 18rpx;
  455. }
  456. &.no{
  457. font-family: PingFangSC, PingFang SC;
  458. font-weight: 400;
  459. font-size: 26rpx;
  460. color: #657588;
  461. line-height: 26rpx;
  462. }
  463. }
  464. }
  465. }
  466. &-right{
  467. image{
  468. width: 48rpx;
  469. height: 48rpx;
  470. }
  471. }
  472. &-change{
  473. padding: 0 20rpx 0 16rpx;
  474. height: 60rpx;
  475. background: #B7F358;
  476. border-radius: 30rpx 0rpx 0rpx 30rpx;
  477. position: absolute;
  478. top: 24rpx;
  479. right: -48rpx;
  480. image{
  481. width: 32rpx;
  482. height: 32rpx;
  483. }
  484. text{
  485. font-family: PingFang-SC, PingFang-SC;
  486. font-weight: bold;
  487. font-size: 24rpx;
  488. color: #151B29;
  489. line-height: 30rpx;
  490. margin-left: 8rpx;
  491. }
  492. }
  493. }
  494. &-tip{
  495. margin-top: 4rpx;
  496. &-pre{
  497. margin-top: 36rpx;
  498. .left{
  499. font-family: PingFangSC, PingFang SC;
  500. font-weight: 400;
  501. font-size: 28rpx;
  502. color: #252525;
  503. line-height: 28rpx;
  504. }
  505. .right{
  506. image{
  507. width: 32rpx;
  508. height: 32rpx;
  509. }
  510. }
  511. }
  512. }
  513. }
  514. .box{
  515. background: #FFFFFF;
  516. border-radius: 24rpx;
  517. padding: 40rpx 24rpx 36rpx;
  518. margin-top: 20rpx;
  519. position: relative;
  520. &-title{
  521. font-family: PingFang-SC, PingFang-SC;
  522. font-weight: bold;
  523. font-size: 36rpx;
  524. color: #151B29;
  525. line-height: 40rpx;
  526. }
  527. &-card{
  528. margin-top: 72rpx;
  529. &-pre{
  530. width: calc(100% / 3 - 8rpx);
  531. height: 200rpx;
  532. position: relative;
  533. background-size: 100% 100%;
  534. background-repeat: no-repeat;
  535. .top{
  536. width: 82rpx;
  537. height: 82rpx;
  538. position: absolute;
  539. left: 50%;
  540. margin-left: -41rpx;
  541. top: -32rpx;
  542. }
  543. .num{
  544. font-family: DINAlternate, DINAlternate;
  545. font-weight: bold;
  546. font-size: 40rpx;
  547. line-height: 40rpx;
  548. text-align: center;
  549. margin-top: 86rpx;
  550. }
  551. .text{
  552. margin-top: 20rpx;
  553. text{
  554. font-family: PingFangSC, PingFang SC;
  555. font-weight: 400;
  556. font-size: 24rpx;
  557. line-height: 24rpx;
  558. }
  559. image{
  560. width: 26rpx;
  561. height: 26rpx;
  562. margin-left: 6rpx;
  563. }
  564. }
  565. &.red{
  566. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/57acefa1a0084d1e980002e165668bc9.png');
  567. .num,.text text{
  568. color: #FC5768;
  569. }
  570. }
  571. &.purple{
  572. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/e0f97b6ca8864d2ca0c3dc48b07dae58.png');
  573. .num,.text text{
  574. color: #8360E8;
  575. }
  576. }
  577. &.orange{
  578. background-image: url('https://oss.familydaf.cn/sxsnfile/20251218/eabb899f7ab14010b61fb30ed24bd818.png');
  579. .num,.text text{
  580. color: #FF8200;
  581. }
  582. }
  583. }
  584. }
  585. &-achievement{
  586. margin-top: 24rpx;
  587. &-left{
  588. width: 210rpx;
  589. font-family: PingFangSC, PingFang SC;
  590. font-weight: 400;
  591. font-size: 24rpx;
  592. color: #676775;
  593. line-height: 24rpx;
  594. label{
  595. font-weight: bold;
  596. font-size: 32rpx;
  597. color: #EA3044;
  598. line-height: 32rpx;
  599. margin: 0 7rpx;
  600. }
  601. }
  602. &-right{
  603. width: calc(100% - 210rpx);
  604. .jt{
  605. image{
  606. width: 32rpx;
  607. height: 32rpx;
  608. }
  609. }
  610. }
  611. }
  612. &-other{
  613. margin-top: 39rpx;
  614. &-pre{
  615. width: calc(100% / 3);
  616. image{
  617. width: 48rpx;
  618. height: 48rpx;
  619. }
  620. text{
  621. font-family: PingFangSC, PingFang SC;
  622. font-weight: 400;
  623. font-size: 24rpx;
  624. color: #151B29;
  625. line-height: 33rpx;
  626. text-align: center;
  627. margin-top: 16rpx;
  628. }
  629. }
  630. }
  631. }
  632. }
  633. </style>