首页 > 其他分享 >前端Vue自定义验证码密码登录切换tabs选项卡标签栏标题栏 验证码登录模版 密码登录模版

前端Vue自定义验证码密码登录切换tabs选项卡标签栏标题栏 验证码登录模版 密码登录模版

时间:2023-06-27 09:33:11浏览次数:53  
标签:function false 登录 模版 image 验证码 https

前端Vue自定义验证码密码登录切换tabs选项卡标签栏标题栏 验证码登录模版 密码登录模版, 请访问uni-app插件市场地址:https://ext.dcloud.net.cn/plugin?id=13221

效果图如下:

实现代码如下:

cc-selectBox

使用方法


<!-- select-arr:选择数组 nowindex:当前选择序列 @change:切换选择事件  -->

<cc-selectBox :select-arr="select" :nowindex="nowindex" @change="turntap"></cc-selectBox>

  


HTML代码实现部分


<template>

    <view>

        <view class="page">

<!-- select-arr:选择数组 nowindex:当前选择序列 @change:切换选择事件  -->

<cc-selectBox :select-arr="select" :nowindex="nowindex" @change="turntap"></cc-selectBox>

  


            <view class="tip-box">

                <view class="left">

                    <view class="title">Hello, 尊敬的用户 </view>

                    <view class="subtext">登录注册解锁更多精彩内容</view>

                </view>

                <image lazyLoad class="tip-img" src="https://cdn.pixabay.com/photo/2014/02/17/10/20/statue-of-liberty-267948_1280.jpg"></image>

            </view>

            <view class="form-mes" v-if="nowindex != 1">

                <view class="input-item">

                    <view class="num">+86</view>

                    <input

                        @blur="lossstyle"

                        @focus="changestyle"

                        @input="bindpancode"

                        class="item"

                        data-inputNum="0"

                        maxlength="11"

                        placeholder="手机号(新号码将自动注册)"

                        placeholderClass="placeholder"

                        type="number"

                    />

                </view>

                <view class="input-item">

                    <input

                        @blur="lossstyle"

                        @focus="changestyle"

                        @input="pushcode"

                        class="item"

                        data-inputNum="1"

                        maxlength="6"

                        placeholder="请输入验证码"

                        placeholderClass="placeholder"

                        type="number"

                    />

                    <view @tap.stop.prevent="getshortmes" :class="'code-btn ' + (getcode ? 'active' : '') + ' ptp_exposure'" data-ptpid="0a55-1480-8c29-d6e1">

                        {{ getcodemes }}

                    </view>

                </view>

                <view @tap="bid" class="logoin submit ptp_exposure" data-ptpid="50c4-1348-ad62-db8f">登录</view>

                <view @tap="voiceCode" class="send_call ptp_exposure" data-ptpid="eaac-1adf-a790-feac" v-if="sendcall">

                    收不到验证码?试试

                    <text class="green">语音验证</text>

                </view>

            </view>

            <view class="form-mes" v-if="nowindex != 0">

                <view class="input-item">

                    <view class="num">+86</view>

                    <input

                        @blur="lossstyle"

                        @focus="changestyle"

                        @input="regloginaccount"

                        class="item"

                        data-inputNum="0"

                        maxlength="11"

                        placeholder="请输入手机号"

                        placeholderClass="placeholder"

                        type="number"

                    />

                </view>

                <view class="input-item">

                    <input

                        @blur="lossstyle"

                        @focus="changestyle"

                        @input="regloginpass"

                        class="item"

                        data-inputNum="2"

                        :password="isPassword"

                        placeholder="请输入密码"

                        placeholderClass="placeholder"

                        type="text"

                    />

                    <view @tap="changePassType" :class="'iconfont ' + (isPassword ? 'iconeye_off' : 'iconeye')" data-ptpid="8d48-14e8-85ae-6a5f"></view>

                </view>

                <view @tap="reglogin" class="logoin submit ptp_exposure" data-ptpid="2572-1abd-b620-ade5">登录</view>

                <view @tap="forgetpass" class="forget green ptp_exposure" data-ptpid="a54d-1179-8be7-3e5e">

                    <text>忘记密码?</text>

                </view>

            </view>

            <view class="iagree">

                登录注册代表您已同意《

                <text @tap="skipAgreePage" class="green ptp_exposure" data-ptpid="934b-1839-b547-2d42">App用户协议</text>

                》

            </view>

        </view>

        <view @tap="closeImgCode" class="toastbg ptp_exposure" data-ptpid="dad4-159d-ad73-a360" v-if="showimgcode"></view>

        <view class="imagecont" v-if="showimgcode">

            <view class="imagetitle">

                <input @input="getImgCode" class="imagevalue" maxlength="4" placeholder="请输入图片验证码" placeholderClass="placeholder" />

                <image lazyLoad @tap="changeImgCode" class="ptp_exposure" data-ptpid="75db-11fd-a7c2-3fdb" :src="imageCode" style="width: 160rpx; height: 64rpx"></image>

            </view>

            <view @tap="confirmCode" :class="'choosesure ' + (confirmactive ? 'active' : '') + ' ptp_exposure'" data-ptpid="35bd-1312-a0c2-9664">确定</view>

        </view>

    </view>

</template>

<script>

var app = getApp();

export default {

    components: {

  


    },

    data() {

        return {

            logs: [],

            nowindex: 0,

            regularLogin: false,

            select: ['验证码登录', '密码登录'],

            getcode: false,

            getcodemes: '获取验证码',

            sendcall: false,

            hidepass: false,

            callimg: false,

            phone: '',

            code: '',

            submit: {

                submit: false,

                text: '登录'

            },

            miniOpenId: '',

            redirect: '',

            showimgcode: false,

            imageCode: '',

            localcode: '',

            confirmactive: false,

            regmobile: '',

            regpassword: '',

            nowUrl: '/accountCenter/account/fast/login/verifyCode',

            frontPage: '',

            deviceIdCode: Math.random(),

            inputStyle: [

                {

                    iconactive: 'https://qiniu-image.qtshe.com/[email protected]',

                    icon: 'https://qiniu-image.qtshe.com/[email protected]',

                    selected: false

                },

                {

                    iconactive: 'https://qiniu-image.qtshe.com/[email protected]',

                    icon: 'https://qiniu-image.qtshe.com/[email protected]',

                    selected: false

                },

                {

                    iconactive: 'https://qiniu-image.qtshe.com/[email protected]',

                    icon: 'https://qiniu-image.qtshe.com/[email protected]',

                    selected: false

                }

            ],

            nowOnFocus: 0,

            isPassword: true

        };

    },

    onl oad: function (e) {

this.redirect = e.redirect || '';

    },

    methods: {

        getImgCode: function (e) {},

        closeImgCode: function () {

this.showimgcode = false;

        },

        voiceCode: function () {},

        changestyle: function (e) {},

        lossstyle: function (e) {},

        confirmCode: function () {},

        getshortmes: function () {},

        bid: function () {},

// 切换登录方式

        turntap: function (e) {

this.nowindex = e.target.dataset.num;

},

        pushcode: function (e) {},

        bindpancode: function (e) {},

        forgetpass: function () {},

        hideorshow: function () {},

        regloginaccount: function (e) {},

        regloginpass: function (e) {},

        changeImgCode: function () {},

        skipAgreePage: function () {},

        reglogin: function () {},

        inviteFriend: function () {},

        changePassType: function () {}

    }

};

</script>

<style lang="scss" scoped>

@import "./login.scss";

</style>

组件实现代码


<template>

<view class="logway">

<view :class="'act ' + (nowindex == index ? 'active' : '')" v-for="(item, index) in selectArr" :key="index">

<view @tap="turntap" class="item ptp_exposure" :data-index="index" :data-num="index"

data-ptpid="6f22-1fc6-9182-d53d">

{{ item }}

</view>

<view class="dot"></view>

</view>

</view>

</template>

<script>

