Commit b4a37247 authored by Damon's avatar Damon

Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0

parents 2dd69ba6 3d5e8525
......@@ -235,7 +235,10 @@ export default {
}
.u-tr ::v-deep .u-td {
font-size: 22rpx !important;
height: 70rpx;
height: 80rpx;
}
.u-tr ::v-deep .u-td .u-td {
padding: 5rpx 0 !important;
}
}
</style>
......@@ -69,7 +69,7 @@
</view>
</view>
<view class="foot">
<text>证书机构:中华人民共和国应急管理部</text>
<text>证书机构:模考大师</text>
<text style="padding-top: 28rpx;">更新时间:{{ nowDate }}</text>
</view>
</view>
......@@ -98,7 +98,7 @@ export default {
return (Today.getFullYear() + '.' + (m.length > 1 ? m : '0' + m) + '.' + (d.length > 1 ? d : '0' + d))
},
headPhoto(){
return this.learnData.photo || process.uniEnv.qn_base_url + 'xueshitoubu@2x.png'
return this.learnData.photo || (process.uniEnv.qn_base_url + 'xitongtouxiang.png')
},
startDate() {
return this.learnData.startDate || ' '
......@@ -119,7 +119,7 @@ export default {
return this.learnData.subjectName || ' '
},
institutionName() {
return this.learnData.institutionName || ' '
return this.learnData.institutionName || '模考大师'
},
maxpoint() {
return this.learnData.maxPoint || 0
......
......@@ -40,7 +40,7 @@
</view>
</view>
<scroll-view scroll-y style="width:100%;">
<scroll-view scroll-y style="width: 702rpx;padding: 0 24rpx;">
<view class=" form">
<view class="item">
<text class="title">选择查询证书类型</text>
......@@ -79,7 +79,7 @@
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<scroll-view
scroll-y
style="height:100%;width:100%;"
style="width: 702rpx;padding: 0 24rpx;"
@scrolltolower="onreachBottom"
scroll-y="true"
refresher-enabled="true"
......@@ -90,7 +90,7 @@
@refresherrestore="onRestore"
@refresherabort="onAbort"
>
<view class="list-view">
<view v-if="hasData" 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">
......@@ -104,6 +104,17 @@
</view>
</view>
</view>
<view v-else class="list-view empty-value">
<u-image
width="374rpx"
height="322rpx"
:src="nothing"
style="margin-top: 100rpx;"
></u-image>
<text style="margin-top: 20rpx;font-size: 28rpx;color: #9EA5BB;"
>当前暂无证书内容</text
>
</view>
</scroll-view>
</swiper-item>
</swiper>
......@@ -127,6 +138,7 @@ export default {
learnCertList: [],
countryCertImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png',
learnCertImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png',
nothing: process.uniEnv.qn_base_url + 'zanwucuoti@3x.png',
isEmptyList: true,//学时证和国家证都为空显示空
value: '',
type: 'select',
......@@ -160,7 +172,17 @@ export default {
_freshing: false,
}
},
computed: {},
computed: {
hasData(){
if(this.countryCertList && this.countryCertList.length > 0){
return true
}else if(this.learnCertList && this.learnCertList.length > 0){
return true
}else{
return false
}
}
},
onLoad() {
this.checkType = '特种作业操作证查询'
},
......@@ -390,7 +412,7 @@ export default {
console.log('goto param', param)
if(param.type == 'learn'){
console.log('点击学时证,请求详情,组装参数再传过去')
// this.$u.api.getlearnCertDetail(param.id).then((res)=>{
this.$u.api.getlearnCertDetail(param.id).then((res)=>{
// let res = {
// photo: "https://thirdwx.qlogo.cn/mmopen/vi_32/c20Wk8HTurnNnKJMmnAnib9CUtqicwKKIMCvzViaBn0icNnpmeOQbSiaRklWCcfUOlW7oqj2o7u65d6F3ZwmZtLVZaw/132",//头像,
// name: "阿三哥",//名字,
......@@ -409,9 +431,9 @@ export default {
this.$u.route({
url: 'pages/cert/detailLearn',
})
// }).catch(err => {
// console.log(err)
// })
}).catch(err => {
console.log(err)
})
}else{
console.log('点击国家证,直接参数带过去', param)
getApp().globalData.certItemData = param
......@@ -463,8 +485,6 @@ export default {
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()
}
......@@ -509,7 +529,7 @@ page {
.study {
height: 100vh;
background: none;
padding: 0rpx 24rpx;
/* padding: 0rpx 24rpx; */
}
.form {
display: flex;
......@@ -522,7 +542,7 @@ page {
height: 100%;
}
.tips-top {
width: 702rpx;
width: 100%;
height: 72rpx;
line-height: 72rpx;
font-size: 24rpx;
......@@ -580,7 +600,7 @@ page {
}
.list-view {
width: 100%;
margin-bottom: 500rpx;
/* margin-bottom: 500rpx; */
.item {
width: 100%;
height: 444rpx;
......@@ -612,4 +632,12 @@ page {
}
}
}
.empty-value{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 30rpx;
text-align: center;
}
</style>
......@@ -252,7 +252,6 @@ export default {
let res = await this.$u.api.getQuestionWarehouse(this.category.id, param)
if (res && res.length > 0) {
let data = res[0]
this.setPageInfo(data)
// 学员增加自己的题库
let result = await this.$u.api
.addQuestionWarehouse({
......@@ -263,6 +262,7 @@ export default {
})
if (result) {
this.setPageInfo(data)
// 成功
this.$refs.uToast.show({
title: '添加题库成功',
......@@ -280,10 +280,12 @@ export default {
}
} else {
this.$refs.uToast.show({
title: '所选科目没有对应的题库',
title: '该类型和区域没有的题库',
type: 'warning',
duration: 1500,
callback: () => {},
callback: () => {
this.showPop = false
},
})
}
},
......
......@@ -5,6 +5,7 @@
title="版本更新"
value="当前版本v1.1.0"
:border-bottom="false"
@tap="upgrade"
></u-cell-item>
</u-cell-group>
<view class="logout" @tap="logout">退出登录</view>
......@@ -19,6 +20,27 @@ export default {
computed: {},
onLoad() {},
methods: {
upgrade: function() {
wx.showToast({
title: '正在更新版本...',
icon: 'loading',
})
const um = wx.getUpdateManager()
um.onCheckForUpdate(function(res) {
if (res.hasUpdate) {
um.onUpdateReady(function() {
um.applyUpdate()
wx.showToast({
title: '更新完成',
})
})
} else {
wx.showToast({
title: '已是最新版本',
})
}
})
},
logout() {
this.$u.vuex('vuex_token', '')
this.$u.vuex('openId', '')
......
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