Commit 0c211d95 authored by 罗超's avatar 罗超

1

parent ce6bbf99
......@@ -69,7 +69,7 @@ export default {
startIndex: Number,
},
setup(props, context) {
let { ctx } = getCurrentInstance();
let { proxy } = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
......@@ -106,9 +106,9 @@ export default {
}
},
sendData(item1) {
if(item1.Answer&&item1.Answer!=''){
if (item1.Answer && item1.Answer != "") {
item1.IsRes = true;
}else{
} else {
item1.IsRes = false;
}
context.emit("answerChange", data.data);
......
......@@ -205,7 +205,7 @@ export default {
};
},
onLoad(options) {
let { ctx } = getCurrentInstance();
let { proxy } = getCurrentInstance();
let data = JSON.parse(decodeURIComponent(options.data));
let n = 0;
data.DataObj.LeaveInfoList.map((item) => {
......@@ -214,9 +214,9 @@ export default {
uni.setNavigationBarTitle({
title: "请假详情",
});
ctx.data.detail = data;
ctx.data.detail.hours = n;
ctx.getDetail(data.Id);
proxy.data.detail = data;
proxy.data.detail.hours = n;
proxy.getDetail(data.Id);
},
};
</script>
......
......@@ -42,11 +42,11 @@ export default {
uni.setNavigationBarTitle({
title: "章节学习内容",
});
let { ctx } = getCurrentInstance();
let { proxy } = getCurrentInstance();
let data = JSON.parse(decodeURIComponent(options.con));
ctx.data.node = data;
ctx.data.richText = decodeURIComponent(data.ChapterContent);
console.log(44, ctx.data.node);
proxy.data.node = data;
proxy.data.richText = decodeURIComponent(data.ChapterContent);
console.log(44, proxy.data.node);
},
};
</script>
......
......@@ -102,9 +102,9 @@ export default {
uni.setNavigationBarTitle({
title: "课程",
});
let { ctx } = getCurrentInstance();
ctx.msg.CourseId = options.id;
ctx.getdata();
let { proxy } = getCurrentInstance();
proxy.msg.CourseId = options.id;
proxy.getdata();
},
};
</script>
......
......@@ -256,11 +256,11 @@ export default {
};
},
onLoad(options) {
let { ctx } = getCurrentInstance();
ctx.msg.StartTime = getToday();
ctx.msg.EndTime = getToday();
ctx.msg.ClassId = JSON.parse(options.classId);
ctx.getData();
let { proxy } = getCurrentInstance();
proxy.msg.StartTime = getToday();
proxy.msg.EndTime = getToday();
proxy.msg.ClassId = JSON.parse(options.classId);
proxy.getData();
},
};
</script>
......
......@@ -98,7 +98,11 @@
</van-cell>
</van-cell-group>
<view class="mytest flex">
<view v-if="indexData.paperList.length == 0"
><van-empty description="暂无数据"
/></view>
<view
v-if="indexData.paperList.length > 0"
v-for="(item, index) in indexData.paperList"
:key="index"
class="test-item no_shrink"
......@@ -163,8 +167,8 @@ export default {
props: {},
components: {},
setup(props) {
let { ctx } = getCurrentInstance();
ctx.$isLogin();
let { proxy } = getCurrentInstance();
proxy.$isLogin();
let data = reactive({
statusBarHeight: 0,
userinfo: {},
......@@ -189,14 +193,14 @@ export default {
desc: "上到哪里了",
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon4.png",
bgcolor: "#FFEFE4",
jumpUrl: "/pages/progress/progress",
jumpUrl: `/pages/progress/progress`,
},
{
name: "剩余课时",
desc: "100",
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon3.png",
bgcolor: "#FFEAFE",
jumpUrl: "/pages/surplusTime/surplusTime",
jumpUrl: `/pages/surplusTime/surplusTime`,
},
{
name: "电子合同",
......
......@@ -61,7 +61,7 @@ import {
onMounted,
} from "vue";
import { getProgress } from "../../api/index";
let { CourseName } = uni.getStorageSync("indexData");
import { getIndexInfo } from "../../api/index";
export default {
setup() {
let data = reactive({
......@@ -83,7 +83,7 @@ export default {
],
},
],
CourseName,
CourseName: "",
});
let methods = {
openLayer() {
......@@ -97,6 +97,12 @@ export default {
data.data = res.Data;
console.log(113, data);
},
async getIndexdata() {
let res = await getIndexInfo();
if (res) {
data.CourseName = res.Data.CourseName;
}
},
};
return {
...toRefs(data),
......@@ -107,9 +113,9 @@ export default {
uni.setNavigationBarTitle({
title: "进度",
});
let { ctx } = getCurrentInstance();
ctx.msg.ClassId = parseInt(options.id);
ctx.getData();
this.msg.ClassId = parseInt(options.id);
this.getData();
this.getIndexdata();
},
};
</script>
......
......@@ -76,13 +76,13 @@ import {
onMounted,
} from "vue";
import { getStundentSurplus } from "../../api/index";
let { CourseName, SurplusHours } = uni.getStorageSync("indexData");
import { getIndexInfo } from "../../api/index";
export default {
setup() {
let data = reactive({
showLayer: false,
CourseName,
SurplusHours,
CourseName: "",
SurplusHours: 0,
msg: { ClassId: 0 },
data: [],
});
......@@ -99,6 +99,13 @@ export default {
data.data = res.Data;
}
},
async getIndexdata() {
let res = await getIndexInfo();
if (res) {
data.CourseName = res.Data.CourseName;
data.SurplusHours = res.Data.SurplusHours;
}
},
};
return {
...toRefs(data),
......@@ -109,9 +116,9 @@ export default {
uni.setNavigationBarTitle({
title: "剩余时间",
});
let { ctx } = getCurrentInstance();
ctx.msg.ClassId = parseInt(options.id);
ctx.getData();
this.msg.ClassId = parseInt(options.id);
this.getData();
this.getIndexdata();
},
};
</script>
......
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