hookehuyr

✨ feat(幼儿园概况): 样式结构调整

1 <template> 1 <template>
2 - <div class=""></div> 2 + <div class="all-book-page content-bg">
3 + <div class="modify-top"></div>
4 + <div class="belong-school">
5 + <van-image round width="2rem" height="2rem" lazy-load src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngcff89d3955421a988f983d312e970e4f07e08045b33c0505e52c65bb63ac35a9" style="vertical-align: text-bottom;" >
6 + <template v-slot:error>加载失败</template>
7 + </van-image>
8 + <p class="title">杨浦民办科技幼稚园</p>
9 + </div>
10 + <div class="summary">
11 + <div class="ding left"></div>
12 + <div class="wrapper">
13 + <div class="content-box" style="">
14 + <van-row class="van-hairline--bottom">
15 + <van-col span="12" class="van-hairline--right">
16 + <div class="text-box"><span class="text">视频上传</span>&nbsp;24<span style="color: #888888;">/30</span></div>
17 + </van-col>
18 + <van-col span="12">
19 + <div class="text-box"><span class="text">作品总数</span>&nbsp;436</div>
20 + </van-col>
21 + </van-row>
22 + <van-row>
23 + <van-col span="12" class="van-hairline--right">
24 + <div class="text-box"><span class="text">捐书金额</span>&nbsp¥ 235</div>
25 + </van-col>
26 + <van-col span="12">
27 + <div class="text-box"><span class="text">参与人数</span>&nbsp;876</div>
28 + </van-col>
29 + </van-row>
30 + </div>
31 + </div>
32 + <div class="ding right"></div>
33 + </div>
34 + <div class="book-list">
35 + <div class="header van-hairline--bottom">
36 + <van-row>
37 + <van-col span="8" class="left">
38 + <span class="text" style="border-bottom: 2px solid #F9D95C;">所有书籍</span>
39 + </van-col>
40 + <van-col span="8"></van-col>
41 + <van-col span="8" class="right">
42 + <van-icon :name="icon_book" size="0.8rem" style="vertical-align: middle;" />
43 + &nbsp;<span style="vertical-align: middle;">共15种</span>
44 + </van-col>
45 + </van-row>
46 + </div>
47 + <template v-for="(item, key) in items" :key="key">
48 + <book-card :item="item" @on-click="onClick(item)"></book-card>
49 + </template>
50 + </div>
51 + <div style="height: 1rem;"></div>
52 + <shortcut-fixed @on-click="gotoMe()"></shortcut-fixed>
53 + </div>
3 </template> 54 </template>
4 55
5 <script setup> 56 <script setup>
57 +import icon_book from '@images/shu@2x.png'
58 +import MyButton from '@/components/MyButton/index.vue'
59 +import BookCard from '@/components/BookCard/index.vue'
60 +import ShortcutFixed from '@/components/ShortcutFixed/index.vue'
61 +
6 import { ref, reactive, onMounted } from 'vue' 62 import { ref, reactive, onMounted } from 'vue'
7 import { useRoute, useRouter } from 'vue-router' 63 import { useRoute, useRouter } from 'vue-router'
8 import axios from '@/utils/axios'; 64 import axios from '@/utils/axios';
...@@ -10,9 +66,32 @@ import $ from 'jquery' ...@@ -10,9 +66,32 @@ import $ from 'jquery'
10 import { Toast } from 'vant'; 66 import { Toast } from 'vant';
11 const $route = useRoute(); 67 const $route = useRoute();
12 const $router = useRouter(); 68 const $router = useRouter();
13 - 69 +// 自定义按钮颜色样式
70 +const styleObject = reactive({
71 + backgroundColor: '#F4675A',
72 + color: '#FFFFFF',
73 + borderColor: '#F4675A'
74 +})
75 +const items = reactive([])
76 +const onClick = (item) => {
77 + // 调整书籍详情页
78 + $router.push({
79 + path: '/client/bookDetail',
80 + query: {
81 + id: item.id
82 + }
83 + });
84 +}
85 +const gotoMe = () => {
86 + console.warn('跳转我的地址');
87 +}
14 onMounted(() => { 88 onMounted(() => {
15 - 89 + for (let index = 0; index < 20; index++) {
90 + items.push({
91 + id: index,
92 + avatar: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng4bb07576e7df209c1f91dd67e0c2671bd5704366605bc720b56d20b38602c2b7'
93 + })
94 + }
16 }) 95 })
17 </script> 96 </script>
18 97
...@@ -36,5 +115,75 @@ export default { ...@@ -36,5 +115,75 @@ export default {
36 </script> 115 </script>
37 116
38 <style lang="less" scoped> 117 <style lang="less" scoped>
39 - 118 +@import url('@css/content-bg.less');
119 + .all-book-page {
120 + .belong-school {
121 + padding: 1.5rem;
122 + padding-bottom: 0;
123 + .title {
124 + color: #222222;
125 + display: inline-block;
126 + vertical-align: super;
127 + margin-left: 1rem;
128 + }
129 +
130 + }
131 + .summary {
132 + position: relative;
133 + .wrapper {
134 + position: relative;
135 + z-index: 100;
136 + .content-box {
137 + margin: 1rem;
138 + background-color: #FFFFFF;
139 + border-radius: 8px;
140 + text-align: center;
141 + color: #713610;
142 + .text-box {
143 + padding: 1.5rem 1rem;
144 + .text {
145 + color: #222222; border-bottom: 2px solid #F9D95C; font-size: 0.85rem;
146 + }
147 + }
148 + }
149 + }
150 + }
151 + .book-list {
152 + margin: 1rem;
153 + padding-top: 1rem;
154 + border-radius: 10px;
155 + background-color: rgba(255, 255, 255, 1);
156 + box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.13);
157 + .header {
158 + padding: 1rem 0;
159 + margin: 0 1rem;
160 + text-align: center;
161 + vertical-align: middle;
162 + .left {
163 + color: #222222;
164 + font-size: 1.15rem;
165 + }
166 + .right {
167 + color: #888888;
168 + font-size: 0.9rem;
169 + }
170 + }
171 + }
172 + .ding {
173 + z-index: 110;
174 + position: absolute;
175 + top: 7.5rem;
176 + width: 1rem;
177 + height: 3rem;
178 + background-image: url('@images/ding03@2x.png');
179 + background-size: contain;
180 + background-repeat: no-repeat;
181 + &.left {
182 + left: 8rem;
183 + }
184 + &.right {
185 + right: 8rem;
186 + }
187 + }
188 + }
40 </style> 189 </style>
...\ No newline at end of file ...\ No newline at end of file
......