Commit 863e03af authored by linwenqing's avatar linwenqing

improvement:证书页面接口ui

parent 3d294a13
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_asset_url: 'http://deudn.c.pp.cc/',
uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/'
......
......@@ -15,12 +15,15 @@ let userApiFun = function(vm) {
let checkIdCardBack = async (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)
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(
apiUrl + '/rest/question/query/getMyQuestionWarehouseList',
apiUrl + '/rest/question/getSchoolCertificate/' + questionWarehouseId,
params
)
......@@ -29,8 +32,9 @@ let userApiFun = function(vm) {
getUserInfo,
checkIdCardFront,
checkIdCardBack,
getCertList,
getUserQuestionWareHouse,
getCountryCertList,
getlearnCertList,
getlearnCertDetail,
}
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>
This diff is collapsed.
......@@ -18,10 +18,13 @@
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20 nick-name">{{ nikeName }}</view>
<view class="login-tip">
<text v-if="isLogin"
>累计刷题量<text style="color:#2953FF">{{ loginTips }}</text
>次</text
>
<text v-if="isLogin">
累计刷题量
<text style="color:#2953FF">
{{ loginTips }}
</text>
次
</text>
<text v-else>登录可查看答题信息</text>
</view>
</view>
......@@ -29,7 +32,6 @@
<u-avatar class="avatar-iamge" :src="avatar" size="140"></u-avatar>
</view>
</view>
<view class="">
<u-cell-group :border="false">
<u-cell-item
......
......@@ -61,7 +61,7 @@ export default {
code: code,
avatar: userInfo.avatarUrl,
nickname: userInfo.nickName,
orgId: getApp().globalData.orgId
orgId: getApp().globalData.orgId,
}
uni.showLoading({
title: '加载中',
......@@ -146,4 +146,7 @@ export default {
margin: auto;
padding-top: 450rpx;
}
.view-image {
padding-top: 200rpx;
}
</style>
......@@ -50,6 +50,176 @@ export default {
},
onLoad() {
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
if (res.length <= 0) {
this.lists = []
......@@ -76,21 +246,24 @@ export default {
switch (res[i].echoMap.cardId.cardStatus) {
case 0:
status = '未绑定'
data[i].statusStyle = { color: '#9EA5BB' }
break
case 5:
status = '已绑定'
data[i].statusStyle = { color: '#2953FF' }
break
case 10:
status = '已激活'
data[i].statusStyle = { color: '#2953FF' }
break
case 15:
status = '已失效'
data[i].statusStyle = { color: '#9EA5BB' }
break
default:
break
}
data[i].status = status
data[i].statusStyle = { color: '#2953FF' }
}
this.lists = data
console.log(data)
......
......@@ -111,6 +111,10 @@ export default {
this.student = res
})
},
onShow() {
console.log('iddd', this.student)
console.log('iddd global', getApp().globalData.student)
},
methods: {
goCertify() {
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