export default {

data() {

return {

};

},

props: {

selectArr: {

type: Array,

default: []

},

// 当前选中

nowindex: {

type: Number,

default: 0

},

},

methods: {

turntap(e) {

this.$emit("change", e);

},

}

};

</script>

<style lang="scss" scoped>

@import "./index.scss";

</style>

标签:function,false,登录,模版,image,验证码,https
From: https://www.cnblogs.com/ccVue/p/17507806.html

相关文章

  • 08异步短信发送,注册功能,补充【1.为什么要写media才能访问,2.debug作用,3.ALLOWED_HOSTS
    1异步发送短信#原来的发送短信,是同步 -前端输入手机号---》点击发送短信---》前端发送ajax请求----》到咱们后端接口---》取出手机号----》调用腾讯发送短信---》腾讯去发短信---》发完后----》回复给我们后端发送成功---》我们后端收到发送成功---》给我们前端返回发送成功......
  • app登录
    一、需求分析用户点击开始使用:登录后的用户权限较大,可以查看,也可以操作(点赞,关注,评论)用户点击不登录,先看看:游客只有查看的权限二、表结构分析ap_user:APP用户信息表packagecom.heima.model.user.pojos;importcom.baomidou.mybatisplus.annotation.IdType;importcom.baom......
  • Python爬虫完整代码模版
    以下是一个基本的Python爬虫代码模板,可以根据需要进行修改:importrequestsfrombs4importBeautifulSoup#设置请求头,模拟浏览器访问headers={'User-Agent':'Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/58.0.3029.110......
  • 自动登录域账户
    不管计算机是否已加域,都可以通过更改注册表的方法来实现。在注册表HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon下创建几个键值。修改一个双字节(REG_DWORD)值项AutoAdminLogon。值为1表示启用自动登录功能,值为0或值项不存在表示不使用自动登录功......
  • Chrome/Edge 浏览器多账号登录,测试同一业务系统的不同账号角色
    虽然说用不同浏览器测试也比较方便、还能顺带测试多浏览器兼容问题……但我是开发呀,我只想用我最习惯的谷歌浏览器完成快速开发,把功能铺上,专注于业务逻辑的开发这些浏览器差异等只会给我造成麻烦,影响我的开发沉浸感,打乱我的开发节奏,等功能开发完再去处理再去测试兼容性之类的问......
  • 07前后端项目上传gitee,后端多方式登录接口,发送短信功能,发送短信封装,短信验证码接口,短
    1前后端项目上传到gitee#公司里: -前端一个仓库---》一个团队-后端一个仓库---》一个团队-微服务:两三个人一个服务---》一个项目一个仓库-网上开源软件,前后端都在一起#在远端建立前端仓库#本地代码提交到远成仓库2后端多方式......
  • 模拟登录cookie操作
    1.方法一自动添加cookie:定义session方法,登录后使用session.get()代替requests.get(): 2.方法二:手动添加cookie_cookie请求登录用户主页1:先找到登录请求的url中的cookie: 3.方法二:手动添加cookie_cookie请求登录用户主页2:在请求前的headers中添加cookie键值对: 4.方法二:手动......
  • 滑块验证码缺口识别及轨迹生成
    importbase64importrandomimporttimefromioimportBytesIOimportcv2importrequeststry:importmatplotlib.pyplotaspltexcept:plt=NoneimportnumpyasnpfromPILimportImagefromselenium.webdriverimportActionChainsfromscipyim......
  • uniapp项目嵌入微信公众号,授权登录
    1.创建公众号2.配置公众号信息=>公众号设置=>账号详情                          =>功能设置=>配置业务、js接口安全、网页授权域名               =>人员设置:绑定开发者微信号3.基本配......
  • winserver2012 登录秘密找回
      参考:https://wenku.csdn.net/answer/a7ed8fe6403cc45052a9a2f0d88601d6 实践后的方法:①登录界面连续点击多次【shift】点击多次后会弹出任务管理器,如图 ②文件》运行新任务》cmd》确定或者:文件》运行新任务》浏览 C:\Windows\System32\cmd.exe》确定③cmd输......