Commit 8c12371c authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/youjie/thinkapp

parents b38307c4 dba62eab
<script>
export default {
onLaunch() {
// console.log('App Launch')
onLaunch() {
//调用定义的更新方法
// this.VersionUpdate();
},
onShow() {
// console.log('App Show')
......@@ -12,6 +13,63 @@ export default {
onHide() {
// console.log('App Hide')
},
methods:{
//定义更新方法
VersionUpdate() {
// 判断应用的 getUpdateManager 是否在当前版本可用
if (uni.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
// 向小程序后台请求完新版本信息
updateManager.onCheckForUpdate(function(res) {
if (res.hasUpdate) {
//小程序有新版本,静默下载新版本,新版本下载完成
updateManager.onUpdateReady(function() {
//模态弹窗(确认、取消)
uni.showModal({
title: '更新提示',
content: '小程序已发布新版本,是否重启?',
success: function(res) {
//用户点击确定
if (res.confirm) {
//当新版本下载完成,调用该方法会强制当前小程序应用上新版本并重启
updateManager.applyUpdate()
} //用户点击取消
else if (res.cancel) {
//强制用户更新,弹出第二次弹窗
uni.showModal({
title: '提示',
content: '小程序已发布新版本,是否重启',
showCancel: false, //隐藏取消按钮
success: function(res) {
//第二次提示后,强制更新
if (res.confirm) {
// 当新版本下载完成,调用该方法会强制当前小程序应用上新版本并重启
updateManager.applyUpdate()
}
}
})
}
}
})
})
// 当新版本下载失败
updateManager.onUpdateFailed(function() {
uni.showModal({
title: '提示',
content: '请您删除当前小程序,重新打开小程序',
})
})
}
})
} else {
// 提示用户在最新版本的客户端上体验
uni.showModal({
title: '温馨提示',
content: '当前微信版本过低,可能无法使用该功能,请升级到最新版本后重试。'
})
}
}
}
};
</script>
......
......@@ -174,7 +174,7 @@
queryTecherCourse(){
getTeacherCourse().then(r=>{
data.courses=r.Data
data.titleList[0].data=r.Data.AllCourseList.reverse()
data.titleList[0].data=r.Data.AllCourseList;
data.titleList[1].data=r.Data.NotFinishList
data.titleList[2].data=r.Data.FinishList
data.currentCourse=r.Data.AllCourseList.length>0?r.Data.AllCourseList[0]:null
......
......@@ -5,7 +5,7 @@
<van-icon class="commentPopup-closure" name="cross" @click="closepopup" />
<view class="commentPopup-title">修改评语</view>
<view class="commentPopup-content">
<textarea placeholder="请填写评语内容" v-model="stuCommentObj.Info"></textarea>
<textarea placeholder="请填写评语内容" v-model="stuCommentObj.Info" maxlength="-1"></textarea>
</view>
<view class="commentPopup-save flex">
......
......@@ -13,7 +13,8 @@
</view>
</view>
<view class="RuleSettings-content">
<textarea placeholder="请填写评论内容" v-model="ruleObj.Info"></textarea>
<!-- <van-field v-model="ruleObj.Info" rows="10"/> -->
<textarea placeholder="请填写评论内容" v-model="ruleObj.Info" maxlength="-1"></textarea>
</view>
<view class="rulesPopup-save flex">
<van-loading color="#f5f5f5" v-if="loading" />
......
......@@ -9,7 +9,7 @@
<view class="setComments-content" @click="goComment(item)">
<view class="center-line"></view>
<view class="setComments-title flex">
<text class="setComments-title-left">{{item.Times}}次评价</text>
<text class="setComments-title-left">{{item.Title}}</text>
<view class="setComments-title-right">
<view class="setComments-options flex">
<view class="setComments-options-title flex" @click.stop="showActionHandler(item)">
......@@ -57,7 +57,7 @@
} from "vue";
import navbar from '../../components/navbar.vue'
export default {
props: ["CourseCommentTimesList","courseId"],
props: ["CourseCommentTimesList","courseId","courseName"],
emits: ['refreshData'],
components: {
navbar,
......@@ -76,7 +76,7 @@
addComments(){
console.log(props.courseId)
uni.navigateTo({
url: '/pages/setComments/teacher-commit?courseId=' + props.courseId
url: '/pages/setComments/teacher-commit?courseId=' + props.courseId +'&courseName=' + props.courseName
})
},
showActionHandler(item){
......@@ -100,11 +100,11 @@
// item.optionsShow = !item.optionsShow;
// },
clickoptions(type) {
console.log("data.currentAction",data.currentAction);
let showTypeMsg = {
CourseId: data.currentAction.CourseId,
Times: data.currentAction.Times,
ShowType: type
CommentMainId: data.currentAction.Id,
ShowType: type,
};
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res.Code==1) {
......
<template>
<view class="signOut-box" @click="signOut">
<view class="index-header-signOut flex">
<van-image width="72rpx" height="72rpx" fit="cover" class="img"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654580469000_635.png" />
<text>退出登录</text>
</view>
</view>
</template>
<script>
import { reactive, toRefs, onMounted } from "vue";
export default {
name: "",
props: {
},
components: {},
setup(props) {
let data = reactive({
});
let methods = {
signOut(){
uni.showModal({
title: '提示',
content: '将退出登录,是否继续',
success: function(res) {
if (res.confirm) {
uni.reLaunch({
url: '/pages/login/accountLogin'
});
uni.removeStorageSync('userInfo')
} else if (res.cancel) {
}
}
});
}
};
onMounted(() => {
});
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.index-header-signOut text{
font-size: 26rpx;
font-weight: bold;
color: #282828;
margin-left: 20rpx;
letter-spacing: 2rpx;
}
.index-header-signOut{
align-items: center;
}
.signOut-box{
padding: 0 30rpx;
}
</style>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<page-meta :page-style="showPopu?'overflow:hidden;':''">
<view class="indexpage">
<navbar class="navbarSticky" bg="#F6F6F6">
<view class="index-header-box">
<!-- <view class="index-header-box">
<view class="index-header-img">
<van-image width="100%" height="100%" fit="cover" class="img" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png" />
</view>
......@@ -12,7 +12,8 @@
</view>
<view class="index-header-name">{{userData.AccountName}}</view>
</view>
</view>
</view> -->
<signOut></signOut>
</navbar>
<view style="margin: 40rpx 0 10rpx 0;">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;">
......@@ -47,6 +48,7 @@
import JobComponents from '@/components/index/JobComponents'
import examComponents from '@/components/index/examComponents'
import commentsComponents from '@/components/index/commentsComponents'
import signOut from "@/components/signOut";
import vue, {
ref,
reactive,
......@@ -77,7 +79,8 @@
courseCard,
JobComponents,
examComponents,
commentsComponents
commentsComponents,
signOut
},
setup(props) {
let {
......@@ -104,7 +107,6 @@
});
},
changeCourseHandler(id){
console.log(id,',,,,,,,,,,,,,')
methods.getStuHomeWorkAndExam(id)
},
getStuCourse() {
......
......@@ -2,7 +2,7 @@
<page-meta :page-style="showPopu?'overflow:hidden;':''">
<view class="workSituationpage">
<navbar class="navbarSticky" bg="#F6F6F6">
<view class="index-header-box" @click="back">
<!-- <view class="index-header-box" @click="back">
<view class="index-header-img">
<van-image width="100%" height="100%" fit="cover" class="img"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png" />
......@@ -13,7 +13,8 @@
</view>
<view class="index-header-name">{{userData.AccountName}}</view>
</view>
</view>
</view> -->
<signOut></signOut>
</navbar>
<view style="margin: 40rpx 0 10rpx 0;" class="workSituationAccountName flex">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;">
......@@ -63,6 +64,7 @@
import operation from '@/components/index/workSituation/operation'
import studentList from '@/components/index/workSituation/studentList'
import examList from '@/components/index/workSituation/examList'
import signOut from "@/components/signOut";
import vue, {
ref,
reactive,
......@@ -92,7 +94,8 @@
operation,
studentList,
examList,
Loadmore
Loadmore,
signOut
},
setup(props) {
let {
......@@ -167,8 +170,10 @@
//获取学生列表
getCourseStuList(){
data.pageState = "loading";
uni.showLoading()
proxy.$request("/Teacher/GetCourseStu", data.OperationMsg).then(res => {
if(res){
uni.hideLoading()
data.titleList.forEach(item => {
if(item.name=='学生列表'){
item.num = res.Data.length
......@@ -182,8 +187,10 @@
//获取作业情况列表
getCourseHomeWorkList(){
data.pageState = "loading";
uni.showLoading()
proxy.$request("/Teacher/GetCourseHomeWork", data.OperationMsg).then(res => {
if(res){
uni.hideLoading()
data.titleList.forEach(item => {
if(item.name=='作业情况'){
item.num = res.Data.length
......@@ -197,8 +204,10 @@
//获取考试信息列表
getExamPageList(){
data.pageState = "loading";
uni.showLoading()
proxy.$request("/Exam/GetExamPageList", data.Msg).then(res => {
if(res){
uni.hideLoading()
data.titleList.forEach(item => {
if(item.name=='考试信息'){
item.num = res.Data.RowsCount
......@@ -380,6 +389,7 @@
margin-right: 20rpx;
background: #FFFFFF;
}
.workSituationpage {
min-height: 100vh;
background-color: #f6f6f6;
......
......@@ -13,15 +13,27 @@
<view class="login-title">
账号登录
</view>
<view style="margin:60rpx auto;text-align: center;">
<view style="margin:60rpx auto;text-align: center;height: 256rpx;overflow: hidden;">
<div style="display: inline-block;" @click="changeTypeHandler(1)">
<image :class="{'login-grey-avatar':userLoginType==2}" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894192000_645.png" mode="widthFix" style="width:142rpx;"></image>
<van-image
:class="{'login-grey-avatar':userLoginType==2}"
width="142rpx"
height="142rpx"
lazy-load
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894192000_645.png"
/>
<view style="color: #282828;font-size: 24rpx;font-weight: 800;">
学员
</view>
</div>
<div style="display: inline-block;margin-left:148rpx;" @click="changeTypeHandler(2)">
<image :class="{'login-grey-avatar':userLoginType==1}" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894197000_691.png" mode="widthFix" style="width:142rpx;"></image>
<van-image
:class="{'login-grey-avatar':userLoginType==1}"
width="142rpx"
height="142rpx"
lazy-load
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894197000_691.png"
/>
<view style="color: #282828;font-size: 24rpx;font-weight: 800;">
教师
</view>
......@@ -226,6 +238,7 @@
.login-background{
position: fixed;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
background: -moz-linear-gradient(top, #C41726 0%, #831D1C 100%);
......
......@@ -41,7 +41,7 @@
<view class="addComment-textarea-box">
<view class="hotsopt" @click="expendStatus=!expendStatus"></view>
<view class="content-textarea-box">
<textarea placeholder="请填写评论内容" v-model="postMsg.Info"></textarea>
<textarea placeholder="请填写评论内容" v-model="postMsg.Info" maxlength="-1"></textarea>
</view>
</view>
<van-popup :z-index="1000" :show="show" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopup">
......
......@@ -10,7 +10,7 @@
<view class="commentDetails-index-setType flex">
<view class="commentDetails-setType-text flex">
<view>
{{topData.Times}}次评价
{{topData.Title}}
</view>
<view class="flex">
<text>{{topData.ShowTypeStr}}</text>
......@@ -77,14 +77,16 @@
checked: '1',
Msg: {
CourseId: '',
CommentTimes:1
CommentTimes:1,
CommentMainId:0,
},
courseTimeList: [],
topData:{
ShowTypeStr:"",
Times:1,
CreateTime:"",
CreateTypeStr:""
CreateTypeStr:"",
Title:"",
}
});
let methods = {
......@@ -146,8 +148,9 @@
this.topData.Times = json.Times;
this.topData.CreateTime = json.CreateTime;
this.topData.CreateTypeStr = json.CreateTypeStr;
this.topData.Title=json.Title;
this.Msg.CommentTimes = json.Times;
this.Msg.CommentMainId=json.Id;
},
onShow() {
this.getStuCommentList();
......
......@@ -146,7 +146,6 @@
},
//编辑规则
editRules(item,index) {
data.editor=index
data.show = true
},
......
......@@ -30,7 +30,7 @@
</view>
</view>
</view>
<setComments v-if="Msg.CourseId!=''" :CourseCommentTimesList="courseTimeList" :courseId="Msg.CourseId" @refreshData="getCourseCommentTimes"></setComments>
<setComments v-if="Msg.CourseId!=''" :CourseCommentTimesList="courseTimeList" :courseId="Msg.CourseId" :courseName="CourseName" @refreshData="getCourseCommentTimes"></setComments>
</view>
</view>
......
This diff is collapsed.
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