From e4cd757cc2aa3383d18f7b5a80812111992d4288 Mon Sep 17 00:00:00 2001 From: lihenian <2629534615@qq.com> Date: Mon, 8 Nov 2021 17:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=89=E6=B0=91=E7=99=BB?= =?UTF-8?q?=E8=AE=B0=E5=8A=9F=E8=83=BD=20=E7=89=88=E6=9C=AC1.7.23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 7 + images/voter-icon.png | Bin 0 -> 11277 bytes pages/indexNew/indexNew.js | 19 + pages/indexNew/indexNew.wxml | 5 +- pages/toRegister/toRegister.js | 2 +- project.config.json | 5 +- project.private.config.json | 222 +++++----- subpages/voter/pages/register/register.js | 468 ++++++++++++++++++++ subpages/voter/pages/register/register.json | 6 + subpages/voter/pages/register/register.wxml | 86 ++++ subpages/voter/pages/register/register.wxss | 173 ++++++++ utils/api.js | 28 +- 12 files changed, 911 insertions(+), 110 deletions(-) create mode 100644 images/voter-icon.png create mode 100644 subpages/voter/pages/register/register.js create mode 100644 subpages/voter/pages/register/register.json create mode 100644 subpages/voter/pages/register/register.wxml create mode 100644 subpages/voter/pages/register/register.wxss diff --git a/app.json b/app.json index 55a0d9b..341c7ae 100644 --- a/app.json +++ b/app.json @@ -152,6 +152,13 @@ "pages/companyInformationList/companyInformationList", "pages/companyInformationDetail/companyInformationDetail" ] + }, + { + "root": "subpages/voter", + "name": "voter", + "pages": [ + "pages/register/register" + ] } ], "preloadRule": { diff --git a/images/voter-icon.png b/images/voter-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b04baa74d6c16282011c0fdbb06146e3684a0acd GIT binary patch literal 11277 zcmaKSbx<7Nw(c;vy9USr!QEkScXtQ`m*5VAy9al72yVgMA-DtyuEE`cJbvfibMO1( zo!3>}TY9Z;*;l=H)$RyoMJZGyA|wC+fGQ&`uKM1#z27MaaPLnm!-S6ahR{Vq+eOXZ z+{N9<$qX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@v(yXiNM}X+j&D2KZ7MDD6pS}hrHA%wI3#%J zasm_j&bpNwIiGU2eUQcCnmsUQPeM=kQTP?()^|mHnC6pwz7Z1U-^dpq zImhzcCXl=O^m@Vv6)XC^jUtVa*BoRIphpIXI=x)m7VBuCD1r+IYh9P_Tz|}3w-fOy zy5tSk6TFevh};PuARy+SI34VvdlW3%h4WNwFcB+z`Xc9Z$@P`(TqN6afc3Q8a0+Ad z(*o$;SG6ovw986Cnu+QU)8C2{WnwioCwM2UmHTV;xWX@#jBm_6fRV9d!}@)yz<++w Nm61>suNE~7{69$x8*=~v literal 0 HcmV?d00001 diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 4f3c35c..5ad6266 100644 --- a/pages/indexNew/indexNew.js +++ b/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) + }) + } }) \ No newline at end of file diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 0f13e48..86f3631 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -177,8 +177,9 @@ - - + + + diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index 0a0b5fb..9df5003 100644 --- a/pages/toRegister/toRegister.js +++ b/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' diff --git a/project.config.json b/project.config.json index 7388078..f368cdf 100644 --- a/project.config.json +++ b/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", diff --git a/project.private.config.json b/project.private.config.json index 2c4b056..24e6c86 100644 --- a/project.private.config.json +++ b/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 } + ] } + } } \ No newline at end of file diff --git a/subpages/voter/pages/register/register.js b/subpages/voter/pages/register/register.js new file mode 100644 index 0000000..b182612 --- /dev/null +++ b/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 + }) + } +}) \ No newline at end of file diff --git a/subpages/voter/pages/register/register.json b/subpages/voter/pages/register/register.json new file mode 100644 index 0000000..467750a --- /dev/null +++ b/subpages/voter/pages/register/register.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "选民登记", + "usingComponents": { + "wux-picker": "/dist/picker/index" + } +} \ No newline at end of file diff --git a/subpages/voter/pages/register/register.wxml b/subpages/voter/pages/register/register.wxml new file mode 100644 index 0000000..b118f66 --- /dev/null +++ b/subpages/voter/pages/register/register.wxml @@ -0,0 +1,86 @@ + + + 所在选区 + + 请选择所属的选区 + {{districtPickerLabel}} + + + + + + 所在小组 + + 请选择所属的选民小组 + {{groupPickerLabel}} + + + + + + 姓名 + + + + + + 民族 + + 请选择你的民族 + {{nationPickerLabel}} + + + + + + 身份证号 + + + + + + 户籍地址 + + + + + + 参选原则 + + 请选择参选原则 + {{rulePickerLabel}} + + + + + + 手机号码 + + + + + + + 验证码 + + + + + + 备注 + + + + + + + 本人承诺对所填写的内容真实性负责 + + + + 确定 + + + \ No newline at end of file diff --git a/subpages/voter/pages/register/register.wxss b/subpages/voter/pages/register/register.wxss new file mode 100644 index 0000000..8c60a79 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index 3f14101..48adc26 100755 --- a/utils/api.js +++ b/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') } \ No newline at end of file