Commit 7372bf6b by 李伟康

Merge branch 'SAAS+V4.55.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.55.0

2 parents da0cb48a 15944771
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="back" @click="backPage"> <view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons> <uni-icons type="left" :size="20" color="#000"></uni-icons>
</view> </view>
<view class="title">任务详情</view> <view class="title">{{ type === 'recommendation' ? '推荐课程' : '任务详情' }}</view>
</view> </view>
<view class="detail-content"> <view class="detail-content">
<view class="detail-content-left"> <view class="detail-content-left">
...@@ -156,7 +156,15 @@ export default { ...@@ -156,7 +156,15 @@ export default {
uni.$track.add({eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/detail'}) uni.$track.add({eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/detail'})
} }
}, },
handleOperation(courseId) { findBeiSenSSOToken () {
return new Promise(resolve => {
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
uni.$storage.set('beisenToken', res.data)
resolve(res.data)
})
})
},
async handleOperation(courseId) {
// 只处理课程详情,设置jumpUrl // 只处理课程详情,设置jumpUrl
const COURSE_ID = courseId; const COURSE_ID = courseId;
const baseUrl = 'https://cloud.italent.cn/PageHome/Index'; const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
...@@ -171,7 +179,8 @@ export default { ...@@ -171,7 +179,8 @@ export default {
const queryString = Object.entries(params) const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`) .map(([key, value]) => `${key}=${value}`)
.join('&'); .join('&');
const tokenUrl = uni.$storage.get('beisenToken') // const tokenUrl = uni.$storage.get('beisenToken')
const tokenUrl = await this.findBeiSenSSOToken() // 每次都重新获取token,防止过期
const url = encodeURIComponent(`${baseUrl}?${queryString}#/viewDynamic?1=1`); const url = encodeURIComponent(`${baseUrl}?${queryString}#/viewDynamic?1=1`);
this.jumpUrl = `${tokenUrl}&return_url=${url}`; this.jumpUrl = `${tokenUrl}&return_url=${url}`;
......
...@@ -160,9 +160,9 @@ ...@@ -160,9 +160,9 @@
</template> </template>
<template v-else> <template v-else>
<view <view
class="check-result-btn" :class="['check-result-btn', item.tagName == '服务意识' ? 'disabled' : '']"
@click="handleExam(item)" @click="handleExam(item)"
>去考核</view> >{{item.tagName == '服务意识' ? '无需考核' : '去考核'}}</view>
</template> </template>
</view> </view>
</view> </view>
...@@ -873,6 +873,10 @@ export default { ...@@ -873,6 +873,10 @@ export default {
font-size: toRpx(24); font-size: toRpx(24);
border-radius: toRpx(40); border-radius: toRpx(40);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%); background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
&.disabled {
background: #D3DAE6;
width: toRpx(140);
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!