feat: 积分徽章
This commit is contained in:
+22
-18
@@ -120,7 +120,7 @@
|
||||
</uv-overlay>
|
||||
<PreviewDetail />
|
||||
<badge ref="badgeRef"></badge>
|
||||
<points ref="pointsRef" @confirm="pointsConfirm"></points>
|
||||
<points ref="pointsRef"></points>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -136,8 +136,10 @@ import TalkingItem from '@/pages/course/components/talkingItem.vue'
|
||||
import ImagePreview from '@/components/image-preview/image-preview.vue'
|
||||
import PreviewDetail from '@/components/image-preview/preview-detail.vue'
|
||||
import TouchBtn from '@/pages/course/components/touchBtn.vue'
|
||||
import badge from '@/components/points-and-badge/badge';
|
||||
import points from '@/components/points-and-badge/points';
|
||||
import badge from '@/components/points-and-badge/badge';
|
||||
import points from '@/components/points-and-badge/points';
|
||||
import usePointsAndBadge from '@/components/points-and-badge/usePointsAndBadge';
|
||||
const { pointAndBadgesRun, badgeRef, pointsRef } = usePointsAndBadge();
|
||||
|
||||
import { useSocketStore } from '@/store/socket.js'
|
||||
import { useStorageStore } from '@/store/storage.js'
|
||||
@@ -163,8 +165,8 @@ const flagVal = ref('1')
|
||||
const isUploadingVoice = ref(false)
|
||||
const isPreview = ref(false)
|
||||
const IsAndEnv = ref(getPhoneEnvBool('AND'))
|
||||
const badgeRef = ref(null);
|
||||
const pointsRef = ref(null);
|
||||
// const badgeRef = ref(null);
|
||||
// const pointsRef = ref(null);
|
||||
|
||||
const ajaxApi = computed(() => (isPreview.value ? textChartPreviewApi : textChartApi))
|
||||
|
||||
@@ -426,19 +428,21 @@ const getGraphInfoUnStudy = (flag = 0, lastPgrphId = '') => {
|
||||
})
|
||||
.finally(() => {})
|
||||
} else {
|
||||
common
|
||||
.show('恭喜你已学完全部知识点', '有什么心得跟我们分享吗?', true, '取消', '去评论')
|
||||
.then(res => {
|
||||
if (res) {
|
||||
// 去评论
|
||||
common.redirectTo(`/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&imgId=${imageId.value}`)
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack()
|
||||
// common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
|
||||
}
|
||||
})
|
||||
.finally(() => {})
|
||||
pointAndBadgesRun('02', crsId.value, ()=>{
|
||||
common
|
||||
.show('恭喜你已学完全部知识点', '有什么心得跟我们分享吗?', true, '取消', '去评论')
|
||||
.then(res => {
|
||||
if (res) {
|
||||
// 去评论
|
||||
common.redirectTo(`/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&imgId=${imageId.value}`)
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack()
|
||||
// common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
|
||||
}
|
||||
})
|
||||
.finally(() => {})
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<badge ref="badgeRef"></badge>
|
||||
<points ref="pointsRef" @confirm="pointsConfirm"></points>
|
||||
<points ref="pointsRef"></points>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -123,6 +123,8 @@
|
||||
import TalkingItem from './components/talking-item.vue'
|
||||
import badge from '@/components/points-and-badge/badge';
|
||||
import points from '@/components/points-and-badge/points';
|
||||
import usePointsAndBadge from '@/components/points-and-badge/usePointsAndBadge';
|
||||
const { pointAndBadgesRun, badgeRef, pointsRef } = usePointsAndBadge();
|
||||
|
||||
|
||||
const socketStore = useSocketStore();
|
||||
@@ -133,8 +135,8 @@
|
||||
const traId = ref('')
|
||||
const chaId = ref('')
|
||||
const talkingType = ref('')
|
||||
const badgeRef = ref(null);
|
||||
const pointsRef = ref(null);
|
||||
// const badgeRef = ref(null);
|
||||
// const pointsRef = ref(null);
|
||||
const isPreview = ref(false)
|
||||
const detailInfo = ref({})
|
||||
const currentIndex = ref(0)
|
||||
@@ -416,7 +418,9 @@
|
||||
}).then(res=>{
|
||||
watchFlag.value = 1;
|
||||
socketStore?.closeSocket();
|
||||
common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':''))
|
||||
pointAndBadgesRun(talkingType.value === '01'? '07': '08', null, ()=>{
|
||||
common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':''))
|
||||
})
|
||||
})
|
||||
}
|
||||
const getPointsList = (pointsList = [], badgesList = []) => {
|
||||
|
||||
Reference in New Issue
Block a user