Commit 74277b7f by 胡悦

提交学习中心权限问题

1 parent b548f694
......@@ -59,6 +59,10 @@
background-position: calc(100vmin * (1173 / 768) * -0.3674339300937766) calc(100vmin * (1173 / 768) * -0.09505541346973571);}
.icon-day-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.10443307757885763) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-defeat-detail { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.5268542199488491) calc(100vmin * (1173 / 768) * -0.35038363171355497);}
.icon-defeat-summary { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.5707587382779199) calc(100vmin * (1173 / 768) * -0.5366581415174766);}
.icon-detail-btn { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.1999147485080989) calc(100vmin * (1173 / 768) * -0.18329070758738278);}
.icon-dress-code { width: calc(100vmin * (1173 / 768) * 0.007246376811594203); height: calc(100vmin * (1173 / 768) * 0.007885763000852515);
......@@ -92,7 +96,7 @@
.icon-icon-arrow { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.23444160272804773) calc(100vmin * (1173 / 768) * -0.6193520886615516);}
.icon-icon-close { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.5268542199488491) calc(100vmin * (1173 / 768) * -0.35038363171355497);}
background-position: calc(100vmin * (1173 / 768) * -0.6078431372549019) calc(100vmin * (1173 / 768) * -0.5366581415174766);}
.icon-icon-copy { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.2544757033248082) calc(100vmin * (1173 / 768) * -0.6193520886615516);}
.icon-icon-instructions { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -310,8 +314,4 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.1926683716965047) calc(100vmin * (1173 / 768) * -0.6193520886615516);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.020034100596760442);}
.icon-defeat-summary { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.5707587382779199) calc(100vmin * (1173 / 768) * -0.5366581415174766);}
.icon-defeat-detail { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.6078431372549019) calc(100vmin * (1173 / 768) * -0.5366581415174766);}
\ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.020034100596760442);}
\ No newline at end of file

2.44 MB | W: | H:

