Merge branch 'develop' into 'sit'
杨航修改img组件 See merge request K17_AITS/tra-app!137
This commit is contained in:
+4
-4
@@ -20,11 +20,11 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.21:9786'
|
||||
|
||||
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
# dev
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
# sit
|
||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
|
||||
@@ -33,11 +33,11 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
|
||||
# 任东
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
|
||||
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
#VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
# 张建成
|
||||
VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
#VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
|
||||
# 王洋洋
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view v-bind="$attrs">
|
||||
<image :src="imgUrlShow" fit="cover" :mode="mode" @click="showDetail" style="width: 100%;height: 100%;"></image>
|
||||
<!-- <uv-overlay :show="showModel" opacity=".6" @click="showModel = false"> -->
|
||||
<uni-popup ref="PopupRef" class="popup" mask-background-color="rgba(0,0,0,.9)">
|
||||
<uni-popup ref="PopupRef" class="popup" mask-background-color="rgba(0,0,0,.2)">
|
||||
<view class="overlay-box" @click="closePopup">
|
||||
<image class="detail-img" :src="imgUrlShow" :mode="mode"></image>
|
||||
</view>
|
||||
@@ -159,9 +159,13 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.overlay-box{
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 999;
|
||||
background-color: rgba(0, 0, 0, .65);
|
||||
.detail-img{
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
></image>
|
||||
</view>
|
||||
<!-- <uv-overlay :show="showModel" opacity=".6" @click.stop="showModel = false"> -->
|
||||
<uni-popup ref="PopupRef" class="popup" mask-background-color="rgba(0,0,0,.9)">
|
||||
<uni-popup ref="PopupRef" class="popup" mask-background-color="rgba(0,0,0,.2)">
|
||||
<view class="overlay-box" @click="playEnded">
|
||||
<video class="video-cont-center"
|
||||
:id="`video`+ fileId"
|
||||
@@ -154,5 +154,6 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 999;
|
||||
background-color: rgba(0, 0, 0, .65);
|
||||
}
|
||||
</style>
|
||||
@@ -163,7 +163,6 @@
|
||||
const queryList = async (pageNo, pageSize, from) => {
|
||||
const requests = [queryAllTraTaskCrsInfo({ taskId: taskId.value })];
|
||||
// 如果不是第一次请求,才添加第二个请求
|
||||
|
||||
if (total.value === -1 && detailData.taskName !== '') {
|
||||
status.value = 'loading';
|
||||
} else {
|
||||
@@ -283,7 +282,7 @@
|
||||
Object.assign(detailData, {
|
||||
...learning_tasks_details
|
||||
});
|
||||
collectId.value = learning_tasks_details.collectionId || '';
|
||||
collectId.value = learning_tasks_details.collectionId || null;
|
||||
const updateFun = () => {
|
||||
setTimeout(() => {
|
||||
console.log('监听考试获取结果事件,执行更新函数');
|
||||
@@ -300,6 +299,8 @@
|
||||
uni.$off('refresh_course_list');
|
||||
uni.$off('get_result_completed');
|
||||
// 如果收藏变了,并且上一页是收藏页,更新收藏列表
|
||||
console.log('detailData.collectionId', detailData.collectionId);
|
||||
console.log('collectId', collectId.value);
|
||||
if (detailData.collectionId !== collectId.value) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 2) {
|
||||
|
||||
@@ -1,226 +0,0 @@
|
||||
<template>
|
||||
<view class="max_page detail-main">
|
||||
<nav-bar :is_seat="false"></nav-bar>
|
||||
<view class="fixed_search_div">
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
<view class="title font_pf">学习任务</view>
|
||||
</view>
|
||||
<view class="fixed_search_input_div">
|
||||
<search-input placeholder="请输入任务名" @search="search"></search-input>
|
||||
</view>
|
||||
<view class="detail-body">
|
||||
<view class="body-tab">
|
||||
<uv-tabs
|
||||
class="font_pf my_tabs"
|
||||
:current="tabAct"
|
||||
:list="tabList"
|
||||
@change="tabChange"
|
||||
:scrollable="false"
|
||||
line-color="#0066FF"
|
||||
:inactive-style="{ color: '#333333', fontSize: '30rpx', fontWeight: '600' }"
|
||||
:activeStyle="{ color: '#0066FF', fontSize: '30rpx', fontWeight: '600' }"
|
||||
:lineColor="`url(${LineBg}) 10% 10%`"
|
||||
></uv-tabs>
|
||||
</view>
|
||||
<view class="uni-margin-wrap no-overflow">
|
||||
<swiper class="swiper" :current="tabAct" :indicator-dots="false" @change="swiperChange">
|
||||
<swiper-item>
|
||||
<content :ref="(el) => (listItemRefs[0] = el)" state="01"></content>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<content :ref="(el) => (listItemRefs[1] = el)" state="02"></content>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<content :ref="(el) => (listItemRefs[2] = el)" state="03"></content>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { LineBg } from '@/enum.js';
|
||||
import content from './components/content.vue';
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const listItemRefs = ref([]);
|
||||
const tabAct = ref(0);
|
||||
const searchText = ref('');
|
||||
const tabList = ref([
|
||||
{
|
||||
name: '全 部'
|
||||
},
|
||||
{
|
||||
name: '已完成'
|
||||
},
|
||||
{
|
||||
name: '未完成'
|
||||
}
|
||||
]);
|
||||
|
||||
const tabChange = (item) => {
|
||||
tabAct.value = item.index;
|
||||
};
|
||||
const swiperChange = (item) => {
|
||||
tabAct.value = item.detail.current;
|
||||
};
|
||||
const search = (value) => {
|
||||
listItemRefs.value[0]?.search(value, tabAct.value === 0);
|
||||
listItemRefs.value[1]?.search(value, tabAct.value === 1);
|
||||
listItemRefs.value[2]?.search(value, tabAct.value === 2);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
watch(
|
||||
tabAct,
|
||||
(newValue, oldValue) => {
|
||||
typeof listItemRefs.value[newValue]?.getData === 'function' &&
|
||||
listItemRefs.value[newValue]?.getData('first');
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('refresh_tasks_list', (res) => {
|
||||
console.log('refresh_tasks_list');
|
||||
listItemRefs.value[0]?.updateData(res);
|
||||
listItemRefs.value[1]?.updateData(res);
|
||||
listItemRefs.value[2]?.updateData(res);
|
||||
});
|
||||
// 完成任务后更新列表单条信息
|
||||
uni.$on('refresh_tasks_data', (res) => {
|
||||
console.log('refresh_tasks_data');
|
||||
listItemRefs.value[0]?.updateData(res);
|
||||
listItemRefs.value[1]?.clear();
|
||||
listItemRefs.value[2]?.clear();
|
||||
listItemRefs.value[tabAct.value]?.getData('first');
|
||||
if (tabAct.value === 0) {
|
||||
courseRef.value?.updateData(res);
|
||||
} else if (tabAct.value === 1) {
|
||||
taskRef.value?.updateData(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
onUnload(() => {
|
||||
uni.$off('refresh_tasks_list');
|
||||
uni.$off('refresh_tasks_data');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$bg-margin-left: 50rpx;
|
||||
|
||||
.my_tabs {
|
||||
// 解决这个圆角的图片,开穿透
|
||||
:deep(.uv-tabs__wrapper__nav__line) {
|
||||
height: 26rpx !important;
|
||||
left: 60rpx;
|
||||
background-size: 28rpx !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
/*
|
||||
状态栏 var(--status-bar-height)
|
||||
标题高度88rpx
|
||||
搜索栏高度80rpx
|
||||
tab切换栏高度88rpx
|
||||
下方滑动区域上下边距各10共20rpx
|
||||
**/
|
||||
|
||||
height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx);
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: block;
|
||||
height: 100%;
|
||||
line-height: 300rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.detail-body {
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
|
||||
.body-tab {
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-main {
|
||||
background-color: #f6f8ff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 34rpx;
|
||||
height: 34rpx;
|
||||
font-weight: 600;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
.fixed_search_input_div {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
padding: 0 22rpx;
|
||||
// background-color: red;
|
||||
background-color: #fff;
|
||||
:deep(.uv-input.uv-input--radius) {
|
||||
border-radius: 16rpx !important;
|
||||
}
|
||||
}
|
||||
.fixed_search_div {
|
||||
padding: calc(20rpx + var(--status-bar-height)) 15rpx 34rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
// background-color: red;
|
||||
// height: 180rpx;
|
||||
position: relative;
|
||||
|
||||
.back_div {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: var(--status-bar-height);
|
||||
padding: 10rpx;
|
||||
|
||||
.back-icon {
|
||||
position: relative;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.back-icon::before,
|
||||
.back-icon::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.back-icon::after {
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
border-top: 4rpx solid #000000;
|
||||
border-left: 4rpx solid #000000;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -41,6 +41,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import common from '@/common/common';
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import content from './components/content.vue';
|
||||
import { ref } from 'vue';
|
||||
@@ -62,10 +63,7 @@
|
||||
value: '03'
|
||||
}
|
||||
]);
|
||||
// 刷新当前列表
|
||||
const reloadCurrentList = () => {
|
||||
listItemRefs.value && listItemRefs.value[current.value]?.reload();
|
||||
};
|
||||
|
||||
onLoad(() => {
|
||||
// 收藏这里更新列表的item的数据
|
||||
uni.$on('update_tasks_item', (res) => {
|
||||
|
||||
Reference in New Issue
Block a user