瀏覽代碼

邀请码

master
congzc 1 年之前
父節點
當前提交
7df3da4ce9
共有 3 個文件被更改,包括 26 次插入6 次删除
  1. +4
    -2
      src/views/login/login.vue
  2. +20
    -4
      src/views/model/chooseModel.vue
  3. +2
    -0
      src/views/myPage/myPage.vue

+ 4
- 2
src/views/login/login.vue 查看文件

@@ -46,7 +46,7 @@
<span class="greenColor" @click="loginType = 5">立即注册</span>
</div>
<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>
</div>
</el-form>
@@ -165,7 +165,6 @@
<!-- 邀请码 loginType=6 -->
<div class="loginBox" v-if="loginType == 6">
<el-form ref="form" :rules="rules" :model="form">
<!-- 短信验证码 -->
<el-form-item class="phone" prop="inviteCode">
<el-input v-model="form.inviteCode" placeholder="请输入您的邀请码"></el-input>
</el-form-item>
@@ -592,6 +591,9 @@ export default {
const phoneValue = localStorage.getItem('phoneValue');
this.form.phone = phoneValue ? phoneValue : '';
this.getCodeImg();
if (this.$route.query.type) {
this.loginType = this.$route.query.type;
}
},
mounted() {
this.inPage = true;


+ 20
- 4
src/views/model/chooseModel.vue 查看文件

@@ -35,7 +35,7 @@ import HeadTop from './../../components/common/head.vue';
import { Toast } from 'vant';
import { scrollToID } from '../../utils';
import { getModeList, getModeList1, getModeDetailById, saveOrUpdateUserVideo, personPatchApi } from '../../api/chooseModel';
import { doFindInviteCode } from '../../api/login';
Vue.use(Toast);
export default {
components: {
@@ -82,15 +82,31 @@ export default {
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) {
// this.currentId = id
// } else {
// this.getModeDetail(id)
// }
},

// 获取模板列表
async loadModeList(sex, pageNum, pageSize) {
try {


+ 2
- 0
src/views/myPage/myPage.vue 查看文件

@@ -376,6 +376,8 @@ export default {
* @description:查询用户邀请码状态
*/
async checkInviteCode() {
this.$router.push('/chooseModel');
return;
if (!this.hasToken) {
this.$router.push('/chooseModel');
return;


Loading…
取消
儲存