【开发】 注册

This commit is contained in:
fengachen
2021-12-14 09:37:37 +08:00
parent cd7a9c88b9
commit 6e4c20cfbe
21 changed files with 1321 additions and 32 deletions
+1
View File
@@ -2,6 +2,7 @@
"pages":[
"pages/home/home",
"pages/login/login",
"pages/register/register",
"pages/mine/mine",
"pages/index/index",
"pages/logs/logs",
Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

+4
View File
@@ -65,6 +65,10 @@ const UserApi = {
committeeDetail: (params) => http.get(`${URL_CONFIG}payCaseCommittee/payCaseCommittee/detail`, params),
// 资料网员分页接口
queryDataMemberList: (params) => http.get(`${URL_CONFIG}jero/memberProjectSubitem/pageCompany`, params),
// 获取用户的信息
getUserInfo: (params) => http.get(`${URL_CONFIG}/sys/user/queryById`, params),
// 注册
registerUser: (params) => http.post(`${URL_CONFIG}/sys/user/register`, params),
}
export default UserApi
+19 -2
View File
@@ -72,19 +72,36 @@ Page({
}
const that = this
let pages = getCurrentPages()
let prevPage = pages[pages.length - 3];
signUpApi.addCompanyNoLimit(formData).then(res => {
if (res.success) {
wx.showToast({
title: res.message,
icon: "none",
duration: 800,
});
wx.setStorage({
key:'selectedCompany',
data:res.result
})
if (that.data.prepage === 'guoji') {
wx.navigateTo({
url: '../signUpPageGuoji/signUpPageGuoji',
})
} else {
} else if(that.data.prepage === 'register'){
prevPage.setData({
'selectedCompany.companyName':res.result.companyName,
'selectedCompany.companyId':res.result.id,
})
wx.navigateBack({
delta: 2,
})
// wx.navigateTo({
// url: '../register/register',
// })
} else{
wx.navigateTo({
url: '../signUpPage/signUpPage',
})
+12 -2
View File
@@ -21,7 +21,7 @@ Page({
dataSource: [],
// 是否国际研讨会过来的
page: "",
// 是否需要调用无限制接口
// 是否需要调用无限制接口
nolimitBool:false
},
// 输入查询条件
@@ -104,6 +104,8 @@ Page({
},
// 选中的企业
selectedItem(e) {
let pages = getCurrentPages()
let prevPage = pages[pages.length - 2];
const that = this
// 带过去的信息
let selectedCompany = JSON.stringify(e.currentTarget.dataset.company)
@@ -117,7 +119,15 @@ Page({
wx.navigateTo({
url: `../signUpPageGuoji/signUpPageGuoji?company=${selectedCompany}`,
})
} else {
} else if(that.data.page === 'register'){
prevPage.setData({
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
'selectedCompany.companyId':e.currentTarget.dataset.company.id,
})
wx.navigateBack({
delta: 1,
})
} else{
wx.navigateTo({
url: `../signUpPage/signUpPage?company=${selectedCompany}`,
})
+7
View File
@@ -91,6 +91,13 @@ Page({
goBack(){
wx.navigateBack()
},
// 注册
register() {
wx.navigateTo({
url: '../register/register',
})
},
// 微信登录
wxLogin(){
const that = this
+1
View File
@@ -33,6 +33,7 @@
</view>
<view class="forget">
<text bindtap="phonePassword">手机密码登录</text>
<text bindtap="register">注册</text>
<text bindtap="updateInfo">忘记密码?</text>
</view>
<text class="other-way">或用以下方式登录</text>
+29 -28
View File
@@ -124,36 +124,37 @@ Page({
// 会议详情
meetingDetail(e) {
let meetingInfo = JSON.stringify(e.currentTarget.dataset.meetinginfo)
let meetingItem = e.currentTarget.dataset.meetinginfo
wx.navigateTo({
url: `../meetingDetailSigned/meetingDetailSigned?meetingInfo=${meetingInfo}`, // (已报名)
})
// let meetingItem = e.currentTarget.dataset.meetinginfo
// 如果是去报名页面需要在缓存中存储会议信息 当报名结束后 需要清除缓存中的当前会议信息 meetingSignUpType 1 可报名 2报名
if (meetingItem.meetingSignUpType === 1) {
// 从消息报名的参会单位不可更改
wx.setStorage({
key:'companyDisabled',
data:true
})
wx.setStorage({
key: "currentMeetingInfo",
data: e.currentTarget.dataset.meetinginfo,
success() {
// 国际研讨会去国际研讨会的报名页面
if (meetingItem.meetingType !== 3) {
wx.navigateTo({
url: `../signUpPage/signUpPage?type=indexMsg`
})
} else if (meetingItem.meetingSignUpType === 2) {
wx.navigateTo({
url: `../signUpPageGuoji/signUpPageGuoji`
})
}
}
})
} else if (meetingItem.meetingSignUpType === 2) {
wx.navigateTo({
url: `../meetingDetailSigned/meetingDetailSigned?meetingInfo=${meetingInfo}`, // (已报名)
})
}
// if (meetingItem.meetingSignUpType === 1) {
// // 从消息报名的参会单位不可更改
// wx.setStorage({
// key:'companyDisabled',
// data:true
// })
// wx.setStorage({
// key: "currentMeetingInfo",
// data: e.currentTarget.dataset.meetinginfo,
// success() {
// // 国际研讨会去国际研讨会的报名页面
// if (meetingItem.meetingType !== 3) {
// wx.navigateTo({
// url: `../signUpPage/signUpPage?type=indexMsg`
// })
// } else if (meetingItem.meetingSignUpType === 2) {
// wx.navigateTo({
// url: `../signUpPageGuoji/signUpPageGuoji`
// })
// }
// }
// })
// }
},
// 获取会议列表数据
+4
View File
@@ -43,6 +43,10 @@
<image mode="aspectFill" src="../../assets/images/location.png"></image>
<text>{{item.venue + '/' + item.address}}</text>
</view>
<view class="content-text">
<image mode="aspectFill" src="../../assets/images/location.png"></image>
<text>报名状态:{{ item.signUpStatus_dictText}}</text>
</view>
</view>
<view wx:if="{{meetingList.length === 0}}" class="no-data">
<text>暂无数据</text>
+661
View File
@@ -0,0 +1,661 @@
// pages/register/register.js
import UserApi from '../../assets/js/http/userApi'
import {
phoneReg,
postcode,
compareDate,
passwordReg,
isEmail,
} from '../../utils/validate'
import {
encrypt
} from '../../assets/js/jsencrypt/rsa'
var countdown = 60; // 倒计时秒数
Page({
/**
* 页面的初始数据
*/
data: {
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
showGetCaptcha: true, // 默认显示 获取验证阿门
phone: '',
password: '',
confirmPassword: '',
captcha: '',
count: 60,
rsaPublicKey: '',
show: true, // 默认显示密码框
confirmshow: true, // 确认密码的显示
currentTab: 1, // 当前到哪一步
selectedCompany: {}, // 选中的企业
sexList: [{
name: '男',
val: 1
}, {
name: '女',
val: 2
}],
prePageData: {}, // 上一页的数据
currentInfo: {}, // 当前页的数据
},
// 提交 提交完成之后 要清除缓存中 存入的企业信息 并返回登录页
formSubmit(e) {
// 再次校准姓名,
if (this.data.currentInfo.name === '' || this.data.currentInfo.name === null || this.data.currentInfo.name === undefined) {
wx.showToast({
title: '请输入姓名',
icon: 'none',
duration: 800
})
return
}
// 邮政编码
if (this.data.currentInfo.postalCode === '' || this.data.currentInfo.postalCode === null || this.data.currentInfo.postalCode === undefined) {
wx.showToast({
title: '请输入邮政编码',
icon: 'none',
duration: 800
})
return
} else if (this.data.currentInfo.postalCode && !postcode(this.data.currentInfo.postalCode)) {
wx.showToast({
title: '请输入正确的邮政编码',
icon: 'none',
duration: 800
})
return
}
// 手机号
if (this.data.currentInfo.phone === '' || this.data.currentInfo.phone === null || this.data.currentInfo.phone === undefined) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
duration: 800
})
return
} else if (this.data.currentInfo.phone && !phoneReg(this.data.currentInfo.phone)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 800
})
return
}
// 性别
if (this.data.currentInfo.gender === '' || this.data.currentInfo.gender === null || this.data.currentInfo.gender === undefined) {
wx.showToast({
title: '请选择性别',
icon: 'none',
duration: 800
})
return
}
// 通讯地址
if (this.data.currentInfo.contactAddress === '' || this.data.currentInfo.contactAddress === null || this.data.currentInfo.contactAddress === undefined) {
wx.showToast({
title: '请输入通讯地址',
icon: 'none',
duration: 800
})
return
}
// 再次校准email
if (this.data.currentInfo.email === '' || this.data.currentInfo.email === null || this.data.currentInfo.email === undefined) {
wx.showToast({
title: '请输入邮箱',
icon: 'none',
duration: 800
})
return
} else if (this.data.currentInfo.email && !isEmail(this.data.currentInfo.email)) {
wx.showToast({
title: '请输入正确的邮箱',
icon: 'none',
duration: 800
})
return
}
let formData = Object.assign({},this.data.prePageData,this.data.currentInfo,this.data.selectedCompany)
formData.post = e.detail.value.post.trim()
formData.remarks = e.detail.value.remarks.trim()
formData.rsaPublicKey = this.data.rsaPublicKey
formData.phone = encrypt(this.data.rsaPublicKey,formData.phone),
formData.password = encrypt(this.data.rsaPublicKey,formData.password),
formData.confirmPassword = encrypt(this.data.rsaPublicKey,formData.confirmPassword),
console.log('表单提交的数据',formData);
UserApi.registerUser(formData).then(res => {
console.log(res);
wx.navigateTo({
url: '../login/login',
success(){
wx.removeStorage({
key: 'selectedCompany',
})
}
})
}).catch(err => {
wx.showToast({
title: err.message,
icon:none,
duration:800
})
})
},
changeGender(e){
console.log(e);
this.setData({
'currentInfo.gender':e.detail.value
})
},
// 下一步
nextStep() {
// 再次校准手机号
if (this.data.prePageData.phone === '' || this.data.prePageData.phone === null || this.data.prePageData.phone === undefined) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
duration: 800
})
return
} else if (this.data.prePageData.phone && !phoneReg(this.data.prePageData.phone)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 800
})
return
}
// 再次校准验证码
if (this.data.prePageData.captcha === '' || this.data.prePageData.captcha === null || this.data.prePageData.captcha === undefined) {
wx.showToast({
title: '请输入验证码',
icon: 'none',
duration: 800
})
return
}
// 再次校准密码
if (this.data.prePageData.password === '' || this.data.prePageData.password === null || this.data.prePageData.password === undefined) {
wx.showToast({
title: '请输入密码',
icon: 'none',
duration: 800
})
return
} else if (this.data.prePageData.password && !passwordReg(this.data.prePageData.password)) {
wx.showToast({
title: '密码长度至少8位,并包括数字、小写字母、大写字母和特殊符号4类',
icon: 'none',
duration: 800
})
return
}
// 再次校准确认密码
if (this.data.prePageData.confirmPassword === '' || this.data.prePageData.confirmPassword === null || this.data.prePageData.confirmPassword === undefined) {
wx.showToast({
title: '请输入确认密码',
icon: 'none',
duration: 800
})
return
} else if (this.data.prePageData.phone && this.data.prePageData.password !== this.data.prePageData.confirmPassword) {
wx.showToast({
title: '密码与确认密码不一致',
icon: 'none',
duration: 800
})
return
}
this.setData({
currentTab: 2
})
},
// 上一步
preStep() {
this.setData({
currentTab: 1
})
},
// 选择企业
selectCompany() {
wx.navigateTo({
url: '../companyList/companyList?page=register',
})
},
goBack() {
wx.navigateBack()
},
// 密码框与文本框的切换
showPassword() {
this.setData({
show: !this.data.show,
})
},
showConfirmPassword() {
this.setData({
confirmshow: !this.data.confirmshow,
})
},
bindInputPhone(e) {
this.data.phone = e.detail.value
this.setData({
phone: e.detail.value
})
},
// 获取验证码
getVerCode() {
countdown = 60
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(this.data.phone)) {
UserApi.sendCode({
phone: this.data.phone,
codeType: 1
}).then(res => {
// 获取成功,倒计时 start
if (res.success) {
this.countDown()
wx.showToast({
title: '发送成功',
icon: 'none',
duration: 2000
})
} else {
wx.showToast({
title: res.message,
icon: 'none',
duration: 2000
})
}
}).catch(err => {
wx.showToast({
title: '获取失败',
icon: 'none',
duration: 2000
})
})
} else {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 2000
})
}
},
// 倒计时
countDown() {
if (countdown === 0) {
this.setData({
showGetCaptcha: true
})
countdown = 60;
return;
} else {
this.setData({
showGetCaptcha: false
})
countdown--;
this.setData({
count: countdown
})
}
setTimeout(() => {
this.countDown()
}, 1000)
// 倒计时 end
},
// 校验手机号
validatePhone(e) {
let value = e.detail.value
this.setData({
phone: value,
'prePageData.phone': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (phoneReg(value)) {
this.setData({
'prePageData.phone': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
// 校验验证码
validateVerCode(e) {
let value = e.detail.value
this.setData({
'prePageData.captcha': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else {
this.setData({
captcha: value,
'prePageData.captcha': value
})
}
},
// 校验姓名
validateName(e) {
let value = e.detail.value
this.setData({
'currentInfo.name': value,
})
let {
message,
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else {
this.setData({
'currentInfo.name': value
})
}
},
// 第二步的校验手机号
validatePhoneCurent(e) {
let value = e.detail.value
this.setData({
'currentInfo.phone': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (phoneReg(value)) {
this.setData({
'currentInfo.phone': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
// 校验邮政编码
validatePostalCode(e) {
let value = e.detail.value
this.setData({
'currentInfo.postalCode': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (postcode(value)) {
this.setData({
'currentInfo.postalCode': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
// 校验邮箱
validateEmail(e) {
let value = e.detail.value
this.setData({
'currentInfo.email': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (isEmail(value)) {
this.setData({
'currentInfo.email': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
// 校验通讯地址
validateContactAddress(e) {
let value = e.detail.value
this.setData({
'currentInfo.contactAddress': value,
})
let {
message,
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else {
this.setData({
'currentInfo.contactAddress': value
})
}
},
// 校验密码
validatePsd(e) {
console.log(e);
let value = e.detail.value
this.setData({
password: value,
'prePageData.password': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (passwordReg(value)) {
this.setData({
password: value,
'prePageData.password': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
// 校验确认密码
validateConfirmPsd(e) {
console.log(e);
let value = e.detail.value
this.setData({
'prePageData.confirmPassword': value
})
let {
message,
errmsg
} = e.currentTarget.dataset
if (value === '' || value === undefined) {
wx.showToast({
title: message,
icon: 'none',
duration: 800
})
return
} else if (e.detail.value === this.data.password) {
this.setData({
confirmPassword: value,
'prePageData.confirmPassword': value
})
} else {
wx.showToast({
title: errmsg,
icon: 'none',
duration: 800
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
UserApi.getRSAPublicKey().then(res => {
if (res.success) {
this.setData({
rsaPublicKey: res.result
})
wx.setStorage({
key: 'rsaPublicKey',
data: res.result
})
}else{
wx.showToast({
title: res.message,
icon: 'none',
duration: 2000
})
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
// const that = this
// wx.getStorage({
// key:'selectedCompany',
// success(res){
// console.log(res);
// that.setData({
// 'selectedCompany.companyName':res.data.companyName,
// 'selectedCompany.companyId':res.data.id
// })
// }
// })
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}
+151
View File
@@ -0,0 +1,151 @@
<!--pages/register/register.wxml-->
<view class="container-box">
<view class="home-bg">
<!-- 自定义头部start -->
<view class="custom flex_center back-none" style="padding-top:{{statusBarHeight}}px;">
<image class="go-back" src="../../assets/images/back-white.png" bindtap="goBack"></image>
<text>注册</text>
</view>
<view class="empty_custom back-none" style="padding-top:{{statusBarHeight}}px"></view>
<!-- 空view用来填充自定义头部的padding-top -->
<!-- 自定义头部end -->
<image class="bg-image" mode="scaleToFill" src="../../assets/images/login-bg.png"></image>
<view class="bg-text">
<text>您好,欢迎注册</text>
<text>标准所协同工作平台</text>
</view>
</view>
<form bindsubmit="formSubmit" class="form-box">
<!-- 步骤条begin -->
<view class="step">
<view class=" {{currentTab === 1?'step-first-active':'step-first'}}">1</view>
<text class=" {{currentTab === 1?'step-first-text-active':'step-first-text'}}"></text>
<text class=" {{currentTab === 2?'step-second-text-active':'step-second-text'}}"></text>
<view class=" {{currentTab === 2?'step-second-active':'step-second'}}">2</view>
</view>
<view class="step-title">
<text class=" {{currentTab === 1?'step-first-title-active':'step-first-title'}}">设置密码</text>
<text class=" {{currentTab === 2?'step-second-title-active':'step-second-title'}}">完善信息</text>
</view>
<!-- 步骤条end -->
<view class="item" wx:if="{{currentTab === 1}}">
<view class="label validate">手机号</view>
<view class="value">
<input name="phone" value="{{phone}}" bindblur="validatePhone" data-type="phone" data-message='请输入手机号' data-errmsg='请输入正确的手机号' type="number" maxlength="11" bindinput="bindInputPhone" placeholder="请输入手机号" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 1}}">
<view class="label validate">验证码</view>
<view class="value">
<input name="captcha" value="{{captcha}}" bindblur="validateVerCode" placeholder="请输入验证码" data-message='请输入验证码' />
</view>
<view wx:if="{{showGetCaptcha}}" class="captcha" bindtap="getVerCode">获取验证码</view>
<view wx:else="{{showGetCaptcha}}" class="captcha count">{{count}}</view>
</view>
<view class="item" wx:if="{{currentTab === 1}}">
<view class="label validate">密码</view>
<view class="value text-password">
<input name="password" value="{{password}}" maxlength="50" password="{{show}}" placeholder="请输入密码" bindblur="validatePsd" data-message='请输入密码' data-errmsg='密码长度至少8位,并包括数字、小写字母、大写字母和特殊符号4类'
bindinput="handlePasswordInput" />
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
</view>
</view>
<view class="item" wx:if="{{currentTab === 1}}">
<view class="label validate">确认密码</view>
<view class="value text-password">
<input name="confirmPassword" maxlength="50" value="{{confirmPassword}}" password="{{confirmshow}}" placeholder="请输入确认密码" bindblur="validateConfirmPsd" data-message='请输入确认密码' data-errmsg='确认密码与密码不一致'
bindinput="handlePasswordInput" />
<image src="../../assets/images/show.png" class="show" wx:if="{{!confirmshow}}" bindtap="showConfirmPassword">
</image>
<image src="../../assets/images/none.png" class="show" wx:if="{{confirmshow}}" bindtap="showConfirmPassword">
</image>
</view>
</view>
<!-- 第二步完善信息begin -->
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label">企业名称</view>
<view class="value">
<input name="companyName" value="{{selectedCompany.companyName}}" bindfocus="selectCompany" placeholder="请输入企业名称" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">姓名</view>
<view class="value">
<input name="name" bindblur="validateName" data-message='请输入姓名' value="{{currentInfo.name}}" maxlength="50" placeholder="请输入姓名" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">邮政编码</view>
<view class="value">
<input name="postalCode" bindblur="validatePostalCode" data-message='请输入邮政编码' data-errmsg='请输入正确的邮政编码' type="number" maxlength="6" value="{{currentInfo.postalCode}}" placeholder="请输入邮政编码" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">手机号</view>
<view class="value">
<input name="phone2" bindblur="validatePhoneCurent" data-type="phone" data-message='请输入手机号' data-errmsg='请输入正确的手机号' type="number" maxlength="11" value="{{currentInfo.phone}}" placeholder="请输入手机号" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label">职务</view>
<view class="value">
<input name="post" value="{{currentInfo.post}}" maxlength="50" placeholder="请输入职务" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">性别</view>
<view class="value">
<radio-group name='sex' value="{{currentInfo.gender}}" bindchange="changeGender">
<label class="radio radio-item" wx:for="{{sexList}}" wx:key="item">
<radio class="radio-scale" value="{{item.val}}" color="#069F99"/>{{item.name}}
</label>
</radio-group>
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">通讯地址</view>
<view class="value">
<input name="contactAddress" value="{{currentInfo.contactAddress}}" bindblur="validateContactAddress" data-message='请输入通讯地址' maxlength="50" placeholder="请输入通讯地址" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label validate">邮箱</view>
<view class="value">
<input name="email" value="{{currentInfo.email}}" bindblur="validateEmail" data-message='请输入邮箱' data-errmsg='请输入正确的邮箱' maxlength="50" placeholder="请输入邮箱" />
</view>
</view>
<view class="item" wx:if="{{currentTab === 2}}">
<view class="label">备注</view>
<view class="value">
<textarea maxlength="200" name='remarks' value="{{currentInfo.remarks}}" bindblur="bindTextAreaBlur" placeholder="请输入备注" />
</view>
</view>
<!-- 第二部完善信息end -->
<view class="btn-area" wx:if="{{currentTab === 1}}">
<button type="primary" bindtap="nextStep">下一步</button>
</view>
<!-- 最后的提交按钮 -->
<view class="btn-area" wx:if="{{currentTab === 2 }}">
<button bindtap="preStep" class="pre-step">上一步</button>
<button type="primary" formType="submit" class="submit">提交</button>
</view>
</form>
</view>
+258
View File
@@ -0,0 +1,258 @@
/* pages/register/register.wxss */
page {
overflow-x: hidden;
width: 100%;
color: #333;
box-sizing: border-box;
}
.container-box{
overflow-x: hidden;
}
.form-box{
transform: translateY(-50px) !important;
}
.home-bg{
position: relative;
height: 200pt;
}
.home-bg .bg-image{
position: absolute;
top: 0;
left: 0;
}
.back-none{
background-color: none !important;
}
.back-none text{
color: #fff !important;
}
.bg-text{
bottom: 50pt;
position: absolute;
left: 34pt;
color: #fff;
}
.go-back{
z-index: 9;
}
.bg-text text:nth-child(1){
display: block;
font-size: 15px;
margin-bottom: 8px;
}
.bg-text text:nth-child(2){
display: block;
font-size: 18px;
font-weight: 600;
letter-spacing: 1px;
}
.form-box{
display: block;
box-sizing: border-box;
width: 100%;
height: auto;
background-color: #fff;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
transform: translateY(-10%);
padding: 30px 20px;
}
.form-box .item {
position: relative;
display: block !important;
width: 100%;
margin-bottom: 25px;
}
.form-box .label{
width: 100%;
color: #A4A4A4;
font-size: 12px;
margin-bottom: 10px;
}
.form-box .validate::before{
content: "*";
color: red;
position: absolute;
top: 0;
left: -20rpx;
}
.form-box .value{
width: 100%;
}
.form-box .value input{
width: 100%;
box-sizing: border-box;
background-color: #F2F2F4;
border-radius: 8px;
color: #333;
font-size: 15px;
height: 50px;
padding: 0 90px 0 20px;
}
.form-box .value textarea{
width: 100%;
box-sizing: border-box;
background-color: #F2F2F4;
border-radius: 8px;
color: #333;
font-size: 15px;
height: 100px;
padding: 10px 90px 0 20px;
}
.form-box .captcha{
color: #069F99;
position: absolute;
right: 10px;
font-size: 13px;
top: 55%;
z-index: 9;
}
.form-box .count {
color: #999;
}
.btn-area {
width: 100%;
height: 50px;
display: flex;
justify-content: space-between;
}
.btn-area button{
width: 40%;
background-color: #069F99 !important;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
}
.btn-area button.submit{
width: 40%;
background-color: #069F99 !important;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
}
.btn-area button.pre-step{
width: 40%;
background-color: #ccc !important;
display: flex;
color: #fff;
justify-content: center;
align-items: center;
border-radius: 4px;
}
.other-way{
color: #A4A4A4;
font-size: 12px;
display: block;
width: 100%;
text-align: center;
margin-top: 70px;
letter-spacing: 1px;
}
.show{
width: 15px;
height: 15px;
position: absolute;
right: 10px;
top: 58%;
z-index: 9;
}
/* 步骤条begin */
.step {
position: relative;
display: flex;
width: 80%;
margin: 0 auto;
padding-bottom: 5px;
height:30px;
line-height: 30px;
color: #fff;
font-family: PingFang-SC-Bold;
text-align: center;
}
.step-first {
width: 30px;
height: 30px;
border-radius: 100%;
background: #cdcdcf;
}
.step-first-active {
width: 30px;
height: 30px;
border-radius: 100%;
background-image: linear-gradient(#0BD3CC, #069F99);
}
.step-first-text {
position: relative;
top: 50%;
left: 0;
width: calc((100% - 60px) / 2 );
height: 2px;
background-color: #cdcdcf;
}
.step-first-text-active {
position: relative;
top: 50%;
left: 0;
width: calc((100% - 60px) / 2 );
height: 2px;
background-color: #069F99;
}
.step-second-text {
position: relative;
top: 50%;
right: 0;
width: calc((100% - 60px) / 2 );
height: 2px;
background-color: #cdcdcf;
}
.step-second-text-active {
position: relative;
top: 50%;
right: 0;
width: calc((100% - 60px) / 2 );
height: 2px;
background-color: #069F99;
}
.step-second {
width: 30px;
height: 30px;
border-radius: 100%;
background: #cdcdcf;
}
.step-second-active {
width: 30px;
height: 30px;
border-radius: 100%;
background-image: linear-gradient(#0BD3CC, #069F99);
}
.step-title {
padding-bottom: 10px;
height: 20px;
width: 90%;
display: flex;
justify-content: space-between;
margin: 0 auto;
}
.step-first-title {
color: #999;
}
.step-first-title-active {
color: #069F99;
}
.step-second-title {
color: #999;
}
.step-second-title-active {
color: #069F99;
}
/* 步骤条end */
+108
View File
@@ -0,0 +1,108 @@
// pages/standardRouter/standardRouter.js
Page({
/**
* 页面的初始数据
*/
data: {
pageRputers: [
{
path: "",
imgPath:'../../assets/images/basic-info.png',
val: "1",
name: "基本信息"
},
{
path: "../meeting/meeting?type=", // type 是会议类型
imgPath:'../../assets/images/notice.png',
val: "2",
name: "标准宣贯"
},
{
path: "../meeting/meeting?type=",
imgPath:'../../assets/images/train.png',
val: "3",
name: "培训会"
},
{
path: "../meeting/meeting?type=",
imgPath:'../../assets/images/info.png',
val: "4",
name: "信息交流会"
},
{
path: "../meeting/meeting?type=", // 这里应该是一个新的页面 或者用分标委的页面
imgPath:'../../assets/images/lishi.png',
val: "5",
name: "理事会"
},
]
},
/**
* @description 跳转
* @param {*} e
*/
clickSelect(e){
let item = e.currentTarget.dataset.item
wx.navigateTo({
url: item.path,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "标协会员",
"usingComponents": {}
}
+17
View File
@@ -0,0 +1,17 @@
<!--pages/standardRouter/standardRouter.wxml-->
<view class="select-box">
<view class="select">
<view class="select-item" wx:for="{{pageRputers}}" wx:for-item="item" wx:key="path" bindtap="clickSelect"
data-item="{{item}}" data-index="{{index}}">
<view class="image-box">
<view class="img-mask"></view>
<image src="{{item.imgPath}}" class="img"></image>
</view>
<text>{{item.name}}</text>
</view>
<text class="select-item"></text>
<text class="select-item"></text>
<text class="select-item"></text>
<text class="select-item"></text>
</view>
</view>
+41
View File
@@ -0,0 +1,41 @@
/* pages/standardRouter/standardRouter.wxss */
.select-box {
transform: translateY(40rpx);
}
.select {
padding: 20rpx;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.select-item {
position: relative;
text-align: center;
width: 25%;
margin-bottom: 30px;
}
.image-box {
position: relative;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.image-box .img{
width: 15pt;
height: 15pt;
}
.img-mask {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
width: 40pt;
height: 40pt;
border-radius: 50%;
background-color: #069f99;
opacity: .2;
}