hookehuyr

✨ feat(捐赠明细): 新增捐赠明细页面明细

...@@ -2,28 +2,54 @@ ...@@ -2,28 +2,54 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-30 13:51:47 3 * @Date: 2022-05-30 13:51:47
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2022-05-31 11:28:54 5 + * @LastEditTime: 2022-05-31 17:06:26
6 * @FilePath: /tswj/src/views/client/donateList.vue 6 * @FilePath: /tswj/src/views/client/donateList.vue
7 * @Description: 幼儿园捐赠人捐赠金额排行榜 7 * @Description: 幼儿园捐赠人捐赠金额排行榜
8 --> 8 -->
9 <template> 9 <template>
10 - <!-- TODO: 排行榜详情列表 --> 10 + <div class="wrapper">
11 - <!-- src/components/RankingItem/index.vue 到时候使用这一部分,可能有几个学校 --> 11 + <van-row>
12 + <van-col span="20" style="padding: 1rem 0.5rem 1rem 0;">
13 + <div :class="[kgInfo.multi_name ? 'heightHigh' : 'heightLow', 'kg-name']">
14 + <van-row align="center" justify="center" style="position: relative; top: 50%; transform: translateY(-50%);">
15 + <van-col span="4">
16 + <van-image round width="4rem" height="4rem" :src="kgInfo.avatar ? kgInfo.avatar : icon_avatar" style="vertical-align: text-bottom;" />
17 + </van-col>
18 + <van-col span="20">
19 + <div v-if="kgInfo.multi_name" style="margin-left: 1.5rem;">
20 + <p>{{ kgInfo.multi_name[0] }}</p>
21 + <p>{{ kgInfo.multi_name[1] }}</p>
22 + </div>
23 + <p v-else style="margin-left: 1.5rem;">
24 + {{ kgInfo.name }}
25 + </p>
26 + </van-col>
27 + </van-row>
28 + </div>
29 + </van-col>
30 + <van-col span="4">
31 + <div class="flower">
32 + <van-icon :name="icon_flower" color="#c5c5c5" size="1.5rem" style="vertical-align: bottom;" />&nbsp;3000
33 + </div>
34 + </van-col>
35 + </van-row>
36 + </div>
12 <div class="van-hairline--bottom"> 37 <div class="van-hairline--bottom">
13 <van-row style="padding: 0.5rem 1rem;"> 38 <van-row style="padding: 0.5rem 1rem;">
14 <van-col span="4"> 39 <van-col span="4">
15 <van-image v-if="info.avatar" round width="3rem" height="3rem" :src="info.avatar ? info.avatar : icon_avatar" /> 40 <van-image v-if="info.avatar" round width="3rem" height="3rem" :src="info.avatar ? info.avatar : icon_avatar" />
16 </van-col> 41 </van-col>
17 - <van-col span="6" style="line-height: 3rem;"> 42 + <van-col span="16">
18 - <div class="name-info">{{ info.name }}</div> 43 + <div class="name-info" style="position: relative; top: 50%; transform: translateY(-50%);">
44 + <p>{{ info.name }}</p>
45 + <p style="color: #C5C5C5;">2022-05-27</p>
46 + </div>
19 </van-col> 47 </van-col>
20 - <van-col span="14" style="text-align: right; font-size: 0.9rem;"> 48 + <van-col span="4" style="text-align: right; font-size: 1rem;">
21 - <p style="color: #C5C5C5; line-height: 1.5;">2022-05-27</p> 49 + <div style="color: #222222;position: relative; top: 50%; transform: translateY(-50%);">
22 - <p style="color: #222222;"> 50 + <van-icon style="vertical-align: middle;" size="1.25rem" :name="icon_flower" />
23 - <span>《逃家小兔绘本》</span>
24 - <van-icon style="vertical-align: middle;" size="1rem" name="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng73a86b62d29d42c2544d9bbb316217575224457db387ef42182b087764cb1fbd" />
25 <span>&nbsp;x2</span> 51 <span>&nbsp;x2</span>
26 - </p> 52 + </div>
27 </van-col> 53 </van-col>
28 </van-row> 54 </van-row>
29 </div> 55 </div>
...@@ -32,6 +58,7 @@ ...@@ -32,6 +58,7 @@
32 <script setup> 58 <script setup>
33 import { ref } from 'vue' 59 import { ref } from 'vue'
34 import { useRoute, useRouter } from 'vue-router' 60 import { useRoute, useRouter } from 'vue-router'
61 +import icon_flower from '@images/xiaohua@2x.png'
35 62
36 import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js' 63 import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
37 //import { } from '@/utils/generateModules.js' 64 //import { } from '@/utils/generateModules.js'
...@@ -45,8 +72,62 @@ const info = ref({ ...@@ -45,8 +72,62 @@ const info = ref({
45 avatar: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng76a8e87552945e0800cea4e5eb14ff2175cc7816e6acb5c79d714793c82d37f5', 72 avatar: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng76a8e87552945e0800cea4e5eb14ff2175cc7816e6acb5c79d714793c82d37f5',
46 name: '杨妮妮' 73 name: '杨妮妮'
47 }) 74 })
75 +
76 +const kgInfo = ref({
77 + name: '杨浦民办科技幼稚园',
78 + multi_name: '',
79 + avatar: '',
80 +})
81 +// TEMP: 测试数据
82 +// kgInfo.value.name = kgInfo.value.name + ' ' + kgInfo.value.name;
83 +// 有空格分割name
84 +if (kgInfo.value.name.indexOf(' ') > -1) {
85 + kgInfo.value.multi_name = kgInfo.value.name.split(' ');
86 +}
48 </script> 87 </script>
49 88
50 <style lang="less" scoped> 89 <style lang="less" scoped>
90 +.wrapper {
91 + padding: 0 2rem 0 0.5rem;
92 + background-color: #F7F7F7;
93 + position: relative;
94 +
95 + .rank {
96 + position: relative;
97 +
98 + .avatar {
99 + position: absolute;
100 + top: 0;
101 + left: 20%;
102 + }
103 +
104 + .text {
105 + position: absolute;
106 + top: 0.5rem;
107 + left: 40%;
108 + color: #84909F;
109 + }
110 + }
111 +
112 + .flower {
113 + text-align: center;
114 + position: absolute;
115 + top: 40%;
116 + color: #713610;
117 + font-size: 1.25rem;
118 + }
119 +
120 + .kg-name {
121 + position: relative;
122 + height: 3rem;
123 + }
124 +
125 + .heightLow {
126 + height: 3rem;
127 + }
51 128
129 + .heightHigh {
130 + height: 6rem;
131 + }
132 +}
52 </style> 133 </style>
......