Browse Source

添加注册页选择社区进入

master
mk 2 years ago
parent
commit
13031a4180
  1. 4
      epdc-resident-mp-yushan/app.json
  2. 6
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  3. 1
      epdc-resident-mp-yushan/pages/toRegister/toRegister.wxml
  4. 18
      epdc-resident-mp-yushan/pages/toRegister/toRegister.wxss
  5. 16
      epdc-resident-mp-yushan/project.private.config.json
  6. 36
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.js
  7. 4
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.json
  8. 11
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.wxml
  9. 68
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.wxss
  10. 52
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.js
  11. 4
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.json
  12. 10
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.wxml
  13. 68
      epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.wxss
  14. 5
      epdc-resident-mp-yushan/utils/api.js

4
epdc-resident-mp-yushan/app.json

@ -194,7 +194,9 @@
"pages": [
"pages/index/index",
"pages/communityList/communityList",
"pages/categoryList/categoryList"
"pages/categoryList/categoryList",
"pages/gridEntry/index",
"pages/gridEntryTwo/index"
]
},
{

6
epdc-resident-mp-yushan/pages/toRegister/toRegister.js

@ -65,6 +65,10 @@ Page({
wx.navigateTo({
url: '/subpages/home/pages/agreement/agreement'
})
},
toCommunity(){
wx.navigateTo({
url: '/subpages/gridArmy/pages/gridEntry/index'
})
}
})

1
epdc-resident-mp-yushan/pages/toRegister/toRegister.wxml

@ -5,6 +5,7 @@
<view class="footer">
<view class="buttons" wx:if="{{experience=='1'}}">
<button hover-class="hover-btn" class="btn2" bindtap="scan">扫码加入</button>
<button class="btn3" bindtap="toCommunity">选择社区加入</button>
<view class="look" bindtap="toAgreement">查看用户服务协议</view>
</view>
<view class="buttons" wx:if="{{experience=='0'}}">

18
epdc-resident-mp-yushan/pages/toRegister/toRegister.wxss

@ -74,6 +74,10 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
.check text{
color: #5295FF;
}
.buttons{
position: relative;
top:-80rpx;
}
.buttons .btn2 {
background-image: linear-gradient(to right , #ff2d29, #ff4e4e);
@ -88,6 +92,20 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
outline: 0;
font-weight: normal;
}
.buttons .btn3{
/* background-image: linear-gradient(to right , #ff2d29, #ff4e4e); */
background-color: #fff;
height:84rpx;
line-height: 84rpx;
text-align:center;
color: #ff2d29;
font-size: 36rpx;
border-radius: 16rpx;
padding: 0;
margin-top: 20rpx;
outline: 0;
font-weight: normal;
}
.buttons .hover-btn {
background: red;
}

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

@ -108,11 +108,25 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "注册",
"pathName": "pages/toRegister/toRegister",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "社区进入",
"pathName": "subpages/gridArmy/pages/gridEntry/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%2525E7%25258E%2525B0%2525E4%2525BB%2525A3%2525E6%2525A6%252586%2525E5%2525B1%2525B1-%2525E5%2525B1%252585%2525E6%2525B0%252591%2525E7%2525AB%2525AF",
"projectname": "%252525E7%2525258E%252525B0%252525E4%252525BB%252525A3%252525E6%252525A6%25252586%252525E5%252525B1%252525B1-%252525E5%252525B1%25252585%252525E6%252525B0%25252591%252525E7%252525AB%252525AF",
"libVersion": "2.10.4"
}

36
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.js

@ -0,0 +1,36 @@
const api = require('../../../../utils/api')
Page({
data: {
gridList: [],
},
onShow () {
this.loadGridList('1258587398679126017')
},
// 加载网格长管辖的网格列表
loadGridList (id) {
//默认写死传榆山街道id
let par = {
pid:id?id:'1258587398679126017'
}
api.getCommunityList(par).then(res => {
if (res.code === 0 && res.msg === 'success') {
const gridList = res.data
this.setData({
gridList,
})
}
console.log(res);
}).catch(err => {
console.log(err)
})
},
// 点击进入
changeGrid (e) {
wx.navigateTo({
url: `/subpages/gridArmy/pages/gridEntryTwo/index?id=${e.currentTarget.dataset.id}`,
})
}
})

4
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "现代榆山",
"usingComponents": {}
}

11
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.wxml

@ -0,0 +1,11 @@
<view class="change-grid">
<view class="grid-list">
<view class="content">
<view class="grid-item" wx:for="{{gridList}}" wx:item="{{item}}" wx:key="{{item.id}}">
<view class="name">{{item.name}}</view>
<view class="enter" bind:tap="changeGrid" data-id="{{item.id}}">进入</view>
</view>
</view>
</view>
</view>

