|
|
@@ -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 { |
|
|
|