// pages/apply/applyperson.js
//获取应用实例
var app = getApp();
var util = require('../../utils/util.js');
var inputContent = {};//输入内容
import WxValidate from '../../utils/validate'
Page({
data: {
isLogin: util.isLogin(),
date: new Date().Format("yyyy-MM-dd"),
entranceDate: new Date().Format("yyyy"),
credentialsIndex: 0,
credentials: ["身份证", "台湾居民往来大陆通行证", "港澳居民往来大陆通行证", "军人证件", "护照"],
nationIndex: 0,
nation: ["汉", "蒙古", "回", "藏", "维吾尔", "苗", "彝", "壮", "布依", "朝鲜", "侗", "瑶", "白", "土家", "哈尼", "哈萨克", "傣", "黎", "其他"],//民族
professionIndex: 0,
profession: ["学生", "事业单位负责人", "企业负责人", "军人", "不便分类的其他从业人员", "失业(含待业及无业人员)", "其他专业技术人员", "行政办公人员", "医疗卫生辅助服务人员", "社会服务和居民生活服务人员", "其他行业"],
cultureIndex: 0,
culture: ["大专", "本科", "硕士"],
degreeIndex: 0,
degree: ["学士", "硕士", "博士", "无学位"],
cultureTypeIndex: 0,
cultureType: ["全日制", "非全日制"],
sexIndex: 0,
sex: ["男", "女"]
},
onLoad: function (options) {
console.log(options);
// 页面初始化 options为页面跳转所带来的参数
inputContent = JSON.parse(options.inputContent);//接受上一步操作参数
//考试的动态填写字段获取 不同的考试,有些自己特有的字段
util.https(app.globalData.api + "/GetExamTypeFieldList", "GET", {
inputJson: {
ExamTypeId: inputContent.ExamType //考试类型ID
},
praviteKey: app.globalData.praviteKey
},
this.getExamTypeFieldList
)
//获取地理位置信息 高德web api
/* util.https("https://restapi.amap.com/v3/geocode/regeo", "GET", {
key: '972cafdc2472d8f779c5274db770ac22',
location: Number(wx.getStorageSync("longitude")).toFixed(6) + "," + Number(wx.getStorageSync("latitude")).toFixed(6)
},
this.getCurrentCityInfo
)*/
//初始化数据
inputContent["IDType"] = 1;
inputContent["Nation"] = this.data.nation[0];
inputContent["Job"] = this.data.profession[0];
inputContent["Admssion"] = this.data.entranceDate[0];
inputContent["Education"] = this.data.culture[0];
if (this.data.credentialsIndex != 0) {
inputContent["Birthday"] = this.data.date.replace(/-/g, "");
inputContent["Gender"] = 1;
}
inputContent.AutoData = [];
},
onReady: function () {
// 页面渲染完成
},
onShow: function () {
// 页面显示
this.setData({
isLogin: util.isLogin(),
userData: wx.getStorageSync("userData") || ""//用户信息
})
console.log(wx.getStorageSync("userData"));
//验证表单
this.wxValidate();
if (this.data.isLogin) { //已登录
//民族
inputContent["Nation"] = this.data.userData.Nation || this.data.nation[0];
if (this.data.userData.Nation) {
this.setData({
nationIndex: this.data.nation.indexOf(this.data.userData.Nation)
})
}
//职业
inputContent["Job"] = this.data.userData.Job || this.data.profession[0];
if (this.data.userData.Job) {
this.setData({
professionIndex: this.data.profession.indexOf(this.data.userData.Job)
})
}
//学历
inputContent["Education"] = this.data.userData.Education || this.data.culture[0];
if (this.data.userData.Education) {
this.setData({
cultureIndex: this.data.culture.indexOf(this.data.userData.Education)
})
}
//入学时间
inputContent["Admssion"] = this.data.userData.Admssion || this.data.entranceDate[0];
if (this.data.userData.Admssion) {
this.setData({
entranceDate: this.data.userData.Admssion
})
}
}
},
onHide: function () {
// 页面隐藏
},
onUnload: function () {
// 页面关闭
},
wxValidate: function () {
//验证表单
this.WxValidate = new WxValidate({
IDCard: { //验证规则 input name值
required: true,
idcard: true
},
Name: {
required: true,
minlength: 2
},
TelNum: {
required: true,
tel: true
},
QQNumber: {
required: true,
digits: true,
minlength: 5
},
SearchPwd: {
required: !this.data.isLogin,
minlength: 6,
maxlength: 18
},
University: {
required: true,
minlength: 4
},
Colledge: {
required: true
},
MajorCode: {
required: true
},
ClassCode: {
required: true
},
},
{
IDCard: { //提示信息
required: "请填写身份证号"
},
Name: { //提示信息
required: "请填写真实姓名",
minlength: "姓名至少输入两个字符"
},
TelNum: { //提示信息
required: "请填写真实手机号码"
},
QQNumber: { //提示信息
required: "请填写QQ号码"
},
SearchPwd: { //提示信息
required: "请填写密码",
minlength: "密码至少输入6个字符",
maxlength: "密码最多输入18个字符"
},
University: { //提示信息
required: "请填写学校名称",
minlength: "学校名称至少输入四个字符"
},
Colledge: { //提示信息
required: "请填写学院信息"
},
MajorCode: { //提示信息
required: "请填写专业信息"
},
ClassCode: { //提示信息
required: "请填写班级信息"
}
})
},
//考试的动态填写字段获取 不同的考试,有些自己特有的字段
getExamTypeFieldList: function (data) {
console.log(data);
this.setData({
examTypeFieldList: data.Data
})
},
//获取地理位置信息 高德web api
/* getCurrentCityInfo: function (data) {
console.log(data);
this.setData({
currentCityAddress: data.status == 1 ? data.regeocode.formatted_address : ""
})
},*/
//证件类型选择
bindCredentialsPickerChange: function (e) {
this.setData({
credentialsIndex: e.detail.value
})
inputContent[e.currentTarget.id] = Number(e.detail.value) + 1;
},
//民族类型选择
bindNationPickerChange: function (e) {
this.setData({
nationIndex: e.detail.value
})
inputContent[e.currentTarget.id] = this.data.nati
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
微信小程序模板源码 - 51报名管家 (106个子文件)
51apply.iml 336B
applyperson.js 16KB
personalinfo.js 11KB
validate.js 11KB
util.js 11KB
applysubject.js 10KB
register.js 5KB
login.js 4KB
applyrecord.js 4KB
applypay.js 3KB
noticelist.js 2KB
subscribe.js 2KB
passportphoto.js 2KB
index.js 2KB
activityapply.js 2KB
applyrecorddetails.js 1KB
activityapplymore.js 1KB
applysubjectmore.js 1KB
addressmanage.js 940B
addaddress.js 699B
account.js 633B
app.js 567B
service.js 400B
find.js 394B
news.js 394B
app.json 2KB
index.json 86B
noticelist.json 79B
applypay.json 52B
applyrecorddetails.json 52B
addressmanage.json 48B
applyperson.json 48B
applysubject.json 48B
subscribe.json 46B
personalinfo.json 46B
addaddress.json 46B
applysubjectmore.json 46B
activityapplymore.json 46B
activityapply.json 46B
applyrecord.json 46B
passportphoto.json 43B
login.json 40B
account.json 40B
register.json 40B
service.json 40B
find.json 40B
news.json 40B
find-on.png 6KB
service-on.png 6KB
find-off.png 6KB
service-off.png 6KB
news-on.png 5KB
user-on.png 5KB
home-on.png 5KB
news-off.png 4KB
home-off.png 4KB
user-off.png 4KB
localization.png 4KB
logo.png 2KB
applyperson.wxml 10KB
personalinfo.wxml 9KB
applysubject.wxml 6KB
account.wxml 5KB
applyrecorddetails.wxml 5KB
index.wxml 4KB
activityapply.wxml 3KB
applypay.wxml 2KB
applyrecord.wxml 2KB
subscribe.wxml 2KB
register.wxml 2KB
applysubjectmore.wxml 1KB
activityapplymore.wxml 956B
addaddress.wxml 913B
login.wxml 825B
passportphoto.wxml 453B
addressmanage.wxml 447B
noticelist.wxml 379B
service.wxml 273B
find.wxml 267B
news.wxml 267B
app.wxss 116KB
index.wxss 1KB
account.wxss 558B
subscribe.wxss 537B
applysubject.wxss 255B
applyrecorddetails.wxss 239B
applypay.wxss 151B
register.wxss 118B
login.wxss 93B
applyrecord.wxss 88B
activityapplymore.wxss 74B
applysubjectmore.wxss 70B
activityapply.wxss 39B
passportphoto.wxss 38B
addressmanage.wxss 38B
personalinfo.wxss 37B
addaddress.wxss 35B
applyperson.wxss 34B
noticelist.wxss 34B
service.wxss 32B
共 106 条
- 1
- 2
资源评论
- 嵌入式linux2018-10-13很好不错,额可以使用,介绍的也还详细
- leaffall2019-01-18没找到后台程序
孙冲翼
- 粉丝: 4
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功