├── data.json
├── pages
├── auth
│ ├── auth.json
│ ├── auth.wxss
│ ├── auth.wxml
│ └── auth.js
├── detail
│ ├── detail.json
│ ├── detail.wxml
│ └── detail.wxss
├── index
│ ├── index.json
│ ├── index.wxml
│ └── index.js
├── myinfo
│ ├── myinfo.json
│ ├── myinfo.wxss
│ ├── myinfo.wxml
│ └── myinfo.js
├── search
│ ├── search.json
│ ├── search.wxml
│ ├── search.wxss
│ └── search.js
├── sport
│ ├── sport.json
│ ├── sport.wxml
│ ├── sport.wxss
│ └── sport.js
├── about_us
│ ├── about_us.json
│ ├── about_us.wxss
│ ├── about_us.wxml
│ └── about_us.js
├── contact_us
│ ├── contact_us.json
│ ├── contact_us.wxml
│ ├── contact_us.wxss
│ └── contact_us.js
├── phone_auth
│ ├── phone_auth.json
│ ├── phone_auth.wxss
│ ├── phone_auth.wxml
│ └── phone_auth.js
├── update_info
│ ├── update_info.json
│ ├── update_info.wxss
│ ├── update_info.wxml
│ └── update_info.js
├── quit_activity
│ ├── quit_activity.json
│ ├── quit_activity.wxml
│ ├── quit_activity.wxss
│ └── quit_activity.js
├── search_result
│ ├── search_result.json
│ ├── search_result.wxml
│ ├── search_result.wxss
│ └── search_result.js
├── trainee
│ ├── trainee_my
│ │ ├── trainee_my.json
│ │ ├── trainee_my.wxml
│ │ ├── trainee_my.wxss
│ │ └── trainee_my.js
│ ├── trainee_auth
│ │ ├── trainee_auth.json
│ │ ├── trainee_auth.wxss
│ │ ├── trainee_auth.wxml
│ │ └── trainee_auth.js
│ ├── trainee_index
│ │ ├── trainee_index.json
│ │ ├── trainee_index.js
│ │ ├── trainee_index.wxml
│ │ └── trainee_index.wxss
│ ├── trainee_detail
│ │ ├── trainee_detail.json
│ │ ├── trainee_detail.js
│ │ ├── trainee_detail.wxss
│ │ └── trainee_detail.wxml
│ └── trainee_application
│ │ ├── trainee_application.json
│ │ ├── trainee_application.js
│ │ ├── trainee_application.wxml
│ │ └── trainee_application.wxss
└── record2
│ ├── record2.json
│ ├── record2.wxss
│ ├── record2.js
│ └── record2.wxml
├── template
├── rank_item
│ ├── rank_item.json
│ ├── rank_item.wxml
│ ├── rank_item.js
│ └── rank_item.wxss
├── activity_item
│ ├── activity_item.json
│ ├── activity_item.js
│ ├── activity_item.wxml
│ └── activity_item.wxss
├── trainee_item
│ ├── trainee_item.json
│ ├── trainee_item.js
│ ├── trainee_item.wxml
│ └── trainee_item.wxss
└── user_info_act_item
│ ├── user_info_act_item.json
│ ├── user_info_act_item.wxml
│ ├── user_info_act_item.wxss
│ └── user_info_act_item.js
├── images
├── icon
│ ├── cry.png
│ ├── cup.png
│ ├── icon_xueshu.png
│ ├── icon_xinsheng.png
│ ├── side_list.svg
│ ├── success.svg
│ ├── trainee-my.svg
│ ├── album.svg
│ ├── flat.svg
│ ├── warn.svg
│ ├── trainee-auth-result.svg
│ ├── trainee-send.svg
│ ├── trainee-send2.svg
│ └── cry.svg
├── record
│ ├── bg.jpg
│ ├── suggest.svg
│ ├── crown.svg
│ ├── schedule.svg
│ ├── medal.svg
│ ├── basketball-1.svg
│ └── athlete.svg
├── trainee
│ ├── push.png
│ ├── timg.jpg
│ ├── cl_xb.png
│ ├── trainee2.jpg
│ ├── apply_image2.png
│ ├── uncollection.svg
│ ├── collection.svg
│ └── baidu.svg
├── search
│ └── search.png
├── toolbar
│ ├── person.png
│ ├── activity.png
│ ├── activity2.png
│ └── person2.png
├── userinfo
│ ├── sign.PNG
│ ├── signing.PNG
│ ├── unsign.PNG
│ ├── fav2.svg
│ ├── join2.svg
│ └── no_act.svg
├── sport
│ └── titleback3.jpg
└── detail
│ ├── fav.svg
│ ├── has_fav.svg
│ ├── has_join.svg
│ └── join.svg
├── app.wxss
├── utils
└── util.js
├── trainee.js
├── app.json
├── project.config.json
├── font.wxss
└── data.js
/data.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/auth/auth.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/myinfo/myinfo.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/sport/sport.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/about_us/about_us.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/contact_us/contact_us.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/phone_auth/phone_auth.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/update_info/update_info.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/template/rank_item/rank_item.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/quit_activity/quit_activity.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/search_result/search_result.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/trainee/trainee_my/trainee_my.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/template/activity_item/activity_item.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/template/trainee_item/trainee_item.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/trainee/trainee_auth/trainee_auth.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/trainee/trainee_index/trainee_index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/trainee/trainee_detail/trainee_detail.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/template/user_info_act_item/user_info_act_item.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/trainee/trainee_application/trainee_application.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/record2/record2.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false}
--------------------------------------------------------------------------------
/pages/phone_auth/phone_auth.wxss:
--------------------------------------------------------------------------------
1 | /* pages/phone_auth/phone_auth.wxss */
--------------------------------------------------------------------------------
/images/icon/cry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/icon/cry.png
--------------------------------------------------------------------------------
/images/icon/cup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/icon/cup.png
--------------------------------------------------------------------------------
/images/record/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/record/bg.jpg
--------------------------------------------------------------------------------
/pages/trainee/trainee_auth/trainee_auth.wxss:
--------------------------------------------------------------------------------
1 | /* pages/trainee/trainee_auth/trainee_auth.wxss */
--------------------------------------------------------------------------------
/images/trainee/push.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/trainee/push.png
--------------------------------------------------------------------------------
/images/trainee/timg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/trainee/timg.jpg
--------------------------------------------------------------------------------
/images/search/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/search/search.png
--------------------------------------------------------------------------------
/images/toolbar/person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/toolbar/person.png
--------------------------------------------------------------------------------
/images/trainee/cl_xb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/trainee/cl_xb.png
--------------------------------------------------------------------------------
/images/userinfo/sign.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/userinfo/sign.PNG
--------------------------------------------------------------------------------
/images/icon/icon_xueshu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/icon/icon_xueshu.png
--------------------------------------------------------------------------------
/images/sport/titleback3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/sport/titleback3.jpg
--------------------------------------------------------------------------------
/images/toolbar/activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/toolbar/activity.png
--------------------------------------------------------------------------------
/images/toolbar/activity2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/toolbar/activity2.png
--------------------------------------------------------------------------------
/images/toolbar/person2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/toolbar/person2.png
--------------------------------------------------------------------------------
/images/trainee/trainee2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/trainee/trainee2.jpg
--------------------------------------------------------------------------------
/images/userinfo/signing.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/userinfo/signing.PNG
--------------------------------------------------------------------------------
/images/userinfo/unsign.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/userinfo/unsign.PNG
--------------------------------------------------------------------------------
/images/icon/icon_xinsheng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/icon/icon_xinsheng.png
--------------------------------------------------------------------------------
/images/trainee/apply_image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiangGeNB/bjut_online/HEAD/images/trainee/apply_image2.png
--------------------------------------------------------------------------------
/pages/phone_auth/phone_auth.wxml:
--------------------------------------------------------------------------------
1 |
2 | pages/phone_auth/phone_auth.wxml
3 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_auth/trainee_auth.wxml:
--------------------------------------------------------------------------------
1 |
2 | pages/trainee/trainee_auth/trainee_auth.wxml
3 |
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 |
12 | view, input{
13 | font-family: MicroSoft YaHei;
14 | }
--------------------------------------------------------------------------------
/pages/contact_us/contact_us.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | @ 联系我们
6 |
7 |
8 | {{content}}
9 |
10 |
11 |
12 | 官方邮箱:{{email}}
13 |
14 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
11 | }
12 |
13 | function formatNumber(n) {
14 | n = n.toString()
15 | return n[1] ? n : '0' + n
16 | }
17 |
18 | module.exports = {
19 | formatTime: formatTime
20 | }
21 |
--------------------------------------------------------------------------------
/template/user_info_act_item/user_info_act_item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{activityTitle}}
7 |
8 |
9 | 活动时间:{{activityDate}}
10 | 活动地点:{{activityLocation}}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/contact_us/contact_us.wxss:
--------------------------------------------------------------------------------
1 | /* contact_us.wxss */
2 | .all{
3 | background-color: whitesmoke;
4 | border-radius: 3px;
5 | padding: 5vw;
6 | margin: 5vw;
7 | display: absolute;
8 | color: rgba(0, 0, 0, 0.7);
9 | }
10 |
11 | .title{
12 | margin-bottom: 5vw;
13 | text-align: center;
14 | font-size: 8vw;
15 | color: #1296db;
16 | font-weight: bolder;
17 | }
18 |
19 | .content{
20 | margin: 3vw;
21 | padding-left: 5px;
22 | margin-top: 1px;
23 | font-size: 16px;
24 | padding-bottom: 10px;
25 | }
26 |
27 | .email{
28 | margin: 3vw;
29 | padding-left: 5px;
30 | font-size: 16px;
31 | text-indent: 8vw;
32 | }
33 |
34 | .email>text {
35 | color: #1296db;
36 | font-weight: bold;
37 | }
--------------------------------------------------------------------------------
/template/rank_item/rank_item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{rank}}
4 |
5 | {{name}}
6 | {{step}} 步
7 |
8 |
--------------------------------------------------------------------------------
/pages/search_result/search_result.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/images/icon/side_list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/trainee/uncollection.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/trainee/collection.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/search_result/search_result.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search_result/search_result.wxss */
2 | @import '/font.wxss';
3 | @import '/template/activity_item/activity_item.wxss';
4 |
5 |
6 | .gap {
7 | width: 100%;
8 | height: 10px;
9 | border-top: 1px solid rgba(0, 0, 0, 0.1);
10 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
11 | background-color: ghostwhite;
12 | }
13 |
14 | .input-wrapper {
15 | margin: 5vw;
16 | }
17 |
18 | .search-icon {
19 | display: inline-block;
20 | width: 6vw;
21 | height: 6vw;
22 | margin-right: 2vw;
23 | margin-bottom: 1vw;
24 | }
25 |
26 | input {
27 | display: inline-block;
28 | width: 82vw;
29 | height: 8vw;
30 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
31 | font-family: MicroSoft YaHei;
32 | font-size: 4vw;
33 | }
34 |
35 | .input-placeholder {
36 | font-family: MicroSoft YaHei;
37 | font-size: 4vw;
38 | }
--------------------------------------------------------------------------------
/template/user_info_act_item/user_info_act_item.wxss:
--------------------------------------------------------------------------------
1 | /* template/user_info_act_item/user_info_act_item.wxss */
2 | .user-act-wrapper{
3 | margin: 3vw 0;
4 | width: 86vw;
5 | padding: 2vw;
6 | border: 2px solid silver;
7 | border-radius: 5px;
8 | }
9 | .user-act-image{
10 | display: inline-block;
11 | width: 15vw;
12 | height: 15vw;
13 | vertical-align: top;
14 | border-radius: 4px;
15 | }
16 | .user-act-info-wrapper{
17 | display: inline-block;
18 | margin-left: 5vw;
19 | width:62vw;
20 | height: 15vw;
21 | }
22 | .user-title{
23 | width:60vw;
24 | overflow: hidden;
25 | text-overflow:ellipsis;
26 | white-space: nowrap;
27 | font-size: 4vw;
28 | margin-bottom: 1vw;
29 | }
30 | .user-date{
31 | font-size: 3vw;
32 | margin-bottom: .5vw;
33 | }
34 | .user-location{
35 | font-size: 3vw;
36 | }
37 | .fire{
38 | color: red;
39 | }
--------------------------------------------------------------------------------
/images/icon/success.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/record/suggest.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/phone_auth/phone_auth.js:
--------------------------------------------------------------------------------
1 | // pages/phone_auth/phone_auth.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/template/rank_item/rank_item.js:
--------------------------------------------------------------------------------
1 | // template/rank_item/rank_item.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/template/trainee_item/trainee_item.js:
--------------------------------------------------------------------------------
1 | // template/trainee_item/trainee_item.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/pages/trainee/trainee_auth/trainee_auth.js:
--------------------------------------------------------------------------------
1 | // pages/trainee/trainee_auth/trainee_auth.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/template/user_info_act_item/user_info_act_item.js:
--------------------------------------------------------------------------------
1 | // template/user_info_act_item/user_info_act_item.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/template/trainee_item/trainee_item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 更新于{{publish_date}}
8 | {{position}}
9 | {{company}}
10 |
11 |
12 |
13 | {{location}}
14 |
15 |
16 |
17 | {{target}}
18 |
19 |
20 |
21 | {{salary}}
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/template/trainee_item/trainee_item.wxss:
--------------------------------------------------------------------------------
1 | /* template/trainee_item/trainee_item.wxss */
2 | .trainee-template-wrapper{
3 | width: 100%;
4 | padding: 3vw 0;
5 | position: relative;
6 | }
7 |
8 | .logo-wrapper{
9 | width: 25vw;
10 | display: inline-block;
11 | }
12 |
13 | .logo-image{
14 | margin: 0 5vw;
15 | width: 15vw;
16 | height: 15vw;
17 | border-radius: 50%;
18 | }
19 |
20 | .info-wrapper{
21 | display: inline-block;
22 | width: 70vw;
23 | padding-left: 3vw;
24 | vertical-align: top;
25 | }
26 | /*更新日期 */
27 | .update-date{
28 | position: absolute;
29 | top: 3.5vw;
30 | right: 1vw;
31 | width: 23vw;
32 | font-size: 3vw;
33 | text-align: right;
34 | color: gray
35 | }
36 | .position-wrapper{
37 | font-size: 4vw;
38 | width: 47vw;
39 | }
40 | .company-wrapper{
41 | margin-top: 1vw;
42 | font-size: 3vw;
43 | color: gray;
44 | }
45 |
46 | .sub-info-wrapper{
47 | margin-top: 2vw;
48 | font-size: 3vw;
49 | }
50 | .chenlongnb{
51 | display: inline-block;
52 | margin-right: 3vw;
53 | }
54 |
--------------------------------------------------------------------------------
/images/icon/trainee-my.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_application/trainee_application.js:
--------------------------------------------------------------------------------
1 | // pages/trainee_application/trainee_application.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | info_come: ['我在这家公司实习','微信群','朋友介绍']
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/template/activity_item/activity_item.js:
--------------------------------------------------------------------------------
1 | // template/activity_item/activity_item.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | imageUrl: 'http://www.i-exshare.cn/activity_images/chenlong13856.jpg'
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/pages/contact_us/contact_us.js:
--------------------------------------------------------------------------------
1 | // contact_us.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | content: "北工大活动报名平台由北京工业大学研究生会宣传中心与北京工业大学信息学部研究生会运营,如果你想加入我们或者在使用过程中有任何问题,请联系我们!",
9 | email: "bjut_wy@163.com"
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 |
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面初次渲染完成
21 | */
22 | onReady: function () {
23 |
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面显示
28 | */
29 | onShow: function () {
30 |
31 | },
32 |
33 | /**
34 | * 生命周期函数--监听页面隐藏
35 | */
36 | onHide: function () {
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面卸载
42 | */
43 | onUnload: function () {
44 |
45 | },
46 |
47 | /**
48 | * 页面相关事件处理函数--监听用户下拉动作
49 | */
50 | onPullDownRefresh: function () {
51 |
52 | },
53 |
54 | /**
55 | * 页面上拉触底事件的处理函数
56 | */
57 | onReachBottom: function () {
58 |
59 | },
60 |
61 | /**
62 | * 用户点击右上角分享
63 | */
64 | onShareAppMessage: function () {
65 |
66 | }
67 | })
--------------------------------------------------------------------------------
/pages/trainee/trainee_detail/trainee_detail.js:
--------------------------------------------------------------------------------
1 | // pages/trainee_detail/trainee_detail.js
2 | var data = require('../../../trainee.js');
3 | Page({
4 |
5 | data: {
6 | trainee_data: data.trainee.trainee_data[0],
7 | // 地图上的marker
8 | marker: [],
9 | collection_mark: data.trainee.trainee_data[0].collection_mark
10 | },
11 |
12 | onLoad: function (options) {
13 | console.log(options.trainee_id);
14 | console.log(data);
15 | this.setData({
16 | marker: [{
17 | id: 1,
18 | latitude: data.trainee.trainee_data[0].coordinate[0],
19 | longitude: data.trainee.trainee_data[0].coordinate[1],
20 | title: data.trainee.trainee_data[0].company
21 | }]
22 | });
23 | },
24 |
25 | onReady: function () {
26 | },
27 | onShow: function () {
28 | },
29 | onHide: function () {
30 | },
31 | onUnload: function () {
32 | },
33 | onPullDownRefresh: function () {
34 | },
35 | onReachBottom: function () {
36 |
37 | },
38 | onShareAppMessage: function () {
39 | },
40 | click_collection: function(){
41 | console.log('点击了收藏or取消收藏按钮');
42 | this.setData({
43 | collection_mark: !this.data.collection_mark
44 | })
45 | }
46 | })
--------------------------------------------------------------------------------
/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 热门搜索
8 |
9 |
10 | {{item.tag_content}}
11 |
12 |
13 |
14 |
15 |
16 | 历史记录
17 |
18 |
19 |
20 | {{item}}
21 |
22 |
23 |
24 |
25 |
26 | 清空历史记录
27 |
28 |
29 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_application/trainee_application.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
16 |
17 |
20 |
21 | 公司名称:
22 |
23 |
24 |
25 | 需求职位:
26 |
27 |
28 |
29 | 信息来源:
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/images/icon/album.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/icon/flat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/update_info/update_info.wxss:
--------------------------------------------------------------------------------
1 | /* update_info.wxss */
2 | @import '/font.wxss';
3 |
4 | .title-wrapper {
5 | margin: 5vw;
6 | padding-bottom: 3vw;
7 | font-size: 7vw;
8 | border-bottom: 1.5px solid gainsboro;
9 | }
10 |
11 | .setting {
12 | font-size: 7vw;
13 | color: #1296db;
14 | font-weight: bold;
15 | }
16 |
17 | .content-wrapper {
18 | margin: 0 10vw;
19 |
20 | }
21 |
22 | .nick-name-wrapper {
23 | display: flex;
24 | width: 100%;
25 | font-size: 5vw;
26 | margin-bottom: 5vw;
27 | }
28 |
29 | .usual-text {
30 | display: inline-block;
31 | vertical-align: -4px;
32 | width: 25vw;
33 | text-align: right;
34 | }
35 |
36 | input {
37 | display: inline-block;
38 | margin-left: 2vw;
39 | height: 7vw;
40 | border: 1px solid gainsboro;
41 | border-radius: 4px;
42 | text-align: center;
43 | width: 50vw;
44 | }
45 |
46 | .phone-number-wrapper {
47 | display: flex;
48 | width: 100%;
49 | font-size: 5vw;
50 | margin-bottom: 5vw;
51 | }
52 | .rank-switch-wrapper > switch {
53 | margin-left: 3vw;
54 | }
55 |
56 | .remark {
57 | margin: 5vw 0;
58 | padding: 4vw;
59 | background-color: ghostwhite;
60 | color: gray;
61 | border-radius: 3vw;
62 | font-size: 3.2vw;
63 | line-height: 5vw;
64 | }
65 |
66 | .remark > text {
67 | line-height: 5vw;
68 | }
69 |
70 | .save-button {
71 | width: 80vw;
72 | margin: 5vw auto;
73 | }
74 |
--------------------------------------------------------------------------------
/pages/quit_activity/quit_activity.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 温馨提示:
5 | 1.本页面提交的内容是为了方便活动举办方统计参与人数,请您谅解
6 | 2.请您认真核对相关信息,认真填写取消活动原因
7 | 3.提交本页面后则可成功取消活动
8 |
9 |
10 | 相关信息:
11 |
12 | 退出活动名称:
13 | {{act_title}}
14 | 相关联系人:
15 | {{user_name}}
16 | 联系人学号:
17 | {{student_id}}
18 |
19 |
20 |
33 |
--------------------------------------------------------------------------------
/pages/about_us/about_us.wxss:
--------------------------------------------------------------------------------
1 | #container_first{
2 | margin: 3vw;
3 | padding: 3vw;
4 | font-size: 4vw;
5 | color: rgba(0, 0, 0, 0.7);
6 | background-color: #fafafa
7 | }
8 |
9 | #titile_first{
10 | text-align: center;
11 | font-size: 6vw;
12 | font-weight: bold;
13 | padding: 2vw;
14 | color: #1296db;
15 | }
16 |
17 | #content{
18 | font-size: 4vw;
19 | text-indent:8vw;
20 | padding-top: 7px;
21 | line-height: 6vw;
22 | }
23 |
24 | #titile_principle
25 | {
26 | padding-top: 4.5vw;
27 | text-align: center;
28 | font-size: 5vw;
29 | font-weight: 600;
30 | }
31 |
32 | #principle{
33 | padding-top: 7px;
34 | font-size: black;
35 | text-indent:4vw;
36 | }
37 |
38 | #priviate_title{
39 | padding-top: 4.5vw;
40 | text-align: center;
41 | font-size: 5vw;
42 | font-weight: 600;
43 | }
44 |
45 | #descript{
46 | padding-top: 7px;
47 | font-size: black;
48 | text-indent:8vw;
49 | line-height: 6vw;
50 | }
51 |
52 | #private_info{
53 | padding-top: 7px;
54 | font-size: black;
55 | line-height: 6vw;
56 | }
57 | .info {
58 | text-indent: 8vw;
59 | font-weight: 550;
60 | }
61 | .info_text{
62 | text-indent: 8vw;
63 | }
64 | #copy_right_title{
65 | padding-top: 4.5vw;
66 | text-align: center;
67 | font-size: 5vw;
68 | font-weight: 600;
69 | }
70 |
71 | #copy_right_message{
72 | padding-top: 10px;
73 | font-size: black;
74 | text-indent:8vw;
75 | }
--------------------------------------------------------------------------------
/images/icon/warn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/trainee.js:
--------------------------------------------------------------------------------
1 | var trainee = {
2 | trainee_data: [
3 | {
4 | id: 1,
5 | company:'深圳市腾讯计算机系统有限公司',
6 | position: 'java开发',
7 | brand: '/images/sport/title.png',
8 | salary: '1000/月',
9 | location: '北京中关村',
10 | main_location: '北京市海淀区海淀大街38号银科大厦16层',
11 | target: '4天/周',
12 | min_time:'5个月',
13 | coordinate: ['40.040810','116.273470'],
14 | education_background: '本科及本科以上',
15 | demand_number: 10,
16 | content: '职位亮点:1、在架构优秀的框架内工作, 领会代码结构的魅力;2、严格规范的代码review, 促使你快速的提升;3、定期分享培训, 持续成长。工作内容:1、持续迭代产品,优化算法,提升用户文档编写体验;2、理解产品需求,开发维护Web API;3、持续优化后端性能;4、开发工具的开发维护',
17 | publish_date: '2012.2.2',
18 | end_date: '2012.3.2',
19 | collection_mark: true
20 | },
21 | {
22 | id: 2,
23 | company: '腾讯科技',
24 | position: '产品经理',
25 | target: '4天/周',
26 | brand: '/images/sport/title.png',
27 | salary: '1000/月',
28 | min_time: '5个月',
29 | location: '北京中关村',
30 | main_location: '北京市海淀区海淀大街38号银科大厦16层',
31 | coordinate: '116.222,12.235416854',
32 | education_background: '本科及本科以上',
33 | demand_number: 10,
34 | content: '职位亮点:1、在架构优秀的框架内工作, 领会代码结构的魅力;2、严格规范的代码review, 促使你快速的提升;3、定期分享培训, 持续成长。工作内容:1、持续迭代产品,优化算法,提升用户文档编写体验;2、理解产品需求,开发维护Web API;3、持续优化后端性能;4、开发工具的开发维护',
35 | publish_date: '2012.2.2',
36 | end_date: '2012.3.2',
37 | collection_mark: true
38 | }
39 | ]
40 | }
41 | module.exports.trainee = trainee;
--------------------------------------------------------------------------------
/images/record/crown.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/about_us/about_us.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{title}}
6 |
7 |
8 |
9 | {{content}}
10 |
11 |
12 |
13 | {{content_principle}}
14 |
15 |
16 |
17 | {{idx+1}}. {{itemName.message}}
18 |
19 |
20 |
21 |
22 | {{private_info_title}}
23 |
24 |
25 | {{private_descript}}
26 |
27 |
28 | {{idx+1}}. {{itemName.title}}\n
29 | {{itemName.message}}
30 |
31 |
32 |
33 |
34 |
35 | {{copy_right_title}}\n
36 |
37 |
38 | {{copy_right_message}}
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search.wxss */
2 | @import '/font.wxss';
3 | .input-wrapper {
4 | margin: 5vw;
5 | }
6 |
7 | .search-icon {
8 | display: inline-block;
9 | width: 6vw;
10 | height: 6vw;
11 | margin-right: 2vw;
12 | margin-bottom: 1vw;
13 | }
14 |
15 | input {
16 | display: inline-block;
17 | width: 82vw;
18 | height: 8vw;
19 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
20 | font-family: MicroSoft YaHei;
21 | font-size: 4vw;
22 | }
23 |
24 | .input-placeholder {
25 | font-family: MicroSoft YaHei;
26 | font-size: 4vw;
27 | }
28 |
29 | .hot-wrapper {
30 | margin: 5vw;
31 | }
32 |
33 | .title {
34 | font-size: 4vw;
35 | color: gray;
36 | margin-bottom: 3vw;
37 | }
38 |
39 | .hot-tag {
40 | margin: 1vw;
41 | padding: 1vw;
42 | display: inline-block;
43 | border: 1px solid rgba(0, 0, 0, 0.5);
44 | border-radius: 2vw;
45 | font-size: 3vw;
46 | }
47 | .hot-tag:first-child{
48 | margin-left: 0;
49 | }
50 |
51 | .history-wrapper{
52 | margin:5vw;
53 | }
54 | .icon-history{
55 | font-size: 5vw;
56 | }
57 | .item-wrapper{
58 | margin: 5vw 0;
59 | }
60 | .his-item{
61 | width: 70vw;
62 | display: inline-block;
63 | margin-left: 3vw;
64 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
65 | font-size: 4vw;
66 | vertical-align: top;
67 | }
68 | .icon-x{
69 | font-size: 3vw;
70 | vertical-align: 1vw;
71 | margin-left: 2vw;
72 | }
73 | .clean-histroy-wrapper{
74 | font-size: 3vw;
75 | }
76 | .clean-text{
77 | display: inline-block;
78 | margin-left: 3vw;
79 | vertical-align: top;
80 | }
--------------------------------------------------------------------------------
/template/activity_item/activity_item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{activityTitle}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {{activityInt}}
26 |
27 |
28 |
29 |
40 |
41 |
--------------------------------------------------------------------------------
/pages/quit_activity/quit_activity.wxss:
--------------------------------------------------------------------------------
1 | .header{
2 | margin: 2vw 30vw;
3 | width: calc(100%-60vw);
4 | height: 15vw;
5 | text-align: center;
6 | line-height: 15vw;
7 | }
8 |
9 | .mark{
10 | margin: 0 5vw;
11 | padding: 3vw;
12 | border-radius: 2vw;
13 | width: calc(100%-10vw);
14 | font-size: 3.2vw;
15 | line-height: 5vw;
16 | background-color: #F5F5F5;
17 | }
18 | .content{
19 | margin: 5vw;
20 | padding: 2vw;
21 | font-size: 3.5vw;
22 | background-color: #FDF5E6;
23 | }
24 | .content-title {
25 | margin-bottom: 2vw;
26 | }
27 | .content-title::before{
28 | content: "* ";
29 | color: red;
30 | }
31 | .content-item{
32 | width: calc(100%-10vw);
33 | }
34 | .content-item > view{
35 | display: inline-block;
36 | height: 6vw;
37 | }
38 | .item-name{
39 | width: 25vw;
40 | font-weight: bold;
41 | vertical-align: top;
42 | }
43 | .item-data{
44 | width: 60vw;
45 | }
46 |
47 | .picker-rapper{
48 | margin: 5vw;
49 | font-size: 4vw;
50 | }
51 | .picker-title{
52 | display: inline-block;
53 | margin-right: 3vw;
54 | line-height: 5vw;
55 | }
56 | .picker-rapper::before{
57 | content: "* ";
58 | color: red;
59 | }
60 | picker{
61 | display: inline-block;
62 | width: 50%;
63 | padding-bottom: 1vw;
64 | border-bottom: 1px solid gainsboro;
65 | text-align: center;
66 | }
67 | .reason-text-title{
68 | margin: 3vw 5vw;
69 | font-size: 3.5vw;
70 | font-weight: bold;
71 | }
72 | textarea{
73 | margin: 0 10vw;
74 | padding: 2vw;
75 | border: 1px solid #A9A9A9;
76 | border-radius: 2vw;
77 | width: 76vw;
78 | height: 20vw;
79 | font-size: 3.5vw;
80 | }
81 | button{
82 | margin: 8vw 10vw;
83 | }
--------------------------------------------------------------------------------
/pages/auth/auth.wxss:
--------------------------------------------------------------------------------
1 | /* pages/auth/auth.wxss */
2 | .wrapper{
3 | margin: 5vw;
4 | }
5 | .title-wrapper{
6 | margin-bottom:5vw;
7 | text-align: center;
8 | }
9 |
10 | .input-title{
11 | font-size: 4vw;
12 | text-align: center;
13 | margin-top: 5vw;
14 | font-weight: bold;
15 | }
16 |
17 | .input-remind{
18 | font-size: 3vw;
19 | text-align: center;
20 | margin-top: 4vw;
21 | font-weight: normal;
22 | }
23 |
24 | input{
25 | border-bottom: 1px solid rgba(0,0,0,.1);
26 | margin:0vw auto;
27 | width: 40vw;
28 | text-align: center;
29 | font-size: 3.5vw;
30 | height: 6vw;
31 | }
32 | picker{
33 | height: 5vw;
34 | border-bottom: 1px solid rgba(0,0,0,.1);
35 | margin:5vw auto;
36 | width: 40vw;
37 | text-align: center;
38 | font-size: 3.5vw;
39 | }
40 |
41 | .submit-button{
42 | margin-top: 5vw;
43 | background-color: #1296db;
44 | color: white;
45 | }
46 | .image-choose{
47 | position: relative;
48 | width: 50vw;
49 | height: 50vw;
50 | margin: 5vw auto;
51 | border: 1px solid gainsboro;
52 | border-radius: 10px;
53 | }
54 | .hover{
55 | position: absolute;
56 | top: 0;
57 | left: 0;
58 | width: 50vw;
59 | height: 50vw;
60 | background-color: rgba(0,0,0,.1);
61 | }
62 | .hover-text{
63 | text-align: center;
64 | line-height: 75vw;
65 | font-size: 4vw;
66 | }
67 | .album-icon{
68 | position: absolute;
69 | top: 0;
70 | left: 0;
71 | z-index: 100;
72 | display: block;
73 | width: 30vw;
74 | height: 30vw;
75 | margin: 5vw 10vw;
76 | opacity: .4;
77 | }
78 | .student-card-image{
79 | position: absolute;
80 | z-index: 1000;
81 | left: 0;
82 | top: 0;
83 | width: 50vw;
84 | height: 50vw;
85 | }
--------------------------------------------------------------------------------
/template/activity_item/activity_item.wxss:
--------------------------------------------------------------------------------
1 | .activity_item_wrapper{
2 | position: relative;
3 | width: 100%;
4 | padding-bottom: 10px;
5 | background-color: white;
6 | }
7 | .item-image{
8 | width: 100%;
9 | height: 40vw;
10 | }
11 | .title-wrapper{
12 | position: relative;
13 | padding: 10px;
14 | margin-bottom: 2px;
15 | background-color: white;
16 | }
17 | .title{
18 | display: inline-block;
19 | margin-left: 10px;
20 | width:75vw;
21 | font-size: 16px;
22 | line-height: 20px;
23 | vertical-align: top;
24 | }
25 | .fire{
26 | display: inline-block;
27 | color: red;
28 | vertical-align: 1px;
29 | margin-left: 1px;
30 | }
31 | .phone{
32 | display: inline-block;
33 | vertical-align: 1px;
34 | margin-left: 1px;
35 | font-size: 4vw;
36 | font-weight: bold;
37 | }
38 | .image-wrapper{
39 | width: 12vw;
40 | display: inline-block;
41 | }
42 | .act_icon{
43 | display: inline-block;
44 | width: 12vw;
45 | height: 6vw;
46 | border-radius: 6px;
47 | vertical-align: top;
48 | }
49 | .online-time{
50 | position: absolute;
51 | right: 10px;
52 | bottom: 10px;
53 | font-size: 10px;
54 | line-height: 15px;
55 | vertical-align: top;
56 | color: gainsboro;
57 | }
58 | .intro-text{
59 | padding:0 10px;
60 | font-size: 3.5vw;
61 | line-height: 20px;
62 | max-height: 80px;
63 | overflow:hidden;
64 | }
65 |
66 | .footer-wrapper{
67 | width: 100%;
68 | margin-left: 10px;
69 | }
70 | .vf-wrapper{
71 | display: inline-block;
72 | margin-right: 10px;
73 | }
74 | .vf-icon{
75 | display: inline-block;
76 | font-size: 14px;
77 |
78 | }
79 | .vf-data{
80 | display: inline-block;
81 | font-size: 12px;
82 | }
83 |
--------------------------------------------------------------------------------
/pages/update_info/update_info.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 个人设置
5 |
6 |
7 |
8 |
9 | 昵称:
10 |
11 |
12 |
13 | 手机号码:
14 |
19 |
20 |
27 |
28 | 参加“工大运动达人”
29 |
30 |
31 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/images/record/schedule.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/myinfo/myinfo",
5 | "pages/auth/auth",
6 | "pages/search/search",
7 | "pages/detail/detail",
8 | "pages/sport/sport",
9 | "template/activity_item/activity_item",
10 | "template/user_info_act_item/user_info_act_item",
11 | "pages/search_result/search_result",
12 | "template/rank_item/rank_item",
13 | "pages/update_info/update_info",
14 | "pages/contact_us/contact_us",
15 | "pages/about_us/about_us",
16 | "pages/record2/record2",
17 | "pages/quit_activity/quit_activity",
18 | "pages/phone_auth/phone_auth",
19 | "pages/trainee/trainee_index/trainee_index",
20 | "template/trainee_item/trainee_item",
21 | "pages/trainee/trainee_detail/trainee_detail",
22 | "pages/trainee/trainee_application/trainee_application",
23 | "pages/trainee/trainee_my/trainee_my",
24 | "pages/trainee/trainee_auth/trainee_auth"
25 | ],
26 | "window": {
27 | "backgroundTextStyle": "light",
28 | "navigationBarBackgroundColor": "#1296db",
29 | "navigationBarTitleText": "北工大活动报名平台",
30 | "navigationBarTextStyle": "white",
31 | "enablePullDownRefresh": true
32 | },
33 | "tabBar": {
34 | "color": "#2c2c2c",
35 | "selectedColor": "#1296db",
36 | "borderStyle": "black",
37 | "backgroundColor": "#ffffff",
38 | "position": "bottom",
39 | "list": [
40 | {
41 | "selectedIconPath": "/images/toolbar/activity2.png",
42 | "iconPath": "/images/toolbar/activity.png",
43 | "pagePath": "pages/index/index",
44 | "text": "活动"
45 | },
46 | {
47 | "selectedIconPath": "/images/toolbar/person2.png",
48 | "iconPath": "/images/toolbar/person.png",
49 | "pagePath": "pages/myinfo/myinfo",
50 | "text": "个人"
51 | }
52 | ]
53 | }
54 | }
--------------------------------------------------------------------------------
/pages/trainee/trainee_application/trainee_application.wxss:
--------------------------------------------------------------------------------
1 | /* pages/trainee_application/trainee_application.wxss */
2 |
3 | .apply-header-wrapper {
4 | background-color: ghostwhite;
5 | }
6 |
7 | .header-background-image {
8 | margin: 3vw;
9 | margin-right: 0;
10 | height: 30vw;
11 | width: 30vw;
12 | }
13 |
14 | .line {
15 | display: inline-block;
16 | height: 27vw;
17 | margin-top: 9vw;
18 | margin-bottom: 5vw;
19 | border-left: 2px solid gainsboro;
20 | vertical-align: top;
21 | }
22 |
23 | /*实际宽度为55vw */
24 |
25 | .header-title {
26 | display: inline-block;
27 | width: 55vw;
28 | vertical-align: top;
29 | margin: 5vw 0;
30 | margin-bottom: 0;
31 | padding-left: 5vw;
32 | }
33 |
34 | .title {
35 | margin-top: 5vw;
36 | font-size: 5vw;
37 | font-weight: bold;
38 | }
39 |
40 | .warning-wrapper {
41 | width: 30vw;
42 | margin-left: 8.5vw;
43 | margin-top: 3vw;
44 | font-size: 3.5vw;
45 | font-weight: bold;
46 | line-height: 6vw;
47 | background-color: rgba(0, 172, 107, 0.8);
48 | padding: 2vw;
49 | border-radius: 3px;
50 | color: white;
51 | text-align: center;
52 | }
53 |
54 | .content-wrapper {
55 | padding: 5vw;
56 | width: 90vw;
57 | }
58 | .content-header-wrapper{
59 | width: 20vw;
60 | margin-left: 30vw;
61 | background-color: rgba(30,144,255,.2);
62 | padding: 2vw 4vw;
63 | margin-bottom: 3vw;
64 | border-radius: 2vw;
65 | font-size: 4vw;
66 | font-weight: bold;
67 | text-align: center;
68 | }
69 | .content-item-wrapper{
70 | margin-bottom: 3vw;
71 | }
72 | .content-title {
73 | display: inline-block;
74 | font-size: 4vw;
75 | width: 25vw;
76 | margin-right: 2vw;
77 | text-align: right
78 | }
79 | .content-input{
80 | display: inline-block;
81 | padding: 0 2vw;
82 | width: 50vw;
83 | border: 1px solid gainsboro;
84 | vertical-align: top;
85 | border-radius: 2px;
86 | font-size: 4vw;
87 | }
88 |
--------------------------------------------------------------------------------
/pages/myinfo/myinfo.wxss:
--------------------------------------------------------------------------------
1 | @import '/font.wxss';
2 | @import '/template/user_info_act_item/user_info_act_item.wxss';
3 | /* pages/myinfo/myinfo.wxss */
4 | .header-wrapper{
5 | position: relative;
6 | width: 90%;
7 | margin: 10px auto;
8 | border: 1px solid rgba(0,0,0,.1);
9 | border-radius: 3px;
10 | height: 20vw;
11 | box-shadow: 10px 10px 15px #888888;
12 | }
13 | .avatar{
14 | display: inline-block;
15 | width: 10vw;
16 | height: 10vw;
17 | border-radius: 50%;
18 | margin: 5vw 3vw;
19 | }
20 | .nickname{
21 | display: inline-block;
22 | vertical-align: top;
23 | height: 10vw;
24 | width: 40vw;
25 | overflow:hidden;
26 | white-space: nowrap;
27 | text-overflow:ellipsis;
28 | line-height: 10vw;
29 | margin: 5vw 0;
30 | }
31 | .unsign{
32 | position: absolute;
33 | right: 5vw;
34 | top: 7vw;
35 | width: 23vw;
36 | height: 6vw;
37 | border-radius: 4px;
38 | }
39 | .sign{
40 | position: absolute;
41 | right: 5vw;
42 | top: 7vw;
43 | width: 23vw;
44 | height: 6vw;
45 | border-radius: 4px;
46 | }
47 | .tab-wrapper{
48 | display: flex;
49 | width: 100%;
50 | margin: 10vw 0 ;
51 | }
52 | .tab{
53 | flex: 1;
54 | }
55 | .tab-right-border{
56 | border-right: 2px solid rgba(0,0,0,.3);
57 | }
58 | .tab-image{
59 | display: block;
60 | width: 10vw;
61 | height: 10vw;
62 | margin: 0 auto;
63 | }
64 | .tab-text{
65 | width: 100%;
66 | margin-top: 10px;
67 | text-align: center;
68 | font-size: 4vw;
69 | }
70 | .no-act{
71 | margin: 5vw;
72 | }
73 | .no-act-text{
74 | font-size: 4vw;
75 | line-height: 5vw;
76 | }
77 | .no-act-icon{
78 | margin-right: 3vw;
79 | width: 5vw;
80 | height: 5vw;
81 | vertical-align: middle;
82 | }
83 | .activity-wrapper{
84 | margin: 0 5vw;
85 | }
86 |
87 | .activity-title{
88 | display: inline-block;
89 | vertical-align: 2px;
90 | }
--------------------------------------------------------------------------------
/pages/auth/auth.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 北京工业大学学生注册
4 |
5 |
37 |
--------------------------------------------------------------------------------
/template/rank_item/rank_item.wxss:
--------------------------------------------------------------------------------
1 | /* template/rank_item/rank_item.wxss */
2 |
3 | .rank-item-wrapper {
4 | margin: 5vw auto;
5 | line-height: 7vw;
6 | width: 90%;
7 | }
8 |
9 | .rank-num {
10 | display: inline-block;
11 | margin-right: 5vw;
12 | vertical-align: top;
13 | }
14 |
15 | .rank-avater {
16 | display: inline-block;
17 | width: 7vw;
18 | height: 7vw;
19 | margin-right: 5vw;
20 | border-radius: 50%;
21 | vertical-align: top;
22 | }
23 |
24 | .rank-name {
25 | display: inline-block;
26 | font-size: 4vw;
27 | width:33vw;
28 | overflow: hidden;
29 | text-overflow: ellipsis;
30 | white-space: nowrap;
31 | }
32 |
33 | .rank-step {
34 | float: right;
35 | }
36 |
37 | .rank-one-num {
38 | font-size: 7vw;
39 | color: #1296db;
40 | line-height: 10vw;
41 | }
42 |
43 | .rank-two-num {
44 | font-size: 6.5vw;
45 | color: #1077ad;
46 | line-height: 9vw;
47 | }
48 |
49 | .rank-three-num {
50 | font-size: 6vw;
51 | color: #0a4a6b;
52 | line-height: 8vw;
53 | }
54 |
55 | .rank-one-avater {
56 | width: 10vw;
57 | height: 10vw;
58 | }
59 |
60 | .rank-two-avater {
61 | width: 9vw;
62 | height: 9vw;
63 | }
64 |
65 | .rank-three-avater {
66 | width: 8vw;
67 | height: 8vw;
68 | }
69 |
70 | .rank-one-name {
71 | font-size: 5.5vw;
72 | line-height: 10vw;
73 | color: #1296db;
74 | }
75 |
76 | .rank-two-name {
77 | font-size: 5vw;
78 | line-height: 9vw;
79 | color: #1077ad;
80 | }
81 |
82 | .rank-three-name {
83 | font-size: 4.5vw;
84 | line-height: 8vw;
85 | color: #0a4a6b;
86 | }
87 |
88 | .rank-one-step {
89 | font-size: 7vw;
90 | color: #1296db;
91 | line-height: 10vw;
92 | }
93 |
94 | .rank-two-step {
95 | font-size: 6.5vw;
96 | color: #1077ad;
97 | line-height: 9vw;
98 | }
99 |
100 | .rank-three-step {
101 | font-size: 6vw;
102 | color: #0a4a6b;
103 | line-height: 8vw;
104 | }
105 | .bu{
106 | font-size: 4vw;
107 | color: black;
108 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": false,
5 | "es6": true,
6 | "postcss": false,
7 | "minified": true,
8 | "newFeature": true
9 | },
10 | "compileType": "miniprogram",
11 | "libVersion": "1.6.0",
12 | "appid": "wxbd2bf078a3d48007",
13 | "projectname": "bjut",
14 | "condition": {
15 | "search": {
16 | "current": -1,
17 | "list": []
18 | },
19 | "conversation": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "miniprogram": {
24 | "current": -1,
25 | "list": [
26 | {
27 | "id": -1,
28 | "name": "运动界面",
29 | "pathName": "pages/sport/sport",
30 | "query": "",
31 | "scene": "1001"
32 | },
33 | {
34 | "id": 1,
35 | "name": "记录界面",
36 | "pathName": "pages/record2/record2",
37 | "query": "",
38 | "scene": "1001"
39 | },
40 | {
41 | "id": 4,
42 | "name": "退出活动界面",
43 | "pathName": "pages/quit_activity/quit_activity",
44 | "query": "actid=2&act_title=乔布斯演讲我是个测试题目塑料科技电话费了看见爱上"
45 | },
46 | {
47 | "id": -1,
48 | "name": "注册界面",
49 | "pathName": "pages/auth/auth",
50 | "query": ""
51 | },
52 | {
53 | "id": -1,
54 | "name": "个人设置界面",
55 | "pathName": "pages/update_info/update_info",
56 | "query": "",
57 | "scene": "1001"
58 | },
59 | {
60 | "id": 5,
61 | "name": "实习界面",
62 | "pathName": "pages/trainee/trainee_index/trainee_index",
63 | "query": ""
64 | },
65 | {
66 | "id": 6,
67 | "name": "实习详情界面",
68 | "pathName": "pages/trainee/trainee_detail/trainee_detail",
69 | "query": "trainee_id=1"
70 | },
71 | {
72 | "id": -1,
73 | "name": "我的实习界面",
74 | "pathName": "pages/trainee/trainee_my/trainee_my",
75 | "query": ""
76 | },
77 | {
78 | "id": 8,
79 | "name": "申请实习界面",
80 | "pathName": "pages/trainee/trainee_application/trainee_application",
81 | "query": "trainee_id=1"
82 | }
83 | ]
84 | }
85 | }
86 | }
--------------------------------------------------------------------------------
/images/userinfo/fav2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/detail/fav.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/about_us/about_us.js:
--------------------------------------------------------------------------------
1 | // about_us.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | title: "北工大活动报名平台",
9 | content: "北工大活动平台致力于为同学们提供更加便捷的服务,使同学们通过更方便的途径了解工大新闻,参加工大活动。",
10 | content_principle: "平台总则",
11 | principle: [{message:"用户在使用本平台的过程中不得违反国家法律法规。"},
12 | {message:"本规定适用于平台所有用户。"},
13 | {message:"本平台负责本规定的解释与执行。"}],
14 | private_info_title: "隐私政策",
15 | private_descript:"本平台的所有者,承诺保护您的在线隐私权。请阅读下列声明以便了解您在本平台登录以及使用本平台服务时,您的个人信息将会得到的对待。",
16 | private_info: [
17 | {
18 | title:"个人信息的收集",
19 | message:"当您使用本平台,以及通过平台参加活动时,即为您同意本平台将收集您的个人信息,并保存记录。本平台收集的个人信息包括但不限于:昵称、头像等。"
20 | },
21 | {
22 | title:"个人信息的使用",
23 | message:"本平台收集个人信息的基本目的是为了更好的了解我们的用户,以便向您提供特色服务和个性化服务。个人信息将主要用于以下几个目的:(1)对参加活动的用户进行及时的通知(2)用于平台信息的统计,如用户数量等。"
24 | },
25 | {
26 | title:"个人信息的共享和披露",
27 | message:"本平台收集您的个人信息,将仅用于为您提供相关服务,在未得到您的同意之前,您的任何个人信息将不会被提供给无关的第三方。 "
28 | }
29 | ],
30 | copy_right_title: "版权说明",
31 | copy_right_message: "所有“内容”的版权归平台所有。您不得擅自进行任何分销、出售、修改、反编译、逆向工程、解拆或出于商业目的使用平台提供的内容。"
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面加载
36 | */
37 | onLoad: function (options) {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面初次渲染完成
43 | */
44 | onReady: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面显示
50 | */
51 | onShow: function () {
52 |
53 | },
54 |
55 | /**
56 | * 生命周期函数--监听页面隐藏
57 | */
58 | onHide: function () {
59 |
60 | },
61 |
62 | /**
63 | * 生命周期函数--监听页面卸载
64 | */
65 | onUnload: function () {
66 |
67 | },
68 |
69 | /**
70 | * 页面相关事件处理函数--监听用户下拉动作
71 | */
72 | onPullDownRefresh: function () {
73 |
74 | },
75 |
76 | /**
77 | * 页面上拉触底事件的处理函数
78 | */
79 | onReachBottom: function () {
80 |
81 | },
82 |
83 | /**
84 | * 用户点击右上角分享
85 | */
86 | onShareAppMessage: function () {
87 |
88 | }
89 | })
--------------------------------------------------------------------------------
/pages/trainee/trainee_detail/trainee_detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/trainee_detail/trainee_detail.wxss */
2 | @import '/font.wxss';
3 | /*收藏按钮样式 */
4 | .collection-button-wrapper{
5 | position: absolute;
6 | top: 5vw;
7 | right: 5vw;
8 | width: 8vw;
9 | height: 8vw;
10 | }
11 | .collection-button-wrapper > image {
12 | width: 8vw;
13 | height: 8vw;
14 | }
15 |
16 | .header-wrapper{
17 | width: 80vw;
18 | padding-top: 3vw;
19 | padding-left: 5vw;
20 | }
21 | .position-wrapper{
22 | font: 7vw;
23 | font-weight: bold;
24 | }
25 | .company-wrapper{
26 | display: inline-block;
27 | margin-top: 2vw;
28 | margin-left: -3vw;
29 | padding: 2vw;
30 | font-size: 3.5vw;
31 | color: sandybrown;
32 | background-color: whitesmoke;
33 | border-radius: 5px;
34 | }
35 | .gap{
36 | margin-top: 3vw;
37 | width: 100%;
38 | height: 4px;
39 | border-top: 1px solid rgba(0, 0, 0, 0.1);
40 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
41 | background-color: ghostwhite;
42 | }
43 |
44 | .gap2{
45 | width: 80vw;
46 | margin: 2vw 0vw;
47 | border-top: 1px solid gainsboro;
48 | }
49 |
50 | .sub-info-wrapper{
51 | padding: 2vw 4vw;
52 | padding-right: 1vw;
53 | }
54 |
55 | .sub-info-item{
56 | display: inline-block;
57 | width: 31vw;
58 | font-size: 3.5vw;
59 | text-align: left;
60 | color: grey;
61 | }
62 | .sub-info-item-edu{
63 | width: 40vw;
64 | }
65 |
66 | .trainee-intro-wrapper{
67 | margin: 3vw;
68 | }
69 |
70 | .title{
71 | font-size: 5vw;
72 | font-weight: 600;
73 | }
74 | .title > text {
75 | font-size:3vw;
76 | font-weight:100;
77 | color:gray;
78 | }
79 |
80 | .trainee-intro-content{
81 | padding: 3vw;
82 | font-size: 4vw;
83 | background-color: rgba(255, 250, 205, .2);
84 | border-radius: 10px;
85 | }
86 |
87 | .map-title{
88 | width: 20vw;
89 | padding-right: 2vw;
90 | display: inline-block;
91 | border-right: 1px solid gainsboro;
92 | font-size: 5vw;
93 | font-weight: 600;
94 | margin: 2vw;
95 | }
96 |
97 | .map-title-sub{
98 | font-size: 3vw;
99 | width: 70vw;
100 | display: inline-block;
101 | overflow:hidden;
102 | text-overflow:ellipsis;
103 | vertical-align: text-bottom;
104 | }
--------------------------------------------------------------------------------
/images/userinfo/join2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_my/trainee_my.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 您还没有收藏职位
40 |
41 |
42 |
43 |
44 |
45 |
46 | {{item.position}}
47 | {{item.company}}
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/pages/record2/record2.wxss:
--------------------------------------------------------------------------------
1 | /* pages/record2/record2.wxss */
2 | .bg-wrapper > image {
3 | position: absolute;
4 | top: 0;
5 | left: 0;
6 | z-index: -10;
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .title{
11 | margin-top: 10vw;
12 | text-align: center;
13 | font-size: 10vw;
14 | }
15 | .my_record_wrapper {
16 | margin-top: 5vw;
17 | }
18 | .record_cup{
19 | width: 9vw;
20 | height: 9vw;
21 | margin: 2vw 45.5vw;
22 | animation:move_cup .5s infinite;
23 | animation-direction:alternate;
24 | z-index: 200;
25 | }
26 |
27 | @keyframes move_cup
28 | {
29 | from {transform: translate(0,0vw);}
30 | to {transform: translate(0,-2vw);}
31 | }
32 |
33 | .cup_shadow{
34 | margin: 0 auto;
35 | margin-top: -2vw;
36 | margin-bottom: 5vw;
37 | padding: 0;
38 | width: 7vw;
39 | height: 2vw;
40 | background-color: grey;
41 | border-radius: 50%;
42 | animation:cup_shadow .5s infinite;
43 | animation-direction:alternate;
44 | }
45 | @keyframes cup_shadow
46 | {
47 | from {transform: scale(1,1); opacity: 1;}
48 | to {transform: scale(1.2,1.1); opacity: .8;}
49 | }
50 |
51 | .content-wrapper{
52 | width: 75vw;
53 | padding: 5vw;
54 | background-color: rgba(255, 255, 255, .3);
55 | margin: 0 7.5vw;
56 | border-top-right-radius: 10vw;
57 | border-bottom-left-radius: 10vw;
58 | }
59 | .content-item-wrapper{
60 | margin: 5vw 0;
61 | }
62 | .front-icon {
63 | width: 6vw;
64 | height: 6vw;
65 | display: inline-block;
66 | vertical-align: top;
67 | margin-right: 1vw;
68 | margin-top: 1vw;
69 | }
70 | .content{
71 | display: inline-block;
72 | /* width: 65vw; */
73 | width: calc(100% - 8vw);
74 | font-size: 4vw;
75 | }
76 | .clock-in{
77 | color: #CC3333;
78 | font-size: 7vw;
79 | font-weight: bold;
80 | font-style: italic;
81 | }
82 | .champion-count{
83 | color: #FFA500;
84 | font-size: 7vw;
85 | font-weight: bold;
86 | font-style: italic;
87 | }
88 | .ave-step{
89 | color: #99CC33;
90 | font-size: 6vw;
91 | font-weight: bold;
92 | font-style: italic;
93 | }
94 |
95 | .remark{
96 | margin: 5vw 7.5vw;
97 | padding: 0 5vw;
98 | width: calc(100%-10vw);
99 | font-size: 3vw;
100 | }
101 | .remark view{
102 | line-height: 5vw;
103 | }
--------------------------------------------------------------------------------
/pages/trainee/trainee_index/trainee_index.js:
--------------------------------------------------------------------------------
1 | // pages/trainee/trainee.js
2 | var trainData = require('../../../trainee.js');
3 | var app = getApp();
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | // 触发功能按钮参数
11 | pop: false,
12 | trainee_data: trainData.trainee.trainee_data
13 | },
14 |
15 |
16 | onLoad: function (options) {
17 |
18 | },
19 |
20 | onReady: function () {
21 |
22 | },
23 |
24 | /**
25 | * 生命周期函数--监听页面显示
26 | */
27 | onShow: function () {
28 |
29 | },
30 |
31 | /**
32 | * 生命周期函数--监听页面隐藏
33 | */
34 | onHide: function () {
35 |
36 | },
37 |
38 | /**
39 | * 生命周期函数--监听页面卸载
40 | */
41 | onUnload: function () {
42 |
43 | },
44 |
45 | /**
46 | * 页面相关事件处理函数--监听用户下拉动作
47 | */
48 | onPullDownRefresh: function () {
49 |
50 | },
51 |
52 | /**
53 | * 页面上拉触底事件的处理函数
54 | */
55 | onReachBottom: function () {
56 |
57 | },
58 |
59 | /**
60 | * 用户点击右上角分享
61 | */
62 | onShareAppMessage: function () {
63 |
64 | },
65 | click_function_button: function () {
66 | console.log('点击了功能按钮...');
67 | this.setData({
68 | pop: !this.data.pop
69 | })
70 | },
71 | // 点击trainee_item
72 | click_item: function (e) {
73 | var trainee_id = e.currentTarget.dataset.traineeid;
74 | wx.navigateTo({
75 | url: '/pages/trainee/trainee_detail/trainee_detail?' + trainee_id,
76 | })
77 | console.log("点击了实习item", e.currentTarget.dataset.traineeid);
78 | },
79 |
80 | //点击了弹出的二级按钮
81 | click_sub_button: function(e){
82 | var target = e.currentTarget.dataset.function;
83 | var target_url = ''
84 | console.log('跳转到我的实习界面', target);
85 | switch (target) {
86 | //跳转到 我的实习 界面
87 | case 'my':
88 | target_url = '/pages/trainee/trainee_my/trainee_my';
89 | break;
90 | case 'auth_result':
91 | target_url = '/pages/trainee/trainee_auth/trainee_auth';
92 | break;
93 | case 'application':
94 | target_url = '/pages/trainee/trainee_application/trainee_application';
95 | break;
96 | }
97 | wx.navigateTo({
98 | url: target_url,
99 | });
100 | this.setData({
101 | pop: false
102 | });
103 | }
104 | })
--------------------------------------------------------------------------------
/pages/trainee/trainee_detail/trainee_detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{trainee_data.location}}
22 |
23 |
24 |
25 | {{trainee_data.min_time}}
26 |
27 |
28 |
29 | {{trainee_data.target}}
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{trainee_data.salary}}
37 |
38 |
39 |
40 | {{trainee_data.education_background}}
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 公司位置
50 | {{trainee_data.main_location}}
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 职位描述
59 | (具体信息以公司提供信息为主)
60 |
61 |
62 |
63 | {{trainee_data.content}}
64 |
65 |
66 |
--------------------------------------------------------------------------------
/pages/quit_activity/quit_activity.js:
--------------------------------------------------------------------------------
1 | // pages/quit_activity/quit_activity.js
2 | var app = getApp();
3 | Page({
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | quit_reason: ["请选择您取消的原因", "操作失误", "对活动内容不感兴趣", "时间有冲突", "其他原因"],
9 | index_reason: 0
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 | this.setData({
17 | actid: options.actid,
18 | act_title: options.act_title
19 | });
20 | this.get_user_name();
21 | },
22 | onShow: function(){
23 | },
24 | reason_picker: function (e) {
25 | console.log('this is reason_picker');
26 | var r_index = e.detail.value;
27 | this.setData({
28 | index_reason: r_index
29 | });
30 | },
31 | get_user_name: function () {
32 | self = this;
33 | var send_data = { bjut_id: wx.getStorageSync('user_key') };
34 | app.SendRequest('/api/get_user_info', send_data, function (res) {
35 | var user_info = res.data.user_info;
36 | self.setData({
37 | user_name: user_info.name,
38 | student_id: user_info.studentID
39 | });
40 | });
41 | },
42 | // 点击提交按钮
43 | form_submit: function (e) {
44 | self = this;
45 | var quit_data = {};
46 |
47 | if (this.data.index_reason == 0) {
48 | console.log("用户没有选择原因");
49 | wx.showModal({
50 | title: '请您选择退出原因',
51 | content: '请您选择退出活动原因,以便管理人员统计~',
52 | })
53 | } else {
54 | var join_data = {
55 | bjut_id: wx.getStorageSync('user_key'),
56 | activityID: self.data.actid
57 | };
58 | app.SendRequest('/api/quit_activity', join_data, function (res) {
59 | console.log('取消活动返回信息收到...');
60 | if (res.data.erron) {
61 | wx.showToast({
62 | title: '服务器出错',
63 | icon: 'fail'
64 | });
65 | setTimeout(function () {
66 | wx.navigateTo({
67 | url: '/pages/detail/detail?actid=' + self.data.actid,
68 | });
69 | }, 1500);
70 | } else {
71 | wx.showToast({
72 | title: '取消活动成功',
73 | icon: 'success'
74 | });
75 | setTimeout(function () {
76 | wx.navigateBack({});
77 | // wx.navigateTo({
78 | // url: '/pages/detail/detail?actid=' + self.data.actid,
79 | // })
80 | }, 1500);
81 | }
82 | });
83 | }
84 | }
85 | })
--------------------------------------------------------------------------------
/pages/myinfo/myinfo.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 | 参加的活动
16 |
17 |
18 |
19 | 收藏的活动
20 |
21 |
22 |
23 |
24 | 我参加的活动
25 | 我收藏的活动
26 |
27 |
28 |
29 | 您还没有参加活动哦~
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 您还没有收藏活动哦~
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/images/detail/has_fav.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/detail/has_join.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/icon/trainee-auth-result.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/record2/record2.js:
--------------------------------------------------------------------------------
1 | // pages/record2/record2.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | // 用户近七天平均步数
10 | ave_step: 0
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | this.initPage();
18 | },
19 | initPage: function (){
20 | var self = this;
21 | var get_avg_rank = {
22 | bjut_id: wx.getStorageSync('user_key'),
23 | nDays: 7
24 | };
25 | // 查询冠军信息
26 | app.SendRequest('/api/find_wx_rundata_by_id', {'bjut_id': wx.getStorageSync('user_key')}, function(res){
27 | console.log('查询到打卡天数:', res);
28 | let temp = res.data.data;
29 | // 获得冠军的日期
30 | let school_champion_dates = self.date_formate(temp.schoolChampionDates);
31 | self.setData({
32 | clock_in_count: temp.clockInCount,
33 | school_champion_dates: school_champion_dates
34 | });
35 | });
36 | // 获得近七天平均步数
37 | app.SendRequest('/api/get_wx_avg_step_by_id', {'bjut_id': wx.getStorageSync('user_key')}, function(res) {
38 | self.setData({
39 | ave_step: res.data.data
40 | })
41 | });
42 | // 在没有获得冠军的情况下 获取最优记录
43 | app.SendRequest('/api/get_best_rank_by_bjut_id', { 'bjut_id': wx.getStorageSync('user_key') }, function(res){
44 | console.log('this is best success');
45 | console.log(res);
46 |
47 | if(res.data.data == null){
48 | self.setData({
49 | best_mark: false
50 | });
51 | } else {
52 | // 存在最佳记录
53 | var date_list =[];
54 | var best_record = res.data.data.ranks;
55 | date_list.push(best_record.date);
56 | var best_date = self.date_formate(date_list);
57 | self.setData({
58 | best_date: best_date[0],
59 | best_rank: best_record.rank,
60 | best_percentage: best_record.defeatPercentage,
61 | best_mark: true
62 | });
63 | // 获取最佳 击败 百分数
64 | var defeat_data = res.data.defeatPercentage.ranks;
65 | self.setData({
66 | defeat_date: self.date_formate([defeat_data.date])[0],
67 | defeat_percentage: defeat_data.defeatPercentage
68 | });
69 | }
70 |
71 | });
72 | },
73 |
74 | // 格式化时间(年、月、日) 传入参数为数组格式
75 | date_formate: function(t_date) {
76 | var result_date_list = [];
77 | for (let i=0; i
2 |
3 |
4 |
5 |
6 | 我的运动记录
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 | 这是您第{{clock_in_count}} 天连续登陆运动达人
19 |
20 |
21 |
22 |
23 |
24 | 暂无记录
25 | 您最好的名次是在{{best_date}}那天获得的全校第{{best_rank}}名
26 |
27 |
28 |
29 |
30 | {{school_champion_dates[0]}},那天您第一次获得了全校冠军,成为了工大的运动达人!
31 |
32 |
33 |
34 | 自从使用工大运动达人以来,您已经获得 {{school_champion_dates.length}} 次工大冠军!
35 |
36 |
37 |
38 |
39 |
40 | 暂无记录
41 | 在{{defeat_date}}那天,您击败了工大{{defeat_percentage}}%的人
42 |
43 |
44 |
45 |
46 | 您近七天的平均步数为{{ave_step}} 步
47 |
48 |
49 |
50 | 您近期的运动状况良好,请继续保持~
51 | 您最近运动量有点少,请注意坚持锻炼身体哦~
52 |
53 |
54 |
59 |
--------------------------------------------------------------------------------
/images/icon/trainee-send.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/userinfo/no_act.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_index/trainee_index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/pages/update_info/update_info.js:
--------------------------------------------------------------------------------
1 | // update_info.js
2 | var app = getApp();
3 | Page({
4 | data: {
5 | rank_switch: false,
6 | nickName: '',
7 | user_info: {},
8 | new_nickName: '',
9 | switch_statu: '',
10 | phone_number: '',
11 | phone_input_mark: false
12 | },
13 |
14 | onLoad: function (options) {
15 | },
16 |
17 | onReady: function () {
18 | },
19 |
20 | onShow: function () {
21 | app.SendRequest('/api/get_user_info', { bjut_id: wx.getStorageSync('user_key') }, this.get_user_info_request_suc);
22 | },
23 |
24 | switch1Change: function (e) {
25 | this.setData({
26 | switch_statu: e.detail.value
27 | });
28 | },
29 | get_user_info_request_suc: function (res) {
30 | console.log(res);
31 | var phone = res.data.user_info.phone_number;
32 | if(phone == "" || phone == null){
33 | console.log('用户没有手机号');
34 | } else {
35 | console.log('用户有手机号');
36 | // 手机号输入框是否disable
37 | this.setData({
38 | phone_input_mark: true
39 | });
40 | }
41 | this.setData({
42 | user_info: res.data.user_info,
43 | new_nickName: res.data.user_info.nickName,
44 | switch_statu: res.data.user_info.rank_switch,
45 | phone_number: phone
46 | });
47 | },
48 | // 点击提交按钮
49 | click_save: function () {
50 | let _this = this;
51 | console.log(this.data.phone_number.length);
52 | if(this.data.phone_number.length !=11) {
53 | wx.showModal({
54 | title: '信息错误',
55 | content: '手机号格式不正确',
56 | });
57 | } else if (this.data.phone_number.length == 11 && !this.data.phone_input_mark) { // 格式正确 手机号进行了修改
58 | wx.showModal({
59 | title: '提示',
60 | content: '手机号一经提交,不得修改,您确认提交此手机号吗?',
61 | success: function(res) {
62 | // 确认修改手机号
63 | if(res.confirm) {
64 | let setting_data = {
65 | _id: _this.data.user_info._id,
66 | nickName: _this.data.new_nickName,
67 | rank_switch: _this.data.switch_statu,
68 | phone_number: _this.data.phone_number
69 | }
70 | app.SendRequest('/api/update_student', setting_data, _this.user_setting_success_cb);
71 | }
72 | }
73 | })
74 |
75 | }
76 | },
77 | user_setting_success_cb: function (res) {
78 | console.log(res);
79 | wx.showToast({
80 | title: '修改成功!',
81 | duration: 2000,
82 | });
83 | setTimeout(function () {
84 | wx.navigateBack({
85 | delta: 1,
86 | });
87 | }, 2000);
88 | },
89 | input_change: function (e) {
90 | this.setData({
91 | new_nickName: e.detail.value
92 | });
93 | },
94 | phone_number_change: function(e) {
95 | this.setData({
96 | phone_number: e.detail.value
97 | });
98 | }
99 | })
--------------------------------------------------------------------------------
/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 | 活动内容
15 |
16 |
17 | 活动信息
18 |
19 |
20 |
21 |
22 |
23 |
24 | 截止时间
25 | {{formate_act_date}}
26 |
27 |
28 | 活动地点
29 | {{detail_data.activityLocation}}
30 |
31 |
32 | 主办方
33 | {{detail_data.activityHolder}}
34 |
35 |
36 | 活动时长
37 | {{detail_data.duration}}分钟
38 |
39 |
40 | 报名人数
41 | {{detail_data.joinStu.length}}人
42 |
43 |
44 | *备注: {{detail_data.remark}}
45 |
46 |
47 |
48 |
49 |
50 |
51 |
61 |
67 |
73 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_my/trainee_my.wxss:
--------------------------------------------------------------------------------
1 | /* pages/trainee_my/trainee_my.wxss */
2 |
3 | @import '/font.wxss';
4 |
5 | /*小白wrapper的宽度为40vw */
6 | .xiaobai-wrapper{
7 | display: inline-block;
8 | padding: 5vw;
9 | }
10 | .cl-xb{
11 | width:30vw;
12 | height: 30vw;
13 | }
14 | .line{
15 | display: inline-block;
16 | height: 25vw;
17 | border-left: 1px solid gainsboro;
18 | margin-top: 8vw;
19 | vertical-align: top;
20 | }
21 |
22 | /*内边距5vw 宽度45vw 内容宽度35*/
23 | .user-info-wrapper{
24 | display: inline-block;
25 | padding: 5vw;
26 | width: 49vw;
27 | vertical-align: top;
28 | }
29 | .avater-image{
30 | display: inline-block;
31 | width: 10vw;
32 | height: 10vw;
33 | border-radius: 50%;
34 | }
35 |
36 | .name-wrapper{
37 | max-width: 30vw;
38 | margin-left: 3vw;
39 | display: inline-block;
40 | font-size: 4vw;
41 | font-weight: 500;
42 | vertical-align: top;
43 | line-height: 10vw;
44 | overflow: hidden;
45 | text-overflow:ellipsis;
46 | white-space: nowrap;
47 | }
48 | /*标签样式 */
49 | .sub-info-item{
50 | display: inline-block;
51 | padding: .8vw;
52 | font-size: 3vw;
53 | border-radius: 5px;
54 | background-color: gold;
55 | margin-left: 2vw;
56 | }
57 |
58 | .sub-1{
59 | animation: float1 1s ease-in-out infinite alternate;
60 | background-color: #F7EB9E;
61 | }
62 | .sub-2{
63 | animation: float2 1.2s ease-in-out infinite alternate;
64 | background-color: #B1C914;
65 | }
66 | .sub-3{
67 | animation: float3 .9s ease-in-out infinite alternate;
68 | background-color: #FAD900;
69 | }
70 | .sub-4{
71 | animation: float4 1.1s ease-in-out infinite alternate;
72 | background-color: #27B3B8;
73 | }
74 | .sub-5{
75 | animation: float5 1.8s ease-in-out infinite alternate;
76 | background-color: #FF730D;
77 | }
78 |
79 |
80 | @keyframes float1 {
81 | from { transform: translate(0,.5vw);}
82 | to {transform: translate(0,-.5vw);}
83 | }
84 |
85 | @keyframes float2 {
86 | from { transform: translate(0,.8vw);}
87 | to {transform: translate(0,-.8vw);}
88 | }
89 |
90 | @keyframes float3 {
91 | from { transform: translate(0,.2vw);}
92 | to {transform: translate(0,-.2vw);}
93 | }
94 |
95 | @keyframes float4 {
96 | from { transform: translate(0,.3vw);}
97 | to {transform: translate(0,-.3vw);}
98 | }
99 |
100 | @keyframes float5 {
101 | from { transform: translate(0,.6vw);}
102 | to {transform: translate(0,-.6vw);}
103 | }
104 |
105 | /*没有收藏wrapper */
106 | .no-collection-wrapper{
107 | margin-top: 20vw;
108 | }
109 | .no-coll-item{
110 | margin-top: 5vw;
111 | text-align: center;
112 | font-size: 7vw;
113 | color: #D3D3D3;
114 | }
115 |
116 | .collection-item{
117 | display: inline-block;
118 | width: 42vw;
119 | margin: 2.6vw;
120 | margin-right: 0;
121 | margin-bottom: 0;
122 | padding: 1.5vw;
123 | border: .5vw solid gainsboro;
124 | border-radius: 1vw;
125 | }
126 | .col-logo{
127 | height: 10vw;
128 | width: 10vw;
129 | margin:2vw 16vw;
130 | }
131 |
132 | .col-company{
133 | color: gray;
134 | font-size: 3vw;
135 | text-align: center;
136 | }
137 | .col-position{
138 | font-size: 4vw;
139 | font-weight: 500;
140 | text-align: center;
141 | margin-bottom: 2vw;
142 | }
--------------------------------------------------------------------------------
/pages/search_result/search_result.js:
--------------------------------------------------------------------------------
1 | // pages/search_result/search_result.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 |
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 | this.search(options.keyword);
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面初次渲染完成
21 | */
22 | onReady: function () {
23 |
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面显示
28 | */
29 | onShow: function () {
30 |
31 | },
32 |
33 | /**
34 | * 生命周期函数--监听页面隐藏
35 | */
36 | onHide: function () {
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面卸载
42 | */
43 | onUnload: function () {
44 |
45 | },
46 |
47 | /**
48 | * 页面相关事件处理函数--监听用户下拉动作
49 | */
50 | onPullDownRefresh: function () {
51 |
52 | },
53 |
54 | /**
55 | * 页面上拉触底事件的处理函数
56 | */
57 | onReachBottom: function () {
58 |
59 | },
60 |
61 | /**
62 | * 用户点击右上角分享
63 | */
64 | onShareAppMessage: function () {
65 |
66 | },
67 | search: function(keyword){
68 | this.setData({
69 | keyword: keyword
70 | });
71 | app.SendRequest('/api/search_keyword', { keyword: keyword }, this.search_suc);
72 | },
73 | search_suc: function(res){
74 | console.log(res);
75 | this.setData({
76 | search_res: res.data.activity
77 | });
78 | },
79 | input_done: function (e) {
80 | self = this;
81 | var value = e.detail.value;
82 | this.setData({
83 | input_key: value
84 | });
85 | // 添加历史记录
86 | if (!wx.getStorageSync('search_history')) {
87 | var temp_sh = [value];
88 | wx.setStorageSync('search_history', temp_sh);
89 | this.setData({
90 | search_history: temp_sh
91 | });
92 | } else {
93 | var temp_sh = wx.getStorageSync('search_history');
94 | if (temp_sh.indexOf(value) < 0) {
95 | temp_sh.push(value);
96 | wx.setStorageSync('search_history', temp_sh);
97 | this.setData({
98 | search_history: temp_sh
99 | });
100 | }
101 | }
102 | // 发送查询请求
103 | var search_data = {
104 | keyword: value
105 | };
106 | app.SendRequest('/api/search_keyword', search_data, self.input_done_request_suc);
107 | },
108 | // 请求成功回调函数
109 | input_done_request_suc: function (res) {
110 | var search_res = res.data.activity;
111 | if (search_res.length == 0) {
112 | wx.showToast({
113 | title: '没有查询到您想要的结果',
114 | image: '/images/icon/cry.svg'
115 | });
116 | } else {
117 | wx.navigateTo({
118 | url: '/pages/search_result/search_result?keyword=' + this.data.input_key,
119 | });
120 | }
121 | },
122 | // 点击活动进入活动详情页面
123 | click_activity: function (e) {
124 | console.log(e.currentTarget.dataset.actid);
125 | let actid = e.currentTarget.dataset.actid;
126 | let user_key = wx.getStorageSync('user_key');
127 | wx.navigateTo({
128 | url: '/pages/detail/detail?actid=' + actid,
129 | });
130 | },
131 | })
--------------------------------------------------------------------------------
/images/icon/trainee-send2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/record/medal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/trainee/trainee_my/trainee_my.js:
--------------------------------------------------------------------------------
1 | // pages/trainee_my/trainee_my.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | school: 812,
10 | verify_mark: false,
11 | collection_data: [{
12 | id:1,
13 | logo: '/images/trainee/baidu.svg',
14 | company: '北京百度在线网络技术有限公司',
15 | position: 'java后端工程师'
16 | },
17 | {
18 | id:2,
19 | logo: '/images/trainee/tencent.svg',
20 | company: '深圳市腾讯计算机系统有限公司',
21 | position: '前端开发'
22 | },
23 | {
24 | id: 3,
25 | logo: '/images/trainee/tencent.svg',
26 | company: '深圳市腾讯计算机系统有限公司',
27 | position: '前端开发'
28 | }
29 | ]
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面加载
34 | */
35 | onLoad: function (options) {
36 | var user_key = wx.getStorageSync('user_key');
37 | var send_data = { _id: user_key };
38 | app.SendRequest('/api/users/all', send_data, this.get_user_info_request_suc);
39 | // 获得学校列表
40 | app.SendRequest('/api/other_school/all', {}, this.get_other_school_request_suc);
41 | },
42 | check_auth_state: function (userinfo) {
43 | var _this = this;
44 | // 用户已认证
45 | if (userinfo.verify_state == 0) {
46 | // 根据学院id获取学院
47 | app.SendRequest('/api/find_academy_by_number', { academy_number: userinfo.academy}, function(res){
48 | _this.setData({
49 | academy: res.data.academy_name
50 | });
51 | });
52 | this.setData({
53 | enter_year: userinfo.enter_year,
54 | verify_mark: true
55 | });
56 | }
57 | },
58 | check_school: function(school) {
59 | if (school == undefined) { // 没有学校的情况下将学校值设为812
60 | this.setData({
61 | school: 812
62 | });
63 | } else {
64 | this.setData({
65 | school: school
66 | });
67 | }
68 | },
69 | get_user_info_request_suc: function(res){
70 | console.log(res);
71 | var user_info = res.data.data[0];
72 | // 判断用户认证状态, 并对相应数据复制
73 | this.check_auth_state(user_info);
74 | // 判断有无学校(因为所属学校是之后加入的数据)
75 | this.check_school(user_info.school);
76 | this.setData({
77 | user_info: res.data.data[0],
78 | });
79 | },
80 | // 获取学校列表回调函数
81 | get_other_school_request_suc: function(res){
82 | console.log(res.data.data[0].other_school);
83 | this.setData({
84 | other_school_list: res.data.data[0].other_school
85 | });
86 | },
87 | onReady: function () {
88 |
89 | },
90 |
91 | onShow: function () {
92 | },
93 |
94 | /**
95 | * 生命周期函数--监听页面隐藏
96 | */
97 | onHide: function () {
98 |
99 | },
100 |
101 | /**
102 | * 生命周期函数--监听页面卸载
103 | */
104 | onUnload: function () {
105 |
106 | },
107 |
108 | /**
109 | * 页面相关事件处理函数--监听用户下拉动作
110 | */
111 | onPullDownRefresh: function () {
112 |
113 | },
114 |
115 | /**
116 | * 页面上拉触底事件的处理函数
117 | */
118 | onReachBottom: function () {
119 |
120 | },
121 |
122 | /**
123 | * 用户点击右上角分享
124 | */
125 | onShareAppMessage: function () {
126 |
127 | },
128 | // 点击收藏的模块
129 | cilck_col_item: function (id) {
130 | console.log(id.currentTarget.dataset.id);
131 | wx.navigateTo({
132 | url: '/pages/trainee/trainee_detail/trainee_detail?trainee_id=' + id.currentTarget.dataset.id,
133 | });
134 | }
135 | })
--------------------------------------------------------------------------------
/images/record/basketball-1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | @import '/font.wxss';
2 |
3 | .gap {
4 | width: 100%;
5 | height: 2vw;
6 | border-top: 1px solid rgba(0, 0, 0, 0.1);
7 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
8 | background-color: ghostwhite;
9 | }
10 |
11 | .header {
12 | margin: 5vw;
13 | }
14 |
15 | .title {
16 | display: inline-block;
17 | font-size: 5vw;
18 | margin-right: 2vw;
19 | }
20 |
21 | .fire {
22 | display: inline;
23 | color: orangered;
24 | font-size: 5vw;
25 | margin-left: 2vw;
26 | }
27 |
28 | .online-date {
29 | margin-top: 2vw;
30 | font-size: 3vw;
31 | color: gainsboro;
32 | }
33 |
34 | .tag-wrapper {
35 | display: flex;
36 | margin: 10px;
37 | }
38 |
39 | .tag {
40 | flex: 1;
41 | text-align: center;
42 | font-size: 4vw;
43 | padding: 1vw 0vw;
44 | margin: 0 5vw;
45 | border-radius: 1.5vw;
46 | }
47 |
48 | .tag-selected {
49 | background-color: #1296db;
50 | color: snow;
51 | transition: all 0.5s;
52 | }
53 |
54 | .act-info-wrapper {
55 | margin: 5vw;
56 | font-size: 4vw;
57 | margin-top: 10vw;
58 | }
59 |
60 | .tr {
61 | display: flex;
62 | }
63 |
64 | .tr-blue {
65 | background-color: rgba(18, 150, 219, 0.2);
66 | }
67 |
68 | .td1 {
69 | flex: 1;
70 | height: 8vw;
71 | line-height: 8vw;
72 | text-align: right;
73 | padding-right: 5vw;
74 | border-right: 1px solid rgba(0, 0, 0, 0.1);
75 | }
76 |
77 | .td2 {
78 | flex: 2;
79 | height: 8vw;
80 | line-height: 8vw;
81 | margin-left: 8vw;
82 | overflow: hidden;
83 | white-space: nowrap;
84 | text-overflow: ellipsis;
85 | }
86 |
87 | .footer {
88 | position: fixed;
89 | bottom: 0px;
90 | left: 0;
91 | width: 100%;
92 | background-color: white;
93 | }
94 |
95 | .button-common {
96 | display: inline-block;
97 | width: 46vw;
98 | height: 12vw;
99 | margin: 2vw 2vw;
100 | border-radius: 5px;
101 | text-align: center;
102 | line-height: 12vw;
103 | font-size: 4vw;
104 | transition: all 0.5s;
105 | color: white;
106 | }
107 |
108 | .button-icon {
109 | margin-right: 2vw;
110 | vertical-align: -1.5vw;
111 | width: 6vw;
112 | height: 6vw;
113 | }
114 |
115 | .button-text {
116 | text-align: top;
117 | }
118 |
119 | .has {
120 | background-color: #32cd32;
121 | }
122 |
123 | .un-has {
124 | background: rgba(18, 150, 219, 1);
125 | }
126 |
127 | .expired {
128 | background-color: grey;
129 | }
130 |
131 | .other-wrapper {
132 | margin-top: 5vw;
133 | font-size: 3vw;
134 | color: lightslategray;
135 | }
136 |
137 | .act-detail-wrapper {
138 | margin: 5vw;
139 | margin-bottom: 20vw;
140 | }
141 |
142 | rich-text > image {
143 | width: 50vw;
144 | }
145 |
146 | .main-image {
147 | width: 90vw;
148 | height: 50vw;
149 | border-radius: 4px;
150 | margin-bottom: 5vw;
151 | }
152 |
153 | .detail-text {
154 | font-size: 4vw;
155 | line-height: 6vw;
156 | }
157 |
158 | .other-image {
159 | width: 90vw;
160 | height: 50vw;
161 | }
162 |
163 | /*活动结束按钮样式 */
164 | .activity-over{
165 | width: 95vw;
166 | height: 12vw;
167 | margin: 2.5vw;
168 | border-radius: 5px;
169 | line-height: 12vw;
170 | background-color: gainsboro;
171 | text-align: center;
172 | }
173 |
174 | /* 活动不需要报名按钮样式 */
175 | .activity-enroll{
176 | width: 95vw;
177 | height: 12vw;
178 | margin: 2.5vw;
179 | border-radius: 5px;
180 | line-height: 12vw;
181 | text-align: center;
182 | transition: all 0.5s;
183 | color: white;
184 | font-size: 4vw;
185 | display: inline-block;
186 | }
187 |
--------------------------------------------------------------------------------
/font.wxss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconfont'; /* project id 346498 */
3 | src: url('//at.alicdn.com/t/font_346498_ytqqkbn0cvmtpgb9.eot');
4 | src: url('//at.alicdn.com/t/font_346498_ytqqkbn0cvmtpgb9.eot?#iefix') format('embedded-opentype'),
5 | url('//at.alicdn.com/t/font_346498_ytqqkbn0cvmtpgb9.woff') format('woff'),
6 | url('//at.alicdn.com/t/font_346498_ytqqkbn0cvmtpgb9.ttf') format('truetype'),
7 | url('//at.alicdn.com/t/font_346498_ytqqkbn0cvmtpgb9.svg#iconfont') format('svg');
8 | }
9 | .iconfont {
10 | display: inline;
11 | font-family: "iconfont" !important;
12 | font-size: 16px;
13 | font-style: normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .icon-tag:before {
19 | content: "\e614";
20 | }
21 |
22 | .icon-sousuo:before {
23 | content: "\e600";
24 | }
25 |
26 | .icon-zhidao:before {
27 | content: "\e646";
28 | margin-right: 5px;
29 | }
30 |
31 | .icon-xueshu:before {
32 | content: "\e603";
33 | margin-right: 2px;
34 | }
35 |
36 | .icon-quanbu:before {
37 | content: "\e6bf";
38 | font-size: 15px;
39 | margin-right: 5px;
40 | }
41 |
42 | .icon-view:before {
43 | content: "\e601";
44 | margin-right: 3px;
45 | }
46 |
47 | .icon-fav:before {
48 | content: "\e610";
49 | margin-right: 3px;
50 | }
51 |
52 | .icon-fire:before {
53 | content: "\e698";
54 | }
55 |
56 | .icon-richeng:before {
57 | content: "\e630";
58 | font-size: 25px;
59 | margin: 0 10px;
60 | color: #1296db;
61 | }
62 |
63 | .icon-history:before {
64 | content: "\e644";
65 | }
66 |
67 | .icon-x:before {
68 | content: "\e628";
69 | }
70 |
71 | .icon-clean:before {
72 | content: "\e605";
73 | }
74 |
75 | .icon-list:before {
76 | content: "\e602";
77 | }
78 |
79 | .icon-setting:before {
80 | content: "\e615";
81 | margin-right: 3vw;
82 | }
83 |
84 | .icon-connect:before {
85 | content: "\e659";
86 | margin-right: 3vw;
87 | }
88 |
89 | .icon-about:before {
90 | content: "\e60c";
91 | margin-right: 3vw;
92 | }
93 |
94 | .icon-act:before {
95 | content: "\e637";
96 | font-size: 6vw;
97 | margin-right: 3vw;
98 | font-weight: 400;
99 | }
100 |
101 | .icon-run:before {
102 | content: "\e613";
103 | font-size: 6vw;
104 | margin-right: 3vw;
105 | }
106 |
107 | .icon-info:before {
108 | content: "\e60e";
109 | font-size: 3.5vw;
110 | }
111 |
112 | .icon-phone:before {
113 | content: "\e6d5";
114 | }
115 |
116 | .icon-trainee:before {
117 | content: "\e6c0";
118 | font-size: 4.5vw;
119 | font-weight: 600;
120 | margin-right: 3vw;
121 | margin-left: .5vw;
122 | }
123 |
124 | .icon-name:before{
125 | content: "\e633";
126 | font-size: 5vw;
127 | margin-right: 2vw;
128 | }
129 | .icon-sex:before{
130 | content: "\e632";
131 | font-size: 5vw;
132 | margin-right: 2vw;
133 | }
134 | .icon-academy:before{
135 | content: "\e607";
136 | font-size: 5vw;
137 | margin-right: 2vw;
138 | }
139 |
140 | .icon-location:before{
141 | content: "\e66b";
142 | margin-left: -.5vw;
143 | }
144 |
145 | .icon-money:before{
146 | content: "\e6a4";
147 | font-size: 3.8vw;
148 | margin-right: .5vw;
149 | }
150 |
151 | .icon-target:before{
152 | content: "\e67f";
153 | font-size: 3.5vw;
154 | margin-right: 1vw;
155 | }
156 | /*实习 详情页面 学历 */
157 | .icon-education:before{
158 | content: "\e6c1";
159 | font-size: 3.5vw;
160 | }
161 |
162 | .icon-time:before{
163 | content: "\e631";
164 | font-size: 3.5vw;
165 | }
166 |
167 | .icon-add:before{
168 | content: "\e604";
169 | }
--------------------------------------------------------------------------------
/images/detail/join.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 搜索活动
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 学生活动
17 |
18 |
19 |
20 | 运动达人
21 |
22 |
23 |
24 | 实习信息
25 |
26 |
27 |
28 | 设置
29 |
30 |
31 |
32 | 联系我们
33 |
34 |
35 |
36 | 关于我们
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 您当前走了 {{index_step}} 步,全校第 {{index_schoolrank}} 名,距离上一名 {{index_school_gap}} 步
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | 全部
64 |
65 |
66 |
67 | 学术活动
68 |
69 |
70 |
71 | 课余活动
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/pages/myinfo/myinfo.js:
--------------------------------------------------------------------------------
1 |
2 | var app = getApp();
3 | // pages/myinfo/myinfo.js
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | join_fav_mark: 1
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | app.checkFristLogin();
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面初次渲染完成
22 | */
23 | onReady: function () {
24 |
25 | },
26 | onShow: function() {
27 | let self = this;
28 | self.initPage();
29 | },
30 |
31 | /**
32 | * 页面相关事件处理函数--监听用户下拉动作
33 | */
34 | onPullDownRefresh: function () {
35 | this.initPage();
36 | },
37 |
38 | /**
39 | * 用户点击右上角分享
40 | */
41 | onShareAppMessage: function () {
42 |
43 | },
44 | initPage: function () {
45 | console.log('this is hahah');
46 | self = this;
47 | var user_key = wx.getStorageSync('user_key');
48 | var send_data = { bjut_id: user_key };
49 | app.SendRequest('/api/get_user_info', send_data, self.get_user_info_request_suc);
50 | },
51 | // 收到查询结果回调函数
52 | get_user_info_request_suc: function (res) {
53 | var un_verify_reason = res.data.user_info.un_verify_reason;
54 | console.log(un_verify_reason);
55 | self = this;
56 | console.log('this is get_user_info_request_suc')
57 | console.log(res);
58 | for (var i = 0; i < res.data.coll_activity.length; i++){
59 | res.data.coll_activity[i].activityDate = this.formate_date(new Date(res.data.coll_activity[i].activityDate));
60 | }
61 | for (var i = 0; i < res.data.join_activity.length; i++) {
62 | res.data.join_activity[i].activityDate = this.formate_date(new Date(res.data.join_activity[i].activityDate));
63 | }
64 | if (res.data.user_info.verify_state == 3){
65 | wx.showModal({
66 | title: '提示',
67 | content: '对不起,您的学生验证未通过,请重新验证。未通过原因:'+ un_verify_reason,
68 | confirmText: '重新验证',
69 | success: function (res) {
70 | app.SendRequest('/api/cancel_verify', { bjut_id: wx.getStorageSync('user_key') }, function(res){
71 | console.log('认证拒绝后修改状态成功...');
72 | });
73 | if (res.confirm) {
74 | wx.navigateTo({
75 | url: '/pages/auth/auth'
76 | });
77 | }
78 | }
79 | });
80 | }
81 | self.setData({
82 | student_info: res.data.user_info,
83 | join_act: res.data.join_activity,
84 | fav_act: res.data.coll_activity
85 | });
86 | },
87 | click_join: function () {
88 | this.setData({
89 | join_fav_mark: 1
90 | });
91 | },
92 | click_fav: function () {
93 | this.setData({
94 | join_fav_mark: 2
95 | });
96 | },
97 | click_act: function (e) {
98 | var actid = e.currentTarget.dataset.actid;
99 | wx.navigateTo({
100 | url: '/pages/detail/detail?actid=' + actid,
101 | });
102 | },
103 | //
104 | click_sign: function () {
105 | wx.navigateTo({
106 | url: '/pages/auth/auth'
107 | })
108 | },
109 | // 点击头像跳转设置界面
110 | update_info: function(e) {
111 | wx.navigateTo({
112 | url: '/pages/update_info/update_info',
113 | })
114 | },
115 | // 格式化时间(年月日)
116 | formate_date: function (date) {
117 | let month_add = date.getMonth() + 1;
118 | var formate_result = date.getFullYear() + '年'
119 | + month_add + '月'
120 | + date.getDate() + '日'
121 | + ' '
122 | + date.getHours() + '点'
123 | + date.getMinutes() + '分';
124 | return formate_result;
125 | },
126 |
127 | })
--------------------------------------------------------------------------------
/pages/sport/sport.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{userinfo.nickName}}
20 |
21 |
22 | {{userinfo.name}}
23 |
24 | {{userinfo.academy}}
25 |
26 |
27 |
28 |
29 | 我的排名
30 | |
31 | 排行榜
32 |
33 |
34 |
35 |
36 | 今天您已经走了
37 | {{my_sport_data.step}} 步
38 |
39 |
40 |
41 | 学院排名
42 | {{my_sport_data.academyrank}}/{{my_sport_data.academycount}}
43 |
44 | 学院第一
45 |
46 |
47 | 距离学院上一名还差
48 | {{my_sport_data.aca_gap}}
49 | 步
50 |
51 |
52 |
53 |
54 |
55 | 校园排名
56 | {{my_sport_data.schoolrank}}/{{my_sport_data.schoolcount}}
57 |
58 | 全校第一
59 |
60 |
61 | 距离全校上一名还差
62 | {{my_sport_data.bjut_gap}}
63 | 步
64 |
65 |
66 |
67 |
68 |
69 |
75 |
76 |
77 |
78 |
79 |
80 | {{academy[sport_aca_picker_index].academy_name}}
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/pages/sport/sport.wxss:
--------------------------------------------------------------------------------
1 | @import '/font.wxss';
2 | @import '/template/activity_item/activity_item.wxss';
3 | @import '/template/rank_item/rank_item.wxss';
4 |
5 | .head-wrapper {
6 | margin-top: 70px;
7 | }
8 |
9 | .head-back {
10 | position: absolute;
11 | top: 0px;
12 | left: 0;
13 | width: 100%;
14 | height: 40vw;
15 | z-index: -100;
16 | }
17 |
18 | .head-back-filter {
19 | position: absolute;
20 | top: 0px;
21 | left: 0;
22 | width: 100%;
23 | height: 40vw;
24 | opacity: 1;
25 | z-index: -50;
26 | background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 1));
27 | }
28 |
29 | /*个人记录部分 */
30 |
31 | .my_record_wrapper {
32 | position: absolute;
33 | right: 9vw;
34 | top: 8vw;
35 | z-index: 100;
36 | }
37 | .record_cup{
38 | width: 10vw;
39 | height: 10vw;
40 | animation:move_cup .5s infinite;
41 | animation-direction:alternate;
42 | z-index: 200;
43 | }
44 |
45 | @keyframes move_cup
46 | {
47 | from {transform: translate(0,0vw);}
48 | to {transform: translate(0,-2vw);}
49 | }
50 |
51 | .cup_shadow{
52 | z-index: 100;
53 | margin: 0 auto;
54 | margin-top: -2vw;
55 | padding: 0;
56 | width: 7vw;
57 | height: 2vw;
58 | background-color: grey;
59 | border-radius: 50%;
60 | animation:cup_shadow .5s infinite;
61 | animation-direction:alternate;
62 | }
63 | @keyframes cup_shadow
64 | {
65 | from {transform: scale(1,1); opacity: 1;}
66 | to {transform: scale(1.2,1.1); opacity: .8;}
67 | }
68 | .title-image {
69 | display: block;
70 | width: 70vw;
71 | height: 13vw;
72 | margin: 10vw auto;
73 | margin-bottom: 5vw;
74 | }
75 |
76 | .userinfo-avater {
77 | display: block;
78 | width: 15vw;
79 | height: 15vw;
80 | border-radius: 50%;
81 | margin: 0 auto;
82 | margin-top: 5vw;
83 | }
84 |
85 | .userinfo-info-wrapper {
86 | width: 100%;
87 | margin: 3vw 0;
88 | font-size: 3vw;
89 | text-align: center;
90 | }
91 |
92 | .userinfo-name {
93 | font-size: 4vw;
94 | font-weight: bold;
95 | }
96 |
97 | .tab {
98 | display: flex;
99 | }
100 |
101 | .tab-item {
102 | flex: 1;
103 | height: 7vw;
104 | line-height: 7vw;
105 | text-align: center;
106 | border-radius: 4px;
107 | margin: 0 9vw;
108 | font-size: 4vw;
109 | transition: all 0.2s;
110 | }
111 |
112 | .tab-selected {
113 | background-color: #1296db;
114 | color: white;
115 | }
116 |
117 | .myrank-step-wrapper {
118 | height: 17vw;
119 | width: 80vw;
120 | margin: 5vw auto;
121 | text-align: center;
122 | line-height: 17vw;
123 | border: 1px solid rgba(0, 0, 0, 0.1);
124 | border-radius: 4px;
125 | box-shadow: 10px 10px 15px #888;
126 | }
127 |
128 | .myrank-step-wrapper text {
129 | font-size: 8vw;
130 | color: red;
131 | font-weight: bold;
132 | vertical-align: top;
133 | }
134 |
135 | .myrank-detail {
136 | display: flex;
137 | }
138 |
139 | .myrank-item-wrapper {
140 | flex: 1;
141 | margin: 4vw;
142 | padding: 3vw 1vw;
143 | text-align: center;
144 | border: 2px solid rgba(0, 0, 0, 0.1);
145 | border-radius: 4px;
146 | box-shadow: 5px 5px 15px #888;
147 | }
148 |
149 | .rank-title {
150 | margin: 0 6vw;
151 | padding: 3vw 4vw;
152 | border-bottom: 1px solid black;
153 | font-size: 4vw;
154 | line-height: 4vw;
155 | color: #1296db;
156 | }
157 |
158 | .rank-rank {
159 | font-size: 7vw;
160 | margin: 3vw 0;
161 | color: red;
162 | font-weight: 300px;
163 | }
164 |
165 | .rank-gap {
166 | font-size: 3vw;
167 | }
168 |
169 | .rank-gap > text {
170 | display: block;
171 | font-size: 4vw;
172 | color: #1296db;
173 | font-weight: bold;
174 | }
175 |
176 | .bu {
177 | font-size: 3vw;
178 | color: black;
179 | font-weight: normal;
180 | }
181 |
182 | .myrank-remark {
183 | margin: 6vw;
184 | font-size: 3vw;
185 | color: rgba(0, 0, 0, 0.7);
186 | }
187 |
188 | .piker_text {
189 | display: block;
190 | width: 50vw;
191 | margin: 2vw auto;
192 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
193 | text-align: center;
194 | font-size: 4vw;
195 | padding-bottom: 2vw;
196 | }
197 |
--------------------------------------------------------------------------------
/pages/search/search.js:
--------------------------------------------------------------------------------
1 | var data = require('../../data.js');
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | hot_tag: [],
10 | text:'text'
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | let self = this;
18 | // 加载历史记录
19 | var search_history = wx.getStorageSync('search_history');
20 | this.setData({
21 | search_history: search_history
22 | });
23 | // 加载用户信息
24 | var user_key = wx.getStorageSync('user_key');
25 | app.SendRequest('/api/get_all_hot_tag', '', function(res){
26 | console.log(res);
27 | self.setData({
28 | hot_tag: res.data.hot_tag
29 | })
30 | });
31 | },
32 |
33 | /**
34 | * 生命周期函数--监听页面初次渲染完成
35 | */
36 | onReady: function () {
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面显示
42 | */
43 | onShow: function () {
44 |
45 | },
46 |
47 | /**
48 | * 生命周期函数--监听页面隐藏
49 | */
50 | onHide: function () {
51 |
52 | },
53 |
54 | /**
55 | * 生命周期函数--监听页面卸载
56 | */
57 | onUnload: function () {
58 |
59 | },
60 |
61 | /**
62 | * 页面相关事件处理函数--监听用户下拉动作
63 | */
64 | onPullDownRefresh: function () {
65 |
66 | },
67 |
68 | /**
69 | * 页面上拉触底事件的处理函数
70 | */
71 | onReachBottom: function () {
72 |
73 | },
74 |
75 | /**
76 | * 用户点击右上角分享
77 | */
78 | onShareAppMessage: function () {
79 |
80 | },
81 | input_done: function (e) {
82 | self = this;
83 | var value = e.detail.value;
84 | this.setData({
85 | input_key: value
86 | });
87 | // 添加历史记录
88 | if (!wx.getStorageSync('search_history')) {
89 | var temp_sh = [value];
90 | wx.setStorageSync('search_history', temp_sh);
91 | this.setData({
92 | search_history: temp_sh
93 | });
94 | } else {
95 | var temp_sh = wx.getStorageSync('search_history');
96 | if (temp_sh.indexOf(value) < 0) {
97 | temp_sh.push(value);
98 | wx.setStorageSync('search_history', temp_sh);
99 | this.setData({
100 | search_history: temp_sh
101 | });
102 | }
103 | }
104 | // 发送查询请求
105 | var search_data = {
106 | keyword: value
107 | };
108 | app.SendRequest('/api/search_keyword', search_data, self.input_done_request_suc);
109 | },
110 | // 请求成功回调函数
111 | input_done_request_suc: function (res) {
112 | var search_res = res.data.activity;
113 | if (search_res.length == 0) {
114 | wx.showToast({
115 | title: '没有查询到您想要的结果',
116 | image: '/images/icon/cry.svg'
117 | });
118 | } else{
119 | wx.navigateTo({
120 | url: '/pages/search_result/search_result?keyword=' + this.data.input_key,
121 | });
122 | }
123 | },
124 | delete_history: function (e) {
125 | var index = e.target.dataset.index;
126 | var temp_sh = wx.getStorageSync('search_history');
127 | temp_sh.splice(index, 1);
128 | wx.setStorageSync('search_history', temp_sh);
129 | this.setData({
130 | search_history: temp_sh
131 | });
132 | },
133 | clean_history: function () {
134 | wx.setStorageSync('search_history', []);
135 | this.setData({
136 | search_history: []
137 | });
138 | },
139 | get_user_info: function () {
140 | var user_key = wx.getStorageSync('user_key');
141 | },
142 | click_history_item: function(e){
143 | var his_data = e.currentTarget.dataset.itemdata;
144 | this.setData({
145 | input_key: his_data
146 | });
147 | app.SendRequest('/api/search_keyword', {keyword: his_data}, this.input_done_request_suc);
148 | },
149 | click_hot_tag: function(e){
150 | var hot_tag_data = e.target.dataset.htdata;
151 | this.setData({
152 | input_key: hot_tag_data
153 | });
154 | let search_data = {
155 | keyword: hot_tag_data
156 | };
157 | app.SendRequest('/api/search_keyword', search_data, this.input_done_request_suc);
158 | }
159 | })
--------------------------------------------------------------------------------
/pages/trainee/trainee_index/trainee_index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/trainee/trainee_index/trainee_index.wxss */
2 | /* pages/trainee/trainee.wxss */
3 | @import '/font.wxss';
4 | @import '/template/trainee_item/trainee_item.wxss';
5 | .circular-button {
6 | position: fixed;
7 | bottom: 10vw;
8 | right: 10vw;
9 | width: 15vw;
10 | height: 15vw;
11 | background-color: rgba(196, 226, 216, 0.5);
12 | border-radius: 50%;
13 | z-index: 200;
14 | box-shadow: 5px 5px 5px gainsboro;
15 | }
16 |
17 | .circular-button-animation {
18 | animation-name: main_button;
19 | animation-duration: 1s;
20 | animation-iteration-count: infinite;
21 | animation-timing-function: ease-in-out;
22 | animation-direction: alternate;
23 | }
24 |
25 | .c-button-image {
26 | width: 8vw;
27 | height: 8vw;
28 | margin: 3.5vw;
29 | }
30 |
31 | /* 副图标样式 */
32 |
33 | .button-sub {
34 | width: 10vw;
35 | height: 10vw;
36 | z-index: 0;
37 | transition: all 0.2s;
38 | transition-timing-function: ease-in-out;
39 | opacity: 0;
40 | }
41 |
42 | /*副图标中的图片样式 */
43 |
44 | .button-sub > image {
45 | width: 5vw;
46 | height: 5vw;
47 | margin: 2.5vw;
48 | }
49 |
50 | .circular-button-my {
51 | transform: translate(-20vw, 0vw);
52 | opacity: 1;
53 | }
54 |
55 | .circular-button-send {
56 | transform: translate(0, -20vw) scale(1, 1);
57 | opacity: 1;
58 | }
59 |
60 | .circular-button-auth-result {
61 | transform: translate(-15vw, -15vw) scale(1, 1);
62 | opacity: 1;
63 | }
64 |
65 | /*主按钮动画部分 */
66 |
67 | @keyframes main_button {
68 | from {
69 | transform: scale(1.1, 1.1);
70 | }
71 |
72 | to {
73 | transform: scale(1, 1);
74 | }
75 | }
76 |
77 | /*抖动动画部分 */
78 |
79 | .shake-my {
80 | animation-name: shake-my;
81 | animation-delay: 0.21s;
82 | animation-iteration-count: 1;
83 | animation-duration: 0.2s;
84 | }
85 |
86 | .shake-auth {
87 | animation-name: shake-auth;
88 | animation-delay: 0.21s;
89 | animation-iteration-count: 1;
90 | animation-duration: 0.2s;
91 | }
92 |
93 | .shake-send {
94 | animation-name: shake-send;
95 | animation-delay: 0.21s;
96 | animation-iteration-count: 1;
97 | animation-duration: 0.2s;
98 | }
99 |
100 | @keyframes shake-my {
101 | from {
102 | transform: translate(-20.8vw, 0);
103 | }
104 |
105 | to {
106 | transform: translate(-19.8vw, 0);
107 | }
108 | }
109 |
110 | @keyframes shake-send {
111 | from {
112 | transform: translate(0, -20.8vw);
113 | }
114 |
115 | to {
116 | transform: translate(0, -19.8vw);
117 | }
118 | }
119 |
120 | @keyframes shake-auth {
121 | from {
122 | transform: translate(-15.13vw, -15.13vw);
123 | }
124 |
125 | to {
126 | transform: translate(-14.8vw, -14.8vw);
127 | }
128 | }
129 | .header-wrapper{
130 | position: absolute;
131 | top: 0;
132 | }
133 | .header-image{
134 | position: absolute;
135 | top: 0;
136 | left: 0;
137 | width: 100vw;
138 | height: 45vw;
139 | /* filter: blur(2px); */
140 | }
141 | /*header 白色过滤框 */
142 | .filter{
143 | position: absolute;
144 | top: 0;
145 | left: 0;
146 | width: 100vw;
147 | height: 45vw;
148 | background: linear-gradient(rgba(0,0,0, .5), rgba(0,0,0, 0.4),rgba(0,0,0, 0.35),rgba(0,0,0, 0.3), rgba(255, 255, 255, 1));
149 | }
150 | .header-text-wrapper{
151 | position: absolute;
152 | z-index: 500;
153 | width: 100vw;
154 | height: 45vw;
155 | }
156 | .sub-title{
157 | margin:3vw 10vw;
158 | font-size:5vw;
159 | font-weight:bold;
160 | border-top: 1px solid ghostwhite;
161 | }
162 | .header-text-content{
163 | width: 100vw;
164 | margin-top: 4vw;
165 | text-align: center;
166 | font-size: 10vw;
167 | font-weight: 600;
168 | color: aliceblue;
169 | }
170 |
171 | /* .my-info-wrapper{
172 | padding: 3vw 5vw;
173 | margin-top: 45vw;
174 | }
175 | .my-info-wrapper > image{
176 | width: 8vw;
177 | height: 8vw;
178 | border: 1px solid gainsboro;
179 | border-radius: 50%;
180 | }
181 | .my-info-content{
182 | height: 5vw;
183 | display: inline-block;
184 | margin-left: 2vw;
185 | padding-right: 2vw;
186 | font-size: 3.5vw;
187 | vertical-align: 3vw;
188 | line-height: 5vw;
189 | border-right: 1px solid gainsboro;
190 | }
191 | .my-info-content:last-child{
192 | border-color: white;
193 | } */
194 |
195 | .trainee-wrapper{
196 | margin-top: 47vw;
197 | }
198 | .trainee-title{
199 | margin: 3vw 32vw;
200 | width: 30vw;
201 | height: 8vw;
202 | line-height: 8vw;
203 | text-align: center;
204 | border: 3vw double antiquewhite;
205 | font-weight: bold;
206 | }
207 |
208 | .gap{
209 | width: 100%;
210 | height: 4px;
211 | border-top: 1px solid rgba(0, 0, 0, 0.1);
212 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
213 | background-color: ghostwhite;
214 | }
215 | .gap2{
216 | width: 100vw;
217 | margin-top: -2vw;
218 | border-top: 2px dotted gainsboro;
219 | }
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | var data = require('../../data.js');
2 | var app = getApp();
3 | // pages/index/index.js
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | // 已经点击过的侧边栏item
11 | has_click_side_item: [1],
12 | show_search_back: false,
13 | activity_data: '',
14 | swiper: '',
15 | tag_select: 0,
16 | open: false,
17 | sport_tab: 1,
18 | academy: app.globalData.academy,
19 | sport_aca_picker_index: 0,
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function (options) {
26 | //this.initPage();
27 | app.GetSysInfo();
28 | },
29 | /**
30 | * 生命周期函数--监听页面初次渲染完成
31 | */
32 | onReady: function () {
33 | app.checkFristLogin();
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面显示
38 | */
39 | onShow: function () {
40 | this.initPage();
41 | // app.checkFristLogin();
42 | },
43 |
44 | /**
45 | * 页面相关事件处理函数--监听用户下拉动作
46 | */
47 | onPullDownRefresh: function () {
48 | console.log('this is onpulldown')
49 | this.initPage();
50 | },
51 |
52 | /**
53 | * 页面上拉触底事件的处理函数
54 | */
55 | onReachBottom: function () {
56 |
57 | },
58 | // 页面初始化函数
59 | initPage: function () {
60 | self = this;
61 | app.SendRequest('/api/index_info', {}, self.initPage_request_suc);
62 | this.setData({
63 | index_step: wx.getStorageSync('day_step'),
64 | index_schoolrank: wx.getStorageSync('schoolrank'),
65 | index_school_gap: wx.getStorageSync('school_gap')
66 | });
67 | },
68 | // 请求成功回调函数
69 | initPage_request_suc: function (res) {
70 | console.log('index_info success:', res);
71 | for (let i = 0; i < res.data.activity.length; i++) {
72 | res.data.activity[i].onlineTime = app.formate_data(new Date(res.data.activity[i].onlineTime));
73 | }
74 | self.setData({
75 | activity_data: res.data.activity,
76 | swiper: res.data.swiper
77 | });
78 | },
79 | // 滑动屏幕事件
80 | bindscroll: function (e) {
81 | if (e.detail.scrollTop > 1) {
82 | this.setData({
83 | show_search_back: true
84 | });
85 | }
86 | },
87 | // 滑动触顶
88 | reach_top: function () {
89 | this.setData({
90 | show_search_back: false
91 | });
92 | },
93 | // 绑定侧边栏点击事件
94 | open_side_list: function () {
95 | self = this;
96 | this.setData({
97 | open: !self.data.open,
98 | show_search_back: true
99 | });
100 | },
101 | // 点击侧边栏的item
102 | click_side_item: function (e) {
103 | self = this;
104 | let list_index = e.currentTarget.dataset.listIndex;
105 | let has_side = this.data.has_click_side_item;
106 | // 根据点击item发送相应请求
107 | switch (list_index) {
108 | case "1": // 点击学生活动
109 | wx.navigateTo({
110 | url: '/pages/index/index',
111 | });
112 | this.setData({
113 | open: false
114 | });
115 | break;
116 | case "2": // 点击“每天行走一万步活动”
117 | // 请求每天行走一万步的数据
118 | this.setData({
119 | open: false
120 | });
121 | wx.navigateTo({
122 | url: '/pages/sport/sport',
123 | });
124 | break;
125 | case "3": // 点击“实习信息”
126 | this.setData({
127 | open: false
128 | })
129 | wx.navigateTo({
130 | url: '/pages/trainee/trainee_index/trainee_index',
131 | });
132 | break;
133 | case "5"://联系客服
134 | this.setData({
135 | open: false,
136 | })
137 | wx.navigateTo({
138 | url: '/pages/contact_us/contact_us',
139 | });
140 | break;
141 | case "6"://关于我们
142 | this.setData({
143 | open: false
144 | })
145 | wx.navigateTo({
146 | url: '/pages/about_us/about_us',
147 | });
148 | break;
149 | case "7"://设置
150 | this.setData({
151 | open: false
152 | })
153 | wx.navigateTo({
154 | url: '/pages/update_info/update_info',
155 | });
156 | }
157 | },
158 |
159 | // 点击tag的响应函数
160 | click_tag: function (e) {
161 | self = this;
162 | console.log(e.currentTarget.dataset.tagIndex);
163 | let index = e.currentTarget.dataset.tagIndex;
164 | switch (index) {
165 | case "0":
166 | this.setData({
167 | tag_select: 0
168 | });
169 | break;
170 | case "1":
171 | this.setData({
172 | tag_select: 1
173 | });
174 | break;
175 | case "2":
176 | this.setData({
177 | tag_select: 2
178 | });
179 | break;
180 | }
181 | },
182 | // 点击活动进入活动详情页面
183 | click_activity: function (e) {
184 | let actid = e.currentTarget.dataset.actid;
185 | let user_key = wx.getStorageSync('user_key');
186 | wx.navigateTo({
187 | url: '/pages/detail/detail?actid=' + actid,
188 | });
189 | },
190 | click_search: function () {
191 | wx.navigateTo({
192 | url: '/pages/search/search',
193 | });
194 | },
195 | click_filter: function () {
196 | this.setData({
197 | open: false
198 | });
199 | },
200 | //点击首页活动信息条
201 | click_sport_info: function(){
202 | wx.navigateTo({
203 | url: '/pages/sport/sport',
204 | })
205 | }
206 | })
--------------------------------------------------------------------------------
/pages/sport/sport.js:
--------------------------------------------------------------------------------
1 | // pages/sport/sport.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | sport_tab: 1,
10 | academy: [],
11 | sport_aca_picker_index: 0,
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onShow: function (options) {
18 | var self = this;
19 | // //获取用户运动信息
20 | // self.get_user_sport_relate_data();
21 | // //用户打卡
22 | // self.user_clock_in();
23 | // 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
24 | wx.getSetting({
25 | success(res) {
26 | console.log(res);
27 | if (!res.authSetting['scope.werun']) {
28 | wx.showModal({
29 | title: '授权信息',
30 | content: '该功能需要授权微信运动',
31 | confirmText: '进行授权',
32 | success: function (res) {
33 | if (res.confirm) {
34 | wx.openSetting({
35 | success: (res) => {
36 | res.authSetting = {
37 | "scope.userInfo": true,
38 | "scope.werun": true
39 | }
40 | //获取用户运动信息
41 | self.get_user_sport_relate_data();
42 | //用户打卡
43 | self.user_clock_in();
44 | }
45 | })
46 | }
47 | else {
48 | console.log("取消");
49 | wx.navigateBack({
50 | delta: 1
51 | })
52 | }
53 | }
54 | })
55 |
56 | }
57 | else {
58 | //获取用户运动信息
59 | self.get_user_sport_relate_data();
60 | //用户打卡
61 | self.user_clock_in();
62 | }
63 | }
64 | })
65 | },
66 | // 打卡函数
67 | user_clock_in: function () {
68 | app.SendRequest('/api/clock_in', { 'bjut_id': wx.getStorageSync('user_key') }, function (res) {
69 | console.log('用户打卡回调函数...', res);
70 | });
71 | },
72 | //登录 + 得到用户运动信息所需的相关秘钥 + 向后端请求获取运动信息
73 | // 登录-->获取code-->wx.getWeRunData() 获取encryptedData&iv -->发送数据到后台
74 | get_user_sport_relate_data: function () {
75 | var self = this;
76 | wx.login({
77 | success: function (res) {
78 | let sport_code = res.code;
79 | wx.getWeRunData({
80 | success(res) {
81 | var encryptedData = res.encryptedData;
82 | var iv = res.iv;
83 | var sport_data = {
84 | bjut_id: wx.getStorageSync('user_key'),
85 | code: sport_code,
86 | encryptedData: encryptedData,
87 | iv: iv
88 | };
89 | app.SendRequest('/api/get_wx_run_data', sport_data, self.sport_req_suc);
90 | }
91 | })
92 | },
93 | fail: function (res) {
94 | console.log("获取code失败...");
95 | }
96 | });
97 | },
98 |
99 | // 请求微信运动的回调函数
100 | sport_req_suc: function (res) {
101 | var self = this;
102 | // 将运动首页数据付给my_sport_data
103 | this.setData({
104 | my_sport_data: res.data.sport_data,
105 | userinfo: res.data.userinfo
106 | });
107 | },
108 |
109 | /**
110 | * 用户点击右上角分享
111 | */
112 | onShareAppMessage: function () {
113 | return {
114 | title: '今天我已经走了' + this.data.my_sport_data.step + '步,在北工大全校排名中的第' + this.data.my_sport_data.schoolrank + '名',
115 | path: '/pages/sport/sport',
116 | success: function (res) {
117 | // 转发成功
118 | wx.showToast({
119 | title: '转发成功',
120 | icon: 'success'
121 | });
122 | },
123 | fail: function (res) {
124 | // 转发失败
125 | wx.showToast({
126 | title: '转发失败',
127 | icon: 'fail'
128 | });
129 | }
130 | }
131 | },
132 |
133 | click_sport_tab: function (e) {
134 | self = this;
135 | let sport_tab_index = e.currentTarget.dataset.sportTabIndex;
136 | switch (sport_tab_index) {
137 | case "1":
138 | self.setData({
139 | sport_tab: 1
140 | });
141 | break;
142 | case "2":
143 | self.setData({
144 | sport_tab: 2
145 | });
146 | app.SendRequest('/api/wx_day_rank_10', { range: 0 }, function (res) {
147 | console.log('this is wx_day_rank_10 res:');
148 | console.log(res);
149 | self.setData({
150 | rank_list_data: res.data.data
151 | });
152 | });
153 | app.SendRequest('/api/find_all_info_by_action', { action: 'academy' }, function (res) {
154 | var academy = res.data.data[0].academy;
155 | self.setData({
156 | academy: academy
157 | })
158 | })
159 | break;
160 | }
161 | },
162 | // 学院选择器变化时触发
163 | sport_aca_picker: function (e) {
164 | let self = this;
165 | this.setData({
166 | sport_aca_picker_index: e.detail.value
167 | });
168 |
169 | app.SendRequest('/api/wx_day_rank_10', { range: this.data.academy[e.detail.value].academy_number }, function (res) {
170 | console.log('this is rank res:')
171 | console.log(res);
172 | self.setData({
173 | rank_list_data: res.data.data
174 | });
175 | });
176 | },
177 | click_record: function () {
178 | console.log('click record...');
179 | wx.navigateTo({
180 | url: '/pages/record2/record2',
181 | success: function (res) { },
182 | fail: function (res) { },
183 | complete: function (res) { },
184 | })
185 | }
186 | })
--------------------------------------------------------------------------------
/images/trainee/baidu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/auth/auth.js:
--------------------------------------------------------------------------------
1 | // pages/auth/auth.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | academy: [],
10 | academy_names: ['加载中...'],
11 | year: [],
12 | index_academy: 0,
13 | index_year: 0,
14 | verify_state: 3,
15 | stu_image: [],
16 | school_names: [],
17 | index_school: 0
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function (options) {
24 | var that = this
25 | var nowYear = new Date().getFullYear()
26 | var arrYear = []
27 | for (var i = 2012; i <= nowYear; i++) {
28 | arrYear.push(i)
29 | }
30 | that.setData({
31 | year: arrYear,
32 | });
33 | // 获取北京工业大学学院信息
34 | app.SendRequest('/api/find_all_info_by_action', { action: "academy" }, function (res) {
35 | if (res.statusCode != 200 || res.data.errno != 0) {
36 | wx.showToast({
37 | title: '获取学院信息失败!',
38 | })
39 | return
40 | }
41 | var academy = res.data.data[0].academy;
42 | // 去除全校
43 | academy.shift();
44 | that.setData({
45 | academy: academy,
46 | });
47 | var names = [];
48 | for (var i = 0; i < academy.length; i++) {
49 | names.push(academy[i].academy_name);
50 | }
51 | that.setData({
52 | academy_names: names,
53 | });
54 | });
55 | // 获取学校列表
56 | app.SendRequest('/api/other_school/all', {}, function (res) {
57 | console.log('this is /api/other_school/all callback...', res);
58 | var temp = res.data.data[0].other_school;
59 | // 为schoolk_list 赋值,之后向后端发数据时查询school的school_number
60 | that.setData({
61 | school_list: temp,
62 | });
63 | var school_list = [];
64 | for (let i = 0; i < temp.length; i++) {
65 | school_list.push(temp[i].school_name);
66 | }
67 | that.setData({
68 | school_names: school_list
69 | });
70 | });
71 | },
72 |
73 | academy_picker: function (e) {
74 | this.setData({
75 | index_academy: e.detail.value
76 | });
77 | },
78 | year_picker: function (e) {
79 | this.setData({
80 | index_year: e.detail.value
81 | });
82 | },
83 | // 学校的选择
84 | school_picker: function (e) {
85 | this.setData({
86 | index_school: e.detail.value
87 | });
88 | },
89 | // 点击上传按钮
90 | form_submit: function (e) {
91 | self = this;
92 | var page_data = e.detail.value;
93 | // 检查信息是否完整
94 | if (page_data.name == "") {
95 | wx.showToast({
96 | title: '姓名不能为空',
97 | image: '/images/icon/warn.svg'
98 | });
99 | } else if (page_data.studentID == "") {
100 | wx.showToast({
101 | title: '学号不能为空',
102 | image: '/images/icon/warn.svg'
103 | });
104 | } else if (self.data.stu_image.length == 0) {
105 | wx.showToast({
106 | title: '请选择图片',
107 | image: '/images/icon/warn.svg'
108 | });
109 | } else {
110 | wx.showLoading({
111 | title: '正在提交学生信息,请稍后...',
112 | });
113 | wx.uploadFile({
114 | url: app.globalData.ServerUrl + '/api/upload_stu_image',
115 | filePath: self.data.stu_image[0],
116 | name: 'stu_image',
117 | header: {
118 | 'content-type': 'multipart/form-data'
119 | },
120 | formData: { _id: wx.getStorageSync('user_key') },
121 | success: uploadFileSuccessedCallback,
122 | fail: function (res) {
123 | wx.showToast({
124 | title: '上传图片异常',
125 | image: '/images/icon/cry.svg'
126 | });
127 | }
128 | });
129 | }
130 | // 上传图片成功后 上传其他信息
131 | function uploadFileSuccessedCallback(res) {
132 | console.log('uploadFileSuccessedCallback...');
133 | var j_res;
134 | // if (res.statusCode != 200 || (j_res = JSON.parse(res.data)).errno != 0) {
135 | // wx.showToast({
136 | // title: '上传异常',
137 | // image: '/images/icon/cry.svg'
138 | // });
139 | // return
140 | // }
141 |
142 | var student_data = {
143 | _id: wx.getStorageSync('user_key'),
144 | name: page_data.name,
145 | studentID: page_data.studentID,
146 | enter_year: self.data.year[page_data.year],
147 | academy: -1,
148 | verify_state: 1,
149 | school: 0, // 北京工业大学
150 | phone_number: page_data.phone_number
151 | }
152 | // 发送北工大用户注册信息
153 | if (self.data.index_school == '0') {
154 | // 填写学院信息
155 | student_data.academy = self.data.academy[page_data.academy].academy_number;
156 | app.SendRequest('/api/update_student', student_data, updateStudentSuccessCallback);
157 | } else { // 发送外校用户注册信息
158 | // 外校无学院,将学院置为-1
159 | student_data.academy = -1;
160 | // 通过 school_list 以及 index_school 查询 school_number
161 | student_data.school = self.data.school_list[self.data.index_school].school_number;
162 | app.SendRequest('/api/update_student', student_data, updateStudentSuccessCallback);
163 | }
164 | }
165 | function updateStudentSuccessCallback(res) {
166 | if (res.statusCode != 200 || res.data.errno != 0) {
167 | wx.showToast({
168 | title: '提交失败!',
169 | image: '/images/icon/cry.svg',
170 | })
171 | return
172 | }
173 | wx.hideLoading();
174 | wx.showToast({
175 | title: '提交成功!',
176 | duration: 2000,
177 | })
178 | setTimeout(function () {
179 | wx.navigateBack({
180 | delta: 1,
181 | });
182 | }, 2000)
183 | }
184 | },
185 | sign_suc: function (res) {
186 | console.log('注册学生信息返回成功:');
187 | wx.showToast({
188 | title: '注册成功!',
189 | image: '/images/icon/success.svg'
190 | });
191 | },
192 | choose_image: function () {
193 | self = this;
194 | wx.chooseImage({
195 | count: 1, // 默认9
196 | sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
197 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
198 | success: function (res) {
199 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
200 | var tempFilePaths = res.tempFilePaths;
201 | self.setData({
202 | stu_image: tempFilePaths
203 | });
204 | }
205 | })
206 | },
207 |
208 | })
--------------------------------------------------------------------------------
/images/icon/cry.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/record/athlete.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data.js:
--------------------------------------------------------------------------------
1 | var data = {
2 | //首页需要的信息
3 | swiper: [
4 | {
5 | url: '/images/swiper/1.jpg',
6 | actid: 1
7 | },
8 | {
9 | url: '/images/swiper/2.jpg',
10 | actid: 2
11 | },
12 | {
13 | url: '/images/swiper/3.jpg',
14 | actid: 3
15 | }
16 | ],
17 | activity: [
18 | {
19 | activityID: 1,
20 | activityTitle: '我是第一个活动标题',
21 | activityInt: '我是第二个活动的活动介绍,这个活动非常好玩,大家快来参加!我是第二个活动的活动介绍,这个活动非常好玩,大家快来参加!这个活动非常好玩这个活动非常好玩这个活动非常好玩这个活动非常好玩,这个活动非常好玩。',
22 | activityDate: '2017年6月23日',
23 | onlineTime: '2017年5月31日',
24 | duration: '1小时',
25 | activityImage: [
26 | '/images/swiper/1.jpg',
27 | '/images/swiper/2.jpg',
28 | '/images/swiper/3.jpg',
29 | ],
30 | activityType: 1,
31 | view_count: 100,
32 | fav_count: 200,
33 | fire: true
34 | },
35 | {
36 | activityID: 2,
37 | activityTitle: '我是第二个活动标题',
38 | activityInt: '我是第二个活动的活动介绍,这个活动非常好玩,大家快来参加!',
39 | activityDate: '2017年6月23日',
40 | onlineTime: '2017年5月31日',
41 | duration: '1小时',
42 | activityImage: [
43 | '/images/swiper/1.jpg',
44 | '/images/swiper/2.jpg',
45 | '/images/swiper/3.jpg',
46 | ],
47 | activityType: 1,
48 | view_count: 100,
49 | fav_count: 200,
50 | fire: false
51 | },
52 | {
53 | activityID: 3,
54 | activityTitle: '我是第三个活动标题',
55 | activityInt: '我是第三个活动的活动介绍,这个活动非常好玩,大家快来参加!',
56 | activityDate: '2017年6月23日',
57 | onlineTime: '2017年5月31日',
58 | duration: '1小时',
59 | activityImage: [
60 | '/images/swiper/1.jpg',
61 | '/images/swiper/2.jpg',
62 | '/images/swiper/3.jpg',
63 | ],
64 | activityType: 2,
65 | view_count: 100,
66 | fav_count: 200,
67 | fire: true
68 | }
69 | ],
70 | // 个人信息页面需要的数据
71 | student: {
72 | "nickName": "陈龙💭",
73 | "avatarUrl": "http://wx.qlogo.cn/mmhead/Jric5Lsvq8osZhaHzO6gBaia4fT1NTQ5ibqATGFuibHl2J0/132",
74 | "gender": 1,
75 | "province": "Beijing",
76 | "city": "",
77 | "sign": false,
78 | join_activity: [
79 | {
80 | activityID: 1,
81 | activityTitle: '我是第一个活动标题',
82 | activityDate: '2017年6月23日',
83 | onlineTime: '2017年5月31日',
84 | activityLocation: '知心园二层报告厅',
85 | activityImage: '/images/swiper/1.jpg',
86 | activityType: 1,
87 | fire: true
88 | },
89 | {
90 | activityID: 2,
91 | activityTitle: '我是第2个活动标题',
92 | activityDate: '2017年6月23日',
93 | onlineTime: '2017年5月31日',
94 | activityLocation: '知心园二层报告厅',
95 | activityImage: '/images/swiper/1.jpg',
96 | activityType: 1,
97 | fire: true
98 | }
99 | ],
100 | fav_activity: [
101 | {
102 | activityID: 1,
103 | activityTitle: '我是第一个活动标题',
104 | activityDate: '2017年6月23日',
105 | onlineTime: '2017年5月31日',
106 | activityLocation: '知心园二层报告厅',
107 | activityImage: '/images/swiper/1.jpg',
108 | activityType: 1,
109 | fire: true
110 | }
111 | ]
112 | },
113 |
114 |
115 |
116 | act_detail: {
117 | activityID: 2,
118 | activityTitle: '我是第二个活动标题',
119 | activityInt: '我是第二个活动的活动介绍,这个活动非常好玩,大家快来参加!',
120 | activityDate: '2017年6月23日',
121 | activityLocation: '知心园二层报告厅',
122 | onlineTime: '2017年5月31日',
123 | reporter: '雷军',
124 | duration: '1小时',
125 | mainImage: '/images/swiper/1.jpg',
126 | otherImage: [
127 | '/images/swiper/1.jpg',
128 | '/images/swiper/2.jpg',
129 | '/images/swiper/3.jpg',
130 | ],
131 | text: "与以往一些短期学术会议不同,此次program的来访者不仅要做学术报告,而且来访时间足够长,平均一周以上。这种安排旨在为海内外专家学者提供开放的国际合作环境和学术交流平台,并使交流与合作更加深入,合作更加充分。活动开幕式由上海交通大学物理与天文学院贾金峰教授主持,李政道研究所资深教授季向东在开幕式上介绍了李政道研究所的使命、建设目标以及发展方向。同时,上海交通大学物理与天文学院院长王孝群教授介绍了上海交通大学物理与天文学院的历史进程、专业设置、教学科研、人才培养以及人才引进等情况。 参加本次Program项目的有来自北京大学、清华大学、中国科学技术大学、中国科学院物理研究所、南京大学、同济大学、苏州大学、西安交通大学、香港大学、香港科技大学、美国卡弗里理论物理研究所、普林斯顿大学、麻省理工学院、犹他大学、加州大学圣地亚哥分校、波士顿学院等国内外20个大学与研究所的专家和师生。其中,2016年诺贝尔物理学奖获得者John Michael Kosterlitz教授在季向东教授的陪同下,参观访问了李政道研究所和李政道图书馆,并带来题为“Topological Order and Defects, and Phase Transitions in Two Dimensions”的大师讲坛精彩讲座。John Michael Kosterlitz教授因其在物质的拓扑相和拓扑相变理论上做出的突出贡献,与David Thouless教授和Duncan Haldane教授共同获得了2016年诺贝尔物理学奖。 ",
132 | activityType: 1,
133 | view_count: 100,
134 | fav_count: 200,
135 | fire: true,
136 | has_fav: false,
137 | has_join: true,
138 | remark: '请大家参加活动前准备好耳机等物品。'
139 | },
140 | //搜素界面需要的数据
141 | search: {
142 | hotTag: [
143 | "学术活动",
144 | "社团活动",
145 | "新生入学指南",
146 | "学术报销流程"
147 | ]
148 | },
149 | // 每天行走一万步需要的数据
150 | sport: {
151 | userinfo: {
152 | avater: 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoYRXtw7CNxyD2rau3zlUk8hVqqYrz2icgtY5OMgDVXZhlcKuNw2jmduGVGkMFKAvicXXmXaJmWjoPQ/0',
153 | nickName: 'chenlong',
154 | academy: '计算机学院',
155 | },
156 | sport_data: {
157 | // 个人运动数据/排行
158 | my_sport_data: {
159 | step: 10000,
160 | academy_rank: 12,
161 | academy_all: 243,
162 | aca_gap: 233,
163 | bjut_rank: 22,
164 | bjut_all: 4123,
165 | bjut_gap: 234
166 | }
167 | },
168 | rank_data: [
169 | {
170 | rank:1,
171 | nickName: '陈龙这是个超级长的名字',
172 | avaterUrl:'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoYRXtw7CNxyD2rau3zlUk8hVqqYrz2icgtY5OMgDVXZhlcKuNw2jmduGVGkMFKAvicXXmXaJmWjoPQ/0',
173 | academy: "计算机学院",
174 | step: 99999
175 | },
176 | {
177 | rank: 2,
178 | nickName: '李琰',
179 | avaterUrl: 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoYRXtw7CNxyD2rau3zlUk8hVqqYrz2icgtY5OMgDVXZhlcKuNw2jmduGVGkMFKAvicXXmXaJmWjoPQ/0',
180 | academy: "计算机学院",
181 | step: 8888
182 | },
183 | {
184 | rank: 3,
185 | nickName: '崔瑶',
186 | avaterUrl: 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoYRXtw7CNxyD2rau3zlUk8hVqqYrz2icgtY5OMgDVXZhlcKuNw2jmduGVGkMFKAvicXXmXaJmWjoPQ/0',
187 | academy: "计算机学院",
188 | step: 7777
189 | },
190 | {
191 | rank: 4,
192 | nickName: '乔布斯',
193 | avaterUrl: 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoYRXtw7CNxyD2rau3zlUk8hVqqYrz2icgtY5OMgDVXZhlcKuNw2jmduGVGkMFKAvicXXmXaJmWjoPQ/0',
194 | academy: "计算机学院",
195 | step: 6666
196 | }
197 | ]
198 | }
199 | };
200 | module.exports.data = data;
--------------------------------------------------------------------------------