Commit 374a3914 authored by zL's avatar zL

提交部分code

parent 66299297
......@@ -181,7 +181,7 @@ export default {
}
return;
}
that.locaVideos.push({
name: file.name,
state: "上传中",
......@@ -196,7 +196,6 @@ export default {
uploadComplete(xhr) {
//服务断接收完文件返回的结果
this.hashList.push(JSON.parse(xhr.target.response).data.hash);
this.locaVideos[this.locaVideos.length - 1].url = JSON.parse(
xhr.target.response
).data.url;
......@@ -204,6 +203,7 @@ export default {
// 失败回调
uploadFailed(xhr) {
//上传失败
console.log('请求失败');
},
},
};
......
......@@ -88,7 +88,7 @@ export default Vue.extend({
code_type: 0,
pwd: this.$md5(
String(this.passwordForm.pwd) +
this.$md5(String(this.passwordForm.pwd))
this.$md5(String(this.passwordForm.pwd.length))
),
code: this.passwordForm.code,
};
......@@ -97,7 +97,7 @@ export default Vue.extend({
email: this.passwordForm.email,
pwd: this.$md5(
String(this.passwordForm.pwd) +
this.$md5(String(this.passwordForm.pwd))
this.$md5(String(this.passwordForm.pwd.length))
),
code: this.passwordForm.code,
code_type: 1,
......
......@@ -66,6 +66,7 @@
<code-btn
@sendCode="sendCode"
:Modifyphone="true"
:newV="String(newPhone.phone)"
ref="child"
></code-btn>
</el-form-item>
......@@ -78,12 +79,7 @@
<script lang="ts">
import Vue from "vue";
import CodeBtn from "./VerCode.vue";
import {
// smsCode,
// smsCodeUnlogin,
checkOldPhone,
editPhone,
} from "./Api.service";
import { checkOldPhone, editPhone } from "./Api.service";
export default Vue.extend({
components: {
CodeBtn,
......
......@@ -88,7 +88,7 @@ export default Vue.extend({
code_type: 0,
pwd: this.$md5(
String(this.passwordForm.pwd) +
this.$md5(String(this.passwordForm.pwd))
this.$md5(String(this.passwordForm.pwd.length))
),
code: this.passwordForm.code,
};
......@@ -97,7 +97,7 @@ export default Vue.extend({
email: this.passwordForm.email,
pwd: this.$md5(
String(this.passwordForm.pwd) +
this.$md5(String(this.passwordForm.pwd))
this.$md5(String(this.passwordForm.pwd.length))
),
code: this.passwordForm.code,
code_type: 1,
......
......@@ -16,7 +16,7 @@ import { sendSms, sendEmail } from "./Api.service";
@Component
export default class VerCode extends Vue {
@Prop({ type: Boolean, default: false }) Modifyphone!: boolean;
@Prop({ type: String, default: "" }) newV!: "";
public show: boolean = true;
public count: number = 0;
public timer: number = 0;
......@@ -45,9 +45,17 @@ export default class VerCode extends Vue {
}
// 发送验证码
public async getCode() {
// return;
// 手机
if (this.$store.state.userInfos.phone !== "") {
let phone = "";
if (this.newV !== "") {
phone = this.newV;
} else {
phone = this.$store.state.userInfos.phone;
}
const res = await sendSms({
phone: this.$store.state.userInfos.phone,
phone: phone,
template_id: this.Modifyphone ? 3 : 1,
});
if (res) {
......@@ -55,6 +63,7 @@ export default class VerCode extends Vue {
this.$emit("sendCode");
}
} else {
// 邮箱
const res = await sendEmail({
email: this.$store.state.userInfos.email,
template_id: this.Modifyphone ? 3 : 1,
......
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