HolyKnightIX 2 anni fa
parent
commit
b6ca77c406
5 ha cambiato i file con 47 aggiunte e 6 eliminazioni
  1. +0
    -0
      assets/images/password-close.png
  2. BIN
      assets/images/password-show.png
  3. +23
    -2
      pages/exchangeCard/exchangeCard.js
  4. +13
    -4
      pages/exchangeCard/exchangeCard.wxml
  5. +11
    -0
      pages/exchangeCard/exchangeCard.wxss

assets/images/password.png → assets/images/password-close.png Vedi File


BIN
assets/images/password-show.png Vedi File

Prima Dopo
Larghezza: 128  |  Altezza: 128  |  Dimensione: 3.0 KiB

+ 23
- 2
pages/exchangeCard/exchangeCard.js Vedi File

@@ -12,12 +12,13 @@ Page({
navigationBarHeight, navigationBarHeight,
tabIndex: 0, tabIndex: 0,
pdwSwitch: 0, pdwSwitch: 0,
isShowPwd: false,
isChangePhone: false, isChangePhone: false,
code: "", code: "",
name: "叶文沁", name: "叶文沁",
phone: "1379****591", phone: "1379****591",
tempPhone: '', tempPhone: '',
password: '',
password: ''
}, },


// 兑换 // 兑换
@@ -46,7 +47,7 @@ Page({
// 输入密码 // 输入密码
pwdInput(e) { pwdInput(e) {
this.setData({ this.setData({
password: e.detail.value
password: e.detail.value,
}) })
}, },


@@ -110,6 +111,26 @@ Page({
}) })
}, },


setPwdShow() {
const isShowPwd = this.data.isShowPwd
this.setData({
isShowPwd: !isShowPwd
})
},

submit() {
const thisData = this.data
const data = {
name: thisData.name,
phone: thisData.phone,
pdwSwitch: thisData.pdwSwitch,
password: thisData.password,
}
console.log(data, 'submitData');
},

goGive() { },

// 检查用户登录状态 // 检查用户登录状态
checkPhoneStatus() { checkPhoneStatus() {
let that = this; let that = this;


+ 13
- 4
pages/exchangeCard/exchangeCard.wxml Vedi File

@@ -40,15 +40,24 @@
<label> <label>
<radio value="0" checked="true" />无验证 <radio value="0" checked="true" />无验证
</label> </label>

</radio-group> </radio-group>
</view> </view>
<view wx:if="{{pdwSwitch && tabIndex == 0}}" class="pwdBox"> <view wx:if="{{pdwSwitch && tabIndex == 0}}" class="pwdBox">
<input type="text" placeholder="请设置密码" placeholder-class="pwdBoxInside" focus="true" bindinput="pwdInput"/>
<view wx:if="{{!isShowPwd}}" style="margin-bottom: 0;">
<input type="password" placeholder="请设置密码" placeholder-class="pwdBoxInside" focus="true" bindinput="pwdInput" value="{{password}}" />
<image class=" eye" src="../../assets/images/password-show.png" bindtap="setPwdShow"></image>
</view>

<view wx:if="{{isShowPwd}}" style="margin-bottom: 0;">
<input type="text" placeholder="请设置密码" placeholder-class="pwdBoxInside" value="{{password}}" bindinput="pwdInput" />
<image class="eye" src="../../assets/images/password-close.png" bindtap="setPwdShow"></image>
</view>
</view> </view>
</view> </view>


<view class="btns"> <view class="btns">
<button wx:if="{{tabIndex == 0}}" type="primary" bindtap="checkPhoneStatus">确认绑定</button>
<button wx:if="{{tabIndex == 1}}" type="primary" bindtap="checkPhoneStatus">去转赠</button>
<!-- 绑定 -->
<button wx:if="{{tabIndex == 0}}" type="primary" bindtap="submit">确认绑定</button>
<!-- 转赠 -->
<button wx:if="{{tabIndex == 1}}" type="primary" bindtap="goGive">去转赠</button>
</view> </view>

+ 11
- 0
pages/exchangeCard/exchangeCard.wxss Vedi File

@@ -110,9 +110,20 @@
} }


.infoCard .pwdBox { .infoCard .pwdBox {
position: relative;
border: 1px solid #5c5c5c; border: 1px solid #5c5c5c;
padding: 15rpx; padding: 15rpx;
border-radius: 15rpx; border-radius: 15rpx;
line-height: 100%;
}

.infoCard .pwdBox .eye {
position: absolute;
right: 25rpx;
bottom: 5rpx;
width: 60rpx;
height: 60rpx;
z-index: 999;
} }


.btns { .btns {


Caricamento…
Annulla
Salva