Commit 863e03af authored by linwenqing's avatar linwenqing

improvement:证书页面接口ui

parent 3d294a13
const UNI_APP = { const UNI_APP = {
apiUrl: 'http://192.168.0.208:8760', apiUrl: 'http://192.168.0.204:8760',
qn_base_url: 'https://qn-static.banshouhui.com/study/', qn_base_url: 'https://qn-static.banshouhui.com/study/',
qn_asset_url: 'http://deudn.c.pp.cc/', qn_asset_url: 'http://deudn.c.pp.cc/',
uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/' uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/'
......
...@@ -15,12 +15,15 @@ let userApiFun = function(vm) { ...@@ -15,12 +15,15 @@ let userApiFun = function(vm) {
let checkIdCardBack = async (params = {}) => let checkIdCardBack = async (params = {}) =>
await vm.$u.post(uCenterUrl + 'v1/settled/card-back', params) await vm.$u.post(uCenterUrl + 'v1/settled/card-back', params)
let getCertList = async (params = {}) => let getCountryCertList = async (params = {}) =>
await vm.$u.post(apiUrl + '/rest/certificate/query', params) await vm.$u.post(apiUrl + '/rest/certificate/query', params)
let getUserQuestionWareHouse = async (params = {}) => let getlearnCertList = async (params = {}) =>
await vm.$u.get(apiUrl + '/rest/question/getSchoolCertificate', params)
let getlearnCertDetail = async (questionWarehouseId, params = {}) =>
await vm.$u.get( await vm.$u.get(
apiUrl + '/rest/question/query/getMyQuestionWarehouseList', apiUrl + '/rest/question/getSchoolCertificate/' + questionWarehouseId,
params params
) )
...@@ -29,8 +32,9 @@ let userApiFun = function(vm) { ...@@ -29,8 +32,9 @@ let userApiFun = function(vm) {
getUserInfo, getUserInfo,
checkIdCardFront, checkIdCardFront,
checkIdCardBack, checkIdCardBack,
getCertList, getCountryCertList,
getUserQuestionWareHouse, getlearnCertList,
getlearnCertDetail,
} }
return userApi return userApi
} }
......
<template>
<view class="begin-answer">
<u-navbar
back-icon-color="#ffffff"
background="transparent"
title="证书详情"
titleColor="#ffffff"
:border-bottom="false"
title-bold
></u-navbar>
<view class="content">
<view class="cert-body">
<view class="top">
<u-image :src="topImage" height="116rpx" width="100%"></u-image>
</view>
<view class="table-list">
<view class="item">
<view class="name">低压电工证</view>
<view class="table">
<u-table>
<u-tr class="u-tr">
<u-th class="u-th">姓名</u-th>
<u-th class="u-th">年龄</u-th>
<u-th class="u-th">籍贯</u-th>
<u-th class="u-th">性别</u-th>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
</u-table>
</view>
</view>
<view class="item">
<view class="name">低压电工证</view>
<view class="table">
<u-table>
<u-tr class="u-tr">
<u-th class="u-th">姓名</u-th>
<u-th class="u-th">年龄</u-th>
<u-th class="u-th">籍贯</u-th>
<u-th class="u-th">性别</u-th>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
<u-tr class="u-tr">
<u-td class="u-td">吕布</u-td>
<u-td class="u-td">22</u-td>
<u-td class="u-td">楚河</u-td>
<u-td class="u-td">男</u-td>
</u-tr>
</u-table>
</view>
</view>
</view>
<view class="foot">
<text>证书机构:中华人民共和国应急管理部</text>
<text style="padding-top: 28rpx;">更新时间:2021.07.21</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
data: null,
topImage: process.uniEnv.qn_base_url + 'tezhongzuoyepingtai@2x.png',
}
},
onShow: function() {
this.data = getApp().globalData.certItemData
console.log('shoudao param', this.data)
},
}
</script>
<style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
.begin-answer {
display: flex;
flex-direction: column;
background-color: #2953ff;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 120vh;
position: absolute;
top: 0;
width: 100%;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 130rpx 24rpx 0rpx 24rpx;
}
.cert-body {
width: 100%;
background-color: #ffffff;
text-align: center;
border-radius: 12rpx;
padding: 30rpx;
position: relative;
.top {
height: 116rpx;
background-color: #000000;
}
.table-list {
margin-top: 20rpx;
margin-bottom: 200rpx;
.name {
font-size: 24rpx;
text-align: left;
padding: 30rpx 0;
}
.table {
background-color: #2953ff;
min-height: 200rpx;
}
}
.foot {
position: absolute;
bottom: 41px;
left: 0;
height: 100rpx;
width: 100%;
text-align: left;
padding-left: 24rpx;
display: flex;
flex-direction: column;
font-size: 28rpx;
color: #5a6073;
}
}
</style>
<template> <template>
<view class="content"> <view class="begin-answer">
<view> <u-navbar
back-icon-color="#000000"
background="transparent"
title="我的信息"
titleColor="#000000"
:border-bottom="false"
title-bold
></u-navbar>
<view class="study">
<u-tabs-swiper <u-tabs-swiper
bg-color="#F4F5F7" bg-color="#F4F5F7"
inactive-color="#999999" inactive-color="#999999"
...@@ -20,15 +28,86 @@ ...@@ -20,15 +28,86 @@
@animationfinish="animationfinish" @animationfinish="animationfinish"
> >
<swiper-item @touchmove.stop.prevent="stopTouchMove"> <swiper-item @touchmove.stop.prevent="stopTouchMove">
<u-form-item label="证件类型" <view class="tips-top">
><u-input v-model="form.type" <view class="all-text">
/></u-form-item> 正式考试后
<u-form-item label="身份证"><u-input v-model="form.id"/></u-form-item> <text class="num">
<u-form-item label="姓名"><u-input v-model="form.name"/></u-form-item> 30
</text>
个工作日后,可查询相关证书/成绩
</text>
</view>
</view>
<scroll-view scroll-y style="width:100%;">
<view class=" form">
<view class="item">
<text class="title">选择查询证书类型</text>
<u-input
v-model="value"
:type="type"
:border="border"
@click="show = true"
/>
</view>
<view class="item">
<text class="title">身份证号</text>
<u-input
class="input"
v-model="certId"
placeholder="请输入身份证号"
/>
</view>
<view class="item">
<text class="title">姓名</text>
<u-input
class="input"
v-model="certName"
placeholder="请输入姓名"
/>
</view>
<view class="tips-bottom"></view>
</view>
<button class="sub-button">查询</button>
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<scroll-view
scroll-y
style="height:100%;width:100%;"
@scrolltolower="onreachBottom"
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="triggered"
:refresher-threshold="100"
@refresherpulling="onPulling"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
@refresherabort="onAbort"
>
<view class="list-view">
<view class="item" v-for="(item, key) in countryCertList" :key="key" @tap="goDetail(item)">
<u-image :src="item.bgImage" width="100%" height="100%" class="bg-image"></u-image>
<view class="name">
{{ item.certificateName }}
</view>
</view>
<view class="item" v-for="(item, key) in learnCertList" :key="key" @tap="goDetail(item)">
<u-image :src="item.bgImage" width="100%" height="100%" class="bg-image"></u-image>
<view class="learn-name">
{{ item.certificateName }}
</view>
</view>
</view>
</scroll-view>
</swiper-item> </swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove"> </swiper-item>
</swiper> </swiper>
</view> </view>
<u-action-sheet
:list="actionSheetList"
v-model="show"
@click="actionSheetCallback"
></u-action-sheet>
</view> </view>
</template> </template>
...@@ -36,7 +115,34 @@ ...@@ -36,7 +115,34 @@
export default { export default {
data() { data() {
return { return {
title: '证书', // lists: [
// {
// certificateName: '低压电工证',
// bgImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png'
// },
// {
// certificateName: '高压电工证',
// bgImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png'
// },
// {
// certificateName: '高处安装、维护、拆除作业人员',
// bgImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png'
// },
// ],
countryCertList: [],
learnCertList: [],
countryCertImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png',
learnCertImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png',
isEmptyList: true,//学时证和国家证都为空显示空
value: '',
type: 'select',
show: false,
border: false,
actionSheetList: [
{
text: '特种作业操作证查询',
},
],
tabs: [ tabs: [
{ {
name: '证书查询', name: '证书查询',
...@@ -45,24 +151,436 @@ export default { ...@@ -45,24 +151,436 @@ export default {
name: '我的证书', name: '我的证书',
}, },
], ],
certType: '',
certId: '',
certName: '',
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
loadStatus: 'loading',
isLoadMore: false,
isReflesh: true,
triggered: false,
_freshing: false,
} }
}, },
onLoad() {}, computed: {
methods: {}, // lists(){
// let data = []
// if(this.countryCertList.length > 0){
// for(let j in this.countryCertList){
// data.unshift(this.countryCertList[j])
// }
// }
// if(this.learnCertList.length > 0){
// for(let k in this.learnCertList){
// data.unshift(this.learnCertList[k])
// }
// }
// console.log('data', data)
// return data
// }
},
onLoad() {
},
onShow: function(param) {
try {
if (param.tabs) {
this.current = param.tabs
this.swiperCurrent = param.tabs
}
} catch (e) {}
this.tabsChange(this.current)
},
methods: {
//获取国家证书数据
getCountryCert(){
this.$u.api.getCountryCertList().then((res)=>{
console.log('国家证',res)
if(!res || res.length == 0){
return
}
this.isEmptyList = true
let data = []
for(let key in res){
//判断是否是table数据格式,否则暂不展示,后面如果有再补充显示图片格式
if(
res[key].certificateSource != 2
|| res[key].certificateType != 2){
continue
}
data[key] = {}
data[key].certificateName = res[key].certificateName.replace('作业', '证')
data[key].bgImage = this.countryCertImage
data[key].type = 'country'
data[key].key = key
data[key].data = res[key] //传给详情页
}
this.countryCertList = JSON.parse(JSON.stringify(data))
})
},
//获取学时数据
getLearnCert(){
this.$u.api.getlearnCertList().then((res)=>{
res = [
{
"id": "1415602594134360064",
"createTime": "2021-07-15 17:41:51",
"createdBy": "1415215255998431232",
"updateTime": "2021-07-15 17:41:51",
"updatedBy": null,
"echoMap": {
"studentId": {
"id": "1414459877807357952",
"createTime": "2021-07-12 13:41:29",
"createdBy": "3",
"updateTime": "2021-07-20 20:41:13",
"updatedBy": "1414459877807357952",
"echoMap": {},
"cardCount": null,
"consumeAmount": null,
"loginTime": null,
"code": "XY20210723000001",
"unionid": "",
"nickname": "",
"name": "",
"phoneNumber": "11111111111",
"avatarPath": "",
"identityNumber": "",
"identityFrontPath": "",
"identityBackPath": "",
"certificatePhotoPath": "",
"certificateValidityDate": null,
"workUnit": "",
"address": ""
},
"questionWarehouseId": {
"id": "1",
"createTime": "2021-07-12 16:33:20",
"createdBy": null,
"updateTime": "2021-07-21 14:40:44",
"updatedBy": "1413688964405002240",
"echoMap": {},
"institutionId": "1",
"subjectId": "1413687160678121472",
"title": "测试1",
"subtitle": "侧首",
"description": "哈哈哈哈",
"effectiveTime": "1",
"provinceId": "470715",
"cityId": "475286",
"type": "1",
"price": "100.00",
"realPrice": "50.00",
"state": true,
"remark": "123231",
"version": null
}
},
"number": null,
"questionWarehouseId": "1",
"institutionId": "-1",
"studentId": "1414459877807357952",
"cardId": "1416278788987158528"
},
{
"id": "1418473748293484544",
"createTime": "2021-07-23 15:31:10",
"createdBy": "1414459877807357952",
"updateTime": "2021-07-24 14:45:15",
"updatedBy": "1414459877807357952",
"echoMap": {
"studentId": {
"id": "1414459877807357952",
"createTime": "2021-07-12 13:41:29",
"createdBy": "3",
"updateTime": "2021-07-20 20:41:13",
"updatedBy": "1414459877807357952",
"echoMap": {},
"cardCount": null,
"consumeAmount": null,
"loginTime": null,
"code": "XY20210723000001",
"unionid": "",
"nickname": "",
"name": "",
"phoneNumber": "11111111111",
"avatarPath": "",
"identityNumber": "",
"identityFrontPath": "",
"identityBackPath": "",
"certificatePhotoPath": "",
"certificateValidityDate": null,
"workUnit": "",
"address": ""
},
"questionWarehouseId": {
"id": "1414854649273384960",
"createTime": "2021-07-13 15:50:10",
"createdBy": "1413688964405002240",
"updateTime": "2021-07-23 14:41:30",
"updatedBy": "1413688964405002240",
"echoMap": {},
"institutionId": "1",
"subjectId": "1418169087225233408",
"title": "登高架设作业",
"subtitle": "大狼狗",
"description": "sad",
"effectiveTime": "0",
"provinceId": "470715",
"cityId": "475286",
"type": "1",
"price": "100.00",
"realPrice": "60.00",
"state": true,
"remark": "",
"version": "0"
}
},
"number": null,
"questionWarehouseId": "1414854649273384960",
"institutionId": "-1",
"studentId": "1414459877807357952",
"cardId": "0"
}
]
console.log('学时证', res);
if(!res || res.length == 0){
//空显示缺醒
return
}
this.isEmptyList = true
let data = []
for(let key in res){
if(!res[key].echoMap || !res[key].echoMap.questionWarehouseId){
continue
}
data[key] = {}
data[key].certificateName = res[key].echoMap.questionWarehouseId.title.replace('作业', '证')
data[key].id = res[key].echoMap.questionWarehouseId.id
data[key].bgImage = this.learnCertImage
data[key].type = 'learn'
data[key].key = key
}
console.log('学时证处理结果', data)
this.learnCertList = JSON.parse(JSON.stringify(data))
})
},
goDetail(param){
console.log('goto param', param)
if(param.type == 'learn'){
console.log('点击学时证,请求详情,组装参数再传过去')
this.$u.api.getlearnCertDetail(param.id).then((res)=>{
res = {
photo: "",头像,
name: "",名字,
idCard: "",身份证,
company: "",工作单位,
subjectName: "测试1",资格类型,
institutionName: null,培训机构名称,
startDate: "",培训开始时间,
endDate: "2021-07-24",培训结束时间,
maxPoint: 0,最高分,
time: 0,学时,
questionWarehouse: null,
}
param.data = res
getApp().globalData.certItemData = param
this.$u.route({
url: 'pages/cert/detail',
})
}).catch(err => {
console.log(err)
})
}else{
console.log('点击国家证,直接参数带过去')
getApp().globalData.certItemData = param
this.$u.route({
url: 'pages/cert/detail',
})
}
},
actionSheetCallback(index) {
this.value = this.actionSheetList[index].text
},
onPulling(e) {
return true
},
onRefresh() {
if (this._freshing) return
this.triggered = true
this._freshing = true
this.isLoadMore = false
this.loadStatus = 'loading'
},
onRestore() {
this.triggered = 'restore' // 需要重置
},
onAbort() {
console.log('onAbort')
},
transition(e) {
// swiper-item左右移动,通知tabs的滑块跟随移动
let dx = e.detail.dx
this.$refs.uTabs.setDx(dx)
},
//scroll-view到底部加载更多
onreachBottom() {
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true
this.params.start += 5
}
},
stopTouchMove() {
return false
},
//tabs通知swiper切换
tabsChange(index) {
console.log('当前tabs index',index)
this.swiperCurrent = Number(index)
switch (this.swiperCurrent) {
case 1:
let lifeData = uni.getStorageSync('lifeData')
if(lifeData.vuex_token){
let token = lifeData.vuex_token;
this.$u.vuex('vuex_token', 'Bearer test')
this.getCountryCert()
this.getLearnCert()
}
break
case 2:
break
case 3:
break
}
},
animationfinish(e) {
let current = e.detail.current
this.$refs.uTabs.setFinishCurrent(current)
this.swiperCurrent = current
this.current = current
},
},
} }
</script> </script>
<style scoped lang="scss">
<style> ::-webkit-scrollbar {
.content { width: 0;
height: 0;
color: transparent;
display: none;
}
page {
background-color: #f7f9fc;
}
.begin-answer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; background-image: linear-gradient(to top, #f7f9fc 0%, #e9f3ff 40%);
justify-content: center; background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 100vh;
position: absolute;
top: 0;
width: 100%; width: 100%;
margin-top: 180rpx;
} }
.study {
/* .swiper_group{ height: 100vh;
margin-top: ; background: none;
} */ padding: 0rpx 24rpx;
}
.form {
display: flex;
flex-direction: column;
}
.study ::v-deep swiper {
height: 100%;
}
.tips-top {
width: 702rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 24rpx;
background-color: #f9dfdce0;
text-align: center;
margin-bottom: 30rpx;
color: #5a6073;
.all-text {
.num {
color: #fa5a49;
}
}
}
.study ::v-deep .u-input__input {
width: 702rpx;
height: 104rpx;
background-color: #ffffff;
border-radius: 12rpx;
margin: 32rpx 0;
padding: 0 0 0 30rpx;
}
.sub-button {
margin-top: 150rpx;
height: 104rpx;
border-radius: 52rpx;
border: hidden;
background-color: #2953ff;
color: white;
font-size: 32rpx;
font-weight: bold;
line-height: 104rpx;
}
.study ::v-deep .u-input__right-icon {
position: absolute;
right: 23rpx;
top: 40%;
}
.study ::v-deep .u-tabs{
background: none !important;
}
.title {
font-size: 32rpx;
font-weight: bold;
color: #191c27;
}
.list-view {
width: 100%;
margin-bottom: 500rpx;
.item {
background-color: #2953ff;
width: 100%;
height: 444rpx;
margin-top: 30rpx;
border-radius: 24rpx;
position: relative;
.name {
width: 100%;
height: 100%;
text-align: center;
line-height: 444rpx;
position: absolute;
top: 0;
font-size: 60rpx;
font-weight: bold;
color: white;
}
.learn-name {
width: 100%;
height: 100%;
text-align: center;
line-height: 444rpx;
position: absolute;
top: 0;
font-weight: bold;
color: #A06F40;
padding-top: 50rpx;
font-size: 28rpx;
}
}
}
</style> </style>
...@@ -18,10 +18,13 @@ ...@@ -18,10 +18,13 @@
<view class="u-flex-1"> <view class="u-flex-1">
<view class="u-font-18 u-p-b-20 nick-name">{{ nikeName }}</view> <view class="u-font-18 u-p-b-20 nick-name">{{ nikeName }}</view>
<view class="login-tip"> <view class="login-tip">
<text v-if="isLogin" <text v-if="isLogin">
>累计刷题量<text style="color:#2953FF">{{ loginTips }}</text 累计刷题量
>次</text <text style="color:#2953FF">
> {{ loginTips }}
</text>
次
</text>
<text v-else>登录可查看答题信息</text> <text v-else>登录可查看答题信息</text>
</view> </view>
</view> </view>
...@@ -29,7 +32,6 @@ ...@@ -29,7 +32,6 @@
<u-avatar class="avatar-iamge" :src="avatar" size="140"></u-avatar> <u-avatar class="avatar-iamge" :src="avatar" size="140"></u-avatar>
</view> </view>
</view> </view>
<view class=""> <view class="">
<u-cell-group :border="false"> <u-cell-group :border="false">
<u-cell-item <u-cell-item
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
code: code, code: code,
avatar: userInfo.avatarUrl, avatar: userInfo.avatarUrl,
nickname: userInfo.nickName, nickname: userInfo.nickName,
orgId: getApp().globalData.orgId orgId: getApp().globalData.orgId,
} }
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
...@@ -146,4 +146,7 @@ export default { ...@@ -146,4 +146,7 @@ export default {
margin: auto; margin: auto;
padding-top: 450rpx; padding-top: 450rpx;
} }
.view-image {
padding-top: 200rpx;
}
</style> </style>
...@@ -50,6 +50,176 @@ export default { ...@@ -50,6 +50,176 @@ export default {
}, },
onLoad() { onLoad() {
this.$u.api.getUserQuestionWareHouse().then((res) => { this.$u.api.getUserQuestionWareHouse().then((res) => {
res = [
{
id: '1415266126815821824',
createTime: '2021-07-14 19:05:14',
createdBy: '1415215255998431232',
updateTime: '2021-07-14 19:05:14',
updatedBy: '1415215255998431232',
echoMap: {
studentId: {
id: '1414459877807357952',
createTime: '2021-07-12 13:41:29',
createdBy: '3',
updateTime: '2021-07-20 20:41:13',
updatedBy: '1414459877807357952',
echoMap: {},
cardCount: null,
consumeAmount: null,
loginTime: null,
unionid: '',
nickname: '',
name: '',
phoneNumber: '11111111111',
avatarPath: '',
identityNumber: '',
identityFrontPath: '',
identityBackPath: '',
certificatePhotoPath: '',
certificateValidityDate: null,
workUnit: '',
address: '',
},
questionWarehouseId: {
id: '1414854649273384960',
createTime: '2021-07-13 15:50:10',
createdBy: '1413688964405002240',
updateTime: '2021-07-22 19:21:00',
updatedBy: '1413688964405002240',
echoMap: {},
institutionId: '1',
subjectId: '1418169087225233408',
title: '测试题库',
subtitle: '大狼狗',
description: 'sad',
effectiveTime: '0',
provinceId: '470715',
cityId: '475286',
type: '1',
price: '100.00',
realPrice: '60.00',
state: true,
remark: '',
version: '0',
},
cardId: {
id: '1416278788987158528',
createTime: '2021-07-17 14:09:11',
createdBy: '1410776147574128640',
updateTime: '2021-07-17 14:09:11',
updatedBy: '1410776147574128640',
echoMap: {},
unitPrice: null,
buyTime: null,
subjectNames: null,
instrtutionId: '1',
studentId: null,
questionWarehouseId: '1',
cardType: '02',
cardNumber: '621001200010719',
cardSecret: '9923sibv',
cardStatus: 5,
isEnable: 1,
effectiveDay: 30,
bindingTime: null,
activationTime: null,
sourceType: {
code: 'INSTRTUTION_SEND',
desc: '机构发卡',
},
sourceOrderId: '1416278788521590784',
},
},
questionWarehouseId: '1414854649273384960',
studentId: '1414459877807357952',
cardId: '1416278788987158528',
},
{
id: '1415602594134360064',
createTime: '2021-07-15 17:41:51',
createdBy: '1415215255998431232',
updateTime: '2021-07-15 17:41:51',
updatedBy: null,
echoMap: {
studentId: {
id: '1414459877807357952',
createTime: '2021-07-12 13:41:29',
createdBy: '3',
updateTime: '2021-07-20 20:41:13',
updatedBy: '1414459877807357952',
echoMap: {},
cardCount: null,
consumeAmount: null,
loginTime: null,
unionid: '',
nickname: '',
name: '',
phoneNumber: '11111111111',
avatarPath: '',
identityNumber: '',
identityFrontPath: '',
identityBackPath: '',
certificatePhotoPath: '',
certificateValidityDate: null,
workUnit: '',
address: '',
},
questionWarehouseId: {
id: '1',
createTime: '2021-07-12 16:33:20',
createdBy: null,
updateTime: '2021-07-21 14:40:44',
updatedBy: '1413688964405002240',
echoMap: {},
institutionId: '1',
subjectId: '1413687160678121472',
title: '测试1',
subtitle: '侧首',
description: '哈哈哈哈',
effectiveTime: '1',
provinceId: '470715',
cityId: '475286',
type: '1',
price: '100.00',
realPrice: '50.00',
state: true,
remark: '123231',
version: null,
},
cardId: {
id: '1416278788987158528',
createTime: '2021-07-17 14:09:11',
createdBy: '1410776147574128640',
updateTime: '2021-07-17 14:09:11',
updatedBy: '1410776147574128640',
echoMap: {},
unitPrice: null,
buyTime: null,
subjectNames: null,
instrtutionId: '1',
studentId: null,
questionWarehouseId: '1',
cardType: '02',
cardNumber: '621001200010719',
cardSecret: '9923sibv',
cardStatus: 15,
isEnable: 1,
effectiveDay: 30,
bindingTime: null,
activationTime: null,
sourceType: {
code: 'INSTRTUTION_SEND',
desc: '机构发卡',
},
sourceOrderId: '1416278788521590784',
},
},
questionWarehouseId: '1',
studentId: '1414459877807357952',
cardId: '1416278788987158528',
},
]
let length = res.length let length = res.length
if (res.length <= 0) { if (res.length <= 0) {
this.lists = [] this.lists = []
...@@ -76,21 +246,24 @@ export default { ...@@ -76,21 +246,24 @@ export default {
switch (res[i].echoMap.cardId.cardStatus) { switch (res[i].echoMap.cardId.cardStatus) {
case 0: case 0:
status = '未绑定' status = '未绑定'
data[i].statusStyle = { color: '#9EA5BB' }
break break
case 5: case 5:
status = '已绑定' status = '已绑定'
data[i].statusStyle = { color: '#2953FF' }
break break
case 10: case 10:
status = '已激活' status = '已激活'
data[i].statusStyle = { color: '#2953FF' }
break break
case 15: case 15:
status = '已失效' status = '已失效'
data[i].statusStyle = { color: '#9EA5BB' }
break break
default: default:
break break
} }
data[i].status = status data[i].status = status
data[i].statusStyle = { color: '#2953FF' }
} }
this.lists = data this.lists = data
console.log(data) console.log(data)
......
...@@ -111,6 +111,10 @@ export default { ...@@ -111,6 +111,10 @@ export default {
this.student = res this.student = res
}) })
}, },
onShow() {
console.log('iddd', this.student)
console.log('iddd global', getApp().globalData.student)
},
methods: { methods: {
goCertify() { goCertify() {
getApp().globalData.student = this.student getApp().globalData.student = this.student
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment