|
|
@@ -58,7 +58,11 @@ import { |
|
|
|
formatSeconds, |
|
|
|
} from "../../utils"; |
|
|
|
// 接口 |
|
|
|
import { getVideoList, doGetVideoDetialById } from "../../api/myPage"; |
|
|
|
import { |
|
|
|
getVideoList, |
|
|
|
doGetVideoDetialById, |
|
|
|
doFindInviteCode, |
|
|
|
} from "../../api/myPage"; |
|
|
|
|
|
|
|
Vue.use(Toast); |
|
|
|
export default { |
|
|
@@ -175,6 +179,26 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* @description:查询用户邀请码状态 |
|
|
|
*/ |
|
|
|
async checkInviteCode() { |
|
|
|
try { |
|
|
|
const res = await doFindInviteCode(); |
|
|
|
console.log(res, "查询用户邀请码数据"); |
|
|
|
const status = res.data.status; |
|
|
|
|
|
|
|
if (status == 1) { |
|
|
|
this.goCreateNew(); |
|
|
|
// 当没有邀请码时 |
|
|
|
} else if (status == 0) { |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error, "error"); |
|
|
|
Toast.fail(error.message); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
goCreateNew() { |
|
|
|
this.$router.push("/chooseModel"); |
|
|
|
}, |
|
|
|