Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

# Conflicts:
#	.env.development
This commit is contained in:
yanghang
2025-06-20 18:12:53 +08:00
13 changed files with 473 additions and 79 deletions
+1 -1
View File
@@ -3,6 +3,6 @@ ENV = 'development'
# 'development'
# base api
VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# 苗扬
# VITE_APP_BASE_API_Url = 'http://25.64.16.133:9786'
+26 -9
View File
@@ -1,12 +1,12 @@
{
"name": "uni-preset-vue",
"version": "0.0.0",
"name": "tra-app",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "uni-preset-vue",
"version": "0.0.0",
"name": "tra-app",
"version": "0.0.1",
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4060620250520001",
"@dcloudio/uni-app-harmony": "3.0.0-4060620250520001",
@@ -24,6 +24,9 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4060620250520001",
"@dcloudio/uni-mp-xhs": "3.0.0-4060620250520001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4060620250520001",
"crypto-js": "^3.1.9-1",
"terser": "^5.42.0",
"uuid": "^11.1.0",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9"
},
@@ -3654,7 +3657,6 @@
"version": "0.3.6",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
@@ -5124,7 +5126,6 @@
"version": "1.1.2",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"devOptional": true,
"license": "MIT"
},
"node_modules/bytes": {
@@ -5380,7 +5381,6 @@
"version": "2.20.3",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"devOptional": true,
"license": "MIT"
},
"node_modules/compare-versions": {
@@ -5508,6 +5508,12 @@
"node": ">= 8"
}
},
"node_modules/crypto-js": {
"version": "3.3.0",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/crypto-js/-/crypto-js-3.3.0.tgz",
"integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==",
"license": "MIT"
},
"node_modules/css-font-size-keywords": {
"version": "1.0.0",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/css-font-size-keywords/-/css-font-size-keywords-1.0.0.tgz",
@@ -9794,7 +9800,6 @@
"version": "0.5.21",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
@@ -10035,7 +10040,6 @@
"version": "5.42.0",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/terser/-/terser-5.42.0.tgz",
"integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==",
"devOptional": true,
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
@@ -10454,6 +10458,19 @@
"node": ">= 0.4.0"
}
},
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/v8-to-istanbul": {
"version": "8.1.1",
"resolved": "http://25.12.10.69:8081/repository/aliyun-npm/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz",
+103 -68
View File
@@ -1,81 +1,116 @@
<script>
export default {
onLaunch: function() {
// console.log('App Launch')
},
onShow: function() {
// console.log('App Show')
},
onHide: function() {
// console.log('App Hide')
}
export default {
onLaunch: function () {
// console.log('App Launch')
},
onShow: function () {
// console.log('App Show')
},
onHide: function () {
// console.log('App Hide')
}
};
</script>
<style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
// @import "@/uni_modules/uview-ui/index.scss";
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
// @import "@/uni_modules/uview-ui/index.scss";
view {
box-sizing: border-box;
}
@font-face {
font-family: 'PingFangSC';
src: url('@/static/font/PingFang-SC.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "PingFangSC";
src: url('@/static/font/PingFang-SC.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
// 解决uview离线环境下没有图标
@font-face {
font-family: 'uicon-iconfont';
src: url('@/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
// 解决uview离线环境下没有图标
@font-face {
font-family: "uicon-iconfont";
src: url('@/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.max_page {
min-height: 100vh;
}
.mr-10 {
margin-right: 10rpx;
}
.mb-8 {
margin-bottom: 8rpx;
}
.pt-8 {
padding-top: 8rpx;
}
.mb- {
margin-bottom: 10rpx;
}
.mb-18 {
margin-bottom: 18rpx;
}
.mb-64 {
margin-bottom: 64rpx;
}
.mb-30 {
margin-bottom: 30rpx;
}
.mb-36 {
margin-bottom: 36rpx;
}
.mb-4 {
margin-bottom: 4rpx;
}
.fz-30 {
font-size: 30rpx;
}
.fz-24 {
font-size: 24rpx;
}
.w_100 {
width: 100%;
}
.max_page {
min-height: 100vh;
}
.h_100 {
height: 100%;
}
.w_100 {
width: 100%;
}
.flex {
display: flex;
}
.fw-600 {
font-weight: 600;
}
.img_100 {
width: 100%;
height: 100%;
}
.h_100 {
height: 100%;
}
.fl1 {
flex: 1;
}
.flex {
display: flex;
}
.font_pf {
font-family: 'PingFangSC';
}
.img_100 {
width: 100%;
height: 100%;
}
.ellipsis-text {
white-space: nowrap;
/* 强制不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
.fl1 {
flex: 1;
}
.font_pf {
font-family: "PingFangSC";
}
.ellipsis-text {
white-space: nowrap;
/* 强制不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
/* 多行文本溢出 */
.multi-line-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/* 显示的行数 */
overflow: hidden;
}
</style>
/* 多行文本溢出 */
.multi-line-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/* 显示的行数 */
overflow: hidden;
}
</style>
+12
View File
@@ -0,0 +1,12 @@
import request from '@/api/request'
const base_url = '/traapp'
// 获取课程分类树接口
export const getCourseDetailApi = (data) => {
return request({
url: base_url + '/crsInfo/queryCrsInfoDetail',
method: 'post',
data
});
};
+15
View File
@@ -10,6 +10,18 @@
}
},
{
<<<<<<< HEAD
"path": "pages/courseDetail/index",
"style": {
"navigationBarTitleText": "课程详情",
"app-plus": {
"titleNView": false
}
}
},
{
=======
>>>>>>> f0015d5ea46c4904ce35c5ec4a03028d9ec6d5b4
"path": "pages/study/index",
"style": {
"navigationBarTitleText": "学习",
@@ -81,6 +93,8 @@
"titleNView": false
}
}
<<<<<<< HEAD
=======
},
{
"path": "pages/course/index",
@@ -90,6 +104,7 @@
"titleNView": false
}
}
>>>>>>> f0015d5ea46c4904ce35c5ec4a03028d9ec6d5b4
}
],
"tabBar": {
+306
View File
@@ -0,0 +1,306 @@
<template>
<view class="max_page detail-main">
<image src="/src/static/images/courseDetail/mipmap-xhdpi/bg.png" mode="widthFix" class="back-image"></image>
<view class="detail-body">
<view class="head-title font_pf">
<view class="title-text">{{ form.crsName }}</view>
<view class="title-num">
<view class="num-item">
<image class="title-icon" src="/src/static/images/courseDetail/mipmap-xhdpi/zhishidian.png" mode="widthFix"></image>
<view class="mr-10">知识点</view>
<view class="c-000">{{ form.pgrphNum }}</view>
</view>
<view class="num-item">
<image class="title-icon" src="/src/static/images/courseDetail/mipmap-xhdpi/yixue.png" mode="widthFix"></image>
<view class="mr-10">已学</view>
<view class="c-000">{{ form.styParaGraphNum }}</view>
</view>
</view>
</view>
<view class="body-box">
<view class="body-tab">
<uv-tabs
class="font_pf"
:list="tabList"
@click="tabSwitch"
:scrollable="false"
line-color="#0066FF"
:active-style="{ color: '#323E57', 'font-weight': 600, 'font-size': '30rpx' }"
:inactive-style="{ color: '#666666', 'font-size': '30rpx' }"
></uv-tabs>
</view>
<view class="course-info" v-if="tabAct == '课程介绍'">
<view class="info-top font_pf">
<view class="top-left font_pf">
<view class="fz-30 fw-600 mb-8">课程类别</view>
<view class="fz-30 fw-600">{{ form.catalogName }}</view>
</view>
<view class="top-right font_pf">
<view class="rate-text mb-4">评分</view>
<view class="rate-num">{{ form.evalGrade }}</view>
</view>
</view>
<view class="info-middle font_pf">
<view class="fz-30 fw-600 mb-8">发布日期</view>
<view class="fz-30 fw-600">{{ common.formatDate2(form.issuTm, 'yyyy-MM-dd HH:mm') }}</view>
</view>
<view class="info-bottom">
<view class="bottom-left">
<view class="mb-64">
<view class="fz-30 font_pf fw-600 mb-18">标签</view>
<view class="label" v-if="form.tagCataList">
<text class="label-item font_pf" v-for="item in form.tagCataList" :key="item.tagId">{{ item.tagName }}</text>
</view>
</view>
<view class="mb-64">
<view class="fz-30 fw-600 font_pf mb-4">创建人</view>
<view class="fz-30 font_pf fw-600">{{ form.ctUserName }}</view>
</view>
<view class="mb-64">
<view class="fz-30 font_pf fw-600 mb-4">归属部门</view>
<view class="fz-30 font_pf fw-600">{{ form.belgOrgName }}</view>
</view>
</view>
<view class="bottom-right">
<image src="/src/static/images/courseDetail/mipmap-xhdpi/ditu.png" class="right-img" mode="widthFix"></image>
</view>
</view>
</view>
<view class="point" v-if="tabAct == '知识点'">
<view class="point-item mb-30" v-for="(item, index) in form.pgrphData" :key="item.index">
<view class="flex">
<view class="blue-ball">
<view class="ball"></view>
</view>
<view class="item-label">
<view class="fz-30 font_pf fw-600 mb-30">知识点0{{ index + 1 }}</view>
<view class="fz-30 font_pf fw-600 mb-36">{{ item.pgrphContent }}</view>
</view>
</view>
<view class="pt-8">
<view class="font_pf fz-24" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">{{ item.pgrphStdyStateName }}</view>
</view>
</view>
</view>
<view class="evaluate" v-if="tabAct == '评价'"></view>
</view>
</view>
<view class="btn-box font_pf">
<uv-button type="primary">去学习</uv-button>
<uv-button type="primary">去练习</uv-button>
<uv-button type="primary">去考试</uv-button>
</view>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { getCourseDetailApi } from '@/api/courseDetail.js';
// import {formatDate2} from '@/common/common.js'
import common from '@/common/common';
// tab栏
const tabList = ref([{ name: '课程介绍' }, { name: '知识点' }, { name: '评价' }]);
const form = ref({});
const crsNum = ref('');
const tabAct = ref('课程介绍');
const tabSwitch = (item) => {
tabAct.value = item.name;
};
const getData = async () => {
const { body } = await getCourseDetailApi({ crsNum: crsNum.value });
form.value = body;
};
onLoad((params) => {
crsNum.value = params.crsNum;
getData();
});
</script>
<style lang="scss" scoped>
.detail-main {
background-color: #f5f5f5;
position: relative;
}
.detail-body {
box-sizing: border-box;
min-height: calc(100vh - 256rpx);
position: absolute;
top: 256rpx;
border-radius: 23rpx 23rpx 0rpx 0rpx;
width: 100%;
display: flex;
flex-direction: column;
}
.body-head {
height: 460rpx;
background-color: red;
}
.back-image {
position: absolute;
width: 100%;
}
.head-title {
border-radius: 24rpx 24rpx 0rpx 0rpx;
height: 162rpx;
background-color: #ffffff;
display: flex;
flex-direction: column;
padding-top: 36rpx;
padding-left: 42rpx;
padding-bottom: 24rpx;
}
.title-text {
font-size: 34rpx;
color: #333333;
font-weight: 600;
margin-bottom: 20rpx;
}
.title-icon {
width: 22rpx;
height: 30rpx;
margin-right: 10rpx;
}
.title-num {
display: flex;
}
.body-box {
background-color: #f5f5f5;
flex: 1;
padding-left: 16rpx;
padding-right: 16rpx;
padding-top: 20rpx;
padding-bottom: 245rpx;
}
.body-tab {
background-color: #ffffff;
border-radius: 22rpx;
height: 92rpx;
// padding-top: 22rpx;
padding-bottom: 22rpx;
margin-bottom: 24rpx;
// :deep(.uv-tabs__wrapper__nav__line) {
// bottom: 10rpx;
// }
}
.course-info {
box-sizing: border-box;
width: 100%;
background-color: #ffffff;
border-radius: 22rpx;
padding-top: 38rpx;
padding-left: 38rpx;
}
.info-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 62rpx;
padding-right: 36rpx;
.top-right {
.rate-text {
text-align: right;
color: #999999;
font-size: 30rpx;
margin-bottom: 4rpx;
}
.rate-num {
color: #0066ff;
font-size: 62rpx;
font-family: Arial, Helvetica, sans-serif;
font-weight: 600;
}
}
}
.info-middle {
margin-bottom: 35rpx;
padding-right: 36rpx;
}
.info-bottom {
display: flex;
justify-content: space-between;
width: 100%;
}
.bottom-left {
display: flex;
flex-direction: column;
padding-top: 12rpx;
flex: 1;
.label {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.label-item {
text-align: center;
border-radius: 22rpx;
padding: 2rpx 14rpx;
font-size: 22rpx;
margin-right: 14rpx;
background-color: #f1f3f8;
}
}
.bottom-right {
width: 50%;
.right-img {
width: 100%;
height: auto;
object-fit: cover;
}
}
.btn-box {
position: fixed;
bottom: 0;
height: 187rpx;
width: 100%;
display: flex;
padding-top: 37rpx;
justify-content: space-evenly;
background-color: #ffffff;
:deep(.uv-button) {
border-radius: 14rpx;
width: 200rpx;
height: 92rpx;
}
}
.num-item {
display: flex;
align-items: center;
font-size: 30rpx;
margin-right: 30rpx;
color: #666666;
}
.point {
width: 100%;
}
.point-item {
background-color: #fff;
display: flex;
padding-top: 24rpx;
padding-left: 36rpx;
padding-right: 52rpx;
border-radius: 22rpx;
justify-content: space-between;
.blue-ball {
padding-top: 16rpx;
margin-right: 12rpx;
.ball {
width: 12rpx;
height: 12rpx;
background-color: #0066ff;
border-radius: 50%;
}
}
}
.learn {
color: #1dd17a;
}
.unlearn {
color: #666666;
}
.c-000 {
font-weight: 600;
color: #000000;
}
</style>
+9
View File
@@ -8,6 +8,15 @@
"titleNView": false
}
}
},
{
"path": "pages/courseDetail/index",
"style": {
"navigationBarTitleText": "课程详情",
"app-plus": {
"titleNView": false
}
}
}
],
"tabBar": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

@@ -6,7 +6,7 @@ $uv-border-color: #dadbde !default;
$uv-bg-color: #f3f4f6 !default;
$uv-disabled-color: #c8c9cc !default;
$uv-primary: #3c9cff !default;
$uv-primary: #0066ff !default;
$uv-primary-dark: #398ade !default;
$uv-primary-disabled: #9acafc !default;
$uv-primary-light: #ecf5ff !default;