Browse Source

新增选民登记功能 版本1.7.23

release
lihenian 4 years ago
parent
commit
e4cd757cc2
  1. 7
      app.json
  2. BIN
      images/voter-icon.png
  3. 19
      pages/indexNew/indexNew.js
  4. 5
      pages/indexNew/indexNew.wxml
  5. 2
      pages/toRegister/toRegister.js
  6. 5
      project.config.json
  7. 222
      project.private.config.json
  8. 468
      subpages/voter/pages/register/register.js
  9. 6
      subpages/voter/pages/register/register.json
  10. 86
      subpages/voter/pages/register/register.wxml
  11. 173
      subpages/voter/pages/register/register.wxss
  12. 28
      utils/api.js

7
app.json

@ -152,6 +152,13 @@
"pages/companyInformationList/companyInformationList",
"pages/companyInformationDetail/companyInformationDetail"
]
},
{
"root": "subpages/voter",
"name": "voter",
"pages": [
"pages/register/register"
]
}
],
"preloadRule": {

BIN
images/voter-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

19
pages/indexNew/indexNew.js

@ -86,6 +86,7 @@ Page({
sxjs: {},
shouye: {},
tabRightList: [], //拼团购和顺道捎
voterConfigImgUrl: "" // 选民登记
},
onShow: function () {
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) {
@ -472,6 +473,7 @@ Page({
that.getIssueList()
that.getProjectList()
// that.getModuleList()
that.getVoterConfig()
}
}
})
@ -821,4 +823,21 @@ Page({
})
}
},
// 跳转到选民登记 2021-11-5
navigateToVoter() {
wx.navigateTo({
url: '/subpages/voter/pages/register/register'
})
},
// 首页选民登记入口配置
getVoterConfig() {
api.getVoterConfig().then(res => {
const { imgUrl } = res.data[0] || {}
this.setData({
voterConfigImgUrl: imgUrl
})
}).catch(err => {
console.error(err)
})
}
})

5
pages/indexNew/indexNew.wxml

@ -177,8 +177,9 @@
<!-- 加载更多提示 -->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
</view>
<move-btn wx:if="{{sxjs.id}}" button-top="820" area-top="120" area-height="90%" img-url="{{sxjs.imgUrl}}" bindmovebtnCallBack="toSxjs"></move-btn>
<move-btn wx:if="{{shouye.id}}" area-top="120" area-height="90%" button-top="1080" button-left="600" button-width="140" button-height="140" img-url="{{shouye.imgUrl}}" bindmovebtnCallBack="toShouye"></move-btn>
<move-btn wx:if="{{sxjs.id}}" button-top="700" area-top="120" area-height="90%" img-url="{{sxjs.imgUrl}}" bindmovebtnCallBack="toSxjs"></move-btn>
<move-btn wx:if="{{shouye.id}}" area-top="120" area-height="90%" button-top="820" button-left="600" button-width="140" button-height="140" img-url="{{shouye.imgUrl}}" bindmovebtnCallBack="toShouye"></move-btn>
<move-btn wx:if="{{voterConfigImgUrl}}" area-top="120" area-height="90%" button-top="1080" button-left="600" button-width="186" button-height="150" img-url="{{voterConfigImgUrl}}" bindmovebtnCallBack="navigateToVoter"></move-btn>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<!-- 签到后提醒 -->
<wux-popup visible="{{visible}}" title="{{signCode === 0 ? '签到成功' : '签到失败'}}" content="{{signMsg}}" bind:close="onClose">

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
const versionNum = "1.7.22"
const versionNum = "1.7.23"
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data ? res.data.scanFlag : '1'

5
project.config.json

@ -31,7 +31,10 @@
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false
"disableUseStrict": false,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "2.9.2",

222
project.private.config.json

@ -1,112 +1,124 @@
{
"setting": {},
"condition": {
"plugin": {
"list": []
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "pages/formid/formid",
"pathName": "pages/formid/formid",
"query": "gid=1233274128467787777",
"scene": 1011
},
"game": {
"list": []
{
"id": 2,
"name": "网格长注册",
"pathName": "pages/index/index",
"query": "scene=gridLeader",
"scene": 1011
},
"gamePlugin": {
"list": []
{
"id": 3,
"name": "subpages/home/pages/newsDetail/newsDetail",
"pathName": "subpages/home/pages/newsDetail/newsDetail",
"query": "id=7c8bc749ff4b6380bf1d902c0bde0ba&defaultGridId=1233592630168813569",
"scene": null
},
"miniprogram": {
"list": [
{
"name": "pages/formid/formid",
"pathName": "pages/formid/formid",
"query": "gid=1233274128467787777",
"scene": 1011
},
{
"id": 2,
"name": "网格长注册",
"pathName": "pages/index/index",
"query": "scene=gridLeader",
"scene": 1011
},
{
"id": 3,
"name": "subpages/home/pages/newsDetail/newsDetail",
"pathName": "subpages/home/pages/newsDetail/newsDetail",
"query": "id=7c8bc749ff4b6380bf1d902c0bde0ba&defaultGridId=1233592630168813569",
"scene": null
},
{
"id": -1,
"name": "社群列表",
"pathName": "subpages/associationNew/pages/associationlist/associationlist",
"query": "",
"scene": null
},
{
"id": 5,
"name": "数据端跳转",
"pathName": "pages/indexNew/indexNew",
"query": "scene=1277169327606366209&from=analysis",
"scene": null
},
{
"id": 7,
"name": "我有事说",
"pathName": "subpages/discussion/pages/addIssue/addIssue",
"query": "",
"scene": null
},
{
"id": 8,
"name": "搜索页面",
"pathName": "subpages/oneKeyService/pages/search/search",
"query": "",
"scene": null
},
{
"id": -1,
"name": "注册页面",
"pathName": "pages/toRegister/toRegister",
"query": "",
"scene": null
},
{
"id": -1,
"name": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"pathName": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"query": "",
"scene": null
},
{
"id": 9,
"name": "subpages/oneKeyService/pages/index/index",
"pathName": "subpages/oneKeyService/pages/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "subpages/oneKeyService/pages/moduleList/moduleList",
"pathName": "subpages/oneKeyService/pages/moduleList/moduleList",
"query": "pid=4d667ea4ff8fb045b03a68a9d24207e9&bannerflag=1&categorycode=notice_jsqf&modulestyle=2&categoryname=锦水清风",
"scene": null
},
{
"name": "积分中心",
"pathName": "subpages/integralCentre/pages/index/index",
"query": "",
"scene": null
},
{
"name": "积分中心",
"pathName": "subpages/integralCentre/pages/exchangeIndex/exchangeIndex",
"query": "",
"scene": null
},
{
"name": "带参网格码生成",
"pathName": "pages/index/index",
"query": "scene=1233592630168813569",
"scene": null
}
]
{
"id": -1,
"name": "社群列表",
"pathName": "subpages/associationNew/pages/associationlist/associationlist",
"query": "",
"scene": null
},
{
"id": 5,
"name": "数据端跳转",
"pathName": "pages/indexNew/indexNew",
"query": "scene=1277169327606366209&from=analysis",
"scene": null
},
{
"id": 7,
"name": "我有事说",
"pathName": "subpages/discussion/pages/addIssue/addIssue",
"query": "",
"scene": null
},
{
"id": 8,
"name": "搜索页面",
"pathName": "subpages/oneKeyService/pages/search/search",
"query": "",
"scene": null
},
{
"id": -1,
"name": "注册页面",
"pathName": "pages/toRegister/toRegister",
"query": "",
"scene": null
},
{
"id": -1,
"name": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"pathName": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"query": "",
"scene": null
},
{
"id": 9,
"name": "subpages/oneKeyService/pages/index/index",
"pathName": "subpages/oneKeyService/pages/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "subpages/oneKeyService/pages/moduleList/moduleList",
"pathName": "subpages/oneKeyService/pages/moduleList/moduleList",
"query": "pid=4d667ea4ff8fb045b03a68a9d24207e9&bannerflag=1&categorycode=notice_jsqf&modulestyle=2&categoryname=锦水清风",
"scene": null
},
{
"name": "积分中心",
"pathName": "subpages/integralCentre/pages/index/index",
"query": "",
"scene": null
},
{
"name": "积分中心",
"pathName": "subpages/integralCentre/pages/exchangeIndex/exchangeIndex",
"query": "",
"scene": null
},
{
"name": "带参网格码生成",
"pathName": "pages/index/index",
"query": "scene=1233592630168813569",
"scene": null
},
{
"name": "选民登记",
"pathName": "subpages/voter/pages/register/register",
"query": "",
"scene": null
},
{
"name": "首页",
"pathName": "pages/indexNew/indexNew",
"query": "",
"scene": null
}
]
}
}
}

468
subpages/voter/pages/register/register.js

@ -0,0 +1,468 @@
const api = require('../../../../utils/api')
Page({
data: {
districtPickerOptions: [],
districtPickerVisible: false,
districtPickerValue: [],
districtPickerLabel: '',
groupPickerOptions: [],
groupPickerVisible: false,
groupPickerValue: [],
groupPickerLabel: '',
nationPickerOptions: [],
nationPickerVisible: false,
nationPickerValue: [],
nationPickerLabel: '',
rulePickerOptions: [],
rulePickerVisible: false,
rulePickerValue: [],
rulePickerLabel: '',
name: '',
idCard: '',
address: '',
telephone: '',
smsCode: '',
note: '',
smsCodeText: '获取验证码',
id: '',
submitBtnDisabled: false,
protocolChecked: false
},
onLoad() {
Promise.all([this.getNationList(), this.getRuleList(), this.getDistrictList()]).then(res => {
this.getVoterDetail()
})
},
// 所选地区
showDistrictPicker() {
this.setData({
districtPickerVisible: true
})
},
onDistrictPickerConfirm(e) {
this.setData({
districtPickerValue: e.detail.value,
districtPickerLabel: e.detail.label,
groupPickerValue: [],
groupPickerLabel: ''
})
this.getGroupList()
},
onDistrictPickerCancel() {
this.setData({
districtPickerVisible: false
})
},
onDistrictPickerVisibleChange(e) {
this.setData({
districtPickerVisible: e.detail.visible
})
},
// 所选小组
showGroupPicker() {
if ( this.data.districtPickerValue.length === 0) {
this.showToast("请先选择所在选区")
return false
}
this.setData({
groupPickerVisible: true
})
},
onGroupPickerConfirm(e) {
this.setData({
groupPickerValue: e.detail.value,
groupPickerLabel: e.detail.label
})
},
onGroupPickerCancel() {
this.setData({
groupPickerVisible: false
})
},
onGroupPickerVisibleChange(e) {
this.setData({
groupPickerVisible: e.detail.visible
})
},
// 民族
showNationPicker() {
this.setData({
nationPickerVisible: true
})
},
onNationPickerConfirm(e) {
this.setData({
nationPickerValue: e.detail.value,
nationPickerLabel: e.detail.label
})
},
onNationPickerCancel() {
this.setData({
nationPickerVisible: false
})
},
onNationPickerVisibleChange(e) {
this.setData({
nationPickerVisible: e.detail.visible
})
},
// 参选原则
showRulePicker() {
this.setData({
rulePickerVisible: true
})
},
onRulePickerConfirm(e) {
this.setData({
rulePickerValue: e.detail.value,
rulePickerLabel: e.detail.label
})
},
onRulePickerCancel() {
this.setData({
rulePickerVisible: false
})
},
onRulePickerVisibleChange(e) {
this.setData({
rulePickerVisible: e.detail.visible
})
},
inputName(e) {
this.setData({
name: e.detail.value
})
},
inputIdCard(e) {
this.setData({
idCard: e.detail.value
})
},
inputAddress(e) {
this.setData({
address: e.detail.value
})
},
inputTelephone(e) {
this.setData({
telephone: e.detail.value
})
},
inputSmsCode(e) {
this.setData({
smsCode: e.detail.value
})
},
inputNote(e) {
this.setData({
note: e.detail.value
})
},
// 获取民族列表
getNationList() {
return new Promise((resolve, reject) => {
api.getNationList().then(res => {
const arr = []
res.data.forEach(item => {
arr.push({
label: item.nationName,
value: item.nationNumericalCode
})
})
this.setData({
nationPickerOptions: arr
})
resolve(true)
}).catch(err => {
console.error(err)
reject(false)
})
})
},
// 获取参选规则
getRuleList() {
return new Promise((resolve, reject) => {
const params = {
configType: "2",
pid: ""
}
api.getVoterConfigList(params).then(res => {
console.log('参选规则列表', res)
const rulePickerOptions = []
res.data.forEach(item => {
rulePickerOptions.push({
label: item.configName,
value: item.configCode
})
})
this.setData({
rulePickerOptions
})
resolve(true)
}).catch(err => {
console.error(err)
reject(false)
})
})
},
// 获取所选小区
getDistrictList() {
return new Promise((resolve, reject) => {
const params = {
configType: "0",
pid: ""
}
api.getVoterConfigList(params).then(res => {
console.log('参选规则列表', res)
const districtPickerOptions = []
res.data.forEach(item => {
districtPickerOptions.push({
label: item.configName,
value: item.configCode,
id: item.id
})
})
this.setData({
districtPickerOptions
})
resolve(true)
}).catch(err => {
console.error(err)
reject(false)
})
})
},
// 获取所在小组
getGroupList() {
let pid = ''
this.data.districtPickerOptions.forEach(item => {
if (item.value === this.data.districtPickerValue[0]) {
pid = item.id
}
})
const params = {
configType: "1",
pid
}
api.getVoterConfigList(params).then(res => {
console.log('参选规则列表', res)
const groupPickerOptions = []
res.data.forEach(item => {
groupPickerOptions.push({
label: item.configName,
value: item.configCode
})
})
this.setData({
groupPickerOptions
})
}).catch(err => {
console.error(err)
})
},
// 获取验证码
getSmsCode () {
if (!this.data.telephone.trim('')) {
this.showToast("请先输入手机号")
return false
}
this.setData({
smsCodeText: "获取中..."
})
const mobile = this.data.telephone.trim('')
api.sendSms(mobile).then(() => {
this.showToast("验证码发送成功")
let num = 60
this.setData({
smsCodeText: "60s后重新获取"
})
const timer = setInterval(() => {
if (num >= 1) {
this.setData({
smsCodeText: `${num}s后重新获取`
})
--num
} else {
clearInterval(timer)
this.setData({
smsCodeText: "获取验证码"
})
}
}, 1000)
}).catch(err => {
console.log(err)
this.setData({
smsCodeText: "获取验证码"
})
})
},
// 提交选民登记
submitVoter() {
if (!this.data.protocolChecked) {
this.showToast('请勾选底部按钮')
return false
}
const { id, districtPickerValue, groupPickerValue, name, nationPickerValue, nationPickerLabel, idCard, address, rulePickerValue, note, telephone, smsCode } = this.data
if (districtPickerValue.length === 0) {
this.showToast('请选择所属选区')
return false
} else if (groupPickerValue.length === 0) {
this.showToast('请选择所在小组')
return false
} else if (!name) {
this.showToast('请输入真实姓名')
return false
} else if (nationPickerValue.length === 0) {
this.showToast('请选择民族')
return false
} else if (!idCard) {
this.showToast('请输入身份证号')
return false
} else if (!address) {
this.showToast('请输入户籍地址')
return false
} else if (rulePickerValue.length === 0) {
this.showToast('请选择参选原则')
return false
} else if (!telephone) {
this.showToast('请输入手机号码')
return false
} else if (!smsCode) {
this.showToast('请输入验证码')
return false
}
const params = {
id,
constituencyCode: districtPickerValue[0],
groupCode: groupPickerValue[0],
name,
nationName: nationPickerLabel,
nationNumericalCode: nationPickerValue[0],
idNumber: idCard,
domicile: address,
participationPrincipleCode: rulePickerValue[0],
remark: note,
mobile: telephone,
smsCode
}
wx.showLoading({
title: '提交中...'
})
this.setData({
submitBtnDisabled: true
})
api.submitVote(params).then(res => {
this.showToast('提交成功')
setTimeout(() => {
wx.navigateBack({
delta: 1
});
}, 1000)
}).catch(err => {
console.error(err)
}).finally(() => {
this.setData({
submitBtnDisabled: false
})
})
},
// 获取详情
getVoterDetail() {
api.getVoterDetail().then(res => {
if (res.data) {
const { id, constituencyCode, groupCode, name, nationNumericalCode, idNumber, domicile, participationPrincipleCode, remark, mobile } = res.data
let pid = ''
let districtPickerLabel = ''
this.data.districtPickerOptions.forEach(item => {
if (item.value === constituencyCode) {
districtPickerLabel = item.label
pid = item.id
}
})
let nationPickerLabel = ''
this.data.nationPickerOptions.forEach(item => {
if (item.value === nationNumericalCode) {
nationPickerLabel = item.label
}
})
let rulePickerLabel = ''
this.data.rulePickerOptions.forEach(item => {
if (item.value === participationPrincipleCode) {
rulePickerLabel = item.label
}
})
this.getGroupDetail({ pid, groupCode })
this.setData({
id,
districtPickerLabel,
districtPickerValue: [constituencyCode],
name,
nationPickerLabel,
nationPickerValue: [nationNumericalCode],
idCard: idNumber,
address: domicile,
rulePickerLabel,
rulePickerValue: participationPrincipleCode,
note: remark,
telephone: mobile
})
}
}).catch(err => {
console.error(err)
})
},
// 所选小组回显
getGroupDetail({ pid, groupCode }) {
const params = {
configType: "1",
pid
}
api.getVoterConfigList(params).then(res => {
console.log('参选规则列表', res)
const groupPickerOptions = []
res.data.forEach(item => {
groupPickerOptions.push({
label: item.configName,
value: item.configCode
})
})
let groupPickerLabel = ''
groupPickerOptions.forEach(item => {
if (item.value === groupCode) {
groupPickerLabel = item.label
}
})
this.setData({
groupPickerLabel,
groupPickerOptions,
groupPickerValue: [groupCode]
})
}).catch(err => {
console.error(err)
})
},
// 代码简化,弹窗统一封装
showToast (title) {
wx.showToast({
title: title,
icon: "none",
duration: 2000
})
},
// 用户协议点选按钮
changeCheckedState() {
this.setData({
protocolChecked: !this.data.protocolChecked
})
}
})

6
subpages/voter/pages/register/register.json

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "选民登记",
"usingComponents": {
"wux-picker": "/dist/picker/index"
}
}

86
subpages/voter/pages/register/register.wxml

@ -0,0 +1,86 @@
<view class="register">
<view class="register-item">
<view class="label">所在选区</view>
<view class="content" bindtap="showDistrictPicker">
<view class="tip" wx:if="{{!districtPickerLabel}}">请选择所属的选区</view>
<view class="select-content" wx:else>{{districtPickerLabel}}</view>
<view class="trigger"></view>
</view>
<wux-picker visible="{{ districtPickerVisible }}" controlled options="{{ districtPickerOptions }}" value="{{ districtPickerValue }}" bind:confirm="onDistrictPickerConfirm" bind:cancel="onDistrictPickerCancel" bind:visibleChange="onDistrictPickerVisibleChange"></wux-picker>
</view>
<view class="register-item">
<view class="label">所在小组</view>
<view class="content" bindtap="showGroupPicker">
<view class="tip" wx:if="{{!groupPickerLabel}}">请选择所属的选民小组</view>
<view class="select-content" wx:else>{{groupPickerLabel}}</view>
<view class="trigger"></view>
</view>
<wux-picker visible="{{ groupPickerVisible }}" controlled options="{{ groupPickerOptions }}" value="{{ groupPickerValue }}" bind:confirm="onGroupPickerConfirm" bind:cancel="onGroupPickerCancel" bind:visibleChange="onGroupPickerVisibleChange"></wux-picker>
</view>
<view class="register-item">
<view class="label">姓名</view>
<view class="content">
<input value="{{name}}" bind:input="inputName" type="text" placeholder="请输入真实姓名" />
</view>
</view>
<view class="register-item">
<view class="label">民族</view>
<view class="content" bindtap="showNationPicker">
<view class="tip" wx:if="{{!nationPickerLabel}}">请选择你的民族</view>
<view class="select-content" wx:else>{{nationPickerLabel}}</view>
<view class="trigger"></view>
</view>
<wux-picker visible="{{ nationPickerVisible }}" controlled options="{{ nationPickerOptions }}" value="{{ nationPickerValue }}" bind:confirm="onNationPickerConfirm" bind:cancel="onNationPickerCancel" bind:visibleChange="onNationPickerVisibleChange"></wux-picker>
</view>
<view class="register-item">
<view class="label">身份证号</view>
<view class="content">
<input value="{{idCard}}" bind:input="inputIdCard" type="idcard" placeholder="请输入身份证号" />
</view>
</view>
<view class="register-item">
<view class="label">户籍地址</view>
<view class="content">
<input value="{{address}}" bind:input="inputAddress" type="text" placeholder="请输入户籍地址" />
</view>
</view>
<view class="register-item">
<view class="label">参选原则</view>
<view class="content" bindtap="showRulePicker">
<view class="tip" wx:if="{{!rulePickerLabel}}">请选择参选原则</view>
<view class="select-content" wx:else>{{rulePickerLabel}}</view>
<view class="trigger"></view>
</view>
<wux-picker visible="{{ rulePickerVisible }}" controlled options="{{ rulePickerOptions }}" value="{{ rulePickerValue }}" bind:confirm="onRulePickerConfirm" bind:cancel="onRulePickerCancel" bind:visibleChange="onRulePickerVisibleChange"></wux-picker>
</view>
<view class="register-item">
<view class="label">手机号码</view>
<view class="content">
<input value="{{telephone}}" bind:input="inputTelephone" type="number" placeholder="请输入手机号码" />
<button disabled="{{smsCodeText !== '获取验证码'}}" bindtap="getSmsCode" hover-class="button-hover" class="get-code">
{{smsCodeText}}
</button>
</view>
</view>
<view class="register-item">
<view class="label">验证码</view>
<view class="content">
<input value="{{smsCode}}" bind:input="inputSmsCode" type="number" placeholder="请输入验证码" />
</view>
</view>
<view class="multi-register-item">
<view class="label">备注</view>
<view class="content">
<textarea value="{{note}}" bind:input="inputNote" placeholder="请输入备注" auto-height rows="3"></textarea>
</view>
</view>
<view class="protocol-container">
<radio checked="{{protocolChecked}}" color="#df0006" bindtap="changeCheckedState"></radio>
<view class="protocol-content">本人承诺对所填写的内容真实性负责</view>
</view>
<view class="confirm-container">
<view bindtap="submitVoter" class="confirm-btn" disabled="{{submitBtnDisabled}}" hover-class="hover-confirm-btn" hover-stay-time="150">
确定
</view>
</view>
</view>

173
subpages/voter/pages/register/register.wxss

@ -0,0 +1,173 @@
.register {
width: 100%;
}
.register .register-item {
width: 100%;
height: 80rpx;
box-sizing: border-box;
padding: 0px 30rpx;
display: flex;
align-items: center;
position: relative;
}
.register .register-item::before {
content: "*";
position: absolute;
color: red;
left: 12rpx;
top: 25rpx;
}
.register .register-item + .register-item {
margin-top: 35rpx;
}
.register .register-item .label {
width: 140rpx;
height: 80rpx;
line-height: 80rpx;
color: #333;
font-size: 34rpx;
text-align: justify;
}
.register .register-item .label:after {
content: '';
width: 100%;
height: 0;
display: inline-block;
}
.register .register-item .content {
width: calc(100% - 140rpx - 20rpx);
height: 100%;
background: #F0F0F0;
border-radius: 6px;
box-sizing: border-box;
padding: 0 30rpx;
margin-left: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.register .register-item .content .tip {
font-size: 30rpx;
color: #7A7A7A;
}
.register .register-item .content .select-content {
font-size: 30rpx;
color: #333;
}
.register .register-item .content .trigger {
width: 0px;
height: 0px;
border: 16rpx solid transparent;
border-top: 16rpx solid #c2c2c2;
position: relative;
top: 4px;
}
.register .register-item .content input {
width: 100%;
height: 100%;
}
.register .register-item .content .get-code {
flex-shrink: 0;
padding: 0 15rpx;
height: 50rpx;
line-height: 50rpx;
background: linear-gradient(to right, #db1a1f, #e95027);
color: #fff;
font-size: 24rpx;
border-radius: 10rpx;
margin: 0;
margin-left: 25rpx;
}
.register .register-item .content .button-hover {
background: rgb(175, 1, 1);
}
.register .multi-register-item {
display: flex;
min-height: 80rpx;
box-sizing: border-box;
padding: 0 30rpx;
margin-top: 35rpx;
}
.register .multi-register-item .label {
width: 140rpx;
height: 80rpx;
line-height: 80rpx;
color: #333;
font-size: 34rpx;
text-align: justify;
}
.register .multi-register-item .label:after {
content: '';
width: 100%;
height: 0;
display: inline-block;
}
.register .multi-register-item .content {
width: calc(100% - 140rpx - 20rpx);
height: 100%;
background: #F0F0F0;
border-radius: 6px;
box-sizing: border-box;
padding: 15rpx 30rpx 0rpx;
margin-left: 20rpx;
}
.register .multi-register-item .content textarea {
width: 100%;
min-height: 60rpx;
padding-bottom: 30rpx;
}
.protocol-container {
width: 100%;
height: 100rpx;
box-sizing: border-box;
padding: 0px 30rpx;
display: flex;
align-items: center;
}
.protocol-container .protocol-content {
color: #7A7A7A;
font-size: 30rpx;
margin-left: 10rpx;
}
.confirm-container {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin: 100rpx 0;
}
.confirm-container .confirm-btn {
width: 560rpx;
height: 85rpx;
border-radius: 40rpx;
background: #df0006;
color: #fff;
font-size: 34rpx;
display: flex;
align-items: center;
justify-content: center;
}
.confirm-container .hover-confirm-btn {
background: #b30006;
}

28
utils/api.js

@ -83,7 +83,12 @@ module.exports = {
//
getActPeriods,
getSignInActPeriods,
wenjuanPoints: wenjuanPoints
wenjuanPoints: wenjuanPoints,
getNationList,
getVoterConfigList,
submitVote,
getVoterDetail,
getVoterConfig
}
function getToken (wxCode) {
@ -681,4 +686,25 @@ function getSignInActPeriods (actId) {
// 问卷加积分
function wenjuanPoints (bannerId) {
return fly.post('news/banner/wenjuanPoints', { bannerId: bannerId })
}
// 选民登记-民族列表
function getNationList() {
return fly.get('admin/nation/list')
}
// 选民登记-配置列表
function getVoterConfigList({ configType, pid }) {
return fly.get('voter/config/list', { configType, pid })
}
// 选民登记-提交接口
function submitVote(data) {
return fly.post('voter/registration/submit', data)
}
// 选民登记-详情接口
function getVoterDetail() {
return fly.get('voter/registration/detail')
}
// 选民登记-首页入口
function getVoterConfig() {
return fly.get('imgConfig/getImgUrl/10')
}
Loading…
Cancel
Save