最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

微信小程序?qū)崿F(xiàn)登錄注冊界面

 更新時間:2022年08月24日 15:55:48   作者:JefferyTan.  
這篇文章主要為大家詳細介紹了微信小程序?qū)崿F(xiàn)登錄注冊界面,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了微信小程序?qū)崿F(xiàn)登錄注冊界面的具體代碼,供大家參考,具體內(nèi)容如下

微信小程序登錄注冊界面demo,存在不足之處,請指教!

界面圖片:

1.js代碼:

Page({

? /**
? ?* 頁面的初始數(shù)據(jù)
? ?*/
? data: {
? ? current:1,
? ? codeText:'獲取驗證碼',
? ? counting:false,
? },
? // 登陸注冊監(jiān)聽
? click(e){
? ? let index = e.currentTarget.dataset.code;
? ? this.setData({
? ? ? current:index
? ? })
? },
? //獲取驗證碼?
? getCode(){
? ? var that = this;
? ? if (!that.data.counting) {
? ? ? wx.showToast({
? ? ? ? title: '驗證碼已發(fā)送',
? ? ? })
? ? ? //開始倒計時60秒
? ? ? that.countDown(that, 60);
? ? }?
? },
? //倒計時60秒
? countDown(that,count){
? ? if (count == 0) {
? ? ? that.setData({
? ? ? ? codeText: '獲取驗證碼',
? ? ? ? counting:false
? ? ? })
? ? ? return;
? ? }
? ? that.setData({
? ? ? counting:true,
? ? ? codeText: count + '秒后重新獲取',
? ? })
? ? setTimeout(function(){
? ? ? count--;
? ? ? that.countDown(that, count);
? ? }, 1000);
? },
? /**
? ?* 生命周期函數(shù)--監(jiān)聽頁面加載
? ?*/
? onLoad(options) {

? },

? /**
? ?* 生命周期函數(shù)--監(jiān)聽頁面初次渲染完成
? ?*/
? onReady() {

? },

? /**
? ?* 生命周期函數(shù)--監(jiān)聽頁面顯示
? ?*/
? onShow() {

? },

? /**
? ?* 生命周期函數(shù)--監(jiān)聽頁面隱藏
? ?*/
? onHide() {

? },

? /**
? ?* 生命周期函數(shù)--監(jiān)聽頁面卸載
? ?*/
? onUnload() {

? },

? /**
? ?* 頁面相關(guān)事件處理函數(shù)--監(jiān)聽用戶下拉動作
? ?*/
? onPullDownRefresh() {

? },

? /**
? ?* 頁面上拉觸底事件的處理函數(shù)
? ?*/
? onReachBottom() {

? },

? /**
? ?* 用戶點擊右上角分享
? ?*/
? onShareAppMessage() {

? }
})

2.wxml代碼:

<view class="top-box">
? <view>Hi</view>
? <view class="next-text">歡迎使用!</view>
</view>
<!-- 登錄、注冊 -->
<view class="center-box">
? <view class="nav">
? ? <view class="left {{current==1?'select':''}}" bindtap="click" data-code="1">
? ? ? <text>登錄</text>
? ? </view>
? ? <view class="right {{current==0?'select':''}}" bindtap="click" data-code="0">
? ? ? <text>注冊</text>
? ? </view>
? </view>
? <!-- 登錄 -->
? <view class="input-box" hidden="{{current==0}}">
? ? <view class="wei-input">
? ? ? <icon type="waiting" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請輸入手機號/登錄名"/>
? ? </view>
? ? <view class="wei-input">
? ? ? <icon type="success" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請輸入登錄密碼"/>
? ? </view>
? ? <view class="forget">
? ? ? <text>忘記密碼?</text>
? ? </view>
? </view>
? <!-- 注冊 -->
? <view class="input-box" hidden="{{current==1}}">
? ? <view class="wei-input">
? ? ? <icon type="waiting" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請輸入手機號"/>
? ? </view>
? ? <view class="wei-input">
? ? ? <icon type="waiting" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請輸入6位驗證碼"/>
? ? ? <text class="input-code" bindtap="getCode">{{codeText}}</text>
? ? </view>
? ? <view class="wei-input">
? ? ? <icon type="success" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請輸入密碼"/>
? ? </view>
? ? <view class="wei-input">
? ? ? <icon type="success" color="#44ADFB" size="16"></icon>
? ? ? <input class="input" auto-focus placeholder="請確認密碼"/>
? ? </view>
? </view>
? <view class="sumbit-btn">
? ? <button class="button"?
? ? style="background-color: #33ccff;font-size: 30rpx;"?
? ? type="primary">立即{{current==1?'登錄':'注冊'}}</button>
? </view>
</view>
<!-- 重影 -->
<view class="shadow shadow-1"></view><view class="shadow shadow-2"></view>
<!-- 說明 -->
<view class="bottom-box">
? demo·開源·點贊·收藏·打賞·Jeffery~
</view>

3.wxss代碼:

