Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
BETA1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
鞠欣诚 committed May 2, 2019
1 parent daf9bd9 commit db3370a
Show file tree
Hide file tree
Showing 15 changed files with 226 additions and 628 deletions.
49 changes: 0 additions & 49 deletions pages/aboutus/aboutus.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,4 @@ Page({
title: "关于我们",
})
},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

}
})
87 changes: 9 additions & 78 deletions pages/document/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import {
} from "../../setting.js"

import {
lookFile
lookFile,
downloadFile,
onFavor,
offFavor
} from "../../utils/document.js"

const app = getApp()
Expand All @@ -31,7 +34,6 @@ Page({
title: options.course_name,
})
let that = this
console.log(app.globalData.openid)
that.setData({
course_code: options.course_code,
course_name: options.course_name
Expand All @@ -55,11 +57,9 @@ Page({
},1500)
}
else{
console.log('warelist success')
that.setData({
courseList: res.data,
})
console.log(that.data.courseList)
}
}
})
Expand All @@ -82,7 +82,6 @@ Page({
lookFile:function(e){
var that=this
var index = e.currentTarget.dataset.index
console.log(that.data.courseList[index])
if (that.data.courseList[index].type === 'dir') {
wx.navigateTo({
url: '/pages/document/document?code=' + course_code + 'item' + that.data.courseList[index].sign
Expand All @@ -95,94 +94,26 @@ Page({
downFile: function(e) { //下载课件
let that = this
var index = e.currentTarget.dataset.index
wx.request({
url: myURL + '/reqdownload',
data: {
openid: app.globalData.openid,
courseware: JSON.stringify(that.data.courseList[index]),
},
success(res) {
that.setData({
wareURL: myURL + '/download?id=' + res.data
}),
wx.showModal({
title: '复制以下链接到浏览器下载',
content: that.data.wareURL,
confirmText: '复制',
success(res) {
if (res.confirm) {
console.log('用户点击复制')
wx.setClipboardData({
data: that.data.wareURL,
success() {
wx.showToast({
title: '复制成功',
icon: 'success'
})
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
fail(res) {
wx.showToast({
title: '下载链接消失了',
icon: 'none',
duration: 2000
})
}
})
downloadFile(that.data.courseList[index])
},

// sendFile:function(e){ //转发课件
// util.windowInfo()
// },


favourites: function(e) {
var index = e.currentTarget.dataset.index
console.log(e.currentTarget.dataset.index)
var that = this
var index = e.currentTarget.dataset.index
that.data.courseList[index].favourite = true
that.setData({
courseList: that.data.courseList
})
wx.request({
url: myURL + '/favourite/courseware',
data: {
openid: app.globalData.openid,
courseware: JSON.stringify(that.data.courseList[index]),
mode: 'add'
},
success: function(res) {
//收藏课件成功
console.log("收藏课件成功")
console.log(res)
}
})
onFavor(that.data.courseList[index])
},

unfavourites: function(e) {
var index = e.currentTarget.dataset.index
var that = this
that.data.courseList[index].favourite = false
that.setData({
courseList: that.data.courseList
})
wx.request({
url: myURL + '/favourite/courseware',
data: {
openid: app.globalData.openid,
courseware: JSON.stringify(that.data.courseList[index]),
mode: 'del',
},
success: function(res) {
//取消收藏成功
console.log("取消收藏课件成功")
console.log(res)
}
})
offFavor(that.data.courseList[index])
}
})
53 changes: 0 additions & 53 deletions pages/feedback/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Page({
nowTxtlen: e.detail.cursor,
nowTxt: e.detail.value
})
console.log(that.data.nowTxtlen)
console.log(that.data.nowTxt)
},

bindChange: function (e) { //反馈类型切换
Expand All @@ -33,7 +31,6 @@ Page({
that.setData({
myChoice: this.data.types[val]
})
console.log(that.data.myChoice)
},

toNoname: function (e) { //匿名提交
Expand Down Expand Up @@ -97,55 +94,5 @@ Page({
wx.setNavigationBarTitle({
title: "问题反馈",
})

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

}
})
64 changes: 3 additions & 61 deletions pages/homework/homework.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,82 +19,24 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
onLoad: function (options) {
let that = this
// console.log(options.homeList_all)
var temp=JSON.parse(options.homeList_all)
console.log(temp)
that.setData({
course_name: options.course_name,
homeList_all: temp
homeList_all: JSON.parse(options.homeList_all)
})
console.log(that.data.homeList_all)
wx.setNavigationBarTitle({
title: that.data.course_name,
})
console.log(app.globalData.openid)

for (var key in that.data.homeList_all) {
console.log(that.data.course_name)
console.log(key)
if (that.data.course_name == key) {
if (that.data.course_name == key) {
that.setData({
homeList: that.data.homeList_all[key],
// end_date: that.data.homeList_all[key].end_date
})
break
}
}
console.log(that.data.homeList)
},


/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function() {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {

}
})
20 changes: 4 additions & 16 deletions pages/iclass/iclass.wxml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
<view class='checkOath' wx:if='{{!authed}}'>
<view class='word'>
<view class='row1'>
<text>亲爱的</text>
<open-data type='userNickName' class="card-nickName"></open-data>
</view>
<text class='row1'>欢迎来到“我的北方”</text>
<view class='row3'>
<text>您需要</text>
<text class='renzheng'>认证</text>
<text>方可正常使用此小程序</text>
</view>
</view>
<image class='img_renzheng' src='../../imgs/index/welcome.png'></image>
<view class='btn_ren' hover="true" hover-class="btnhover" bindtap='toAuth'>点击前往认证</view>
</view>
<import src="../../templates/authView/authView.wxml" />

<template wx:if="{{!authed}}" is="authView"></template>


<view wx:else>
<view class='top'>
Expand Down
Loading

0 comments on commit db3370a

Please sign in to comment.