更新
新加入了大一的选择列表,更改了录入缺勤人员json文件的拼写错误
This commit is contained in:
parent
dce16a5669
commit
7155768240
@ -7,7 +7,11 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
multiArray: [['1705', '其他学院暂缓开通'], ['112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'], ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']],
|
||||
multiArray: [
|
||||
['1705', '1805'],
|
||||
['111', '112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'],
|
||||
['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']
|
||||
],
|
||||
multiIndex: [0, 0, 0],
|
||||
yuanyinArray: [['事假', '病假', '正常']],
|
||||
yuanyinIndex: [0],
|
||||
@ -117,14 +121,14 @@ Page({
|
||||
data.multiIndex[e.detail.column] = e.detail.value;
|
||||
switch (e.detail.column) {
|
||||
case 0:
|
||||
switch (data.multiIndex[0]) {
|
||||
case 0:
|
||||
data.multiArray[1] = ['112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'];//1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1.2.1
|
||||
switch (data.multiIndex[0]) { //判断第一列目前的值
|
||||
case 0://1705
|
||||
data.multiArray[1] = ['111', '112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222']; //1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']; //1.2.1
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[1] = ['暂缓开通'];//2.2
|
||||
data.multiArray[2] = ['暂缓开通'];//2.2.1
|
||||
case 1://1805
|
||||
data.multiArray[1] = ['112', '113', '114', '115', '116', '117', '121', '122', '123', '211', '212', '213', '214', '221', '222']; //1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']; //1.2.1
|
||||
break;
|
||||
}
|
||||
data.multiIndex[1] = 0;
|
||||
@ -133,12 +137,12 @@ Page({
|
||||
case 1:
|
||||
switch (data.multiIndex[0]) {
|
||||
case 0:
|
||||
switch (data.multiIndex[1]) {
|
||||
switch (data.multiIndex[1]) {//选择班级
|
||||
case 0:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 2:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
@ -150,22 +154,22 @@ Page({
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 5:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 6:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 7:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 8:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 9:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 10:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 11:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
@ -173,6 +177,9 @@ Page({
|
||||
case 12:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 13:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@ -180,16 +187,53 @@ Page({
|
||||
break;
|
||||
|
||||
case 1:
|
||||
switch (data.multiIndex[1]) {
|
||||
switch (data.multiIndex[1]) {//选择班级
|
||||
case 0:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']; //1805112
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805113
|
||||
break;
|
||||
case 2:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805114
|
||||
break;
|
||||
case 3:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805115
|
||||
break;
|
||||
case 4:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805116
|
||||
break;
|
||||
case 5:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805117
|
||||
break;
|
||||
case 6:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805121
|
||||
break;
|
||||
case 7:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805122
|
||||
break;
|
||||
case 8:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805123
|
||||
break;
|
||||
case 9:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805211
|
||||
break;
|
||||
case 10:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805212
|
||||
break;
|
||||
case 11:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805213
|
||||
break;
|
||||
case 12:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805214
|
||||
break;
|
||||
case 13:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805221
|
||||
break;
|
||||
case 14:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805222
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"navigationBarBackgroundColor": "#14aeee",
|
||||
"navigationBarTitleText": "正在录入确信信息中……"
|
||||
"navigationBarTitleText": "正在录入缺勤信息中……"
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
// welcome/signin/signin.js
|
||||
import { DBPost } from '../../db/DBpost.js';
|
||||
import {
|
||||
DBPost
|
||||
} from '../../db/DBpost.js';
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
@ -7,75 +9,79 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
multiArray: [['1705', '其他学院暂缓开通'], ['112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'], ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']],
|
||||
multiArray: [
|
||||
['1705', '1805', '其他学院暂缓开通'],
|
||||
['111', '112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'],
|
||||
['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']
|
||||
],
|
||||
multiIndex: [0, 0, 0],
|
||||
newnicheng: '',
|
||||
newmima: '',
|
||||
disabled: true,
|
||||
disabled1: true, //是否可用
|
||||
opacity: 0.4, //不透明度
|
||||
yanzhengjishu:0,//验证计数
|
||||
newxuehao:0, //验证学号
|
||||
changdu:false,//密码长度
|
||||
xueyuan:0, //1705
|
||||
banji:0, //213
|
||||
geren:0, //28
|
||||
openid:0
|
||||
disabled: true,
|
||||
disabled1: true, //是否可用
|
||||
opacity: 0.4, //不透明度
|
||||
yanzhengjishu: 0, //验证计数
|
||||
newxuehao: 0, //验证学号
|
||||
changdu: false, //密码长度
|
||||
xueyuan: 0, //1705
|
||||
banji: 0, //213
|
||||
geren: 0, //28
|
||||
openid: 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
onPullDownRefresh: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
onReachBottom: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
onShareAppMessage: function() {
|
||||
|
||||
},
|
||||
|
||||
@ -87,16 +93,16 @@ Page({
|
||||
|
||||
|
||||
|
||||
bindMultiPickerChange: function (e) {
|
||||
bindMultiPickerChange: function(e) {
|
||||
this.setData({
|
||||
disabled1:false
|
||||
disabled1: false
|
||||
})
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
this.setData({
|
||||
multiIndex: e.detail.value
|
||||
})
|
||||
this.setData({
|
||||
xueyuan: this.data.multiArray[0][this.data.multiIndex[0]] //学院号!!!!!
|
||||
xueyuan: this.data.multiArray[0][this.data.multiIndex[0]] //学院号!!!!!
|
||||
})
|
||||
this.setData({
|
||||
banji: this.data.multiArray[1][this.data.multiIndex[1]]
|
||||
@ -108,24 +114,28 @@ Page({
|
||||
console.log('班级号', this.data.banji);
|
||||
console.log('学号', this.data.geren);
|
||||
},
|
||||
bindMultiPickerColumnChange: function (e) {
|
||||
bindMultiPickerColumnChange: function(e) {
|
||||
console.log('修改的列为', e.detail.column, ',值为', e.detail.value);
|
||||
var data = {
|
||||
multiArray: this.data.multiArray,
|
||||
multiIndex: this.data.multiIndex
|
||||
};
|
||||
|
||||
|
||||
data.multiIndex[e.detail.column] = e.detail.value;
|
||||
switch (e.detail.column) {
|
||||
switch (e.detail.column) {//选择改变的列
|
||||
case 0:
|
||||
switch (data.multiIndex[0]) {
|
||||
case 0:
|
||||
data.multiArray[1] = ['112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222'];//1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1.2.1
|
||||
switch (data.multiIndex[0]) { //判断第一列目前的值
|
||||
case 0://1705
|
||||
data.multiArray[1] = ['111', '112', '113', '114', '115', '116', '117', '121', '122', '211', '212', '213', '221', '222']; //1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']; //1.2.1
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[1] = ['暂缓开通'];//2.2
|
||||
data.multiArray[2] = ['暂缓开通'];//2.2.1
|
||||
case 1://1805
|
||||
data.multiArray[1] = ['112', '113', '114', '115', '116', '117', '121', '122', '123', '211', '212', '213', '214', '221', '222']; //1.2
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']; //1.2.1
|
||||
break;
|
||||
case 2://其他学院
|
||||
data.multiArray[1] = ['暂缓开通']; //2.2
|
||||
data.multiArray[2] = ['暂缓开通']; //2.2.1
|
||||
break;
|
||||
}
|
||||
data.multiIndex[1] = 0;
|
||||
@ -134,63 +144,103 @@ Page({
|
||||
case 1:
|
||||
switch (data.multiIndex[0]) {
|
||||
case 0:
|
||||
switch (data.multiIndex[1]) {
|
||||
switch (data.multiIndex[1]) {//选择班级
|
||||
case 0:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 2:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 3:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 4:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 5:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 6:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 7:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 8:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 9:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 10:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 11:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 12:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09','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'];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
case 13:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
switch (data.multiIndex[1]) {
|
||||
switch (data.multiIndex[1]) {//选择班级
|
||||
case 0:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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']; //1805112
|
||||
break;
|
||||
case 1:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805113
|
||||
break;
|
||||
case 2:
|
||||
data.multiArray[2] = [' '];
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805114
|
||||
break;
|
||||
case 3:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805115
|
||||
break;
|
||||
case 4:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805116
|
||||
break;
|
||||
case 5:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805117
|
||||
break;
|
||||
case 6:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805121
|
||||
break;
|
||||
case 7:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805122
|
||||
break;
|
||||
case 8:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805123
|
||||
break;
|
||||
case 9:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805211
|
||||
break;
|
||||
case 10:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805212
|
||||
break;
|
||||
case 11:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805213
|
||||
break;
|
||||
case 12:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805214
|
||||
break;
|
||||
case 13:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805221
|
||||
break;
|
||||
case 14:
|
||||
data.multiArray[2] = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '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'];//1805222
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -198,7 +248,7 @@ Page({
|
||||
console.log(data.multiIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
this.setData(data);
|
||||
},
|
||||
|
||||
@ -208,7 +258,7 @@ Page({
|
||||
|
||||
|
||||
//判断长度
|
||||
IsTel: function (s) {
|
||||
IsTel: function(s) {
|
||||
if (s != null) {
|
||||
var length = s.length;
|
||||
if (length == 6) {
|
||||
@ -219,15 +269,15 @@ Page({
|
||||
}
|
||||
},
|
||||
//密码的输入框
|
||||
mima: function (e) {
|
||||
mima: function(e) {
|
||||
var that = this
|
||||
console.log('输入值为',e.detail.value)
|
||||
console.log('输入值为', e.detail.value)
|
||||
var isTel = that.IsTel(e.detail.value)
|
||||
that.setData({
|
||||
changdu:isTel
|
||||
changdu: isTel
|
||||
})
|
||||
console.log('点击态判断',that.data.changdu)
|
||||
if (isTel&&that.data.yanzhengjishu!=0) {
|
||||
console.log('点击态判断', that.data.changdu)
|
||||
if (isTel && that.data.yanzhengjishu != 0) {
|
||||
that.setData({
|
||||
disabled: false,
|
||||
opacity: 1
|
||||
@ -248,8 +298,8 @@ Page({
|
||||
|
||||
|
||||
//提交按钮确认
|
||||
sumit: function () {
|
||||
var that=this;
|
||||
sumit: function() {
|
||||
var that = this;
|
||||
var dbPost = new DBPost();
|
||||
wx.vibrateShort()
|
||||
wx.showModal({
|
||||
@ -258,18 +308,18 @@ Page({
|
||||
confirmText: '继续绑定',
|
||||
cancelText: '重新选择',
|
||||
confirmColor: '#10aeff',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.code) {
|
||||
wx.request({
|
||||
url: 'https://powerrain.cn/rcs/API/bangding.php',
|
||||
data: {
|
||||
code: res.code,
|
||||
xuehao:that.data.newxuehao
|
||||
xuehao: that.data.newxuehao
|
||||
},
|
||||
success: function (result) {
|
||||
success: function(result) {
|
||||
console.log(result);
|
||||
dbPost.newxuehao(result.data.xueHao);
|
||||
dbPost.newxingming(result.data.xingMing);
|
||||
@ -278,7 +328,9 @@ Page({
|
||||
dbPost.newadmin(result.data.admin);
|
||||
that.data.xuehao = result.data.xueHao;
|
||||
console.log(that.data.xuehao);
|
||||
wx.switchTab({ url: '../../pages/post/post' })
|
||||
wx.switchTab({
|
||||
url: '../../pages/post/post'
|
||||
})
|
||||
wx.showToast({
|
||||
title: '注册成功',
|
||||
icon: 'success',
|
||||
@ -292,64 +344,64 @@ Page({
|
||||
}
|
||||
});
|
||||
console.log('用户点击继续绑定')
|
||||
} else if (res.cancel) {
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击重新选择')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
yanzheng:function () { //验证
|
||||
yanzheng: function() { //验证
|
||||
var a = this.data.xueyuan
|
||||
var b = this.data.banji
|
||||
var c = this.data.geren
|
||||
this.setData({
|
||||
newxuehao:(a+b+c)
|
||||
newxuehao: (a + b + c)
|
||||
})
|
||||
var that=this;
|
||||
|
||||
var that = this;
|
||||
|
||||
wx.request({
|
||||
url: 'https://powerrain.cn/rcs/API/yanzheng.php', //仅为示例,并非真实的接口地址
|
||||
data: {
|
||||
code:that.data.newxuehao
|
||||
code: that.data.newxuehao
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json' // 默认值
|
||||
},
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
console.log(res.data);
|
||||
if(res.data==null){
|
||||
that.data.openid=1;
|
||||
}else{
|
||||
if (res.data == null) {
|
||||
that.data.openid = 1;
|
||||
} else {
|
||||
that.data.openid = res.data.openid;
|
||||
}
|
||||
}
|
||||
console.log(that.data.openid)
|
||||
if(!that.data.openid){
|
||||
if (!that.data.openid) {
|
||||
wx.showToast({
|
||||
title: '验证成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
if (that.data.yanzhengjishu != 0) { //判断是否可以点击完成注册
|
||||
if (that.data.yanzhengjishu != 0) { //判断是否可以点击完成注册
|
||||
that.setData({
|
||||
disabled: false,
|
||||
opacity: 1
|
||||
@ -360,7 +412,7 @@ var that=this;
|
||||
opacity: 0.4
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
that.setData({
|
||||
disabled: true,
|
||||
opacity: 0.4
|
||||
@ -372,7 +424,7 @@ var that=this;
|
||||
confirmText: '重新选择',
|
||||
cancelText: '联系客服',
|
||||
confirmColor: '#10aeff',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击重新选择')
|
||||
} else if (res.cancel) {
|
||||
@ -381,14 +433,14 @@ var that=this;
|
||||
content: 'QQ:1144131090',
|
||||
confirmText: '复制',
|
||||
confirmColor: '#10aeff',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.setClipboardData({
|
||||
data:'1144131090',
|
||||
success: function(res){
|
||||
data: '1144131090',
|
||||
success: function(res) {
|
||||
wx.showToast({
|
||||
title:'复制成功',
|
||||
icon:'success'
|
||||
title: '复制成功',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -406,12 +458,12 @@ var that=this;
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
yanzhengjishu:this.data.yanzhengjishu+1 //验证计数
|
||||
yanzhengjishu: this.data.yanzhengjishu + 1 //验证计数
|
||||
})
|
||||
console.log('验证计数',this.data.yanzhengjishu)
|
||||
console.log('上传学号为',this.data.newxuehao)
|
||||
console.log('验证计数', this.data.yanzhengjishu)
|
||||
console.log('上传学号为', this.data.newxuehao)
|
||||
console.log(this.data.openid)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user