2.44 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -118,7 +118,7 @@ export default {
isTrack: true,
name: 'StudyCenter',
eventCode: 'app_study_center',
hidden: false
hidden: true
},
{
label: "场景集市",
......@@ -423,11 +423,11 @@ export default {
// 学习中心权限获取
getStudyCenterPermission() {
const res = uni.$storage.get('studyCenterPermission')
const {directSaleAuth, hmzxAuth} = res
if (!directSaleAuth && !hmzxAuth) {
const {directSaleAuth, hmzxAuth, authorizedBusinessList} = res // 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const isYb = authorizedBusinessList && authorizedBusinessList.includes(1) // 1.延保 2.轻改 3.权益
if (directSaleAuth || (hmzxAuth && isYb)) {
this.tabs[2].hidden = false
}
}
}
},
beforeCreate () {
......
<!-- 累计学习 -->
<template>
<view :class="['learn-statistics', isBeisen ? 'big-height' : 'small-height']">
<view class="learn-statistics-title" v-if="isBeisen">累计学习</view>
<!-- 北森帐号显示累计时长 -->
<view class="learn-statistics-title" v-if="isBeisen">累计学习</view>
<view class="statistics-content" v-if="isBeisen">
<view class="statistics-item ">
<view class="statistics-number blue-number">{{ dataInfo.learnDurationTotal || 0 }}</view>
......@@ -13,14 +14,14 @@
<view class="statistics-unit">名</view>
</view>
</view>
<view :class="['progress-box', filteredProgressList.filter(item => !item.hidden).length === 1 ? 'only-one' : '']">
<template v-for="(item, index) in filteredProgressList">
<view :class="['progress-box', progressList.filter(item => !item.hidden).length === 1 ? 'only-one' : '']">
<template v-for="(item, index) in progressList">
<view :class="['progress-item', isBeisen ? 'bg' : '']" :key="index" v-if="!item.hidden">
<view :class="['progress-item-title', isBeisen ? '' : 'title']">{{ item.title }}</view>
<view class="progress-item-value">
<view :class="['number', isBeisen ? '' : 'blue-number']">{{ dataInfo[item.key] || dataInfo[item.key] == 0 ?
dataInfo[item.key] : '-' }}</view>
<view v-if="dataInfo[item.key] || dataInfo[item.key] == 0" :class="['unit', isBeisen ? '' : 'blue-unit']">{{
<view :class="['unit', isBeisen ? '' : 'blue-unit']">{{
item.unit }}</view>
</view>
<view style="position: relative;" v-if="dataInfo[item.key] || dataInfo[item.key] == 0">
......@@ -32,7 +33,7 @@
<template v-if="dataInfo[item.key] || dataInfo[item.key] == 0">
<view>本周已有</view>
<view class="progress-text">
<view class="number">{{ dataInfo[item.ratio] + '%' }}</view>的学员完成学习
<view class="number">{{ dataInfo[item.ratio] || dataInfo[item.ratio] == 0 ? dataInfo[item.ratio] : '-' }}%</view>的学员完成学习
</view>
</template>
<template v-else>
......@@ -95,13 +96,27 @@ export default {
],
}
},
computed: {
filteredProgressList() {
// 如果isHmzx或isYb 为false,则不展示短课程(type:3)
if (!this.isHmzx || !this.isYb) {
return this.progressList.filter(item => item.type !== 3);
}
return this.progressList;
watch: {
isHmzx: {
handler(newVal) {
console.log(newVal, this.isYb, 'newVal, isYb')
if (!newVal || !this.isYb) {
this.progressList[0].hidden = true
} else {
this.progressList[0].hidden = false
}
},
immediate: true
},
isBeisen: {
handler(newVal) {
if (!newVal) {
this.progressList[1].hidden = true
} else {
this.progressList[1].hidden = false
}
},
immediate: true
}
},
mounted() {
......
......@@ -361,9 +361,9 @@ export default {
handleTaskItemClick(item) {
console.log(item)
const {courseType, id} = item
if (courseType == 1) {
uni.$track.add({eventCode: 'app_short_course', businessId: id, pagePath: '/pages/equity/index'})
}
// if (courseType == 1) {
// uni.$track.add({eventCode: 'app_short_course', businessId: id, pagePath: '/pages/equity/index'})
// }
uni.navigateTo({
url: `/pages/common/studyDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.tabIndex}`,
fail: (err) => {
......
......@@ -12,9 +12,9 @@
/>
<view class="recommend-course-content">
<view class="recommend-course-item-title">
{{ item.taskTitle }}
{{ item.courseName }}
</view>
<view class="recommend-course-item-text">{{ item.courseTotalCount ? `${item.courseTotalCount}节` : '-' }} | {{ item.totalDuration ? `${item.totalDuration}mi` : '-' }}</view>
<view class="recommend-course-item-text">{{ item.courseTotalCount ? `${item.courseTotalCount}节` : '-' }} | {{ item.totalDuration ? `${item.totalDuration}min` : '-' }}</view>
</view>
</view>
</view>
......@@ -41,133 +41,6 @@ export default {
total: 0,
pageNum: 1,
pageSize: 9,
// recommendCourseList: [
// {
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// taskTitle: '鸿蒙智行客户沟通',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// {
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
// },
// ],
scrollTop: 0,
}
},
......@@ -226,7 +99,7 @@ export default {
startStudy(item, index) {
uni.$track.add({eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/equity/index'})
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=recommendation&index=${index}`
url: `/pages/common/studyDetail/detail?type=recommendation&index=${index}&recommendCourseList=${encodeURIComponent(JSON.stringify(this.recommendCourseList))}`
})
}
}
......
......@@ -18,9 +18,7 @@
class="bar"
:class="item.class"
:style="{
width: (Number(currentConversionData[item.key]) > 0
? `max(2px, ${currentConversionData[item.key]}%)`
: '2px')
width: `${Math.max(2, Number(currentConversionData[item.key]) || 0)}%`
}"
></view>
<view
......
......@@ -106,8 +106,26 @@ export default {
const res = await uni.$api.commonApi.getStudyBoard({})
console.log(111111, 'res', res)
this.dataInfo = res
// this.dataInfo.shortCourseProgress = 0
// this.dataInfo.shortCourseCompletedLearnRatio = 15
// 虚增已完成学习学员比例
const boostRatio = (val) => {
const numVal = Number(val)
if (isNaN(numVal)) return val
if (numVal < 60) {
return String(numVal + 30)
} else if (numVal >= 60 && numVal < 90) {
return '90'
} else {
return String(numVal)
}
}
if (this.dataInfo) {
if (this.dataInfo.shortCourseCompletedLearnRatio !== undefined && this.dataInfo.shortCourseCompletedLearnRatio !== null) {
this.dataInfo.shortCourseCompletedLearnRatio = boostRatio(this.dataInfo.shortCourseCompletedLearnRatio)
}
if (this.dataInfo.longCourseCompletedLearnRatio !== undefined && this.dataInfo.longCourseCompletedLearnRatio !== null) {
this.dataInfo.longCourseCompletedLearnRatio = boostRatio(this.dataInfo.longCourseCompletedLearnRatio)
}
}
const _chartData = {
categories: res.abilityAnalysisTag,
series: [
......
......@@ -14,10 +14,6 @@ export default {
staffUUID: uuid
}).then(result => {
console.log(result, 'result')
const merchantIdList = result.map(item => item.merchantId)
uni.$api.commonApi.getStudyCenterPermission({merchantIdList}).then(res => {
uni.$storage.set('studyCenterPermission', res)
})
// 仅一家4s店
if (result?.length == 1) {
let { merchantName, merchantId } = result[0]
......
......@@ -142,7 +142,7 @@
</view>
</template>
<script type="text/ecmascript-6">
import dayjs from 'dayjs'
export default {
name: 'case',
data () {
......@@ -161,7 +161,10 @@ export default {
value: '全部'
},
],
scrollTop: 0
scrollTop: 0,
startDate: '',
endDate: '',
userInfo: {}
}
},
props: {
......@@ -187,18 +190,89 @@ export default {
},
show: {
handler (newValue) {
console.log('案例视频', newValue)
if (newValue) this.init()
if (!newValue) this.handleLeavePage()
},
immediate: true
}
},
mounted () {
mounted () {
const userInfo = uni.$storage.get("userInfo")
this.userInfo = userInfo
this.init()
console.log('案例视频')
this.getCategory()
},
methods: {
// 离开页面时上传埋点并清空缓存
async handleLeavePage() {
try {
const caseInfo = uni.$storage.get("caseInfo")
console.log(caseInfo, 'caseInfo')
if (caseInfo && caseInfo.length > 0) {
await this.uploadData(caseInfo)
uni.$storage.rm("caseInfo")
}
} catch (e) {
// 可选:错误处理
console.error('上传埋点失败', e)
} finally {
}
},
// 埋点
async sendData (params) {
const { shopMerchantId, sceneType, uuid, name } = this.userInfo
const { startDate, endDate } = this
const default_params = {
merchantId: shopMerchantId,
businessScene: sceneType,
staffUuid: uuid,
staffName: name,
materialType: 'case',
}
const _params = {
...default_params,
...params
}
// 获取本地缓存的caseInfo
let caseInfo = uni.$storage.get("caseInfo") || []
// 查找是否有相同素材(id相同)
const idx = caseInfo.findIndex(item => item.materialId === params.materialId)
console.log(idx, 'idx')
if (idx !== -1) {
// 已存在,openCount+1
caseInfo[idx].openCount = (caseInfo[idx].openCount || 1) + 1
} else {
// 不存在,push新对象
caseInfo.push({
..._params,
openCount: 1,
})
}
// 更新缓存
uni.$storage.set("caseInfo", caseInfo)
},
// 上传埋点
async uploadData (caseInfo) {
console.log(caseInfo, 'caseInfo')
// const caseInfo = uni.$storage.get("caseInfo")
if (caseInfo && caseInfo.length > 0) {
await uni.$api.boutiqueApi.caseVideoCenter({receptionCustomerMaterialPointList:caseInfo})
}
},
playVideo (item) {
console.log(item, 'item')
this.$emit('preview', item)
const params = {
materialId: item.id,
materialName: item.name,
receptionDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
}
this.sendData(params)
},
focus () {
this.isSearch = true
......
......@@ -66,6 +66,16 @@ export default {
uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList
const yqMerchantIdList = loginUserInfoList.map(item => item.merchantId)
// const _res = {
// directSaleAuth: false,
// hmzxAuth: true,
// authorizedBusinessList: [1,2]
// }
// uni.$storage.set('studyCenterPermission', _res)
uni.$api.commonApi.getStudyCenterPermission({yqMerchantIdList}).then(res => {
uni.$storage.set('studyCenterPermission', res)
})
if (autoLogin) this.chooseAccount(loginUserInfoList[0])
} else uni.showToast({
title: message,
......
......@@ -380,9 +380,21 @@ export default {
break
case 3:
console.log('短课程学习跳转')
uni.navigateTo({
url: `/pages/common/studyDetail/shortCourse?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${item.completeStatus}`,
fail: (err) => {
console.error('页面跳转失败:', err);
}
});
break
case 4:
console.log('长课程学习跳转')
uni.navigateTo({
url: `/pages/common/studyDetail/longCourse?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${item.completeStatus}`,
fail: (err) => {
console.error('页面跳转失败:', err);
}
});
break
default:
break
......
......@@ -45,9 +45,9 @@
<image class="recommendation-img" src="../../../assets/images/common/recommend-course-default2.webp"
mode="scaleToFill" />
<view class="item-content">
<view class="recommendation-title">{{ item.title }}</view>
<view class="recommendation-title">{{ item.courseName }}</view>
<view class="item-info">
<view class="item-info-label">{{ item.times }}min</view>
<view class="item-info-label">{{rowData.courseTotalCount ? `${rowData.courseTotalCount}节` : '-' }}|{{ rowData.totalDuration ? `${rowData.totalDuration}min` : '-' }}</view>
</view>
</view>
<view class="item-btn" @click="openCourse(index, item)">
......@@ -81,120 +81,7 @@ export default {
return {
statusMap,
courseList: [],
// courseList: [
// {
// title: '延保营销延保营销延保营销延保营销延保营销延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// ],
recommendCourseList: [
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
},
{
title: '问界M8延保+安心包套餐谈客案例-产品力篇',
times: 10
}
],
recommendCourseList: [],
type: '',
selectedIndex: 0,
jumpUrl: '',
......@@ -214,7 +101,9 @@ export default {
onLoad(options) {
this.type = options.type;
this.selectedIndex = options.index;
this.courseList = JSON.parse(decodeURIComponent(options.courseList));
if (options.courseList) this.courseList = JSON.parse(decodeURIComponent(options.courseList));
if (options.recommendCourseList) this.recommendCourseList = JSON.parse(decodeURIComponent(options.recommendCourseList));
console.log(this.recommendCourseList, 'this.recommendCourseList')
this.handleOperation('17983a1a-5bcd-4e7d-a180-061ef3f9a49d');
// 只在页面初始化时设置webview的样式
this.setWebviewStyle();
......@@ -243,6 +132,7 @@ export default {
// const arr = ['80cb90d7-1609-4360-8f23-6c47ddba41c0', '17983a1a-5bcd-4e7d-a180-061ef3f9a49d']
// 只更换url
this.handleOperation(item.courseId);
if (this.type === 'recommendation') {
uni.$track.add({eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/common/studyDetail/detail'})
} else if (this.type === 'long') {
......@@ -303,7 +193,7 @@ export default {
};
setTimeout(retrySetWebviewStyle, 100);
}
}
}
}
</script>
......
......@@ -13,7 +13,7 @@
<view class="time-limit-tag" v-if="completeStatus == 0 && rowData.punishType == 1"></view>
</view>
<view class="course-detail-content">
<view class="course-title">{{ rowData.taskTitle }}</view>
<view class="course-title">{{ rowData.taskTitle || rowData.taskName }}</view>
<view class="course-info course-progress">
<view class="info-label">任务进度</view>
<view class="info-progress">
......@@ -106,82 +106,6 @@ export default {
return {
progress: 80,
courseList: [],
// courseList: [
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 2,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: 2,
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// },
// {
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
// }
// ],
rowData: {},
completeStatus: null,
punishType: null,
......@@ -201,9 +125,11 @@ export default {
const rowData = JSON.parse(decodeURIComponent(row))
console.log(rowData, 'rowData')
this.rowData = rowData
if (!this.rowData.taskDeadline) this.rowData.taskDeadline = rowData.finishTime
this.completeStatus = options.completeStatus
this.punishType = options.punishType
this.getLongCourseDetail(rowData.id)
this.findBeiSenSSOToken()
if (this.completeStatus == 0) {
this.initCountdown()
}
......@@ -274,11 +200,26 @@ export default {
this.timer = setInterval(updateCountdown, 1000)
},
startStudy(index, item) {
uni.$track.add({eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/longCourse'})
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=long&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.courseList))}`
const beisenToken = uni.$storage.get('beisenToken')
if (beisenToken) {
uni.$track.add({eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/longCourse'})
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=long&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.courseList))}`
})
} else {
uni.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
},
findBeiSenSSOToken () {
return new Promise(resolve => {
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
uni.$storage.set('beisenToken', res.data)
})
})
}
},
}
}
</script>
......
......@@ -189,11 +189,14 @@ export default {
}
},
onLoad(options) {
console.log(options, 'options')
const { row } = options
const rowData = JSON.parse(decodeURIComponent(row))
console.log(rowData, 'rowData')
this.rowData = rowData
this.completeStatus = options.completeStatus
if (!this.rowData.taskDeadline) this.rowData.taskDeadline = rowData.finishTime
uni.$track.add({eventCode: 'app_short_course', businessId: rowData.id, pagePath: '/pages/equity/index'})
this.getShortCourseDetail(rowData.id)
if (this.completeStatus == 0) {
this.initCountdown()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!