|
|
@ -11,12 +11,12 @@ |
|
|
|
<input placeholder="请输入旧密码" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
<input placeholder="请输入旧密码" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="code"> |
|
|
|
<view class="code"> |
|
|
|
<input placeholder="请输入新密码" v-model="code" placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
<input placeholder="请输入新密码" v-model="code" password=true placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="password"> |
|
|
|
<view class="password"> |
|
|
|
<input placeholder="确认新密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
<input placeholder="确认新密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="doReset">重置密码</view> |
|
|
|
<view class="btn" @click="sendUserPass">重置密码</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -25,6 +25,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import md5 from "@/common/SDK/md5.min.js"; |
|
|
|
import md5 from "@/common/SDK/md5.min.js"; |
|
|
|
|
|
|
|
let app = getApp() |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
sendUserPass |
|
|
|
|
|
|
|
} from "../../Utils/Api.js"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -37,7 +41,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
Timer(){}, |
|
|
|
Timer(){}, |
|
|
@ -129,7 +132,45 @@ |
|
|
|
},1000) |
|
|
|
},1000) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//修改密码 |
|
|
|
|
|
|
|
sendUserPass() { |
|
|
|
|
|
|
|
if(this.phoneNumber == ''){ |
|
|
|
|
|
|
|
uni.showToast({title: '请输入旧密码',icon:"none"}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.code == ''){ |
|
|
|
|
|
|
|
uni.showToast({title: '请输入新密码',icon:"none"}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.passwd == ''){ |
|
|
|
|
|
|
|
uni.showToast({title: '请确认新密码',icon:"none"}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.passwd != this.code){ |
|
|
|
|
|
|
|
uni.showToast({title: '您输入的两次不相同',icon:"none"}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let datas = { |
|
|
|
|
|
|
|
userId: app.globalData.brestUserInfo.id, |
|
|
|
|
|
|
|
oldPassword: this.phoneNumber, |
|
|
|
|
|
|
|
password : this.passwd |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sendUserPass(datas).then(res => { |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
|
|
|
key: "pasNum", |
|
|
|
|
|
|
|
data: this.passwd |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
uni.navigateBack() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: "none" |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|