Commit 4aca0cfa authored by 黄奎's avatar 黄奎

页面, 修改

parent 2e197983
......@@ -3,132 +3,65 @@
<view class="course-item">
<view style="width:287rpx;">
<view class="course-name">
成都2022科学益智L4-05乐思会
{{stuCourseList[0].CourseName}}
</view>
<van-progress percentage="75" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<van-progress percentage="75" :show-pivot="false" track-color="#EFEFEF" color="#282828" stroke-width="5" />
<view class="course-progress">
上课进度 5/12
上课进度 {{stuCourseList[0].CompleteNum}}/{{stuCourseList[0].TotalClassNum}}
</view>
<view class="course-opera">
<van-button @click="exchangeItemHandler" class-prefix="iconfont" icon=" icon-qiehuan1" round type="default" size="mini"
custom-style="color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;">切换课程
custom-style="color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;">切换课程
</van-button>
</view>
</view>
<image class="illustration"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png"
mode="widthFix"></image>
<template v-if="stuCourseList[0].CoverImg">
<image class="illustration" :src="stuCourseList[0].CoverImg" mode="widthFix"></image>
</template>
<template v-else>
<image class="illustration" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png"
mode="widthFix"></image>
</template>
</view>
<image class="end"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png"
mode="widthFix"></image>
<van-popup
:show="showItems"
round
position="bottom"
@click-overlay="hideExchangeBoxHandler"
custom-style="height: 60%"
>
<image class="end" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png"
mode="widthFix"></image>
<van-popup :show="showItems" round position="bottom" @click-overlay="hideExchangeBoxHandler" custom-style="height: 60%">
<view class="exchange-items">
<view class="title-box">
<text class="main-title">课程选择</text>
<text class="sub-title">(共有3门课程)</text>
<text class="sub-title">(共有{{stuCourseList.length}}门课程)</text>
</view>
<view class="items">
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
<template v-for="(item,index) in stuCourseList">
<view class="item-course">
<view class="course-pic">
<image v-if="item.CoverImg" :src="item.CoverImg" mode="aspectFill"></image>
<image v-else src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
<view class="content">
<view class="one_line course-name">
{{item.CourseName}}
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828" stroke-width="5" />
<view class="course-progress">
上课进度 {{item.CompleteNum}}/{{item.TotalClassNum}}
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini" custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
</van-popup>
</view>
</template>
<script>
......@@ -143,18 +76,18 @@
onMounted,
} from "vue";
export default {
props: {},
setup() {
props: ["stuCourseList"],
setup(props, context) {
let data = reactive({
statusBarHeight: 24,
showItems:false
showItems: false
});
let methods={
exchangeItemHandler(){
data.showItems=true
let methods = {
exchangeItemHandler() {
data.showItems = true
},
hideExchangeBoxHandler(){
data.showItems=false
hideExchangeBoxHandler() {
data.showItems = false
}
}
return {
......@@ -215,8 +148,9 @@
.course-card .course-item .course-opera {
margin-top: 20rpx;
}
.course-card .exchange-items{
padding:50rpx 0;
.course-card .exchange-items {
padding: 50rpx 0;
padding-bottom: 0;
height: 100%;
box-sizing: border-box;
......@@ -224,59 +158,69 @@
flex-direction: column;
background: #F6F6F6;
}
.course-card .exchange-items .title-box{
padding:0 50rpx;
.course-card .exchange-items .title-box {
padding: 0 50rpx;
}
.course-card .exchange-items .title-box .main-title{
.course-card .exchange-items .title-box .main-title {
font-size: 36rpx;
font-weight: 800;
color:#282828;
color: #282828;
}
.course-card .exchange-items .title-box .sub-title{
.course-card .exchange-items .title-box .sub-title {
font-size: 26rpx;
font-weight: normal;
color:#6F6F6F;
color: #6F6F6F;
margin-left: 10rpx;
}
.course-card .exchange-items .items{
.course-card .exchange-items .items {
width: 100%;
flex:1;
overflow-y:auto;
margin-top:40rpx;
padding:0 50rpx;
flex: 1;
overflow-y: auto;
margin-top: 40rpx;
padding: 0 50rpx;
box-sizing: border-box;
}
.course-card .exchange-items .items .item-course{
.course-card .exchange-items .items .item-course {
margin-bottom: 50rpx;
padding:40rpx 36rpx;
padding: 40rpx 36rpx;
display: flex;
align-items: flex-start;
background-color: #FFF;
border-radius: 30rpx;
}
.course-card .exchange-items .items .item-course .course-pic{
.course-card .exchange-items .items .item-course .course-pic {
width: 100rpx;
height: 140rpx;
margin-right: 36rpx;
overflow: hidden;
}
.course-card .exchange-items .items .item-course .course-pic image{
width:100%;
.course-card .exchange-items .items .item-course .course-pic image {
width: 100%;
height: 100%;
}
.course-card .exchange-items .items .item-course .content{
flex:1;
.course-card .exchange-items .items .item-course .content {
flex: 1;
width: 1px;
}
.course-card .exchange-items .items .item-course .content .course-name{
.course-card .exchange-items .items .item-course .content .course-name {
font-size: 30rpx;
font-weight: bold;
color: #282828;
line-height: 42rpx;
margin-bottom: 20rpx;
}
.course-card .exchange-items .items .item-course .content .course-progress{
.course-card .exchange-items .items .item-course .content .course-progress {
color: #282828;
font-weight: 400;
font-size: 20rpx;
......
......@@ -8,19 +8,19 @@
</view>
<view class="index-header-tetx">
<view class="index-header-title">
welcome {{userData}}
welcome
</view>
<view class="index-header-name">周一围</view>
<view class="index-header-name">{{userData.AccountName}}</view>
</view>
</view>
</navbar>
<view style="margin: 40rpx 0 10rpx 0;">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;">
<view style="font-size: 36rpx;">Hello,</view>
<view style="font-size: 36rpx;">Hello,{{userData.AccountName}}</view>
<view style="font-size: 50rpx;">您的学情反馈已准备好</view>
</view>
</view>
<course-card></course-card>
<course-card :stuCourseList="stuCourseList"></course-card>
<view class="index-student-title flex">
<text>考情详情</text>
<view>(共53条)</view>
......@@ -61,11 +61,6 @@
import navbar from '../../components/navbar.vue'
import bottom from '../../components/bottom.vue'
export default {
// data(){
// return{
// }
// }
components: {
indexassembly,
navbar,
......@@ -80,25 +75,11 @@
proxy
} = getCurrentInstance();
let data = reactive({
ActiveMsg: {
pageIndex: 1,
pageSize: 10,
ActivityType: 0,
SelectIsEnd: 0,
},
ActivityList: [],
pageData: {
LearningGardenList: []
},
SurveyObj:{
ActivitySurveyId:0,
ActivitySurveyGuestId:0,
},
userData: {}
stuCourseList: [],//学员课程列表
userData: {},//用户信息
});
let methods = {
jumpPage(url) {
uni.navigateTo({
url: url,
......@@ -109,10 +90,7 @@
url: '/pages/timetable/timeTable',
})
},
//跳转至详情
goActiveDetail(Id) {
// this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`);
},
base64_decode(data) {
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var o1,
......@@ -149,89 +127,14 @@
}
} while (i < data.length);
dec = tmp_arr.join("");
//dec = utf8_decode(dec);
return dec;
},
//{"cmd":"checkin","params":{"classId":0,"ClassDate":"2022-4-19","ClassRoomId":27,
//"School_Id":0,"TeacherId":8,"CheckStatus":0,"StudyNum":"90","ClassTimeId":16531}}
scan() {
//调起条码扫描
console.log("进来了")
let that = this
uni.scanCode({
scanType: ['qrCode'],
success: function(res) {
// 解码
var saveObj={};
try {
saveObj = that.base64_decode(res.result)
// console.log(saveObj)
} catch (e) {
//TODO handle the exception
// console.log(e)
}
var jsonObj= JSON.parse(saveObj)
if(jsonObj.cmd =="checkin"){
var userData = uni.getStorageSync('userInfo');
console.log("userData",userData);
jsonObj.params.StuId=userData.AccountId;
var array=[];
array.push(jsonObj.params);
console.log("jsonObj.params",jsonObj.params)
let result = getSweepCode(array);
if (result) {
// console.log(result)
if (result.Code == 1) {
console.log('扫码成功')
uni.navigateTo({
url:'./success',
})
}else{
console.log('扫码失败')
uni.navigateTo({
url: './fail'
})
}
}
}
},
});
},
async getActivityData() {
// let res = await getActivityList(data.ActiveMsg);
// if (res.resultCode == 1) {
// data.ActivityList = res.data.pageData;
// }
return dec;
},
getIndexData() {
//获取学员课程列表
getStuCourse() {
proxy.$request("/Stu/GetStuCourse", {}).then(res => {
data.pageData = res.Data
uni.setStorageSync("indexData", res.Data);
data.SurveyObj.ActivitySurveyId=res.Data.ActivitySurveyId;
data.SurveyObj.ActivitySurveyGuestId=res.Data.ActivitySurveyGuestId;
if (data.pageData.LearningGardenList.length > 0) {
data.pageData.LearningGardenList.forEach((x, y) => {
if (x.List.length > 0) {
x.List.forEach(async (item, index) => {
await this.getColor(item.Img, index, y).then(v => {
data.pageData.LearningGardenList[v.y]
.List[
v.index].bgcolor = v.formatres;
data.pageData.LearningGardenList[v.y]
.List[
v.index].bgcolor1 = v
.formatres1;
data.pageData.LearningGardenList[v.y]
.List[
v.index].bgcolor2 = v
.formatres2;
})
})
}
})
}
data.stuCourseList = res.Data;
//console.log("data.stuCourseList",this.stuCourseList)
})
},
async getColor(src, index, y) {
......@@ -244,33 +147,6 @@
obj.y = y
return obj
},
againdata() {
data.userData = uni.getStorageSync('userInfo');
methods.getIndexData();
methods.getActivityData();
},
jumpGarden(id) {
if (id == 1) {
uni.navigateTo({
url: "/pages/learningGarden/learningGardenList"
})
} else if (id == 2) {
// uni.navigateTo({
// url:"/pages/learningGarden/learningGardenList"
// })
}
},
jumpJiahemini() {
let userinfo = uni.getStorageSync('userInfo');
wx.navigateToMiniProgram({
appId: 'wx38e054ee42b054f4',
path: '', //为空则打开首页
extraData: {
Id: userinfo.Id || 0
}
})
}
};
onMounted(() => {
......@@ -282,8 +158,7 @@
};
},
onShow() {
this.getActivityData();
this.getIndexData();
this.getStuCourse();
this.userData = uni.getStorageSync('userInfo');
},
onShareAppMessage() {
......
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