diff --git a/assets/images/password.png b/assets/images/password-close.png similarity index 100% rename from assets/images/password.png rename to assets/images/password-close.png diff --git a/assets/images/password-show.png b/assets/images/password-show.png new file mode 100644 index 0000000..58a65cb Binary files /dev/null and b/assets/images/password-show.png differ diff --git a/pages/exchangeCard/exchangeCard.js b/pages/exchangeCard/exchangeCard.js index cdef2ab..169e9b0 100644 --- a/pages/exchangeCard/exchangeCard.js +++ b/pages/exchangeCard/exchangeCard.js @@ -12,12 +12,13 @@ Page({ navigationBarHeight, tabIndex: 0, pdwSwitch: 0, + isShowPwd: false, isChangePhone: false, code: "", name: "叶文沁", phone: "1379****591", tempPhone: '', - password: '', + password: '' }, // 兑换 @@ -46,7 +47,7 @@ Page({ // 输入密码 pwdInput(e) { 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() { let that = this; diff --git a/pages/exchangeCard/exchangeCard.wxml b/pages/exchangeCard/exchangeCard.wxml index cc00d00..e93b54c 100644 --- a/pages/exchangeCard/exchangeCard.wxml +++ b/pages/exchangeCard/exchangeCard.wxml @@ -40,15 +40,24 @@ - - + + + + + + + + + - - + + + + \ No newline at end of file diff --git a/pages/exchangeCard/exchangeCard.wxss b/pages/exchangeCard/exchangeCard.wxss index f5f6f36..27293d1 100644 --- a/pages/exchangeCard/exchangeCard.wxss +++ b/pages/exchangeCard/exchangeCard.wxss @@ -110,9 +110,20 @@ } .infoCard .pwdBox { + position: relative; border: 1px solid #5c5c5c; padding: 15rpx; border-radius: 15rpx; + line-height: 100%; +} + +.infoCard .pwdBox .eye { + position: absolute; + right: 25rpx; + bottom: 5rpx; + width: 60rpx; + height: 60rpx; + z-index: 999; } .btns {