|
@@ -17,15 +17,16 @@
|
|
|
<div><span>欢迎回来!</span></div>
|
|
|
<img src="../../../assets/icon/inviteLogin/school.png" style="bottom: -40px;" alt="">
|
|
|
</div>
|
|
|
- <div class="i_box_login">
|
|
|
-
|
|
|
- <el-select v-model="userid" placeholder="选择姓名" filterable class="select">
|
|
|
+ <div class="i_box_login2">
|
|
|
+ <div v-for="item in classJuri" @click="login(item.userid,(item.name ? item.name : item.username))" :key="item.userid">{{ item.name ? item.name :
|
|
|
+ item.username }}</div>
|
|
|
+ <!-- <el-select v-model="userid" placeholder="选择姓名" filterable class="select">
|
|
|
<el-option v-for="item in classJuri" :key="item.userid" :label="item.name ? item.name : item.username"
|
|
|
:value="item.userid">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
|
|
|
- <div @click="login" class="button">登 录</div>
|
|
|
+ <div @click="login" class="button">登 录</div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -42,20 +43,21 @@ export default {
|
|
|
loading: false,
|
|
|
res: {},
|
|
|
classJuri: [],
|
|
|
- code:this.$route.query.code
|
|
|
+ code: this.$route.query.code
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// selectSnameByCid
|
|
|
nextSteps() {
|
|
|
- let reg = /^[A-Za-z0-9]{3,}$/
|
|
|
+ // let reg = /^[A-Za-z0-9]{2,}$/
|
|
|
+ let reg = /^[0-9]{2,}$/
|
|
|
if (!reg.test(this.icode)) {
|
|
|
this.$message.error("请正确填写随机码")
|
|
|
return;
|
|
|
}
|
|
|
let params = {
|
|
|
code: this.icode,
|
|
|
- oid:this.code,
|
|
|
+ oid: this.code,
|
|
|
};
|
|
|
this.loading = true
|
|
|
this.ajax
|
|
@@ -87,18 +89,23 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
- login() {
|
|
|
- if(!this.userid){
|
|
|
- this.$message.error("请选择姓名")
|
|
|
- return;
|
|
|
- }
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- tools: "inviteLogin",
|
|
|
- userid: this.userid,
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
+ login(userid,username) {
|
|
|
+ this.$confirm(`确定登录${username}的账号吗?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ tools: "inviteLogin",
|
|
|
+ userid: userid,
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -152,6 +159,34 @@ export default {
|
|
|
align-items: center;
|
|
|
padding: 50px 20px;
|
|
|
box-sizing: border-box;
|
|
|
+ align-content: flex-start;
|
|
|
+}
|
|
|
+
|
|
|
+.i_box_login2 {
|
|
|
+ height: calc(100% - 145px);
|
|
|
+ background: linear-gradient(90deg, #477cd7, #65b9fc);
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ overflow: auto;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.i_box_login2 div{
|
|
|
+ cursor: pointer;
|
|
|
+ width: 80px;
|
|
|
+ text-align: center;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 0 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: rgb(225, 237, 255);
|
|
|
+ margin: 10px 9px 0;
|
|
|
+ color: rgb(37 124 255);
|
|
|
+ border-radius: 5px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
|
|
|
.i_box_login .input {}
|