achievement.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. <template>
  2. <view class="common_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="我的成就" bgColor="transparent"></cus-header>
  4. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/8dbf51e7-85cb-496a-b3d0-d5816fa8ff34.png" class="top_bg_img" mode="widthFix"></image>
  5. <div class="info">
  6. <div class="info-top adfac">
  7. <image class="avatar" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/5dded84d-8594-4bbe-9204-c693098e7532.png"></image>
  8. <div class="name">Hi~ {{'周晓瑾'}}</div>
  9. <div class="level adfac"><text>LV</text><text>{{'04'}}</text></div>
  10. </div>
  11. <div class="info-num">收获勋章:{{3}} <text>枚</text></div>
  12. <div class="info-memo">共参与<text>{{8}}</text>次公益活动,累计义工时长<text>{{88}}</text>小时</div>
  13. </div>
  14. <div class="tab adfacjc">
  15. <div class="tab-pre" :class="{'active':tidx===''}" @tap="changeTab('')">全部</div>
  16. <div class="tab-pre" :class="{'active':tidx===1}" @tap="changeTab(1)">已获得</div>
  17. </div>
  18. <div class="list">
  19. <div class="list-pre adffcac" v-for="(item,index) in list" :key="index" @tap="showSz(item)">
  20. <image :src="item.img"></image>
  21. <div class="p">{{item.title}}</div>
  22. <div class="p tip">{{item.date?(item.date+'点亮'):'未获得'}}</div>
  23. </div>
  24. </div>
  25. <div class="btn" @tap="showSave">晒出我的成就</div>
  26. <div class="dialog adffcac" :style="{'height':'calc(100vh - '+mt+')px', 'top':mt+'px'}" v-if="xzShow">
  27. <div class="title">"恭喜您获得荣誉勋章"</div>
  28. <div class="img adfacjc">
  29. <image :src="xzInfo.img"></image>
  30. </div>
  31. <div class="name adfac">
  32. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/902a8c25-9961-48fd-b869-8fd1ac47b271.png"></image>
  33. <text>{{xzInfo.title}}</text>
  34. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/0f48d5d2-2961-4d95-9bf9-148b7f615227.png"></image>
  35. </div>
  36. <div class="heartnum">累计捐赠爱心值{{xzInfo.heartnum||10000}}</div>
  37. <div class="date">{{xzInfo.date}}获得</div>
  38. <div class="btn adfacjc">
  39. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/4e76f71e-cd46-4380-8437-04b83eec40f3.png"></image>
  40. <text>炫耀一下</text>
  41. </div>
  42. <image class="close" @tap="xzShow=false;xzInfo=null" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/34582f76-ea26-4e83-8172-e1f81c0634aa.png"></image>
  43. </div>
  44. <div class="save adffcacjc" :style="{'height':'calc(100vh - '+mt+')px', 'top':mt+'px'}" v-if="saveShow">
  45. <div class="box">
  46. <image class="close" @tap="saveShow=false" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/d1bbde08-3c0f-44bb-bed6-a6c3fce72aa2.png"></image>
  47. <div class="top adfac">
  48. <image :src="'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/98671459-4599-44d2-a5ca-bb8200d42436.png'"></image>
  49. <text>{{'周晓瑾'}}的公益勋章墙</text>
  50. </div>
  51. <div class="num"><text>{{4}}</text> 枚公益勋章</div>
  52. <div class="xzimgs adfac">
  53. <div class="imgbox">
  54. <scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation="true">
  55. <view class="scroll-view-item_H" v-for="(item,index) in xzImgList" :key="index">
  56. <view class="cl_item">
  57. <image :src="item"></image>
  58. </view>
  59. </view>
  60. </scroll-view>
  61. </div>
  62. </div>
  63. <div class="bottom adfacjb">
  64. <div class="left adfac">
  65. <div class="img">
  66. <image src=""></image>
  67. </div>
  68. <div class="texts adffc">
  69. <text>扫描二维码</text>
  70. <text>查看你的公益勋章</text>
  71. </div>
  72. </div>
  73. <div class="right">善行少年</div>
  74. </div>
  75. </div>
  76. <div class="text">长按图片,保存到手机</div>
  77. </div>
  78. </view>
  79. </template>
  80. <script setup name="">
  81. import CusHeader from '@/components/CusHeader/index.vue'
  82. import { ref, onMounted } from 'vue'
  83. const tidx = ref('')
  84. const originData = ref([
  85. {
  86. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  87. title:'公益萌新',
  88. date:'2025-07-30'
  89. },
  90. {
  91. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  92. title:'黄金公益',
  93. date:''
  94. },
  95. {
  96. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  97. title:'公益萌新',
  98. date:'2025-07-30'
  99. },
  100. {
  101. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  102. title:'黄金公益',
  103. date:''
  104. },
  105. {
  106. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  107. title:'公益萌新',
  108. date:'2025-07-30'
  109. },
  110. {
  111. img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  112. title:'黄金公益',
  113. date:''
  114. },
  115. ])
  116. const list = ref([])
  117. const xzShow = ref(false)
  118. const xzInfo = ref(null)
  119. const saveShow = ref(false)
  120. const xzImgList = ref([
  121. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  122. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  123. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  124. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  125. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
  126. 'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
  127. ])
  128. const changeTab = type => {
  129. tidx.value = type;
  130. let yhd = originData.value.filter(d=>d.date);
  131. list.value = JSON.parse(JSON.stringify(type?yhd:originData.value));
  132. }
  133. const showSz = item => {
  134. if(!item.date) return
  135. xzInfo.value = item;
  136. xzShow.value = true;
  137. }
  138. const showSave = () => {
  139. saveShow.value = true;
  140. }
  141. onMounted(()=>{
  142. list.value = JSON.parse(JSON.stringify(originData.value));
  143. })
  144. </script>
  145. <style scoped lang="scss">
  146. .scroll-view_H {
  147. white-space: nowrap;
  148. width: 100%;
  149. }
  150. .scroll-view-item_H {
  151. display: inline-block;
  152. width: 111rpx;
  153. height: 100%;
  154. margin-left: 23rpx;
  155. &:first-child{
  156. margin-left: 0;
  157. }
  158. }
  159. .common_page{
  160. background: #FFFFFF;
  161. overflow: hidden;
  162. .info{
  163. position: relative;
  164. margin-top: 31rpx;
  165. &-top{
  166. .avatar{
  167. width: 98rpx;
  168. height: 98rpx;
  169. }
  170. .name{
  171. font-family: PingFang-SC, PingFang-SC;
  172. font-weight: bold;
  173. font-size: 32rpx;
  174. color: #252525;
  175. line-height: 54rpx;
  176. margin-left: 15rpx;
  177. }
  178. .level{
  179. width: 137rpx;
  180. height: 42rpx;
  181. background: url('https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/acff6d97-0292-4d2d-9663-9761ac76ba3a.png') no-repeat;
  182. background-size: 100% 100%;
  183. margin-left: 20rpx;
  184. text{
  185. font-family: PingFangSC, PingFang SC;
  186. font-weight: 600;
  187. font-size: 26rpx;
  188. color: #FFFFFF;
  189. line-height: 26rpx;
  190. margin-left: 16rpx;
  191. }
  192. }
  193. }
  194. &-num{
  195. font-family: PingFang-SC, PingFang-SC;
  196. font-weight: bold;
  197. font-size: 44rpx;
  198. color: #252525;
  199. line-height: 48rpx;
  200. margin-top: 24rpx;
  201. text{
  202. font-weight: 400;
  203. font-size: 24rpx;
  204. line-height: 40rpx;
  205. }
  206. }
  207. &-memo{
  208. margin-top: 29rpx;
  209. font-family: PingFangSC, PingFang SC;
  210. font-weight: 400;
  211. font-size: 28rpx;
  212. color: #252525;
  213. line-height: 28rpx;
  214. text{
  215. font-weight: bold;
  216. margin: 0 10rpx;
  217. }
  218. }
  219. }
  220. .tab{
  221. position: relative;
  222. margin-top: 92rpx;
  223. &-pre{
  224. padding: 0 65rpx;
  225. font-family: PingFangSC, PingFang SC;
  226. font-weight: 400;
  227. font-size: 32rpx;
  228. color: #676775;
  229. line-height: 48rpx;
  230. position: relative;
  231. &.active{
  232. font-weight: bold;
  233. font-size: 36rpx;
  234. color: #252525;
  235. &::after{
  236. content: '';
  237. width: 42rpx;
  238. height: 6rpx;
  239. background: #77F99B;
  240. border-radius: 3rpx;
  241. position: absolute;
  242. left: 50%;
  243. margin-left: -21rpx;
  244. bottom: -15rpx;
  245. }
  246. }
  247. }
  248. }
  249. .list{
  250. margin-left: -60rpx;
  251. overflow: hidden;
  252. &-pre{
  253. width: calc(100% / 3 - 60rpx);
  254. margin-top: 48rpx;
  255. float: left;
  256. margin-left: 60rpx;
  257. image{
  258. width: 180rpx;
  259. height: 176rpx;
  260. }
  261. .p{
  262. font-family: PingFang-SC, PingFang-SC;
  263. font-weight: bold;
  264. font-size: 28rpx;
  265. color: #252525;
  266. line-height: 28rpx;
  267. text-align: center;
  268. margin-top: 24rpx;
  269. &.tip{
  270. font-weight: 400;
  271. font-size: 24rpx;
  272. color: #676775;
  273. line-height: 24rpx;
  274. }
  275. }
  276. }
  277. }
  278. .btn{
  279. width: 100%;
  280. height: 90rpx;
  281. background: #B7F358;
  282. border-radius: 45rpx;
  283. font-family: PingFang-SC, PingFang-SC;
  284. font-weight: bold;
  285. font-size: 32rpx;
  286. color: #151B29;
  287. line-height: 90rpx;
  288. text-align: center;
  289. letter-spacing: 2rpx;
  290. margin-top: 60rpx;
  291. }
  292. .dialog{
  293. position: fixed;
  294. left: 0;
  295. right: 0;
  296. top: 0;
  297. bottom: 0;
  298. background: #252525;
  299. .title{
  300. font-family: FZZCHJW--GB1, FZZCHJW--GB1;
  301. font-weight: normal;
  302. font-size: 36rpx;
  303. color: #FDE2B2;
  304. line-height: 44rpx;
  305. text-align: center;
  306. margin-top: 113rpx;
  307. }
  308. .img{
  309. width: 567rpx;
  310. height: 496rpx;
  311. background: url('https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/e8c96426-1d12-47f1-a105-1fb2f6bf3a19.png') no-repeat;
  312. background-size: 100% 100%;
  313. margin-top: 27rpx;
  314. image{
  315. width: 279rpx;
  316. height: 275rpx;
  317. }
  318. }
  319. .name{
  320. margin-top: 18rpx;
  321. image{
  322. width: 53rpx;
  323. height: 67rpx;
  324. }
  325. text{
  326. font-family: FZZCHJW--GB1, FZZCHJW--GB1;
  327. font-weight: normal;
  328. font-size: 64rpx;
  329. color: #FDE2B2;
  330. line-height: 77rpx;
  331. text-align: center;
  332. }
  333. }
  334. .heartnum{
  335. font-family: PingFangSC, PingFang SC;
  336. font-weight: 400;
  337. font-size: 26rpx;
  338. color: #FDE2B2;
  339. line-height: 37rpx;
  340. text-align: center;
  341. margin-top: 13rpx;
  342. }
  343. .date{
  344. font-family: PingFangSC, PingFang SC;
  345. font-weight: 400;
  346. font-size: 26rpx;
  347. color: #B2AB95;
  348. line-height: 37rpx;
  349. text-align: center;
  350. margin-top: 13rpx;
  351. }
  352. .btn{
  353. width: 368rpx;
  354. height: 88rpx;
  355. background: linear-gradient( 270deg, #F8D7AC 0%, #FEFAD9 100%);
  356. border-radius: 44rpx;
  357. margin-top: 89rpx;
  358. image{
  359. width: 30rpx;
  360. height: 25rpx;
  361. }
  362. text{
  363. font-family: PingFang-SC, PingFang-SC;
  364. font-weight: bold;
  365. font-size: 32rpx;
  366. color: #252525;
  367. line-height: 45rpx;
  368. margin-left: 14rpx;
  369. }
  370. }
  371. .close{
  372. width: 48rpx;
  373. height: 48rpx;
  374. margin-top: 73rpx;
  375. }
  376. }
  377. .save{
  378. position: fixed;
  379. left: 0;
  380. right: 0;
  381. bottom: 0;
  382. background: rgba(0, 0, 0, .8);
  383. .box{
  384. width: calc(100% - 128rpx);
  385. padding: 34rpx 36rpx 28rpx;
  386. box-sizing: border-box;
  387. background: url('https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/bfdff5f5-e57f-4deb-8359-b12a0a6ee7dd.png') no-repeat;
  388. background-size: 100% 100%;
  389. position: relative;
  390. .close{
  391. width: 48rpx;
  392. height: 48rpx;
  393. position: absolute;
  394. top: 0;
  395. right: 0;
  396. }
  397. .top{
  398. image{
  399. width: 90rpx;
  400. height: 90rpx;
  401. }
  402. text{
  403. font-family: PingFang-SC, PingFang-SC;
  404. font-weight: bold;
  405. font-size: 32rpx;
  406. color: #FAE5B9;
  407. line-height: 45rpx;
  408. margin-left: 18rpx;
  409. }
  410. }
  411. .num{
  412. margin-top: 10rpx;
  413. font-family: PingFangSC, PingFang SC;
  414. font-weight: 400;
  415. font-size: 28rpx;
  416. color: #FFFFFF;
  417. line-height: 40rpx;
  418. text{
  419. font-weight: bold;
  420. font-size: 40rpx;
  421. color: #FAE5B9;
  422. line-height: 56rpx;
  423. }
  424. }
  425. .xzimgs{
  426. margin-top: 48rpx;
  427. width: 100%;
  428. height: 328rpx;
  429. background: #222632;
  430. border-radius: 16rpx;
  431. padding: 0 26rpx;
  432. box-sizing: border-box;
  433. .imgbox{
  434. width: 100%;
  435. height: 111rpx;
  436. .cl_item{
  437. width: 111rpx;
  438. height: 111rpx;
  439. image{
  440. width: 100%;
  441. height: 100%;
  442. }
  443. }
  444. }
  445. }
  446. .bottom{
  447. margin-top: 26rpx;
  448. .left{
  449. .img{
  450. width: 100rpx;
  451. height: 100rpx;
  452. image{
  453. width: 100%;
  454. height: 100%;
  455. }
  456. }
  457. .texts{
  458. margin-left: 24rpx;
  459. text{
  460. font-family: PingFangSC, PingFang SC;
  461. font-weight: 400;
  462. font-size: 20rpx;
  463. color: #FFFFFF;
  464. line-height: 20rpx;
  465. &:last-child{
  466. margin-top: 20rpx;
  467. }
  468. }
  469. }
  470. }
  471. .right{
  472. font-family: kuaikanshijieti;
  473. font-size: 22rpx;
  474. color: #FFFFFF;
  475. line-height: 38rpx;
  476. font-style: italic;
  477. }
  478. }
  479. }
  480. .text{
  481. font-family: PingFangSC, PingFang SC;
  482. font-weight: 400;
  483. font-size: 28rpx;
  484. color: #FFFFFF;
  485. line-height: 40rpx;
  486. text-align: center;
  487. margin-top: 44rpx;
  488. }
  489. }
  490. }
  491. </style>