xiaohaizhao 1 год назад
Родитель
Сommit
df6dc2405f

+ 3 - 58
pages/tabbar/mine/changePassword/index.js

@@ -2,9 +2,6 @@ const md5 = require("../../../../utils/md5");
 const _Http = getApp().globalData.http;
 const _Http = getApp().globalData.http;
 import Toast from '@vant/weapp/toast/toast';
 import Toast from '@vant/weapp/toast/toast';
 Page({
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
     data: {
         from: {
         from: {
             password: "", //原密码
             password: "", //原密码
@@ -15,18 +12,14 @@ Page({
         loading: false,
         loading: false,
         confirmPassword: "",
         confirmPassword: "",
     },
     },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
     onLoad(options) {
     onLoad(options) {
-
+        getApp().globalData.Language.getLanguagePackage(this, '修改密码')
     },
     },
     /* 修改密码 */
     /* 修改密码 */
     changePassword() {
     changePassword() {
         if (this.data.disabled || this.data.loading) return;
         if (this.data.disabled || this.data.loading) return;
         if (this.data.confirmPassword != true) return Toast({
         if (this.data.confirmPassword != true) return Toast({
-            message: '请检查新密码与确认密码',
+            message: getApp().globalData.Language.getMapText("两次输入的密码不一致"),
             position: 'bottom'
             position: 'bottom'
         });
         });
         let from = this.data.from;
         let from = this.data.from;
@@ -53,7 +46,7 @@ Page({
                 disabled: true
                 disabled: true
             })
             })
             wx.showToast({
             wx.showToast({
-                title: '修改成功!',
+                title: getApp().globalData.Language.getMapText("修改成功") + '!',
             })
             })
             setTimeout(() => {
             setTimeout(() => {
                 wx.navigateBack({
                 wx.navigateBack({
@@ -96,52 +89,4 @@ Page({
             confirmPassword: ""
             confirmPassword: ""
         })
         })
     },
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
 })
 })

+ 7 - 0
pages/tabbar/mine/changePassword/index.scss

@@ -2,6 +2,13 @@
     display: flex;
     display: flex;
     position: relative;
     position: relative;
     padding: 26rpx 20rpx 24rpx 30rpx;
     padding: 26rpx 20rpx 24rpx 30rpx;
+    width: 690rpx;
+    background: #FFFFFF;
+    border-radius: 16rpx;
+    margin: 0 auto;
+    margin-top: 20rpx;
+    box-sizing: border-box;
+    overflow: hidden;
 
 
     .icon-box {
     .icon-box {
         width: 40rpx;
         width: 40rpx;

+ 12 - 13
pages/tabbar/mine/changePassword/index.wxml

@@ -1,26 +1,25 @@
-<My_card custom-class='input-field'>
+<view class='input-field'>
     <view class="icon-box">
     <view class="icon-box">
         <text class="iconfont icon-a-wodemima" />
         <text class="iconfont icon-a-wodemima" />
     </view>
     </view>
-    <input class="input" bindinput="inputNumber" password bindinput="formInput" data-name="password" placeholder='请填写原密码' />
-</My_card>
-<My_card custom-class='input-field'>
+    <input class="input" bindinput="inputNumber" password bindinput="formInput" data-name="password" placeholder="{{language['原始密码']||'请填写原密码'}}" />
+</view>
+<view class='input-field'>
     <view class="icon-box">
     <view class="icon-box">
         <text class="iconfont icon-a-wodemima" />
         <text class="iconfont icon-a-wodemima" />
     </view>
     </view>
-    <input class="input" password bindinput="formInput" bindblur='passwordBlur' data-name="newPassword" placeholder='请设置6-20位新密码' />
-</My_card>
-<My_card custom-class='input-field'>
+    <input class="input" password bindinput="formInput" bindblur='passwordBlur' data-name="newPassword" placeholder="{{language['新密码']||'请设置6-20位新密码'}}" />
+</view>
+<view class='input-field'>
     <view class="icon-box">
     <view class="icon-box">
         <text class="iconfont icon-a-wodemima" />
         <text class="iconfont icon-a-wodemima" />
     </view>
     </view>
-    <input class="input" password bindinput="formInput" value="{{from.verifyNewPassword}}" bindblur='passwordBlur' data-name="verifyNewPassword" placeholder='请确认新密码' />
-    <view wx:if="{{confirmPassword===false}}" class="errmsg">两次密码不一致
+    <input class="input" password bindinput="formInput" value="{{from.verifyNewPassword}}" bindblur='passwordBlur' data-name="verifyNewPassword" placeholder="{{language['确认密码']||'请确认新密码'}}" />
+<!--     <view wx:if="{{confirmPassword===false}}" class="errmsg">两次密码不一致
         <van-icon class="iconfont" name="clear" bind:click="clearNewPassword" />
         <van-icon class="iconfont" name="clear" bind:click="clearNewPassword" />
-    </view>
-</My_card>
+    </view> -->
+</view>
 <view style="width: 100%; text-align: center;margin-top: 100rpx;">
 <view style="width: 100%; text-align: center;margin-top: 100rpx;">
-    <van-button disabled='{{disabled}}' loading='{{loading}}' bindtap="changePassword" loading-text="修改中..." custom-class='but-style'>确定修改</van-button>
+    <van-button disabled='{{disabled}}' loading='{{loading}}' bindtap="changePassword" loading-text="{{(language['修改中']||'修改中')+'...'}}" custom-class='but-style'>{{language['确认修改']||'确定修改'}}</van-button>
 </view>
 </view>
-
 <van-toast id="van-toast" />
 <van-toast id="van-toast" />