Commit d8b0c06322933f319c693551ccd93716a6eaddf6
1 parent
ae89ec64
分类指南添加图片;用户和其他角色查看的用户指南图片不同
Showing
4 changed files
with
72 additions
and
4 deletions
garbage-removal/src/pages.json
| @@ -86,6 +86,14 @@ | @@ -86,6 +86,14 @@ | ||
| 86 | "navigationBarBackgroundColor": "#19a97c", | 86 | "navigationBarBackgroundColor": "#19a97c", |
| 87 | "enablePullDownRefresh": false | 87 | "enablePullDownRefresh": false |
| 88 | } | 88 | } |
| 89 | + },{ | ||
| 90 | + "path": "type-guide/index", | ||
| 91 | + "style": { | ||
| 92 | + "navigationBarTitleText": "分类指南", | ||
| 93 | + "navigationBarTextStyle": "white", | ||
| 94 | + "navigationBarBackgroundColor": "#19a97c", | ||
| 95 | + "enablePullDownRefresh": false | ||
| 96 | + } | ||
| 89 | } | 97 | } |
| 90 | ] | 98 | ] |
| 91 | },{ | 99 | },{ |
garbage-removal/src/pages/home-info/type-guide/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="type-guide"> | ||
| 3 | + <image :src="imageUrl"></image> | ||
| 4 | + </view> | ||
| 5 | + </template> | ||
| 6 | + | ||
| 7 | + <script setup> | ||
| 8 | + const imageUrl = import.meta.env.VITE_BASE_URL + "/type-guide.png"; | ||
| 9 | + </script> | ||
| 10 | + | ||
| 11 | + <style lang="scss" scoped> | ||
| 12 | + .type-guide { | ||
| 13 | + width: 100%; | ||
| 14 | + height: 100%; | ||
| 15 | + display: flex; | ||
| 16 | + justify-content: center; | ||
| 17 | + box-sizing: border-box; | ||
| 18 | + background-color: white; | ||
| 19 | + padding-top: 20rpx; | ||
| 20 | + | ||
| 21 | + image { | ||
| 22 | + background-size: 100% 100%; | ||
| 23 | + width: 750rpx; | ||
| 24 | + height: 4494rpx; | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | + </style> | ||
| 28 | + | ||
| 0 | \ No newline at end of file | 29 | \ No newline at end of file |
garbage-removal/src/pages/home-info/user-guide/index.vue
| 1 | <template> | 1 | <template> |
| 2 | - <view class="user-guide"> | 2 | + <view class="user-guide1" v-if="userType=='用户'"> |
| 3 | + <image :src="imageUrl1" ></image> | ||
| 4 | + </view> | ||
| 5 | + | ||
| 6 | + <view class="user-guide" v-else> | ||
| 3 | <image :src="imageUrl"></image> | 7 | <image :src="imageUrl"></image> |
| 4 | </view> | 8 | </view> |
| 9 | + | ||
| 5 | </template> | 10 | </template> |
| 6 | 11 | ||
| 7 | <script setup> | 12 | <script setup> |
| 8 | -const imageUrl = import.meta.env.VITE_BASE_URL + "/user-guide.png"; | 13 | + import { useMainStore } from "@/stores/index.js"; |
| 14 | + import { computed } from 'vue'; | ||
| 15 | + | ||
| 16 | + const mainStore = useMainStore() | ||
| 17 | + const userType = computed(() => mainStore.userType); | ||
| 18 | + const imageUrl1 = import.meta.env.VITE_BASE_URL + "/user-guide1.png"; | ||
| 19 | + const imageUrl = import.meta.env.VITE_BASE_URL + "/user-guide.png"; | ||
| 20 | + | ||
| 9 | </script> | 21 | </script> |
| 10 | 22 | ||
| 11 | <style lang="scss" scoped> | 23 | <style lang="scss" scoped> |
| @@ -16,10 +28,28 @@ const imageUrl = import.meta.env.VITE_BASE_URL + "/user-guide.png"; | @@ -16,10 +28,28 @@ const imageUrl = import.meta.env.VITE_BASE_URL + "/user-guide.png"; | ||
| 16 | background-color: white; | 28 | background-color: white; |
| 17 | padding-top: 20rpx; | 29 | padding-top: 20rpx; |
| 18 | 30 | ||
| 31 | + display: flex; | ||
| 32 | + justify-content: center; | ||
| 19 | image { | 33 | image { |
| 20 | background-size: 100% 100%; | 34 | background-size: 100% 100%; |
| 21 | - width: 100%; | 35 | + width: 750rpx; |
| 22 | height: 4000rpx; | 36 | height: 4000rpx; |
| 23 | } | 37 | } |
| 24 | } | 38 | } |
| 39 | + | ||
| 40 | +.user-guide1{ | ||
| 41 | + width: 100%; | ||
| 42 | + height: 100%; | ||
| 43 | + box-sizing: border-box; | ||
| 44 | + background-color: white; | ||
| 45 | + padding-top: 20rpx; | ||
| 46 | + | ||
| 47 | + display: flex; | ||
| 48 | + justify-content: center; | ||
| 49 | + image { | ||
| 50 | + background-size: 100% 100%; | ||
| 51 | + width: 750rpx; | ||
| 52 | + height: 2772rpx; | ||
| 53 | + } | ||
| 54 | +} | ||
| 25 | </style> | 55 | </style> |
garbage-removal/src/pages/home/index.vue
| @@ -241,7 +241,9 @@ const handlerCLickInfoBox = (val) => { | @@ -241,7 +241,9 @@ const handlerCLickInfoBox = (val) => { | ||
| 241 | case '用户指南': | 241 | case '用户指南': |
| 242 | uni.$u.route('/pages/home-info/user-guide/index') | 242 | uni.$u.route('/pages/home-info/user-guide/index') |
| 243 | break; | 243 | break; |
| 244 | - | 244 | + case '分类指南': |
| 245 | + uni.$u.route('/pages/home-info/type-guide/index') | ||
| 246 | + break; | ||
| 245 | default: | 247 | default: |
| 246 | break; | 248 | break; |
| 247 | } | 249 | } |