@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"openapi": []
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "login",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"wx-server-sdk": "latest"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 89 KiB |
@ -1,28 +0,0 @@
|
|||||||
module.exports = (subscription, initialStats, onChange) => {
|
|
||||||
console.log("query_bingding");
|
|
||||||
let stats = [...initialStats]
|
|
||||||
const remove = value => {
|
|
||||||
console.log("remove");
|
|
||||||
stats = stats.filter(target => target.id !== value.id)
|
|
||||||
return onChange(stats)
|
|
||||||
}
|
|
||||||
const upsert = value => {
|
|
||||||
console.log("upsert");
|
|
||||||
let existed = false;
|
|
||||||
stats = stats.map(target => (target.id === value.id ? ((existed = true), value) : target))
|
|
||||||
if (!existed) stats = [...stats,value]
|
|
||||||
return onChange(stats)
|
|
||||||
}
|
|
||||||
subscription.on('create', upsert)
|
|
||||||
subscription.on('update', upsert)
|
|
||||||
subscription.on('enter', upsert)
|
|
||||||
subscription.on('leave', remove)
|
|
||||||
subscription.on('delete', remove)
|
|
||||||
return () => {
|
|
||||||
subscription.off('create', upsert)
|
|
||||||
subscription.off('update', upsert)
|
|
||||||
subscription.off('enter', upsert)
|
|
||||||
subscription.off('leave', remove)
|
|
||||||
subscription.off('delete', remove)
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,23 @@
|
|||||||
|
# Windows
|
||||||
|
[Dd]esktop.ini
|
||||||
|
Thumbs.db
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
project.config.json
|
||||||
|
app.js
|
||||||
|
|
||||||
|
towxml
|
||||||
|
we-cropper
|
||||||
|
components/weui
|
||||||
|
|
||||||
|
.idea
|
||||||
|
api_docs
|
||||||
|
|
||||||
|
# Node.js
|
||||||
|
node_modules/
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@ -0,0 +1,38 @@
|
|||||||
|
// components/course/course.js
|
||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
name:{
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
teacher:{
|
||||||
|
type:Object
|
||||||
|
},
|
||||||
|
visits:{
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
members_count:{
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
homework_commons_count:{
|
||||||
|
type:Number
|
||||||
|
},
|
||||||
|
can_visited:{
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
is_public:{
|
||||||
|
type: Boolean
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,5 @@
|
|||||||
|
<view class="square">
|
||||||
|
<view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
@ -0,0 +1 @@
|
|||||||
|
/* components/course/course.wxss */
|
@ -0,0 +1,5 @@
|
|||||||
|
<view
|
||||||
|
class="custom-class iconfont icon-{{ type }}"
|
||||||
|
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + size + 'px;' : '' }}">
|
||||||
|
<view wx:if="{{ info !== null }}" class="icon__info">{{ info }}</view>
|
||||||
|
</view>
|
@ -0,0 +1,31 @@
|
|||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
addGlobalClass: true
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
externalClasses: ['custom-class'],
|
||||||
|
|
||||||
|
properties: {
|
||||||
|
info: null,
|
||||||
|
type: String,
|
||||||
|
size: String,
|
||||||
|
color: String
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
<!--components/icon/myicon.wxml-->
|
<!--components/icon/myicon.wxml-->
|
||||||
<view
|
<view
|
||||||
class="custom-class iconfont myicon-{{ type }}"
|
class="custom-class iconfont myicon-{{ type }}"
|
||||||
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + size + 'px;' : '' }}"
|
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + size + 'px;' : '' }}">
|
||||||
bind:tap="onClick">
|
|
||||||
<view wx:if="{{ info !== null }}" class="myicon__info">{{ info }}</view>
|
<view wx:if="{{ info !== null }}" class="myicon__info">{{ info }}</view>
|
||||||
</view>
|
</view>
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export const courses = [
|
||||||
|
{ "id": 3604, "name": "试用课程测试", "members_count": 1, "homework_commons_count": 0, "attachments_count": 0, "visits": 74, "first_category_url": "/courses/3604/shixun_homeworks/43557", "is_public": 0, "can_visited": true, "teacher": { "id": 116553, "real_name": "学生", "avatar_url": "avatars/User/116553?t=1573710191", "school_name": "国防科技大学" } },
|
||||||
|
{ "id": 3518, "name": "试用课程演示课堂", "members_count": 6, "homework_commons_count": 5, "attachments_count": 7, "visits": 628, "first_category_url": "/courses/3518/informs", "is_public": 0, "can_visited": true, "teacher": { "id": 42749, "real_name": "金柯", "avatar_url": "avatars/User/42749?t=1573398243", "school_name": "国防科技大学" } }]
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 947 B After Width: | Height: | Size: 947 B |
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 968 B |
Before Width: | Height: | Size: 997 B After Width: | Height: | Size: 997 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 943 B |
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,66 @@
|
|||||||
|
// pages/code_edit/code_edit.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
code: '\n/**\n * @todo: Error类, to be finished\n */\n\nexport default class EduError extends Error{\n constructor({message=null, code=-1}){\n super(message);\n this.code = code;\n }\n}'
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1 @@
|
|||||||
|
<textarea class="code-editor" value="{{code}}" ></textarea>
|
@ -0,0 +1,6 @@
|
|||||||
|
.code-editor{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: grey;
|
||||||
|
color: whitesmoke;
|
||||||
|
}
|