Commit 4448f3e5 authored by zhengke's avatar zhengke

修改

parent feeaf823
......@@ -6,15 +6,9 @@
<view class="con" :style="{ 'padding-top': `${statusBarHeight}px` }">
<view style="height: 100rpx"></view>
<view class="personInfo flex flex_start_center">
<van-image
round
width="100rpx"
height="100rpx"
fit="cover"
:src="userinfo.UserIcon ? userinfo.UserIcon : userinfo.GroupLogo"
class="headimg"
@click="jumpPage('/pages/login/login')"
/>
<van-image round width="100rpx" height="100rpx" fit="cover"
:src="userinfo.UserIcon ? userinfo.UserIcon : userinfo.GroupLogo" class="headimg"
@click="jumpPage('/pages/login/login')" />
<view class="grow">
<view class="name"> {{ userinfo.AccountName }} </view>
<view class="phone">
......@@ -23,26 +17,16 @@
</view>
<view class="saleInfo">
<view class="info1">
<van-icon
name="contact"
size="23rpx"
style="margin-right: 10rpx"
/>服务人员</view
>
<van-icon name="contact" size="23rpx" style="margin-right: 10rpx" />服务人员
</view>
<view class="info2 one_line">
<text style="margin-right: 10rpx">课程顾问</text
>{{ userinfo.EnterPhone2 }}</view
>
<text style="margin-right: 10rpx">课程顾问</text>{{ userinfo.EnterPhone2 }}
</view>
</view>
</view>
<view class="baseInfo flex flex_wrap">
<view
class="baseInfo_item flex flex_between_center"
v-for="(item, index) in baseInfo"
:key="index"
:style="{ 'background-color': item.bgcolor }"
@click="jumpPage(item.jumpUrl)"
>
<view class="baseInfo_item flex flex_between_center" v-for="(item, index) in baseInfo" :key="index"
:style="{ 'background-color': item.bgcolor }" @click="jumpPage(item.jumpUrl)">
<view style="height: 100%; max-width: 120rpx">
<view class="baseInfo_name">
{{ item.name }}
......@@ -55,28 +39,64 @@
</view>
</view>
<view class="LearningGarden flex flex_wrap">
<view
v-for="(item, index) in learnList"
:key="index"
class="LearningGarden-item"
:style="{ backgroundColor: item.bgcolor }"
@click="jumpPage(item.jumpUrl)"
>
<view v-for="(item, index) in learnList" :key="index" class="LearningGarden-item"
:style="{ backgroundColor: item.bgcolor }" @click="jumpPage(item.jumpUrl)">
<view class="LearningGarden-item-name">{{ item.name }}</view>
<view class="LearningGarden-item-desc">{{ item.desc }}</view>
<image :src="item.img" class="LearningGarden-item-img" />
</view>
</view>
<view class="title" v-if="data.indexData.FeedBackList[0].length > 0">
课程反馈
</view>
<view class="feedback" v-if="data.indexData.FeedBackList[0].length > 0">
<view class="feedback-info flex flex_start_center">
<image src="" class="info-headimg" />
<view class="grow">
<view class="teacher-name">{{
data.indexData.FeedBackList[0].TeacherName
}}</view>
<view class="rate">
<van-rate :value="data.indexData.FeedBackList[0].Score"
:count="data.indexData.FeedBackList[0].Score"
icon="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
void-icon="" size="24rpx" />
</view>
</view>
<view class="feedback-all" @click="jumpPage('/pages/course/feedback')">
全部
<van-icon name="arrow" style="margin-left: 30rpx" />
</view>
</view>
<view class="two_line feedback-text">
{{ data.indexData.FeedBackList[0].Comment }}
</view>
<view class="flex">
<view v-for="(item, index) in data.indexData.FeedBackList[0].PhotoList" :key="index">
<image :src="item" class="feedback-img" v-if="index === 0 || index === 1 || index === 2">
</image>
<view class="layer flex flex_center_center" v-if="item.PhotoList.length > 3 && index === 2">
+{{ item.PhotoList.length - 3 }}</view>
</view>
</view>
</view>
<view class="activeContent">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" indicator-color="#CCCCCC" indicator-active-color="#000000" :vertical="true">
<swiper-item v-for="(item,index) in ActivityList" :key="index">
<view class="swiperList" :style="{'background-image': item.CoverImg? `url(${item.CoverImg})`
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`}">
<view class="swiper_Time">{{item.BMStart}}</view>
<view class="swiper_Name">{{item.ActivityName}}</view>
</view>
</swiper-item>
</swiper>
</view>
<view class="timetable">
<view class="timetable_item flex flex_between_center">
<text class="timetable_title">我的课表</text>
<view
class="timetable_btn"
@click="
<view class="timetable_btn" @click="
jumpPage(`/pages/course/timeTable?classId=${indexData.ClassId}`)
"
v-if="indexData.ClassPlan.TimeStart"
>
" v-if="indexData.ClassPlan.TimeStart">
全部
<van-icon name="arrow" style="margin-left: 30rpx" />
</view>
......@@ -109,81 +129,24 @@
<text v-if="indexData.ClassPlan.TimeStatusStr === 2">下课</text>
</view>
</view>
<view class="title" v-if="data.indexData.FeedBackList[0].length > 0">
课程反馈
</view>
<view class="feedback" v-if="data.indexData.FeedBackList[0].length > 0">
<view class="feedback-info flex flex_start_center">
<image src="" class="info-headimg" />
<view class="grow">
<view class="teacher-name">{{
data.indexData.FeedBackList[0].TeacherName
}}</view>
<view class="rate">
<van-rate
:value="data.indexData.FeedBackList[0].Score"
:count="data.indexData.FeedBackList[0].Score"
icon="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
void-icon=""
size="24rpx"
/>
</view>
</view>
<view
class="feedback-all"
@click="jumpPage('/pages/course/feedback')"
>
全部<van-icon name="arrow" style="margin-left: 30rpx" />
</view>
</view>
<view class="two_line feedback-text">
{{ data.indexData.FeedBackList[0].Comment }}</view
>
<view class="flex">
<view
v-for="(item, index) in data.indexData.FeedBackList[0].PhotoList"
:key="index"
>
<image
:src="item"
class="feedback-img"
v-if="index === 0 || index === 1 || index === 2"
></image>
<view
class="layer flex flex_center_center"
v-if="item.PhotoList.length > 3 && index === 2"
>+{{ item.PhotoList.length - 3 }}</view
>
</view>
</view>
</view>
<van-cell-group :border="false">
<van-cell title="我的考试" title-class="title" :border="false">
<view
class="value"
@click="
<view class="value" @click="
jumpPage(`/pages/exam/examPaperList?Id=${indexData.GuestId}`)
"
>
">
查看更多
</view>
</van-cell>
</van-cell-group>
<view v-if="indexData.paperList.length == 0"
><van-empty description="暂无数据"
/></view>
<view v-if="indexData.paperList.length == 0">
<van-empty description="暂无数据" />
</view>
<view class="mytest flex" v-if="indexData.paperList.length > 0">
<view
v-for="(item, index) in indexData.paperList"
:key="index"
class="test-item no_shrink"
:style="{
<view v-for="(item, index) in indexData.paperList" :key="index" class="test-item no_shrink" :style="{
'background-image': item.PicList[0]
? `url(${item.PicList[0]})`
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`,
}"
@click="getItemStatus(item)"
>
}" @click="getItemStatus(item)">
<view class="testName">
{{ item.PaperName }}
</view>
......@@ -200,15 +163,12 @@
/>
<view class="teacherName">{{ indexData.TeacherName }}</view> -->
</view>
<view
class="test-status"
:class="{
<view class="test-status" :class="{
'status-blue': item.ExamStatusStr == '未开始',
'status-green': item.ExamStatusStr == '已开始',
'status-black': item.ExamStatusStr == '完成',
'status-red': item.ExamStatusStr == '缺考',
}"
>
}">
{{ item.ExamStatusStr }}
</view>
</view>
......@@ -220,7 +180,7 @@
</template>
<script>
import {
import {
ref,
reactive,
toRefs,
......@@ -230,19 +190,27 @@ import {
computed,
onMounted,
provide,
} from "vue";
import { getIndexInfo } from "../../api/index";
import { desensitization } from "../../utils/index";
export default {
} from "vue";
import {
getIndexInfo
} from "../../api/index";
import {
getActivityList
} from "../../api/activity"
import {
desensitization
} from "../../utils/index";
export default {
setup(props) {
let { proxy } = getCurrentInstance();
let {
proxy
} = getCurrentInstance();
proxy.$isLogin();
let data = reactive({
statusBarHeight: 0,
userinfo: {},
indexData: {},
baseInfo: [
{
baseInfo: [{
name: "学区",
desc: "",
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png",
......@@ -286,8 +254,7 @@ export default {
},
],
// 学习园地
learnList: [
{
learnList: [{
name: "日语学习园地",
desc: "日本語の勉強",
bgcolor: "#F6E5FE",
......@@ -302,6 +269,15 @@ export default {
jumpUrl: "/pages/exam/examScore",
},
],
indicatorDots: true, //是否显示轮播指示点
autoplay: false,
ActiveMsg: {
pageIndex: 1,
pageSize: 10,
ActivityType: 0,
SelectIsEnd: 0,
},
ActivityList: [] //活动数据
});
let methods = {
jumpPage(url) {
......@@ -328,6 +304,13 @@ export default {
data.baseInfo[5].desc = res.Data.TeacherName;
}
},
async getActivityData() {
let res = await getActivityList(data.ActiveMsg);
console.log(res, '数据');
if (res.resultCode == 1) {
data.ActivityList = res.data.pageData;
}
},
//根据状态跳转
getItemStatus(item) {
//ExamStatus 1未开始 2已开始 3已考试 4缺考 5已阅卷
......@@ -361,6 +344,7 @@ export default {
},
onShow() {
this.getIndexdata();
this.getActivityData();
},
onLoad() {
uni.setNavigationBarTitle({
......@@ -381,45 +365,47 @@ export default {
imageUrl: "",
};
},
};
};
</script>
<style scoped>
.con {
.con {
box-sizing: border-box;
padding: 100rpx 30rpx 50rpx;
}
.page-title {
}
.page-title {
font-size: 44rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
}
.personInfo {
}
.personInfo {
height: 100rpx;
position: relative;
margin-bottom: 50rpx;
}
}
.headimg {
.headimg {
margin-right: 30rpx;
}
}
.name {
.name {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
}
}
.phone {
.phone {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
}
.saleInfo {
.saleInfo {
/* width: 200rpx; */
height: 66rpx;
background-color: #00acf9;
......@@ -433,23 +419,23 @@ export default {
padding: 0 20rpx;
font-family: PingFang SC;
color: #ffffff;
}
}
.saleInfo .info1 {
.saleInfo .info1 {
text-align: center;
font-size: 22rpx;
font-weight: bold;
}
}
.saleInfo .info2 {
.saleInfo .info2 {
font-size: 20rpx;
}
}
.baseInfo {
.baseInfo {
margin-bottom: 10rpx;
}
}
.baseInfo_item {
.baseInfo_item {
width: 220rpx;
height: 140rpx;
border-radius: 20rpx;
......@@ -457,28 +443,28 @@ export default {
padding: 38rpx 20rpx;
margin-right: 15rpx;
margin-bottom: 30rpx;
}
}
.baseInfo .baseInfo_item:nth-child(3n) {
.baseInfo .baseInfo_item:nth-child(3n) {
margin-right: 0rpx;
}
}
.baseInfo_name {
.baseInfo_name {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
margin: -7rpx 0 3rpx 0;
}
}
.baseInfo_desc {
.baseInfo_desc {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333e52;
}
}
.timetable {
.timetable {
height: 360rpx;
background-image: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coursebg.png");
background-size: cover;
......@@ -489,52 +475,52 @@ export default {
box-sizing: border-box;
padding: 30rpx 30rpx 0 50rpx;
margin-bottom: 50rpx;
}
}
.timetable_item {
.timetable_item {
color: #fff;
margin-bottom: 20rpx;
}
}
.timetable_title {
.timetable_title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
}
}
.timetable_btn {
.timetable_btn {
font-size: 24rpx;
font-family: PingFang SC;
/* font-weight: 500; */
}
}
.timetable_item2 {
.timetable_item2 {
color: #fff;
margin-bottom: 20rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
}
}
/deep/.title {
/deep/.title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 800;
color: #0f1b35;
}
}
/deep/.value {
/deep/.value {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333f53;
}
}
/deep/.van-cell {
/deep/.van-cell {
padding: 0;
}
}
.mytest {
.mytest {
width: 720rpx;
height: 250rpx;
margin-top: 30rpx;
......@@ -542,9 +528,9 @@ export default {
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
transition: all 0.5s;
}
}
.test-item {
.test-item {
width: 620rpx;
height: 250rpx;
box-sizing: border-box;
......@@ -559,23 +545,24 @@ export default {
padding-top: 60rpx;
padding-left: 44rpx;
position: relative;
}
}
.testName {
.testName {
font-size: 40rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
margin-bottom: 20rpx;
}
}
.testTime {
.testTime {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #0f1b35;
}
.teacherInfo-bg {
}
.teacherInfo-bg {
position: absolute;
left: 0;
bottom: 0;
......@@ -584,8 +571,9 @@ export default {
background-image: linear-gradient(90deg, #000000, #ffffff);
opacity: 0.4;
z-index: 1;
}
.teacherInfo {
}
.teacherInfo {
position: absolute;
left: 0;
bottom: 0;
......@@ -594,37 +582,45 @@ export default {
z-index: 2;
box-sizing: border-box;
padding: 0 30rpx;
}
.teacherName {
}
.teacherName {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
margin-left: 10rpx;
}
.test-status {
}
.test-status {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
/* color: #00acf9; */
}
.status-blue {
}
.status-blue {
color: #00acf9;
}
.status-green {
}
.status-green {
color: #00df9f;
}
.status-black {
}
.status-black {
color: #111111;
}
.status-red {
}
.status-red {
color: #ff3816;
}
.LearningGarden {
}
.LearningGarden {
box-sizing: border-box;
margin-bottom: 10rpx;
}
.LearningGarden-item {
}
.LearningGarden-item {
width: 330rpx;
height: 140rpx;
border-radius: 20rpx;
......@@ -633,75 +629,88 @@ export default {
box-sizing: border-box;
padding: 30rpx 20rpx;
position: relative;
}
.LearningGarden .LearningGarden-item:nth-child(2n) {
}
.LearningGarden .LearningGarden-item:nth-child(2n) {
margin-right: 0rpx !important;
}
.LearningGarden-item-name {
}
.LearningGarden-item-name {
width: 220rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
}
.LearningGarden-item-desc {
}
.LearningGarden-item-desc {
width: 220rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333e52;
margin-top: 10rpx;
}
.LearningGarden-item-img {
}
.LearningGarden-item-img {
width: 64rpx;
height: 66rpx;
position: absolute;
top: 38rpx;
right: 20rpx;
}
.feedback {
}
.feedback {
margin: 30rpx 0;
}
.feedback-info {
}
.feedback-info {
height: 60rpx;
}
.info-headimg {
}
.info-headimg {
width: 60rpx;
height: 60rpx;
background-color: #c4a1a1;
border-radius: 50%;
margin-right: 20rpx;
}
.teacher-name {
}
.teacher-name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.feedback-all {
}
.feedback-all {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.feedback-text {
}
.feedback-text {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #111111;
margin: 20rpx 0;
}
.feedback-img {
}
.feedback-img {
width: 210rpx;
height: 210rpx;
border-radius: 20rpx;
background-color: #eee;
margin-right: 30rpx;
}
.feedback-img:nth-child(3n) {
}
.feedback-img:nth-child(3n) {
margin-right: 0rpx !important;
}
.layer {
}
.layer {
width: 210rpx;
height: 210rpx;
background-color: #cbd9ed;
......@@ -709,5 +718,46 @@ export default {
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
}
.activeContent {
width: 100%;
height: 250rpx;
border-radius: 20rpx;
margin-bottom: 30rpx;
overflow: hidden;
}
.swiperList {
position: relative;
width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
box-sizing: border-box;
overflow: hidden;
color:#fff;
border-radius: 20rpx;
}
.swiper_Time{
position: absolute;
top:20rpx;
right:40rpx;
}
.swiper_Name {
position: absolute;
bottom: 45rpx;
left: 30rpx;
}
/* .swiper /deep/ .wx-swiper-dots{
position: relative;
right:-380px;
top:20px;
} */
.swiper /deep/ .wx-swiper-dot{
width:10rpx;
height:10rpx;
margin-right:0;
}
</style>
//请求电商接口
let host = ''
if (process.env.NODE_ENV === "development") {
host = 'http://192.168.20.17:8014/api'
host = 'http://192.168.20.24:8200/api'
} else {
host = "https://mallapi.oytour.com/api"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment