Commit 6446e516 authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' into test

parents e7fb4455 d69564fc
......@@ -44,14 +44,15 @@ export default {
},
computed: {
examTypeText() {
return this.info.echoMap && this.info.echoMap.type
var str = this.info.echoMap && this.info.echoMap.type
return str || ''
},
provinceName() {
return (
var str =
this.info.echoMap &&
this.info.echoMap.provinceId &&
this.info.echoMap.provinceId.fullName
)
return str || ''
},
isAdd() {
return this.type == 'add'
......
......@@ -234,7 +234,7 @@
"navigationBarTitleText": "证书详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": false
"disableScroll": true
}
}
]
......@@ -249,7 +249,7 @@
"navigationBarTitleText": "证书详情-学时证",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": false
"disableScroll": true
}
}
]
......
......@@ -64,7 +64,6 @@ export default {
computed: {
nowDate() {
if (this.logDate) {
console.log('取数据的日期')
return this.logDate.split(' ')[0].replace('-', '.')
} else {
var Today = new Date()
......@@ -121,7 +120,6 @@ export default {
})
},
formatDataByType() {
console.log('shoudao param', getApp().globalData.certItemData)
if (!getApp().globalData.certItemData) {
return
}
......@@ -153,7 +151,6 @@ export default {
}
this.certName = certName
this.dataList = countryData
console.log('data redo log', this.dataList)
},
},
}
......
......@@ -97,7 +97,6 @@ export default {
var Today=new Date();
let m = String(Today.getMonth()+1)
let d = String(Today.getDate())
console.log('d length', d.length)
return (Today.getFullYear() + '.' + (m.length > 1 ? m : '0' + m) + '.' + (d.length > 1 ? d : '0' + d))
},
headPhoto(){
......@@ -128,18 +127,17 @@ export default {
return this.learnData.institutionName || '模考大师'
},
maxpoint() {
return String(this.learnData.startDate).length > 0 ? this.learnData.maxPoint : ''
return this.learnData.maxPoint || ''
},
learnTime() {
return String(this.learnData.startDate).length > 0 ? this.learnData.time : ''
},
resultForTest() {
return String(this.learnData.startDate).length > 0 ? ((this.learnData.maxPoint >= 80 && '合格') || '不合格') : ''
return this.learnData.maxPoint ? ((this.learnData.maxPoint >= 80 && '合格') || '不合格') : ''
},
},
methods: {
formatDataByType() {
console.log('shoudao param', getApp().globalData.certItemData.data)
if (!getApp().globalData.certItemData) {
return
}
......@@ -161,7 +159,8 @@ export default {
.begin-answer {
display: flex;
flex-direction: column;
background-color: #2953ff;
background-image: linear-gradient(to top, #22222E 0%, #444550 40%);
background-color: #22222E;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 100vh;
......
......@@ -123,7 +123,7 @@ export default {
countryCertList: [],
learnCertList: [],
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-1.png',
nothing: process.uniEnv.qn_base_url + 'zanwucuoti@3x.png',
isEmptyList: true,//学时证和国家证都为空显示空
value: '',
......@@ -191,9 +191,11 @@ export default {
// } catch (e) {}
// this.tabsChange(this.current)
},
onUnload(){
uni.hideLoading()
},
methods: {
submit(){
console.log('cert', this.certId)
if(!this.certId){
this.$u.toast('请填写证件号码!')
return
......@@ -206,9 +208,11 @@ export default {
personalCertNum: this.certId,
personalName: this.certName
}
console.log(param)
uni.showLoading({
title: '查询中,请稍后',
})
this.$u.api.getCertFromOut(param).then((res) => {
console.log('证书查询结果', res)
uni.hideLoading()
if(!res){
this.$u.toast('证书暂未公布')
return
......@@ -225,6 +229,7 @@ export default {
}
this.goDetail(data)
}).catch((err) => {
uni.hideLoading()
console.log(err)
return
})
......@@ -232,7 +237,6 @@ export default {
//获取国家证书数据
getCountryCert(){
this.$u.api.getCountryCertList().then((res)=>{
console.log('国家证',res)
if(!res || res.length == 0){
return
}
......@@ -259,13 +263,11 @@ export default {
}
this.logTime = logDate
this.countryCertList = JSON.parse(JSON.stringify(data))
console.log('list data', this.countryCertList)
})
},
//获取学时数据
getLearnCert(){
this.$u.api.getlearnCertList().then((res)=>{
console.log('学时证', res);
if(!res || res.length == 0){
//空显示缺醒
return
......@@ -284,15 +286,12 @@ export default {
item.key = key
data.push(item)
}
console.log('学时证处理结果', data)
this.learnCertList = JSON.parse(JSON.stringify(data))
})
},
goDetail(param){
console.log('goto param', param)
if(param[0].type == 'learn'){
param = param[0]
console.log('点击学时证,请求详情,组装参数再传过去')
this.$u.api.getlearnCertDetail(param.id).then((res)=>{
param.data = res
getApp().globalData.certItemData = param
......@@ -303,7 +302,6 @@ export default {
console.log(err)
})
}else{
console.log('点击国家证,直接参数带过去', param)
getApp().globalData.certItemData = param
this.$u.route({
url: 'pages/cert/detail',
......@@ -315,10 +313,8 @@ export default {
var oDate2 = new Date(date2)
if(oDate1.getTime() > oDate2.getTime()){
return date1
// console.log('第一个大')
} else {
return date2
// console.log('第二个大')
}
},
actionSheetCallback(index) {
......@@ -337,9 +333,7 @@ export default {
onRestore() {
this.triggered = 'restore' // 需要重置
},
onAbort() {
console.log('onAbort')
},
onAbort() {},
transition(e) {
// swiper-item左右移动,通知tabs的滑块跟随移动
let dx = e.detail.dx
......@@ -358,7 +352,6 @@ export default {
},
//tabs通知swiper切换
tabsChange(index) {
console.log('当前tabs index',index)
this.swiperCurrent = Number(index)
switch (this.swiperCurrent) {
case 1:
......@@ -519,7 +512,7 @@ page {
flex-direction: column;
align-items: center;
justify-content: center;
padding: 30rpx;
padding: 200rpx 30rpx 30rpx 30rpx;
text-align: center;
}
</style>
......@@ -23,7 +23,7 @@
<text v-else>{{ title }}</text>
<u-icon class="icon-view" name="arrow-up-fill"></u-icon>
</view>
<view>{{ orgIdText }}</view>
<view v-if="showOrgId">{{ orgIdText }}</view>
<view v-if="noExam" class="tip-view">
<text>您还未选择题库,请先选择题库</text>
</view>
......@@ -90,7 +90,11 @@
</view>
</view>
<view class="bottom-view">
<image class="bottom-image" :src="mokaodashiImage"></image>
<image
class="bottom-image"
:src="mokaodashiImage"
@click="handleClickBlank"
></image>
<view>想要轻松考过,首选模考大师</view>
</view>
</view>
......@@ -126,6 +130,8 @@ export default {
finishCount: 0,
pass: this.$u.random(95, 99),
isAdd: false, // 题库切换
tapCount: 0, // 点击底部logo五次,显示机构id
showOrgId: false, // 显示机构id
}
},
computed: {
......@@ -566,6 +572,17 @@ export default {
},
})
},
handleClickBlank() {
this.tapCount++
if (this.tapCount >= 5) {
this.showOrgId = !this.showOrgId
this.tapCount = 0
} else if (this.tapCount == 1) {
setTimeout(() => {
this.tapCount = 0
}, 3000)
}
},
},
}
</script>
......
......@@ -126,7 +126,6 @@ export default {
return process.uniEnv.qn_base_url + '/shezhi@3x.png'
},
isLogin() {
console.log('is login', this.userInfo.nickName)
return this.userInfo.nickName != undefined
},
loginTips() {
......@@ -184,7 +183,6 @@ export default {
this.student[key] &&
this.student[key] != ' '
) {
console.log('count key', key)
count = count + 1
}
}
......
......@@ -75,7 +75,7 @@
<u-icon name="file-text" color="#5A6073" size="40"></u-icon>
<text>交卷</text>
</view>
<view class="c-list" v-if="type === 4" @click="remove">
<view class="c-list" v-if="type === 4" @click="$u.throttle(remove, 500)">
<u-image
:src="removeImg"
width="36"
......@@ -123,6 +123,8 @@
>
</dailyPop>
</view>
<u-toast ref="uToast" />
</view>
</template>
......@@ -177,11 +179,11 @@ export default {
swiperDuration: '800',
// 分页数据
currentPage: 1,
pageSize: 100,
pageSize: 50,
total: 0,
requesting: false,
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
source: 1,
source: 5,
recordId: 0,
// 合格分数
passPoint: 60,
......@@ -326,15 +328,24 @@ export default {
this.currentIndex = current
if (current == NO_PREV_PAGE || current == NO_NEXT_PAGE) {
if (this.requesting) {
return this.$u.toast('数据加载中')
return this.$refs.uToast.show({
title: '数据加载中',
type: 'warning',
})
}
if (current == NO_PREV_PAGE) {
return this.$u.toast('已经是第一道试题')
return this.$refs.uToast.show({
title: '已经是第一道试题',
type: 'warning',
})
}
if (current == NO_NEXT_PAGE) {
return this.$u.toast('已经是最后一道试题')
return this.$refs.uToast.show({
title: '已经是最后一道试题',
type: 'warning',
})
}
}
......@@ -498,7 +509,10 @@ export default {
this.$u.vuex(`answerCount.${this.questionWarehouseId}`, 0)
this.$u.vuex(`lastIndex.${this.questionWarehouseId}`, 0)
this.$u.vuex(`questionList.${this.questionWarehouseId}`, [])
return this.$u.toast('您已经答完全部试题')
return this.$refs.uToast.show({
title: '您已经答完全部试题',
type: 'warning',
})
})
}
}
......@@ -514,9 +528,9 @@ export default {
}
return
}
this.$nextTick(() => {
setTimeout(() => {
this.current = this.currentIndex + 1
})
}, 500)
}
},
// 保存答案
......@@ -612,7 +626,10 @@ export default {
this.$u.api[action]({ questionId: info.id }).then((res) => {
if (res) {
const msg = status ? '取消收藏成功' : '收藏成功'
this.$u.toast(msg)
this.$refs.uToast.show({
title: msg,
type: 'success',
})
if (status && this.source === 4) {
this.current = this.currentIndex + 1
}
......@@ -716,7 +733,10 @@ export default {
this.list = list
if (this.list.length === 0) {
this.$u.toast('暂无数据')
this.$refs.uToast.show({
title: '暂无数据',
type: 'error',
})
setTimeout(() => {
this.$u.route({
delta: 1,
......
......@@ -83,17 +83,10 @@
:pageScrollTop="pageScrollTop"
background="none"
:opts="{
enableScroll: true,
xAxis: {
enableScroll: true,
scrollShow: true,
itemCount: 3,
disableGrid: true,
boundaryGap: 'center',
labelCount: 4,
},
}"
:ontouch="true"
:disableScroll="true"
/>
</view>
</view>
......
......@@ -222,9 +222,9 @@ export default {
process.uniEnv.qn_base_url + 'applets.jpg',
name: echoMap.studentId.nickname,
image: echoMap.studentId.avatarPath,
score: res.point,
score: Number(res.point) || 0,
time: res.endDatetime,
pageTotalPoint: res.pageTotalPoint,
pageTotalPoint: Number(res.pageTotalPoint) || 0,
category: echoMap.questionWarehouseId.title,
type: '模拟考试',
}
......
......@@ -21,13 +21,8 @@
:statusStyle="item.statusStyle"
></my-subject>
</view>
<view class="content" v-else>
<u-image
width="374rpx"
height="322rpx"
:src="nothing"
style="margin-top: 100rpx;"
></u-image>
<view class="content" v-else style="padding-top: 300rpx;">
<u-image width="374rpx" height="322rpx" :src="nothing"></u-image>
<text style="margin-top: 20rpx;font-size: 28rpx;color: #9EA5BB;"
>当前暂无题库内容</text
>
......@@ -54,7 +49,6 @@ export default {
methods: {
getUserQuestionWareHouseList() {
this.$u.api.getUserQuestionWareHouse().then((res) => {
console.log('tiku list', res)
let length = res.length
if (res.length <= 0) {
return
......@@ -115,11 +109,6 @@ export default {
data[i].status = status
this.lists.push(data[i])
}
// if (data.length > 0) {
// this.lists = data
console.log('tiku data', this.lists)
// }
})
},
getTodayDate() {
......@@ -168,7 +157,7 @@ page {
background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 120vh;
height: 100vh;
position: absolute;
top: 0;
width: 100%;
......@@ -178,8 +167,10 @@ page {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
/* justify-content: center; */
padding: 30rpx;
height: 100%;
overflow: auto;
}
.subject-item {
......
......@@ -80,7 +80,6 @@ export default {
return {
student: {},
qiToken: '',
vToken: null,
}
},
computed: {
......@@ -120,7 +119,6 @@ export default {
onLoad() {
this.student = getApp().globalData.student
this.qiToken = getApp().globalData.qiNiuToken
this.vToken = this.vuex_token
},
onUnload() {
uni.hideLoading()
......@@ -190,7 +188,6 @@ export default {
})
.then((res) => {
uni.hideLoading()
console.log('识别结果', res)
this.student.certificateValidityDate = res.expire
})
.catch((data) => {
......
......@@ -28,8 +28,8 @@
<view slot="right-icon">
<u-image
v-if="headCertPhoto"
width="92rpx"
height="120rpx"
width="92"
height="120"
:src="headCertPhoto"
></u-image>
<text v-else style="color:#2953FF">去上传</text>
......@@ -87,7 +87,7 @@ export default {
isCertify: false,
},
qiToken: null,
code: '',
sessionCode: '',
count: 0,
}
},
......@@ -98,10 +98,6 @@ export default {
)
},
headCertPhoto() {
console.log(
'touxiang bianle',
this.student ? this.student.certificatePhotoPath : 'kong'
)
return (this.student && this.student.certificatePhotoPath) || false
},
getMobile() {
......@@ -117,20 +113,18 @@ export default {
return (this.student && this.student.workUnit) || '去填写'
},
getCertifyStatus() {
console.log('is cert', this.student.isCertify)
return this.student.isCertify ? '已认证' : '去认证'
},
},
onLoad() {
this.refleshCode()
this.$u.api
.getQiNiuToken({ bucketName: 'banshou-userprofile' })
.then((res) => {
console.log('chushihua token', res)
this.qiToken = res //token为七牛云的token一般由后台接口提供
this.qiToken = res
getApp().globalData.qiNiuToken = res
})
this.$u.api.getUserInfo().then((res) => {
console.log('huoqu userinfo', res)
if (res) {
res.isCertify =
res && res.identityNumber && res.identityNumber.length > 5
......@@ -140,10 +134,6 @@ export default {
}
})
},
onShow() {
console.log('iddd', this.student)
console.log('iddd global', getApp().globalData.student)
},
methods: {
goCertify() {
getApp().globalData.student = this.student
......@@ -158,7 +148,6 @@ export default {
})
},
getPhonenumber(e) {
console.log('eeeee', e)
let params = {}
if (e && e.detail) {
if (e.detail.errMsg.indexOf('user deny') > -1) {
......@@ -182,25 +171,16 @@ export default {
},
syncUserinfo(params) {
let that = this
if (!that.sessionCode) {
that.toLogin()
}
uni.checkSession({
success() {
console.log('走的第一个1')
//session_key 未过期,并且在本生命周期一直有效
uni.login({
provider: 'weixin',
success: (code_res) => {
//获取code
if (code_res.errMsg == 'login:ok') {
console.log('走的第一个2')
params.code = code_res.code
//传参到服务器解析
that.sendInfo(params)
}
},
})
params.code = that.sessionCode
//传参到服务器解析
that.sendInfo(params)
},
fail() {
console.log('走的第二个1', params)
// session_key 已经失效,需要重新执行登录流程
setTimeout(() => {
uni.navigateTo({
......@@ -210,6 +190,18 @@ export default {
},
})
},
refleshCode() {
let that = this
uni.login({
provider: 'weixin',
success: (code_res) => {
//获取code
if (code_res.errMsg == 'login:ok') {
that.sessionCode = code_res.code
}
},
})
},
sendInfo(params) {
this.$u.api
.loginWechatAuth(params)
......@@ -224,6 +216,7 @@ export default {
})
})
.catch((err) => {
this.$u.toast('请登录后再绑定')
this.$u.route({
url: 'pages/login/index',
params: {
......@@ -252,10 +245,13 @@ export default {
})
})
},
toUrl(url) {
this.$u.route({
url: url,
})
toLogin() {
this.$u.toast('登录信息已失效,请重新登录')
setTimeout(() => {
uni.navigateTo({
url: 'pages/login/index',
})
}, 800)
},
},
}
......
......@@ -104,6 +104,9 @@ export default {
background-size: 100% 520rpx;
background-repeat: no-repeat;
padding: 0 20rpx;
.search-bar {
margin-top: 20rpx;
}
.title {
color: #191c27;
font-size: 32rpx;
......
src/static/tab/tiku0.png

3.02 KB | W: | H:

src/static/tab/tiku0.png

4.09 KB | W: | H:

src/static/tab/tiku0.png
src/static/tab/tiku0.png
src/static/tab/tiku0.png
src/static/tab/tiku0.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/tiku1.png

2.22 KB | W: | H:

src/static/tab/tiku1.png

2.41 KB | W: | H:

src/static/tab/tiku1.png
src/static/tab/tiku1.png
src/static/tab/tiku1.png
src/static/tab/tiku1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/wode0.png

4.38 KB | W: | H:

src/static/tab/wode0.png

5.91 KB | W: | H:

src/static/tab/wode0.png
src/static/tab/wode0.png
src/static/tab/wode0.png
src/static/tab/wode0.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/wode1.png

3.03 KB | W: | H:

src/static/tab/wode1.png

3.5 KB | W: | H:

src/static/tab/wode1.png
src/static/tab/wode1.png
src/static/tab/wode1.png
src/static/tab/wode1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/zhengshu0.png

2.92 KB | W: | H:

src/static/tab/zhengshu0.png

3.67 KB | W: | H:

src/static/tab/zhengshu0.png
src/static/tab/zhengshu0.png
src/static/tab/zhengshu0.png
src/static/tab/zhengshu0.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/zhengshu1.png

2.24 KB | W: | H:

src/static/tab/zhengshu1.png

2.23 KB | W: | H:

src/static/tab/zhengshu1.png
src/static/tab/zhengshu1.png
src/static/tab/zhengshu1.png
src/static/tab/zhengshu1.png
  • 2-up
  • Swipe
  • Onion skin
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