page{
? height: 100%;
? background-color: white;
? margin: 0px;
? padding: 0px;
}
/* 頂部背景 */
.top-box{
? height: 30%;
? background-image: linear-gradient( #44ADFB,#5ed6fd);
? padding: 30rpx;
? color: white;
? font-weight: bold;
}
.next-text{
? margin-top: 15rpx;
}
/* 內(nèi)容 */
.center-box{
? background-color: white;
? margin: -20% 20rpx 0rpx 20rpx;
? padding: 25rpx;
? border-radius: 15rpx;
? -webkit-filter: drop-shadow(0 0 8rpx #44ADFB);
? filter: drop-shadow(0 0 8rpx #44ADFB);
}
/* 導航 */
.nav{
? display: flex;
? text-align: center;
? font-size: 32rpx;
? margin-bottom: 8%;
}
.left{
? flex: 1;
? font-weight: bold;
}
.right{
? flex: 1;
? font-weight: bold;
}
.select{
? font-weight: bold;
? color: #33ccff;
}
.select text{
? padding-bottom: 5rpx;
? border-bottom-left-radius: 10rpx;
? border-bottom-right-radius: 10rpx;
? border-bottom: 5rpx solid #33ccff;
}
.wei-input{
? display: flex;
? flex-direction: row;
? align-items: center;
? margin-top: 40rpx;
? padding-bottom: 20rpx;
? border-bottom: 1rpx solid #f1f1f1;
}
.input-box{
? margin: 20rpx;
}
.input{
? padding-left: 20rpx;
? font-size: 30rpx;
}
.input-code{
? position: absolute;
? right: 40rpx;
? font-size: 26rpx;
? padding: 10rpx 15rpx;
? color: white;
? background-color: #FF8C69;
? border-radius: 10rpx;
}
.forget{
? font-size: 26rpx;
? color: #33ccff;
? margin-top: 20rpx;
? text-align: right;
}
.sumbit-btn{
? margin: 6% 30rpx 30rpx 30rpx;
}
/* 重影 */
.shadow{
? box-shadow: 0rpx 0rpx 10rpx 0rpx #44ADFB;
? border-radius: 25rpx;
? background-color: white;
}
.shadow-1{
? height: 40rpx;
? margin: -20rpx 50rpx 0 50rpx;
}
.shadow-2{
? position: relative;
? z-index: -888;
? height: 50rpx;
? margin: -30rpx 80rpx 0 80rpx;
}
/* 最底部 */
.bottom-box{
? position:fixed;?
? bottom: 10rpx;
? width:100%;
? font-size: 24rpx;
? color: gray;
? display: flex;
? justify-content: center;
}

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • 關(guān)于uniApp editor微信滑動問題

    關(guān)于uniApp editor微信滑動問題

    這篇文章主要介紹了關(guān)于uniApp editor微信滑動問題,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-01-01
  • JavaScript中的this關(guān)鍵詞指向

    JavaScript中的this關(guān)鍵詞指向

    本文介紹了JavaScript中的this關(guān)鍵詞指向,this是JavaScript的一個關(guān)鍵字,他是函數(shù)執(zhí)行過程中,自動生成的一個內(nèi)部對象,指當前的對象,只在當前函數(shù)內(nèi)部使用,更多相關(guān)資料需要的小伙伴可以參考下面文章內(nèi)容
    2022-05-05
  • uniApp常見面試題及答案(推薦!)

    uniApp常見面試題及答案(推薦!)

    uni-app是一個使用Vue.js開發(fā)所有前端應用的框架,下面這篇文章主要給大家介紹了關(guān)于uniApp常見面試題及答案的相關(guān)資料,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下
    2023-02-02
  • js判斷設備是否為PC并調(diào)整圖片大小

    js判斷設備是否為PC并調(diào)整圖片大小

    這篇文章主要介紹了js判斷設備是否為PC并調(diào)整圖片大小,需要的朋友可以參考下
    2014-02-02
  • 網(wǎng)頁上的Javascript編輯器和代碼格式化

    網(wǎng)頁上的Javascript編輯器和代碼格式化

    因為我們的項目可以通過編寫腳本(javascript)進行功能擴展,所以為了方便現(xiàn)場實施人員,所以突發(fā)奇想想在網(wǎng)頁上(系統(tǒng)是B/S的)提供一個javascript的編輯器。
    2010-04-04
  • JavaScript之map reduce_動力節(jié)點Java學院整理

    JavaScript之map reduce_動力節(jié)點Java學院整理

    這篇文章主要為大家詳細介紹了JavaScript之map reduce的相關(guān)資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • Django使用多數(shù)據(jù)庫的方法

    Django使用多數(shù)據(jù)庫的方法

    有些項目可能涉及到使用多個數(shù)據(jù)庫的情況,方法很簡單。接下來通過本文給大家介紹Django使用多數(shù)據(jù)庫的方法,需要的朋友參考下吧
    2017-09-09
  • JS獲取幾種URL地址的方法小結(jié)

    JS獲取幾種URL地址的方法小結(jié)

    本篇文章主要是對JS獲取幾種URL地址的方法進行了總結(jié)介紹,需要的朋友可以過來參考下,希望對大家有所幫助
    2014-02-02
  • JS實現(xiàn)自動輪播圖效果(自適應屏幕寬度+手機觸屏滑動)

    JS實現(xiàn)自動輪播圖效果(自適應屏幕寬度+手機觸屏滑動)

    這篇文章主要介紹了JS實現(xiàn)自動輪播圖效果(自適應屏幕寬度+手機觸屏滑動),需要的朋友可以參考下
    2017-06-06
  • JavaScript requestAnimationFrame動畫詳解

    JavaScript requestAnimationFrame動畫詳解

    這篇文章主要為大家詳細介紹了JavaScript requestAnimationFrame動畫,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-09-09

最新評論

五指山市| 南木林县| 东乌珠穆沁旗| 台北县| 马山县| 三江| 龙口市| 密山市| 葫芦岛市| 古交市| 休宁县| 长宁县| 泸水县| 冕宁县| 宁海县| 台南县| 眉山市| 镶黄旗| 汕头市| 福清市| 北海市| 马鞍山市| 大关县| 长垣县| 沙河市| 凤翔县| 丹江口市| 库尔勒市| 宜章县| 成安县| 鹤岗市| 嘉义县| 临城县| 广灵县| 伊通| 文登市| 鲁甸县| 八宿县| 额济纳旗| 卢湾区| 突泉县|