Browse Source

修改党员报道业务逻辑

shibei
luyan 1 year ago
parent
commit
42d69289d0
  1. 2
      miniprogram/pages/login/login.js
  2. 167
      miniprogram/pages/login/login.wxss
  3. 2
      miniprogram/pages/my/my.wxml
  4. 1
      miniprogram/pages/my/my.wxss
  5. 29
      miniprogram/subpages/checkIn/pages/checkIn/register/register.js
  6. 7
      miniprogram/subpages/checkIn/pages/checkIn/register/register.wxml
  7. 5
      miniprogram/subpages/checkIn/pages/checkIn/register/register.wxss
  8. 2
      miniprogram/utils/config.js
  9. 1
      miniprogram/utils/partApi.js

2
miniprogram/pages/login/login.js

@ -102,7 +102,7 @@ Page({
wx.showToast({ wx.showToast({
title: '请确认账号密码是否正确或联系管理员!', title: '请确认账号密码是否正确或联系管理员!',
icon: 'none', icon: 'none',
duration: 3000 duration: 3500
}); });
}else { }else {
wx.setStorageSync('token', res.data.token); wx.setStorageSync('token', res.data.token);

167
miniprogram/pages/login/login.wxss

@ -1,36 +1,37 @@
page { page {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
} }
.main-bg {
.main-bg {
width: 100%; width: 100%;
height: 100%; height: 100%;
background:#fff; background: #fff;
position: relative; position: relative;
} }
.header .header-bg { .header .header-bg {
width: 100%; width: 100%;
height: 100%; height: 100%;
/* position: absolute; /* position: absolute;
z-index: 10; z-index: 10;
left: 0; left: 0;
top: 0; */ top: 0; */
position: absolute; position: absolute;
height: 100%; height: 100%;
z-index: -999; z-index: -999;
} }
.main-bg image{ .main-bg image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
} }
.login-top{ .login-top {
width: 100%; width: 100%;
height: 310rpx; height: 310rpx;
z-index: 100; z-index: 100;
@ -39,51 +40,54 @@ page {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.login-top .picture{
.login-top .picture {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
height: 100%; height: 100%;
} }
.login-top .picture .picture-bg{ .login-top .picture .picture-bg {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.data-name{ .data-name {
width: 96rpx; width: 96rpx;
height: 36rpx; height: 36rpx;
text-align: center; text-align: center;
position: relative; position: relative;
left: 85rpx; left: 85rpx;
top: -22rpx; top: -22rpx;
} }
.data-name image{
.data-name image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
} }
.data-name .name{
font-size:24rpx; .data-name .name {
font-family:PingFang SC; font-size: 24rpx;
font-weight:500; font-family: PingFang SC;
font-weight: 500;
position: relative; position: relative;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
} }
.login-bottom{ .login-bottom {
width: 100%; width: 100%;
height: 570rpx; height: 570rpx;
z-index: 100; z-index: 100;
@ -93,73 +97,80 @@ page {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 127rpx; top: 127rpx;
} }
.login-bottom .info{
.login-bottom .info {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
} }
.login-bottom .info .info-bg{ .login-bottom .info .info-bg {
width: 640rpx; width: 640rpx;
height: 520rpx; height: 520rpx;
position: relative; position: relative;
background:rgba(255,255,255,1); background: rgba(255, 255, 255, 1);
box-shadow:0px 8px 10px 0px rgba(33,155,138,0.22); box-shadow: 0px 8px 10px 0px rgba(33, 155, 138, 0.22);
border-radius: 24rpx; border-radius: 24rpx;
} }
.login-bottom .info .info-bg .name{
width:560rpx; .login-bottom .info .info-bg .name {
height:88rpx; width: 560rpx;
background:rgba(248,248,248,1); height: 88rpx;
border-radius:44rpx; background: rgba(248, 248, 248, 1);
border-radius: 44rpx;
position: relative; position: relative;
margin-top: 97rpx; margin-top: 97rpx;
left: 39rpx; left: 39rpx;
} }
.name-pw-bg{
.name-pw-bg {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
float: left; float: left;
position: absolute; position: absolute;
left: 41rpx; left: 41rpx;
margin-top: 27rpx; margin-top: 27rpx;
} }
.info-input{
.info-input {
float: left; float: left;
width: 395rpx; width: 395rpx;
height: 100%; height: 100%;
position: absolute; position: absolute;
margin-left: 107rpx; margin-left: 100rpx;
} text-align: center;
.info-input input{ }
margin-top: 15rpx;
font-size:30rpx; .info-input input {
} margin-top: 20rpx;
.login-bottom .info .info-bg .password{ font-size: 30rpx;
width:560rpx; }
height:88rpx;
background:rgba(248,248,248,1); .login-bottom .info .info-bg .password {
border-radius:44rpx; width: 560rpx;
height: 88rpx;
background: rgba(248, 248, 248, 1);
border-radius: 44rpx;
position: relative; position: relative;
margin-top: 29rpx; margin-top: 29rpx;
left: 39rpx; left: 39rpx;
} }
.login-bottom .info .info-bg .login{ .login-bottom .info .info-bg .login {
width:560rpx; width: 560rpx;
height:88rpx; height: 88rpx;
background:#f5071ad6; background: #f5071ad6;
border-radius:44rpx; border-radius: 44rpx;
position: relative; position: relative;
margin-top: 50rpx; margin-top: 50rpx;
left: 39rpx; left: 39rpx;
text-align: center; text-align: center;
line-height: 88rpx; line-height: 88rpx;
font-size:36rpx; font-size: 36rpx;
font-family:PingFang SC; font-family: PingFang SC;
font-weight:500; font-weight: 500;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
} }

2
miniprogram/pages/my/my.wxml

@ -39,7 +39,7 @@
<view class="h1">修改密码</view> <view class="h1">修改密码</view>
<view class="h2">前往修改密码</view> <view class="h2">前往修改密码</view>
</view> </view>
<image style="width:80rpx ;height: 100rpx;" src="../../images/ic_yanzhengma.png" /> <image src="../../images/my/lock.png" />
</navigator> </navigator>
<view class="w40"></view> <view class="w40"></view>
<view url="" class="grid2 red" style="opacity: 0;" bind:tap="logoout"> <view url="" class="grid2 red" style="opacity: 0;" bind:tap="logoout">

1
miniprogram/pages/my/my.wxss

@ -226,7 +226,6 @@ page {
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
margin: 20rpx 0rpx 0rpx;
justify-content: space-between; justify-content: space-between;
} }

29
miniprogram/subpages/checkIn/pages/checkIn/register/register.js

@ -7,6 +7,7 @@ Page({
*/ */
data: { data: {
look: true, look: true,
status:0, //审核状态
informFlag: false, informFlag: false,
selectOption: [{ selectOption: [{
label: '机关企事业单位', label: '机关企事业单位',
@ -48,6 +49,8 @@ Page({
idCard: '', idCard: '',
mobile: '', mobile: '',
homeName: '', //居住小区名称 homeName: '', //居住小区名称
villageName: '', //居住小区名称
hobbies: '', // 服务意向
workUnit: '', //工作单位 workUnit: '', //工作单位
workType: '', //单位性质 workType: '', //单位性质
workIndustry: '', //所属行业 workIndustry: '', //所属行业
@ -90,7 +93,7 @@ Page({
workType, workType,
workIndustry, workIndustry,
hobbies, hobbies,
shibei shibei,
} = JSON.parse(wx.getStorageSync('userInfo')) } = JSON.parse(wx.getStorageSync('userInfo'))
this.setData({ this.setData({
'form.name': realName, 'form.name': realName,
@ -102,7 +105,9 @@ Page({
'form.workIndustry': workIndustry, 'form.workIndustry': workIndustry,
'form.hobbies': hobbies, 'form.hobbies': hobbies,
'form.shibei': shibei, 'form.shibei': shibei,
'form.hobbies': hobbies,
'form.homeName': villageName, 'form.homeName': villageName,
'form.villageName': villageName,
}) })
this.getByIdCardAndName() this.getByIdCardAndName()
}, },
@ -345,6 +350,10 @@ Page({
'form.gridStaff': res.data.gridStaff, 'form.gridStaff': res.data.gridStaff,
'form.volunteer': res.data.volunteer, 'form.volunteer': res.data.volunteer,
}) })
if(res.data.status === 0 || res.data.status === 1){
this.handleNext();
this.submit();
}
} }
}).catch(err => { }).catch(err => {
@ -548,6 +557,8 @@ Page({
para.volunteer = parseInt(para.volunteer) para.volunteer = parseInt(para.volunteer)
para.gridStaff = parseInt(para.gridStaff) para.gridStaff = parseInt(para.gridStaff)
para.owners = this.data.form.owners para.owners = this.data.form.owners
para.hobbies = this.data.form.hobbies
para.villageName = this.data.form.villageName
// wx.showLoading({ // wx.showLoading({
// title: "提交中..." // title: "提交中..."
// }) // })
@ -598,11 +609,23 @@ Page({
delta: 1 delta: 1
}) })
}, },
handleNext() { handleEdit(){
this.setData({ this.setData({
informFlag: true submitStatus: false,
look: false
}) })
}, },
handleNext() {
if(this.data.informFlag){
this.setData({
informFlag: false
})
}else{
this.setData({
informFlag: true
})
}
},
callLiveTelephone() { callLiveTelephone() {
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: this.tipData.liveTelephone, phoneNumber: this.tipData.liveTelephone,

7
miniprogram/subpages/checkIn/pages/checkIn/register/register.wxml

@ -203,7 +203,10 @@
<view class="item"><view>手机</view> <view><text bind:tap="callCouplingMobile">{{tipData.couplingMobile?tipData.couplingMobile:'--'}}</text></view></view> <view class="item"><view>手机</view> <view><text bind:tap="callCouplingMobile">{{tipData.couplingMobile?tipData.couplingMobile:'--'}}</text></view></view>
</view> </view>
<map style="width:100rpx;height:100rpx;display:none" id="map"></map> <map style="width:100rpx;height:100rpx;display:none" id="map"></map>
<button type="warn" class="tipBtn" bind:tap="handleBack">您已完成报到,请及时与社区联系</button> <view class="buttom_btn" style=" width: 94%;">
<button type="warn" plain="true" class="back" bind:tap="handleBack" style="padding-left: 10rpx;">返回</button>
<button type="warn" class="next" bind:tap="handleEdit" style="width: 43%;">修改报道信息</button>
</view>
</view> </view>
<view class="buttom_btn" wx:if="{{!submitStatus}}"> <view class="buttom_btn" wx:if="{{!submitStatus}}">
<button type="warn" plain="true" class="back" bind:tap="handleBack">返回</button> <button type="warn" plain="true" class="back" bind:tap="handleBack">返回</button>
@ -224,8 +227,6 @@
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
<view class="buttom_btn"> <view class="buttom_btn">
<button type="warn" plain="true" class="back" bind:tap="handleBack">返回</button> <button type="warn" plain="true" class="back" bind:tap="handleBack">返回</button>
<button type="warn" class="next" disabled="{{look}}" bind:tap="handleNext">下一步</button> <button type="warn" class="next" disabled="{{look}}" bind:tap="handleNext">下一步</button>

5
miniprogram/subpages/checkIn/pages/checkIn/register/register.wxss

@ -38,13 +38,12 @@ page {
justify-content: center; justify-content: center;
} }
.buttom_btn{ .buttom_btn{
position: fixed; position: fixed;
bottom: 0; bottom: 0;
height: 120rpx; height: 150rpx;
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
} }
.buttom_btn .back{ .buttom_btn .back{

2
miniprogram/utils/config.js

@ -9,7 +9,7 @@ module.exports = {
// 现在小程序的功能 主要走咱这边自己的接口,另外 党群服务中心、需求清单、问卷调查走产品的接口,所以导致接口半路径不同 // 现在小程序的功能 主要走咱这边自己的接口,另外 党群服务中心、需求清单、问卷调查走产品的接口,所以导致接口半路径不同
function BASEURL() { function BASEURL() {
return "https://epdc-shibei.elinkservice.cn/epdc-api/api/" // 正式环境 return "https://epdc-shibei.elinkservice.cn/epdc-api/api/" // 正式环境
// return "http://192.168.43.4:9094/epdc-api/api/" // 卢岩 // return "http://localhost:10994/epdc-api/api/"
} }
// 获取 党群服务中心、需求清单、问卷调查 等模块的半路径 // 获取 党群服务中心、需求清单、问卷调查 等模块的半路径
function getProductionBaseUrl () { function getProductionBaseUrl () {

1
miniprogram/utils/partApi.js

@ -31,7 +31,6 @@ function submitKnightpionner(para) {
} }
//在职党员提交接口 //在职党员提交接口
function submitReportparty(para) { function submitReportparty(para) {
console.log(para);
if(para.id){ if(para.id){
return fly.post("app-user/reportparty/update", para) return fly.post("app-user/reportparty/update", para)
}else { }else {

Loading…
Cancel
Save