|
|
|
|
@ -14,13 +14,15 @@
|
|
|
|
|
<text>{{userInfo.username?userInfo.username:'-'}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="usersigns" v-if="course_signs.length>0">
|
|
|
|
|
<text>学籍:</text>
|
|
|
|
|
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
|
|
|
|
|
<block v-if="course_signs[0]['course']">
|
|
|
|
|
<text>学籍:</text>
|
|
|
|
|
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="usercode" @click="showBigCode=true">
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode" :sizeUnit="'rpx'"
|
|
|
|
|
:size="160" :options="{
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode"
|
|
|
|
|
:sizeUnit="'rpx'" :size="160" :options="{
|
|
|
|
|
margin: 10,
|
|
|
|
|
foregroundImageSrc: '/static/index_icon1.png',
|
|
|
|
|
}"></uqrcode>
|
|
|
|
|
@ -97,8 +99,8 @@
|
|
|
|
|
<view class="modal-xyk-between">
|
|
|
|
|
<view class="modal-xyk-item">
|
|
|
|
|
<view style="display: flex;justify-content: center;" @click="bigCode">
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode" :sizeUnit="'rpx'"
|
|
|
|
|
:size="160" :options="{
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode"
|
|
|
|
|
:sizeUnit="'rpx'" :size="160" :options="{
|
|
|
|
|
margin: 10,
|
|
|
|
|
foregroundImageSrc: '/static/index_icon1.png',
|
|
|
|
|
}"></uqrcode>
|
|
|
|
|
@ -110,9 +112,10 @@
|
|
|
|
|
<text>{{userInfo.username}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="modal-xyk-name-course" v-if="course_signs.length>0">
|
|
|
|
|
<text>学籍:</text>
|
|
|
|
|
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
|
|
|
|
|
|
|
|
|
|
<block v-if="course_signs[0]['course']">
|
|
|
|
|
<text>学籍:</text>
|
|
|
|
|
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -155,7 +158,8 @@
|
|
|
|
|
<view v-if="showBigCode" class="big">
|
|
|
|
|
<view class="big-wrap">
|
|
|
|
|
<view class="big-close" @click='showBigCode=false'>X</view>
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode" :sizeUnit="'rpx'" :size="500" :options="{
|
|
|
|
|
<uqrcode v-if="myQrcode" ref="uqrcode" canvas-id="qrcode" :value="myQrcode" :sizeUnit="'rpx'"
|
|
|
|
|
:size="500" :options="{
|
|
|
|
|
margin: 10,
|
|
|
|
|
foregroundImageSrc: '/static/index_icon1.png',
|
|
|
|
|
}"></uqrcode>
|
|
|
|
|
@ -182,9 +186,9 @@
|
|
|
|
|
userInfo: {},
|
|
|
|
|
hasMobile: false,
|
|
|
|
|
course_signs: [],
|
|
|
|
|
showBigCode:false,
|
|
|
|
|
myQrcode:'STBC',
|
|
|
|
|
timer:null
|
|
|
|
|
showBigCode: false,
|
|
|
|
|
myQrcode: 'STBC',
|
|
|
|
|
timer: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
@ -203,23 +207,23 @@
|
|
|
|
|
this.showRegister = false
|
|
|
|
|
this.getUserInfo()
|
|
|
|
|
let that = this
|
|
|
|
|
if(!this.timer){
|
|
|
|
|
this.timer = setInterval(function(){
|
|
|
|
|
if (!this.timer) {
|
|
|
|
|
this.timer = setInterval(function() {
|
|
|
|
|
that.getQrCode()
|
|
|
|
|
},3*60*1000)
|
|
|
|
|
}, 3 * 60 * 1000)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onUnload() {
|
|
|
|
|
if(this.timer){
|
|
|
|
|
if (this.timer) {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
this.timer = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
if(this.timer){
|
|
|
|
|
if (this.timer) {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
this.timer = null
|
|
|
|
|
}
|
|
|
|
|
@ -233,7 +237,7 @@
|
|
|
|
|
}
|
|
|
|
|
this.showCard = true
|
|
|
|
|
},
|
|
|
|
|
bigCode(){
|
|
|
|
|
bigCode() {
|
|
|
|
|
this.showCard = false
|
|
|
|
|
this.showBigCode = true
|
|
|
|
|
},
|
|
|
|
|
@ -273,7 +277,7 @@
|
|
|
|
|
this.$u.vuex('vuex_user', res.user)
|
|
|
|
|
this.userInfo = res.user
|
|
|
|
|
this.course_signs = res.user.course_signs ? res.user.course_signs : [],
|
|
|
|
|
this.myQrcode = res.course_signs?res.course_signs.qrcode:'STBC'
|
|
|
|
|
this.myQrcode = res.course_signs ? res.course_signs.qrcode : 'STBC'
|
|
|
|
|
if (this.base.isNull(res.user.mobile)) {
|
|
|
|
|
this.showRegister = true
|
|
|
|
|
this.hasMobile = false
|
|
|
|
|
@ -283,12 +287,12 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getQrCode(){
|
|
|
|
|
getQrCode() {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '...'
|
|
|
|
|
})
|
|
|
|
|
this.$u.api.user().then(res => {
|
|
|
|
|
this.myQrcode = res.course_signs?res.course_signs.qrcode:'STBC'
|
|
|
|
|
this.myQrcode = res.course_signs ? res.course_signs.qrcode : 'STBC'
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
}, 500)
|
|
|
|
|
@ -543,7 +547,7 @@
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 10rpx 40rpx;
|
|
|
|
|
font-size:24rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 27rpx;
|
|
|
|
|
@ -575,6 +579,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.big {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
|