|
@@ -964,25 +964,25 @@ export default {
|
|
|
// },
|
|
|
async getInviteCode(cid) {
|
|
|
let code = this.randomNumber();
|
|
|
- let params = {
|
|
|
- code: code,
|
|
|
- oid: this.oid,
|
|
|
- }
|
|
|
- let type = 1
|
|
|
- for (var i = 0; i < this.inviteCode.length; i++) {
|
|
|
- if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
|
|
|
- type = 2
|
|
|
- }
|
|
|
- }
|
|
|
- if (type == 2) {
|
|
|
- this.getInviteCode(cid)
|
|
|
- return;
|
|
|
- }
|
|
|
- const res = await this.ajax.get(this.$store.state.api + "selectInviteCode2", params)
|
|
|
- if (res.data.length && res.data[0].length && res.data[0][0].courseId != this.cid) {
|
|
|
- this.getInviteCode(cid)
|
|
|
- return;
|
|
|
- }
|
|
|
+ // let params = {
|
|
|
+ // code: code,
|
|
|
+ // oid: this.oid,
|
|
|
+ // }
|
|
|
+ // let type = 1
|
|
|
+ // for (var i = 0; i < this.inviteCode.length; i++) {
|
|
|
+ // if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
|
|
|
+ // type = 2
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (type == 2) {
|
|
|
+ // this.getInviteCode(cid)
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // const res = await this.ajax.get(this.$store.state.api + "selectInviteCode2", params)
|
|
|
+ // if (res.data.length && res.data[0].length && res.data[0][0].courseId != this.cid) {
|
|
|
+ // this.getInviteCode(cid)
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
let array = []
|
|
|
for (var i = 0; i < this.inviteCode.length; i++) {
|