Commit de5f973f authored by lshan's avatar lshan

设置密码

parent 729679e3
<template>
<div class="px-5">
<pwd-setting
:phone="$route.query.phone"
:phone="Phone()"
:sendSmsFunc="sendSmsFunc"
:setPwdFunc="setPwdFunc"
/>
......@@ -11,9 +11,20 @@
<script lang="ts">
import PwdSetting from "./PwdSetting.vue";
import { defineComponent } from "vue";
import { getUserMsg } from '@/utils/userMsg'
export default defineComponent({
components: { PwdSetting },
inject: ["sendSmsFunc", "setPwdFunc"],
methods: {},
created(){
console.log(this.$route.query.phone,'router');
this.Phone()
},
methods: {
Phone(){
const phone =getUserMsg()?.userInfo.phone+''
console.log(phone,'phone');
return phone
}
},
});
</script>
......@@ -15,12 +15,11 @@
<div class="px-5 py-2 items-center border-b border-gray-200">
<div class="flex justify-between items-center">
<div>
<div class=" text-sm font-semibold">登陆密码</div>
<div class=" text-sm font-semibold">设置密码</div>
<div class=" text-xs text-gray-400 pt-1">保障账户登录安全</div>
</div>
<div class="flex items-center text-xs h-1 text-right">
<span v-if="hasPassword == 3" @click="pushRouter">设置</span>
<span v-else-if="hasPassword == 2" @click="pushRouter">修改</span>
<span @click="pushRouter">设置</span>
<icon
name="icon-gengduo"
color="#8E92A3"
......@@ -43,14 +42,16 @@ import { deleteUserMsg, getUserMsg } from '@/utils/userMsg'
import filter from "@/filter"
import router from '@/router'
import { userLogout } from '@/service/UserManagementService'
import { userChangePwd,userLogin} from '@/service/UserManagementService'
import { eSmsType, sendVerifyCode } from '@/service/VerificationService'
import set from '@/views/Auth/PwdSetting/index.vue'
export default defineComponent({
components: { NavBar, Icon ,set},
components: { NavBar, Icon },
data(){
return{
role:''
}
},
computed: {
hasPassword(): eAccountType {
return eAccountType.REG_PDSET
return eAccountType.REG_NOPD
},
getPhone(){
const phone =getUserMsg()?.userInfo.phone+''
......@@ -74,16 +75,9 @@ export default defineComponent({
},
methods:{
pushRouter(){
console.log('123');
if(this.hasPassword == 3){
this.$router.push({
name: 'PwdSetting'
})
}else if(this.hasPassword == 2){
this.$router.push({
name: 'PwdModify'
})
}
},
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment