更新代码

This commit is contained in:
guaishoudemao
2021-02-06 16:42:26 +08:00
parent e623a7fac4
commit f408b4ff41
80 changed files with 3056 additions and 2156 deletions

View File

@@ -9,7 +9,7 @@
<template v-if="current === 0">
<el-form-item prop="phone">
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
placeholder="请输入手机号" size="large"/>
placeholder="请输入手机号" size="large" :readonly="infoData.phone?true:false"/>
</el-form-item>
<el-form-item prop="code" class="captcha">
<div class="acea-row" style="flex-wrap: nowrap;">
@@ -102,6 +102,7 @@
}
};
return {
isReadonly: false,
cutNUm: '获取验证码',
canClick: true,
current: 0,
@@ -128,6 +129,15 @@
}
}
},
props:{
infoData: {
type: Object,
default: null
}
},
mounted(){
this.infoData ? this.formInline.phone = this.infoData.phone : this.formInline.phone = '';
},
methods: {
// 短信验证码
cutDown () {

View File

@@ -9,7 +9,7 @@
<template v-if="current === 0">
<el-form-item prop="account">
<el-input type="text" v-model="formInline.account" prefix="ios-contact-outline"
placeholder="请输入当前手机号" size="large"/>
placeholder="请输入当前号" size="large"/>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="formInline.password" prefix="ios-contact-outline"
@@ -62,7 +62,7 @@
</template>
<script>
import { captchaApi, configApi, updateHoneApi } from '@/api/sms';
import { captchaApi, configApi, updateHoneApi, phoneValidatorApi } from '@/api/sms';
export default {
name: 'forgetPhone',
props: {
@@ -113,7 +113,7 @@
{ required: true, message: '请输入密码', trigger: 'blur' }
],
account: [
{ required: true, validator: validatePhone, trigger: 'blur' }
{ required: true, message: '请输入当前账号', trigger: 'blur' }
]
}
}
@@ -147,7 +147,10 @@
handleSubmit1 (name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.handleSubmit(name,1);
phoneValidatorApi(this.formInline).then(async res => {
this.$message.success('操作成功')
this.current = 1;
})
} else {
return false;
}

View File

@@ -38,7 +38,11 @@
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
@click="handleSubmit('formInline')">登录
</el-button>
<el-button size="mini" type="text" style="width: 100%;margin-left: 0" @click="changeReg">注册账户</el-button>
<div class="acea-row row-center-wrapper">
<el-button size="mini" type="text" style="margin-left: 0" @click="changePassword">忘记密码</el-button>
<el-divider direction="vertical"></el-divider>
<el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button>
</div>
</el-form>
</el-col>
</el-row>
@@ -84,7 +88,7 @@ export default {
this.passwordType = 'password'
}
this.$nextTick(() => {
this.$refs.token.focus()
this.$refs.password.focus()
})
},
handleSubmit(name) {
@@ -104,7 +108,7 @@ export default {
}
})
},
// 休息密码
// 修改密码
changePassword() {
this.$emit('on-change')
},

View File

@@ -299,11 +299,15 @@ export default {
},
watch: {
sms (n) {
console.log(n)
if (n.open === 1) this.getList();
}
},
mounted() {
if (this.isChecked === '1' && this.sms.open === 1) this.getList();
console.log(this.isChecked)
console.log(this.sms.open)
if (this.sms.open === 1) this.getList();
// if (this.isChecked === '1' && this.sms.open === 1) this.getList();
},
methods: {
editSign(){

View File

@@ -44,8 +44,8 @@
</el-card>
<el-card class="box-card" v-loading="loading">
<table-list v-if="isShowList" ref="tableLists" :sms="sms" :copy="copy" :dump="dump" :query="query" :accountInfo="accountInfo" @openService="openService"/>
<login-from v-if="isShowLogn" @on-changes="onChangeReg" @on-Login="onLogin" />
<forget-password v-if="isShow" @goback="goback" @on-Login="onLogin" :isIndex="isIndex"></forget-password>
<login-from v-if="isShowLogn" @on-change="onChangePasssword" @on-changes="onChangeReg" @on-Login="onLogin" />
<forget-password :infoData="infoData" v-if="isShow" @goback="goback" @on-Login="onLogin" :isIndex="isIndex"></forget-password>
<forget-phone v-if="isForgetPhone" @gobackPhone="gobackPhone" @on-Login="onLogin"></forget-phone>
<register-from v-if="isShowReg" @on-change="logoup" />
</el-card>
@@ -81,7 +81,8 @@ export default {
sms: { open: 0 }, // 短信信息
query: { open: 0 }, // 物流查询
dump: { open: 0 }, // 电子面单打印
copy: { open: 0 } // 商品采集
copy: { open: 0 }, // 商品采集,
infoData: {}
}
},
computed: {
@@ -130,6 +131,14 @@ export default {
this.isIndex = true;
this.passsword();
},
// 忘记密码
onChangePasssword () {
this.isIndex = false;
this.passsword();
// this.isShowLogn = false;
// this.isShow = true;
// this.isShowList = false;
},
passsword () {
this.isShowLogn = false;
this.isShow = true;
@@ -143,6 +152,7 @@ export default {
this.loading = true;
smsInfoApi().then(async res => {
let data = res;
this.infoData = res;
this.sms = {
num: data.sms.num,
open: data.sms.open,
@@ -207,6 +217,7 @@ export default {
logoutApi().then(async res => {
this.isShowLogn = true
this.isShowList = false
this.infoData.phone = '';
this.$store.dispatch('user/isLogin')
})
},