Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LionTao/SUMSC-Wechat-program-back-end
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: TheBigCharles/SUMSC-Wechat-program-back-end
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 2,522 additions and 78 deletions.
  1. +163 −0 0.0.3/pages/Enroll/enroll.js
  2. +5 −0 0.0.3/pages/Enroll/enroll.json
  3. +78 −0 0.0.3/pages/Enroll/enroll.wxml
  4. +133 −0 0.0.3/pages/Enroll/enroll.wxss
  5. +170 −0 0.0.3/pages/Enrollteam/enrollteam.js
  6. +5 −0 0.0.3/pages/Enrollteam/enrollteam.json
  7. +131 −0 0.0.3/pages/Enrollteam/enrollteam.wxml
  8. +175 −0 0.0.3/pages/Enrollteam/enrollteam.wxss
  9. +84 −0 0.0.3/pages/Mine/mine.js
  10. +4 −0 0.0.3/pages/Mine/mine.json
  11. +25 −0 0.0.3/pages/Mine/mine.wxml
  12. +65 −0 0.0.3/pages/Mine/mine.wxss
  13. +102 −0 0.0.3/pages/Navigation/navigation.js
  14. +4 −0 0.0.3/pages/Navigation/navigation.json
  15. +43 −0 0.0.3/pages/Navigation/navigation.wxml
  16. +85 −0 0.0.3/pages/Navigation/navigation.wxss
  17. +66 −0 0.0.3/pages/Outweb/outweb.js
  18. +3 −0 0.0.3/pages/Outweb/outweb.json
  19. +2 −0 0.0.3/pages/Outweb/outweb.wxml
  20. +1 −0 0.0.3/pages/Outweb/outweb.wxss
  21. +75 −0 0.0.3/pages/Result/result.js
  22. +4 −0 0.0.3/pages/Result/result.json
  23. +19 −0 0.0.3/pages/Result/result.wxml
  24. +75 −0 0.0.3/pages/Result/result.wxss
  25. +125 −0 0.0.3/pages/SelectActivity/selectactivity.js
  26. +4 −0 0.0.3/pages/SelectActivity/selectactivity.json
  27. +103 −0 0.0.3/pages/SelectActivity/selectactivity.wxml
  28. +179 −0 0.0.3/pages/SelectActivity/selectactivity.wxss
  29. BIN 0.0.3/pages/SelectActivity/windows.png
  30. +84 −0 0.0.3/pages/Signin/signin.js
  31. +4 −0 0.0.3/pages/Signin/signin.json
  32. +24 −0 0.0.3/pages/Signin/signin.wxml
  33. +64 −0 0.0.3/pages/Signin/signin.wxss
  34. +107 −0 0.0.3/pages/Welcome/welcome.js
  35. +3 −0 0.0.3/pages/Welcome/welcome.json
  36. +8 −0 0.0.3/pages/Welcome/welcome.wxml
  37. +35 −0 0.0.3/pages/Welcome/welcome.wxss
  38. BIN 0.0.3/pages/Welcome/windows0.png
  39. BIN 0.0.3/pages/Welcome/windows00.png
  40. BIN 0.0.3/pages/Welcome/windows1.png
  41. BIN 0.0.3/pages/Welcome/windows2.png
  42. BIN 0.0.3/pages/Welcome/windows3.png
  43. BIN 0.0.3/pages/Welcome/windowsloading.png
  44. +1 −0 SUMSC-Wechat-program-back-end
  45. +150 −0 api_upload究极版
  46. +114 −0 api究极版
  47. +0 −78 test.py
163 changes: 163 additions & 0 deletions 0.0.3/pages/Enroll/enroll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
// pages/Enroll/enroll.js


// 收集单个人信息的字典
var dic = {}
Page({

/**
* 页面的初始数据
*/
data: {
shengming:false,
data_list: "null"
},

/**
* 声明转存
*/

switch1Change(e) {
this.setData({
shengming: e.detail.value
})
},

/**
* 表单上传
*/
formSubmit(e) {
var formdata = e.detail.value
console.log("待上传表单数据", formdata)

if (this.data.shengming == true) {
wx.showModal({
title: 'Is the information correct?',
content: '后续改动会很麻烦',
cancelText: "Nop!",
confirmText: "Sure",
success(res) {
if (res.confirm) {
// 上传表单
console.log("表单数据", formdata)

wx.request({
url: 'http://www.burx.pro:10086/',
data: {
"name": "NAME"
},
method: "POST",
header: {
'content-type': 'application/json'
},
success(res) {
console.log(res)
},
fail(res) {
console.log(res)
}
})

wx.redirectTo({
url: "../Result/result"
})
} else if (res.cancel) {
console.log('用户取消提交表单')
}
}
})
} else if (this.data.shengming == false) {
wx.showToast({
title: '缺少声明',
icon: 'none',
duration: 2000
})
console.log('用户信息不合法')
}

},


/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;

var d_id = options.id;
this.data.current_id = d_id; //传递id至data
console.log("recieve d_id [single]: " + d_id);

// 下载资源文件
var url = 'http://www.burx.pro/data/data_detail' + this.data.current_id + '.json';

wx.request({
url: url,
method: "POST",
header: {
'content-type': 'application/json'
},
success(res) {
console.log(res.data)
that.setData({
data_list: res.data
})},
fail(res){
that.setData({
data_list: "fail"
})
}

});

},

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

},

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

},

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

},

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

},

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

},

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

},

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

}
})
5 changes: 5 additions & 0 deletions 0.0.3/pages/Enroll/enroll.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "单人报名页面"

}
78 changes: 78 additions & 0 deletions 0.0.3/pages/Enroll/enroll.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!--pages/Enroll/enroll.wxml-->
<image src="../Welcome/windows1.png" class="img0"></image>
<image src="../Welcome/windows2.png" class="img00"></image>

<!-- 加载中 -->
<view wx:if="{{data_list=='null'}}">
<view class='error0'>
<image class="topicon" src="../../image/icon/loading.png" bindtap='onSelect'></image>
<text class='error'>Loading</text>
</view>
</view>
<!-- 加载失败 -->
<view wx:elif="{{data_list=='fail'}}">
<view class='error0'>
<image class="topicon" src="../../image/icon/fail.png" bindtap='onSelect'></image>
<text class='error'>Failed to load</text>
</view>
</view>

<!-- 加载成功开始循环 -->
<view wx:else="{{data_list!=false}}">
<view class='container1'>
<view class="container2">
<image src="../Welcome/windows3.png" class="img000"></image>
<text class='title'>{{data_list.title}}</text>
<text class='text'>{{data_list.type}}参与项目</text>

<!--表单-->
<form bindsubmit='formSubmit'>
<view class='container3'>
<text class='text'>授权码 authorization code</text>
<input class='input' type='text' value='code' maxlength='10' confirm-type="next" adjust-position='{{true}}' name="code"></input>
<!--授权码暂定10位-->

<text class='text'>真实姓名 full name</text>
<input class='input' type='text' value='name' maxlength='5' confirm-type="next" adjust-position='{{true}}' name="name"></input>

<text class='text'>学号 Student ID</text>
<input class='input' type='text' value='Student ID' maxlength='15' password="true" confirm-type="next" adjust-position='{{true}}' name="id"></input>
<!--实验15位-->

<text class='text'>性别 gender</text>
<radio-group class="radio-group" name="gender">
<radio value='gril' color='rgb(0, 103, 184)' /> 女 Gril
<radio value='boy' color='rgb(0, 103, 184)' /> 男 Boy
</radio-group>

<text class='text'>年级 grade</text>
<radio-group class="radio-group" name="grade">
<radio value='freshman' color='rgb(0, 103, 184)' />大一
<radio value='Sophomore' color='rgb(0, 103, 184)' />大二
<radio value='Junior' color='rgb(0, 103, 184)' />大三
<radio value='Senior' color='rgb(0, 103, 184)' />大四
</radio-group>

<text class='text'>专业 major</text>
<input class='input' type='text' value='major' confirm-type="next" adjust-position='{{true}}' name="major"></input>

<text class='text'>邮箱 Email</text>
<input class='input' type='text' value='email' confirm-type="next" adjust-position='{{true}}' name="email"></input>

<text class='text'>电话联系方式 +86 Phone</text>
<input class='input' type='text' value='phone' maxlength='11' confirm-type="number" adjust-position='{{true}}' name="phone"></input>

<text class='text'>声明</text>
<view class='shengming'>
<switch color="red" type="checkbox" bindchange="switch1Change" />我(队长)已经详细阅读并严格遵守项目规则
</view>

<button class='button' form-type='submit'>
<image class="bimg" src="../../image/icon/weiruan.png"></image>
<text>确定</text>
</button>
</view>
</form>
</view>
</view>
</view>
133 changes: 133 additions & 0 deletions 0.0.3/pages/Enroll/enroll.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/* pages/Enroll/enroll.wxss */

page {
background-color: #282828;
}

.img000 {
width: 50vw;
height: 20vw;
}

.img00 {
margin-left: 8px;
width: 20vw;
height: 5vw;
}

.img0 {
margin-left: 8px;
width: 25vw;
height: 5vw;
}

.container2 {
width: 85vw;
margin-left: 2.5vw;
margin-right: 2.5vw;
margin-top: 50rpx;
margin-bottom: 50rpx;
display: flex;
flex-direction: column;
align-items: center;
background-color: white;
}

.container1 {
width: 90vw;
margin-left: 5vw;
margin-right: 5vw;
margin-top: 20rpx;
margin-bottom: 20rpx;
display: flex;
flex-direction: column;
background-color: rgb(0, 103, 184);
}

.container3 {
width: 80vw;
margin-left: 2.5vw;
margin-right: 2.5vw;
margin-top: 15rpx;
margin-bottom: 15rpx;
display: flex;
flex-direction: column;
background-color: white;
border: 3px solid rgb(0, 103, 184);
text-align: center;
align-items: center;
}

.title {
margin-top: 15rpx;
font-size: 65rpx;
color: black;
font-weight: bold;
}

.text {
font-size: 28rpx;
font-weight: bold;
line-height: 100rpx; /*行高*/
}

.input {
width: 60%;
border-bottom: 1px solid rgb(0, 103, 184); /* 下边框*/
font-size: 28rpx;
color: grey;
}

.radio-group{
color: grey;
font-size: 28rpx;
}

.button {
width: 550rpx;
margin-top: 50rpx;
margin-bottom: 50rpx;
color: white;
background-color: rgb(0, 103, 184);
border-radius: 50rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}

.bimg {
margin-right: 20rpx;
width: 46rpx;
height: 46rpx;
}

.shengming{
color: grey;
font-size: 25rpx;
}

.error {
margin-top: 30rpx;
font-size: 25rpx;
color: white;
text-align: center;
}

.error0 {
border-radius: 10rpx;
padding-top: 10px;
padding-bottom: 10px;
background-color: rgb(100, 100, 100);
margin: 50rpx 30rpx 50rpx 30rpx;
display: flex;
flex-direction: column;
align-items: center;
}

.topicon {
width: 10vw;
height: 10vw;
margin-left: 50rpx;
margin-right: 50rpx;
}
Loading