Commit 15944771 by 胡悦

bug修复

1 parent 7cf763dc
......@@ -4,7 +4,7 @@
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">任务详情</view>
<view class="title">{{ type === 'recommendation' ? '推荐课程' : '任务详情' }}</view>
</view>
<view class="detail-content">
<view class="detail-content-left">
......@@ -156,7 +156,15 @@ export default {
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
const COURSE_ID = courseId;
const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
......@@ -171,7 +179,8 @@ export default {
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.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`);
this.jumpUrl = `${tokenUrl}&return_url=${url}`;
......
......@@ -160,9 +160,9 @@
</template>
<template v-else>
<view
class="check-result-btn"
:class="['check-result-btn', item.tagName == '服务意识' ? 'disabled' : '']"
@click="handleExam(item)"
>去考核</view>
>{{item.tagName == '服务意识' ? '无需考核' : '去考核'}}</view>
</template>
</view>
</view>
......@@ -873,6 +873,10 @@ export default {
font-size: toRpx(24);
border-radius: toRpx(40);
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!