123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479 |
- <template>
- <view class="mine">
- <view class="top">
- <view class="info" >
- <view class="img" :style="{backgroundImage:'url('+ (mine.type_model? mine.type_model.headimg : '../../static/images/avator.png') +')'}">
- <!-- <image :src="mine.type_model? mine.type_model.headimg : '../../static/images/avator.png'" mode=""></image> -->
- </view>
- <view class="info_name">
- {{mine.type_model ? mine.type_model.truename :'--'}}
- </view>
- <view class="edit" @click="edit">
- <text>编辑资料</text>
- <image src="../../static/images/edit_arrow.png" mode=""></image>
- </view>
- </view>
-
- </view>
- <view class="content">
- <view class="header">
- <view class="header_wrap">
- <view class="right first">
- <view class="dot">
-
- </view>
- <view class="text">
- <text>学科:</text>
- {{mine.type_model ? mine.type_model.subject :'--'}}
- </view>
- </view>
- <view class="right">
- <view class="dot">
-
- </view>
- <view class="text">
- <text>账号:</text>
- {{mine.type_model ? mine.type_model.account :'--'}}
- </view>
- </view>
- <view class="right third">
- <view class="dot">
-
- </view>
- <view class="text">
- <text>毕业院校:</text>
- {{mine.type_model ? mine.type_model.school :'--'}}
- </view>
- </view>
- <!-- <view class="right">
- <view class="dot">
-
- </view>
- <view class="text">
- <text>职称:</text>
- {{mine.type_model ? mine.type_model.rank :'--'}}
- </view>
- </view> -->
- </view>
- <view class="tip">
- <view class="item">
- <view class="nums">
- {{statistical.subscribe_nums}}
- </view>
- <view class="text">
- 学生人数
- </view>
- </view>
- <view class="item">
- <view class="nums">
- {{statistical.activity_nums}}
- </view>
- <view class="text">
- 发布活动
- </view>
- </view>
- <view class="item">
- <view class="nums">
- {{statistical.scheduling_nums}}
- </view>
- <view class="text">
- 值班次数
- </view>
- </view>
-
- </view>
- </view>
- <view class="list">
-
- <view class="item" @click="record" v-if="$transformAuth('100202')">
- <view class="left">
- <image src="../../static/images/list_1.png" mode=""></image>
- <text>我的值班</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" @click="notice">
- <view class="left">
- <image class="item_2" src="../../static/images/list_2.png" mode=""></image>
- <text>通知公告</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" @click="history">
- <view class="left">
- <image class="item_3" src="../../static/images/list_3.png" mode=""></image>
- <text>历史发布</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" v-if="Isopen && type==1" @click="to_pingjia">
- <view class="left">
- <image class="item_3" src="../../static/images/wenjuan.png" mode=""></image>
- <text>导师量化自评</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" @click="to_liuyan" v-if="$transformAuth('101100')">
- <view class="left">
- <image class="item_3" src="../../static/images/liuyan.png" mode=""></image>
- <text>留言列表</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" @click="to_shuangchuang" v-if="$transformAuth('101702')">
- <view class="left">
- <image class="item_3" src="../../static/images/chuang.png" mode=""></image>
- <text>双创列表</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- <view class="item" @click="change_password">
- <view class="left">
- <image class="item_3" src="../../static/images/change_pwd.png" mode=""></image>
- <text>修改密码</text>
- </view>
- <view class="right">
- <image src="../../static/images/list_arrow.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- <view class="exit" @click="exit">
- 退出登录
- </view>
- <view class="banben">v1.0.1</view>
- <tab-bar :current="4"></tab-bar>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- background: 'rgba(255,255,255,0)',
- mine: '',
- statistical: '', //统计信息
- Isopen:false,
- type:''
- }
- },
- onShow() {
- if (this.is_weixin()) {
- this.navTitle()
- }
- console.log(this.$store.state.vuex_user)
- this.$u.get('/base/auth/me').then(res => {
- this.mine = res.data
- if(this.mine.type_model){
- this.type = this.mine.type_model.type
- }
- console.log(this.mine,'mine')
- })
- this.getStatistical()
- },
- onLoad() {
- this.getIsopen()
- },
- methods: {
- //判断是否是微信
- is_weixin() {
- let ua = navigator.userAgent.toLowerCase();
- return ua.indexOf('micromessenger') != -1;
- },
- navTitle() {
- let navTitle = document.getElementsByTagName('uni-page-head');
- navTitle[0].style.display = 'none'
- },
- //统计信息
- getStatistical() {
- this.$u.get('/statistical').then(res => {
- console.log(res, 'ppp')
- this.statistical = res.data
- })
- },
- notice() {
- uni.navigateTo({
- url: './notice'
- })
- },
- //历史发布
- history() {
- uni.navigateTo({
- url: '../activity/history'
- })
- },
- record() {
- uni.navigateTo({
- url: './record'
- })
- },
- //退出登录
- exit() {
- this.$u.get('/base/auth/logout').then(res => {
- this.$u.vuex('vuex_token', '');
- this.$u.vuex('vuex_user', '');
- uni.reLaunch({
- url: '../login/index'
- })
- })
- },
- //编辑资料
- edit() {
- uni.navigateTo({
- url: '../index/realname?type=0'
- })
- },
- to_pingjia(){
- console.log(this.mine.type_model.id,'this.mine.type_model.id')
- uni.navigateTo({
- url:'../wenjuan/wenjuan?id='+this.mine.type_model.id
- })
- },
- getIsopen(){
- this.$u.get('/answer/is-answer-display-status').then(res => {
- console.log(res, '=======')
- this.Isopen = res.data.status
- })
- },
- change_password(){
- uni.navigateTo({
- url:'change_pwd'
- })
- },
- to_liuyan(){
- uni.navigateTo({
- url:'liuyan?tea_id='+this.mine.type_id
- })
- },
- to_shuangchuang(){
- uni.navigateTo({
- url:'shuangchuang'
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #eee;
- padding-bottom: 70px;
- }
- .mine {
- .top {
- height:214px;
- background: url(../../static/images/mine_bg.png);
- .info{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding-top: 38px;
- .img{
- width: 60px;
- height: 60px;
- border-radius: 50%;
- overflow: hidden;
- margin-bottom: 2px;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- // image{
- // width: 60px;
- // height: 60px;
- // }
- }
- .info_name{
- font-weight: 500;
- font-size: 18px;
- line-height: 25px;
- color: #FFFFFF;
- }
- .edit {
- height: 17px;
- color: #fff;
- opacity: 0.8;
- font-weight: normal;
- font-size: 12px;
- line-height: 17px;
- margin-left: 3px;
- image{
- display: inline-block;
- vertical-align: middle;
- width: 4px;
- height: 6px;
- margin-left: 5px;
- }
- }
- }
-
- }
- .content {
- padding: 0 15px;
- margin-top: -60px;
- z-index: 2;
- .header {
- padding: 20px 15px 0;
- background-color: #fff;
- width: 100%;
- border-radius: 4px;
- .header_wrap{
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-items: center;
- }
- image {
- flex: 0 0 68px;
- height: 68px;
- width: 68px;
- margin-right: 16px;
- border-radius: 50%;
- }
- .right {
- width: 45%;
- display: flex;
- align-items: center;
- .dot{
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background-color: #F1A321;
- margin-right: 8px;
- display: inline-block;
- flex-shrink: 0;
- }
- .text{
- overflow: hidden; //超出部分隐藏
- text-overflow: ellipsis; //超出部分使用省略号
- display: -webkit-box;//布局
- -webkit-line-clamp: 1;
- line-clamp: 1;//设置两行显示
- -webkit-box-orient: vertical;
- word-break: break-all;
- font-weight: normal;
- font-size: 13px;
- line-height: 14px;
- color: #222222;
- opacity: 0.8;
- text{
- font-weight: normal;
- font-size: 13px;
- line-height: 14px;
- color: #666666;
- opacity: 0.8;
- }
- }
-
- }
- .first{
- width: 55%;
- }
- .third{
- width: 100%;
- margin-bottom: 20px;
- margin-top: 10px;
- }
- .tip {
- padding: 30px 0;
- display: flex;
- align-items: center;
- justify-content: space-around;
- padding: 15px 0 25px 0;
- border-top: 1px solid #DDDDDD;
- .item {
- text-align: center;
- .nums {
- margin-right: 6px;
- font-weight: 500;
- font-size: 18px;
- line-height: 25px;
- color: #138E57;
- }
-
- .text {
- font-weight: normal;
- font-size: 14px;
- line-height: 20px;
- color: #353535;
- }
- }
- }
- }
-
- .list {
- background-color: #fff;
- padding: 0 16px;
- margin-top: 15px;
- .item {
- height:55px;
- line-height: 55px;
- display: flex;
- align-items: center;
- border-bottom: 1px solid rgba(238, 238, 238, .53);
- .left {
- font-weight: normal;
- font-size: 15px;
- flex: 1;
- color: #0C0C0C;
- display: flex;
- align-items: center;
- image{
- width: 24px;
- height: 24px;
- margin-right: 10px;
- }
-
- }
- .right{
- flex-shrink: 0;
- image{
- width: 4px;
- height: 6px;
- }
- }
- }
- }
- }
- .exit {
- font-size: 18px;
- font-family: PingFang SC;
- font-weight: bold;
- line-height: 20px;
- color: #393939;
- padding: 18px 0;
- text-align: center;
- margin: 20px 16px 0;
- background-color: #fff;
- }
- .banben{
- text-align: center;
- color: #999999;
- font-size: 12px;
- margin-top: 20px;
- margin-bottom: 10px;
- }
- }
- </style>
|