12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <uni-popup ref="passwordPopup" :animation="false" :is-mask-click="false"
- mask-background-color="rgba(0, 0, 0, 0.4)">
- <view class="phone-common-dialog">
- <view class="common-body-box">
- <view class="common-title">二维码</view>
- <img :src="imgSrc" class="code-img"/>
- <view class="common-btn-box">
- <view class="confirm-btn" @click="handleClose">关闭</view>
- </view>
- </view>
- </view>
- </uni-popup>
- </template>
- <script setup>
- import * as myApi from "@/api/my.js";
- import {ref,reactive} from "vue"
- const passwordPopup = ref(null); // 索引
- const imgSrc = ref('');
- // const $emit = defineEmits(['confirm-btn'])
-
- function init(){
- myApi.getGlMineQrcode().then(res => {
- imgSrc.value = res.data;
- })
- }
-
- // 打开弹窗
- function handleShow() {
- init();
- passwordPopup.value.open();
- }
- // 取消
- function handleClose() {
- passwordPopup.value.close();
- }
-
- defineExpose({
- handleShow,
- handleClose
- })
- </script>
- <style>
- </style>
|