Browse Source

亮身份

feature/societyOrg
FightingN 4 years ago
parent
commit
7cab016e59
  1. BIN
      epdc-resident-mp-yushan/images/mine/bianji.png
  2. BIN
      epdc-resident-mp-yushan/images/mine/bright-status-bac.png
  3. BIN
      epdc-resident-mp-yushan/images/mine/dengji@2x.png
  4. BIN
      epdc-resident-mp-yushan/images/mine/jifen@2x.png
  5. BIN
      epdc-resident-mp-yushan/images/mine/right.png
  6. BIN
      epdc-resident-mp-yushan/images/mine/yiliangshenfen.png
  7. 84
      epdc-resident-mp-yushan/pages/complete/complete.js
  8. 318
      epdc-resident-mp-yushan/pages/mine/mine.js
  9. 4
      epdc-resident-mp-yushan/pages/mine/mine.json
  10. 83
      epdc-resident-mp-yushan/pages/mine/mine.wxml
  11. 148
      epdc-resident-mp-yushan/pages/mine/mine.wxss
  12. 57
      epdc-resident-mp-yushan/project.private.config.json
  13. 9
      epdc-resident-mp-yushan/subpages/status/api/status.js
  14. BIN
      epdc-resident-mp-yushan/subpages/status/images/icon_close.png
  15. BIN
      epdc-resident-mp-yushan/subpages/status/images/ig_tianjiatupian@2x.png
  16. BIN
      epdc-resident-mp-yushan/subpages/status/images/loading.gif
  17. 197
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.js
  18. 7
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.json
  19. 24
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxml
  20. 113
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxss

BIN
epdc-resident-mp-yushan/images/mine/bianji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
epdc-resident-mp-yushan/images/mine/bright-status-bac.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
epdc-resident-mp-yushan/images/mine/dengji@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
epdc-resident-mp-yushan/images/mine/jifen@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
epdc-resident-mp-yushan/images/mine/right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

BIN
epdc-resident-mp-yushan/images/mine/yiliangshenfen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

84
epdc-resident-mp-yushan/pages/complete/complete.js

