yangys
2025-05-27 81060ec4cc3ead9080d4bdb3875920e257583de4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<template>
  <el-dialog
    center
    :show-close="false"
    :close-on-press-escape="false"
    :close-on-click-modal="false"
    append-to-body
    v-model="dialogVisible"
    title="人机识别"
    width="400px"
  >
    <center>
      <span>
        扫码下方二维码,回复<b>【验证码】</b><br />
        <span style="color: red">获得「验证码 + 交流群(一起摸🐟)」</span>
      </span>
      <br />
      <br />
      <img width="200" src="https://avuejs.com/images/icon/wechat.png" />
      <br />
      <br />
      <el-input v-model="value" placeholder="请输入验证码"></el-input>
    </center>
    <template #footer>
      <span class="dialog-footer">
        <el-button type="primary" @click="submit">确 认</el-button>
      </span>
    </template>
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      value: '',
      dialogVisible: false,
    };
  },
  created() {
    if (window.localStorage.getItem('avue_lock')) {
      return;
    }
    this.dialogVisible = true;
  },
  methods: {
    submit() {
      if (this.value == '') {
        this.$message.error('验证码不能为空');
        return;
      } else if (this.value != 'avue') {
        this.$message.error('验证码不正确');
        return;
      }
      this.dialogVisible = false;
      window.localStorage.setItem('avue_lock', true);
    },
  },
};
</script>