|
@@ -48,7 +48,7 @@ export default {
|
|
|
methods: {
|
|
|
// selectSnameByCid
|
|
|
nextSteps() {
|
|
|
- let reg = /^[A-Za-z0-9]{4,}$/
|
|
|
+ let reg = /^[A-Za-z0-9]{3,}$/
|
|
|
if (!reg.test(this.icode)) {
|
|
|
this.$message.error("请正确填写随机码")
|
|
|
return;
|
|
@@ -59,17 +59,12 @@ export default {
|
|
|
};
|
|
|
this.loading = true
|
|
|
this.ajax
|
|
|
- .get(this.$store.state.api + "selectCourseByIc", params)
|
|
|
+ .get(this.$store.state.api + "selectCourseByIc2", params)
|
|
|
.then(res => {
|
|
|
this.loading = false;
|
|
|
if (res.data.length && res.data[0].length) {
|
|
|
this.res = res.data[0][0]
|
|
|
- let _inviteCode = JSON.parse(res.data[0][0].inviteCode)
|
|
|
- for(var i = 0;i<_inviteCode.length;i++){
|
|
|
- if(_inviteCode[i].ic == this.icode){
|
|
|
- this.getClass(_inviteCode[i].cid)
|
|
|
- }
|
|
|
- }
|
|
|
+ this.getClass(res.data[0][0].classid)
|
|
|
} else {
|
|
|
this.$message.error("不存在此随机码")
|
|
|
}
|