Commit 374a3914 authored by zL's avatar zL

提交部分code

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