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