@@ -46,7 +46,7 @@ | |||||
<span class="greenColor" @click="loginType = 5">立即注册</span> | <span class="greenColor" @click="loginType = 5">立即注册</span> | ||||
</div> | </div> | ||||
<div class="toHome wordColor"> | <div class="toHome wordColor"> | ||||
<img src="../../assets/icon/icon-home.png" alt="" /> | |||||
<!-- <img src="../../assets/icon/icon-home.png" alt="" /> --> | |||||
<span @click="$router.push('myPage')">回到首页</span> | <span @click="$router.push('myPage')">回到首页</span> | ||||
</div> | </div> | ||||
</el-form> | </el-form> | ||||
@@ -165,7 +165,6 @@ | |||||
<!-- 邀请码 loginType=6 --> | <!-- 邀请码 loginType=6 --> | ||||
<div class="loginBox" v-if="loginType == 6"> | <div class="loginBox" v-if="loginType == 6"> | ||||
<el-form ref="form" :rules="rules" :model="form"> | <el-form ref="form" :rules="rules" :model="form"> | ||||
<!-- 短信验证码 --> | |||||
<el-form-item class="phone" prop="inviteCode"> | <el-form-item class="phone" prop="inviteCode"> | ||||
<el-input v-model="form.inviteCode" placeholder="请输入您的邀请码"></el-input> | <el-input v-model="form.inviteCode" placeholder="请输入您的邀请码"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -592,6 +591,9 @@ export default { | |||||
const phoneValue = localStorage.getItem('phoneValue'); | const phoneValue = localStorage.getItem('phoneValue'); | ||||
this.form.phone = phoneValue ? phoneValue : ''; | this.form.phone = phoneValue ? phoneValue : ''; | ||||
this.getCodeImg(); | this.getCodeImg(); | ||||
if (this.$route.query.type) { | |||||
this.loginType = this.$route.query.type; | |||||
} | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.inPage = true; | this.inPage = true; | ||||
@@ -35,7 +35,7 @@ import HeadTop from './../../components/common/head.vue'; | |||||
import { Toast } from 'vant'; | import { Toast } from 'vant'; | ||||
import { scrollToID } from '../../utils'; | import { scrollToID } from '../../utils'; | ||||
import { getModeList, getModeList1, getModeDetailById, saveOrUpdateUserVideo, personPatchApi } from '../../api/chooseModel'; | import { getModeList, getModeList1, getModeDetailById, saveOrUpdateUserVideo, personPatchApi } from '../../api/chooseModel'; | ||||
import { doFindInviteCode } from '../../api/login'; | |||||
Vue.use(Toast); | Vue.use(Toast); | ||||
export default { | export default { | ||||
components: { | components: { | ||||
@@ -82,15 +82,31 @@ export default { | |||||
this.phase = num; | this.phase = num; | ||||
}, | }, | ||||
selectModel(id) { | |||||
this.getModeDetail(id); | |||||
async selectModel(id) { | |||||
//查询有没有邀请码,没有邀请码则不能进入编辑页,而进入输入邀请码页 | |||||
try { | |||||
const res2 = await personPatchApi(id); | |||||
const res = await doFindInviteCode(); | |||||
console.log(res, '查询用户邀请码数据'); | |||||
const status = res.data.status; | |||||
// 当没有邀请码时 | |||||
if (status == 0) { | |||||
scrollToID('top'); | |||||
this.$router.push({ path: '/login', query: { type: 6, modelId: res2.data.id } }); | |||||
} else if (status == 1) { | |||||
this.getModeDetail(id); | |||||
} | |||||
} catch (error) { | |||||
console.log(error); | |||||
} | |||||
// this.getModeDetail(id); | |||||
// if (this.currentId != id) { | // if (this.currentId != id) { | ||||
// this.currentId = id | // this.currentId = id | ||||
// } else { | // } else { | ||||
// this.getModeDetail(id) | // this.getModeDetail(id) | ||||
// } | // } | ||||
}, | }, | ||||
// 获取模板列表 | // 获取模板列表 | ||||
async loadModeList(sex, pageNum, pageSize) { | async loadModeList(sex, pageNum, pageSize) { | ||||
try { | try { | ||||
@@ -376,6 +376,8 @@ export default { | |||||
* @description:查询用户邀请码状态 | * @description:查询用户邀请码状态 | ||||
*/ | */ | ||||
async checkInviteCode() { | async checkInviteCode() { | ||||
this.$router.push('/chooseModel'); | |||||
return; | |||||
if (!this.hasToken) { | if (!this.hasToken) { | ||||
this.$router.push('/chooseModel'); | this.$router.push('/chooseModel'); | ||||
return; | return; | ||||