Commit 41417b8c authored by Damon's avatar Damon

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

parents d10508f3 f936315a
;(function() { ;(function() {
let NODE_ENV = 'prod' // dev:开发环境 | test:测试环境 | prod:生产环境 let NODE_ENV = 'prod' // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null let ENV_VAR = null
let VERSION = 'v1.0.0' let VERSION = 'v1.0.2'
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
if (NODE_ENV === 'dev') { if (NODE_ENV === 'dev') {
ENV_VAR = require('./.env.dev.js') ENV_VAR = require('./.env.dev.js')
......
...@@ -18,32 +18,32 @@ ...@@ -18,32 +18,32 @@
</view> </view>
<view v-if="type == 'learn'" class="item" style="margin-top: 30rpx;"> <view v-if="type == 'learn'" class="item" style="margin-top: 30rpx;">
<view class="table"> <view class="table">
<u-table border-color="#9EA5BB"> <view style="width: 100%; border: 1px solid #444550;border-bottom: none !important;border-right: none !important;border-color: #9EA5BB;">
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">姓名</u-td> <view class="j-td j-title">姓名</view>
<u-td class="u-td val-td">{{name}}</u-td> <view class="j-td j-value">{{name}}</view>
</u-tr> </view>
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">身份证号</u-td></u-td> <view class="j-td j-title">身份证号</view>
<u-td class="u-td val-td">{{idCard}}</u-td> <view class="j-td j-value">{{idCard}}</view>
</u-tr> </view>
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">工作单位</u-td> <view class="j-td j-title">工作单位</view>
<u-td class="u-td val-td">{{company}}</u-td> <view class="j-td j-value">{{company}}</view>
</u-tr> </view>
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">资格类型</u-td> <view class="j-td j-title">资格类型</view>
<u-td class="u-td val-td">{{subjectName}}</u-td> <view class="j-td j-value">{{subjectName}}</view>
</u-tr> </view>
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">培训机构</u-td> <view class="j-td j-title" >培训机构</view>
<u-td class="u-td val-td">{{institutionName}}</u-td> <view class="j-td j-value">{{subjectName}}</view>
</u-tr> </view>
<u-tr class="u-tr"> <view style="width: 100%;display: flex;">
<u-td class="u-td bg-td">培训日期</u-td> <view class="j-td j-title">培训日期</view>
<u-td class="u-td val-td">{{learnDate}}</u-td> <view class="j-td j-value">{{learnDate}}</view>
</u-tr> </view>
</u-table> </view>
</view> </view>
<view class="table" style="margin-top: 30rpx;"> <view class="table" style="margin-top: 30rpx;">
<u-table class="table" border-color="#9EA5BB"> <u-table class="table" border-color="#9EA5BB">
...@@ -151,6 +151,25 @@ export default { ...@@ -151,6 +151,25 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.j-value{
width: 75%;
color: #5A6073 !important;
}
.j-title{
width: 25%;
color: #191C27 !important;
}
.j-td{
border: 1px solid #444550;
border-top: none !important;
border-left: none !important;
border-color: #9EA5BB !important;
padding: 18rpx 0;
font-size: 22rpx !important;
font-weight: bold;
color: #191C27;
border-bottom-color: #9ea5bb !important;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
...@@ -213,20 +232,9 @@ export default { ...@@ -213,20 +232,9 @@ export default {
text-align: left; text-align: left;
padding: 30rpx 0; padding: 30rpx 0;
} }
.table {
/* background-color: #2953ff; */
/* min-height: 200rpx; */
}
::v-deep .u-td{ ::v-deep .u-td{
height: 70rpx; height: 70rpx;
} }
/* ::v-deep .u-td:nth-of-type(even){
flex: 2;
} */
.bg-td{
background-color: #E8EBF3;
font-weight: bold;
}
} }
.cert-foot { .cert-foot {
height: 100rpx; height: 100rpx;
...@@ -246,6 +254,13 @@ export default { ...@@ -246,6 +254,13 @@ export default {
font-weight: bold; font-weight: bold;
color: #5A6073 !important; color: #5A6073 !important;
} }
.u-tr ::v-deep .bg-td {
background-color: #E8EBF3;
font-weight: bold;
.u-td{
color: #191C27 !important;
}
}
} }
.foot { .foot {
height: 100rpx; height: 100rpx;
......
...@@ -211,14 +211,20 @@ export default { ...@@ -211,14 +211,20 @@ export default {
}) })
return return
} }
let param = { let params = {
personalCertNum: this.certId, personalCertNum: this.certId,
personalName: this.certName personalName: this.certName
} }
uni.showLoading({ uni.showLoading({
title: '查询中,请稍后', title: '查询中,请稍后',
}) })
this.$u.api.getCertFromOut(param).then((res) => { let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('selectCertByIdAndName', trackParams)
this.$u.api.getCertFromOut(params).then((res) => {
uni.hideLoading() uni.hideLoading()
if(!res){ if(!res){
this.$refs.uToast.show({ this.$refs.uToast.show({
......
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="tip-view" <view class="tip-view"
>温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为{{ info.passPoint }}分。</view >温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为{{
info.passPoint
}}分。</view
> >
<view class="bottom-view"> <view class="bottom-view">
<u-button <u-button
...@@ -85,32 +87,50 @@ export default { ...@@ -85,32 +87,50 @@ export default {
methods: { methods: {
init() { init() {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中',
})
this.$u.api.getExamPaper({questionWarehouseId: this.questionWarehouseId}).then(res => {
uni.hideLoading()
this.info = {
id: res.id,
kemu: res.echoMap?.questionWarehouseId?.title,
tishu: `${res.totalPoint}题`,
totalPoint: res.totalPoint,
biaozhun: `${res.passPoint}分`,
passPoint: res.passPoint,
duration: `${res.duration}分钟`,
durationNumber: res.duration,
guize: '根据国家规定比例随机抽取'
}
}) })
// 埋点-模拟考试页面获取信息
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
questionWarehouseId: this.questionWarehouseId,
}
getApp().track('getExamPaper-beginAnswerPage', trackParams)
this.$u.api
.getExamPaper({ questionWarehouseId: this.questionWarehouseId })
.then((res) => {
uni.hideLoading()
this.info = {
id: res.id,
kemu: res.echoMap?.questionWarehouseId?.title,
tishu: `${res.totalPoint}题`,
totalPoint: res.totalPoint,
biaozhun: `${res.passPoint}分`,
passPoint: res.passPoint,
duration: `${res.duration}分钟`,
durationNumber: res.duration,
guize: '根据国家规定比例随机抽取',
}
})
}, },
handleClick() { handleClick() {
const params = { const params = {
questionWarehouseId: this.questionWarehouseId, questionWarehouseId: this.questionWarehouseId,
paperId: this.info.id paperId: this.info.id,
} }
uni.showLoading({ uni.showLoading({
title: '载入试题中' title: '载入试题中',
}) })
this.$u.api.applyExam(params).then(res => { // 埋点-去模拟考试
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('applyExam-beginAnswerPage', trackParams)
this.$u.api.applyExam(params).then((res) => {
uni.hideLoading() uni.hideLoading()
if (res) { if (res) {
this.$u.route({ this.$u.route({
...@@ -120,8 +140,8 @@ export default { ...@@ -120,8 +140,8 @@ export default {
source: 3, source: 3,
passPoint: this.info.passPoint, passPoint: this.info.passPoint,
totalPoint: this.info.totalPoint, totalPoint: this.info.totalPoint,
duration: this.info.durationNumber duration: this.info.durationNumber,
} },
}) })
} }
}) })
......
...@@ -95,6 +95,13 @@ export default { ...@@ -95,6 +95,13 @@ export default {
}, },
methods: { methods: {
handleClick() { handleClick() {
// 埋点-扫码
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
}
getApp().track('scanCode-boundQuestionsPage', trackParams)
wx.scanCode({ wx.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
success: (res) => { success: (res) => {
...@@ -142,6 +149,14 @@ export default { ...@@ -142,6 +149,14 @@ export default {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
}) })
// 埋点-购买
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...data,
}
getApp().track('payOrder-boundQuestionsPage', trackParams)
this.$u.api.payOrder(data).then((res) => { this.$u.api.payOrder(data).then((res) => {
uni.hideLoading() uni.hideLoading()
this.pay(res) this.pay(res)
......
...@@ -74,6 +74,13 @@ export default { ...@@ -74,6 +74,13 @@ export default {
methods: { methods: {
handleClick() { handleClick() {
this.loading = true this.loading = true
// 埋点-绑卡
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
}
getApp().track('bindCard-boundTestPage', trackParams)
this.$u.api this.$u.api
.bindCard(this.param) .bindCard(this.param)
.then((res) => { .then((res) => {
......
...@@ -178,6 +178,14 @@ export default { ...@@ -178,6 +178,14 @@ export default {
}, },
methods: { methods: {
queryQuestionWarehouseById(id) { queryQuestionWarehouseById(id) {
// 埋点-获取题库信息
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
id: id,
}
getApp().track('queryQuestionWarehouseById-DetailPage', trackParams)
this.$u.api this.$u.api
.queryQuestionWarehouseById(id) .queryQuestionWarehouseById(id)
.then((res) => { .then((res) => {
...@@ -213,6 +221,14 @@ export default { ...@@ -213,6 +221,14 @@ export default {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
}) })
// 埋点-购买
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...data,
}
getApp().track('payOrder-DetailPage', trackParams)
this.$u.api.payOrder(data).then((res) => { this.$u.api.payOrder(data).then((res) => {
uni.hideLoading() uni.hideLoading()
this.pay(res) this.pay(res)
......
...@@ -210,6 +210,14 @@ export default { ...@@ -210,6 +210,14 @@ export default {
}, },
// 获取省份列表 // 获取省份列表
async getProvinceList(id) { async getProvinceList(id) {
// 埋点-获取省份
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
id: id,
}
getApp().track('getProvinceList-examSettingPage', trackParams)
let res = await this.$u.api.getProvinceList(id) let res = await this.$u.api.getProvinceList(id)
console.log(res) console.log(res)
this.range = res || [] this.range = res || []
...@@ -235,6 +243,14 @@ export default { ...@@ -235,6 +243,14 @@ export default {
provinceId: this.range[this.index].id, provinceId: this.range[this.index].id,
type: this.selectedTypeId, type: this.selectedTypeId,
} }
// 埋点-获取题库信息
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...param,
}
getApp().track('getQuestionWarehouse-examSettingPage', trackParams)
// 获取科目对应的题库 // 获取科目对应的题库
this.$u.api this.$u.api
.getQuestionWarehouse(this.category.id, param) .getQuestionWarehouse(this.category.id, param)
...@@ -242,6 +258,14 @@ export default { ...@@ -242,6 +258,14 @@ export default {
if (res && res.length > 0) { if (res && res.length > 0) {
let data = res[0] let data = res[0]
// 埋点-添加题库
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
questionWarehouseId: data.id,
}
getApp().track('addQuestionWarehouse-examSettingPage', trackParams)
// 学员增加自己的题库 // 学员增加自己的题库
this.$u.api this.$u.api
.addQuestionWarehouse({ .addQuestionWarehouse({
......
...@@ -130,6 +130,16 @@ export default { ...@@ -130,6 +130,16 @@ export default {
} }
this.loading = true this.loading = true
// 埋点-手动绑卡
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
cardNumber: this.code,
cardSecret: this.password,
questionWarehouseId: this.relationId,
}
getApp().track('bindCard-manualBindingPage', trackParams)
this.$u.api this.$u.api
.bindCard({ .bindCard({
cardNumber: this.code, cardNumber: this.code,
......
...@@ -236,6 +236,16 @@ export default { ...@@ -236,6 +236,16 @@ export default {
'yyyy-mm-dd' 'yyyy-mm-dd'
), ),
} }
// 埋点-每日一练统计
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
id: this.questionWarehouseId,
...params,
}
getApp().track('everyTaskList-recordPage', trackParams)
this.$u.api this.$u.api
.everyTaskList(this.questionWarehouseId, params) .everyTaskList(this.questionWarehouseId, params)
.then((res) => { .then((res) => {
...@@ -252,6 +262,14 @@ export default { ...@@ -252,6 +262,14 @@ export default {
}, },
// 练习分析 // 练习分析
studyRecord(params) { studyRecord(params) {
// 埋点-练习分析
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('studyRecord-recordPage', trackParams)
this.$u.api this.$u.api
.studyRecord(this.questionWarehouseId, params) .studyRecord(this.questionWarehouseId, params)
.then((res) => { .then((res) => {
...@@ -278,31 +296,40 @@ export default { ...@@ -278,31 +296,40 @@ export default {
// 模考记录 // 模考记录
queryExamRecord() { queryExamRecord() {
this.recordParams.current += 1 this.recordParams.current += 1
;(this.recordParams.model = { this.recordParams.model = {
questionWarehouseId: this.questionWarehouseId, questionWarehouseId: this.questionWarehouseId,
}), }
this.$u.api
.queryExamRecord(this.recordParams)
.then((res) => {
this.loaded = true
if (this.recordParams.current == 1) {
this.lists = []
}
if ((res.records || []).length > 0) { // 埋点-模考记录
this.lists.push(...res.records) let trackParams = {
} openId: this.openId,
nickname: this.userInfo.nickName,
...this.recordParams,
}
getApp().track('queryExamRecord-recordPage', trackParams)
this.currentLoadStatus = this.$u.api
res.total > this.lists.length && .queryExamRecord(this.recordParams)
(res.records || []).length == this.recordParams.size .then((res) => {
? 'loadmore' this.loaded = true
: 'nomore' if (this.recordParams.current == 1) {
}) this.lists = []
.catch((err) => { }
this.loaded = true
console.log(err) if ((res.records || []).length > 0) {
}) this.lists.push(...res.records)
}
this.currentLoadStatus =
res.total > this.lists.length &&
(res.records || []).length == this.recordParams.size
? 'loadmore'
: 'nomore'
})
.catch((err) => {
this.loaded = true
console.log(err)
})
}, },
handleChangeMonth(e) { handleChangeMonth(e) {
this.everyTaskList(e.year, e.month) this.everyTaskList(e.year, e.month)
......
...@@ -150,6 +150,14 @@ export default { ...@@ -150,6 +150,14 @@ export default {
async loadLabel() { async loadLabel() {
this.tapLoading = true this.tapLoading = true
let param = {} let param = {}
// 埋点-获取科目列表
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
}
getApp().track('subjectList-selectCategoryPage', trackParams)
let res = await this.$u.api.subjectList(param) let res = await this.$u.api.subjectList(param)
this.tapLoading = false this.tapLoading = false
this.result = res this.result = res
......
...@@ -89,6 +89,14 @@ export default { ...@@ -89,6 +89,14 @@ export default {
loadList() { loadList() {
this.loading = true this.loading = true
let param = {} let param = {}
// 埋点-获取已选题库列表
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
}
getApp().track('getMyQuestionWarehouseList-selectedList', trackParams)
this.$u.api this.$u.api
.getMyQuestionWarehouseList(param) .getMyQuestionWarehouseList(param)
.then((res) => { .then((res) => {
......
...@@ -137,27 +137,32 @@ export default { ...@@ -137,27 +137,32 @@ export default {
}) })
return return
} }
this.$u.api let params = {
.updateUserInfo({ identityFrontPath: this.student.identityFrontPath,
identityFrontPath: this.student.identityFrontPath, identityBackPath: this.student.identityBackPath,
identityBackPath: this.student.identityBackPath, identityNumber: this.student.identityNumber,
identityNumber: this.student.identityNumber, certificateValidityDate: this.student.certificateValidityDate,
certificateValidityDate: this.student.certificateValidityDate, name: this.student.name,
name: this.student.name, }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('vertifyIdCard', trackParams)
this.$u.api.updateUserInfo(params).then((res) => {
this.$refs.uToast.show({
title: '认证成功',
type: 'success',
duration: 2000,
}) })
.then((res) => { this.student.isCertify = true
this.$refs.uToast.show({ setTimeout(() => {
title: '认证成功', this.$u.route({
type: 'success', type: 'back',
duration: 2000,
}) })
this.student.isCertify = true }, 1500)
setTimeout(() => { })
this.$u.route({
type: 'back',
})
}, 1500)
})
}, },
getFront() { getFront() {
let that = this let that = this
...@@ -167,10 +172,17 @@ export default { ...@@ -167,10 +172,17 @@ export default {
uni.showLoading({ uni.showLoading({
title: '识别中,请稍后', title: '识别中,请稍后',
}) })
let params = {
url: process.uniEnv.qn_asset_url + res.key,
}
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('front', { .getCertifyInfoByType('front', params)
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
this.student.name = res.name this.student.name = res.name
...@@ -195,10 +207,17 @@ export default { ...@@ -195,10 +207,17 @@ export default {
uni.showLoading({ uni.showLoading({
title: '识别中,请稍后', title: '识别中,请稍后',
}) })
let params = {
url: process.uniEnv.qn_asset_url + res.key,
}
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('back', { .getCertifyInfoByType('back', params)
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
this.student.certificateValidityDate = res.expire this.student.certificateValidityDate = res.expire
......
...@@ -49,23 +49,28 @@ export default { ...@@ -49,23 +49,28 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
this.$u.api let params = {
.updateUserInfo({ workUnit: this.student.workUnit,
workUnit: this.student.workUnit, }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('changeCompany', trackParams)
this.$u.api.updateUserInfo(params).then((res) => {
this.isNotSet = false
this.$refs.uToast.show({
title: '保存成功',
type: 'success',
duration: 2000,
}) })
.then((res) => { setTimeout(() => {
this.isNotSet = false this.$u.route({
this.$refs.uToast.show({ type: 'back',
title: '保存成功',
type: 'success',
duration: 2000,
}) })
setTimeout(() => { }, 1500)
this.$u.route({ })
type: 'back',
})
}, 1500)
})
}, },
}, },
} }
......
...@@ -174,6 +174,12 @@ export default { ...@@ -174,6 +174,12 @@ export default {
}) })
return return
} }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('getPhonenumber', trackParams)
this.syncUserinfo(params) this.syncUserinfo(params)
}, },
syncUserinfo(params) { syncUserinfo(params) {
...@@ -241,23 +247,36 @@ export default { ...@@ -241,23 +247,36 @@ export default {
}) })
}, },
changeHead() { changeHead() {
//获取图片 //更换头像
upload.getPhoto(2, this.qiToken).then((res) => { upload.getPhoto(2, this.qiToken).then((res) => {
this.student.avatarPath = process.uniEnv.qn_asset_url + res.key this.student.avatarPath = process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ let params = {
avatarPath: this.student.avatarPath, avatarPath: this.student.avatarPath,
}) }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('changeAvatar', trackParams)
this.$u.api.updateUserInfo(params)
}) })
}, },
changeCertPhoto() { changeCertPhoto() {
//获取图片 //更换证件头像
upload.getPhoto(2, this.qiToken).then((res) => { upload.getPhoto(2, this.qiToken).then((res) => {
//显示
this.student.certificatePhotoPath = this.student.certificatePhotoPath =
process.uniEnv.qn_asset_url + res.key process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ let params = {
certificatePhotoPath: this.student.certificatePhotoPath, certificatePhotoPath: this.student.certificatePhotoPath,
}) }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('changeCertPhoto', trackParams)
this.$u.api.updateUserInfo(params)
}) })
}, },
toLogin() { toLogin() {
......
...@@ -27,6 +27,11 @@ export default { ...@@ -27,6 +27,11 @@ export default {
methods: { methods: {
upgrade: function() { upgrade: function() {
let that = this let that = this
let trackParams = {
openId: that.openId,
nickname: that.userInfo.nickName,
}
getApp().track('upgradeVersion', trackParams)
uni.showLoading({ uni.showLoading({
title: '正在更新版本...', title: '正在更新版本...',
}) })
...@@ -56,6 +61,11 @@ export default { ...@@ -56,6 +61,11 @@ export default {
content: '确认退出当前账号', content: '确认退出当前账号',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let trackParams = {
openId: that.openId,
nickname: that.userInfo.nickName,
}
getApp().track('logout', trackParams)
that.$u.vuex('vuex_token', '') that.$u.vuex('vuex_token', '')
that.$u.vuex('openId', '') that.$u.vuex('openId', '')
that.$u.vuex('userInfo', {}) that.$u.vuex('userInfo', {})
......
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