|
@@ -2,10 +2,10 @@
|
|
|
<view>
|
|
|
<statusBar :item="navBarData"></statusBar>
|
|
|
<!-- 消息提示 -->
|
|
|
-
|
|
|
+
|
|
|
<msgPop></msgPop>
|
|
|
<view class="mineBox">
|
|
|
- <view class="userInformation" >
|
|
|
+ <view class="userInformation">
|
|
|
<view class="userAvatar" @click="gotoMineEdit">
|
|
|
<image
|
|
|
:src="userAvatar!=='' ? userAvatar : 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar_default.png'"
|
|
@@ -23,7 +23,7 @@
|
|
|
<!-- <text style="font-size: 26rpx;font-weight: 400;line-height: 42rpx;color: #999999;"></text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <view class="msgInfo">
|
|
|
+ <!-- <view class="msgInfo">
|
|
|
<view class="msgImg" @click="goMsg">
|
|
|
消息
|
|
|
</view>
|
|
@@ -35,7 +35,8 @@
|
|
|
<view class="optionItem" @click="goMsg">
|
|
|
<view class="option_left">
|
|
|
<view class="option_icon" style="display: flex;justify-content: center;">
|
|
|
- <image style="width: 80%;height: 80%;" src="../../static/Vectorldang.png" mode="aspectFill">
|
|
|
+ <image style="width: 80%;height: 80%;" src="../../static/Vectorldang.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
<text class="option_text fwb-font">我的消息</text>
|
|
@@ -44,37 +45,42 @@
|
|
|
<view class="msgq" v-if="msgn>0">
|
|
|
{{msgn}}
|
|
|
</view>
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="optionItem" @click="gotoMineCollect">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</span>
|
|
|
<text class="option_text fwb-font">我的收藏</text>
|
|
|
</view>
|
|
|
<view class="option_right">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="optionItem" @click="gotoMineActive">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/active.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/active.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</span>
|
|
|
<text class="option_text fwb-font">我的活动</text>
|
|
|
</view>
|
|
|
<view class="option_right">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-<!-- <view class="optionItem" @click="gotoMineClass">
|
|
|
+ <!-- <view class="optionItem" @click="gotoMineClass">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/myClass.png" mode="aspectFill">
|
|
@@ -87,7 +93,7 @@
|
|
|
</image>
|
|
|
</view>
|
|
|
</view> -->
|
|
|
-<!-- <view class="optionItem" @click="gotomyRelease">
|
|
|
+ <!-- <view class="optionItem" @click="gotomyRelease">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
<image src="https://teacherapi.cocorobo.cn/teaching-file/static//fabu.png" mode="aspectFill">
|
|
@@ -105,33 +111,37 @@
|
|
|
<view class="optionItem">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/help.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/help.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</span>
|
|
|
<text class="option_text fwb-font">反馈帮助</text>
|
|
|
</view>
|
|
|
<view class="option_right">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="optionItem" @click="gotoMineEdit">
|
|
|
<view class="option_left">
|
|
|
<span class="option_icon">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/setting.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/setting.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</span>
|
|
|
<text class="option_text fwb-font">我的设置</text>
|
|
|
</view>
|
|
|
<view class="option_right">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
|
|
|
+ <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -144,37 +154,43 @@
|
|
|
title: '我的',
|
|
|
btn: 0
|
|
|
},
|
|
|
- msgn:0,
|
|
|
+ msgn: 0,
|
|
|
// 用户名
|
|
|
username: '',
|
|
|
// 头像
|
|
|
userAvatar: 'https://teacherapi.cocorobo.cn/teaching-file/static/mine/Avatar.png',
|
|
|
// 学校
|
|
|
- signature:'',
|
|
|
-
|
|
|
+ signature: '',
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+
|
|
|
// 我的收藏
|
|
|
gotoMineCollect() {
|
|
|
const value = this.$store.state.user.openid;
|
|
|
- if(!value){
|
|
|
- uni.showToast({title: '未登录,请登录',icon: 'none'})
|
|
|
- setTimeout(this.goLog,1000)
|
|
|
+ if (!value) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未登录,请登录',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ setTimeout(this.goLog, 1000)
|
|
|
return
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
// url: '/pages/mineCollect/mineCollect'
|
|
|
- url:'/pages/mineCollNew/mineCollNew'
|
|
|
+ url: '/pages/mineCollNew/mineCollNew'
|
|
|
})
|
|
|
},
|
|
|
// 我的设置
|
|
|
gotoMineEdit() {
|
|
|
const value = this.$store.state.user.openid;
|
|
|
- if(!value){
|
|
|
- uni.showToast({title: '未登录,请登录',icon: 'none'})
|
|
|
- setTimeout(this.goLog,1000)
|
|
|
+ if (!value) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未登录,请登录',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ setTimeout(this.goLog, 1000)
|
|
|
return
|
|
|
}
|
|
|
uni.navigateTo({
|
|
@@ -184,9 +200,12 @@
|
|
|
// 我的活动
|
|
|
gotoMineActive() {
|
|
|
const value = this.$store.state.user.openid;
|
|
|
- if(!value){
|
|
|
- uni.showToast({title: '未登录,请登录',icon: 'none'})
|
|
|
- setTimeout(this.goLog,1000)
|
|
|
+ if (!value) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未登录,请登录',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ setTimeout(this.goLog, 1000)
|
|
|
return
|
|
|
}
|
|
|
uni.navigateTo({
|
|
@@ -194,11 +213,14 @@
|
|
|
})
|
|
|
},
|
|
|
// 信息
|
|
|
- goMsg(){
|
|
|
+ goMsg() {
|
|
|
const value = this.$store.state.user.openid;
|
|
|
- if(!value){
|
|
|
- uni.showToast({title: '未登录,请登录',icon: 'none'})
|
|
|
- setTimeout(this.goLog,1000)
|
|
|
+ if (!value) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未登录,请登录',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ setTimeout(this.goLog, 1000)
|
|
|
return
|
|
|
}
|
|
|
uni.navigateTo({
|
|
@@ -210,15 +232,15 @@
|
|
|
this.$request('/selectAllMessage', "POST", {
|
|
|
oid: this.$store.state.user.openid
|
|
|
}).then(res => {
|
|
|
- console.log('获取未读信息',res[0][0].msg);
|
|
|
+ console.log('获取未读信息', res[0][0].msg);
|
|
|
let num = res[0][0].msg
|
|
|
- this.msgn=num
|
|
|
+ this.msgn = num
|
|
|
if (num == 0) {
|
|
|
uni.hideTabBarRedDot({
|
|
|
index: 3
|
|
|
})
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
uni.setTabBarBadge({
|
|
|
index: 3,
|
|
|
text: num.toString()
|
|
@@ -234,16 +256,18 @@
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.getMag() // 调用app.js中的方法
|
|
|
-
|
|
|
- console.log(this.$store.state);
|
|
|
-
|
|
|
+ // if (!this.$store.state.user.openid) {
|
|
|
+ this.getMag() // 调用app.js中的方法
|
|
|
+ // }
|
|
|
+
|
|
|
+ // console.log(this.$store.state);
|
|
|
+
|
|
|
this.userAvatar = this.$store.state.user.avatar;
|
|
|
-
|
|
|
+
|
|
|
this.username = this.$store.state.user.username;
|
|
|
-
|
|
|
+
|
|
|
// 学校
|
|
|
- this.signature=this.$store.state.user.stuName==null?'':this.$store.state.user.stuName;
|
|
|
+ this.signature = this.$store.state.user.stuName == null ? '' : this.$store.state.user.stuName;
|
|
|
// this.isManage = this.$store.state.user.openid;
|
|
|
// console.log(this.isManage == "");
|
|
|
}
|
|
@@ -319,15 +343,17 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .msgInfo{
|
|
|
+
|
|
|
+ .msgInfo {
|
|
|
width: 70rpx;
|
|
|
position: relative;
|
|
|
height: 80%;
|
|
|
- .msgImg{
|
|
|
+
|
|
|
+ .msgImg {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
right: 0;
|
|
|
-
|
|
|
+
|
|
|
width: 64rpx;
|
|
|
height: 64rpx;
|
|
|
}
|
|
@@ -360,7 +386,7 @@
|
|
|
.option_icon {
|
|
|
height: 100%;
|
|
|
width: 40rpx;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -377,12 +403,19 @@
|
|
|
height: 40rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- .msgq{
|
|
|
- width: 32rpx;height: 32rpx;background-color:rgba(213, 73, 65, 1);border-radius: 50rpx;
|
|
|
+
|
|
|
+ .msgq {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ background-color: rgba(213, 73, 65, 1);
|
|
|
+ border-radius: 50rpx;
|
|
|
color: #fff;
|
|
|
font-size: 20rpx;
|
|
|
- display: flex;justify-content: center;align-items: center;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
+
|
|
|
image {
|
|
|
height: 34rpx;
|
|
|
width: 30rpx;
|
|
@@ -392,6 +425,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
</style>
|