| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <template>
- <popup
- v-model:show="showValue"
- round
- teleport="body"
- :z-index="20000"
- class="proxy-auth-popup"
- >
- <!-- :close-on-click-overlay="false" -->
- <div class="proxy-auth-popup__body">
- <img class="proxy-auth-popup__icon" src="@/assets/img/agricultural/proxies.png" alt="" />
- <div class="proxy-auth-popup__title">开启信息更新授权</div>
- <div class="proxy-auth-popup__desc">
- 授权<span>「{{ serviceName }}」</span>帮助您更新生育期/物候期信息
- </div>
- <div class="proxy-auth-popup__tip">
- 每次修改都需您确认,农服提交后,会推送给您确认,您
- <span>同意</span>
- 后才可生效
- </div>
- <div class="proxy-auth-popup__actions">
- <div class="proxy-auth-popup__btn proxy-auth-popup__btn--ghost" @click="handleReject">
- 不同意
- </div>
- <div class="proxy-auth-popup__btn proxy-auth-popup__btn--primary" @click="handleAllow">
- 同意
- </div>
- </div>
- </div>
- </popup>
- </template>
- <script setup>
- import { computed } from "vue";
- import { Popup } from "vant";
- const props = defineProps({
- show: {
- type: Boolean,
- default: false,
- },
- /** 农服名称,后续由接口赋值 */
- serviceName: {
- type: String,
- default: "农服名称",
- },
- });
- const emit = defineEmits(["update:show", "reject", "allow"]);
- const showValue = computed({
- get: () => props.show,
- set: (val) => emit("update:show", val),
- });
- const handleReject = () => {
- emit("reject");
- showValue.value = false;
- };
- const handleAllow = () => {
- emit("allow");
- showValue.value = false;
- };
- </script>
- <style scoped lang="scss">
- .proxy-auth-popup {
- width: 300px;
- overflow: visible;
- background: linear-gradient(180deg, #d6ecff 0%, #ffffff 42%);
- &__body {
- padding: 20px;
- text-align: center;
- box-sizing: border-box;
- }
- &__icon {
- display: block;
- width: 73px;
- height: 73px;
- margin: 0 auto 10px;
- object-fit: contain;
- }
- &__title {
- color: #1a1a1a;
- font-size: 20px;
- font-weight: 500;
- line-height: 34px;
- }
- &__desc {
- margin-top: 10px;
- color: #000000;
- font-size: 16px;
- line-height: 24px;
- text-align: left;
- span {
- color: #2199F8;
- font-weight: 500;
- }
- }
- &__tip {
- margin-top: 10px;
- padding: 5px 10px;
- border-radius: 5px;
- background: rgba(174, 174, 174, 0.16);
- color: #5C5C5C;
- font-size: 12px;
- line-height: 20px;
- text-align: left;
- span {
- color: #2199f8;
- }
- }
- &__actions {
- display: flex;
- justify-content: space-between;
- gap: 12px;
- margin-top: 20px;
- }
- &__btn {
- height: 40px;
- line-height: 40px;
- border-radius: 25px;
- font-size: 16px;
- text-align: center;
- box-sizing: border-box;
- padding: 0 38px;
- &--ghost {
- background: rgba(236, 236, 236, 0.5);
- color: rgba(0, 0, 0, 0.6);
- }
- &--primary {
- background: #2199f8;
- color: #fff;
- }
- }
- }
- </style>
|