Commit 4aa3b6ba by zhangxw

学习中心需求开发

1 parent e393abdd
Showing 84 changed files with 2999 additions and 89 deletions
...@@ -426,5 +426,29 @@ module.exports = { ...@@ -426,5 +426,29 @@ module.exports = {
// 车架号校验 // 车架号校验
checkVinValidate(data) { checkVinValidate(data) {
return api.post('dj.pad.api.vin.validate', data, [], '/rop-dj-pad/router') return api.post('dj.pad.api.vin.validate', data, [], '/rop-dj-pad/router')
} },
// 获取门店品牌标识
getMerchantBrand(data = {}) {
return api.post('dj.api.smartcarlife.recepiton.findMerchantBrand', data)
},
// 获取北森token
findBeiSenSSOToken(data) {
return api.post('dj.pad.api.beisen.findBeiSenSSOToken', data, [], '/rop-dj-pad/router')
},
// 获取学习中心权限
getStudyCenterPermission(data) {
return api.post('dj.pad.api.staff.study.center.access.auth.verify', data, [], '/rop-dj-pad/router')
},
// 学习中心开单限制
checkStudyTaskAPI(data) {
return api.post('dj.api.pad.learning.center.study.permission', data, [], '/rop-dj-pad/router')
},
// 学习中心开始测评弹窗
learninglevelExam(data) {
return api.post('dj.api.pad.learning.center.level.exam', data, [], '/rop-dj-pad/router')
},
// 查询北森考试结果
getBeisenExamResult(data) {
return api.post('dj.api.pad.learning.center.beisen.exam.result', data, [], '/rop-dj-pad/router')
},
} }
...@@ -241,9 +241,13 @@ ...@@ -241,9 +241,13 @@
"root": "packageStudyCenter", "root": "packageStudyCenter",
"name": "packageStudyCenter", "name": "packageStudyCenter",
"pages": [ "pages": [
"pages/studyCenter/studyCenter",
"pages/myTask/myTask", "pages/myTask/myTask",
"pages/taskDetail/longCourse/longCourse", "pages/taskDetail/longCourse/longCourse",
"pages/taskDetail/shortCourse/shortCourse" "pages/taskDetail/shortCourse/shortCourse",
"pages/myCourse/myCourse",
"pages/myExam/myExam",
"pages/staffRank/staffRank"
] ]
} }
], ],
......
// components/studyPermissionModal/studyPermissionModal.js
import api from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
title: '',
type: '',
btnText: ''
},
/**
* 组件的方法列表
*/
methods: {
open(options = {}) {
return new Promise((resolve, reject) => {
this.setData({
show: true,
...options
})
})
},
goPage() {
let { type, examId } = this.data
this.setData({
show: false
})
if (type == 'permission') {
wx.navigateTo({
url: '/packageStudyCenter/pages/studyCenter/studyCenter',
})
} else { // 北森考试
api.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data;
const COURSE_ID = examId;
if (beisenToken) {
const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = {
product: 'Learning',
keyName: 'Nusion',
pageCode: 'LearningExamTraineePage',
appCode: 'Learning',
examId: COURSE_ID
};
this.jumpUrl = ''
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.join('&');
// this.setWebviewStyle()
const url = encodeURIComponent(`${baseUrl}?${queryString}#/viewDynamic?1=1`);
const tokenUrl = beisenToken
wx.$router.jumpH5(`${tokenUrl}&return_url=${url}`)
} else {
wx.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
})
}
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/studyPermissionModal/studyPermissionModal.wxss */
/* 蒙层 */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
padding: 40rpx;
}
/* 弹窗容器 */
.modal-container {
width: 100%;
max-width: 640rpx;
background: #fff;
border-radius: 32rpx;
overflow: hidden;
position: relative;
animation: modalShow 0.3s ease;
}
@keyframes modalShow {
from {
opacity: 0;
transform: translateY(100rpx) scale(0.9);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* 头部 */
.modal-header {
display: flex;
justify-content: center;
margin: var(--fontSize48) 0 var(--fontSize32);
.modal-main-title {
color: #292D33;
font-size: var(--fontSize34);
font-weight: 500;
}
}
.modal-content {
margin: 0 var(--fontSize48) var(--fontSize48) var(--fontSize48);
text-align: center;
font-size: var(--fontSize28);
.content-title {
color: #5A5E66;
}
.content-text {
background: #FEF5EA;
border-radius: var(--fontSize8);
padding: var(--fontSize8) var(--fontSize32);
color: #FF9D0A;
margin-top: var(--fontSize32);
}
.content-footer {
color: #6C6F75;
margin-top: var(--fontSize32);
}
}
.custom-content {
text-align: left;
background: #F7F8FA;
border-radius: var(--fontSize20);
font-size: var(--fontSize28);
color: #6C6F75;
padding: var(--fontSize24);
.content-title {
color: #292D33;
font-weight: 500;
margin-bottom: var(--fontSize8);
}
.features {
margin-top: var(--fontSize8);
.feature-item {
display: flex;
align-items: center;
.dot {
width: var(--fontSize12);
height: var(--fontSize12);
border-radius: 50%;
background: #6C6F75;
margin: 0 var(--fontSize16);
flex-shrink: 0;
}
}
}
}
.custom-content-footer {
color: #6C6F75;
font-size: var(--fontSize28);
margin: var(--fontSize32) calc(-1 * var(--fontSize19)) 0 calc(-1 * var(--fontSize19));
text{
color: #347BFF;
}
}
.modal-footer {
border-top: var(--fontSize1) solid #EBEDF0;
height: var(--fontSize96);
display: flex;
align-items: center;
justify-content: center;
color: #347BFF;
font-size: var(--fontSize32);
font-weight: 600;
}
<!--components/studyPermissionModal/studyPermissionModal.wxml-->
<view class="modal-mask" wx:if="{{show}}" bindtap="onMaskTap" catchtouchmove="preventTouchMove">
<view class="modal-container" catchtap="stopPropagation">
<view class="modal-header">
<view class="modal-title-wrapper">
<view class="modal-main-title">{{title}}</view>
</view>
</view>
<!-- 内容区域 -->
<view class="modal-content">
<block wx:if="{{type == 'permission'}}">
<view class="content-title">优秀的技能是您接单的通行证,磨刀不误砍柴工,您的专业能力是赢得客户信任的关键。</view>
<view class="content-text">到学习中心-我的课程-待学习,完成课程学习后,即可解锁开单权限。</view>
<view class="content-footer">只差一步即可开启您的接单之旅!</view>
</block>
<block wx:else>
<view class="custom-content">
<view class="content-title">个性化学习路径</view>
<view class="contetn-text">根据您当前的学习情况,我们将为您定制专属的学习计划,帮助您高效提升技能,实现职业突破。</view>
<view class="features">
<view class="feature-item">
<view class="dot"></view>
<text class="feature-text">基于当前能力水平评估</text>
</view>
<view class="feature-item">
<view class="dot"></view>
<text class="feature-text">结合岗位发展目标制定</text>
</view>
<view class="feature-item">
<view class="dot"></view>
<text class="feature-text">定期跟踪学习进度和效果</text>
</view>
</view>
</view>
<view class="custom-content-footer">
请先完成<text>【{{customObj.title}}】</text>考试测评后会推荐适合您的课程
</view>
</block>
</view>
<!-- 底部按钮 -->
<view class="modal-footer">
<view class="footer-buttons" bindtap="goPage">{{btnText}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
"makert-material":"../trainingMaterials/components/Materials/materials", "makert-material":"../trainingMaterials/components/Materials/materials",
"reception-screen": "../index/components/receptionScreen/receptionScreen", "reception-screen": "../index/components/receptionScreen/receptionScreen",
"order-screen": "../carQuotation/components/OrderScreen/OrderScreen", "order-screen": "../carQuotation/components/OrderScreen/OrderScreen",
"side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup" "side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -63,4 +63,5 @@ ...@@ -63,4 +63,5 @@
<view wx:if="{{ showOrderRendering }}"> <view wx:if="{{ showOrderRendering }}">
<order-screen show="{{ show_order_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" zyStatus="{{ zyPayStatus }}" bindconfirm="searchScreen" /> <order-screen show="{{ show_order_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" zyStatus="{{ zyPayStatus }}" bindconfirm="searchScreen" />
</view> </view>
</page-container>
\ No newline at end of file \ No newline at end of file
</page-container>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/carEquity/components/EquityList/EquityList.js // packageEquity/pages/carEquity/components/EquityList/EquityList.js
import { checkDailyReport } from "~/store/ModalToQueueControl"; import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl";
import carLifeApi from '../../../../carEquityApi' import carLifeApi from '../../../../carEquityApi'
import constantData from '../constant/data' import constantData from '../constant/data'
const TABLIST = ['全部', '待补单', '提单失败', '已完成'] const TABLIST = ['全部', '待补单', '提单失败', '已完成']
...@@ -239,7 +239,10 @@ Component({ ...@@ -239,7 +239,10 @@ Component({
async handleRecordOrder(e) { async handleRecordOrder(e) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let { let {
target target
} = e.currentTarget.dataset } = e.currentTarget.dataset
...@@ -300,6 +303,9 @@ Component({ ...@@ -300,6 +303,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
wx.$router.go("signature", { wx.$router.go("signature", {
orderId: target.orderId, orderId: target.orderId,
......
...@@ -13,7 +13,8 @@ import { ...@@ -13,7 +13,8 @@ import {
getMoreBtnAPI getMoreBtnAPI
} from "../../../api"; } from "../../../api";
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import data from "../constant/data"; import data from "../constant/data";
import constantData from "../constant/data"; import constantData from "../constant/data";
...@@ -315,6 +316,9 @@ Component({ ...@@ -315,6 +316,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
/**禁止提单 */ /**禁止提单 */
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
// console.log(e) // console.log(e)
...@@ -611,6 +615,9 @@ Component({ ...@@ -611,6 +615,9 @@ Component({
if (target?.zyPayStatus == '1' && type == 'handle') { if (target?.zyPayStatus == '1' && type == 'handle') {
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
return wx.$router.go("serviceInfo", { return wx.$router.go("serviceInfo", {
orderId: target.orderId, orderId: target.orderId,
apiName: "handler", apiName: "handler",
...@@ -621,6 +628,9 @@ Component({ ...@@ -621,6 +628,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
return this.setData({ return this.setData({
showZyPayPopup: true, showZyPayPopup: true,
showZyTarget: target, showZyTarget: target,
...@@ -632,6 +642,9 @@ Component({ ...@@ -632,6 +642,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
return this.setData({ return this.setData({
showZyPayPopup: true, showZyPayPopup: true,
showZyTarget: target, showZyTarget: target,
...@@ -648,6 +661,9 @@ Component({ ...@@ -648,6 +661,9 @@ Component({
case "0": case "0":
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */ if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
wx.$router.go( wx.$router.go(
target.mode != 0 ? target.mode != 0 ?
...@@ -665,6 +681,9 @@ Component({ ...@@ -665,6 +681,9 @@ Component({
case "2": case "2":
staffCheck = await checkDailyReport(true); staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (type == "pay") { if (type == "pay") {
// 去支付 // 去支付
wx.$router.go("CarQuotationPay", { wx.$router.go("CarQuotationPay", {
...@@ -687,6 +706,9 @@ Component({ ...@@ -687,6 +706,9 @@ Component({
// }) // })
staffCheck = await checkDailyReport(true); staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (type == "handle") { if (type == "handle") {
// 去处理 // 去处理
wx.$router.go("serviceInfo", { wx.$router.go("serviceInfo", {
...@@ -707,6 +729,9 @@ Component({ ...@@ -707,6 +729,9 @@ Component({
// }) // })
staffCheck = await checkDailyReport(true); staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */ if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
wx.$router.go( wx.$router.go(
target.mode != 0 ? target.mode != 0 ?
...@@ -719,6 +744,9 @@ Component({ ...@@ -719,6 +744,9 @@ Component({
case "5": case "5":
staffCheck = await checkDailyReport(true); staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
wx.$router.go("serviceInfo", { wx.$router.go("serviceInfo", {
orderId: target.orderId, orderId: target.orderId,
apiName: "handler", apiName: "handler",
...@@ -1081,6 +1109,9 @@ Component({ ...@@ -1081,6 +1109,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
console.log(e.currentTarget.dataset, 'e.currentTarget.dataset') console.log(e.currentTarget.dataset, 'e.currentTarget.dataset')
const { const {
id, id,
...@@ -1180,6 +1211,9 @@ Component({ ...@@ -1180,6 +1211,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this let _this = this
const { const {
item item
...@@ -1394,9 +1428,12 @@ Component({ ...@@ -1394,9 +1428,12 @@ Component({
} }
this.handleBtnCancel() this.handleBtnCancel()
}, },
toRefund(flag) { async toRefund(flag) {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let { btnOrderInfo } = this.data let { btnOrderInfo } = this.data
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 退款申请时区域运营查询 // 退款申请时区域运营查询
api.areaSupervisionExistsAPI({ merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType }).then(res => { api.areaSupervisionExistsAPI({ merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType }).then(res => {
let { code, data } = res let { code, data } = res
......
{ {
"usingComponents": { "usingComponents": {
"equity-item":"./components/EquityItem/EquityItem", "equity-item":"./components/EquityItem/EquityItem",
"upgrade-item":"./components/UpgradeItem/UpgradeItem" "upgrade-item":"./components/UpgradeItem/UpgradeItem",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
}, },
"navigationBarTitleText": "线索管理" "navigationBarTitleText": "线索管理"
} }
\ No newline at end of file \ No newline at end of file
...@@ -36,4 +36,5 @@ ...@@ -36,4 +36,5 @@
</block> </block>
</block> </block>
</view> </view>
</view>
\ No newline at end of file \ No newline at end of file
</view>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueList/components/EquityItem/EquityItem.js // packageEquity/pages/clueList/components/EquityItem/EquityItem.js
import itemMixin from "../itemMixins"; import itemMixin from "../itemMixins";
import { checkDailyReport } from "~/store/ModalToQueueControl"; import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl";
Component({ Component({
behaviors: [itemMixin], behaviors: [itemMixin],
...@@ -97,6 +97,9 @@ Component({ ...@@ -97,6 +97,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
const { data } = this.data; const { data } = this.data;
let params = {}; let params = {};
if (data.boutiqueOrders && data.boutiqueOrders.length) if (data.boutiqueOrders && data.boutiqueOrders.length)
......
// packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js // packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
import itemMixin from '../itemMixins' import itemMixin from '../itemMixins'
import { checkDailyReport } from "~/store/ModalToQueueControl"; import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl";
Component({ Component({
behaviors: [itemMixin], behaviors: [itemMixin],
/** /**
...@@ -54,6 +54,9 @@ Component({ ...@@ -54,6 +54,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;; if (staffCheck) return false;;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
const { const {
data data
} = this.data } = this.data
......
...@@ -3,7 +3,8 @@ import { ...@@ -3,7 +3,8 @@ import {
setConfigInfo setConfigInfo
} from "~/store/index"; } from "~/store/index";
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import { import {
getReceptionRecordList, getReceptionRecordList,
...@@ -668,6 +669,14 @@ Component({ ...@@ -668,6 +669,14 @@ Component({
}) })
} }
} }
// 非冀联园区店的员工展示学习中心入口
if (userInfo?.subLoginUser?.channelType != 9 && isStaff && menuList.every((item) => item.menuText != "学习中心")) {
menuList.push({
menuText: '学习中心',
path: 'packageStudyCenter.studyCenter',
icon: 'study-center'
})
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -1282,6 +1291,9 @@ Component({ ...@@ -1282,6 +1291,9 @@ Component({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
} }
if (item.path == 'packageEquity.start') { if (item.path == 'packageEquity.start') {
wx.$track.setTrackData(0, 'aiCheck_page', {}, '', 0) wx.$track.setTrackData(0, 'aiCheck_page', {}, '', 0)
...@@ -1320,6 +1332,9 @@ Component({ ...@@ -1320,6 +1332,9 @@ Component({
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
console.log(staffCheck, 'staffCheck'); console.log(staffCheck, 'staffCheck');
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
/**禁止提单 */ /**禁止提单 */
if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return
if ( if (
......
...@@ -16,10 +16,6 @@ module.exports = { ...@@ -16,10 +16,6 @@ module.exports = {
getShortCourseDetail(data) { getShortCourseDetail(data) {
return api.post('dj.pad.api.staff.study.short.course.detail', data, [], '/rop-dj-pad/router') return api.post('dj.pad.api.staff.study.short.course.detail', data, [], '/rop-dj-pad/router')
}, },
// 获取北森token
findBeiSenSSOToken(data) {
return api.post('dj.pad.api.beisen.findBeiSenSSOToken', data, [], '/rop-dj-pad/router')
},
// 获取智能体 // 获取智能体
getAiAgentList(data) { getAiAgentList(data) {
return api.post('dj.pad.api.aiagent.get.special.agent', data, [], '/rop-dj-pad/router') return api.post('dj.pad.api.aiagent.get.special.agent', data, [], '/rop-dj-pad/router')
...@@ -28,8 +24,40 @@ module.exports = { ...@@ -28,8 +24,40 @@ module.exports = {
getMerchantBrand(data = {}) { getMerchantBrand(data = {}) {
return api.post('dj.api.smartcarlife.recepiton.findMerchantBrand', data) return api.post('dj.api.smartcarlife.recepiton.findMerchantBrand', data)
}, },
// 学习中心-员工学习中心权限授权校验 // 获取我的课程列表数据
getStudyCenterPermission(data) { getMyCourseList(data) {
return api.post('dj.pad.api.staff.study.center.access.auth.verify', data, [], '/rop-dj-pad/router') return api.post('dj.api.pad.learning.center.myself.course', data, [], '/rop-dj-pad/router')
} },
// 获取我的课程tab状态数量
getMyCourseCount(data) {
return api.post('dj.api.pad.learning.center.myself.course.count', data, [], '/rop-dj-pad/router')
},
// 我的课程-剩余开单时间
getResidueTimeApi(data) {
return api.post('dj.api.pad.learning.center.residue.time', data, [], '/rop-dj-pad/router')
},
// 学习中心-获取学习统计数据
getStudyStatistics(data) {
return api.post('dj.pad.api.course.staff.statistics', data, [], '/rop-dj-pad/router')
},
// 获取全部课程列表数据
getRecommendedCourseList(data) {
return api.post('dj.pad.api.recommended.course.page', data, [], '/rop-dj-pad/router')
},
// 查询课程分类
getCourseCategoryData(data) {
return api.post('dj.pad.api.course.category.list.tree', data, [], '/rop-dj-pad/router')
},
// 获取我的考试列表数据
getStaffExaminationList(data) {
return api.post('dj.pad.api.recommended.staff.examination.page', data, [], '/rop-dj-pad/router')
},
// 获取我的考试统计数据
getStaffExaminationCount(data) {
return api.post('dj.pad.api.recommended.staff.examination.count', data, [], '/rop-dj-pad/router')
},
// 获取员工学习排行榜
getStaffStudyRank(data) {
return api.post('dj.pad.api.recommended.staff.study.duration.rank', data, [], '/rop-dj-pad/router')
},
} }
...@@ -18,9 +18,6 @@ Component({ ...@@ -18,9 +18,6 @@ Component({
}, },
completeKey: { completeKey: {
type: String type: String
},
completeValue: {
type: Number
} }
}, },
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
width: var(--fontSize96); width: var(--fontSize96);
color: #999EA8; color: #999EA8;
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
&.custom {
width: var(--fontSize144);
}
} }
.value { .value {
color: #666666; color: #666666;
...@@ -135,6 +138,9 @@ ...@@ -135,6 +138,9 @@
color: #2C66F7; color: #2C66F7;
text-align: center; text-align: center;
line-height: var(--fontSize56); line-height: var(--fontSize56);
&.transparent {
opacity: 0;
}
} }
.completed-bg { .completed-bg {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<view class="item-container"> <view class="item-container">
<slot></slot> <slot></slot>
<view class="image-box" wx:if="{{!customTop}}"> <view class="image-box" wx:if="{{!customTop}}">
<view class="image-tag" wx:if="{{infoData._showImageTag}}"> <view class="image-tag" wx:if="{{infoData._tagImage}}">
<image src="{{infoData._tagImage}}" mode=""/> <image src="{{infoData._tagImage}}" mode=""/>
</view> </view>
<block wx:if="{{infoData._showTag}}"> <block wx:if="{{infoData._tagText}}">
<view class="tag">{{infoData._tagText}}</view> <view class="tag">{{infoData._tagText}}</view>
</block> </block>
<image class="item-img" src="{{infoData._imageUrl}}"/> <image class="item-img" src="{{infoData._imageUrl}}"/>
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
<view class="item-title" wx:if="{{item.type == 'title'}}">{{infoData[item.key]}}</view> <view class="item-title" wx:if="{{item.type == 'title'}}">{{infoData[item.key]}}</view>
<block wx:elif="{{item.type == 'score'}}"> <block wx:elif="{{item.type == 'score'}}">
<view class="score-box"> <view class="score-box">
<van-rate value="{{infoData[item.key]}}" size="20" gutter="1.5" count="{{item.allCount || 5}}" custom-class="score-view" color="{{item.color || '#FFB642'}}" void-color="{{item.voidColor || 'transparent'}}" readonly/> <van-rate value="{{infoData[item.key]}}" size="20" gutter="1.5" count="{{item.allCount || 5}}" custom-class="score-view" color="{{item.color || '#FFB642'}}" void-icon="star" void-color="{{item.voidColor || '#E0E0E0'}}" readonly/>
<view class="score-text">{{infoData[item.key]}}</view> <view class="score-text">{{infoData[item.textKey]}}</view>
</view> </view>
</block> </block>
<block wx:elif="{{item.type == 'btn'}}"> <block wx:elif="{{item.type == 'btn'}}">
<view class="item-btn" wx:if="{{infoData[item.showEventKey] == item.showEventValue}}">{{item.btnText}}</view> <view class="item-btn {{infoData[item.showEventKey] ? '' : 'transparent'}}">{{item.btnText}}</view>
</block> </block>
<block wx:elif="{{item.type == 'completeIcon' && infoData[item.showEventKey] == item.showEventValue}}"> <block wx:elif="{{item.type == 'completeIcon' && infoData[item.showEventKey] == item.showEventValue}}">
<image class="completed-bg" src="{{IMG_URL}}usedCar/completed-bg.png" /> <image class="completed-bg" src="{{IMG_URL}}usedCar/completed-bg.png" />
...@@ -28,11 +28,12 @@ ...@@ -28,11 +28,12 @@
<block wx:elif="{{item.type == 'studied'}}"> <block wx:elif="{{item.type == 'studied'}}">
<view class="studied-box"> <view class="studied-box">
<image class="icon" src="{{IMG_URL}}studyCenter/all-amount.png"/> <image class="icon" src="{{IMG_URL}}studyCenter/all-amount.png"/>
<view class="text">{{50}}人已学习</view> <view class="text">{{infoData[item.key]}}人已学习</view>
</view> </view>
</block> </block>
<view class="item {{infoData[completeKey] == completeValue ? 'transparent' : ''}}" wx:else>
<view class="label">{{item.label}}</view> <view class="item {{infoData._showCompleteIcon ? 'transparent' : ''}}" wx:else>
<view class="label {{item.customerLabel ? 'custom' : ''}}">{{item.label}}</view>
<view class="value"> <view class="value">
<block wx:if="{{item.type == 'progress'}}"> <block wx:if="{{item.type == 'progress'}}">
<block wx:if="{{infoData[item.statusKey] == item.statusEvent}}"> <block wx:if="{{infoData[item.statusKey] == item.statusEvent}}">
...@@ -52,12 +53,12 @@ ...@@ -52,12 +53,12 @@
<block wx:if="{{idx == 1}}"> <block wx:if="{{idx == 1}}">
<text class="split">|</text> <text class="split">|</text>
</block> </block>
{{infoData[subItem]}}{{item.unitArr[idx]}} {{infoData[subItem] != null ? infoData[subItem] : '-'}}{{item.unitArr[idx]}}
</view> </view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
{{infoData[item.key]}}<text wx:if="{{item.unit}}">{{item.unit}}</text> {{infoData[item.key] != null ? infoData[item.key] : '-'}}<text wx:if="{{item.unit}}">{{item.unit}}</text>
</block> </block>
</view> </view>
</view> </view>
......
// components/ExamSubmitPopup/ExamSubmitPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
examSubmitText: {
type: String
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL
},
/**
* 组件的方法列表
*/
methods: {
open(options = {}) {
return new Promise((resolve, reject) => {
this.setData({
show: true,
...options
})
})
},
close() {
this.setData({
show: false
})
},
cancel() {
this.triggerEvent('cancel')
},
confirm() {
this.triggerEvent('confirm')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/ExamSubmitPopup/ExamSubmitPopup.wxss */
/* 蒙层 */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
padding: 40rpx;
}
/* 弹窗容器 */
.modal-container {
width: 100%;
max-width: 640rpx;
background: #fff;
border-radius: 32rpx;
overflow: hidden;
position: relative;
animation: modalShow 0.3s ease;
}
@keyframes modalShow {
from {
opacity: 0;
transform: translateY(100rpx) scale(0.9);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* 头部 */
.modal-header {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
margin: var(--fontSize48) 0 var(--fontSize32);
.icon {
width: var(--fontSize176);
height: var(--fontSize176);
margin-bottom: var(--fontSize32);
}
.modal-main-title {
color: #292D33;
font-size: var(--fontSize34);
font-weight: 500;
}
}
.modal-content {
margin: 0 var(--fontSize48) var(--fontSize48) var(--fontSize48);
text-align: center;
font-size: var(--fontSize32);
color: #6C6F75;
}
.modal-footer {
border-top: var(--fontSize1) solid #EBEDF0;
height: var(--fontSize96);
display: flex;
align-items: center;
justify-content: center;
color: #347BFF;
font-size: var(--fontSize32);
.btn {
height: 100%;
line-height: var(--fontSize96);
flex: 1;
text-align: center;
}
.cancel {
color: #292D33;
}
}
\ No newline at end of file \ No newline at end of file
<!--components/ExamSubmitPopup/ExamSubmitPopup.wxml-->
<view class="modal-mask" wx:if="{{show}}" bindtap="onMaskTap" catchtouchmove="preventTouchMove">
<view class="modal-container" catchtap="stopPropagation">
<view class="modal-header">
<image class="icon" src="{{IMG_URL}}studyCenter/exam-submit-icon.png" mode=""/>
<view class="modal-main-title">是否已提交考试</view>
</view>
<!-- 内容区域 -->
<view class="modal-content" wx:if="{{examSubmitText}}">{{examSubmitText}}</view>
<!-- 底部按钮 -->
<view class="modal-footer">
<view class="cancel btn" bindtap="cancel">未提交</view>
<view class="confirm btn" bindtap="confirm">确认已提交</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
let IMGTAG = { // 1必修 2选修
1: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/mandatory.png',
2: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/elective.png'
}
let TAGTEXT = {
10: '视频',
30: '文档',
20: '混合',
80: '音频',
40: 'H5',
70: 'URL',
120: '图文'
}
// 非视频 默认图片都用文档类型图片
let TYPEIMG = {
10: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/video-icon.png',
30: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png',
20: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png',
80: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png',
40: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png',
70: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png',
120: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/document-icon.png'
}
export default {
IMGTAG,
TYPEIMG,
TAGTEXT
}
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/myCourse/myCourse.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from "~/packageStudyCenter/api"
import commonApi from "~/api/api"
import constantData from "../../constantData"
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
tabList: [{
label: '待学习',
num: 0
}, {
label: '正在学习',
num: 0
}, {
label: '已学习',
num: 0
}],
tabIndex: 0,
pageNum: 1,
pageSize: 10,
residueObj: {}, // 剩余开单时间
courseList: [],
formItems: [],
tipsBoxHeight: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getStaticData()
this.getResidueTime()
if (options?.tabIndex) {
this.setData({
tabIndex: Number(options.tabIndex)
}, () => {
this.getList()
})
} else {
this.getList()
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
// 获取我的课程剩余开单时间
getResidueTime() {
api.getResidueTimeApi({}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
residueObj: data || {}
}, () => {
if (data?.remindType > 0) {
const query = wx.createSelectorQuery()
query.select('.tips-box').boundingClientRect((res) => {
const height = res && res?.height
this.setData({
tipsBoxHeight: height || 0
})
}).exec()
}
})
} else {
wx.$util.showToast(message)
}
this.setData({
})
})
},
getStaticData() {
api.getMyCourseCount({}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
['tabList[0].num']: data.unLearnCount,
['tabList[1].num']: data.learningCount,
['tabList[2].num']: data.completedCount
})
} else {
wx.$util.showToast(message)
}
})
},
changeTab(e) {
let { index } = e.currentTarget.dataset
this.setData({
tabIndex: index,
pageNum: 1,
dataList: []
}, () => {
this.getList(true)
})
},
scrollonReachBottom() {
const { pageNum, total, pageSize } = this.data
if (Math.ceil(total / pageSize) > pageNum) {
this.setData({ pageNum: pageNum + 1 }, () => {
this.getList()
})
} else {
this.setData({ nothing: true })
}
},
async getList(scrollTopFlag = false) {
try {
wx.showLoading()
let { pageNum, pageSize, tabIndex, formItems } = this.data
const params = {
learnStatus: tabIndex,
pageNum,
pageSize
}
this.setData({
loading: true
})
if (pageNum > 1) {
this.setData({
loadingList: true
})
}
const res = await api.getMyCourseList(params)
switch (tabIndex) {
case 0:
formItems = [{
key: 'title',
type: 'title'
}, {
label: '课程时长',
key: 'totalDuration',
unit: 'min'
}, {
type: 'score',
key: '_totalStar',
textKey: 'totalStar'
}, {
type: 'studied',
key: 'learnTotal'
}]
break
case 1:
formItems = [{
key: 'title',
type: 'title'
}, {
label: '课程时长',
key: 'totalDuration',
unit: 'min'
}, {
label: '学习进度',
type: 'progress',
statusKey: 'completeStatus',
statusEvent: '0',
key: '_process'
}]
break
case 2:
formItems = [{
key: 'title',
type: 'title'
}, {
label: '课程时长',
key: 'totalDuration',
unit: 'min'
}, {
label: '学习进度',
type: 'progress',
statusKey: 'completeStatus',
statusEvent: '0',
key: '_process'
}, {
type: 'completeIcon',
showEventKey: 'completeStatus',
showEventValue: 1
}]
break
}
this.setData({
loadingList: false,
formItems
})
if (res.code != 0) {
wx.$util.showToast(res.message)
}
let newList = res?.data?.list || [];
newList?.forEach(val => {
val._totalStar = val.totalStar / 2
val._imageUrl = constantData.TYPEIMG[val.courseFileType]
val._tagImage = constantData.IMGTAG[val.planCourseType]
val._tagText = constantData.TAGTEXT[val.courseFileType]
val.completeStatus = val.process >= 1 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process * 100)}%`
val._showCompleteIcon = val.process >= 1
})
this.setData({
loading: false
})
if (pageNum == 1) {
this.setData({ courseList: newList })
} else {
this.setData({
courseList: this.data.courseList.concat(newList)
});
}
wx.hideLoading()
this.setData({
total: res.data?.total,
nothing: newList.length > 0
})
if (scrollTopFlag) {
this.setData({scrollTop: 0})
}
} catch (error) {
wx.showToast({
title: error.message || '请求失败',
icon: "none",
})
}
},
// 跳转北森课程详情
goBeisenDetail(e) {
let { target } = e.currentTarget.dataset
wx.showLoading()
commonApi.findBeiSenSSOToken({}).then(res => {
wx.hideLoading()
const beisenToken = res.data;
if (beisenToken) {
const COURSE_ID = target?.courseId;
const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = {
product: 'Learning',
keyName: 'Nusion',
pageCode: 'LearningCourseTraineeDetailPage',
appCode: 'Learning',
id: COURSE_ID
};
this.jumpUrl = ''
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.join('&');
// this.setWebviewStyle()
const url = encodeURIComponent(`${baseUrl}?${queryString}#/viewDynamic?1=1`);
const tokenUrl = beisenToken
wx.$router.jumpH5(`${tokenUrl}&return_url=${url}`)
} else {
wx.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"card-item": "/packageStudyCenter/components/CardItem/CardItem"
},
"navigationBarTitleText": "我的课程"
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/myCourse/myCourse.wxss */
page {
background: #F7F8FA;
}
.container {
height: 100vh;
.top-box {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize24) var(--fontSize28);
.tab-box {
display: flex;
align-items: center;
gap: var(--fontSize16);
.tab-item {
text-align: center;
padding: 0 var(--fontSize32);
height: var(--fontSize72);
line-height: var(--fontSize72);
border-radius: var(--fontSize16);
opacity: 1;
background: #ffffff;
backdrop-filter: blur(var(--fontSize12));
color: #666666;
font-size: var(--fontSize28);
&.active {
color: #FFFFFF;
background: #2c66f7;
font-weight: 500;
box-shadow: var(--fontSize4) var(--fontSize8) var(--fontSize16) 0 #81a3d659;
}
}
}
.count-box {
color: #999EA8;
font-size: var(--fontSize26);
}
}
.tips-box {
border-radius: var(--fontSize8);
background: #fef5ea;
position: relative;
margin-bottom: var(--fontSize28);
.icon {
position: absolute;
top: var(--fontSize18);
left: var(--fontSize16);
width: var(--fontSize28);
height: var(--fontSize28);
}
.tips {
padding: var(--fontSize16) var(--fontSize16) var(--fontSize16) var(--fontSize52);
color: #FF9D0A;
font-size: var(--fontSize24);
font-weight: 500;
}
}
.list-scroll {
.list-container {
max-height: none; /* 确保不被限制 */
height: auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--fontSize16);
padding: 0 var(--fontSize28) var(--fontSize32);
box-sizing: border-box;
}
}
.nothing {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
flex-direction: column;
margin-top: 270rpx;
font-size: var(--fontSize24);
color: #999999;
.icon {
width: var(--fontSize128);
height: var(--fontSize80);
margin-bottom: var(--fontSize8);
}
}
.end-text {
width: 100%;
text-align: center;
padding-bottom: var(--fontSize36);
color: #999999;
font-size: var(--fontSize24);
}
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/myCourse/myCourse.wxml-->
<view class="container">
<view class="top-box">
<view class="tab-box">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item.label}}<text>{{item.num != null ? item.num : '-'}}</text></view>
</view>
</view>
<view class="tips-box" wx:if="{{residueObj.remindType == 1 || residueObj.remindType == 2}}">
<image class="icon" src="{{IMG_URL}}studyCenter/warning.png" mode=""/>
<view class="tips" wx:if="{{residueObj.remindType == 1}}">剩余{{residueObj.residueDays}}天完成必修课学习及通过课后考试,过期将锁定开单权限</view>
<view class="tips" wx:elif="{{residueObj.remindType == 2}}">完成必修课学习及通过课后考试后,即可解锁开单权限</view>
</view>
<scroll-view scroll-y enhanced="{{true}}" class="list-scroll" style="height: calc(100vh - var(--fontSize120) - {{tipsBoxHeight}}px - var(--fontSize28));" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<block wx:if="{{courseList.length}}">
<view class="list-container">
<view class="exam-item" wx:for="{{courseList}}" bindtap="goBeisenDetail" data-target="{{item}}" wx:key="index">
<card-item infoData="{{item}}" formItems="{{formItems}}"/>
</view>
</view>
</block>
<block wx:else>
<view class="nothing flex">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
<view class="end-text" wx:if="{{loadingList}}">更多课程加载中...</view>
<view class="end-text" wx:if="{{nothing && courseList.length && !loadingList}}">更多课程即将上架,敬请期待</view>
</scroll-view>
</view>
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/myExam/myExam.js
import api from "~/packageStudyCenter/api"
import commonApi from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
tabList: [{
label: '已通过',
num: 0
}, {
label: '未通过',
num: 0
}],
tabIndex: 0,
pageNum: 1,
pageSize: 10,
examList: [],
formItems: [{
key: 'title',
type: 'title'
}, {
label: '考试时间',
arr: ['duration', 'questionCount'],
unitArr: ['分钟', '题']
}, {
label: '剩余考试次数',
customerLabel: true,
key: '_remainingTimes'
}, {
label: '最高得分',
arr: ['maxTotalScore', '_status'],
unitArr: ['分', ''],
colorEventKey: 'examResult',
colorEventValue: 1
}, {
btnText: '重新考试',
type: 'btn',
showEventKey: '_showBtn'
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getStatics()
this.getList()
if (wx.getStorageSync('FROM_BEISENWEBVIEW')) {
wx.removeStorageSync('FROM_BEISENWEBVIEW') // 记得清除
// 查询北森考试结果
this.doAfterWebViewReturn()
}
},
doAfterWebViewReturn() {
let modal = this.selectComponent('#examPopup')
modal.open()
},
// 北森考试结果查询
examHandleConfirm() {
let { examObj, confirmFlag } = this.data
this.setData({
examSubmitText: '正在查询考试结果,请稍后...'
})
if (confirmFlag) return
this.setData({confirmFlag: true})
commonApi.getBeisenExamResult({...examObj, invokeType: 1}).then(res => {
this.setData({confirmFlag: false})
let { code, data, message } = res
if (code == 0) {
if (data) {
this.examHandleCancel()
this.getList(true)
} else {
this.setData({
examSubmitText: '未查询到结果,请稍后再试'
})
}
} else {
this.setData({
examSubmitText: '未查询到结果,请稍后再试'
})
wx.$util.showToast(message)
}
})
},
examHandleCancel() {
let modal = this.selectComponent('#examPopup')
if (modal) {
modal.close()
this.getList(true)
}
},
async getStatics() {
const userInfo = wx.$util.getUserInfo()
let res = await api.getStaffExaminationCount({staffPhone: userInfo?.phone})
this.setData({
['tabList[0].num']: res.data?.passCount,
['tabList[1].num']: res.data?.failCount
})
},
changeTab(e) {
let { index } = e.currentTarget.dataset
this.setData({
tabIndex: index,
pageNum: 1
}, () => {
this.getList(true)
})
},
scrollonReachBottom() {
const { pageNum, total, pageSize } = this.data
if (Math.ceil(total / pageSize) > pageNum) {
this.setData({ pageNum: pageNum + 1 }, () => {
this.getList()
})
} else {
this.setData({ nothing: true })
}
},
async getList(scrollTopFlag = false) {
try {
wx.showLoading()
const { pageNum, pageSize, tabIndex } = this.data
const userInfo = wx.$util.getUserInfo()
const params = {
staffPhone: userInfo?.phone,
examResult: tabIndex == 0 ? 1 : 2,
pageNum,
pageSize
}
this.setData({
loading: true
})
if (pageNum > 1) {
this.setData({
loadingList: true
})
}
const res = await api.getStaffExaminationList(params)
this.setData({
loadingList: false
})
if (res.code != 0) {
wx.$util.showToast(res.message)
}
let newList = res?.data?.list || [];
newList?.forEach(val => {
val._imageUrl = `${IMG_URL}studyCenter/document-icon.png`
val._remainingTimes = val.examTimes == null ? '不限制' : `${val.remainingTimes || '-'}/${val.examTimes || '-'}`
val._status = val.examResult == 1 ? '已通过' : '未通过'
val._showBtn = val.remainingTimes > 0
})
this.setData({
loading: false
})
if (pageNum == 1) {
this.setData({ examList: newList })
} else {
this.setData({
examList: this.data.examList.concat(newList)
});
}
wx.hideLoading()
this.setData({
total: res.data?.total,
nothing: newList.length > 0
})
if (scrollTopFlag) {
this.setData({scrollTop: 0})
}
} catch (error) {
wx.showToast({
title: error.message || '请求失败',
icon: "none",
})
}
},
goPage(e) {
let { target } = e.currentTarget.dataset
commonApi.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data;
const COURSE_ID = target?.examination
if (beisenToken) {
const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = {
product: 'Learning',
keyName: 'Nusion',
pageCode: 'LearningExamTraineePage',
appCode: 'Learning',
examId: COURSE_ID
}
this.jumpUrl = ''
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.join('&');
// this.setWebviewStyle()
const url = encodeURIComponent(`${baseUrl}?${queryString}#/viewDynamic?1=1`);
const tokenUrl = beisenToken
wx.$router.jumpH5(`${tokenUrl}&return_url=${url}`)
this.setData({
examObj: {
examId: target?.examination
}
})
} else {
wx.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"card-item": "/packageStudyCenter/components/CardItem/CardItem",
"exam-submit-popup": "/packageStudyCenter/components/ExamSubmitPopup/ExamSubmitPopup"
},
"navigationBarTitleText": "我的考试"
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/myExam/myExam.wxss */
page {
background: #F7F8FA;
}
.container {
height: 100vh;
.tab-box {
display: flex;
align-items: center;
gap: var(--fontSize16);
margin: var(--fontSize24) var(--fontSize28);
.tab-item {
text-align: center;
padding: 0 var(--fontSize32);
height: var(--fontSize72);
line-height: var(--fontSize72);
border-radius: var(--fontSize16);
opacity: 1;
background: #ffffff;
backdrop-filter: blur(var(--fontSize12));
color: #666666;
font-size: var(--fontSize28);
&.active {
color: #FFFFFF;
background: #2c66f7;
font-weight: 500;
box-shadow: var(--fontSize4) var(--fontSize8) var(--fontSize16) 0 #81a3d659;
}
}
}
.list-scroll {
height: calc(100vh - var(--fontSize120));
.list-container {
max-height: none; /* 确保不被限制 */
height: auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--fontSize16);
padding: 0 var(--fontSize28) var(--fontSize32);
box-sizing: border-box;
}
.end-text {
text-align: center;
padding-bottom: var(--fontSize36);
color: #999999;
font-size: var(--fontSize24);
}
}
.nothing {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
flex-direction: column;
margin-top: 270rpx;
font-size: var(--fontSize24);
color: #999999;
.icon {
width: var(--fontSize128);
height: var(--fontSize80);
margin-bottom: var(--fontSize8);
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/myExam/myExam.wxml-->
<view class="container">
<view class="tab-box">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item.label}}<text>{{item.num != null ? item.num : '-'}}</text></view>
</view>
<scroll-view scroll-y enhanced="{{true}}" class="list-scroll" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<block wx:if="{{examList.length}}">
<view class="list-container">
<view class="exam-item" wx:for="{{examList}}" wx:key="index" bindtap="goPage" data-target="{{item}}">
<card-item infoData="{{item}}" formItems="{{formItems}}"/>
</view>
</view>
</block>
<block wx:else>
<view class="nothing flex">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
<view class="end-text" wx:if="{{loadingList}}">更多考试加载中...</view>
<view class="end-text" wx:if="{{nothing && examList.length && !loadingList}}">已展示所有考试</view>
</scroll-view>
</view>
<exam-submit-popup id="examPopup" bindcancel="examHandleCancel" bindconfirm="examHandleConfirm" examSubmitText="{{examSubmitText}}" />
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/myTask/components/RecommendCourse/RecommendCourse.js // packageStudyCenter/pages/myTask/components/RecommendCourse/RecommendCourse.js
import api from "../../../../api" import api from "~/packageStudyCenter/api"
import commonApi from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
properties: { properties: {
...@@ -38,7 +39,7 @@ Component({ ...@@ -38,7 +39,7 @@ Component({
pageSize pageSize
}; };
const res = await api.getCourseTaskPage(params); // 替换为实际API调用 const res = await api.getCourseTaskPage(params);
if (pageNum == 1) { if (pageNum == 1) {
this.setData({ this.setData({
...@@ -65,7 +66,6 @@ Component({ ...@@ -65,7 +66,6 @@ Component({
}, },
pageonReachBottom() { pageonReachBottom() {
console.log('到底了');
const { pageNum, total, pageSize } = this.data; const { pageNum, total, pageSize } = this.data;
if (Math.ceil(total / pageSize) > pageNum) { if (Math.ceil(total / pageSize) > pageNum) {
this.setData({ this.setData({
...@@ -79,10 +79,10 @@ Component({ ...@@ -79,10 +79,10 @@ Component({
startStudy(e) { startStudy(e) {
const item = e.currentTarget.dataset.item const item = e.currentTarget.dataset.item
let userInfo = wx.$util.getUserInfo()
// 这里可以添加埋点逻辑 // 埋点 推荐课程
// uni.$track.add({eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/equity/index'}) wx.$track.setTrackData(0, 'recommend_course', {}, '', userInfo?.sceneType)
api.findBeiSenSSOToken({}).then(res => { commonApi.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data; const beisenToken = res.data;
if (beisenToken) { if (beisenToken) {
const COURSE_ID = item?.courseId; const COURSE_ID = item?.courseId;
......
...@@ -33,9 +33,7 @@ Component({ ...@@ -33,9 +33,7 @@ Component({
}, { }, {
label: '课程数', label: '课程数',
arr: ['courseTotalCount', 'totalDuration'], arr: ['courseTotalCount', 'totalDuration'],
unitArr: ['节', 'min'], unitArr: ['节', 'min']
colorEventKey: '',
colorEventValue: ''
}, { }, {
label: '完成时间', label: '完成时间',
key: '_taskTime' key: '_taskTime'
...@@ -322,8 +320,10 @@ Component({ ...@@ -322,8 +320,10 @@ Component({
handleTaskItemClick(e) { handleTaskItemClick(e) {
const item = e.currentTarget.dataset.item; const item = e.currentTarget.dataset.item;
let userInfo = wx.$util.getUserInfo()
const { courseType, id } = item; const { courseType, id } = item;
// 埋点
wx.$track.setTrackData(0, courseType == 1 ? 'short_course' : 'long_course', {}, '', userInfo?.sceneType)
// 这里添加跳转逻辑 // 这里添加跳转逻辑
wx.navigateTo({ wx.navigateTo({
url: `/packageStudyCenter/pages/taskDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.data.tabIndex}`, url: `/packageStudyCenter/pages/taskDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.data.tabIndex}`,
......
...@@ -40,16 +40,21 @@ Page({ ...@@ -40,16 +40,21 @@ Page({
async getBeisenToken() { async getBeisenToken() {
try { try {
const [ssoRes, accountRes] = await Promise.all([ const [ssoRes, accountRes] = await Promise.all([
api.findBeiSenSSOToken({}).catch(error => null), commonApi.findBeiSenSSOToken({}).catch(error => null),
commonApi.getListSelectAccount().catch(error => null) commonApi.getListSelectAccount().catch(error => null)
]) ])
let isBeisen = !!ssoRes?.data let isBeisen = !!ssoRes?.data
let isHmzx = false let isHmzx = false
let isYb = false let isYb = false
if (!isBeisen) { // 没有北森权限不展示更多课程
this.setData({
tabList: ['我的任务', ''] // 兼容tabBar组件,将不展示tab置为空,不然样式异常 空值是不能点击的不影响功能
})
}
// 如果获取账户信息成功,继续请求权限 // 如果获取账户信息成功,继续请求权限
if (accountRes?.code == 0) { if (accountRes?.code == 0) {
const yqMerchantIdList = accountRes.data?.loginUserInfoList.map(item => item.merchantId) || [] const yqMerchantIdList = accountRes.data?.loginUserInfoList.map(item => item.merchantId) || []
const permissionRes = await api.getStudyCenterPermission({yqMerchantIdList}).catch(error => null) const permissionRes = await commonApi.getStudyCenterPermission({yqMerchantIdList}).catch(error => null)
isHmzx = permissionRes?.data?.hmzxAuth || false; isHmzx = permissionRes?.data?.hmzxAuth || false;
isYb = permissionRes?.data?.authorizedBusinessList?.includes(1) || false isYb = permissionRes?.data?.authorizedBusinessList?.includes(1) || false
} }
......
// packageStudyCenter/pages/staffRank/staffRank.js
import api from '~/packageStudyCenter/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
tabList: ['总榜', '日榜', '周榜', '月榜'],
tabIndex: 0,
rankList: [],
currentUserRank: {},
median: null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
changeTab(e) {
let { index } = e.currentTarget.dataset
this.setData({
tabIndex: index
}, () => {
this.getList()
})
},
getList() {
const userInfo = wx.$util.getUserInfo()
let { tabIndex } = this.data
api.getStaffStudyRank({periodType: tabIndex, staffPhone: userInfo?.phone}).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.rankList?.forEach(val => {
if (val.rank > 99) val.rank = `99+`
})
this.setData({
rankList: data.rankList || [],
currentUserRank: data?.currentUserRank || {},
median: data?.median
})
} else {
wx.$util.showToast(message)
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "排行榜"
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/staffRank/staffRank.wxss */
page {
background: #F7F8FA;
}
.rank-container {
margin: var(--fontSize24) var(--fontSize28);
background: #ffffff;
.bg {
width: 100%;
height: var(--fontSize128);
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/studyCenter/rank-bg.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
z-index: 1;
}
.content {
padding: 0 var(--fontSize24);
}
.tab-box {
margin: var(--fontSize8) 0 var(--fontSize12);
display: flex;
gap: var(--fontSize16);
.tab-item {
height: var(--fontSize64);
border-radius: var(--fontSize48);
background: #f2f2f2;
padding: 0 var(--fontSize32);
display: flex;
align-items: center;
color: #6C6F75;
font-size: var(--fontSize28);
&.active {
background: #2d66f71a;
color: #2D66F7;
font-weight: 500;
}
}
}
.tips {
font-size: var(--fontSize28);
color: #999EA8;
margin-bottom: var(--fontSize16);
}
.owner {
width: 100%;
height: var(--fontSize128);
border-radius: var(--fontSize24);
background: #85a7ff1a;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--fontSize32);
box-sizing: border-box;
}
.list {
width: 100%;
.item {
height: var(--fontSize128);
opacity: 1;
border-bottom: var(--fontSize2) solid #edf3ff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--fontSize32);
&:last-child {
border-bottom: none;
}
}
}
.left {
width: calc(100% - var(--fontSize200));
display: flex;
align-items: center;
.rank-num {
flex-shrink: 0;
width: var(--fontSize80);
height: var(--fontSize80);
border-radius: var(--fontSize40);
color: #2D66F7;
font-size: var(--fontSize34);
font-weight: 500;
text-align: center;
line-height: var(--fontSize80);
&.own {
background: #2d66f71a;
border: var(--fontSize2) solid #FFFFFF;
}
image {
width: 100%;
height: 100%;
}
}
.name {
margin-left: var(--fontSize20);
width: calc(100% - var(--fontSize100));
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.num {
color: #292D33;
font-size: var(--fontSize32);
font-weight: 500;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/staffRank/staffRank.wxml-->
<view class="rank-container">
<view class="bg"></view>
<view class="content">
<view class="tab-box">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" bindtap="changeTab" data-index="{{index}}" wx:for="{{tabList}}" wx:key="index">{{item}}</view>
</view>
<view class="tips">学习时长中位数:{{median != null ? median : '-'}}小时</view>
<view class="owner">
<view class="left">
<view class="rank-num own">{{currentUserRank.rank != null ? currentUserRank.rank : '-'}}</view>
<view class="name">{{currentUserRank.userName != null ? currentUserRank.userName : '-'}}</view>
</view>
<view class="num">{{currentUserRank.duration != null ? currentUserRank.duration : '-'}}小时</view>
</view>
<view class="list">
<block wx:for="{{rankList}}" wx:key="index">
<view class="item">
<view class="left">
<view class="rank-num">
<image wx:if="{{item.rank < 4}}" src="{{IMG_URL}}studyCenter/{{item.rank == 1 ? 'champion' : item.rank == 2 ? 'second-place' : 'third-place'}}.png" mode=""/>
<block wx:else>
{{item.rank != null ? item.rank : '-'}}
</block>
</view>
<view class="name">{{item.userName != null ? item.userName : '-'}}</view>
</view>
<view class="num">{{item.duration != null ? item.duration : '-'}}小时</view>
</view>
</block>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/studyCenter/components/categoryScreen/categoryScreen.js
import api from '~/packageStudyCenter/api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(val) {
if (val) {
this.setViewData()
this.getCategoryList()
}
}
},
navBarHeight: Number,
activeId: Number
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
setViewData() {
let {
navBarHeight
} = this.data
wx.$util.getViewInfo(
'.btn-box',
res => {
this.setData({
height: navBarHeight,
btnHeight: res.height
})
},
this
)
},
getCategoryList() {
wx.showLoading()
api.getCourseCategoryData({}).then(res => {
wx.hideLoading()
let { activeId } = this.data
let { code, data, message } = res
if (code == 0) {
let arr = data?.filter(val => val.id != 1)
arr.forEach(item => {
item.children.unshift({
categoryName: '全部',
id: item.id
})
item.children.forEach(it => {
it.parentCategoryName = item.categoryName
it.active = false
if (it.id == activeId) it.active = true
})
})
this.setData({
categoryList: arr || []
})
} else {
wx.$util.showToast(message)
}
})
},
choose(e) {
let { target } = e.currentTarget.dataset
let { categoryList } = this.data
categoryList?.forEach(val => {
val.children?.forEach(it => {
it.active = false
if (it.id == target.id) it.active = true
})
})
console.log(categoryList)
this.setData({categoryList})
},
confirm() {
let { categoryList } = this.data
this.triggerEvent('confirm', categoryList)
},
reset() {
let { categoryList } = this.data
categoryList?.forEach(val => {
val.children?.forEach(it => {
it.active = false
})
})
this.setData({categoryList})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/studyCenter/components/categoryScreen/categoryScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
.main {
box-sizing: border-box;
}
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 var(--fontSize32);
.title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
.title-left{
display: flex;
align-items: flex-end;
}
.title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.collapse-btn.rotate-180{
transform: rotate(180deg);
}
}
.list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
.item {
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
&.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
}
.item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.item:nth-of-type(3n+3) {
margin-right: 0;
}
}
}
.btn-box {
position: sticky;
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
.btn {
border-radius: 12rpx;
box-sizing: border-box;
height: 80rpx;
}
.clear {
width: 186rpx;
background: #F4F5F7;
color: #292D33;
}
.done {
background: #347BFF;
color: #fff;
width: 480rpx;
}
}
.isFullSucreen-btn {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/studyCenter/components/categoryScreen/categoryScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight }}px + 1px);margin-top:calc({{navBarHeight }}px - 1px);" hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px;min-height: calc(100% - {{btnHeight }}px);">
<block wx:for="{{categoryList}}" wx:key="index">
<view class="box">
<view class="title">
{{item.categoryName}}
</view>
<view class="list-box">
<block wx:for="{{item.children}}" wx:key="index" wx:for-item="subItem" wx:for-index="idx">
<view class="item text-center {{subItem.active?'active':''}}" bindtap="choose" data-target="{{subItem}}">{{subItem.categoryName}}</view>
</block>
</view>
</view>
</block>
</view>
<view class="btn-box isFullSucreen-btn">
<view class="btn clear text-center" bindtap="reset">重置</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/studyCenter/components/listScreen/listScreen.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
this.setViewData()
let { screenObj } = this.data
this.setData({
'formSelect.planCourseType': screenObj?.planCourseType || '',
'formSelect.courseFileType': screenObj?.courseFileType || '',
'formSelect.totalStar': screenObj?.totalStar || ''
})
}
}
},
screenObj: Object,
navBarHeight: Number
},
/**
* 组件的初始数据
*/
data: {
form: {
planCourseTypeList: [{
label: '全部',
id: ''
}, {
label: '必修',
id: '1'
}, {
label: '选修',
id: '2'
}],
courseFileTypeList: [{
label: '全部',
id: ''
}, {
label: '视频',
id: "10"
}, {
label: '文档',
id: "30"
}, {
label: '音频',
id: '80'
}, {
label: '混合',
id: '20'
}, {
label: 'H5',
id: '40'
}, {
label: 'URL',
id: '70'
}, {
label: '图文',
id: '120'
}],
totalStarList: [{
label: '全部',
id: ''
}, {
label: '4星以上',
id: '8'
}, {
label: '3星以上',
id: '6'
}]
},
formSelect: {
planCourseType: '',
courseFileType: '',
totalStar: ''
}
},
/**
* 组件的方法列表
*/
methods: {
setViewData() {
let {
navBarHeight
} = this.data
wx.$util.getViewInfo(
'.btn-box',
res => {
this.setData({
height: navBarHeight,
btnHeight: res.height
})
},
this
)
},
choose(e) {
let { name, target } = e.currentTarget.dataset
this.setData({
[`formSelect.${name}`]: target.id
})
},
confirm() {
let { formSelect } = this.data
this.triggerEvent('confirm', formSelect)
},
reset() {
this.setData({
formSelect: {
planCourseType: '',
courseFileType: '',
totalStar: ''
}
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/studyCenter/components/listScreen/listScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
.main {
box-sizing: border-box;
}
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 var(--fontSize32);
.title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
.title-left{
display: flex;
align-items: flex-end;
}
.title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.collapse-btn.rotate-180{
transform: rotate(180deg);
}
}
.list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
.item {
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
&.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
}
.item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.item:nth-of-type(3n+3) {
margin-right: 0;
}
}
}
.btn-box {
position: sticky;
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
.btn {
border-radius: 12rpx;
box-sizing: border-box;
height: 80rpx;
}
.clear {
width: 186rpx;
background: #F4F5F7;
color: #292D33;
}
.done {
background: #347BFF;
color: #fff;
width: 480rpx;
}
}
.isFullSucreen-btn {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/studyCenter/components/listScreen/listScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight }}px + 1px);margin-top:calc({{navBarHeight }}px - 1px);" hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px;min-height: calc(100% - {{btnHeight }}px);">
<view class="box">
<view class="title">
选必修
</view>
<view class="list-box">
<block wx:for="{{form.planCourseTypeList}}" wx:key="index">
<view class="item text-center {{formSelect.planCourseType == item.id ? 'active' : ''}}" bindtap="choose" data-name="planCourseType" data-target="{{item}}">{{item.label}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
课程类型
</view>
<view class="list-box">
<block wx:for="{{form.courseFileTypeList}}" wx:key="index">
<view class="item text-center {{formSelect.courseFileType == item.id ? 'active' : ''}}" bindtap="choose" data-name="courseFileType" data-target="{{item}}">{{item.label}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
评分
</view>
<view class="list-box">
<block wx:for="{{form.totalStarList}}" wx:key="index">
<view class="item text-center {{formSelect.totalStar == item.id ? 'active' : ''}}" bindtap="choose" data-name="totalStar" data-target="{{item}}">{{item.label}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box isFullSucreen-btn">
<view class="btn clear text-center" bindtap="reset">重置</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
\ No newline at end of file \ No newline at end of file
// packageStudyCenter/pages/studyCenter/components/sortPopup/sortPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(val) {
let { sortList, activeId } = this.data
sortList?.forEach(it => {
it.active = false
if (it.id == activeId) it.active = true
})
this.setData({sortList})
}
},
title: String,
activeId: {
type: String
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
sortList: [{
label: '全部',
id: '',
}, {
label: '最多人学',
id: '0'
}, {
label: '最高评分',
id: '1'
}, {
label: '最新发布',
id: '2'
}]
},
/**
* 组件的方法列表
*/
methods: {
changeItem(e) {
let { target } = e.currentTarget.dataset
let { sortList } = this.data
sortList?.forEach(val => {
val.active = false
if (val.id === target.id) val.active = true
})
this.setData({
sortList
})
},
confirm() {
let { sortList } = this.data
this.triggerEvent('confirm', sortList)
},
cancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/studyCenter/components/sortPopup/sortPopup.wxss */
.sort-select-popup-box {
height: 100%;
width: calc(100% + var(--fontSize64));
transform: translateX(calc(-1 * var(--fontSize32)));
border-radius: var(--fontSize20) var(--fontSize20) 0 0;
.sub-title {
height: var(--fontSize110);
font-size: var(--fontSize32);
color: #292D33;
background-color: #fff;
z-index: 2;
border-bottom: var(--fontSize2) solid #EFF0F2;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.sort-box {
margin: 0 var(--fontSize32);
.sortList {
height: var(--fontSize96);
line-height: var(--fontSize96);
border-bottom: var(--fontSize2) solid #EFF0F2;
font-size: var(--fontSize28);
display: flex;
align-items: center;
justify-content: space-between;
&.active {
color: #347BFF;
}
.checked_img {
width: var(--fontSize32);
height: var(--fontSize32);
flex-shrink: 0;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/studyCenter/components/sortPopup/sortPopup.wxml-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="85%" slotStyle="height: calc(100% - var(--fontSize150));">
<view class="sort-select-popup-box" >
<view class="box">
<view class="sub-title text-center">{{title}}</view>
<view class="sort-box">
<block wx:if="{{sortList.length}}">
<scroll-view scroll-y style="height: calc(100% - var(--fontSize194));" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{sortList}}" wx:key="index">
<view class="sortList {{item.active?'active':''}}" bindtap="changeItem" data-target="{{item}}" data-index="{{index}}">
<view class="text_box"><view class="text-hide">{{item.label}}</view></view>
<view class="checked_img">
<image wx:if="{{item.active}}" src="{{IMG_URL}}checked.png"></image>
</view>
</view>
</block>
</scroll-view>
</block>
</view>
</view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"card-item": "/packageStudyCenter/components/CardItem/CardItem",
"sort-popup": "./components/sortPopup/sortPopup",
"category-screen": "./components/categoryScreen/categoryScreen",
"list-screen": "./components/listScreen/listScreen",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal",
"exam-submit-popup": "/packageStudyCenter/components/ExamSubmitPopup/ExamSubmitPopup"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ No newline at end of file
/* packageStudyCenter/pages/studyCenter/studyCenter.wxss */
page {
background: #F7F8FA;
}
.container {
box-sizing: border-box;
padding: 0 var(--fontSize28);
.top-box {
margin-top: var(--fontSize24);
}
.box {
border-radius: var(--fontSize24);
background: #FFFFFF;
margin-bottom: var(--fontSize20);
box-sizing: border-box;
padding: var(--fontSize24);
width: 100%;
.title {
color: #292D33;
font-size: var(--fontSize30);
font-weight: 500;
margin-bottom: var(--fontSize16);
}
.time-box {
display: flex;
border-radius: var(--fontSize24);
background: #F7F8FA;
padding: var(--fontSize24) var(--fontSize20);
.item {
flex: 1;
.tap {
width: var(--fontSize100);
height: var(--fontSize44);
border-radius: var(--fontSize8);
background: #2c66f71a;
color: #2C66F7;
font-size: var(--fontSize26);
text-align: center;
line-height: var(--fontSize44);
margin-bottom: var(--fontSize16);
}
.time-content {
height: var(--fontSize92);
display: flex;
flex-flow: column;
justify-content: center;
}
.time {
display: flex;
align-items: center;
font-size: var(--fontSize40);
font-weight: 500;
color: #2C66F7;
.unit {
font-size: var(--fontSize26);
font-weight: 400;
color: #999EA8;
margin-left: var(--fontSize4);
}
}
.ring {
display: flex;
align-items: center;
font-size: var(--fontSize26);
color: #999EA8;
margin-top: var(--fontSize8);
.icon {
width: var(--fontSize28);
height: var(--fontSize28);
}
.rate {
color: #999EA8;
&.up {
color: #F24724;
}
&.down {
color: #2ECCAE;
}
}
}
}
}
&.menu {
display: flex;
gap: var(--fontSize34);
.menu-item {
flex: 1;
display: flex;
flex-flow: column;
align-items: center;
position: relative;
.icon {
width: var(--fontSize96);
height: var(--fontSize96);
margin-bottom: var(--fontSize4);
}
.text {
font-size: var(--fontSize24);
color: #292D33;
}
.hot_icon {
position: absolute;
top: var(--fontSize4);
right: var(--fontSize28);
background: #F24724;
border-radius: 50%;
min-width: var(--fontSize24);
height: var(--fontSize24);
border-radius: var(--fontSize16);
font-size: var(--fontSize20);
color: #FFFFFF;
padding:var(--fontSize2);
}
}
}
}
.ing-box {
.title {
display: flex;
align-items: center;
justify-content: space-between;
color: #292D33;
font-weight: 500;
font-size: var(--fontSize30);
.margin-bottom: var(--fontSize4);
.text-btn {
display: flex;
align-items: center;
color: #2C66F7;
font-size: var(--fontSize28);
.icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: var(--fontSize4);
}
}
}
.tips-box {
color: #999EA8;
font-size: var(--fontSize24);
margin-bottom: var(--fontSize24);
}
.studying-box {
width: 100%;
display: flex;
gap: var(--fontSize16);
}
.nothing {
width: 100%;
height: var(--fontSize338);
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
font-size: var(--fontSize24);
color: #999999;
.icon {
width: var(--fontSize128);
height: var(--fontSize80);
margin-bottom: var(--fontSize8);
}
}
}
.all-box {
.title {
color: #292D33;
font-weight: 500;
font-size: var(--fontSize30);
.margin-bottom: var(--fontSize4);
}
.search-box {
margin-top: var(--fontSize24);
height: var(--fontSize72);
.search-input {
height: 100%;
width: 100%;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: var(--fontSize40);
position: relative;
.input {
text-align: center;
width: calc(100% - var(--fontSize72));
font-size: var(--fontSize28);
}
.input-placeholder {
color: #999EA8;
}
.search-icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: var(--fontSize380);
width: var(--fontSize40);
height: var(--fontSize40);
}
.search-clear {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: var(--fontSize26);
width: var(--fontSize36);
height: var(--fontSize36);
}
}
}
.screen-box {
display: flex;
align-items: center;
justify-content: space-between;
margin: var(--fontSize24) 0 0;
padding-bottom: var(--fontSize24);
.left {
display: flex;
align-items: center;
gap: var(--fontSize16);
.item {
height: var(--fontSize60);
border-radius: var(--fontSize16);
opacity: 1;
background: #ffffff;
display: flex;
align-items: center;
padding: 0 var(--fontSize16);
font-size: var(--fontSize26);
color: #292D33;
.text {
max-width: var(--fontSize164);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: var(--fontSize4);
}
}
}
.total {
font-size: var(--fontSize26);
color: #999EA8;
}
}
.sticky-box {
padding-top: var(--fontSize40);
position: sticky;
top: 0;
z-index: 50;
background: #F7F8FA;
}
.all-list {
.list-box {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-auto-rows: minmax(0, auto);
gap: var(--fontSize16);
box-sizing: border-box;
align-items: start;
}
.nothing {
width: 100%;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
font-size: var(--fontSize24);
color: #999999;
.icon {
width: var(--fontSize128);
height: var(--fontSize80);
margin-bottom: var(--fontSize8);
}
}
.end-text {
text-align: center;
padding: var(--fontSize36) 0;
color: #999999;
font-size: var(--fontSize24);
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageStudyCenter/pages/studyCenter/studyCenter.wxml-->
<block wx:if="{{showScreen}}">
<navigation-bar showBack bindnavbarReady="navbarReady" class="navigation-header" bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block>
<block wx:elif="{{showCategory}}">
<navigation-bar showBack bindnavbarReady="navbarReady" class="navigation-header" bindback="containerCategoryBack" navStyle="background-color:#fff;box-shadow:none;">全部课程</navigation-bar>
</block>
<block wx:else>
<navigation-bar class="navigation-header" showBack bindnavbarReady="navbarReady" bindback="back" navStyle="background-color:#fff;box-shadow:none;">
<view>学习中心</view>
</navigation-bar>
</block>
<scroll-view scroll-y bindscroll="onPageScroll" scroll-top="{{setScrollTop}}" enhanced="{{true}}" show-scrollbar="{{false}}" class="container" bindscrolltolower="scrollonReachBottom" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px);">
<view class="box top-box">
<view class="title">我的学习时长</view>
<view class="time-box">
<view class="item">
<view class="tap">累计</view>
<view class="time-content">
<view class="time">{{statisticsData.totalHour != null ? statisticsData.totalHour : '-'}}<text class="unit">小时</text></view>
</view>
</view>
<view class="item">
<view class="tap">本月</view>
<view class="time-content">
<view class="time">{{statisticsData.monHour != null ? statisticsData.monHour : '-'}}<text class="unit">小时</text></view>
<view class="ring">
对比上月
<block wx:if="{{statisticsData.monHourRatio != null && statisticsData.monHourRatio != 0}}">
<view class="rate {{statisticsData.monHourRatio > 0 ? 'up' : statisticsData.monHourRatio < 0 ? 'down' : ''}}">
{{statisticsData._monHourRatio}}%
</view>
<image wx:if="{{statisticsData.monHourRatio != null}}" class="icon" src="{{IMG_URL}}studyCenter/{{statisticsData.monHourRatio > 0 ? 'up' : statisticsData.monHourRatio < 0 ? 'down' : 'stay'}}.png" mode=""/>
</block>
<block wx:else>
<view class="rate">-</view>
</block>
</view>
</view>
</view>
</view>
</view>
<view class="box menu">
<view class="menu-item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<view class="icon">
<image src="{{ IMG_URL}}studyCenter/{{item.icon}}.png" />
</view>
<view class="text">{{item.name}}</view>
<view class="hot_icon" wx:if="{{ item.tipsFlag && statisticsData.unReadCount }}">{{statisticsData.unReadCount}}</view>
</view>
</view>
<view class="ing-box">
<view class="title">
正在学习
<view class="text-btn" bindtap="goPage">
查看全部
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-right.png" mode=""/>
</view>
</view>
<view class="tips-box">
本周学习时长{{statisticsData.weekHour != null ? statisticsData.weekHour : '-'}}小时
</view>
<block wx:if="{{myCourseList.length}}">
<scroll-view scroll-x enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="studying-box">
<view class="studying-item" bindtap="goBeisenDetail" data-target="{{item}}" wx:for="{{myCourseList}}" wx:key="index">
<card-item infoData="{{item}}" formItems="{{formItems}}"></card-item>
</view>
</view>
</scroll-view>
</block>
<block wx:else>
<view class="nothing">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
</view>
<view class="all-box">
<view class="sticky-box">
<view class="title">全部课程</view>
<view class="search-box">
<view class="search-input">
<input
type="text"
placeholder="搜索课程"
class="input"
value="{{searchTitle}}"
placeholder-class="input-placeholder"
bindinput="searchInput"
bindconfirm="search" />
<image src="{{IMG_URL}}studyCenter/search-icon.png" wx:if="{{!searchTitle}}" class="search-icon" />
<block wx:if="{{ searchTitle }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<view class="screen-box">
<view class="left">
<view class="item" bindtap="handleSort">
<view class="text">{{sortObj.id !== '' ? sortObj.label : '综合排序'}}</view>
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-down.png" mode=""/>
</view>
<view class="item" bindtap="handleCategory">
<view class="text">{{categoryObj.label || '全部课程'}}</view>
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-down.png" mode=""/>
</view>
<view class="item" bindtap="handleScreen">
<view class="text">筛选</view>
<image class="icon" src="{{IMG_URL}}studyCenter/screen-icon.png" mode=""/>
</view>
</view>
<view class="total">共{{total}}门课程</view>
</view>
</view>
<view class="all-list" style="min-height: calc(100vh - {{fixedHeight}}px - {{navBarHeight}}px);">
<block wx:if="{{allList.length}}">
<view class="list-box">
<block wx:for="{{allList}}" wx:key="index">
<view class="all-item" bindtap="goBeisenDetail" data-target="{{item}}">
<card-item infoData="{{item}}" formItems="{{allFormItems}}"></card-item>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing" style="height: calc(100vh - {{fixedHeight}}px - {{navBarHeight}}px);">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
<block>
<view class="end-text" wx:if="{{loadingList}}">更多课程加载中...</view>
<view class="end-text" wx:if="{{nothing && allList.length && !loading}}">更多课程即将上架,敬请期待</view>
</block>
</view>
</view>
</scroll-view>
<sort-popup show="{{showSortPopup}}" title="综合排序" bindconfirm="sortConfirm" bindcancel="sortCancel" activeId="{{sortObj.id}}"></sort-popup>
<page-container show="{{ showCategory || showScreen }}" duration="{{ 0 }}" overlay="{{ false }}">
<view wx:if="{{ showCategory }}">
<category-screen show="{{ showCategory }}" activeId="{{categoryObj.id}}" navBarHeight="{{ navBarHeight }}" bindconfirm="searchCategoryScreen" />
</view>
<view wx:if="{{ showScreen }}">
<list-screen show="{{ showScreen }}" navBarHeight="{{ navBarHeight }}" screenObj="{{screenObj}}" bindconfirm="searchScreen" />
</view>
</page-container>
<study-permission-modal id="customModal" examId="{{}}" />
<exam-submit-popup id="examPopup" bindcancel="examHandleCancel" bindconfirm="examHandleConfirm" examSubmitText="{{examSubmitText}}" />
// packageStudyCenter/pages/longCourse/longCourse.js // packageStudyCenter/pages/longCourse/longCourse.js
import api from '../../../api' import api from '~/packageStudyCenter/api'
import commonApi from '~/api/api'
const dayjs = require('dayjs') const dayjs = require('dayjs')
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const statusMap = { const statusMap = {
...@@ -152,7 +153,10 @@ Page({ ...@@ -152,7 +153,10 @@ Page({
startStudy(e) { startStudy(e) {
const item = e.currentTarget.dataset.item const item = e.currentTarget.dataset.item
api.findBeiSenSSOToken({}).then(res => { let userInfo = wx.$util.getUserInfo()
// 埋点 推荐课程
wx.$track.setTrackData(0, 'recommend_course', {}, '', userInfo?.sceneType)
commonApi.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data; const beisenToken = res.data;
if (beisenToken) { if (beisenToken) {
const COURSE_ID = item?.courseId; const COURSE_ID = item?.courseId;
......
...@@ -112,12 +112,12 @@ ...@@ -112,12 +112,12 @@
> >
<view class="row-1 flex">{{ item.tagName }}</view> <view class="row-1 flex">{{ item.tagName }}</view>
<view class="row-2"> <view class="row-2">
<view class="table-content-text text-overflow">不足:{{ item.weakness }}</view> <view class="table-content-text text-overflow">不足:{{ item.weakness != null ? item.weakness : '' }}</view>
<view class="table-content-suggest text-overflow"> <view class="table-content-suggest text-overflow">
<view class="suggest-title">改善建议</view> <view class="suggest-title">改善建议</view>
{{ item.suggestion }} {{ item.suggestion != null ? item.suggestion : '' }}
</view> </view>
<view class="show-btn" bindtap="handleShowAll" data-item="{{item}}">查看全部</view> <view class="show-btn" bindtap="handleShowAll" wx:if="{{item.weakness != null || item.suggestion != null }}" data-item="{{item}}">查看全部</view>
</view> </view>
<view class="row-3 flex flex-column"> <view class="row-3 flex flex-column">
<block wx:if="{{ item.examStatus == 2 }}"> <block wx:if="{{ item.examStatus == 2 }}">
......
...@@ -4,7 +4,7 @@ import order_mixins from '../order_mixins.js' ...@@ -4,7 +4,7 @@ import order_mixins from '../order_mixins.js'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
let timeoutId let timeoutId
import { checkDailyReport } from '~/store/ModalToQueueControl' import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl'
import commonApi from '~/api/api' import commonApi from '~/api/api'
Page({ Page({
/** /**
...@@ -244,6 +244,9 @@ Page({ ...@@ -244,6 +244,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if ( if (
name == 'createOrder' && name == 'createOrder' &&
(await wx.$globalDataFunction.inspectionOfProhibitionBill()) (await wx.$globalDataFunction.inspectionOfProhibitionBill())
...@@ -315,6 +318,9 @@ Page({ ...@@ -315,6 +318,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let { selectOutTradeNoArr } = e.detail let { selectOutTradeNoArr } = e.detail
let { paymentMethod } = this.data let { paymentMethod } = this.data
this.closeSwitchPopup() this.closeSwitchPopup()
...@@ -333,6 +339,9 @@ Page({ ...@@ -333,6 +339,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
...@@ -371,6 +380,9 @@ Page({ ...@@ -371,6 +380,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this let _this = this
// let { list } = this.data // let { list } = this.data
// index, ind // index, ind
...@@ -415,6 +427,9 @@ Page({ ...@@ -415,6 +427,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this let _this = this
api api
.revokeOrder({ .revokeOrder({
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"order-screen": "../../components/OrderScreen/OrderScreen", "order-screen": "../../components/OrderScreen/OrderScreen",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop", "order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup" "recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -206,4 +206,5 @@ ...@@ -206,4 +206,5 @@
</view> </view>
</modal> </modal>
<recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{ sceneObj }}"></order-prompt-popup>
\ No newline at end of file \ No newline at end of file
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{ sceneObj }}"></order-prompt-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -113,6 +113,10 @@ Page({ ...@@ -113,6 +113,10 @@ Page({
eventChannel.emit('webViewMessage', 'cancel'); // 发送数据 eventChannel.emit('webViewMessage', 'cancel'); // 发送数据
} }
} }
// 北森考试页面返回
if (url.includes('LearningExamTraineePage')) {
wx.setStorageSync('FROM_BEISENWEBVIEW', '1')
}
}, },
/** /**
......
let modalQueue = []; let modalQueue = [];
import api from "~/api/api.js"; import api from "~/api/api.js";
let eventRequest = []; let eventRequest = [];
const initModal = () => {
if (getCurrentPages().length > 0) {
const currentPage = getCurrentPages()[getCurrentPages().length - 1]
let customModal = currentPage.selectComponent('#customModal')
return customModal
}
}
const checkDailyReport = async (sceneType) => { const checkDailyReport = async (sceneType) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// debugger // debugger
...@@ -201,5 +208,19 @@ const addModalToQueue = ( ...@@ -201,5 +208,19 @@ const addModalToQueue = (
}); });
modalQueue.sort((a, b) => a.priority - b.priority); modalQueue.sort((a, b) => a.priority - b.priority);
}; };
// 学习中心 开单限制
const checkStudyTask = () => {
return new Promise((resolve, reject) => {
wx.showLoading()
api.checkStudyTaskAPI().then(res => {
wx.hideLoading()
const modal = initModal()
if (modal && res.data.lockOrder) {
modal.open({title: '未完成学习任务,暂不能开单', type: 'permission', btnText: '去往学习中心'})
}
resolve(res.data.lockOrder)
})
})
}
export { checkDailyReport, staffDailyReport, addModalToQueue }; export { checkDailyReport, staffDailyReport, addModalToQueue, checkStudyTask };
...@@ -3,7 +3,8 @@ import api from "../../api"; ...@@ -3,7 +3,8 @@ import api from "../../api";
import CONSTANTDATA from "../userPortrait/constant/data"; import CONSTANTDATA from "../userPortrait/constant/data";
import commonApi from '~/api/api' import commonApi from '~/api/api'
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
const app = getApp(); const app = getApp();
const IMG_URL = const IMG_URL =
...@@ -508,6 +509,9 @@ Page({ ...@@ -508,6 +509,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
let { let {
detail detail
......
{ {
"navigationBarTitleText": "预约详情", "navigationBarTitleText": "预约详情",
"usingComponents": { "usingComponents": {
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop" "order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -158,4 +158,5 @@ ...@@ -158,4 +158,5 @@
</view> </view>
</view> </view>
</modal> </modal>
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{sceneObj}}" popupSlotStyle="height: calc(100% - var(--fontSize160));" height="var(--fontSize540);" includesChildHeight="var(--fontSize1020);"></order-prompt-popup>
\ No newline at end of file \ No newline at end of file
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{sceneObj}}" popupSlotStyle="height: calc(100% - var(--fontSize160));" height="var(--fontSize540);" includesChildHeight="var(--fontSize1020);"></order-prompt-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import mixins from './index_mixins' import mixins from './index_mixins'
import api from '../../api.js' import api from '../../api.js'
import NP from 'number-precision' import NP from 'number-precision'
import { getWaitAuditCountAPI,waitstaffstateAPI } from '~/api/api' import { getWaitAuditCountAPI,waitstaffstateAPI, getMerchantBrand, getListSelectAccount } from '~/api/api'
import { import {
getYQInfo, getYQInfo,
get4SStoreList, get4SStoreList,
...@@ -12,7 +12,8 @@ import { ...@@ -12,7 +12,8 @@ import {
env env
} from '~/config' } from '~/config'
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from '~/store/ModalToQueueControl' } from '~/store/ModalToQueueControl'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
...@@ -228,6 +229,9 @@ Page({ ...@@ -228,6 +229,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let { let {
selectOutTradeNoArr selectOutTradeNoArr
} = e.detail } = e.detail
...@@ -551,6 +555,9 @@ Page({ ...@@ -551,6 +555,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心是否锁单
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
...@@ -580,6 +587,9 @@ Page({ ...@@ -580,6 +587,9 @@ Page({
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
console.log(staffCheck, 'staffCheck') console.log(staffCheck, 'staffCheck')
if (staffCheck) return false if (staffCheck) return false
// 学习中心限制开单
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
} }
if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return /**禁止提单 */ if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return /**禁止提单 */
console.log(item.url, 'item.url') console.log(item.url, 'item.url')
...@@ -1448,7 +1458,8 @@ Page({ ...@@ -1448,7 +1458,8 @@ Page({
// 判断是不是特殊账号 // 判断是不是特殊账号
let { let {
menu, menu,
newMenu newMenu,
isStaff
} = this.data } = this.data
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
const isNoStaff = userInfo?.loginRole != 4 && userInfo?.loginRole != null const isNoStaff = userInfo?.loginRole != 4 && userInfo?.loginRole != null
...@@ -1627,6 +1638,15 @@ Page({ ...@@ -1627,6 +1638,15 @@ Page({
tipsNum: 0 tipsNum: 0
}) })
} }
// 非冀联园区店的员工展示学习中心入口
if (userInfo?.subLoginUser?.channelType != 9 && isStaff && menu.every((item) => item.name != "学习中心")) {
menu.push({
name: '学习中心',
url: 'packageStudyCenter.studyCenter',
icon: 'study-center',
noCheckdailyReport: true
})
}
this.setData({ this.setData({
menu, menu,
isNoStaff, isNoStaff,
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup", "recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup",
"task-dialog": "/components/TaskDialog/TaskDialog", "task-dialog": "/components/TaskDialog/TaskDialog",
"side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup", "side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop" "order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
...@@ -350,3 +350,4 @@ ...@@ -350,3 +350,4 @@
</block> </block>
<task-dialog wx:if="{{ showTaskDialog }}" showDialog="{{ showTaskDialog }}" taskInfo="{{ taskInfo }}"></task-dialog> <task-dialog wx:if="{{ showTaskDialog }}" showDialog="{{ showTaskDialog }}" taskInfo="{{ taskInfo }}"></task-dialog>
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{sceneObj}}"></order-prompt-popup> <order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{sceneObj}}"></order-prompt-popup>
<study-permission-modal id="customModal" />
...@@ -21,15 +21,26 @@ var techicianName = function(array) { ...@@ -21,15 +21,26 @@ var techicianName = function(array) {
var activeNum = function (array, subKey) { var activeNum = function (array, subKey) {
var count = 0 var count = 0
for (var i = 0; i < array.length; i++) { for (var i = 0; i < array.length; i++) {
if (array[i][subKey]) { var item = array[i]
for (var j = 0; j < array[i][subKey].length; j++) { if (subKey && item[subKey]) {
if (array[i][subKey][j] && array[i][subKey][j].active) { var subArray = item[subKey]
count++ for (var j = 0; j < subArray.length; j++) {
var subItem = subArray[j]
if (subItem) {
if (subItem.active) {
if (subItem.useNum) {
count = count + Number(subItem.useNum)
}
}
} }
} }
} else { } else {
if (array[i] && array[i].active) { if (item) {
count++ if (item.active) {
if (item.useNum) {
count = count + Number(item.useNum)
}
}
} }
} }
} }
......
...@@ -599,6 +599,7 @@ Page({ ...@@ -599,6 +599,7 @@ Page({
let _this = this let _this = this
let { index } = e.currentTarget.dataset let { index } = e.currentTarget.dataset
let { detailInfo } = this.data let { detailInfo } = this.data
if (detailInfo.outboundStatus == 0) return wx.$util.showToast('请先点击顶部「物料出库」出库产品')
wx.chooseImage({ wx.chooseImage({
count: 9 - detailInfo.pictureList?.length, count: 9 - detailInfo.pictureList?.length,
mediaType: ['image'], mediaType: ['image'],
......
...@@ -124,15 +124,26 @@ var filterRefundDisabled = function (infoData, userInfo) { ...@@ -124,15 +124,26 @@ var filterRefundDisabled = function (infoData, userInfo) {
var activeNum = function (array, subKey) { var activeNum = function (array, subKey) {
var count = 0 var count = 0
for (var i = 0; i < array.length; i++) { for (var i = 0; i < array.length; i++) {
if (array[i][subKey]) { var item = array[i]
for (var j = 0; j < array[i][subKey].length; j++) { if (subKey && item[subKey]) {
if (array[i][subKey][j] && array[i][subKey][j].active) { var subArray = item[subKey]
count++ for (var j = 0; j < subArray.length; j++) {
var subItem = subArray[j]
if (subItem) {
if (subItem.active) {
if (subItem.useNum) {
count = count + Number(subItem.useNum)
}
}
} }
} }
} else { } else {
if (array[i] && array[i].active) { if (item) {
count++ if (item.active) {
if (item.useNum) {
count = count + Number(item.useNum)
}
}
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import api from '../../api.js' import api from '../../api.js'
import order_mixins, { data } from '../order_mixins.js' import order_mixins, { data } from '../order_mixins.js'
import { getPositionList } from '~/store/index' import { getPositionList } from '~/store/index'
import { checkDailyReport } from '~/store/ModalToQueueControl' import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl'
import commonApi from '~/api/api' import commonApi from '~/api/api'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
...@@ -253,6 +253,9 @@ Page({ ...@@ -253,6 +253,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 校验订单是否可标记错误工单(退款流程中订单状态无法变更) // 校验订单是否可标记错误工单(退款流程中订单状态无法变更)
let { orderInfo } = this.data let { orderInfo } = this.data
let refundStep = await commonApi.getOrderRefundStep({ let refundStep = await commonApi.getOrderRefundStep({
...@@ -385,6 +388,9 @@ Page({ ...@@ -385,6 +388,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
// 新增订单 // 新增订单
this.showSelectTypeOrder(4) this.showSelectTypeOrder(4)
......
// tabWorkOrder/pages/createOrder/createOrder.js // tabWorkOrder/pages/createOrder/createOrder.js
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import api from "../../api"; import api from "../../api";
import { import {
...@@ -673,7 +674,10 @@ Page({ ...@@ -673,7 +674,10 @@ Page({
async submit(i) { async submit(i) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false;; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 判断手机号是否用配置的默认值 // 判断手机号是否用配置的默认值
this.checkPhoneUseConfig(); this.checkPhoneUseConfig();
let { let {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"set-meal": "/components/SetMeal/SetMeal", "set-meal": "/components/SetMeal/SetMeal",
"recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup" "recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -984,4 +984,5 @@ ...@@ -984,4 +984,5 @@
chooseGoodsList="{{ goodsList }}" chooseGoodsList="{{ goodsList }}"
isSolarFilm="{{ true }}" isSolarFilm="{{ true }}"
baseConfigData="{{ baseConfigData }}" baseConfigData="{{ baseConfigData }}"
/>
\ No newline at end of file \ No newline at end of file
/>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
getServiceFilmRollSetting, getServiceFilmRollSetting,
setConfigInfo setConfigInfo
} from '~/store/index' } from '~/store/index'
import { checkDailyReport } from '~/store/ModalToQueueControl' import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl'
import commonApi from '~/api/api' import commonApi from '~/api/api'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
...@@ -159,6 +159,9 @@ Page({ ...@@ -159,6 +159,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 校验订单是否可标记错误工单(退款流程中订单状态无法变更) // 校验订单是否可标记错误工单(退款流程中订单状态无法变更)
let { orderInfo } = this.data let { orderInfo } = this.data
let refundStep = await commonApi.getOrderRefundStep({ let refundStep = await commonApi.getOrderRefundStep({
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal", "sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn", "apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn",
"dialog": "/tabWorkOrder/components/Dialog/Dialog", "dialog": "/tabWorkOrder/components/Dialog/Dialog",
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal" "ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
...@@ -346,4 +346,5 @@ ...@@ -346,4 +346,5 @@
<sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal> <sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal>
<ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel"></ConstructionDetailModal> <ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel"></ConstructionDetailModal>
<!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> <!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog> -->
\ No newline at end of file \ No newline at end of file
</dialog> -->
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ import order_mixins from './order_mixins.js' ...@@ -4,7 +4,7 @@ import order_mixins from './order_mixins.js'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
let timeoutId let timeoutId
import { checkDailyReport } from '~/store/ModalToQueueControl' import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -193,6 +193,9 @@ Page({ ...@@ -193,6 +193,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go('tabWorkOrder.confirmOrder', item) wx.$router.go('tabWorkOrder.confirmOrder', item)
...@@ -218,6 +221,9 @@ Page({ ...@@ -218,6 +221,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
let { result } = res let { result } = res
...@@ -250,6 +256,9 @@ Page({ ...@@ -250,6 +256,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this let _this = this
// let { list } = this.data // let { list } = this.data
// index, ind // index, ind
...@@ -280,6 +289,9 @@ Page({ ...@@ -280,6 +289,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport() let staffCheck = await checkDailyReport()
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this let _this = this
api api
.revokeOrder({ .revokeOrder({
......
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"order-screen": "./components/OrderScreen/OrderScreen" "order-screen": "./components/OrderScreen/OrderScreen",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
...@@ -142,4 +142,5 @@ ...@@ -142,4 +142,5 @@
<view wx:if="{{ showRendering }}"> <view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" orderStatus="{{ tabIndex }}" /> <order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" orderStatus="{{ tabIndex }}" />
</view> </view>
</page-container>
\ No newline at end of file \ No newline at end of file
</page-container>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,8 @@ const IMG_URL = ...@@ -5,7 +5,8 @@ const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"; "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
let timeoutId; let timeoutId;
import { import {
checkDailyReport checkDailyReport,
checkStudyTask
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import commonApi from '~/api/api' import commonApi from '~/api/api'
Page({ Page({
...@@ -240,6 +241,9 @@ Page({ ...@@ -240,6 +241,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */ if (name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
...@@ -269,6 +273,9 @@ Page({ ...@@ -269,6 +273,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
...@@ -310,6 +317,9 @@ Page({ ...@@ -310,6 +317,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this; let _this = this;
// let { list } = this.data // let { list } = this.data
// index, ind // index, ind
...@@ -342,6 +352,9 @@ Page({ ...@@ -342,6 +352,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
let _this = this; let _this = this;
api api
.revokeOrder({ .revokeOrder({
......
{ {
"navigationStyle":"custom", "navigationStyle":"custom",
"usingComponents": { "usingComponents": {
"order-screen": "../../components/OrderScreen/OrderScreen" "order-screen": "../../components/OrderScreen/OrderScreen",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -166,4 +166,5 @@ ...@@ -166,4 +166,5 @@
失效客户 失效客户
</view> </view>
</view> </view>
</modal>
\ No newline at end of file \ No newline at end of file
</modal>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!