@ -1,9 +1,9 @@
|
||||
##v0.14.3
|
||||
## v0.14.3
|
||||
* F 实训文件内容获取失败(文件path错误)
|
||||
* F 个人信息性别设置bug
|
||||
* D 删除实名认证界面
|
||||
|
||||
##v0.14.2
|
||||
## v0.14.2
|
||||
* F 签到界面无权限访问提示
|
||||
* F 更改头像界面图片初次加载失败
|
||||
* F 电脑端用户界面图标及文字位置不正确
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"iconfont":"../iconfont/iconfont"
|
||||
"iconfont":"../iconfont/iconfont",
|
||||
"mp-icon": "/weui-miniprogram/icon/icon"
|
||||
},
|
||||
"navigationBarBackgroundColor": "#00b0f0",
|
||||
"navigationBarTextStyle": "white"
|
||||
|
Before Width: | Height: | Size: 457 B |
@ -1,4 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"mp-dialog": "/weui-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
<modal class="join_course" wx:if="{{!hidden}}" title="加入课堂" confirm-text="提交" cancel-text="取消" bindcancel="cancel" bindconfirm="join_course">
|
||||
<view class="input-wrap {{show_code?'':'hidden'}}">
|
||||
<input class="code-input" cursor-spacing="106" type='text' bindinput="update_invite_code" value="{{invite_code}}" placeholder="邀请码" auto-focus/>
|
||||
<image class="scan" src="./scan.png" mode="aspectFit" catchtap="scan"/>
|
||||
</view>
|
||||
<checkbox-group class="identities" bindchange="update_identities">
|
||||
<text>身份:</text>
|
||||
<checkbox class="identity" color="#00b0f0" disabled="{{assistant_professor}}" checked="{{professor}}" value="professor">教师</checkbox>
|
||||
<checkbox class="identity" color="#00b0f0" disabled="{{professor}}" checked="{{assistant_professor}}" value="assistant_professor">助教</checkbox>
|
||||
<checkbox class="identity" color="#00b0f0" checked="{{student}}" value="student">学生</checkbox>
|
||||
</checkbox-group>
|
||||
</modal>
|
||||
<mp-dialog show="{{!hidden}}" title="加入课堂" bindbuttontap="onTapButton" buttons="{{buttons}}">
|
||||
<block wx:if="{{!hidden}}">
|
||||
<view class="input-wrap {{show_code?'':'hidden'}}">
|
||||
<input class="code-input" cursor-spacing="130" type='text' bindinput="update_invite_code" value="{{invite_code}}" placeholder="邀请码" auto-focus="1" />
|
||||
<image class="scan" src="./scan.png" mode="aspectFit" catchtap="scan" />
|
||||
</view>
|
||||
<checkbox-group class="identities" bindchange="update_identities">
|
||||
<text>身份:</text>
|
||||
<checkbox class="identity" color="#00b0f0" disabled="{{assistant_professor}}" checked="{{professor}}" value="professor">教师</checkbox>
|
||||
<checkbox class="identity" color="#00b0f0" disabled="{{professor}}" checked="{{assistant_professor}}" value="assistant_professor">助教</checkbox>
|
||||
<checkbox class="identity" color="#00b0f0" checked="{{student}}" value="student">学生</checkbox>
|
||||
</checkbox-group>
|
||||
</block>
|
||||
</mp-dialog>
|
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 859 B |
After Width: | Height: | Size: 859 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 919 B |
After Width: | Height: | Size: 919 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 804 B |
After Width: | Height: | Size: 804 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
@ -1,5 +1,7 @@
|
||||
<view class="module">
|
||||
<scroll-view class="activities" scroll-y="1" lower-threshold="120" bindscrolltolower="onReachBottom">
|
||||
<view wx:for="{{activityGroups}}">
|
||||
<view wx:for="{{activityGroups}}" wx:key="index">
|
||||
<activity-group date="{{index}}" activities="{{item}}" course_identity="{{course_identity}}" course_id="{{course_id}}"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
@ -1,3 +1,6 @@
|
||||
.module{
|
||||
height: 100%;
|
||||
}
|
||||
.activities{
|
||||
background: white;
|
||||
height: 100%;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="activity-group">
|
||||
<view class="date">{{_date}}</view>
|
||||
<view class="activity-wrap" wx:for="{{activities}}">
|
||||
<view class="activity-wrap" wx:for="{{activities}}" wx:key="course_act_id">
|
||||
<activity-item data="{{item}}" course_identity="{{course_identity}}" course_id="{{course_id}}"/>
|
||||
</view>
|
||||
</view>
|
@ -1,178 +1,317 @@
|
||||
const app = getApp();
|
||||
//status:[0,401,409]
|
||||
const defaultModules=[{type:"activity", name:"课堂动态"}];
|
||||
const supportModules = ["activity", "attachment", "exercise","shixun_homework", "attendance"];
|
||||
const defaultModules = [{
|
||||
type: "activity",
|
||||
name: "课堂动态"
|
||||
}];
|
||||
const supportModules = ["activity", "attachment", "exercise", "shixun_homework", "attendance"];
|
||||
const nosupportMsgs = {
|
||||
video:"请使用网页版EduCoder"
|
||||
};
|
||||
|
||||
Component({
|
||||
properties:{
|
||||
course_id:Number,
|
||||
module_type:{
|
||||
type:String,
|
||||
observer:function(module){
|
||||
this.setModule(module,0);
|
||||
properties: {
|
||||
course_id: Number,
|
||||
module_type: {
|
||||
type: String,
|
||||
observer: function (module) {
|
||||
//this.setModule(module,0);
|
||||
}
|
||||
},
|
||||
},
|
||||
data: {
|
||||
status:0,
|
||||
refresh:0,
|
||||
nav_type:"navigateback",
|
||||
module:{
|
||||
type:"activity",
|
||||
name:"课堂动态"
|
||||
status: 0,
|
||||
refresh: 0,
|
||||
nav_type: "back",
|
||||
current:0,
|
||||
module: {
|
||||
type: "activity",
|
||||
name: "课堂动态"
|
||||
},
|
||||
tabbar_show:1,
|
||||
course: {},
|
||||
is_teacher: true,
|
||||
course_modules: [],
|
||||
hidden_modules: [] ,
|
||||
statusBarHeight:20,
|
||||
windowWidth:375,
|
||||
is_teacher: true,
|
||||
course_modules: [],
|
||||
hidden_modules: [],
|
||||
statusBarHeight: 20,
|
||||
windowWidth: 375,
|
||||
eduImgDir: global.config.eduImgDir,
|
||||
scenes:{
|
||||
401:{
|
||||
buttons:["点击登录","返回"]
|
||||
scenes: {
|
||||
401: {
|
||||
buttons: ["点击登录", "返回"]
|
||||
},
|
||||
409:{
|
||||
message:"你不是该课堂的成员",
|
||||
buttons:["加入课堂","返回"]
|
||||
409: {
|
||||
message: "你不是该课堂的成员",
|
||||
buttons: ["加入课堂", "返回"]
|
||||
},
|
||||
404:{
|
||||
message:"该课堂已经被删除了",
|
||||
buttons:["返回"]
|
||||
404: {
|
||||
message: "该课堂已经被删除了",
|
||||
buttons: ["返回"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
switchRole({target:{dataset:{role}}}){
|
||||
if(!role) return;
|
||||
app.api("courses.switch_to_"+role)({course_id: this.data.course_id})
|
||||
.then(res=>{
|
||||
this.onPullDownRefresh();
|
||||
app.showMsg(res);
|
||||
}).catch(app.showError)
|
||||
},
|
||||
setModule({type,showToast=1}){
|
||||
for(var module of this.data.course_modules){
|
||||
if(module.type==type){
|
||||
if(supportModules.indexOf(type)==-1){
|
||||
if(showToast)
|
||||
wx.showToast({
|
||||
title: `暂不支持${module.name}模块`,icon:"none"
|
||||
});
|
||||
return false;
|
||||
methods: {
|
||||
switchRole({target: { dataset: {role}}}) {
|
||||
if (!role) return;
|
||||
app.api("courses.switch_to_" + role)({
|
||||
course_id: this.data.course_id
|
||||
})
|
||||
.then(res => {
|
||||
this.onPullDownRefresh();
|
||||
app.showMsg(res);
|
||||
}).catch(app.showError)
|
||||
},
|
||||
onModuleTap({currentTarget:{dataset:{type}}}){
|
||||
if(this.setModule({type: type})){
|
||||
this.setData({showModules:0})
|
||||
}
|
||||
},
|
||||
onModuleChange({detail: {index,item}}) {
|
||||
if (item.type == "more"){
|
||||
this.setData({
|
||||
showModules: 1,
|
||||
current: this.data.current
|
||||
});
|
||||
}else
|
||||
this.setModule({
|
||||
type: item.type
|
||||
});
|
||||
},
|
||||
setModule({type,showToast = 1}) {
|
||||
for (var module of this.data.course_modules) {
|
||||
if (module.type == type) {
|
||||
if (supportModules.indexOf(type) == -1) {
|
||||
if (showToast)
|
||||
wx.showToast({
|
||||
title: nosupportMsgs[type]||`暂不支持${module.name},请使用网页版`,
|
||||
icon: "none"
|
||||
});
|
||||
this.setData({current: this.data.current});
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
module
|
||||
});
|
||||
}
|
||||
this.setData({module});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
enterShare(){
|
||||
let {course_id, course} = this.data;
|
||||
let url = `{course_invite}?course_id=${course_id}&invite_code=${course.invite_code}`;
|
||||
app.navigateTo({url});
|
||||
},
|
||||
onTapCode() {
|
||||
let { name, invite_code, code_halt} = this.data.course;
|
||||
if(!code_halt)
|
||||
wx.setClipboardData({data: `输入邀请码${invite_code}加入“${name}”吧`})
|
||||
else
|
||||
wx.showActionSheet({
|
||||
itemList: ["启用邀请码"],
|
||||
success:res=>{
|
||||
app.api("courses.set_invite_code_halt")({course_id: this.data.course_id})
|
||||
.then(res=>{
|
||||
app.showMsg(res);
|
||||
this.refresh({refresh:0});
|
||||
})
|
||||
for (var i = 0; i < this.data.list.length; i++) {
|
||||
if (this.data.list[i].type == type) {
|
||||
this.setData({
|
||||
current: i
|
||||
});
|
||||
return true;
|
||||
}
|
||||
})
|
||||
},
|
||||
switchModule({currentTarget:{dataset:{type}}}){
|
||||
let list = this.data.course_modules.filter(item=>item.type==type);
|
||||
if(list[0]&&list[0].type)
|
||||
this.setModule({type:list[0].type});
|
||||
},
|
||||
navigateBack(){
|
||||
if(this.data.nav_type=="navigateback")
|
||||
wx.navigateBack({
|
||||
delta:1
|
||||
}
|
||||
this.setData({
|
||||
current: -1
|
||||
});
|
||||
else
|
||||
app.reLaunch({
|
||||
url: '{main}',
|
||||
return true;
|
||||
},
|
||||
enterShare() {
|
||||
let {
|
||||
course_id,
|
||||
course
|
||||
} = this.data;
|
||||
let url = `{course_invite}?course_id=${course_id}&invite_code=${course.invite_code}`;
|
||||
app.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
async pullCourse(){
|
||||
let {course_id} = this.data;
|
||||
let course = await app.api("courses.top_banner")({course_id});
|
||||
this.setData({course});
|
||||
return {course};
|
||||
},
|
||||
async pullModules(){
|
||||
let { course_id } = this.data;
|
||||
let data = await app.api("courses.left_banner")({ course_id });
|
||||
data.course_modules = defaultModules.concat(data.course_modules);
|
||||
this.setData(data);
|
||||
return data;
|
||||
},
|
||||
onTapError({detail:{status, target, current}}){
|
||||
console.log(target);
|
||||
switch(status){
|
||||
case 401:
|
||||
if(current==0)
|
||||
return app.navigateTo({url:"{account}"});
|
||||
else if(current==1)
|
||||
return this.navigateBack();
|
||||
case 409:
|
||||
if(current==0)
|
||||
return this.setData({show_join_course: 1});
|
||||
else if(current==1)
|
||||
},
|
||||
onTapCode() {
|
||||
let {
|
||||
name,
|
||||
invite_code,
|
||||
code_halt
|
||||
} = this.data.course;
|
||||
if (!code_halt)
|
||||
wx.setClipboardData({
|
||||
data: `输入邀请码${invite_code}加入“${name}”吧`
|
||||
})
|
||||
else
|
||||
wx.showActionSheet({
|
||||
itemList: ["启用邀请码"],
|
||||
success: res => {
|
||||
app.api("courses.set_invite_code_halt")({
|
||||
course_id: this.data.course_id
|
||||
})
|
||||
.then(res => {
|
||||
app.showMsg(res);
|
||||
this.refresh({
|
||||
refresh: 0
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
navigateBack() {
|
||||
if (this.data.nav_type == "back")
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
else
|
||||
app.reLaunch({
|
||||
url: '{main}',
|
||||
});
|
||||
},
|
||||
async pullCourse() {
|
||||
let {
|
||||
course_id
|
||||
} = this.data;
|
||||
let course = await app.api("courses.top_banner")({
|
||||
course_id
|
||||
});
|
||||
this.setData({
|
||||
course
|
||||
});
|
||||
return {
|
||||
course
|
||||
};
|
||||
},
|
||||
async pullModules() {
|
||||
let {
|
||||
course_id
|
||||
} = this.data;
|
||||
let data = await app.api("courses.left_banner")({
|
||||
course_id
|
||||
});
|
||||
let course_modules = defaultModules.concat(data.course_modules);
|
||||
course_modules = course_modules.filter(i=>supportModules.indexOf(i.type)>-1);
|
||||
this.setData({
|
||||
course_modules
|
||||
});
|
||||
this.setTabbar({
|
||||
course_modules
|
||||
});
|
||||
return course_modules;
|
||||
},
|
||||
setTabbar({course_modules}) {
|
||||
var base = "/course/images/svg/"
|
||||
if (course_modules.length <= 5) {
|
||||
var list = course_modules.map(m => {
|
||||
return {
|
||||
type: m.type,
|
||||
text: m.name,
|
||||
selectedIconPath: base + m.type + "_select.svg",
|
||||
iconPath: base + m.type + ".svg"
|
||||
};
|
||||
})
|
||||
} else {
|
||||
var list = [];
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == 2)
|
||||
list.push({
|
||||
type: "more",
|
||||
text: "更多",
|
||||
selectedIconPath: base + "module_select.svg",
|
||||
iconPath: base + "module.svg"
|
||||
});
|
||||
else {
|
||||
var m = course_modules[i];
|
||||
list.push({
|
||||
type: m.type,
|
||||
text: m.name,
|
||||
selectedIconPath: base + m.type + "_select.svg",
|
||||
iconPath: base + m.type + ".svg"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
list
|
||||
});
|
||||
return list;
|
||||
},
|
||||
onTapError({
|
||||
detail: {
|
||||
status,
|
||||
target,
|
||||
current
|
||||
}
|
||||
}) {
|
||||
console.log(target);
|
||||
switch (status) {
|
||||
case 401:
|
||||
if (current == 0)
|
||||
return app.navigateTo({
|
||||
url: "{account}"
|
||||
});
|
||||
else if (current == 1)
|
||||
return this.navigateBack();
|
||||
case 409:
|
||||
if (current == 0)
|
||||
return this.setData({
|
||||
show_join_course: 1
|
||||
});
|
||||
else if (current == 1)
|
||||
return this.navigateBack();
|
||||
case 404:
|
||||
return this.navigateBack();
|
||||
case 404:
|
||||
return this.navigateBack();
|
||||
}
|
||||
},
|
||||
refresh({ refresh = 1 } = {}) {
|
||||
app.syncUser().then(res => {
|
||||
this.pullCourse().then(res=>{
|
||||
this.setData({ status: 200, refresh});
|
||||
}
|
||||
},
|
||||
refresh({
|
||||
refresh = 1
|
||||
} = {}) {
|
||||
app.syncUser().then(res => {
|
||||
this.pullCourse().then(res => {
|
||||
this.setData({
|
||||
status: 200,
|
||||
refresh
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
this.setData({
|
||||
status: e.code
|
||||
});
|
||||
});
|
||||
this.pullModules()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
});
|
||||
})
|
||||
.catch(e=>{
|
||||
this.setData({status:e.code});
|
||||
},
|
||||
changeTabbar({show}){
|
||||
this.setData({tabbar_show:show});
|
||||
},
|
||||
onLoad: function () {
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
let {
|
||||
statusBarHeight,
|
||||
windowWidth
|
||||
} = res;
|
||||
this.setData({
|
||||
statusBarHeight,
|
||||
windowWidth
|
||||
})
|
||||
},
|
||||
});
|
||||
this.pullModules()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
let pages = getCurrentPages();
|
||||
if (pages.length <= 1)
|
||||
this.setData({
|
||||
nav_type: "home"
|
||||
});
|
||||
})
|
||||
},
|
||||
onLoad: function () {
|
||||
wx.getSystemInfo({
|
||||
success:res=>{
|
||||
let { statusBarHeight, windowWidth} = res;
|
||||
this.setData({ statusBarHeight, windowWidth})
|
||||
},
|
||||
});
|
||||
let pages = getCurrentPages();
|
||||
if(pages.length<=1)
|
||||
this.setData({nav_type:"relaunch"});
|
||||
else
|
||||
this.setData({nav_type:"navigateback"})
|
||||
this.refresh({refresh:0});
|
||||
},
|
||||
onShow: function () {
|
||||
if(this.data.status!=200&&this.data.status!=0||this.data.status!=0){
|
||||
this.refresh();
|
||||
}
|
||||
},
|
||||
onReady:function(){
|
||||
else
|
||||
this.setData({
|
||||
nav_type: "back"
|
||||
})
|
||||
this.refresh({
|
||||
refresh: 0
|
||||
});
|
||||
},
|
||||
onShow: function () {
|
||||
if (this.data.status != 200 && this.data.status != 0 || this.data.status != 0) {
|
||||
this.refresh();
|
||||
}
|
||||
},
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
this.refresh();
|
||||
},
|
||||
onShareAppMessage: function () {
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.refresh();
|
||||
},
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
@ -1,71 +1,71 @@
|
||||
<wxs module="handler" src="./course.wxs"></wxs>
|
||||
<view class="page">
|
||||
<view class="page-bottom">
|
||||
<view class="page-content">
|
||||
<view wx:for="{{course_modules}}" bindtap="switchModule" capture-bind:tap="{{handler.hideSideBar}}" data-type="{{item.type}}" wx:key="id" class="wc">
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-top flex-col" data-width="{{windowWidth}}" bindtouchstart="{{handler.touchstart}}" bindtouchmove="{{handler.touchmove}}" bindtouchend="{{handler.touchend}}" bindtap="{{handler.hideSideBar}}">
|
||||
<view class="body flex-col">
|
||||
<view class="header" bindtouchmove="{{handler.touchmHeader}}" bindtouchstart="{{handler.touchsHeader}}">
|
||||
<view class="status-bar" style="height:{{statusBarHeight}}px"></view>
|
||||
<view class="navigation">
|
||||
<view class="nav-button" bindtap="navigateBack">
|
||||
<mp-icon icon="{{nav_type}}" size="{{nav_type=='back'?12:24}}" color="white" type="field" />
|
||||
</view>
|
||||
<text class="course-name">{{course.name}}{{module_name}}</text>
|
||||
</view>
|
||||
<view class="course-display flex-col">
|
||||
<view class="course-info-body">
|
||||
<view class="course-info flex-col">
|
||||
<view class="teacher-display">
|
||||
<image wx:if="{{course.teacher_img}}" class="teacher-img" mode="aspectFill" src="{{eduImgDir}}{{course.teacher_img}}"></image>
|
||||
<view class="teacher-name">{{course.teacher_name}}</view>
|
||||
<view class="school-name">{{course.teacher_school}}</view>
|
||||
</view>
|
||||
<view class="course-detail">
|
||||
<text>教师</text><text>{{course.teacher_count}}</text>
|
||||
<text class="sep">|</text>
|
||||
<text>学生</text><text>{{course.student_count}}</text>
|
||||
<block wx:if="{{course.credit!=null}}">
|
||||
<text class="sep">|</text>
|
||||
<text>学分</text><text>{{course.credit}}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="course-buttons color-main" bindtap="switchRole">
|
||||
<button wx:if="{{course.switch_to_student}}" size="mini" data-role="student">切换为学生</button>
|
||||
<button wx:if="{{course.switch_to_assistant}}" size="mini" data-role="assistant">切换为助教</button>
|
||||
<button wx:if="{{course.switch_to_teacher}}" size="mini" data-role="teacher">切换为老师</button>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{course.course_identity<5}}" class="course-footer">
|
||||
<block wx:if="{{!course.code_halt}}">
|
||||
<view class="span" bindtap="enterShare">
|
||||
<text>邀请成员</text>
|
||||
<mp-icon icon="qr-code" color="white" size="18"/>
|
||||
</view>
|
||||
<text class="sep">|</text>
|
||||
</block>
|
||||
<view class="span">
|
||||
<text>邀请码:</text>
|
||||
<text class="code" bindtap="onTapCode">{{course.code_halt?'已停用':course.invite_code}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtouchstart="{{handler.touchsHeader}}" bindtouchmove="{{handler.touchmBody}}" bindtouchend="{{handler.toucheBody}}" class="module-container">
|
||||
<attachment wx:if="{{module.type=='attachment'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}" />
|
||||
<exercise wx:elif="{{module.type=='exercise'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}" />
|
||||
<common-homework wx:elif="{{module.type=='common_homework'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}" />
|
||||
<shixun-homework wx:elif="{{module.type=='shixun_homework'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}" />
|
||||
<activity wx:elif="{{module.type=='activity'}}" course_id="{{course_id}}" refresh="{{refresh}}" course_identity="{{course.course_identity}}" />
|
||||
<attendance wx:elif="{{module.type=='attendance'}}" course_id="{{course_id}}" refresh="{{refresh}}" course_identity="{{course.course_identity}}" />
|
||||
</view>
|
||||
|
||||
<view class="header" bindtouchmove="{{handler.touchmHeader}}" bindtouchstart="{{handler.touchsHeader}}">
|
||||
<view class="status-bar" style="height:{{statusBarHeight}}px"></view>
|
||||
<view class="navigation">
|
||||
<view class="nav-buttons">
|
||||
<image mode="aspectFit" src="../../images/{{nav_type}}.png" catchtap="navigateBack" class="nav-button"></image>
|
||||
<image class="more-img" mode="aspectFit" src="../../images/more.png" data-width="{{windowWidth}}" catchtap="{{handler.changeSideBar}}"></image>
|
||||
</view>
|
||||
<text class="course-name">{{course.name}}{{module_name}}</text>
|
||||
</view>
|
||||
<view class="course-display flex-col">
|
||||
<view class="course-info-body">
|
||||
<view class="course-info flex-col">
|
||||
<view class="teacher-display">
|
||||
<image wx:if="{{course.teacher_img}}" class="teacher-img" mode="aspectFill" src="{{eduImgDir}}{{course.teacher_img}}"></image>
|
||||
<view class="teacher-name">{{course.teacher_name}}</view>
|
||||
<view class="school-name">{{course.teacher_school}}</view>
|
||||
</view>
|
||||
<view class="course-detail">
|
||||
<text>教师</text><text>{{course.teacher_count}}</text>
|
||||
<text class="sep">|</text>
|
||||
<text>学生</text><text>{{course.student_count}}</text>
|
||||
<block wx:if="{{course.credit!=null}}">
|
||||
<text class="sep">|</text>
|
||||
<text>学分</text><text>{{course.credit}}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="course-buttons color-main" bindtap="switchRole">
|
||||
<button wx:if="{{course.switch_to_student}}" size="mini" data-role="student">切换为学生</button>
|
||||
<button wx:if="{{course.switch_to_assistant}}" size="mini" data-role="assistant">切换为助教</button>
|
||||
<button wx:if="{{course.switch_to_teacher}}" size="mini" data-role="teacher">切换为老师</button>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{course.is_admin}}" class="course-footer">
|
||||
<block wx:if="{{!course.code_halt}}">
|
||||
<view class="span" bindtap="enterShare">
|
||||
<text>邀请成员</text>
|
||||
</view>
|
||||
<text class="sep">|</text>
|
||||
</block>
|
||||
<view class="span">
|
||||
<text>邀请码:</text>
|
||||
<text class="code" bindtap="onTapCode">{{course.code_halt?'已停用':course.invite_code}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtouchstart="{{handler.touchsHeader}}" bindtouchmove="{{handler.touchmBody}}" bindtouchend="{{handler.toucheBody}}" class="module-container">
|
||||
<attachment wx:if="{{module.type=='attachment'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}"/>
|
||||
<exercise wx:elif="{{module.type=='exercise'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}"/>
|
||||
<common-homework wx:elif="{{module.type=='common_homework'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}"/>
|
||||
<shixun-homework wx:elif="{{module.type=='shixun_homework'}}" id_="{{module.id}}" course_id="{{module.main_id}}" refresh="{{refresh}}"/>
|
||||
<activity wx:elif="{{module.type=='activity'}}" course_id="{{course_id}}" refresh="{{refresh}}" course_identity="{{course.course_identity}}"/>
|
||||
<attendance wx:elif="{{module.type=='attendance'}}" course_id="{{course_id}}" refresh="{{refresh}}" course_identity="{{course.course_identity}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<mp-tabbar ext-class="tabbar" bindchange="onModuleChange" current="{{current}}" list="{{list}}" />
|
||||
</view>
|
||||
<error-page status="{{status}}" config="{{scenes}}" bindrefresh="onTapError"/>
|
||||
<join-course hidden="{{!show_join_course}}" bindsuccess="refresh" auto_navigate="0"/>
|
||||
<error-page status="{{status}}" config="{{scenes}}" bindrefresh="onTapError" />
|
||||
<join-course hidden="{{!show_join_course}}" bindsuccess="refresh" auto_navigate="0" />
|
||||
<mp-halfScreenDialog show="{{showModules}}">
|
||||
<view slot="desc" class="modules">
|
||||
<view class="module-item" wx:for="{{course_modules}}" bindtap="onModuleTap" data-type="{{item.type}}">
|
||||
<image class="module-img" mode="aspectFit" src="/course/images/svg/{{item.type}}_select.svg"></image>
|
||||
<text class="singlw-ling module-name">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</mp-halfScreenDialog>
|
@ -0,0 +1,2 @@
|
||||
<textarea></textarea>
|
||||
<editor/>
|
@ -0,0 +1,5 @@
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
/* miniprogram/pages/feedback/feedback.wxss */
|