Commit 2a24d8e8 authored by 罗超's avatar 罗超

1

parent ca5477bc
......@@ -90,7 +90,7 @@ export function getStundentSurplus(data) {
*/
export function setStudentLeave(data) {
return request({
url: '/AppletIndex/SetStudentLeave',
url: '/LeaveStudent/SetStudentLeave',
method: 'post',
data
})
......
......@@ -8,17 +8,23 @@
width="58rpx"
height="66rpx"
fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.png"
/>
</view>
<view class="top-right flex_grow">
<view class="course-name"> 合同 </view>
<view class="course-name"> {{ CourseName }} </view>
<view class="section-name"> {{ data.length }}个合同 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index" class="data-item">
<view class="contract-name"
><van-icon name="description" style="margin-right: 10rpx" />
<view class="contract-name">
<van-image
width="22rpx"
height="24rpx"
fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contracticon.png"
style="margin-right: 10rpx"
/>
{{ item.ContractNo }}</view
>
<view class="contract-con" v-if="item.Type === 1">订单合同</view>
......@@ -48,16 +54,17 @@ import {
onMounted,
} from "vue";
import { getContract } from "../../api/index";
let { CourseName } = uni.getStorageSync("indexData");
export default {
setup() {
let data = reactive({
pageloading: false,
CourseName,
data: [],
});
let methods = {
async getdata() {
let res = await getContract({});
if (res) {
if (res.Data.length === 0) {
data.pageloading = true;
......
This diff is collapsed.
......@@ -11,8 +11,8 @@
/>
</view>
<view class="top-right flex_grow">
<view class="course-name"> 0到N3直通车(公司内部班) </view>
<view class="section-name"> 下面内容章节 </view>
<view class="course-name"> {{ CourseName }} </view>
<view class="section-name"> {{ data.length }}章节 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index">
......@@ -64,6 +64,7 @@ import {
inject,
} from "vue";
import { getCourse } from "../../api/index";
let { CourseName } = uni.getStorageSync("indexData");
export default {
setup() {
let data = reactive({
......@@ -71,6 +72,7 @@ export default {
msg: {
CourseId: 0,
},
CourseName,
});
let methods = {
jumpPage(item) {
......
......@@ -43,8 +43,11 @@
<van-button
custom-class="already-leave-btn one_line"
v-if="item.IsLeave === 0"
>已请假</van-button
>
<view v-if="item.IsCheck === -1">去上课</view>
<view v-if="item.IsCheck === 0">正常</view>
<view v-if="item.IsCheck === 1">缺勤</view>
</van-button>
</view>
</view>
</view>
......@@ -73,7 +76,6 @@ export default {
});
},
};
console.log(57, props);
return {
...toRefs(props),
...methods,
......
......@@ -172,14 +172,14 @@ export default {
{
name: "电子合同",
desc: "5个",
img: "https://img.yzcdn.cn/vant/cat.jpeg",
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.png",
bgcolor: "#D9FAF1",
jumpUrl: "/pages/contract/contract",
},
{
name: "我的老师",
desc: "李琴",
img: "https://img.yzcdn.cn/vant/cat.jpeg",
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon6.png",
bgcolor: "#FFE7E6",
jumpUrl: "",
},
......@@ -235,9 +235,7 @@ export default {
getSystemInfo((res) => {
data.statusBarHeight = res.statusBarHeight;
});
data.userinfo = uni.getStorageSync("userInfo");
console.log("tag", data.userinfo);
data.userinfo.EnterPhone2 = desensitization(
data.userinfo.EnterPhone,
3,
......@@ -358,17 +356,20 @@ export default {
.timetable {
height: 360rpx;
background-image: linear-gradient(0deg, #ffffff, #00adfd);
background-image: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coursebg.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
border-radius: 20rpx;
overflow: hidden;
box-sizing: border-box;
padding: 33rpx 30rpx 0 50rpx;
padding: 30rpx 30rpx 0 50rpx;
margin-bottom: 50rpx;
}
.timetable_item {
color: #fff;
margin-bottom: 25rpx;
margin-bottom: 20rpx;
}
.timetable_title {
......@@ -385,7 +386,7 @@ export default {
.timetable_item2 {
color: #fff;
margin-bottom: 25rpx;
margin-bottom: 20rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
......
......@@ -11,8 +11,8 @@
/>
</view>
<view class="top-right flex_grow">
<view class="course-name"> 0到N3直通车(公司内部班) </view>
<view class="section-name"> 下面内容章节 </view>
<view class="course-name"> {{ CourseName }} </view>
<view class="section-name"> {{ data.length }}章节 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index">
......@@ -44,37 +44,6 @@
</view>
</view>
</view>
<!-- 章节内容 -->
<!-- <van-overlay :show="showLayer">
<view class="wrapper">
<view class="info">
<view class="info-top flex flex_start_center">
<view class="left-icon"></view>
<view class="wrapper-title"> 第一次课 五十音图 </view>
</view>
<view class="info-main">
<view class="flex flex flex_start_center wrapper-section">
<view class="left-bot"></view>
章节学习内容
</view>
<view class="info-con">
1、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
2、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
3、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
4、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
</view>
<view class="Know-btn flex flex_center_center" @click="closeLayer">
我知道了
</view>
</view>
</view>
</view>
</van-overlay> -->
<van-toast id="van-toast" />
</view>
</template>
......@@ -91,6 +60,7 @@ import {
onMounted,
} from "vue";
import { getProgress } from "../../api/index";
let { CourseName } = uni.getStorageSync("indexData");
export default {
setup() {
let data = reactive({
......@@ -112,6 +82,7 @@ export default {
],
},
],
CourseName,
});
let methods = {
openLayer() {
......
......@@ -11,8 +11,8 @@
/>
</view>
<view class="top-right flex_grow">
<view class="course-name"> 0到N3直通车(公司内部班) </view>
<view class="section-name"> 下面内容章节 </view>
<view class="course-name"> {{ CourseName }} </view>
<view class="section-name"> {{ SurplusHours }}课时 </view>
</view>
</view>
<van-empty description="暂无内容" v-if="data.length === 0" />
......@@ -31,10 +31,9 @@
width="18rpx"
height="22rpx"
fit="cover"
:src="item.UserIcon"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/user.png"
style="margin-right: 10rpx"
/>
<!-- https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/user.png -->
<text class="mr-30 teacherName">{{ item.TeacherName }}</text>
<van-image
width="24rpx"
......@@ -77,10 +76,13 @@ import {
onMounted,
} from "vue";
import { getStundentSurplus } from "../../api/index";
let { CourseName, SurplusHours } = uni.getStorageSync("indexData");
export default {
setup() {
let data = reactive({
showLayer: false,
CourseName,
SurplusHours,
msg: { ClassId: 0 },
data: [],
});
......
......@@ -9,16 +9,54 @@ export let getSystemInfo = (callback) => {
//脱敏
export let desensitization = (str, beginLen, endLen) => {
let len = str.length;
let firstStr = str.substr(0, beginLen);
let lastStr = str.substr(endLen);
let middleStr = str.substring(beginLen, len - Math.abs(endLen)).replace(/[\s\S]/ig, '*');
let tempStr = firstStr + middleStr + lastStr;
return tempStr;
}
export let upload = (file, successCallback) => {
let { UploadConfig } = uni.getStorageSync('userInfo')
for (let i = 0; i < file.length; i++) {
urlTobase64(file[i].url, (base64Str) => {
console.log(23, base64Str)
uni.uploadFile({
url: UploadConfig.UploadDomain + "/UploadBase64",
filePath: base64Str,
name: 'myfile',
success(res) {
successCallback(res.data)
},
fail(err) {
console.log("uploadErr", err)
}
});
})
}
}
// let strTobase64 = (str) => {
// var buf = new ArrayBuffer(str.length * 2);
// var bufView = new Uint16Array(buf);
// for (var i = 0, strlen = str.length; i < strlen; i++) {
// bufView[i] = str.charCodeAt(i);
// }
// var base64 = uni.arrayBufferToBase64(buf);
// base64 = 'data:image/jpeg;base64,' + base64;
// return base64;
// }
let urlTobase64 = (file, suc) => {
uni.getFileSystemManager().readFile({
filePath: file, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success: (res) => { //成功的回调
let data = res.data;
let base64 = 'data:image/png;base64,' + data
suc(base64);
}
});
}
\ No newline at end of file
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