Vuetify —— 使用步骤条组件 v-stepper

这是一个关于微信扫码绑定的用户界面组件展示。用户首先通过微信扫码进行第一步验证,如果扫码成功,将显示扫码成功提示;若二维码过期,则提供刷新选项;绑定失败时,用户可以尝试重新绑定。第二步是确认微信账号绑定,展示用户头像和昵称,并提供完成绑定和返回上一步的按钮。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述

<template>
  <div>
    <v-card elevation="0" style="border:1px solid #EAEBEE">
      <v-card-title class="text-body-1 mx-2" style="height:70px"
        >绑定</v-card-title
      >
      <v-divider></v-divider>
      <v-stepper v-model="e1">
        <v-stepper-header>
          <v-stepper-step :complete="e1 > 1" step="1">
            步骤1
          </v-stepper-step>

          <v-divider style="flex:1"></v-divider>

          <v-stepper-step :complete="e1 > 2" step="2">
            步骤2
          </v-stepper-step>
        </v-stepper-header>

        <v-stepper-items class="py-8">
          <v-stepper-content step="1">
            <v-card elevation="0" height="260" class="mb-10">
              <!-- 微信二维码展示 -->
              <!-- WECHAT_RZKC登录 -->
              <div class="d-flex flex-column align-center">
                <div class="darken-3 mb-4 text-center">
                  微信扫码绑定
                </div>
                <div style="position:relative;">
                  <!-- 扫码成功 -->
                  <div
                    v-if="scanSuccess"
                    class="px-1 py-1 text-caption d-flex flex-column justify-center"
                    style="width:160px;height:160px;overflow:hidden;background:#fff;opacity:.9;border:1px solid #000;position:absolute;top:0;left:0"
                  >
                    <v-icon size="50" color="#07c160">mdi-check-circle</v-icon>
                    <div class="text-center text-button">
                      扫码成功
                    </div>
                  </div>
                  <!-- 二维码已过期 -->
                  <div
                    v-if="isValid"
                    class="px-1 py-1 text-caption d-flex flex-column justify-center"
                    style="width:160px;height:160px;overflow:hidden;background:#fff;opacity:.9;border:1px solid #000;position:absolute;top:0;left:0"
                  >
                    <v-icon size="50" color="#F5A623">mdi-alert-circle</v-icon>
                    <div class="text-center text-button mt-2">
                      二维码已过期
                      <span
                        @click="toRefresh"
                        class="blue--text"
                        style="cursor: pointer;"
                        >刷新</span
                      >
                    </div>
                  </div>
                  <!-- 绑定失败  -->
                  <div
                    v-if="rzkcCode"
                    class="px-1 py-1 text-caption d-flex flex-column justify-center"
                    style="width:160px;height:160px;overflow:hidden;background:#fff;opacity:.9;border:1px solid #000;position:absolute;top:0;left:0"
                  >
                    <v-icon size="50" color="#F5A623">mdi-alert-circle</v-icon>
                    <div class="text-center text-button mt-2">
                      绑定失败
                      <span
                        @click="toRefresh"
                        class="blue--text"
                        style="cursor: pointer;"
                        >再试一次</span
                      >
                    </div>
                  </div>
                  <div
                    class="px-1 py-1 text-caption d-flex flex-row justify-center"
                    style="width:160px;height:160px;overflow:hidden;border:1px solid #000;background:#fff;"
                    id="wechat_code"
                    ref="wechat_code"
                  ></div>
                </div>

                <div
                  class="mt-2 d-flex flex-row justify-center"
                  style="color:#777;"
                >
                  请使用微信扫码
                </div>
              </div>
            </v-card>
          </v-stepper-content>

          <v-stepper-content step="2">
            <v-card elevation="0" class="mb-10" height="260px">
              <div class="d-flex flex-column align-center">
                <div class="text-center">
                  微信账号绑定
                </div>
                <v-sheet
                  color="white"
                  elevation="2"
                  height="80"
                  width="80"
                  class="mt-4 rounded-circle"
                >
                  <v-img
                    contain
                    width="80"
                    height="80"
                    class="rounded-circle"
                    :src="
                      headimgurl == null
                        ? require('@/assets/avatar.png')
                        : headimgurl
                    "
                  ></v-img>
                </v-sheet>
                <div
                  class=" mt-6 text-subtitle-1 text-center"
                  v-if="login_name || nickname || fullname"
                >
                  你好,{{ login_name || nickname || fullname }}
                </div>
                <div class="mt-6 text-subtitle-1 text-center">
                  <div>你即将绑定此微信账号</div>
                  <div>后续可以使用此微信账号登录</div>
                </div>
              </div>
            </v-card>
            <div class="d-flex justify-center">
              <v-btn color="primary" @click="doBind">
                完成
              </v-btn>

              <v-btn class="ml-4" text @click="cancelBind">
                上一步
              </v-btn>
            </div>
          </v-stepper-content>
        </v-stepper-items>
      </v-stepper>
    </v-card>
  </div>
</template>

export default {
  name: "Binding",
  data() {
    return {
      e1: "1"
    };
  }
};
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值