This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BB-fat/feature/school-life-2020
归拢分支,存档项目。
- Loading branch information
Showing
14 changed files
with
323 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,9 @@ | |
"pages/my/my", | ||
"pages/webview/webview", | ||
"pages/aboutus/aboutus", | ||
"pages/homework/homework" | ||
"pages/homework/homework", | ||
"pages/school-life-2020/school-life-2020", | ||
"pages/school-life-2020-web/school-life-2020-web" | ||
], | ||
"window": { | ||
"backgroundTextStyle": "light", | ||
|
@@ -38,12 +40,6 @@ | |
"pagePath": "pages/iclass/iclass", | ||
"text": "多模式" | ||
}, | ||
{ | ||
"selectedIconPath": "img/tabbar/[email protected]", | ||
"iconPath": "img/tabbar/[email protected]", | ||
"pagePath": "pages/idel-index/idel-index", | ||
"text": "闲置屋Beta" | ||
}, | ||
{ | ||
"selectedIconPath": "img/tabbar/my_active.png", | ||
"iconPath": "img/tabbar/my.png", | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,49 @@ | ||
<view> | ||
<swiper class="picswiper" autoplay="true" circular="true" interval="4000"> | ||
<block wx:for="{{indexBanner}}"> | ||
<swiper-item class='pic_item radius-shadow'> | ||
<navigator hover-class="banner-hover" url="{{'../webview/webview?url='+item.msgurl}}"> | ||
<image src='{{item.imgurl}}' class="swiper_img" mode='scaleToFill' data-index='{{index}}' bindtap='swipclick'></image> | ||
</navigator> | ||
</swiper-item> | ||
</block> | ||
</swiper> | ||
<view class="notice radius-shadow"> | ||
<view class='imgbox'> | ||
<image src="/img/index/notice.svg" class="notice_img" bindlongpress="clearStorage"></image> | ||
</view> | ||
<view style="flex:1;"> | ||
<swiper class="wordswiper" autoplay="true" circular="true" interval="4000" vertical='true'> | ||
<block wx:for="{{indexNotice}}"> | ||
<swiper-item class='word_item'> | ||
<text>{{item.text}}</text> | ||
</swiper-item> | ||
</block> | ||
</swiper> | ||
</view> | ||
</view> | ||
<view class="button-view"> | ||
<index-button icon="/img/index/kebiao.svg" text="课表" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng'}}" /> | ||
<index-button icon="/img/index/jiaoshi.svg" text="教室" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_room/emroom/index'}}" /> | ||
<index-button icon="/img/index/chengji.svg" text="成绩" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_score'}}" /> | ||
<index-button icon="/img/index/jidian.svg" text="绩点" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng/grade/list'}}" /> | ||
<index-button icon="/img/index/xuefen.svg" text="学分" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_exam/default/graduate'}}" /> | ||
<index-button icon="/img/index/selectcourse.svg" text="选课" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng/course/list'}}" /> | ||
</view> | ||
<view class='cat-box'> | ||
<image src='/img/index/dialog.svg' class='dialog' hidden='{{showCat}}'> | ||
<text>我的北方可以接推广了哦!</text> | ||
</image> | ||
<image class='cat' bindtap='tapCat' src='/img/index/cat.svg'></image> | ||
</view> | ||
<swiper class="picswiper" autoplay="true" circular="true" interval="5000"> | ||
|
||
<!-- 点滴校园2020 --> | ||
<swiper-item class='pic_item radius-shadow'> | ||
<navigator hover-class="banner-hover" url="{{'../school-life-2020/school-life-2020'}}"> | ||
<!-- TODO 填写海报数据 --> | ||
<image src='../../img/school-life/banner.png' class="swiper_img" mode='scaleToFill'></image> | ||
</navigator> | ||
</swiper-item> | ||
|
||
<!-- 常规banner --> | ||
<!-- <block wx:for="{{indexBanner}}"> | ||
<swiper-item class='pic_item radius-shadow'> | ||
<navigator hover-class="banner-hover" url="{{'../webview/webview?url='+item.msgurl}}"> | ||
<image src='{{item.imgurl}}' class="swiper_img" mode='scaleToFill' data-index='{{index}}' bindtap='swipclick'></image> | ||
</navigator> | ||
</swiper-item> | ||
</block> --> | ||
</swiper> | ||
<view class="notice radius-shadow"> | ||
<view class='imgbox'> | ||
<image src="/img/index/notice.svg" class="notice_img" bindlongpress="clearStorage"></image> | ||
</view> | ||
<view style="flex:1;"> | ||
<swiper class="wordswiper" autoplay="true" circular="true" interval="4000" vertical='true'> | ||
<block wx:for="{{indexNotice}}"> | ||
<swiper-item class='word_item'> | ||
<text>{{item.text}}</text> | ||
</swiper-item> | ||
</block> | ||
</swiper> | ||
</view> | ||
</view> | ||
<view class="button-view"> | ||
<index-button icon="/img/index/kebiao.svg" text="课表" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng'}}" /> | ||
<index-button icon="/img/index/jiaoshi.svg" text="教室" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_room/emroom/index'}}" /> | ||
<index-button icon="/img/index/chengji.svg" text="成绩" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_score'}}" /> | ||
<index-button icon="/img/index/jidian.svg" text="绩点" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng/grade/list'}}" /> | ||
<index-button icon="/img/index/xuefen.svg" text="学分" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_exam/default/graduate'}}" /> | ||
<index-button icon="/img/index/selectcourse.svg" text="选课" url="{{'../webview/webview?url=https://app.ncut.edu.cn/w_kecheng/course/list'}}" /> | ||
</view> | ||
<view class='cat-box'> | ||
<image src='/img/index/dialog.svg' class='dialog' hidden='{{showCat}}'> | ||
<text>我的北方可以接推广了哦!</text> | ||
</image> | ||
<image class='cat' bindtap='tapCat' src='/img/index/cat.svg'></image> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// pages/school-life-2020-web/school-life-2020-web.js | ||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
this.setData({ | ||
url:"https://myncut.ncut.edu.cn/school-life?token=" + options.token | ||
}) | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!--pages/school-life-2020-web/school-life-2020-web.wxml--> | ||
<web-view src="{{url}}"></web-view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* pages/school-life-2020-web/school-life-2020-web.wxss */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
// pages/school-life-2020/school-life-2020.js | ||
import { | ||
Requests | ||
} from "../../utils/Requests"; | ||
|
||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
/* | ||
判断是否已经授权个人信息 | ||
如果已经授权就更新一次信息 | ||
没有授权弹出提示授权框 | ||
不允许不让过!!! | ||
*/ | ||
|
||
wx.getUserInfo({ | ||
success: function (res) { | ||
var userInfo = res.userInfo; | ||
console.log(userInfo); | ||
// 向服务器提交用户最新的数据 | ||
Requests.put({ | ||
url: "/user", | ||
data: { | ||
nickName: userInfo.nickName, | ||
avatarUrl: userInfo.avatarUrl, | ||
}, | ||
success(data) { | ||
wx.navigateTo({ | ||
url: '../school-life-2020-web/school-life-2020-web?token=' + Requests.token, | ||
}) | ||
} | ||
}); | ||
}, | ||
fail: function (res) { | ||
console.log("getUserInfo fail"); | ||
} | ||
}) | ||
}, | ||
|
||
// 获取用户信息回调 | ||
tapGetUserInfo: function (e) { | ||
let that = this; | ||
if (e.detail.userInfo === undefined) { | ||
console.log("user refused getUserInfo"); | ||
// 未同意 | ||
wx.showToast({ | ||
title: '请同意后进入点滴校园', | ||
icon: "none" | ||
}) | ||
} else { | ||
// 同意后向服务器提交userInfo | ||
// 然后将页面切换成H5 | ||
console.log("user agreed getUserInfo"); | ||
console.log(e.detail.userInfo); | ||
Requests.put({ | ||
url: "/user", | ||
data: { | ||
nickName: e.detail.userInfo.nickName, | ||
avatarUrl: e.detail.userInfo.avatarUrl, | ||
}, | ||
success(data) { | ||
wx.navigateTo({ | ||
url: '../school-life-2020-web/school-life-2020-web?token=' + Requests.token, | ||
}) | ||
} | ||
}); | ||
} | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!--pages/school-life-2020/school-life-2020.wxml--> | ||
<view> | ||
<image class="bg" src="../../img/school-life/bg.jpeg"></image> | ||
<view class="btn-view"> | ||
<button class="btn" open-type="getUserInfo" bindgetuserinfo="tapGetUserInfo">点击进入</button> | ||
</view> | ||
</view> |
Oops, something went wrong.