This commit is contained in:
SelfRidicule 2024-02-23 09:56:56 +08:00
parent 4a0909bb7f
commit f2de81dfdb
13 changed files with 471 additions and 413 deletions

View File

@ -67,12 +67,6 @@
"selectedIconPath": "/images/tabbar/home-select.png", "selectedIconPath": "/images/tabbar/home-select.png",
"text": "首页" "text": "首页"
}, },
{
"pagePath": "pages/parkRepair/parkRepair",
"iconPath": "/images/tabbar/openDoor.png",
"selectedIconPath": "/images/tabbar/openDoor.png",
"text": "开门"
},
{ {
"pagePath": "pages/my/my", "pagePath": "pages/my/my",
"iconPath": "/images/tabbar/my.png", "iconPath": "/images/tabbar/my.png",

View File

@ -1,57 +1,61 @@
// miniprogram/pages/applyType/applyType.js // miniprogram/pages/applyType/applyType.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
switch (options.name) { // 页面初始化 options为页面跳转所带来的参数
case "项目入孵": wx.setNavigationBarTitle({
this.setData({ title: options.name
title: options.name,
url: '/pages/applyType/settledIn/settledIn',
image: '/images/apply01.png',
content: '请提前准备好项目入孵申请所需资料,需准备拟注册公司、项目简介、产品简介等相关信息,有商业计划书的需提供商业计划书。'
}) })
break switch (options.name) {
case "企业入驻": case "项目入孵":
this.setData({ this.setData({
title: options.name, title: options.name,
url: '/pages/applyType/settledInApproval/settledInApproval', url: '/pages/applyType/settledIn/settledIn',
image: '/images/apply03.png', image: '/images/apply01.png',
content: '请提前准备好进场申请所需资料,需准备法人身份证、营业执照副本、企业简介,并将相关材料上传,有商业计划书的需提交商业计划书' content: '请提前准备好项目入孵申请所需资料,需准备拟注册公司、项目简介、产品简介等相关信息,有商业计划书的需提供商业计划书。'
})
break
case "企业入驻":
this.setData({
title: options.name,
url: '/pages/applyType/settledInApproval/settledInApproval',
image: '/images/apply03.png',
content: '请提前准备好进场申请所需资料,需准备法人身份证、营业执照副本、企业简介,并将相关材料上传,有商业计划书的需提交商业计划书'
})
break
case "厂房申请":
this.setData({
title: options.name,
url: '/pages/applyType/moveInApply/moveInApply',
image: '/images/apply02.png',
content: '申请厂房请提供公司发展规划、近两年的企业财务状况、员工人数及结构;近两年获得各级政府的项目情况;目前拥有产品/技术情况;近两年知识产权情况及所获认证及荣誉情况等相关资料 (这些是备注在注册/厂房申请“申请理由”处)建议以“上传附件”形式'
})
}
wx.setNavigationBarTitle({
title: options.name,
}) })
break },
case "厂房申请":
this.setData({ /**
title: options.name, * 生命周期函数--监听页面显示
url: '/pages/applyType/moveInApply/moveInApply', */
image: '/images/apply02.png', onShow() {
content: '申请厂房请提供公司发展规划、近两年的企业财务状况、员工人数及结构;近两年获得各级政府的项目情况;目前拥有产品/技术情况;近两年知识产权情况及所获认证及荣誉情况等相关资料 (这些是备注在注册/厂房申请“申请理由”处)建议以“上传附件”形式'
},
navApplyForm() {
wx.navigateTo({
url: this.data.url,
}) })
} }
wx.setNavigationBarTitle({
title: options.name,
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
navApplyForm() {
wx.navigateTo({
url: this.data.url,
})
}
}) })

View File

@ -1,61 +1,67 @@
var app = getApp() var app = getApp()
Page({ Page({
data: { data: {
type: 1, type: 1,
currentTab: 0, currentTab: 0,
labelList: [ labelList: [
'休闲', '休闲',
'免费' '免费'
], ],
homelist: [], homelist: [],
IMG_NAME: app.IMG_NAME IMG_NAME: app.IMG_NAME
}, },
onShow(e) { onLoad(options) {
let that = this // 页面初始化 options为页面跳转所带来的参数
// wx.setStorageSync('token', '535e73059d2f4301b78d05326e1a55d8') wx.setNavigationBarTitle({
app.AjaxRequest('get', { title: options.name
'content-type': 'application/json', })
'Authorization': 'Bearer ' + app.Getopenid() },
}, '/activity/list', {}, onShow(e) {
function (res) { let that = this
if (res.code == 0) { // wx.setStorageSync('token', '535e73059d2f4301b78d05326e1a55d8')
for (var i in res.rows) { app.AjaxRequest('get', {
let day = res.rows[i].actBegin.slice(5, 7) + '月' + res.rows[i].actBegin.slice(8, 10) + '日' 'content-type': 'application/json',
res.rows[i].day = day 'Authorization': 'Bearer ' + app.Getopenid()
} }, '/activity/list', {},
that.setData({ function (res) {
homelist: res.rows if (res.code == 0) {
}) for (var i in res.rows) {
let day = res.rows[i].actBegin.slice(5, 7) + '月' + res.rows[i].actBegin.slice(8, 10) + '日'
res.rows[i].day = day
}
that.setData({
homelist: res.rows
})
}
})
},
//滑动切换
swiperTab: function (e) {
var that = this
that.setData({
currentTab: e.detail.current
})
},
//点击切换
clickTab: function (e) {
var that = this
if (this.data.currentTab === e.target.dataset.current) {
return false
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
navDetail(e) {
let that = this
let index = e.currentTarget.dataset.index
if (wx.getStorageSync('token')) {
wx.navigateTo({
url: '/pages/community/eventDetails/eventDetails?id=' + that.data.homelist[index].id
})
} else {
app.getlogin()
} }
})
},
//滑动切换
swiperTab: function (e) {
var that = this
that.setData({
currentTab: e.detail.current
})
},
//点击切换
clickTab: function (e) {
var that = this
if (this.data.currentTab === e.target.dataset.current) {
return false
} else {
that.setData({
currentTab: e.target.dataset.current
})
} }
},
navDetail(e) {
let that = this
let index = e.currentTarget.dataset.index
if (wx.getStorageSync('token')) {
wx.navigateTo({
url: '/pages/community/eventDetails/eventDetails?id=' + that.data.homelist[index].id
})
} else {
app.getlogin()
}
}
}) })

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"navigationBarTitleText": "活动"
} }

View File

@ -1,71 +1,78 @@
let app = getApp() let app = getApp()
Page({ Page({
data: { data: {
currentTab: 0 currentTab: 0
}, },
onShow() { onLoad(options) {
this.getList() // 页面初始化 options为页面跳转所带来的参数
}, wx.setNavigationBarTitle({
title: options.name
getList(status) {
let that = this
let url = ''
if (that.data.currentTab == 0) {
url = '/suggestion/list'
} else if (that.data.currentTab == 1) {
url = '/suggestion/list?status=1'
} else if (that.data.currentTab == 2) {
url = '/suggestion/list?status=2'
} else if (that.data.currentTab == 3) {
url = '/suggestion/list?status=3'
}
app.AjaxRequest('GET', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, url, {}, function (res) {
if (res.code == 0) {
that.setData({
list: res.data
}) })
} },
})
},
//滑动切换 onShow() {
swiperTab (e) { this.getList()
var that = this },
that.setData({
currentTab: e.detail.current
})
that.getList()
},
//点击切换 getList(status) {
clickTab (e) { let that = this
var that = this let url = ''
if (this.data.currentTab === e.target.dataset.current) { if (that.data.currentTab == 0) {
return false url = '/suggestion/list'
} else { } else if (that.data.currentTab == 1) {
that.setData({ url = '/suggestion/list?status=1'
currentTab: e.target.dataset.current } else if (that.data.currentTab == 2) {
}) url = '/suggestion/list?status=2'
} else if (that.data.currentTab == 3) {
url = '/suggestion/list?status=3'
}
app.AjaxRequest('GET', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, url, {}, function (res) {
if (res.code == 0) {
that.setData({
list: res.data
})
}
})
},
//滑动切换
swiperTab(e) {
var that = this
that.setData({
currentTab: e.detail.current
})
that.getList()
},
//点击切换
clickTab(e) {
var that = this
if (this.data.currentTab === e.target.dataset.current) {
return false
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
scrollToLower() {
},
create() {
wx.navigateTo({
url: '/pages/complaint/newComplaint/newComplaint',
})
},
repairDetail(e) {
wx.navigateTo({
url: '/pages/complaint/complaintDetail/complaintDetail?id=' + e.currentTarget.dataset.id,
})
} }
},
scrollToLower() {
},
create() {
wx.navigateTo({
url: '/pages/complaint/newComplaint/newComplaint',
})
},
repairDetail(e) {
wx.navigateTo({
url: '/pages/complaint/complaintDetail/complaintDetail?id=' + e.currentTarget.dataset.id,
})
}
}) })

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"navigationBarTitleText": "园区建议"
} }

