mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
教师弹框
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<!-- <div style="float:right"> -->
|
||||
<router-link v-if="pageId == userInfo.aid" to="/user/Setting"><span class="content-one-info pointer" style="line-height: 30px;">个人设置</span></router-link>
|
||||
<span v-if="pageId == userInfo.aid" style="margin-left:10px;line-height: 30px;" class="content-one-info" ><router-link to="/uc/study/courses" class="pointer" style="color:#0060FF;">个人中心</router-link></span>
|
||||
<span @click="dialogVisible = true" v-if="teaechswich" style="margin-left:10px;line-height: 30px;" class="content-one-info">教师简介</span>
|
||||
<span class="content-one-info" v-if="pageId != userInfo.aid && !isFollowHas" @click="toFollow()">关注TA</span>
|
||||
<span class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</span>
|
||||
<el-button type="text" round class="btn-user" > <router-link :to="'/home/'+pageId+'/leaving'">{{pageId == userInfo.aid ? '留言板':'去留言'}}<i class="el-icon-arrow-right"></i> </router-link> </el-button>
|
||||
@@ -74,12 +75,21 @@
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="教师信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<span>这是一段信息</span>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
import { mapGetters } from 'vuex'
|
||||
import apiTeach from '@/api/modules/teacher.js';
|
||||
import apiStart from '@/api/phase2/stat.js';
|
||||
import apiFollow from "@/api/phase2/userfollow.js"
|
||||
import apiUser from "@/api/system/user.js";
|
||||
@@ -93,6 +103,9 @@
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
teachtext:[],
|
||||
dialogVisible: false,
|
||||
teaechswich:false,
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
statData:{
|
||||
evalue: 0,//经验值
|
||||
@@ -119,7 +132,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
this.pageId = this.$xpage.getHomeId(this.$route);
|
||||
this.sex = this.userInfo.sex;
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
@@ -132,9 +145,22 @@
|
||||
if(this.pageId !== this.userInfo.aid) {
|
||||
this.followHas();
|
||||
}
|
||||
|
||||
this.Teacherprofile();
|
||||
this.Teacherinfo();
|
||||
},
|
||||
methods:{
|
||||
Teacherinfo(){
|
||||
apiTeach.detail(this.userInfo.aid).then(res =>{
|
||||
this.teachtext = res.result;
|
||||
console.log(this.teachtext);
|
||||
})
|
||||
},
|
||||
Teacherprofile(){
|
||||
console.log()
|
||||
apiTeach.has(this.userInfo.aid).then(res =>{
|
||||
this.teaechswich = res.result.isTeacher;
|
||||
})
|
||||
},
|
||||
cancelFollow() {
|
||||
apiFollow.remove(this.pageId).then(res=>{
|
||||
if(res.status == 200) {
|
||||
|
||||
Reference in New Issue
Block a user