Browse Source

版本1.4.16 锦水档案 修改名称为 档案查询

master tagv1.4.16
lihenian 5 years ago
parent
commit
421f8e8842
  1. 439
      pages/complete_bk/complete.js
  2. 12
      pages/complete_bk/complete.json
  3. 97
      pages/complete_bk/complete.wxml
  4. 278
      pages/complete_bk/complete.wxss
  5. 2
      pages/toRegister/toRegister.js
  6. 2
      subpages/oneKeyService/pages/archives/archives.json

439
pages/complete_bk/complete.js

@ -1,439 +0,0 @@
var api = require("../../utils/api.js")
import {
$wuxActionSheet
} from "../../dist/index"
Page({
data: {
gridName: "",
gridId: "",
idCard: "",
userName: "",
sex: "",
mobile: "",
smsCode: "",
street: "",
community: "",
building: "",
submitEvent: false,
partyMember: false,
isPartyMember: "0",
wait: 60,
btntxt: "获取验证码",
tabType: "tab1",
state: "",
unionIdStatus: "0",
encryptedData: "",
iv: "",
wxCode: "",
gridList: [],
changeGridList: []
},
onLoad () {
this.getPrepareComplete().then(() => {
this.getGridList()
})
this.checkWxUnionId()
this.getWxCode()
},
// 拉取 用户信息
getPrepareComplete () {
return new Promise((resolve, reject) => {
api.prepareComplete().then(res => {
console.log("拉取用户信息", res)
this.setData({
idCard: res.data.identityNo,
userName: res.data.realName,
sex: res.data.sex,
mobile: res.data.mobile,
street: res.data.road,
community: res.data.villageName,
building: res.data.dwellingPlace,
state: res.data.state,
gridId: res.data.gridId,
gridName: res.data.gridName
})
resolve(true)
}).catch(() => {
reject(false)
})
})
},
adInputIdCard (e) {
this.setData({
idCard: e.detail.value
})
},
adInputUserName: function (e) {
this.setData({
userName: e.detail.value
})
},
adChangeSex: function (e) {
this.setData({
sex: e.currentTarget.dataset.sex
})
},
adInputMobile: function (e) {
this.setData({
mobile: e.detail.value
})
},
adInputSmsCode: function (e) {
this.setData({
smsCode: e.detail.value
})
},
adInputStreet: function (e) {
this.setData({
street: e.detail.value
})
},
adInputCommunity: function (e) {
this.setData({
community: e.detail.value
})
},
adInputBuilding: function (e) {
this.setData({
building: e.detail.value
})
},
// 我是居民/我是党员 切换
onChange (e) {
if (e.detail.key == "tab2") {
this.setData({
partyMember: true,
isPartyMember: "1",
tabType: "tab2"
})
console.log("this", this.data.partyMember)
} else {
this.setData({
partyMember: false,
isPartyMember: "0",
tabType: "tab1",
idCard: ""
})
console.log("this", this.data.partyMember)
}
},
outtime () {
let that = this
if (that.data.wait === 0) {
that.setData({
wait: 60,
btntxt: "获取验证码"
})
} else {
that.setData({
wait: that.data.wait - 1
})
setTimeout(() => {
that.outtime()
}, 1000)
}
},
toRegister () {
if (this.data.partyMember) {
if (this.data.idCard === "") {
wx.showToast({
title: "请先输入身份证号",
icon: "none",
duration: 3000
})
return false
}
}
if (this.data.userName === "") {
wx.showToast({
title: "请先输入姓名",
icon: "none",
duration: 3000
})
return false
}
if (this.data.sex === "") {
wx.showToast({
title: "请选择性别",
icon: "none",
duration: 3000
})
return false
}
if (this.data.mobile === "") {
wx.showToast({
title: "请先输入手机号",
icon: "none",
duration: 3000
})
return false
}
if (this.data.smsCode === "") {
wx.showToast({
title: "请先输入验证码",
icon: "none",
duration: 3000
})
return false
}
if (this.data.street === "") {
wx.showToast({
title: "请先输入所在街道",
icon: "none",
duration: 3000
})
return false
}
if (this.data.street.length > 30) {
wx.showToast({
title: "所在街道不超过30字",
icon: "none",
duration: 3000
})
return false
}
if (this.data.submitEvent === true) {
wx.showToast({
title: "加载中...",
icon: "none",
duration: 3000
})
return false
}
wx.showLoading({
title: "加载中..."
})
const para = {
partyFlag: this.data.isPartyMember,
identityNo: this.data.idCard,
mobile: this.data.mobile,
smsCode: this.data.smsCode,
realName: this.data.userName,
sex: this.data.sex,
road: this.data.street,
villageName: this.data.community,
dwellingPlace: this.data.building,
gridId: this.data.gridId,
wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode,
encryptedData: this.data.unionIdStatus === "1" ? "" : this.data.encryptedData,
iv: this.data.unionIdStatus === "1" ? "" : this.data.iv
}
console.log(this.data.tabType)
if (this.data.tabType == "tab1") {
api.completeResidentInfo(para).then(function (res) {
// console.log(res.data.resultCode)
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "党员认证失败",
showCancel: false,
content: res.data.resultMsg,
success: function () {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 3000,
complete: function () {
setTimeout(function () {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 3000);
}
})
}
})
} else {
api.completePartyInfo(para).then(function (res) {
// console.log(res.data.resultCode)
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "党员认证失败",
showCancel: false,
content: res.data.resultMsg,
success: function () {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 3000,
complete: function () {
setTimeout(function () {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 3000);
}
})
}
})
}
// api.completeInfo(para).then(function (res) {
// // console.log(res.data.resultCode)
// wx.hideLoading()
// if (res.data.resultCode == 1) {
// wx.showModal({
// title: '党员认证失败',
// showCancel: false,
// content: res.data.resultMsg,
// success: function (res) {
// wx.reLaunch({
// url: '/pages/index/index'
// })
// }
// })
// } else {
// wx.showToast({
// title: '认证成功',
// icon: 'none',
// duration: 3000,
// complete: function () {
// setTimeout(function () {
// wx.reLaunch({
// url: '/pages/index/index'
// })
// }, 3000);
// }
// })
// }
// })
},
getSmsCode () {
console.log(this.data.mobile)
if (this.data.mobile === "") {
wx.showToast({
title: "请先输入手机号",
icon: "none",
duration: 3000
})
return false
} else if (this.data.mobile.length !== 11) {
wx.showToast({
title: "请先输入正确手机号",
icon: "none",
duration: 3000
})
return false
}
if (this.data.wait < 60) {
wx.showToast({
title: "请" + this.data.wait + "秒后再试",
duration: 2000,
icon: "none"
})
return
}
this.outtime()
api.sendSms(this.data.mobile).then(function (res) {
console.log("已经成功发送验证码")
console.log(res)
})
},
// 性别选择
radioChange (e) {
this.setData({
sex: e.detail.value
})
},
// 查看用户是否完善个人信息
checkWxUnionId () {
api.checkWxUnionId().then(res => {
console.log("查看用户是否已保存unionId", res)
this.setData({
unionIdStatus: res.data
})
}).catch(err => {
this.setData({
unionIdStatus: "0"
})
console.log(err)
})
},
// 获取用户信息
getUserInfo (e) {
this.setData({
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
})
this.toRegister()
},
// 获取wxCode
getWxCode () {
const that = this
wx.login({
success (res) {
that.setData({
wxCode: res.code
})
}
})
},
// 获取所有网格
getGridList () {
api.getGridList().then(res => {
console.log("获取所有网格", res)
const buttonList = []
res.data.forEach(item => {
if (item.gridId !== this.data.gridId) {
buttonList.push({
id: item.gridId,
text: item.grid
})
}
})
this.setData({
gridList: res.data,
changeGridList: buttonList
})
}).catch(err => {
this.setData({
gridList: []
})
console.log(err)
})
},
// 切换网格
changeGrid () {
const buttonList = []
this.data.gridList.forEach(item => {
buttonList.push({
id: item.gridId,
text: item.grid
})
})
const index = buttonList.findIndex(item => item.id === this.data.gridId)
if (index > -1) {
buttonList.splice(index, 1)
}
this.setData({
changeGridList: buttonList
})
const that = this
$wuxActionSheet().showSheet({
buttons: this.data.changeGridList,
className: "dialog-class",
buttonClicked (index, item) {
that.setData({
gridId: item.id,
gridName: item.text
})
return true
},
cancelText: "取消",
cancel () {},
destructiveButtonClicked () {},
})
}
})