68
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntry/index.wxss

@ -0,0 +1,68 @@
/* subpages/gridArmy/pages/gridEntry/index.wxss */
.change-grid {
width: 100%;
height: 100vh;
background: #f7f7f7;
}
.nav {
height: 94rpx;
background: #ffffff;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav .nav-left image {
width: 32rpx;
height: 32rpx;
margin: 0 9rpx 0 20rpx;
}
.nav .nav-left text {
font-size: 32rpx;
font-weight: bold;
color: #f13d3c;
}
.nav .nav-right {
font-size: 26rpx;
color: #999;
margin-right: 20rpx;
}
.grid-list {
width: 100%;
box-sizing: border-box;
padding: 20rpx;
height: auto;
}
.grid-list .content {
width: 100%;
height: 100%;
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 23rpx;
}
.grid-list .grid-item {
height: 100rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.content > .grid-item + .grid-item {
border-top: 1rpx solid #eaeaea;
}
.grid-list .grid-item .name {
font-size: 34rpx;
color: #333;
}
.grid-list .grid-item .enter {
width:80rpx;
height:40rpx;
border: 1rpx solid #C0C0C0;
border-radius:4px;
line-height: 40rpx;
font-size: 24rpx;
color: #aeaeae;
text-align:center;
}

52
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.js

@ -0,0 +1,52 @@
const api = require('../../../../utils/api')
Page({
data: {
gridList: [],
},
onShow () {
},
onLoad (options) {
wx.showLoading({
title: "加载中",
mask: true,
})
this.loadGridList(options.id)
wx.hideLoading()
},
// 加载网格长管辖的网格列表
loadGridList (id) {
//默认写死传榆山街道id
let par = {
pid:id
}
api.getCommunityList(par).then(res => {
if (res.code === 0 && res.msg === 'success') {
const gridList = res.data
if (gridList.length > 0) {
}else{
wx.showToast({
title: '暂无网格信息',
icon: 'none',
duration: 2500
})
return false
}
this.setData({
gridList,
})
}
console.log(res);
}).catch(err => {
console.log(err)
})
},
// 点击进入
changeGrid (e) {
wx.navigateTo({
url: `/pages/index/index?scene=${e.currentTarget.dataset.id}`
})
}
})

4
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "现代榆山",
"usingComponents": {}
}

10
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.wxml

@ -0,0 +1,10 @@
<view class="change-grid">
<view class="grid-list" >
<view class="content">
<view class="grid-item" wx:for="{{gridList}}" wx:item="{{item}}" wx:key="{{item.id}}">
<view class="name">{{item.name}}</view>
<view class="enter" bind:tap="changeGrid" data-id="{{item.id}}">进入</view>
</view>
</view>
</view>
</view>

68
epdc-resident-mp-yushan/subpages/gridArmy/pages/gridEntryTwo/index.wxss

@ -0,0 +1,68 @@
/* subpages/gridArmy/pages/gridEntryTwo/index.wxss */
.change-grid {
width: 100%;
height: 100vh;
background: #f7f7f7;
}
.nav {
height: 94rpx;
background: #ffffff;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav .nav-left image {
width: 32rpx;
height: 32rpx;
margin: 0 9rpx 0 20rpx;
}
.nav .nav-left text {
font-size: 32rpx;
font-weight: bold;
color: #f13d3c;
}
.nav .nav-right {
font-size: 26rpx;
color: #999;
margin-right: 20rpx;
}
.grid-list {
width: 100%;
box-sizing: border-box;
padding: 20rpx;
height: auto;
}
.grid-list .content {
width: 100%;
height: 100%;
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 23rpx;
}
.grid-list .grid-item {
height: 100rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.content > .grid-item + .grid-item {
border-top: 1rpx solid #eaeaea;
}
.grid-list .grid-item .name {
font-size: 34rpx;
color: #333;
}
.grid-list .grid-item .enter {
width:80rpx;
height:40rpx;
border: 1rpx solid #C0C0C0;
border-radius:4px;
line-height: 40rpx;
font-size: 24rpx;
color: #aeaeae;
text-align:center;
}

5
epdc-resident-mp-yushan/utils/api.js

@ -89,6 +89,7 @@ module.exports = {
getHousesalerentinfo,
getmypublishedlist,
deleteHouse,
getCommunityList,
}
function getToken(wxCode) {
@ -643,4 +644,8 @@ function getmypublishedlist(params) {
//删除房屋
function deleteHouse(id){
return fly.post(`custom/housesalerentinfo/resi/delete/${id}`)
}
//获取社区列表
function getCommunityList(id){
return fly.get(`admin/dept/getDeptInfoByPid`,id)
}
Loading…
Cancel
Save