|
After Width: | Height: | Size: 878 B |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 850 B |
|
After Width: | Height: | Size: 8.3 KiB |
@ -0,0 +1,57 @@ |
|||
{ |
|||
"setting": {}, |
|||
"condition": { |
|||
"plugin": { |
|||
"list": [] |
|||
}, |
|||
"game": { |
|||
"list": [] |
|||
}, |
|||
"gamePlugin": { |
|||
"list": [] |
|||
}, |
|||
"miniprogram": { |
|||
"list": [ |
|||
{ |
|||
"id": 0, |
|||
"name": "带参数二维码", |
|||
"pathName": "pages/index/index", |
|||
"query": "scene=1169158362718629889&inviteUserId=12345", |
|||
"scene": 1011 |
|||
}, |
|||
{ |
|||
"id": 2, |
|||
"name": "网格长注册", |
|||
"pathName": "pages/index/index", |
|||
"query": "scene=gridLeader", |
|||
"scene": 1011 |
|||
}, |
|||
{ |
|||
"id": 3, |
|||
"name": "补全用户信息", |
|||
"pathName": "pages/complete/complete", |
|||
"query": "", |
|||
"scene": null |
|||
}, |
|||
{ |
|||
"name": "网格注册", |
|||
"pathName": "pages/formid/formid", |
|||
"query": "gid=1258691044142047233", |
|||
"scene": null |
|||
}, |
|||
{ |
|||
"name": "pages/mine/mine", |
|||
"pathName": "pages/mine/mine", |
|||
"query": "", |
|||
"scene": null |
|||
}, |
|||
{ |
|||
"name": "亮身份", |
|||
"pathName": "subpages/status/pages/brightStatus/brightStatus", |
|||
"query": "", |
|||
"scene": null |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
const request = require('../../../utils/request') |
|||
|
|||
export function showIdentity(params) { |
|||
return request.post('app-user/partyMember/showIdentity', params) |
|||
} |
|||
|
|||
export function getDentityDetail() { |
|||
return request.get('app-user/partyMember/dentityDetail') |
|||
} |
|||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
@ -0,0 +1,197 @@ |
|||
import { showIdentity, getDentityDetail } from '../../api/status' |
|||
const uploadImageUrl = |
|||
'https://epdc-yushan.elinkservice.cn/epdc-api/api/group/topic/upload' |
|||
|
|||
Page({ |
|||
data: { |
|||
streetVisible: false, |
|||
conditionListVisible: false, |
|||
checkboxSelectOptions: [], |
|||
sayingValue: '', //党员格言
|
|||
promiseValue: '', //党员承诺
|
|||
introValue: '', //服务范围
|
|||
uploadTitleImage: { |
|||
uploaded: true, |
|||
url: '', |
|||
}, |
|||
showIdentityFlag: 0, // 是否亮过身份 0 否 1 是
|
|||
}, |
|||
onLoad: function (options) { |
|||
if (options.showIdentityFlag) { |
|||
this.setData({ |
|||
showIdentityFlag: options.showIdentityFlag, |
|||
}) |
|||
} |
|||
if (this.data.showIdentityFlag == 1) { |
|||
this.getDentityDetail() |
|||
} |
|||
}, |
|||
introBlur(e) { |
|||
this.setData({ |
|||
introValue: e.detail.value, |
|||
}) |
|||
}, |
|||
introInput(e) { |
|||
this.setData({ |
|||
introValue: e.detail.value, |
|||
}) |
|||
}, |
|||
introFocus() { |
|||
this.setData({}) |
|||
}, |
|||
sayingBlur(e) { |
|||
this.setData({ |
|||
sayingValue: e.detail.value, |
|||
}) |
|||
}, |
|||
sayingInput(e) { |
|||
this.setData({ |
|||
sayingValue: e.detail.value, |
|||
}) |
|||
}, |
|||
sayingFocus() { |
|||
this.setData({}) |
|||
}, |
|||
promiseBlur(e) { |
|||
this.setData({ |
|||
promiseValue: e.detail.value, |
|||
}) |
|||
}, |
|||
promiseInput(e) { |
|||
this.setData({ |
|||
promiseValue: e.detail.value, |
|||
}) |
|||
}, |
|||
promiseFocus() { |
|||
this.setData({}) |
|||
}, |
|||
// 提交--亮身份
|
|||
showIdentity() { |
|||
const params = { |
|||
headUrl: this.data.uploadTitleImage.url, // 地址
|
|||
motto: this.data.sayingValue, //格言
|
|||
promise: this.data.promiseValue, // 承诺
|
|||
serviceArea: this.data.introValue, // 服务范围
|
|||
} |
|||
|
|||
if (!this.data.sayingValue) { |
|||
wx.showToast({ |
|||
title: '请输入党员格言', |
|||
icon: 'none', |
|||
duration: 1000, |
|||
}) |
|||
return |
|||
} |
|||
if (!this.data.promiseValue) { |
|||
wx.showToast({ |
|||
title: '请输入党员承诺', |
|||
icon: 'none', |
|||
duration: 1000, |
|||
}) |
|||
return |
|||
} |
|||
if (!this.data.introValue) { |
|||
wx.showToast({ |
|||
title: '请输入服务范围', |
|||
icon: 'none', |
|||
duration: 1000, |
|||
}) |
|||
return |
|||
} |
|||
if (!this.data.uploadTitleImage.url) { |
|||
wx.showToast({ |
|||
title: '请上传党员头像', |
|||
icon: 'none', |
|||
duration: 1000, |
|||
}) |
|||
return |
|||
} |
|||
wx.showLoading({ |
|||
title: '提交中,请稍等', |
|||
mask: true, |
|||
}) |
|||
showIdentity(params) |
|||
.then((res) => { |
|||
wx.hideLoading() |
|||
wx.showToast({ |
|||
title: '亮身份成功', |
|||
icon: 'success', |
|||
duration: 1000, |
|||
mask: true, |
|||
success: () => { |
|||
// wx.navigateBack({
|
|||
// delta: 1,
|
|||
// })
|
|||
wx.reLaunch({ |
|||
url: '/pages/index/index', |
|||
}) |
|||
}, |
|||
}) |
|||
}) |
|||
.catch(() => { |
|||
wx.hideLoading() |
|||
}) |
|||
}, |
|||
// 回显---党员亮身份
|
|||
getDentityDetail() { |
|||
const params = { |
|||
identityNo: this.data.identityNo, |
|||
} |
|||
getDentityDetail(params) |
|||
.then((res) => { |
|||
this.setData({ |
|||
sayingValue: res.data.motto, // 格言
|
|||
promiseValue: res.data.promise, // 承诺
|
|||
introValue: res.data.serviceArea, // 服务范围
|
|||
['uploadTitleImage.url']: res.data.headUrl, // 头像
|
|||
}) |
|||
}) |
|||
.catch(() => {}) |
|||
}, |
|||
// 上传头像
|
|||
previewImage(e) { |
|||
wx.previewImage({ |
|||
urls: [e.currentTarget.dataset.src], |
|||
}) |
|||
}, |
|||
chooseImage() { |
|||
const _this = this |
|||
wx.chooseImage({ |
|||
count: 1, |
|||
sizeType: ['original', 'compressed'], |
|||
success(res) { |
|||
_this.setData({ |
|||
'uploadTitleImage.uploaded': false, |
|||
'uploadTitleImage.url': res.tempFilePaths[0], |
|||
}) |
|||
wx.uploadFile({ |
|||
url: uploadImageUrl, |
|||
filePath: res.tempFilePaths[0], |
|||
name: 'file', |
|||
header: { |
|||
'Content-type': 'multipart/form-data', |
|||
Authorization: wx.getStorageSync('token'), |
|||
}, |
|||
success(fileRes) { |
|||
const uploadTitleImage = { |
|||
uploaded: true, |
|||
url: JSON.parse(fileRes.data).data, |
|||
} |
|||
_this.setData({ |
|||
uploadTitleImage, |
|||
}) |
|||
}, |
|||
}) |
|||
}, |
|||
}) |
|||
}, |
|||
deleteImage(e) { |
|||
const uploadTitleImage = { |
|||
url: '', |
|||
uploaded: true, |
|||
} |
|||
this.setData({ |
|||
uploadTitleImage, |
|||
}) |
|||
}, |
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"wux-popup-select": "../../../../dist/popup-select/index", |
|||
"wux-cell": "../../../../dist/cell/index" |
|||
}, |
|||
"navigationBarTitleText": "亮身份" |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
<view class="party-saying"> |
|||
<text class="party-saying-text">格言</text> |
|||
<textarea placeholder="请填写您的人士格言(不超过30字)" maxlength='30' placeholder-class="placeholder-saying" bindblur='sayingBlur' bindinput='sayingInput' bindfocus='sayingFocus' value="{{sayingValue}}" /> |
|||
</view> |
|||
<view class="party-promise"> |
|||
<text class="party-saying-text">承诺</text> |
|||
<textarea placeholder="请填写您的为民服务承诺(不超过100字)" maxlength='100' placeholder-class="placeholder-saying" bindblur='promiseBlur' bindinput='promiseInput' bindfocus='promiseFocus' value="{{promiseValue}}" /> |
|||
</view> |
|||
<view class="intro"> |
|||
<text class="party-saying-text">服务范围</text> |
|||
<textarea placeholder="请填写您的为民服务范围(不超过100字)" maxlength='100' placeholder-class="placeholder-saying" bindblur='introBlur' bindinput='introInput' bindfocus='introFocus' value="{{introValue}}" /> |
|||
</view> |
|||
<view class="header-image"> |
|||
<text class="party-saying-text">上传头像</text> |
|||
<view class="image-item" wx:if="{{uploadTitleImage.url}}"> |
|||
<image class="issue-image" src="{{uploadTitleImage.url}}" bindtap="previewImage" data-src="{{uploadTitleImage.url}}" /> |
|||
<image wx:if="{{!uploadTitleImage.uploaded}}" class="loading" src="../../images/loading.gif" /> |
|||
<image bindtap="deleteImage" class="close" wx:else src="../../images/icon_close.png" /> |
|||
</view> |
|||
<image wx:else src="../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" /> |
|||
</view> |
|||
<view class="button-view"> |
|||
<view class="show-status" bind:tap="showIdentity">点亮徽章</view> |
|||
</view> |
|||
@ -0,0 +1,113 @@ |
|||
page { |
|||
background: #f8f8fa; |
|||
} |
|||
|
|||
.party-saying, |
|||
.intro, |
|||
.party-promise { |
|||
box-sizing: border-box; |
|||
width: 100%; |
|||
height: 300rpx; |
|||
padding: 30rpx; |
|||
background: #fff; |
|||
margin-top: 10rpx; |
|||
} |
|||
|
|||
.party-saying-text { |
|||
font-size: 34rpx; |
|||
} |
|||
|
|||
textarea { |
|||
margin-top: 10rpx; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.placeholder-saying { |
|||
color: #A8A8A8; |
|||
font-size: 32rpx; |
|||
} |
|||
|
|||
.button-view { |
|||
display: flex; |
|||
justify-content: space-around; |
|||
} |
|||
|
|||
.show-status { |
|||
width: 440rpx; |
|||
height: 80rpx; |
|||
line-height: 80rpx; |
|||
background-image: linear-gradient(90deg, |
|||
#db1a1f 20%, |
|||
#e95027 100%), |
|||
linear-gradient(#ffffff, |
|||
#ffffff); |
|||
box-shadow: 0px 4px 27px 0px rgba(220, 28, 31, 0.29); |
|||
border-radius: 40rpx; |
|||
color: #fff; |
|||
font-size: 34rpx; |
|||
text-align: center; |
|||
margin-top: 65rpx; |
|||
} |
|||
|
|||
|
|||
.wux-cell__ft { |
|||
width: 480rpx !important; |
|||
box-sizing: border-box !important; |
|||
white-space: nowrap !important; |
|||
overflow: hidden !important; |
|||
text-overflow: ellipsis !important; |
|||
text-align: left !important; |
|||
} |
|||
|
|||
.wux-cell:after { |
|||
border: none !important; |
|||
} |
|||
|
|||
.wux-cell--access .wux-cell__ft:after { |
|||
width: 0rpx !important; |
|||
height: 0rpx !important; |
|||
} |
|||
|
|||
/* 上传头像 */ |
|||
.header-image { |
|||
width: 100%; |
|||
height: 280rpx; |
|||
box-sizing: border-box; |
|||
padding: 10rpx 30rpx; |
|||
background: #fff; |
|||
margin-top: 10rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
} |
|||
|
|||
.image-item { |
|||
width: 180rpx; |
|||
height: 180rpx; |
|||
position: relative; |
|||
margin-top: 10rpx; |
|||
} |
|||
|
|||
.image-item .loading { |
|||
position: absolute; |
|||
left: 25%; |
|||
top: 25%; |
|||
width: 50%; |
|||
height: 50%; |
|||
} |
|||
|
|||
.image-item .close { |
|||
position: absolute; |
|||
top: -10rpx; |
|||
right: -10rpx; |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
} |
|||
|
|||
.header-image image { |
|||
width: 180rpx; |
|||
height: 180rpx; |
|||
object-fit: cover; |
|||
border-radius: 8rpx; |
|||
margin-top: 10rpx; |
|||
} |
|||