12
pages/complete_bk/complete.json

@ -1,12 +0,0 @@
{
"navigationBarTitleText": "完善个人信息",
"usingComponents": {
"wux-tabs": "../../dist/tabs/index",
"wux-tab": "../../dist/tab/index",
"wux-badge": "../../dist/badge/index",
"wux-cell-group": "../../dist/cell-group/index",
"wux-cell": "../../dist/cell/index",
"wux-input": "../../dist/input/index",
"wux-actionsheet": "../../dist/actionsheet/index"
}
}

97
pages/complete_bk/complete.wxml

@ -1,97 +0,0 @@
<view class="container">
<view class="topfixed">
<wux-tabs defaultCurrent="tab1" bindchange="onChange">
<wux-tab key="tab1" title="我是居民"></wux-tab>
<wux-tab key="tab2">
<view class="tab2" style="color: {{tabType == 'tab2' ? '#f00' : '#999'}}">
我是党员
<!-- <view class="status pass" wx:if="{{state === '3' && idCard}}">
<image src="../../images/mine/party-pass.png" />
<view>认证通过</view>
</view>
<view class="status unpass" wx:if="{{state === '2' && idCard}}">
<image src="../../images/mine/party-unpass.png" />
<view>认证不通过</view>
</view> -->
</view>
</wux-tab>
</wux-tabs>
</view>
<view class="card cardcon margintop">
<view class="content">
<wux-cell hover-class="none" wx:if="{{partyMember}}">
<span class="xing">*</span>
<wux-input label="身份证号" placeholder="实名认证请输入身份证" controlled value="{{idCard}}" bind:change="adInputIdCard"></wux-input>
</wux-cell>
<wux-cell hover-class="none">
<span class="xing">*</span>
<wux-input label="姓名" placeholder="请输入姓名" controlled value="{{userName}}" bind:change="adInputUserName"></wux-input>
</wux-cell>
<wux-cell hover-class="none">
<span class="xing">*</span>
<view class="sex-content">
<view>性别</view>
<radio-group class="radio-group" bindchange="radioChange">
<radio value="1" color="#F82525" checked="{{sex === '1'}}">
<text style="color: {{sex == 1 ? '#333' : '#999'}}">男</text>
</radio>
<radio value="0" color="#F82525" checked="{{sex === '0'}}">
<text style="color: {{sex === '0' ? '#333' : '#999'}}">女</text>
</radio>
</radio-group>
</view>
</wux-cell>
<wux-cell hover-class="none">
<span class="xing">*</span>
<wux-input label="手机号" placeholder="请输入手机号" controlled value="{{mobile}}" bind:change="adInputMobile"></wux-input>
</wux-cell>
<wux-cell hover-class="none" class="yzm">
<span class="xing">*</span>
<view class="verify-content">
<view>验证码</view>
<view class="verify-code">
<input type="text" placeholder="请输入验证码" placeholder-class="scode" bind:change="adInputSmsCode"/>
<view class="getcode" bindtap="getSmsCode">
<span wx:if="{{wait>=60}}">获取验证码</span>
<span wx:else>{{wait}}秒...</span>
</view>
</view>
</view>
</wux-cell>
</view>
</view>
<view class="card cardcon">
<view class="jzdz">
<view class="address">
<view class="left">居住地址</view>
<view class="right" bindtap="changeGrid" wx:if="{{changeGridList.length > 0}}">
<view class="change-grid">切换网格</view>
<image src="../../images/mine/ic_qiehuan@2x.png" />
</view>
</view>
<view>{{gridName}}</view>
</view>
<view class="content">
<wux-cell hover-class="none">
<wux-input placeholder="*请填写所在小区" controlled value="{{street}}" bind:change="adInputStreet"></wux-input>
</wux-cell>
<!-- <wux-cell hover-class="none">
<wux-input placeholder="小区名称" controlled value="{{community}}" bind:change="adInputCommunity"></wux-input>
</wux-cell>
<wux-cell hover-class="none">
<wux-input placeholder="楼栋号-单元室(如5号楼701)" controlled value="{{building}}" bind:change="adInputBuilding"></wux-input>
</wux-cell> -->
</view>
</view>
<view class="tap">*请填写您的真实信息,我们会严格保密,请您放心</view>
<view class="submit-btn" wx:if="{{unionIdStatus === '1'}}">
<button hover-class="hover-button" bindtap="toRegister">提交</button>
</view>
<view class="submit-btn" wx:elif="{{unionIdStatus === '0'}}">
<button hover-class="hover-button" open-type="getUserInfo" bindgetuserinfo="getUserInfo">提交</button>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />

278
pages/complete_bk/complete.wxss

@ -1,278 +0,0 @@
.topfixed {
position: fixed;
top: 0;
width: 100%;
z-index: 999999;
}
.margintop {
margin-top: 60px;
}
.tab2 {
color: #999;
font-size: 0.975rem;
position: relative;
}
.tab2 .status.pass {
position: absolute;
width: 74rpx;
height: 32rpx;
top: 10%;
left: 100%;
}
.tab2 .status.pass image {
position: absolute;
width: 100%;
height:100%;
object-fit: cover;
left: 0;
top: 0;
}
.tab2 .status.pass view {
position: relative;
z-index: 100;
width: 100%;
height: 100%;
line-height: 27rpx;
text-align: center;
font-size: 16rpx;
color: #06B5A4;
}
.tab2 .status.unpass {
position: absolute;
width: 90rpx;
height: 32rpx;
top: 10%;
left: 100%;
}
.tab2 .status.unpass image {
position: absolute;
width: 100%;
height:100%;
object-fit: cover;
left: 0;
top: 0;
}
.tab2 .status.unpass view {
position: relative;
z-index: 100;
width: 100%;
height: 100%;
line-height: 27rpx;
text-align: center;
font-size: 16rpx;
color: #E74848;
}
.jzdz {
font-size: 0.975rem;
padding: 10px 0 0 10px;
color: #333;
}
.content {
width: 670rpx;
padding-top: 5px;
padding-bottom: 10px;
padding-right: 30rpx;
padding-left: 10rpx;
}
.cardcon {
height: auto;
}
.btn1 {
margin-top: 40rpx;
}
.logo-layout {
height: 136rpx;
width: 159rpx;
margin: 0 auto;
padding: 60rpx 0 80rpx 0;
}
.logo {
height: 136rpx;
width: 159rpx;
}
.tap {
font-size: 12px;
color: #999;
padding: 0 10px 0 10px;
}
.input-placeholder {
color: #999;
text-align: right;
font-size: 0.875rem;
}
.scode {
text-align: left !important;
}
.wux-tabs__tab-title {
color: #999;
font-size: 0.975rem;
}
.wux-tabs__tab--balanced .wux-tabs__tab-bar {
background: #f00 !important;
color: #f00 !important;
}
.wux-tabs__tab--current .wux-tabs__tab-title {
color: #f00 !important;
}
.wux-input__label {
font-size: 0.975rem;
color: #333;
}
.wux-input__item {
text-align: right;
}
.yzm .wux-input__item {
text-align: left;
}
.xing {
color: #f00;
float: left;
width: 10px;
}
.sex-select {
width: 100%;
position: absolute;
top: 5rpx;
right: 0px;
text-align: right;
z-index: 999;
}
.select-img {
width: 40rpx;
height: 40rpx;
}
.select-text {
padding: 15rpx;
}
.float-right {
float: right;
}
/* 弹性盒子 */
.flex {
display: -webkit-box;
display: flex;
}
/* 垂直水平居中 */
.flex-container {
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
/* 等宽排列 */
.justify-space-between {
justify-content: space-between;
}
.sex-content {
display: flex;
align-items: center;
justify-content: space-between;
}
radio {
font-size: 30rpx;
color: #999;
}
radio + radio {
margin-left: 30rpx;
}
.verify-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.verify-content .verify-code {
height: 100%;
display: flex;
align-items: center;
}
.verify-content .verify-code input {
width: 190rpx;
text-align: right;
margin-right: 20rpx;
}
.verify-content .verify-code .getcode {
background: #f30;
color: #fff;
font-size: 24rpx;
border-radius: 8rpx;
height: 50rpx;
line-height: 50rpx;
padding: 6rpx 20rpx 6rpx 20rpx;
}
.submit-btn {
width: 100%;
height: 85rpx;
display: flex;
justify-content: center;
align-items:center;
margin-top: 40rpx;
}
.submit-btn button {
background: linear-gradient(to right, #f51010, #ff4c4c);
width: 560rpx;
height: 85rpx;
border-radius: 16rpx;
line-height: 85rpx;
font-size: 36rpx;
color: #fff;
text-align: center;
margin: 0;
padding: 0;
outline: 0;
}
.submit-btn .hover-button {
background: red;
}
.jzdz .address {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding-right: 30rpx;
height: 60rpx;
}
.jzdz .address .right {
display: flex;
align-items: center;
justify-content: flex-end;
}
.jzdz .address .right .change-grid {
color: #999;
margin-right: 10rpx;
font-size: 25rpx;
}
.jzdz .address .right image {
width: 22rpx;
height: 22rpx;
object-fit: cover;
}
.wux-actionsheet__button {
font-size: 34rpx !important;
color: #333 !important;
}

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
const versionNum = "1.4.15"
const versionNum = "1.4.16"
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag

2
subpages/oneKeyService/pages/archives/archives.json

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "锦水档案",
"navigationBarTitleText": "档案查询",
"navigationBarBackgroundColor": "#D22E29",
"navigationBarTextStyle": "white",
"usingComponents": {

Loading…
Cancel
Save