From ccf1ec2bbbba45e86a8b2e87ad06a841adbd0ea6 Mon Sep 17 00:00:00 2001
From: chenze <1824191732@qq.com>
Date: Fri, 27 Sep 2024 11:24:58 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=AF=B9=E5=BA=94?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BA=86=E6=94=BF?=
=?UTF-8?q?=E7=AD=96=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/api/meeting/meetingRoom.js | 8 +
miniprogram/app.js | 8 +-
miniprogram/app.json | 3 +-
miniprogram/pages/index/index.js | 5 +
.../meeting/meetingPolicy/meetingPolicy.js | 96 ++++++++++++
.../meeting/meetingPolicy/meetingPolicy.json | 4 +
.../meeting/meetingPolicy/meetingPolicy.wxml | 6 +
.../meeting/meetingPolicy/meetingPolicy.wxss | 14 ++
.../meetingBooked/meetingBooked.js | 4 +-
.../pages/meeting/meetingRoom/meetingRoom.js | 18 ++-
.../meeting/meetingRoom/meetingRoom.wxml | 8 +-
.../meeting/meetingRoom/meetingRoom.wxss | 8 +
.../meetingRecord/meetingRecord.js | 147 +++++++++++++-----
.../meetingRecord/meetingRecord.json | 3 +-
.../meetingRecord/meetingRecord.wxml | 7 +-
.../meetingRecord/meetingRecord.wxss | 5 +
miniprogram/utils/util.js | 2 +-
project.config.json | 7 +-
project.private.config.json | 2 +-
19 files changed, 298 insertions(+), 57 deletions(-)
create mode 100644 miniprogram/pages/meeting/meetingPolicy/meetingPolicy.js
create mode 100644 miniprogram/pages/meeting/meetingPolicy/meetingPolicy.json
create mode 100644 miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxml
create mode 100644 miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxss
diff --git a/miniprogram/api/meeting/meetingRoom.js b/miniprogram/api/meeting/meetingRoom.js
index 4661cf0..ee4a0ab 100644
--- a/miniprogram/api/meeting/meetingRoom.js
+++ b/miniprogram/api/meeting/meetingRoom.js
@@ -180,3 +180,11 @@ export function saveChangyangMeetingRecordRq(data) {
data
});
}
+
+//获取政策
+export function policyById(id) {
+ return request({
+ url: '/api/visitor/policyById/'+id,
+ method: "get"
+ });
+}
diff --git a/miniprogram/app.js b/miniprogram/app.js
index 18e09e5..1aec17f 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -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', //接口域名
diff --git a/miniprogram/app.json b/miniprogram/app.json
index 7de72a7..01773c0 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -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",
diff --git a/miniprogram/pages/index/index.js b/miniprogram/pages/index/index.js
index 42c0933..c452e20 100644
--- a/miniprogram/pages/index/index.js
+++ b/miniprogram/pages/index/index.js
@@ -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",
diff --git a/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.js b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.js
new file mode 100644
index 0000000..6e568b3
--- /dev/null
+++ b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.js
@@ -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() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.json b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.json
new file mode 100644
index 0000000..28552da
--- /dev/null
+++ b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "规章制度"
+}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxml b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxml
new file mode 100644
index 0000000..ca10a7a
--- /dev/null
+++ b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxss b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxss
new file mode 100644
index 0000000..cdc02fc
--- /dev/null
+++ b/miniprogram/pages/meeting/meetingPolicy/meetingPolicy.wxss
@@ -0,0 +1,14 @@
+.policy{
+ height: 100%;
+ width: 100%;
+
+}
+.policy .content{
+ font-size: 35rpx;
+ margin: 10rpx;
+}
+
+.content .img{
+ width: 100%;
+ height: 400rpx;
+}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js
index 8f37efb..4834195 100644
--- a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js
+++ b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js
@@ -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
diff --git a/miniprogram/pages/meeting/meetingRoom/meetingRoom.js b/miniprogram/pages/meeting/meetingRoom/meetingRoom.js
index 18bf16f..3ef1f83 100644
--- a/miniprogram/pages/meeting/meetingRoom/meetingRoom.js
+++ b/miniprogram/pages/meeting/meetingRoom/meetingRoom.js
@@ -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;
diff --git a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml
index d0e371f..d820f16 100644
--- a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml
+++ b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml
@@ -50,9 +50,15 @@
-->
-
+
+
+ 会议室须知
+
+
+
diff --git a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxss b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxss
index 574bb90..0134a8e 100644
--- a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxss
+++ b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxss
@@ -146,3 +146,11 @@
height: 500rpx;
}
+.policy{
+ margin: 50rpx 20rpx;
+}
+.policy .content{
+ font-size: 30rpx;
+ margin: 20rpx;
+}
+
diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js
index 08f067b..42de17a 100644
--- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js
+++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js
@@ -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,49 +305,101 @@ Page({
tabTitle: event.detail.title
})
},
+ //取消订单
+ onClose() {
+ this.setData({ show: false,cancelResaon:'' });
+ },
+ cancleResaonValue(e){
+ this.cancelResaon = e.detail
- // 取消订单
+ },
+ //确定取消
+ cancelRecord(e) {
+ let _this = this;
+ // 参数校验
+ // 主题
+
+ console.log(_this.cancelResaon);
+ if (_this.cancelResaon == null || _this.cancelResaon =='') {
+ app.vantNotifyErr(Notify, '请输入取消原因!')
+ return false;
+ }
+ cancelOrderRq({
+ id:_this.orderId,
+ cancelResaon:_this.cancelResaon
+ }).then(res => {
+ console.log('cancelOrderRq', res);
+ if (res.code == 0) {
+ // 刷新预约数据
+ _this.setData({
+ reservationPageNum: 1,
+ reservationDataList: [],
+ reservationIsDataAll: false,
+ })
+ _this.getDataList()
+ this.onClose()
+ // 危险通知
+ Notify({
+ type: 'success',
+ message: "取消预约成功"
+ });
+ } else {
+ // 危险通知
+ Notify({
+ type: 'danger',
+ message: res.msg
+ });
+ }
+ resolve(true);
+ })
+ },
+ // 打开弹出框
cancelOrder(e) {
console.log('cancelOrder', e);
- 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,
- });
+ 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,
+ // });
},
// 开门
diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json
index 81a5563..3bd3130 100644
--- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json
+++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json
@@ -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
diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml
index 67da073..53b956b 100644
--- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml
+++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml
@@ -61,7 +61,12 @@
-
+
+
+
+
+
+
diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxss b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxss
index dd20e47..534b777 100644
--- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxss
+++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxss
@@ -137,4 +137,9 @@
.loadAllLine {
margin-top: 80rpx;
+}
+
+.van-cell{
+ margin-top: 30rpx;
+ margin-bottom: 30rpx;
}
\ No newline at end of file
diff --git a/miniprogram/utils/util.js b/miniprogram/utils/util.js
index 4c6b787..00f9f5a 100644
--- a/miniprogram/utils/util.js
+++ b/miniprogram/utils/util.js
@@ -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;
}
diff --git a/project.config.json b/project.config.json
index 3de6107..e51aaa9 100644
--- a/project.config.json
+++ b/project.config.json
@@ -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",
diff --git a/project.private.config.json b/project.private.config.json
index 36457dc..3856bcd 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -1,7 +1,7 @@
{
"setting": {
"compileHotReLoad": true,
- "urlCheck": false
+ "urlCheck": true
},
"condition": {
"miniprogram": {