mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 07:19:37 +08:00
1
This commit is contained in:
parent
4a0909bb7f
commit
f2de81dfdb
@ -67,12 +67,6 @@
|
||||
"selectedIconPath": "/images/tabbar/home-select.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/parkRepair/parkRepair",
|
||||
"iconPath": "/images/tabbar/openDoor.png",
|
||||
"selectedIconPath": "/images/tabbar/openDoor.png",
|
||||
"text": "开门"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my/my",
|
||||
"iconPath": "/images/tabbar/my.png",
|
||||
|
@ -1,57 +1,61 @@
|
||||
// miniprogram/pages/applyType/applyType.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
switch (options.name) {
|
||||
case "项目入孵":
|
||||
this.setData({
|
||||
title: options.name,
|
||||
url: '/pages/applyType/settledIn/settledIn',
|
||||
image: '/images/apply01.png',
|
||||
content: '请提前准备好项目入孵申请所需资料,需准备拟注册公司、项目简介、产品简介等相关信息,有商业计划书的需提供商业计划书。'
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name
|
||||
})
|
||||
break
|
||||
case "企业入驻":
|
||||
this.setData({
|
||||
title: options.name,
|
||||
url: '/pages/applyType/settledInApproval/settledInApproval',
|
||||
image: '/images/apply03.png',
|
||||
content: '请提前准备好进场申请所需资料,需准备法人身份证、营业执照副本、企业简介,并将相关材料上传,有商业计划书的需提交商业计划书'
|
||||
switch (options.name) {
|
||||
case "项目入孵":
|
||||
this.setData({
|
||||
title: options.name,
|
||||
url: '/pages/applyType/settledIn/settledIn',
|
||||
image: '/images/apply01.png',
|
||||
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',
|
||||
content: '申请厂房请提供公司发展规划、近两年的企业财务状况、员工人数及结构;近两年获得各级政府的项目情况;目前拥有产品/技术情况;近两年知识产权情况及所获认证及荣誉情况等相关资料 (这些是备注在注册/厂房申请“申请理由”处)建议以“上传附件”形式'
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
navApplyForm() {
|
||||
wx.navigateTo({
|
||||
url: this.data.url,
|
||||
})
|
||||
}
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
navApplyForm() {
|
||||
wx.navigateTo({
|
||||
url: this.data.url,
|
||||
})
|
||||
}
|
||||
})
|
@ -1,61 +1,67 @@
|
||||
var app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
type: 1,
|
||||
currentTab: 0,
|
||||
labelList: [
|
||||
'休闲',
|
||||
'免费'
|
||||
],
|
||||
homelist: [],
|
||||
IMG_NAME: app.IMG_NAME
|
||||
},
|
||||
onShow(e) {
|
||||
let that = this
|
||||
// wx.setStorageSync('token', '535e73059d2f4301b78d05326e1a55d8')
|
||||
app.AjaxRequest('get', {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + app.Getopenid()
|
||||
}, '/activity/list', {},
|
||||
function (res) {
|
||||
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
|
||||
})
|
||||
data: {
|
||||
type: 1,
|
||||
currentTab: 0,
|
||||
labelList: [
|
||||
'休闲',
|
||||
'免费'
|
||||
],
|
||||
homelist: [],
|
||||
IMG_NAME: app.IMG_NAME
|
||||
},
|
||||
onLoad(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name
|
||||
})
|
||||
},
|
||||
onShow(e) {
|
||||
let that = this
|
||||
// wx.setStorageSync('token', '535e73059d2f4301b78d05326e1a55d8')
|
||||
app.AjaxRequest('get', {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + app.Getopenid()
|
||||
}, '/activity/list', {},
|
||||
function (res) {
|
||||
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()
|
||||
}
|
||||
}
|
||||
})
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "活动"
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,71 +1,78 @@
|
||||
let app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
currentTab: 0
|
||||
},
|
||||
data: {
|
||||
currentTab: 0
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
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
|
||||
onLoad(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//滑动切换
|
||||
swiperTab (e) {
|
||||
var that = this
|
||||
that.setData({
|
||||
currentTab: e.detail.current
|
||||
})
|
||||
that.getList()
|
||||
},
|
||||
onShow() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
//点击切换
|
||||
clickTab (e) {
|
||||
var that = this
|
||||
if (this.data.currentTab === e.target.dataset.current) {
|
||||
return false
|
||||
} else {
|
||||
that.setData({
|
||||
currentTab: e.target.dataset.current
|
||||
})
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//滑动切换
|
||||
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,
|
||||
})
|
||||
}
|
||||
})
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "园区建议"
|
||||
"usingComponents": {}
|
||||
}
|
@ -39,52 +39,52 @@ Page({
|
||||
bannerList: [{
|
||||
bannerImg: ''
|
||||
}],
|
||||
menuList: [{
|
||||
name: "创业活动",
|
||||
img: "/images/hicon/chuangyehuodong.png",
|
||||
path: "/pages/community/community"
|
||||
},
|
||||
{
|
||||
name: "政策信息",
|
||||
img: "/images/hicon/zhengcexinxi.png",
|
||||
path: "/pages/notice/notice"
|
||||
},
|
||||
{
|
||||
name: "党建园地",
|
||||
img: "/images/hicon/zhaozhengce.png",
|
||||
//img: "/images/hicon/yuanqugonggao.png",
|
||||
path: "/pages/party/party"
|
||||
},
|
||||
{
|
||||
name: "租办公室",
|
||||
img: "/images/hicon/zubangongshi.png",
|
||||
path: "/pages/office/office"
|
||||
},
|
||||
{
|
||||
name: "项目入孵",
|
||||
img: "/images/hicon/xiangmurufu.png",
|
||||
path: "/pages/applyType/applyType"
|
||||
},
|
||||
{
|
||||
name: "企业入驻",
|
||||
img: "/images/hicon/qiyeruzhu.png",
|
||||
path: "/pages/applyType/applyType"
|
||||
},
|
||||
{
|
||||
name: "厂房申请",
|
||||
img: "/images/hicon/qianrushenqing.png",
|
||||
path: "/pages/applyType/applyType"
|
||||
},
|
||||
{
|
||||
name: "园区建议",
|
||||
img: "/images/hicon/yuanqujianyi.png",
|
||||
path: "/pages/complaint/complaint"
|
||||
},
|
||||
{
|
||||
name: "商业计划书",
|
||||
img: "/images/hicon/wenjuandiaocha.png",
|
||||
path: "/pages/outer/outer"
|
||||
},
|
||||
menuList: [
|
||||
// {
|
||||
// name: "创业活动",
|
||||
// img: "/images/hicon/chuangyehuodong.png",
|
||||
// path: "/pages/community/community"
|
||||
// },
|
||||
// {
|
||||
// name: "政策信息",
|
||||
// img: "/images/hicon/zhengcexinxi.png",
|
||||
// path: "/pages/notice/notice"
|
||||
// },
|
||||
// {
|
||||
// name: "党建园地",
|
||||
// img: "/images/hicon/zhaozhengce.png",
|
||||
// path: "/pages/party/party"
|
||||
// },
|
||||
// {
|
||||
// name: "租办公室",
|
||||
// img: "/images/hicon/zubangongshi.png",
|
||||
// path: "/pages/office/office"
|
||||
// },
|
||||
// {
|
||||
// name: "项目入孵",
|
||||
// img: "/images/hicon/xiangmurufu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "企业入驻",
|
||||
// img: "/images/hicon/qiyeruzhu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "厂房申请",
|
||||
// img: "/images/hicon/qianrushenqing.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "园区建议",
|
||||
// img: "/images/hicon/yuanqujianyi.png",
|
||||
// path: "/pages/complaint/complaint"
|
||||
// },
|
||||
// {
|
||||
// name: "商业计划书",
|
||||
// img: "/images/hicon/wenjuandiaocha.png",
|
||||
// path: "/pages/outer/outer"
|
||||
// },
|
||||
/*
|
||||
{
|
||||
name: "园区报修",
|
||||
@ -97,6 +97,51 @@ Page({
|
||||
img: "/profile/static/index/menu-hyyy.png",
|
||||
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: [],
|
||||
background: [{
|
||||
@ -171,15 +216,9 @@ Page({
|
||||
navapply(e) {
|
||||
if (wx.getStorageSync('token')) {
|
||||
if (e.currentTarget.dataset.path) {
|
||||
if (e.currentTarget.dataset.path == '/pages/parkRepair/parkRepair') {
|
||||
wx.switchTab({
|
||||
url: e.currentTarget.dataset.path,
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
|
||||
})
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
content: '模块暂未开放,敬请期待',
|
||||
|
@ -16,7 +16,7 @@
|
||||
<view class="fixed">
|
||||
<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>
|
||||
<view style="font-size:26rpx;margin-top:18rpx;">{{item.name}}</view>
|
||||
<view class="menuTitle">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -51,7 +51,7 @@ page {
|
||||
|
||||
.fixed {
|
||||
background: white;
|
||||
padding: 0 30rpx 40rpx 30rpx;
|
||||
padding: 0 30rpx 240rpx 30rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* border-radius: 20rpx; */
|
||||
@ -130,4 +130,10 @@ page {
|
||||
.menuImg{
|
||||
width: 132rpx;
|
||||
height: 134rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.menuTitle{
|
||||
font-size: 24rpx;
|
||||
color: #646466;
|
||||
}
|
@ -1,75 +1,79 @@
|
||||
var app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
DOMAIN_NAME: app.IMG_NAME,
|
||||
bannerList: [],
|
||||
noticeList: [],
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 1000,
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
app.AjaxRequest('get', {
|
||||
'content-type': 'application/json',
|
||||
'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]
|
||||
data: {
|
||||
DOMAIN_NAME: app.IMG_NAME,
|
||||
bannerList: [],
|
||||
noticeList: [],
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 1000,
|
||||
},
|
||||
onLoad(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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]
|
||||
let that = this
|
||||
app.AjaxRequest('get', {
|
||||
'content-type': 'application/json',
|
||||
'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]
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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]
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "园区公告"
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,113 +1,115 @@
|
||||
let app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
currentTab: 0,
|
||||
repairList: []
|
||||
},
|
||||
data: {
|
||||
currentTab: 0,
|
||||
repairList: []
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
onLoad(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() {
|
||||
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')
|
||||
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,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
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,
|
||||
})
|
||||
}
|
||||
})
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "园区报修"
|
||||
"usingComponents": {}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user