提交 2372d916 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 728d0874
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
"core-js": "^3.8.0", "core-js": "^3.8.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"jquery": "^3.5.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"lodash": "^4.17.20", "lodash": "^4.17.20",
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-shim.min.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-shim.min.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"></script>
<!-- 三方插件引入 --> <!-- 三方插件引入 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js" async></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/common/runtime.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/common/runtime.js"></script>
......
...@@ -94,11 +94,14 @@ export default { ...@@ -94,11 +94,14 @@ export default {
}, },
methods: { methods: {
pointScroll(){ pointScroll(){
console.log($(`#point${this.$route.query.point}`), '123')
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate({ const element = document.getElementById(`point${this.$route.query.point}`);
scrollTop: $(`#point${this.$route.query.point}`).offset().top if (element) {
}, 300) element.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -141,12 +141,13 @@ export default { ...@@ -141,12 +141,13 @@ export default {
methods: { methods: {
pointScroll() { pointScroll() {
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate( const target = document.getElementById(`point${this.$route.query.point}`);
{ if (target) {
scrollTop: $(`#point${this.$route.query.point}`).offset().top target.scrollIntoView({
}, behavior: 'smooth',
500 block: 'start'
) });
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -133,12 +133,13 @@ export default { ...@@ -133,12 +133,13 @@ export default {
methods: { methods: {
pointScroll() { pointScroll() {
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate( const target = document.getElementById(`point${this.$route.query.point}`);
{ if (target) {
scrollTop: $(`#point${this.$route.query.point}`).offset().top target.scrollIntoView({
}, behavior: 'smooth',
500 block: 'start'
) });
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -171,10 +171,14 @@ export default { ...@@ -171,10 +171,14 @@ export default {
return false return false
} }
if (n.id) { if (n.id) {
$('html, body').animate({ const target = document.getElementById(n.id);
scrollTop: $('#' + n.id).offset().top if (target) {
}) target.scrollIntoView({
return false behavior: 'smooth',
block: 'start'
});
}
return false;
} }
if (n.path) { if (n.path) {
this.$router.push(n) this.$router.push(n)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div class="tips-cen mar-t-20"> <div class="tips-cen mar-t-20">
<div class="name">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用:</div> <div class="name">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用:</div>
<div class="money">3800<span></span></div> <div class="money">{{ price }}<span></span></div>
</div> </div>
<div class="tips-top"> <div class="tips-top">
<div class="name">支付方式:</div> <div class="name">支付方式:</div>
...@@ -45,16 +45,20 @@ import action from '@action' ...@@ -45,16 +45,20 @@ import action from '@action'
import QrcodeVue from 'qrcode.vue' import QrcodeVue from 'qrcode.vue'
export default { export default {
components: { components: {
QrcodeVue QrcodeVue,
}, },
props: { props: {
formData: { formData: {
type: Object type: Object,
}, },
periods: { periods: {
type: Number, type: Number,
default: '1' default: '1',
} },
price: {
type: Number,
default: 3800,
},
}, },
data() { data() {
return { return {
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
isCodeShow: false, isCodeShow: false,
product_id: '6787934443077107712', product_id: '6787934443077107712',
payInfo: {}, payInfo: {},
time: null time: null,
} }
}, },
methods: { methods: {
...@@ -73,15 +77,15 @@ export default { ...@@ -73,15 +77,15 @@ export default {
const param = { const param = {
pay_type: this.payMethod, pay_type: this.payMethod,
product_id: this.product_id, product_id: this.product_id,
form_id: this.formData.id && this.formData.id.toString() form_id: this.formData.id && this.formData.id.toString(),
} }
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)',
}) })
action.articleAction.getOrder(param).then(res => { action.articleAction.getOrder(param).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.payInfo = res.data this.payInfo = res.data
this.isCodeShow = true this.isCodeShow = true
...@@ -98,13 +102,13 @@ export default { ...@@ -98,13 +102,13 @@ export default {
}) })
}, },
checkPay(id, order_no) { checkPay(id, order_no) {
action.articleAction.checkPay(id).then(res => { action.articleAction.checkPay(id).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const [order = {}] = res.data const [order = {}] = res.data
if (order.status === 1) { if (order.status === 1) {
this.$message({ this.$message({
message: '支付成功', message: '支付成功',
type: 'success' type: 'success',
}) })
this.payEnd(order_no) this.payEnd(order_no)
this.$emit('payStatus') this.$emit('payStatus')
...@@ -119,19 +123,19 @@ export default { ...@@ -119,19 +123,19 @@ export default {
closeClear() { closeClear() {
this.isCodeShow = false this.isCodeShow = false
this.$emit('closePayPop') this.$emit('closePayPop')
// clearInterval() clearInterval(this.time)
}, },
payEnd(orderOn) { payEnd(orderOn) {
const param = { const param = {
order_no: orderOn, order_no: orderOn,
form_id: this.formData.id.toString() form_id: this.formData.id.toString(),
}
action.articleAction.payEnd(param).then(res => {})
} }
action.articleAction.payEnd(param).then((res) => {})
},
}, },
beforeDestroy() { beforeDestroy() {
// clearInterval(this.time) // clearInterval(this.time)
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -14,6 +14,7 @@ export default [ ...@@ -14,6 +14,7 @@ export default [
contact_number: '18500913837', contact_number: '18500913837',
desc: '', desc: '',
payment: '1280元/人', payment: '1280元/人',
price: 1280,
content: `<p style="text-align: center"><strong>直播课程</strong></p> content: `<p style="text-align: center"><strong>直播课程</strong></p>
<div align="center"> <div align="center">
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="0"> <table style="width: 100%;" border="1" cellspacing="0" cellpadding="0">
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item style="height:10px;"> <el-form-item style="height: 10px">
<div class="line">发票信息填写</div> <div class="line">发票信息填写</div>
</el-form-item> </el-form-item>
<el-form-item label="发票类型" id="fplx" prop="invoice_type"> <el-form-item label="发票类型" id="fplx" prop="invoice_type">
...@@ -51,24 +51,21 @@ ...@@ -51,24 +51,21 @@
label="发票抬头" label="发票抬头"
v-if="form.invoice_type && form.invoice_type !== '无'" v-if="form.invoice_type && form.invoice_type !== '无'"
prop="invoice_title" prop="invoice_title"
:rules="{ required: true, message: '请输入发票抬头', trigger: 'blur' }" :rules="{ required: true, message: '请输入发票抬头', trigger: 'blur' }">
>
<el-input v-model="form.invoice_title"></el-input> <el-input v-model="form.invoice_title"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="纳税人识别号" label="纳税人识别号"
v-if="form.invoice_type && form.invoice_type !== '无'" v-if="form.invoice_type && form.invoice_type !== '无'"
prop="taxpayer_registration_num" prop="taxpayer_registration_num"
:rules="{ required: true, message: '请输入纳税人识别号', trigger: 'blur' }" :rules="{ required: true, message: '请输入纳税人识别号', trigger: 'blur' }">
>
<el-input v-model="form.taxpayer_registration_num"></el-input> <el-input v-model="form.taxpayer_registration_num"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="注册地址" label="注册地址"
v-if="form.invoice_type === '增值税专用发票'" v-if="form.invoice_type === '增值税专用发票'"
prop="invoice_address_mobile" prop="invoice_address_mobile"
:rules="{ required: true, message: '请输入注册地址', trigger: 'blur' }" :rules="{ required: true, message: '请输入注册地址', trigger: 'blur' }">
>
<el-input v-model="form.invoice_address_mobile"></el-input> <el-input v-model="form.invoice_address_mobile"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -76,8 +73,7 @@ ...@@ -76,8 +73,7 @@
id="account" id="account"
v-if="form.invoice_type === '增值税专用发票'" v-if="form.invoice_type === '增值税专用发票'"
prop="opening_bank_account" prop="opening_bank_account"
:rules="{ required: true, message: '请输入开户行及账号', trigger: 'blur' }" :rules="{ required: true, message: '请输入开户行及账号', trigger: 'blur' }">
>
<el-input v-model="form.opening_bank_account"></el-input> <el-input v-model="form.opening_bank_account"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="发票内容" id="sh" v-if="form.invoice_type && form.invoice_type !== '无'"> <el-form-item label="发票内容" id="sh" v-if="form.invoice_type && form.invoice_type !== '无'">
...@@ -134,9 +130,7 @@ ...@@ -134,9 +130,7 @@
> >
</template> </template>
<template v-else> <template v-else>
<el-button style="width: 100px; margin-left: 10px" type="primary" @click="formVerification(onSubmit)" <el-button style="width: 100px" type="primary" @click="formVerification(onSubmit)">提 交</el-button>
>提 交</el-button
>
<el-button <el-button
v-if="!hidePayBtn" v-if="!hidePayBtn"
style="width: 100px; margin-left: 10px" style="width: 100px; margin-left: 10px"
...@@ -160,11 +154,11 @@ ...@@ -160,11 +154,11 @@
<pay-pop <pay-pop
v-show="isPayPopShow" v-show="isPayPopShow"
:formData="form" :formData="form"
:price="detail.price"
:periods="id" :periods="id"
@payStatus="payStatus" @payStatus="payStatus"
@closePayPop="closePayPop" @closePayPop="closePayPop"
class="payPop" class="payPop" />
/>
</div> </div>
</template> </template>
<script> <script>
...@@ -173,13 +167,16 @@ import action from '@action' ...@@ -173,13 +167,16 @@ import action from '@action'
import breadcrumb from '@/components/breadcrumb' import breadcrumb from '@/components/breadcrumb'
import payPop from './components/payPop' import payPop from './components/payPop'
import nations from '@/tool/nations' import nations from '@/tool/nations'
const IDCARD_REG = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/ import datalist from './data.js'
const IDCARD_REG =
/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/
const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/ const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
const EMAIL_REG = /^[A-Za-z0-9]+([_\.\\-][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/ const EMAIL_REG = /^[A-Za-z0-9]+([_\.\\-][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
export default { export default {
components: { components: {
breadcrumb, breadcrumb,
payPop payPop,
}, },
data() { data() {
const IDChecked = (rule, value, callback) => { const IDChecked = (rule, value, callback) => {
...@@ -201,16 +198,17 @@ export default { ...@@ -201,16 +198,17 @@ export default {
} }
} }
return { return {
datalist,
isInfoNull: false, isInfoNull: false,
isPayStatus: false, isPayStatus: false,
crumbData: [ crumbData: [
{ {
path: '/', path: '/',
name: '首页' name: '首页',
}, },
{ {
name: '师资培训' name: '师资培训',
} },
], ],
nations: nations, nations: nations,
form: { form: {
...@@ -230,7 +228,7 @@ export default { ...@@ -230,7 +228,7 @@ export default {
opening_bank_account: '', opening_bank_account: '',
invoice_detail: '非学历教育*培训费', invoice_detail: '非学历教育*培训费',
mobile: '', mobile: '',
checked_code: '' checked_code: '',
}, },
rules: { rules: {
school_name: { required: true, message: '请输入院校名称', trigger: 'blur' }, school_name: { required: true, message: '请输入院校名称', trigger: 'blur' },
...@@ -239,18 +237,18 @@ export default { ...@@ -239,18 +237,18 @@ export default {
nation: { required: true, message: '请输入民族', trigger: 'blur' }, nation: { required: true, message: '请输入民族', trigger: 'blur' },
id_num: [ id_num: [
{ required: true, message: '请输入身份证号', trigger: 'blur' }, { required: true, message: '请输入身份证号', trigger: 'blur' },
{ validator: IDChecked, trigger: 'blur' } { validator: IDChecked, trigger: 'blur' },
], ],
live_status: { required: true, message: '请选择居住方式', trigger: 'change' }, live_status: { required: true, message: '请选择居住方式', trigger: 'change' },
invoice_type: { required: true, message: '请选择发票类型', trigger: 'change' }, invoice_type: { required: true, message: '请选择发票类型', trigger: 'change' },
mobile: [ mobile: [
{ required: true, message: '请输入手机号', trigger: 'blur' }, { required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: mobileChecked, trigger: 'blur' } { validator: mobileChecked, trigger: 'blur' },
] ],
}, },
isBtnDisabled: false, isBtnDisabled: false,
isPayPopShow: false, isPayPopShow: false,
isLogin: false isLogin: false,
} }
}, },
computed: { computed: {
...@@ -261,13 +259,16 @@ export default { ...@@ -261,13 +259,16 @@ export default {
}, },
hidePayBtn() { hidePayBtn() {
return [6, 202201, 202202, 2022001, 2022002].includes(this.id) return [6, 202201, 202202, 2022001, 2022002].includes(this.id)
} },
detail() {
return this.datalist.find((item) => item.id == this.id) || {}
},
}, },
created() { created() {
if (!this.id) { if (!this.id) {
this.$router.push('/train') this.$router.push('/train')
} }
action.articleAction.getUserInfo().then(res => { action.articleAction.getUserInfo().then((res) => {
if (res && res.code === 0) { if (res && res.code === 0) {
window.sessionStorage.userInfo = JSON.stringify(res.data) window.sessionStorage.userInfo = JSON.stringify(res.data)
this.isLogin = true this.isLogin = true
...@@ -276,13 +277,13 @@ export default { ...@@ -276,13 +277,13 @@ export default {
}) })
}, },
mounted() { mounted() {
// $('#name label').html('姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名') // document.querySelector('#name label').innerHTML = '姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名'
$('#sex>label').html('性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别') // document.querySelector('#sex>label').innerHTML = '性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别'
$('#mz>label').html('民&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;族') // document.querySelector('#mz>label').innerHTML = '民&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;族'
// $('#mail label').html('邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱') // document.querySelector('#mail label').innerHTML = '邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱'
// $('#zs>label').html('单&nbsp;/合住') // document.querySelector('#zs>label').innerHTML = '单&nbsp;/合住'
// $('#account label').html('账&nbsp;&nbsp;&nbsp;号') // document.querySelector('#account label').innerHTML = '账&nbsp;&nbsp;&nbsp;号'
// $('#sh label').html('税&nbsp;&nbsp;&nbsp;号') // document.querySelector('#sh label').innerHTML = '税&nbsp;&nbsp;&nbsp;号'
}, },
methods: { methods: {
goPay() { goPay() {
...@@ -296,9 +297,9 @@ export default { ...@@ -296,9 +297,9 @@ export default {
getDetail(call) { getDetail(call) {
// 登录状态不需要手机号验证码 // 登录状态不需要手机号验证码
const params = { const params = {
periods: this.id periods: this.id,
} }
action.articleAction.getFormDetail(params).then(res => { action.articleAction.getFormDetail(params).then((res) => {
if (res.code === 200) { if (res.code === 200) {
if (!Object.keys(res.data.detail).length) { if (!Object.keys(res.data.detail).length) {
this.isInfoNull = true this.isInfoNull = true
...@@ -315,7 +316,7 @@ export default { ...@@ -315,7 +316,7 @@ export default {
}, },
// 支付 // 支付
checkPay(id, call) { checkPay(id, call) {
action.articleAction.checkPay(id).then(res => { action.articleAction.checkPay(id).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const [order = {}] = res.data const [order = {}] = res.data
if (order.status === 1) { if (order.status === 1) {
...@@ -372,7 +373,7 @@ export default { ...@@ -372,7 +373,7 @@ export default {
this.form.order_no = '1' this.form.order_no = '1'
} }
} }
this.$refs.form.validate(valid => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
call() call()
} else { } else {
...@@ -435,7 +436,7 @@ export default { ...@@ -435,7 +436,7 @@ export default {
// 登录了直接走报名表单 没有登录走注册登录后再走报名表单 // 登录了直接走报名表单 没有登录走注册登录后再走报名表单
if (this.isLogin) { if (this.isLogin) {
this.sendEnrollInfo() this.sendEnrollInfo()
.then(res => { .then((res) => {
this.isInfoNull = false this.isInfoNull = false
this.getDetail() this.getDetail()
this.message('提交成功!', 'success', 6000) this.message('提交成功!', 'success', 6000)
...@@ -444,7 +445,7 @@ export default { ...@@ -444,7 +445,7 @@ export default {
// this.message('手机号注册成功!','success', 6000) // this.message('手机号注册成功!','success', 6000)
// }, 300) // }, 300)
}) })
.catch(error => { .catch((error) => {
if (error && error.type === 'register') { if (error && error.type === 'register') {
// this.message('报名信息提交成功!','success', 6000) // this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => { // setTimeout(() => {
...@@ -456,10 +457,10 @@ export default { ...@@ -456,10 +457,10 @@ export default {
} }
}) })
} else { } else {
this.defaultRegister().then(res => { this.defaultRegister().then((res) => {
this.getDetail( this.getDetail(
this.sendEnrollInfo() this.sendEnrollInfo()
.then(res => { .then((res) => {
this.message('报名信息提交成功!', 'success', 6000) this.message('报名信息提交成功!', 'success', 6000)
// this.message('报名信息修改成功!','success', 6000) // this.message('报名信息修改成功!','success', 6000)
// setTimeout(() => { // setTimeout(() => {
...@@ -469,7 +470,7 @@ export default { ...@@ -469,7 +470,7 @@ export default {
this.$router.go(0) this.$router.go(0)
}, 1000) }, 1000)
}) })
.catch(error => { .catch((error) => {
if (error && error.type === 'register') { if (error && error.type === 'register') {
// this.message('报名信息提交成功!','success', 6000) // this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => { // setTimeout(() => {
...@@ -497,18 +498,18 @@ export default { ...@@ -497,18 +498,18 @@ export default {
form.invoice_detail = '' form.invoice_detail = ''
} }
} }
action.articleAction.formCommit(form).then(res => { action.articleAction.formCommit(form).then((res) => {
if (res && res.code === 200) { if (res && res.code === 200) {
resolve({ resolve({
type: 'enroll', type: 'enroll',
state: 'success', state: 'success',
msg: '报名信息提交成功' msg: '报名信息提交成功',
}) })
} else { } else {
reject({ reject({
type: 'enroll', type: 'enroll',
state: 'fail', state: 'fail',
msg: res.msg || '报名信息提交失败' msg: res.msg || '报名信息提交失败',
}) })
} }
}) })
...@@ -523,18 +524,18 @@ export default { ...@@ -523,18 +524,18 @@ export default {
} else { } else {
let param = { let param = {
account: this.form.mobile, account: this.form.mobile,
service: 'sofia.ezijing.com' service: 'sofia.ezijing.com',
} }
action.articleAction.sendCheckedCode(param).then(res => { action.articleAction.sendCheckedCode(param).then((res) => {
if (res && res.code === 0) { if (res && res.code === 0) {
this.$message({ this.$message({
message: '验证码发送成功', message: '验证码发送成功',
type: 'success' type: 'success',
}) })
} else { } else {
this.$message({ this.$message({
message: res.msg || '发送验证码失败', message: res.msg || '发送验证码失败',
type: 'error' type: 'error',
}) })
} }
}) })
...@@ -549,9 +550,9 @@ export default { ...@@ -549,9 +550,9 @@ export default {
if (count < 1) { if (count < 1) {
clearInterval(timer) clearInterval(timer)
this.isBtnDisabled = false this.isBtnDisabled = false
$('#checkedCode').html('获取验证码') document.querySelector('#checkedCode').innerHTML = '获取验证码'
} else { } else {
$('#checkedCode').html(count + '秒后重发') document.querySelector('#checkedCode').innerHTML = count + '秒后重发'
} }
}, 1000) }, 1000)
}, },
...@@ -592,32 +593,32 @@ export default { ...@@ -592,32 +593,32 @@ export default {
mobile: this.form.mobile, mobile: this.form.mobile,
code: this.form.checked_code, code: this.form.checked_code,
nickname: this.form.username || this.randomNickname(), nickname: this.form.username || this.randomNickname(),
project_id: 5002 project_id: 5002,
// password: '123456', // password: '123456',
// secret: true, // secret: true,
// service: 'sofia.ezijing.com' // service: 'sofia.ezijing.com'
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
action.articleAction.register2(param).then(res => { action.articleAction.register2(param).then((res) => {
if (res && res.code === 0) { if (res && res.code === 0) {
//code: 0注册成功 5已注册 //code: 0注册成功 5已注册
resolve({ resolve({
type: 'register', type: 'register',
state: 'success', state: 'success',
msg: 'success' msg: 'success',
}) })
} else if (res && res.code === 5) { } else if (res && res.code === 5) {
reject({ reject({
type: 'register', type: 'register',
state: 'fail', state: 'fail',
msg: res.msg || '此手机号已经被注册' msg: res.msg || '此手机号已经被注册',
}) })
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
reject({ reject({
type: 'register', type: 'register',
state: 'fail', state: 'fail',
msg: res.msg || '注册失败' msg: res.msg || '注册失败',
}) })
} }
}) })
...@@ -644,19 +645,19 @@ export default { ...@@ -644,19 +645,19 @@ export default {
this.$message({ this.$message({
message: errMsg, message: errMsg,
type: type || 'info', type: type || 'info',
duration: dur || 3000 duration: dur || 3000,
}) })
}, },
fetchUpdateUserInfo() { fetchUpdateUserInfo() {
console.log(1111) console.log(1111)
const params = { const params = {
real_name: this.form.username || '' real_name: this.form.username || '',
} }
action.articleAction.updateUserInfo(params).then(res => { action.articleAction.updateUserInfo(params).then((res) => {
console.log(res) console.log(res)
}) })
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论