修改了对应问题,新增了政策模块

This commit is contained in:
chenze 2024-09-27 11:24:58 +08:00
parent b53c39bab1
commit ccf1ec2bbb
19 changed files with 298 additions and 57 deletions

View File

@ -180,3 +180,11 @@ export function saveChangyangMeetingRecordRq(data) {
data
});
}
//获取政策
export function policyById(id) {
return request({
url: '/api/visitor/policyById/'+id,
method: "get"
});
}

View File

@ -6,10 +6,10 @@ App({
parkId: '26', // 园区id
parkName: '长阳智会云控', // 园区名称
// 本地测试
// DOMAIN_NAME_PREFIX: ' http://192.168.0.30',
// DOMAIN_NAME: ' http://192.168.0.30:9227', //接口域名
// IMG_NAME: ' http://192.168.0.30:9227',
// socketUrl: 'wss://192.168.0.30:9227/changyang-office/websocket-server',
// DOMAIN_NAME_PREFIX: ' http://192.168.1.47',
// DOMAIN_NAME: ' http://192.168.1.47:9227', //接口域名
// IMG_NAME: ' http://192.168.1.47:9227',
// socketUrl: 'wss://192.168.1.47:9227/changyang-office/websocket-server',
// 生产
DOMAIN_NAME_PREFIX: 'https://www.chuangzhikj.com',
DOMAIN_NAME: 'https://www.chuangzhikj.com/saas-ics', //接口域名

View File

@ -75,7 +75,8 @@
"pages/meeting/meetingRoom/meetingService/meetingService",
"pages/meeting/meetingRoom/meetingPerson/meetingPerson",
"pages/smartDevice/region/region",
"pages/smartDevice/room/room"
"pages/smartDevice/room/room",
"pages/meeting/meetingPolicy/meetingPolicy"
],
"window": {
"backgroundTextStyle": "light",

View File

@ -128,6 +128,11 @@ Page({
img: "/profile/static/index/menu-ycmj.png",
path: "/pages/smartDevice/region/region"
},
{
name: "会议政策",
img: "/profile/static/index/zhengce.png",
path: "/pages/meeting/meetingPolicy/meetingPolicy"
},
// {
// name: "远程门禁",
// img: "/profile/static/index/menu-ycmj.png",

View File

@ -0,0 +1,96 @@
// pages/meeting/meetingPolicy/meetingPolicy.js
const app = getApp()
import {
policyById
} from "../../../api/meeting/meetingRoom.js"
Page({
/**
* 页面的初始数据
*/
data: {
policy: {},
IMG_NAME: app.IMG_NAME,
policyImages:[
"/profile/static/shanghai_changyang/policy/policy0.jpg",
"/profile/static/shanghai_changyang/policy/policy1.jpg",
"/profile/static/shanghai_changyang/policy/policy2.jpg",
"/profile/static/shanghai_changyang/policy/policy3.jpg",
"/profile/static/shanghai_changyang/policy/policy4.jpg",
"/profile/static/shanghai_changyang/policy/policy5.jpg",
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this
policyById(15).then(res => {
_this.setData({
policy: res.data
})
})
},
clickImg(e){
console.log(e);
var index = e.currentTarget.dataset.index
console.log(this.data.IMG_NAME);
let img= this.data.policyImages.map(item =>this.data.IMG_NAME +item)
//所有图片
wx.previewImage({
//当前显示图片
current: img[index],
//所有图片
urls: img
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "规章制度"
}

View File

@ -0,0 +1,6 @@
<view class="policy">
<view class="content">
<rich-text class="richText" nodes="{{policy.content}}"></rich-text>
<image wx:for="{{policyImages}}" wx:key="index" data-index="{{index}}" class="img" src="{{IMG_NAME + item}}" mode="aspectFill" bindtap='clickImg'></image>
</view>
</view>

View File

@ -0,0 +1,14 @@
.policy{
height: 100%;
width: 100%;
}
.policy .content{
font-size: 35rpx;
margin: 10rpx;
}
.content .img{
width: 100%;
height: 400rpx;
}

View File

@ -176,8 +176,8 @@ Page({
item.reservations = item.reservations.map(record => {
record.startTime = record.startTime.substring(11)
record.endDate = record.endDate.substring(11)
record.userName = record.userName.substring(0,1) + "某"
record.phone = record.phone.substring(0,3) + "****" + record.phone.substring(7,record.phone.length)
// record.userName = record.userName.substring(0,1) + "某"
// record.phone = record.phone.substring(0,3) + "****" + record.phone.substring(7,record.phone.length)
return record;
})
return item

View File

@ -1,7 +1,8 @@
const app = getApp()
import {
meetingRoomDetailRq,
selectCoordinateRq
selectCoordinateRq,
policyById
} from "../../../api/meeting/meetingRoom.js"
@ -15,7 +16,8 @@ Page({
meetingRoomId: null,
detail: {},
bannerList: [],
mapData: {}
mapData: {},
policy:{}
},
/**
@ -44,8 +46,20 @@ Page({
})
// 获取地址信息
_this.getAddress()
_this.getPolicy()
},
//获取政策信息
getPolicy(){
let _this = this;
policyById(14).then(res =>{
_this.setData({
policy:res.data
})
})
},
// 获取地址信息
getAddress() {
let _this = this;

View File

@ -50,9 +50,15 @@
</view> -->
<!-- 地图 -->
<view class="mapView">
<!-- <view class="mapView">
<view class="leftLineTitle">会议地点</view>
<map class="myMap" latitude="{{mapData.latitude}}" longitude="{{mapData.longitude}}" markers="{{mapData.markers}}" show-location bindtap="openMap"></map>
</view> -->
<view class="policy">
<view class="leftLineTitle">会议室须知</view>
<view class="content">
<rich-text nodes="{{policy.content}}"></rich-text>
</view>
</view>
<!-- 预约 -->

View File

@ -146,3 +146,11 @@
height: 500rpx;
}
.policy{
margin: 50rpx 20rpx;
}
.policy .content{
font-size: 30rpx;
margin: 20rpx;
}

View File

@ -3,6 +3,7 @@ const app = getApp()
import Dialog from '@vant/weapp/dialog/dialog';
import Notify from '@vant/weapp/notify/notify';
import {
selfFormatTimeYMD,
selfFormatTimeHM
@ -26,6 +27,7 @@ Page({
data: {
IMG_NAME: app.IMG_NAME,
userData: null,
show: false,
dataChange: false,
tabTitle: '预约记录',
// 预约记录参数
@ -38,6 +40,19 @@ Page({
participatePageSize: 10,
participateDataList: [],
participateIsDataAll: false,
//取消原因
cancelResaon: null,
msg:null,
orderId: '',
onBeforeClose(action) {
return new Promise(resolve => {
if (action === 'confirm') {
resolve(false);
} else {
resolve(true);
}
});
}
},
/**
@ -290,19 +305,28 @@ Page({
tabTitle: event.detail.title
})
},
//取消订单
cancelOrder(e) {
console.log('cancelOrder', e);
onClose() {
this.setData({ show: false,cancelResaon:'' });
},
cancleResaonValue(e){
this.cancelResaon = e.detail
},
//确定取消
cancelRecord(e) {
let _this = this;
let id = e.currentTarget.dataset.id
const beforeClose = (action) => {
console.log('action', action);
return new Promise((resolve) => {
if (action === 'confirm') {
// 参数校验
// 主题
console.log(_this.cancelResaon);
if (_this.cancelResaon == null || _this.cancelResaon =='') {
app.vantNotifyErr(Notify, '请输入取消原因!')
return false;
}
cancelOrderRq({
id,
cancelResaon: ""
id:_this.orderId,
cancelResaon:_this.cancelResaon
}).then(res => {
console.log('cancelOrderRq', res);
if (res.code == 0) {
@ -313,6 +337,12 @@ Page({
reservationIsDataAll: false,
})
_this.getDataList()
this.onClose()
// 危险通知
Notify({
type: 'success',
message: "取消预约成功"
});
} else {
// 危险通知
Notify({
@ -322,17 +352,54 @@ Page({
}
resolve(true);
})
} else {
// 拦截取消操作
resolve(true);
}
});
}
Dialog.confirm({
title: '提示',
message: '是否取消预约!',
beforeClose,
});
},
// 打开弹出框
cancelOrder(e) {
console.log('cancelOrder', e);
this.orderId = e.currentTarget.dataset.id
this.setData({
show: true,
})
console.log(this.orderId);
// let _this = this;
// let id = e.currentTarget.dataset.id
// const beforeClose = (action) => {
// console.log('action', action);
// return new Promise((resolve) => {
// if (action === 'confirm') {
// cancelOrderRq({
// id,
// cancelResaon: ""
// }).then(res => {
// console.log('cancelOrderRq', res);
// if (res.code == 0) {
// // 刷新预约数据
// _this.setData({
// reservationPageNum: 1,
// reservationDataList: [],
// reservationIsDataAll: false,
// })
// _this.getDataList()
// } else {
// // 危险通知
// Notify({
// type: 'danger',
// message: res.msg
// });
// }
// resolve(true);
// })
// } else {
// // 拦截取消操作
// resolve(true);
// }
// });
// }
// Dialog.confirm({
// title: '提示',
// message: '是否取消预约!',
// beforeClose,
// });
},
// 开门

View File

@ -4,7 +4,8 @@
"van-tabs": "@vant/weapp/tabs/index",
"van-divider": "@vant/weapp/divider/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-notify": "@vant/weapp/notify/index"
"van-notify": "@vant/weapp/notify/index",
"van-field": "@vant/weapp/field/index"
},
"navigationBarTitleText": "会议预约记录",
"onReachBottomDistance": 100

View File

@ -61,7 +61,12 @@
</van-tabs>
<!-- 提示框 -->
<van-dialog id="van-dialog" />
<!-- <van-dialog id="van-dialog" /> -->
<!-- bind:confirm="cancelRecord" bind:close="onClose" -->
<van-dialog use-slot title="取消预约" show="{{ show }}" show-cancel-button beforeClose="{{onBeforeClose}}" bind:confirm="cancelRecord" bind:close="onClose" >
<van-field value="{{cancelResaon}}" label="取消原因" placeholder="请输入取消原因" bind:change="cancleResaonValue" />
</van-dialog>
<!-- 提示框 -->
<van-notify id="van-notify" />

View File

@ -138,3 +138,8 @@
.loadAllLine {
margin-top: 80rpx;
}
.van-cell{
margin-top: 30rpx;
margin-bottom: 30rpx;
}

View File

@ -177,7 +177,7 @@ function twoTimeInterval(startTime, endTime) {
let returnVal =
((days == 0) ? "" : days + "天") +
((hours == 0) ? "" : hours + "时") +
((minutes == 0) ? "" : minutes + "分")
((minutes == 0) ? "" : minutes + "分")
// + ((seconds == 0) ? "" : seconds + "秒");
return returnVal;
}

View File

@ -1,5 +1,5 @@
{
"description": "项目配置文件",
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
@ -25,7 +25,7 @@
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": false,
"useMultiFrameRuntime": true,
"useApiHook": false,
"useApiHostProcess": false,
"babelSetting": {
@ -48,7 +48,8 @@
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"condition": false
"condition": false,
"useStaticServer": true
},
"compileType": "miniprogram",
"libVersion": "3.4.0",

View File

@ -1,7 +1,7 @@
{
"setting": {
"compileHotReLoad": true,
"urlCheck": false
"urlCheck": true
},
"condition": {
"miniprogram": {