mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
教师弹框
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
<!-- <div style="float:right"> -->
|
<!-- <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>
|
<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 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="content-one-info" v-if="pageId != userInfo.aid && !isFollowHas" @click="toFollow()">关注TA</span>
|
||||||
<span class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
title="教师信息"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="30%"
|
||||||
|
>
|
||||||
|
<span>这是一段信息</span>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import apiTeach from '@/api/modules/teacher.js';
|
||||||
import apiStart from '@/api/phase2/stat.js';
|
import apiStart from '@/api/phase2/stat.js';
|
||||||
import apiFollow from "@/api/phase2/userfollow.js"
|
import apiFollow from "@/api/phase2/userfollow.js"
|
||||||
import apiUser from "@/api/system/user.js";
|
import apiUser from "@/api/system/user.js";
|
||||||
@@ -93,6 +103,9 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
teachtext:[],
|
||||||
|
dialogVisible: false,
|
||||||
|
teaechswich:false,
|
||||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
statData:{
|
statData:{
|
||||||
evalue: 0,//经验值
|
evalue: 0,//经验值
|
||||||
@@ -132,9 +145,22 @@
|
|||||||
if(this.pageId !== this.userInfo.aid) {
|
if(this.pageId !== this.userInfo.aid) {
|
||||||
this.followHas();
|
this.followHas();
|
||||||
}
|
}
|
||||||
|
this.Teacherprofile();
|
||||||
|
this.Teacherinfo();
|
||||||
},
|
},
|
||||||
methods:{
|
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() {
|
cancelFollow() {
|
||||||
apiFollow.remove(this.pageId).then(res=>{
|
apiFollow.remove(this.pageId).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
|
|||||||
Reference in New Issue
Block a user