@ -8,67 +8,77 @@ Page({
moreThanOneGrid: false,
gridInfo: {
gridName: '', // 网格名称
gridId: '' // 网格id
gridId: '', // 网格id
},
partyFlag: '0'
partyFlag: '0',
},
onLoad(options) {
if (options.selectTab) {
this.setData({
selectTab: options.selectTab,
})
}
},
// 我是居民/我是党员/我是企业 tab切换
onTabChange (e) {
onTabChange(e) {
if (e.currentTarget.dataset.tab === 'resident') {
if (this.data.partyFlag === '1') {
wx.showToast({
title: '您已是党员,不可认证居民',
icon: 'none',
duration: 2000
duration: 2000,
})
return false
}
}
this.setData({
selectTab: e.currentTarget.dataset.tab
selectTab: e.currentTarget.dataset.tab,
})
},
// 获取当前用户所有网格
getGridList(e) {
api.getGridList().then(res => {
console.log('获取所有网格', res)
const buttonList = []
res.data.forEach(item => {
if (item.gridId !== e.detail.gridId) {
buttonList.push({
id: item.gridId,
text: item.grid
})
}
})
this.setData({
gridList: res.data,
changeGridList: buttonList,
moreThanOneGrid: buttonList.length > 0
api
.getGridList()
.then((res) => {
console.log('获取所有网格', res)
const buttonList = []
res.data.forEach((item) => {
if (item.gridId !== e.detail.gridId) {
buttonList.push({
id: item.gridId,
text: item.grid,
})
}
})
this.setData({
gridList: res.data,
changeGridList: buttonList,
moreThanOneGrid: buttonList.length > 0,
})
})
}).catch(err => {
this.setData({
gridList: [],
changeGridList: []
.catch((err) => {
this.setData({
gridList: [],
changeGridList: [],
})
console.log(err)
})
console.log(err)
})
},
// 切换网格
changeGrid(e) {
const buttonList = []
this.data.gridList.forEach(item => {
this.data.gridList.forEach((item) => {
buttonList.push({
id: item.gridId,
text: item.grid
text: item.grid,
})
})
const index = buttonList.findIndex(item => item.id === e.detail.gridId)
const index = buttonList.findIndex((item) => item.id === e.detail.gridId)
if (index > -1) {
buttonList.splice(index, 1)
}
this.setData({
changeGridList: buttonList
changeGridList: buttonList,
})
const that = this
$wuxActionSheet().showSheet({
@ -77,19 +87,19 @@ Page({
buttonClicked(index, item) {
that.setData({
'gridInfo.gridId': item.id,
'gridInfo.gridName': item.text
'gridInfo.gridName': item.text,
})
return true
},
cancelText: '取消',
cancel() { },
destructiveButtonClicked() { },
cancel() {},
destructiveButtonClicked() {},
})
},
selectTabChange (e) {
selectTabChange(e) {
this.setData({
selectTab: e.detail.tab,
partyFlag: e.detail.partyFlag
partyFlag: e.detail.partyFlag,
})
}
})
},
})

318
epdc-resident-mp-yushan/pages/mine/mine.js

@ -17,33 +17,34 @@ Page({
userInfo: {
faceImg: '',
nickname: '',
partyFlag: '',
partyFlag: '', // 0不是党员 1是党员
points: 0,
grade: 0
grade: 0,
showIdentityFlag: 0, // 是否亮过身份 0 否 1 是
},
completeInfoDialogVisible: false,
infoCompleted: 0
infoCompleted: 0,
},
onLoad () {
onLoad() {
this.getUserInfo()
this.setData({
infoCompleted: app.globalData.infoCompleted
infoCompleted: app.globalData.infoCompleted,
})
},
onShow () {
onShow() {
if (!app.globalData.previewImage) {
this.data.pageNo = 1
this.data.pageSize = 10
this.setData({
nomoreVisible: false,
nomoreStatus: 'loading',
preloadVisible: true
preloadVisible: true,
})
if (this.data.selectedTabBar === 'issue') {
this.getIssueList()
} else if (this.data.selectedTabBar === 'project') {
this.getProjectList()
} else if (this.data.selectedTabBar === 'topic') {
} else if (this.data.selectedTabBar === 'topic') {
this.getTopicList()
}
}
@ -53,7 +54,7 @@ Page({
// 触底 上拉加载
onReachBottom() {
this.setData({
nomoreVisible: true
nomoreVisible: true,
})
if (this.data.selectedTabBar === 'topic') {
if (this.data.nomoreStatus === 'loading') {
@ -61,7 +62,7 @@ Page({
this.loadMoreTopicList()
} else {
this.setData({
nomoreVisible: true
nomoreVisible: true,
})
}
} else if (this.data.selectedTabBar === 'project') {
@ -70,17 +71,17 @@ Page({
this.loadMoreProjectList()
} else {
this.setData({
nomoreVisible: true
nomoreVisible: true,
})
}
}
},
// tab 切换
chooseTabBar (e) {
chooseTabBar(e) {
this.setData({
nomoreVisible: false,
nomoreStatus: 'loading',
preloadVisible: true
preloadVisible: true,
})
this.data.pageNo = 1
this.data.pageSize = 10
@ -92,216 +93,265 @@ Page({
this.getProjectList()
} else if (e.currentTarget.dataset.type === 'topic') {
this.getTopicList()
}
}
this.setData({
selectedTabBar: e.currentTarget.dataset.type
selectedTabBar: e.currentTarget.dataset.type,
})
},
// 获取 我的话题列表
getTopicList () {
getTopicList() {
this.setData({
topicList: []
topicList: [],
})
const para = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize
pageSize: this.data.pageSize,
}
api.getMyTopicList(para).then(res => {
console.log('我的话题列表', res)
this.setData({
topicList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false
api
.getMyTopicList(para)
.then((res) => {
console.log('我的话题列表', res)
this.setData({
topicList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
})
})
}).catch(err => {
this.setData({
topicList: [],
nomoreStatus: 'none',
preloadVisible: false
.catch((err) => {
this.setData({
topicList: [],
nomoreStatus: 'none',
preloadVisible: false,
})
console.log(err)
})
console.log(err)
})
},
// 获取 我的话题列表 上拉加载
loadMoreTopicList () {
loadMoreTopicList() {
const para = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize
pageSize: this.data.pageSize,
}
api.getMyTopicList(para).then(res => {
console.log('我的话题列表', res)
const topicList = [...this.data.topicList, ...res.data]
this.setData({
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
topicList,
api
.getMyTopicList(para)
.then((res) => {
console.log('我的话题列表', res)
const topicList = [...this.data.topicList, ...res.data]
this.setData({
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
topicList,
})
})
}).catch(err => {
this.setData({
topicList: [],
nomoreStatus: 'none',
preloadVisible: false
.catch((err) => {
this.setData({
topicList: [],
nomoreStatus: 'none',
preloadVisible: false,
})
console.log(err)
})
console.log(err)
})
},
// 获取 我的议题列表
getIssueList () {
getIssueList() {
this.setData({
issueList: []
issueList: [],
})
api.getMyIssueList().then(res => {
console.log('我的议题列表', res)
this.setData({
issueList: [...res.data],
nomoreStatus: 'none',
preloadVisible: false
api
.getMyIssueList()
.then((res) => {
console.log('我的议题列表', res)
this.setData({
issueList: [...res.data],
nomoreStatus: 'none',
preloadVisible: false,
})
})
}).catch(err => {
this.setData({
issueList: [],
nomoreStatus: 'none',
preloadVisible: false
.catch((err) => {
this.setData({
issueList: [],
nomoreStatus: 'none',
preloadVisible: false,
})
console.log(err)
})
console.log(err)
})
},
// 获取 我的项目列表
getProjectList () {
getProjectList() {
this.setData({
projectList: []
projectList: [],
})
this.data.timestamp = getTimestamp()
const para = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize,
timestamp: this.data.timestamp
timestamp: this.data.timestamp,
}
api.getMyProjectList(para).then(res => {
console.log('我的项目列表', res)
this.setData({
projectList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false
api
.getMyProjectList(para)
.then((res) => {
console.log('我的项目列表', res)
this.setData({
projectList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
})
})
}).catch(err => {
this.setData({
projectList: [],
nomoreStatus: 'none',
preloadVisible: false
.catch((err) => {
this.setData({
projectList: [],
nomoreStatus: 'none',
preloadVisible: false,
})
console.log(err)
})
console.log(err)
})
},
// 获取 我的项目列表 上拉加载
loadMoreProjectList () {
loadMoreProjectList() {
const para = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize,
timestamp: this.data.timestamp
timestamp: this.data.timestamp,
}
api.getMyProjectList(para).then(res => {
console.log('我的项目列表', res)
const projectList = [...this.data.projectList,...res.data]
this.setData({
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
projectList,
api
.getMyProjectList(para)
.then((res) => {
console.log('我的项目列表', res)
const projectList = [...this.data.projectList, ...res.data]
this.setData({
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
projectList,
})
})
}).catch(err => {
this.setData({
projectList: [],
nomoreStatus: 'none',
preloadVisible: false
.catch((err) => {
this.setData({
projectList: [],
nomoreStatus: 'none',
preloadVisible: false,
})
console.log(err)
})
console.log(err)
})
},
// 获取用户信息
getUserInfo () {
api.getUserInfo().then(res => {
console.log('用户信息', res)
const userInfo = {}
for(const key in this.data.userInfo) {
userInfo[key] = res.data[key]
}
this.setData({
userInfo
})
}).catch(err => {
this.setData({
userInfo: {
faceImg: '',
nickname: '',
points: 0,
grade: 0
getUserInfo() {
api
.getUserInfo()
.then((res) => {
console.log('用户信息', res)
const userInfo = {}
for (const key in this.data.userInfo) {
userInfo[key] = res.data[key]
}
this.setData({
userInfo,
})
})
.catch((err) => {
this.setData({
userInfo: {
faceImg: '',
nickname: '',
points: 0,
grade: 0,
},
})
console.log(err)
})
console.log(err)
})
},
// 完善信息
navigateToComplete () {
navigateToComplete() {
wx.navigateTo({
url: '/pages/complete/complete'
url: '/pages/complete/complete',
})
},
// 议题列表 跳转详情
toIssueDetail (e) {
toIssueDetail(e) {
const { issueId, state } = e.detail
if (state !== '待审核' && state !== '未通过') {
wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=issue&detailId=${issueId}`
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=issue&detailId=${issueId}`,
})
} else if (state === '待审核' || state === '未通过') {
wx.navigateTo({
url: `/subpages/mine/pages/eventDetail/eventDetail?eventId=${issueId}&eventType=${state}`
url: `/subpages/mine/pages/eventDetail/eventDetail?eventId=${issueId}&eventType=${state}`,
})
}
},
// 项目列表 跳转详情
toProjectDetail (e) {
toProjectDetail(e) {
const { itemId } = e.detail
wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${itemId}`
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${itemId}`,
})
},
// 话题列表 跳转详情
toTopicDetail (e) {
toTopicDetail(e) {
const { topicId } = e.detail
wx.navigateTo({
url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}`
url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}`,
})
},
// 我要报事
addIssue () {
addIssue() {
if (this.data.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
wx.navigateTo({
url: '/subpages/discussion/pages/addIssue/addIssue'
url: '/subpages/discussion/pages/addIssue/addIssue',
})
},
// 跳转到 邀请记录
navigateToInviteRecord () {
navigateToInviteRecord() {
wx.navigateTo({
url: '/subpages/mine/pages/inviteRecord/inviteRecord'
url: '/subpages/mine/pages/inviteRecord/inviteRecord',
})
},
// 跳转到 网格管理
navigateToGridManage () {
navigateToGridManage() {
wx.navigateTo({
url: '/subpages/mine/pages/gridManage/gridManage'
url: '/subpages/mine/pages/gridManage/gridManage',
})
},
//跳转到积分中心
navigateToIntegralCentre () {
this.getUserInfo();//防止积分变化
navigateToIntegralCentre() {
this.getUserInfo() //防止积分变化
wx.navigateTo({
url: "/subpages/integralCentre/pages/index/index?points=" + this.data.userInfo.points
url:
'/subpages/integralCentre/pages/index/index?points=' +
this.data.userInfo.points,
})
}
})
},
// 点亮徽章
navigateToStatus() {
if (this.data.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
if (this.data.userInfo.partyFlag === '0') {
wx.showModal({
title: '提示',
content: '只有党员才可点亮徽章,是否要去认证为党员',
cancelText: '是',
confirmText: '否',
success(res) {
if (res.confirm) {
} else if (res.cancel) {
wx.navigateTo({
url: `/pages/complete/complete?selectTab=partyMember`,
})
}
},
})
} else {
wx.navigateTo({
url: `/subpages/status/pages/brightStatus/brightStatus?showIdentityFlag=${this.data.userInfo.showIdentityFlag}`,
})
}
},
})

4
epdc-resident-mp-yushan/pages/mine/mine.json

@ -9,5 +9,7 @@
"preload-topic-item": "./components/preloadTopicItem/preloadTopicItem",
"load-more": "../../components/loadMore/loadMore",
"completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog"
}
},
"navigationBarBackgroundColor": "#e40000",
"navigationBarTextStyle": "white"
}

83
epdc-resident-mp-yushan/pages/mine/mine.wxml

@ -1,8 +1,6 @@
<view class="mine">
<view class="personal-info">
<view class="box">
<image class="bg-image" src="../../images/mine/bg-mine.png" />
<view class="content">
<view class="top">
<view class="left">
@ -26,11 +24,14 @@
</view>
</view>
<view class="bottom">
<text class="text1">等级:{{userInfo.grade}}</text>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text>
<text class="text3"></text>
<view class="" hover-class="none" hover-stop-propagation="false">
<image class="dengji" src="../../images/mine/dengji@2x.png"></image>
<text class="text1">等级:{{userInfo.grade}}</text>
</view>
<view class="">
<image class="jifen" src="../../images/mine/jifen@2x.png"></image>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text>
</view>
<!-- <text class="text3" bindtap="jqqd">积分兑换</text> -->
</view>
<!-- <view class="bottom">
@ -46,47 +47,32 @@
</view>
</view>
</view>
<view class="bright-status">
<image src="../../images/mine/bright-status-bac.png" class="bright-status-bac" />
<view class="bright-status-text" bind:tap="navigateToStatus" wx:if="{{userInfo.showIdentityFlag=='0'}}">点亮徽章</view>
<view bind:tap="navigateToStatus">
<image src="../../images/mine/yiliangshenfen.png" class="bianji" wx:if="{{userInfo.showIdentityFlag==1}}" />
<image src="../../images/mine/right.png" class="right-icon" wx:if="{{userInfo.showIdentityFlag==1}}" />
</view>
</view>
<view class="tab-bar">
<view
class="type {{selectedTabBar === 'issue' ? 'selected-issue' : ''}}"
data-type="issue"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
<view class="type {{selectedTabBar === 'issue' ? 'selected-issue' : ''}}" data-type="issue" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
我的议题
</view>
<view
class="type {{selectedTabBar === 'project' ? 'selected-project' : ''}}"
data-type="project"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
<view class="type {{selectedTabBar === 'project' ? 'selected-project' : ''}}" data-type="project" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
我的项目
</view>
<view
class="type {{selectedTabBar === 'topic' ? 'selected-topic' : ''}}"
data-type="topic"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
<view class="type {{selectedTabBar === 'topic' ? 'selected-topic' : ''}}" data-type="topic" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
我的话题
</view>
<view class="select-bar {{selectedTabBar === 'issue' ? 'selected-issue' : selectedTabBar === 'project' ? 'selected-project' : selectedTabBar === 'topic' ? 'selected-topic' : ''}}"></view>
</view>
<view class="issue-list" wx:if="{{selectedTabBar === 'issue'}}">
<block wx:if="{{issueList.length === 0 && preloadVisible}}">
<preload-issue-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-issue-item>
</block>
<block wx:if="{{issueList.length > 0}}">
<issue-item
wx:for="{{issueList}}"
wx:key="id"
wx:for-item="item"
bind:toIssueDetail="toIssueDetail"
issueObj="{{item}}">
</issue-item>
<issue-item wx:for="{{issueList}}" wx:key="id" wx:for-item="item" bind:toIssueDetail="toIssueDetail" issueObj="{{item}}"></issue-item>
</block>
<view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/topic-nodata.png" />
@ -97,22 +83,14 @@
</view>
</view>
</view>
<view class="project-list" wx:elif="{{selectedTabBar === 'project'}}">
<block wx:if="{{projectList.length === 0 && preloadVisible}}">
<preload-project-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-project-item>
</block>
<block wx:if="{{projectList.length > 0}}">
<project-item
wx:for="{{projectList}}"
wx:for-item="item"
wx:key="id"
projectObj="{{item}}"
bind:toProjectDetail="toProjectDetail"
wx:for-index="index">
</project-item>
<project-item wx:for="{{projectList}}" wx:for-item="item" wx:key="id" projectObj="{{item}}" bind:toProjectDetail="toProjectDetail" wx:for-index="index"></project-item>
</block>
<view class="project-nodata" wx:if="{{projectList.length === 0 && !preloadVisible}}">
<view class="project-nodata" wx:if="{{projectList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/project-nodata.png" />
<view class="tip">您还没有转为项目的议题,请先发布议题</view>
<view class="tip">快来点击“我要报事”发布吧</view>
@ -122,20 +100,12 @@
</view>
</view>
</view>
<view class="topic-list" wx:elif="{{selectedTabBar === 'topic'}}">
<block wx:if="{{topicList.length === 0 && preloadVisible}}">
<preload-topic-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-topic-item>
</block>
<block wx:if="{{topicList.length > 0}}">
<topic-item
wx:for="{{topicList}}"
wx:for-item="item"
wx:for-index="index"
topicObj="{{item}}"
bind:toTopicDetail="toTopicDetail"
wx:key="id">
</topic-item>
<topic-item wx:for="{{topicList}}" wx:for-item="item" wx:for-index="index" topicObj="{{item}}" bind:toTopicDetail="toTopicDetail" wx:key="id"></topic-item>
</block>
<view class="topic-nodata" wx:if="{{topicList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/topic-nodata.png" />
@ -143,11 +113,6 @@
<view class="tip">快到“左邻右舍”,到您的群里发布吧</view>
</view>
</view>
<load-more loadMoreVisible="{{nomoreVisible}}" loadMoreType="{{nomoreStatus}}"></load-more>
</view>
<completeInfo-dialog
completeInfoDialogVisible="{{completeInfoDialogVisible}}">
</completeInfo-dialog>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></completeInfo-dialog>

148
epdc-resident-mp-yushan/pages/mine/mine.wxss

@ -2,23 +2,27 @@ page {
width: 100%;
height: 100vh;
}
.mine {
width: 100%;
height: 100%;
background: #f7f7f7;
}
.mine .personal-info {
width: 100%;
height: 310rpx;
box-sizing: border-box;
padding: 30rpx;
background: #fff;
/* padding: 0rpx 0 30rpx 30rpx; */
background: #e40000;
}
.mine .personal-info .box {
width: 100%;
height: 100%;
position: relative;
}
.mine .personal-info .box .bg-image {
position: absolute;
left: 0;
@ -27,6 +31,7 @@ page {
height: 100%;
object-fit: cover;
}
.mine .personal-info .box .content {
width: 100%;
height: 100%;
@ -34,8 +39,8 @@ page {
z-index: 100;
overflow: hidden;
}
.personal-info .box .content .top {
margin-top: 30rpx;
box-sizing: border-box;
padding-left: 30rpx;
width: 100%;
@ -44,22 +49,26 @@ page {
align-items: center;
justify-content: space-between;
}
.personal-info .box .content .top .left {
height: 100%;
display: flex;
align-items: center;
}
.personal-info .box .content .top .avatar {
width: 100rpx;
height: 100rpx;
position: relative;
}
.personal-info .box .content .top .avatar .avatar-content {
width: 100%;
height: 100%;
object-fit:cover;
object-fit: cover;
border-radius: 50%;
}
.personal-info .box .content .top .right {
height: 100%;
margin-left: 14rpx;
@ -67,20 +76,23 @@ page {
flex-direction: column;
justify-content: center;
}
.personal-info .box .content .top .right .nickname {
font-size: 30rpx;
color: #fff;
}
.personal-info .box .content .top .right .party-flag {
width: 72rpx;
height: 24rpx;
background: #FFE25E;
border-radius:12rpx;
border-radius: 12rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10rpx;
}
.personal-info .box .content .top .right .party-flag view {
color: #FD1D11;
font-size: 18rpx;
@ -88,16 +100,19 @@ page {
height: 24rpx;
line-height: 24rpx;
}
.personal-info .box .content .top .right .party-flag image {
width: 18rpx;
height: 18rpx;
object-fit: cover;
}
.personal-info .box .content .top .complete-info {
width: 130rpx;
height: 46rpx;
position: relative;
}
.personal-info .box .content .top .complete-info .complete-image {
position: absolute;
left: 0;
@ -105,6 +120,7 @@ page {
width: 100%;
height: 100%;
}
.personal-info .box .content .top .complete-info .complete-content {
position: relative;
z-index: 100;
@ -114,20 +130,23 @@ page {
justify-content: center;
align-items: center;
}
.personal-info .box .content .top .complete-info .complete-content .tip {
font-size: 22rpx;
color: #fff;
height: 46rpx;
line-height: 46rpx;
}
.personal-info .box .content .top .complete-info .complete-content .rightsword {
width: 14rpx;
height: 18rpx;
object-fit: cover;
margin-left: 9rpx;
}
.personal-info .box .content .bottom {
margin-top: 60rpx;
margin-top: 50rpx;
box-sizing: border-box;
width: 100%;
height: 30rpx;
@ -135,13 +154,29 @@ page {
align-items: center;
justify-content: space-around;
}
.personal-info .box .content .bottom text{
.personal-info .box .content .bottom .dengji {
width: 38rpx;
height: 40rpx;
vertical-align: middle;
margin-right: 13rpx;
}
.personal-info .box .content .bottom .jifen {
width: 40rpx;
height: 40rpx;
vertical-align: middle;
margin-right: 13rpx;
}
.personal-info .box .content .bottom text {
color: #fff;
font-size: 28rpx;
line-height: 30rpx;
flex: 1;
text-align: center;
}
.personal-info .box .content .bottom .operation {
flex: 1;
display: flex;
@ -150,18 +185,21 @@ page {
align-items: center;
padding-top: 5rpx;
}
.personal-info .box .content .bottom .operation + .operation {
border-left: 1rpx solid rgba(255,255,255,0.55);
.personal-info .box .content .bottom .operation+.operation {
border-left: 1rpx solid rgba(255, 255, 255, 0.55);
}
.personal-info .box .content .bottom .operation image {
width: 32rpx;
height: 32rpx;
object-fit: cover;
}
.personal-info .box .content .bottom .operation .tip {
font-size: 22rpx;
margin-top: 10rpx;
color: rgba(255,255,255,0.55);
color: rgba(255, 255, 255, 0.55);
}
.tab-bar {
@ -172,7 +210,9 @@ page {
align-items: center;
justify-content: space-around;
position: relative;
margin-top: 70rpx;
}
.tab-bar .type {
font-size: 30rpx;
color: #999;
@ -181,21 +221,26 @@ page {
height: 90rpx;
line-height: 90rpx;
}
.tab-bar .hover-tabbar {
background: #f3f3f3;
}
.tab-bar .type.selected-issue {
color: #F82525;
font-weight: bolder;
}
.tab-bar .type.selected-project {
color: #F82525;
font-weight: bolder;
}
.tab-bar .type.selected-topic {
color: #F82525;
font-weight: bolder;
}
.tab-bar .select-bar {
position: absolute;
bottom: 0;
@ -206,14 +251,17 @@ page {
border-radius: 4rpx;
transition: left 0.5s ease;
}
.tab-bar .select-bar.selected-issue {
left: 11%;
transition: left 0.5s ease;
}
.tab-bar .select-bar.selected-project {
left: 44.5%;
transition: left 0.5s ease;
}
.tab-bar .select-bar.selected-topic {
left: 78%;
transition: left 0.5s ease;
@ -224,6 +272,7 @@ page {
box-sizing: border-box;
padding: 20rpx;
}
.issue-list .issue-nodata {
width: 100%;
display: flex;
@ -231,17 +280,20 @@ page {
align-items: center;
margin-top: 70rpx;
}
.issue-list .issue-nodata .no-data {
width: 258rpx;
height: 244rpx;
object-fit: cover;
}
.issue-list .issue-nodata .tip {
font-size: 28rpx;
color: #bcbcbc;
line-height: 40rpx;
height: 40rpx;
}
.issue-list .issue-nodata .add-issue {
display: flex;
align-items: center;
@ -249,21 +301,23 @@ page {
position: relative;
margin-top: 30rpx;
}
.issue-list .issue-nodata .add-issue .issue-trigger {
width: 100rpx;
height: 66rpx;
object-fit: cover;
margin-right:20rpx;
margin-right: 20rpx;
position: absolute;
left: -120rpx;
bottom: 10rpx;
}
.issue-list .issue-nodata .add-issue button {
width: 140rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 6rpx;
text-align:center;
text-align: center;
padding: 0;
outline: none;
border: 0;
@ -271,9 +325,11 @@ page {
font-size: 22rpx;
background: linear-gradient(to right, #f51111, #ff4b4b);
}
.issue-list .issue-nodata .add-issue button::after {
border: 0;
}
.issue-list .issue-nodata .add-issue .hover-add-issue {
background: red;
}
@ -283,6 +339,7 @@ page {
box-sizing: border-box;
padding: 20rpx;
}
.project-list .project-nodata {
width: 100%;
display: flex;
@ -290,17 +347,20 @@ page {
align-items: center;
margin-top: 70rpx;
}
.project-list .project-nodata .no-data {
width: 260rpx;
height: 246rpx;
object-fit: cover;
}
.project-list .project-nodata .tip {
font-size: 28rpx;
color: #bcbcbc;
line-height: 40rpx;
height: 40rpx;
}
.project-list .project-nodata .add-issue {
display: flex;
align-items: center;
@ -308,21 +368,23 @@ page {
position: relative;
margin-top: 30rpx;
}
.project-list .project-nodata .add-issue .issue-trigger {
width: 100rpx;
height: 66rpx;
object-fit: cover;
margin-right:20rpx;
margin-right: 20rpx;
position: absolute;
left: -120rpx;
bottom: 10rpx;
}
.project-list .project-nodata .add-issue button {
width: 140rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 6rpx;
text-align:center;
text-align: center;
padding: 0;
outline: none;
border: 0;
@ -330,9 +392,11 @@ page {
font-size: 22rpx;
background: linear-gradient(to right, #f51111, #ff4b4b);
}
.project-list .project-nodata .add-issue button::after {
border: 0;
}
.project-list .project-nodata .add-issue .hover-add-issue {
background: red;
}
@ -342,6 +406,7 @@ page {
box-sizing: border-box;
padding: 20rpx;
}
.topic-list .topic-nodata {
width: 100%;
display: flex;
@ -349,11 +414,13 @@ page {
align-items: center;
margin-top: 70rpx;
}
.topic-list .topic-nodata .no-data {
width: 258rpx;
height: 244rpx;
object-fit: cover;
}
.topic-list .topic-nodata .tip {
font-size: 28rpx;
color: #bcbcbc;
@ -370,4 +437,57 @@ page {
align-items: center;
color: #999;
font-size: 26rpx;
}
/* 亮身份 */
.bright-status {
box-sizing: border-box;
background: #fff;
width: 710rpx;
height: 146rpx;
margin: auto;
position: absolute;
top: 222rpx;
left: 50%;
transform: translate(-50%, 0);
border-radius: 20rpx;
box-shadow: 0px 7px 21px 0px rgba(223, 223, 223, 0.31);
display: flex;
align-items: center;
justify-content: space-around;
z-index: 100;
}
.bright-status-bac {
width: 389rpx;
height: 33rpx;
}
.bright-status-text {
width: 160rpx;
height: 56rpx;
line-height: 56rpx;
background-image: linear-gradient(90deg,
#e83100 0%,
#ff6326 100%),
linear-gradient(#ffffff,
#ffffff);
box-shadow: 0px 4px 16px 0px rgba(237, 61, 9, 0.26);
border-radius: 28rpx;
font-size: 29rpx;
color: #ffffff;
text-align: center;
}
.bianji {
width: 38rpx;
height: 38rpx;
vertical-align: middle;
margin-right: 20rpx;
}
.right-icon {
width: 13rpx;
height: 20rpx;
vertical-align: middle;
}

57
epdc-resident-mp-yushan/project.private.config.json

@ -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
}
]
}
}
}

9
epdc-resident-mp-yushan/subpages/status/api/status.js

@ -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')
}

BIN
epdc-resident-mp-yushan/subpages/status/images/icon_close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
epdc-resident-mp-yushan/subpages/status/images/ig_tianjiatupian@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
epdc-resident-mp-yushan/subpages/status/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

197
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.js

@ -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,
})
},
})

7
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"wux-popup-select": "../../../../dist/popup-select/index",
"wux-cell": "../../../../dist/cell/index"
},
"navigationBarTitleText": "亮身份"
}

24
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxml

@ -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>

113
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxss

@ -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;
}
Loading…
Cancel
Save