<template>
  <el-dialog title="签约码" width="350px" v-model="visible">
    <div class="wrap">
      <el-image :src="url" style="width: 200px;height: 200px;"></el-image>
      <el-text>请前往{{ type == 1 ? '支付宝' : '微信' }}进行扫码</el-text>
    </div>
  </el-dialog>
</template>

<script setup>
import { ref } from 'vue'

const visible = ref(false)

const url = ref('')
const type = ref(1)

function show(url, type) {
  visible.value = true
  url.value = url
  type.value = type
}

defineExpose({
  show
})
</script>

<style scoped lang="scss">
.wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 24px;
}
</style>