Showing
1 changed file
with
23 additions
and
1 deletions
| ... | @@ -49,7 +49,7 @@ | ... | @@ -49,7 +49,7 @@ |
| 49 | </div> | 49 | </div> |
| 50 | <div> | 50 | <div> |
| 51 | <my-button v-if="userInfo.status === 'enable'" type="custom" :custom-style="styleObject2" @on-click="handleUser('ADD')">新增儿童</my-button> | 51 | <my-button v-if="userInfo.status === 'enable'" type="custom" :custom-style="styleObject2" @on-click="handleUser('ADD')">新增儿童</my-button> |
| 52 | - <my-button v-else type="custom" :custom-style="styleObject4">新增儿童</my-button> | 52 | + <my-button v-else type="custom" :custom-style="styleObject4" @on-click="showNotice = true">新增儿童</my-button> |
| 53 | </div> | 53 | </div> |
| 54 | </div> | 54 | </div> |
| 55 | 55 | ||
| ... | @@ -67,6 +67,14 @@ | ... | @@ -67,6 +67,14 @@ |
| 67 | </div> | 67 | </div> |
| 68 | 68 | ||
| 69 | <van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" /> | 69 | <van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" /> |
| 70 | + | ||
| 71 | + <!-- 如果没有实名认证,新增儿童提示弹框 --> | ||
| 72 | + <notice-overlay :show="showNotice" text="前往认证" @on-submit="onSubmit" @on-close="onClose"> | ||
| 73 | + <div style="color: #333333;"> | ||
| 74 | + <p>您还没有实名认证</p> | ||
| 75 | + <p>请前往个人中心进行实名认证</p> | ||
| 76 | + </div> | ||
| 77 | + </notice-overlay> | ||
| 70 | </template> | 78 | </template> |
| 71 | 79 | ||
| 72 | <script setup> | 80 | <script setup> |
| ... | @@ -75,6 +83,7 @@ import { mainStore } from '@/store' | ... | @@ -75,6 +83,7 @@ import { mainStore } from '@/store' |
| 75 | import icon_avatar from '@images/que-touxiang@2x.png' | 83 | import icon_avatar from '@images/que-touxiang@2x.png' |
| 76 | 84 | ||
| 77 | import MyButton from '@/components/MyButton/index.vue' | 85 | import MyButton from '@/components/MyButton/index.vue' |
| 86 | +import NoticeOverlay from '@/components/NoticeOverlay/index.vue' | ||
| 78 | 87 | ||
| 79 | import { ref, reactive, onMounted } from 'vue' | 88 | import { ref, reactive, onMounted } from 'vue' |
| 80 | import { onBeforeRouteLeave, useRoute, useRouter } from 'vue-router' | 89 | import { onBeforeRouteLeave, useRoute, useRouter } from 'vue-router' |
| ... | @@ -247,6 +256,19 @@ const goTo = (path) => { | ... | @@ -247,6 +256,19 @@ const goTo = (path) => { |
| 247 | } | 256 | } |
| 248 | }) | 257 | }) |
| 249 | } | 258 | } |
| 259 | + | ||
| 260 | +// 未实名认证提示 | ||
| 261 | +const showNotice = ref(false) | ||
| 262 | +const onClose = () => { // 关闭提示框回调 | ||
| 263 | + showNotice.value = false; | ||
| 264 | +} | ||
| 265 | +// 跳转个人中心 | ||
| 266 | +const onSubmit = () => { | ||
| 267 | + $router.push({ | ||
| 268 | + path: '/me/verifyUser' | ||
| 269 | + }); | ||
| 270 | +} | ||
| 271 | + | ||
| 250 | // 新增/编辑儿童信息 | 272 | // 新增/编辑儿童信息 |
| 251 | const handleUser = (type) => { | 273 | const handleUser = (type) => { |
| 252 | if (type === 'ADD') { | 274 | if (type === 'ADD') { | ... | ... |
-
Please register or login to post a comment