|
@@ -42,9 +42,10 @@
|
|
|
<image class="index-ranking" src="../../static/icon/index-ranking.png" mode="aspectFit"></image>
|
|
|
<view v-if="userServerInfo.rank" class="userranking">我的排名:{{ userServerInfo.rank ? userServerInfo.rank : '0' }}</view>
|
|
|
</view>
|
|
|
- <view class="left2 index-item" @tap="tohonour">
|
|
|
- <text class="name">荣耀殿堂</text>
|
|
|
- <image class="index-honour" src="../../static/icon/index-honour.png" mode="aspectFit"></image>
|
|
|
+ <view class="left2 index-item" @tap="toexchange">
|
|
|
+ <text class="name">礼品兑换</text>
|
|
|
+ <image class="index-exchange" src="../../static/icon/index-exchange.png" mode="aspectFit"></image>
|
|
|
+ <view v-if="userServerInfo.bonus" class="usermonkey">奖学金:{{ userServerInfo.bonus ? userServerInfo.bonus : '0' }}</view>
|
|
|
</view>
|
|
|
<view class="left3 index-item" @tap="tosetting">
|
|
|
<text class="name">设置</text>
|
|
@@ -56,15 +57,18 @@
|
|
|
<text class="name">图片上传</text>
|
|
|
<image class="index-upload" src="../../static/icon/index-upload.png" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
- <view class="right2 index-item" @tap="toexchange">
|
|
|
- <text class="name">礼品兑换</text>
|
|
|
- <image class="index-exchange" src="../../static/icon/index-exchange.png" mode="aspectFit"></image>
|
|
|
- <view v-if="userServerInfo.bonus" class="usermonkey">奖学金:{{ userServerInfo.bonus ? userServerInfo.bonus : '0' }}</view>
|
|
|
+ <view class="right2 index-item" @tap="toChallenge">
|
|
|
+ <text class="name">学分挑战</text>
|
|
|
+ <image class="index-challenge" src="../../static/icon/index-challenge.png"></image>
|
|
|
</view>
|
|
|
<view class="right3 index-item" @tap="tostatistics">
|
|
|
<text class="name">数据统计</text>
|
|
|
<image class="index-statistics" src="../../static/icon/index-statistics.png" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
+ <view class="right4 index-item" @tap="tohonour">
|
|
|
+ <text class="name">荣耀殿堂</text>
|
|
|
+ <image class="index-honour" src="../../static/icon/index-honour.png" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -134,7 +138,7 @@
|
|
|
if (this.userServerInfo.type === 1) {
|
|
|
return '报名参赛'
|
|
|
} else if (this.userServerInfo.type === 2) {
|
|
|
- return '学分账单'
|
|
|
+ return '报名参赛'
|
|
|
} else if (this.userServerInfo.type === 3) {
|
|
|
return ''
|
|
|
}
|
|
@@ -172,6 +176,48 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ created () { //加载完成后开启监听全局 MESSAGE 事件
|
|
|
+ uni.$on('MESSAGE', (m, d, p) => { //m 要提示的文字信息 d 文字信息出现的时常 p 文字信息出现的位置
|
|
|
+ this.$refs.toast.hover(m, d, p)
|
|
|
+ })
|
|
|
+ uni.$on('HIDEMESSAGE', () => { // 隐藏 文字提示
|
|
|
+ this.$refs.toast.hide()
|
|
|
+ })
|
|
|
+ if ('wifi2g3g4g'.indexOf(this.networkType) !== -1) { //有网络连接时才进行下一步
|
|
|
+ this.$store.dispatch('onLaunch').then(() => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ }).catch(e => { //触发初始化方法
|
|
|
+ this.$refs.toast.hover('网络可能出了点问题,请下拉刷新试试')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: '似乎已经断开网络连接', icon: 'none' })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '../challengeList/challengeList'
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ onShow() { //每次展示首页时都初始化一次,达到实时更新数据的功能
|
|
|
+ this.routing = false
|
|
|
+ if ('wifi2g3g4g'.indexOf(this.networkType) !== -1) { //有网络连接时才进行下一步
|
|
|
+ if (uni.fromUpload) {
|
|
|
+ uni.fromUpload = false
|
|
|
+ if (uni.toRank) {
|
|
|
+ uni.fromUpload = false
|
|
|
+ uni.navigateTo({ url: '../ranking/ranking' })
|
|
|
+ }
|
|
|
+ this.$store.dispatch('onLaunch').then(() => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+
|
|
|
+ }).catch(e => { //触发初始化方法
|
|
|
+ this.$refs.toast.hover('网络可能出了点问题,请下拉刷新试试')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: '似乎已经断开网络连接', icon: 'none' })
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
getuserinfo () { //获取用户信息
|
|
|
uni.getUserInfo().then(([getUserWeixinInfoErr, userWeixinInfo]) => { //获取完成后
|
|
@@ -184,7 +230,7 @@
|
|
|
},
|
|
|
toself () { //点击用户信息
|
|
|
if (this.$verified()) { //用户是否已登录
|
|
|
- if (this.userServerInfo.type === 1) { //只有普通代理用户才能进入个人主页
|
|
|
+ if (this.userServerInfo.type === 1 || this.userServerInfo.type === 2) { //只有普通代理和代理公司个人主页
|
|
|
if (this.routing) { return }
|
|
|
this.routing = true
|
|
|
uni.navigateTo({ url: `../self/self?from=index&id=${this.userServerInfo.id}` }) //已登录跳转到用户中心
|
|
@@ -236,7 +282,7 @@
|
|
|
},
|
|
|
tohonour () { //点击荣誉殿堂
|
|
|
if (this.$verified()) { //用户是否已登录
|
|
|
- if (this.userServerInfo.type === 1) { //普通用户直接跳转到荣誉殿堂页面
|
|
|
+ if (this.userServerInfo.type === 1 || this.userServerInfo.type === 2) { //普通用户直接跳转到荣誉殿堂页面
|
|
|
if (this.routing) { return }
|
|
|
this.routing = true
|
|
|
uni.navigateTo({ url: '../honour/honour' })
|
|
@@ -267,6 +313,23 @@
|
|
|
this.$store.commit('SHOWVERIFY')
|
|
|
}
|
|
|
},
|
|
|
+ toChallenge() { // 点击学分挑战
|
|
|
+ if (this.$verified()) { //用户是否已登录
|
|
|
+ if (this.userServerInfo.signuped) { // 用户是否已经报名
|
|
|
+ if (this.userServerInfo.type === 2) { // 只有代理公司能够参加学分竞赛
|
|
|
+ if (this.routing) { return }
|
|
|
+ this.routing = true
|
|
|
+ uni.navigateTo({ url: '../challengeList/challengeList' })
|
|
|
+ } else { //代理公司和政委不可参赛,所以提示无参赛记录
|
|
|
+ this.$refs.toast.hover('只有代理公司可以参与挑战')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$refs.toast.hover('您还没有报名参赛')
|
|
|
+ }
|
|
|
+ } else { //未登录弹出登录框
|
|
|
+ this.$store.commit('SHOWVERIFY')
|
|
|
+ }
|
|
|
+ },
|
|
|
toexchange () { //点击兑换奖品
|
|
|
if (this.$verified()) { //用户是否已登录
|
|
|
if (this.userServerInfo.status === 3) {
|
|
@@ -303,43 +366,6 @@
|
|
|
toLongTapIndex() {
|
|
|
uni.navigateTo({ url: '../longTapIndex/longTapIndex' })
|
|
|
}
|
|
|
- },
|
|
|
- created () { //加载完成后开启监听全局 MESSAGE 事件
|
|
|
- uni.$on('MESSAGE', (m, d, p) => { //m 要提示的文字信息 d 文字信息出现的时常 p 文字信息出现的位置
|
|
|
- this.$refs.toast.hover(m, d, p)
|
|
|
- })
|
|
|
- uni.$on('HIDEMESSAGE', () => { // 隐藏 文字提示
|
|
|
- this.$refs.toast.hide()
|
|
|
- })
|
|
|
- if ('wifi2g3g4g'.indexOf(this.networkType) !== -1) { //有网络连接时才进行下一步
|
|
|
- this.$store.dispatch('onLaunch').then(() => {
|
|
|
- uni.stopPullDownRefresh()
|
|
|
- }).catch(e => { //触发初始化方法
|
|
|
- this.$refs.toast.hover('网络可能出了点问题,请下拉刷新试试')
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showToast({ title: '似乎已经断开网络连接', icon: 'none' })
|
|
|
- }
|
|
|
- },
|
|
|
- onShow() { //每次展示首页时都初始化一次,达到实时更新数据的功能
|
|
|
- this.routing = false
|
|
|
- if ('wifi2g3g4g'.indexOf(this.networkType) !== -1) { //有网络连接时才进行下一步
|
|
|
- if (uni.fromUpload) {
|
|
|
- uni.fromUpload = false
|
|
|
- if (uni.toRank) {
|
|
|
- uni.fromUpload = false
|
|
|
- uni.navigateTo({ url: '../ranking/ranking' })
|
|
|
- }
|
|
|
- this.$store.dispatch('onLaunch').then(() => {
|
|
|
- uni.stopPullDownRefresh()
|
|
|
-
|
|
|
- }).catch(e => { //触发初始化方法
|
|
|
- this.$refs.toast.hover('网络可能出了点问题,请下拉刷新试试')
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- uni.showToast({ title: '似乎已经断开网络连接', icon: 'none' })
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -350,7 +376,7 @@
|
|
|
height: 100%;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 161rpx 50rpx 0;
|
|
|
+ padding: 161rpx 30rpx 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
.getUserInfo {
|
|
@@ -498,11 +524,11 @@
|
|
|
flex: 1;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
- margin: 26rpx 0;
|
|
|
+ margin: 10rpx 0;
|
|
|
position: relative;
|
|
|
justify-content: space-between;
|
|
|
view {
|
|
|
- width: 310rpx;
|
|
|
+ width: 340rpx;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
@@ -515,11 +541,12 @@
|
|
|
font-size: 30rpx;
|
|
|
color: #FFFFFF;
|
|
|
.name {
|
|
|
- position: absolute;
|
|
|
+ z-index: 1;
|
|
|
top: 38rpx;
|
|
|
left: 30rpx;
|
|
|
- font-size: 40rpx;
|
|
|
color: #FFFFFF;
|
|
|
+ font-size: 40rpx;
|
|
|
+ position: absolute;
|
|
|
}
|
|
|
image {
|
|
|
position: absolute;
|
|
@@ -549,6 +576,12 @@
|
|
|
height: 123rpx;
|
|
|
right: 17rpx;
|
|
|
}
|
|
|
+ &.index-challenge {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
&.index-statistics {
|
|
|
width: 134rpx;
|
|
|
height: 166rpx;
|
|
@@ -563,29 +596,33 @@
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
&.left1 {
|
|
|
- height: 46.2%;
|
|
|
+ height: 41.76904176904177%;
|
|
|
background:linear-gradient(0deg,rgba(121,169,253,1) 0%,rgba(146,158,242,1) 100%);
|
|
|
}
|
|
|
&.left2 {
|
|
|
- height: 26.4%;
|
|
|
- background:linear-gradient(0deg,rgba(255,99,76,1) 0%,rgba(255,149,135,1) 100%);
|
|
|
+ height: 36.855036855036855%;
|
|
|
+ background:linear-gradient(0deg,rgba(212,134,249,1) 0%,rgba(176,99,248,1) 100%);
|
|
|
}
|
|
|
&.left3 {
|
|
|
- height: 19.8%;
|
|
|
+ height: 18.427518427518427%;
|
|
|
background:linear-gradient(0deg,rgba(255,255,255,1) 0%,rgba(255,156,0,1) 0%,rgba(255,207,131,1) 100%);
|
|
|
}
|
|
|
&.right1 {
|
|
|
- height: 39.6%;
|
|
|
+ height: 36.855036855036855%;
|
|
|
background:linear-gradient(0deg,rgba(255,99,76,1) 0%,rgba(255,149,135,1) 100%);
|
|
|
}
|
|
|
&.right2 {
|
|
|
- height: 26.4%;
|
|
|
+ height: 22.113022113022113%;
|
|
|
background:linear-gradient(0deg,rgba(253,173,41,1) 0%,rgba(255,207,75,1) 100%);
|
|
|
}
|
|
|
&.right3 {
|
|
|
- height: 26.4%;
|
|
|
+ height: 18.427518427518427%;
|
|
|
background:linear-gradient(0deg,rgba(77,186,89,1) 0%,rgba(108,229,126,1) 100%);
|
|
|
}
|
|
|
+ &.right4 {
|
|
|
+ height: 18.427518427518427%;
|
|
|
+ background:linear-gradient(0deg,rgba(255,99,76,1) 0%,rgba(255,149,135,1) 100%);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|