View File

@ -39,52 +39,52 @@ Page({
bannerList: [{ bannerList: [{
bannerImg: '' bannerImg: ''
}], }],
menuList: [{ menuList: [
name: "创业活动", // {
img: "/images/hicon/chuangyehuodong.png", // name: "创业活动",
path: "/pages/community/community" // img: "/images/hicon/chuangyehuodong.png",
}, // path: "/pages/community/community"
{ // },
name: "政策信息", // {
img: "/images/hicon/zhengcexinxi.png", // name: "政策信息",
path: "/pages/notice/notice" // img: "/images/hicon/zhengcexinxi.png",
}, // path: "/pages/notice/notice"
{ // },
name: "党建园地", // {
img: "/images/hicon/zhaozhengce.png", // name: "党建园地",
//img: "/images/hicon/yuanqugonggao.png", // img: "/images/hicon/zhaozhengce.png",
path: "/pages/party/party" // path: "/pages/party/party"
}, // },
{ // {
name: "租办公室", // name: "租办公室",
img: "/images/hicon/zubangongshi.png", // img: "/images/hicon/zubangongshi.png",
path: "/pages/office/office" // path: "/pages/office/office"
}, // },
{ // {
name: "项目入孵", // name: "项目入孵",
img: "/images/hicon/xiangmurufu.png", // img: "/images/hicon/xiangmurufu.png",
path: "/pages/applyType/applyType" // path: "/pages/applyType/applyType"
}, // },
{ // {
name: "企业入驻", // name: "企业入驻",
img: "/images/hicon/qiyeruzhu.png", // img: "/images/hicon/qiyeruzhu.png",
path: "/pages/applyType/applyType" // path: "/pages/applyType/applyType"
}, // },
{ // {
name: "厂房申请", // name: "厂房申请",
img: "/images/hicon/qianrushenqing.png", // img: "/images/hicon/qianrushenqing.png",
path: "/pages/applyType/applyType" // path: "/pages/applyType/applyType"
}, // },
{ // {
name: "园区建议", // name: "园区建议",
img: "/images/hicon/yuanqujianyi.png", // img: "/images/hicon/yuanqujianyi.png",
path: "/pages/complaint/complaint" // path: "/pages/complaint/complaint"
}, // },
{ // {
name: "商业计划书", // name: "商业计划书",
img: "/images/hicon/wenjuandiaocha.png", // img: "/images/hicon/wenjuandiaocha.png",
path: "/pages/outer/outer" // path: "/pages/outer/outer"
}, // },
/* /*
{ {
name: "园区报修", name: "园区报修",
@ -97,6 +97,51 @@ Page({
img: "/profile/static/index/menu-hyyy.png", img: "/profile/static/index/menu-hyyy.png",
path: "" path: ""
}, },
{
name: "预约记录",
img: "/profile/static/index/menu-yyjl.png",
path: ""
},
{
name: "访客邀约",
img: "/profile/static/index/menu-fkyy.png",
path: ""
},
{
name: "远程门禁",
img: "/profile/static/index/menu-ycmj.png",
path: ""
},
{
name: "报修服务",
img: "/profile/static/index/menu-bxfw.png",
path: "/pages/parkRepair/parkRepair"
},
{
name: "投诉建议",
img: "/profile/static/index/menu-tsjy.png",
path: "/pages/complaint/complaint"
},
{
name: "社区活动",
img: "/profile/static/index/menu-sqhd.png",
path: "/pages/community/community"
},
{
name: "政策中心",
img: "/profile/static/index/menu-zczx.png",
path: "/pages/notice/notice"
},
{
name: "入住申请",
img: "/profile/static/index/menu-rzsq.png",
path: "/pages/applyType/applyType"
},
{
name: "展厅预约",
img: "/profile/static/index/menu-ztyy.png",
path: ""
},
], ],
homelist: [], homelist: [],
background: [{ background: [{
@ -171,15 +216,9 @@ Page({
navapply(e) { navapply(e) {
if (wx.getStorageSync('token')) { if (wx.getStorageSync('token')) {
if (e.currentTarget.dataset.path) { if (e.currentTarget.dataset.path) {
if (e.currentTarget.dataset.path == '/pages/parkRepair/parkRepair') { wx.navigateTo({
wx.switchTab({ url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
url: e.currentTarget.dataset.path, })
})
} else {
wx.navigateTo({
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
})
}
} else { } else {
wx.showModal({ wx.showModal({
content: '模块暂未开放,敬请期待', content: '模块暂未开放,敬请期待',

View File

@ -16,7 +16,7 @@
<view class="fixed"> <view class="fixed">
<view class="fixedbox" wx:for='{{menuList}}' wx:key='index' data-path="{{item.path}}" data-name="{{item.name}}" bindtap="navapply"> <view class="fixedbox" wx:for='{{menuList}}' wx:key='index' data-path="{{item.path}}" data-name="{{item.name}}" bindtap="navapply">
<image class="menuImg" src="{{IMG_NAME + item.img}}"></image> <image class="menuImg" src="{{IMG_NAME + item.img}}"></image>
<view style="font-size:26rpx;margin-top:18rpx;">{{item.name}}</view> <view class="menuTitle">{{item.name}}</view>
</view> </view>
</view> </view>

View File

@ -51,7 +51,7 @@ page {
.fixed { .fixed {
background: white; background: white;
padding: 0 30rpx 40rpx 30rpx; padding: 0 30rpx 240rpx 30rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
/* border-radius: 20rpx; */ /* border-radius: 20rpx; */
@ -130,4 +130,10 @@ page {
.menuImg{ .menuImg{
width: 132rpx; width: 132rpx;
height: 134rpx; height: 134rpx;
margin-left: 15rpx;
}
.menuTitle{
font-size: 24rpx;
color: #646466;
} }

View File

@ -1,75 +1,79 @@
var app = getApp() var app = getApp()
Page({ Page({
data: { data: {
DOMAIN_NAME: app.IMG_NAME, DOMAIN_NAME: app.IMG_NAME,
bannerList: [], bannerList: [],
noticeList: [], noticeList: [],
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
interval: 3000, interval: 3000,
duration: 1000, duration: 1000,
}, },
onLoad() { onLoad(options) {
let that = this // 页面初始化 options为页面跳转所带来的参数
app.AjaxRequest('get', { wx.setNavigationBarTitle({
'content-type': 'application/json', title: options.name
'Authorization': 'Bearer ' + app.Getopenid()
}, '/policy/bannerList', {},
function (res) {
if (res.code == 0) {
that.setData({
bannerList: res.data
})
}
})
app.AjaxRequest('get', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, '/policy/list', {},
function (res) {
if (res.code == 0) {
that.setData({
noticeList: res.data
})
}
})
},
//轮播高度自适应——获取图片高度
imgHeight: function (e) {
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
var imgh = e.detail.height; //图片高度
var imgw = e.detail.width; //图片宽度
var swiperH = winWid * imgh / imgw + "px"
this.setData({
Height: swiperH //设置高度
})
},
navdetail(e) {
let that = this
let index = e.currentTarget.dataset.index
app.AjaxRequest('POST', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, '/policy/addHits?id=' + that.data.bannerList[index].id, {}, function (res) {})
wx.navigateTo({
url: '../notice/detail/detail',
success(res) {
res.eventChannel.emit('toHome', {
data: that.data.bannerList[index]
}) })
} let that = this
}) app.AjaxRequest('get', {
}, 'content-type': 'application/json',
navdetaillist(e) { 'Authorization': 'Bearer ' + app.Getopenid()
let that = this }, '/policy/bannerList', {},
let index = e.currentTarget.dataset.index function (res) {
wx.navigateTo({ if (res.code == 0) {
url: '../notice/detail/detail', that.setData({
success(res) { bannerList: res.data
res.eventChannel.emit('toHome', { })
data: that.data.noticeList[index] }
})
app.AjaxRequest('get', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, '/policy/list', {},
function (res) {
if (res.code == 0) {
that.setData({
noticeList: res.data
})
}
})
},
//轮播高度自适应——获取图片高度
imgHeight: function (e) {
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
var imgh = e.detail.height; //图片高度
var imgw = e.detail.width; //图片宽度
var swiperH = winWid * imgh / imgw + "px"
this.setData({
Height: swiperH //设置高度
}) })
} },
}) navdetail(e) {
} let that = this
let index = e.currentTarget.dataset.index
app.AjaxRequest('POST', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, '/policy/addHits?id=' + that.data.bannerList[index].id, {}, function (res) {})
wx.navigateTo({
url: '../notice/detail/detail',
success(res) {
res.eventChannel.emit('toHome', {
data: that.data.bannerList[index]
})
}
})
},
navdetaillist(e) {
let that = this
let index = e.currentTarget.dataset.index
wx.navigateTo({
url: '../notice/detail/detail',
success(res) {
res.eventChannel.emit('toHome', {
data: that.data.noticeList[index]
})
}
})
}
}) })

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"navigationBarTitleText": "园区公告"
} }

View File

@ -1,113 +1,115 @@
let app = getApp() let app = getApp()
Page({ Page({
data: { data: {
currentTab: 0, currentTab: 0,
repairList: [] repairList: []
}, },
onLoad: function (options) { onLoad(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
wx.setNavigationBarTitle({
title: options.name
})
},
}, onShow() {
switch (this.data.currentTab) {
case 0:
this.getList()
break
case 1:
this.getList('PENDING_ASSIGN')
break
case 2:
this.getList('PENDING_PROCESS')
break
case 3:
this.getList('COMPLETED')
break
case 4:
this.getList('SCORE')
break
case 5:
this.getList('CANCELED')
}
},
onShow() { getList(status) {
switch (this.data.currentTab) { let that = this
case 0: let workCondition = ''
this.getList() that.data.repairList = []
break if (status) {
case 1: workCondition = '/repair/list?status=' + status
this.getList('PENDING_ASSIGN') } else {
break workCondition = '/repair/list'
case 2: }
this.getList('PENDING_PROCESS') app.AjaxRequest('get', {
break 'content-type': 'application/json',
case 3: 'Authorization': 'Bearer ' + app.Getopenid()
this.getList('COMPLETED') }, workCondition, {}, function (res) {
break that.setData({
case 4: repairList: res.rows
this.getList('SCORE') })
break })
case 5: },
this.getList('CANCELED')
//滑动切换
swiperTab: function (e) {
var that = this
that.setData({
currentTab: e.detail.current
})
switch (e.detail.current) {
case 0:
this.getList()
break
case 1:
this.getList('PENDING_ASSIGN')
break
case 2:
this.getList('PENDING_PROCESS')
break
case 3:
this.getList('COMPLETED')
break
case 4:
this.getList('SCORE')
break
case 5:
this.getList('CANCELED')
}
},
//点击切换
clickTab: function (e) {
var that = this
console.log(e.target.dataset.current)
if (this.data.currentTab === e.target.dataset.current) {
return false
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
scrollToLower() {
},
repairapply() {
wx.navigateTo({
url: '../parkRepair/repairInApply/repairInApply',
})
},
repairDetail(e) {
wx.navigateTo({
url: '../parkRepair/repairDetail/repairDetail?id=' + e.currentTarget.dataset.id,
})
},
navEvaluate(e) {
wx.navigateTo({
url: '../parkRepair/evaluate/evaluate?id=' + e.currentTarget.dataset.id,
})
} }
},
getList(status) {
let that = this
let workCondition = ''
that.data.repairList = []
if (status) {
workCondition = '/repair/list?status=' + status
} else {
workCondition = '/repair/list'
}
app.AjaxRequest('get', {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.Getopenid()
}, workCondition, {}, function (res) {
that.setData({
repairList: res.rows
})
})
},
//滑动切换
swiperTab: function (e) {
var that = this
that.setData({
currentTab: e.detail.current
})
switch (e.detail.current) {
case 0:
this.getList()
break
case 1:
this.getList('PENDING_ASSIGN')
break
case 2:
this.getList('PENDING_PROCESS')
break
case 3:
this.getList('COMPLETED')
break
case 4:
this.getList('SCORE')
break
case 5:
this.getList('CANCELED')
}
},
//点击切换
clickTab: function (e) {
var that = this
console.log(e.target.dataset.current)
if (this.data.currentTab === e.target.dataset.current) {
return false
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
scrollToLower() {
},
repairapply() {
wx.navigateTo({
url: '../parkRepair/repairInApply/repairInApply',
})
},
repairDetail(e) {
wx.navigateTo({
url: '../parkRepair/repairDetail/repairDetail?id=' + e.currentTarget.dataset.id,
})
},
navEvaluate(e) {
wx.navigateTo({
url: '../parkRepair/evaluate/evaluate?id=' + e.currentTarget.dataset.id,
})
}
}) })

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"navigationBarTitleText": "园区报修"
} }