1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view>
- <!-- 头部 -->
- <headContent>
- <template #left>
- <view class="head-revers-back iconfont" @click.stop="reversBackBtn()"></view>
- </template>
- </headContent>
- <view class="page-content">
- <text class="login-title">重置密码</text>
- <setPswd @submitPswd="submitPswd" />
- </view>
- <load ref="loadRef" />
- </view>
- </template>
- <script>
- import setPswd from "./modules/set-pswd.vue"
- import {
- reverseBack
- } from "@/utils/common.js"
- import {
- Api_setPassword
- } from "@/api/index.js"
- export default {
- name: 'reset-pswd',
- components: {
- setPswd
- },
- data() {
- return {
- account: '',
- code: '',
- };
- },
- onLoad(opt) {
- this.account = opt?.account;
- this.code = opt?.code;
- },
- mounted() {
- },
- methods: {
- reversBackBtn() {
- reverseBack()
- },
- submitPswd(e) {
- uni.showLoading({
- title: ''
- })
- const obj = {
- account: this.account,
- code: this.code || -1,
- password: e.newPassword,
- repassword: e.confirmPassword
- }
- Api_setPassword(obj).then(res => {
- uni.showToast({
- title: '重置成功',
- icon: 'none'
- })
- setTimeout(() => {
- reverseBack('pages/login/index')
- }, 200)
- }).catch(err => {}).finally(() => {
- uni.hideLoading()
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "~./common.scss";
- </style>
|