调试接口

修改为测试环境,调试接口
This commit is contained in:
unknown 2024-09-24 17:36:03 +08:00
parent 600d607e2b
commit 5dc16e9566
8 changed files with 63 additions and 24 deletions

View File

@ -19,3 +19,11 @@ export function registerPhone(data) {
data data
}); });
} }
export function depLogin(data) {
return request({
url: '/app/mr/login',
method: "post",
data
});
}

View File

@ -10,9 +10,12 @@ App({
// DOMAIN_NAME: 'http://192.168.0.30:9227', //接口域名 // DOMAIN_NAME: 'http://192.168.0.30:9227', //接口域名
// IMG_NAME: 'http://192.168.0.30:9227', // IMG_NAME: 'http://192.168.0.30:9227',
// 生产 // 生产
DOMAIN_NAME_PREFIX: 'https://baoxiu.jsgdha.com/shoot-hand', // DOMAIN_NAME_PREFIX: 'https://baoxiu.jsgdha.com/shoot-hand',
DOMAIN_NAME: 'https://baoxiu.jsgdha.com/shoot-hand', //接口域名 // DOMAIN_NAME: 'https://baoxiu.jsgdha.com/shoot-hand', //接口域名
IMG_NAME: 'https://baoxiu.jsgdha.com/shoot-hand', // IMG_NAME: 'https://baoxiu.jsgdha.com/shoot-hand',
DOMAIN_NAME_PREFIX: 'https://company.haxy.com.cn:4443/shoot-hand',
DOMAIN_NAME: 'https://company.haxy.com.cn:4443/shoot-hand', //接口域名
IMG_NAME: 'https://company.haxy.com.cn:4443/shoot-hand',
globals: { globals: {
refreshMyPages: false, refreshMyPages: false,
homedata: {}, homedata: {},

View File

@ -1,7 +1,9 @@
const app = getApp() const app = getApp()
import Notify from '@vant/weapp/notify/notify'; import Notify from '@vant/weapp/notify/notify';
import {
depLogin
} from "../../../api/login/login.js"
Page({ Page({
/** /**
@ -55,6 +57,7 @@ Page({
showLogin: false, // 是否展示弹出层 showLogin: false, // 是否展示弹出层
username: '', // 用户名 username: '', // 用户名
pwd: '', // 登录密码 pwd: '', // 登录密码
depName: '', // 登录单位
beforeClose(action) { beforeClose(action) {
return new Promise(resolve => { return new Promise(resolve => {
if (action === 'confirm') { if (action === 'confirm') {
@ -95,7 +98,7 @@ Page({
// 跳转会议预约页面 // 跳转会议预约页面
goRes(e) { goRes(e) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/meeting/meetingReservation/meetingReservation?time=' + e.detail, url: '/pages/meeting/meetingReservation/meetingReservation?time=' + e.detail + '&dep=' + this.data.depName,
}) })
}, },
// 跳转菜单 // 跳转菜单
@ -191,7 +194,17 @@ Page({
}) })
return return
} }
// 后台认证 depLogin({
loginName: uName,
password: pwd
}).then(res => {
if (res.code !== 0) {
Notify({
message: '认证失败!',
top: 50
})
} else {
// 认证通过
Notify({ Notify({
type: 'success', type: 'success',
message: '认证通过!', message: '认证通过!',
@ -201,10 +214,15 @@ Page({
['menuList[0].visible']: true, ['menuList[0].visible']: true,
username: '', username: '',
pwd: '', pwd: '',
showLogin: false showLogin: false,
depName: res.data.orgName
})
this.showTimePicker()
}
console.log('depLogin', res)
}) })
this.showTimePicker()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成

View File

@ -16,6 +16,7 @@ Page({
IMG_NAME: app.IMG_NAME, IMG_NAME: app.IMG_NAME,
roomDataList: {}, roomDataList: {},
rId: '', rId: '',
dep: '',
date: '', date: '',
queryParam: { queryParam: {
timeRangeDict: { timeRangeDict: {
@ -92,6 +93,9 @@ Page({
// 首页过来会找不到rId设为空否则会报错 // 首页过来会找不到rId设为空否则会报错
options.rId = '' options.rId = ''
} }
if (!options.dep) {
options.dep = ''
}
const time = options.time const time = options.time
if (!time || time === '') { if (!time || time === '') {
app.selfShowMsg('请选择时间!', '/pages/meeting/index/index') app.selfShowMsg('请选择时间!', '/pages/meeting/index/index')
@ -99,7 +103,8 @@ Page({
} }
this.setData({ this.setData({
date: time, date: time,
rId: options.rId rId: options.rId,
dep: options.dep
}) })
const _date = new Date(parseInt(time)) const _date = new Date(parseInt(time))
const _year = _date.getFullYear() const _year = _date.getFullYear()
@ -291,7 +296,7 @@ Page({
timeRange = timeRange ? timeRange : 0 timeRange = timeRange ? timeRange : 0
// 跳转预约详情 // 跳转预约详情
wx.navigateTo({ wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingRoom?id=" + e.currentTarget.dataset.id + '&time=' + this.data.date + '&timeRange=' + timeRange + '&rId=' + this.data.rId, url: "/pages/meeting/meetingRoom/meetingRoom?id=" + e.currentTarget.dataset.id + '&time=' + this.data.date + '&timeRange=' + timeRange + '&rId=' + this.data.rId + '&dep=' + this.data.dep,
}) })
}, },

View File

@ -22,6 +22,7 @@ Page({
IMG_NAME: app.IMG_NAME, IMG_NAME: app.IMG_NAME,
date: '', date: '',
rId: '', rId: '',
dep: '',
dateText: '', dateText: '',
timeRange: '', timeRange: '',
timeRangeText: '', timeRangeText: '',
@ -111,7 +112,7 @@ Page({
startTime = parseInt(date) + (parseInt(startTimeArr[0]) * 60 * 60 + parseInt(startTimeArr[1]) * 60) * 1000 startTime = parseInt(date) + (parseInt(startTimeArr[0]) * 60 * 60 + parseInt(startTimeArr[1]) * 60) * 1000
let endTimeArr = endTime.split(':') let endTimeArr = endTime.split(':')
endTime = parseInt(date) + (parseInt(endTimeArr[0]) * 60 * 60 + parseInt(endTimeArr[1]) * 60) * 1000 endTime = parseInt(date) + (parseInt(endTimeArr[0]) * 60 * 60 + parseInt(endTimeArr[1]) * 60) * 1000
let paramUrl = "?meetingRoomId=" + meetingRoomId + "&startTime=" + selfFormatTimeYMDHMS(startTime) + "&endTime=" + selfFormatTimeYMDHMS(endTime) + '&rId=' + _this.data.rId; let paramUrl = "?meetingRoomId=" + meetingRoomId + "&startTime=" + selfFormatTimeYMDHMS(startTime) + "&endTime=" + selfFormatTimeYMDHMS(endTime) + '&rId=' + _this.data.rId + '&dep=' + _this.data.dep;
// 结束时间不能小于开始时间 // 结束时间不能小于开始时间
if (startTime >= endTime) { if (startTime >= endTime) {
Notify('结束时间不能小于开始时间!') Notify('结束时间不能小于开始时间!')
@ -263,6 +264,7 @@ Page({
meetingRoomId: options.meetingRoomId, meetingRoomId: options.meetingRoomId,
date: time, date: time,
rId: options.rId, rId: options.rId,
dep: options.dep,
dateText: _year + '年' + _month + '月' + _day + '日', dateText: _year + '年' + _month + '月' + _day + '日',
timeRange: _timeRange, timeRange: _timeRange,
timeRangeText: _timeRangeText, timeRangeText: _timeRangeText,

View File

@ -27,6 +27,7 @@ Page({
*/ */
data: { data: {
rId: '', rId: '',
dep: '',
IMG_NAME: app.IMG_NAME, IMG_NAME: app.IMG_NAME,
detail: {}, detail: {},
meetingRoomId: null, meetingRoomId: null,
@ -85,7 +86,7 @@ Page({
title: '', title: '',
personNum: '', personNum: '',
leader: '', leader: '',
depName: '', depName: dep,
remark: '' remark: ''
} }
}) })

View File

@ -16,6 +16,7 @@ Page({
meetingRoomId: null, meetingRoomId: null,
date: '', // 选择的时间 date: '', // 选择的时间
rId: '', // 预约id rId: '', // 预约id
dep: '', // 预约单位
timeRange: '', // 选择的时间范围 timeRange: '', // 选择的时间范围
detail: {}, detail: {},
bannerList: [], bannerList: [],
@ -35,7 +36,8 @@ Page({
_this.setData({ _this.setData({
date: time, date: time,
timeRange: timeRange, timeRange: timeRange,
rId: options.rId rId: options.rId,
dep: options.dep
}) })
let meetingRoomId = options.id; let meetingRoomId = options.id;
meetingRoomDetailRq(meetingRoomId).then(res => { meetingRoomDetailRq(meetingRoomId).then(res => {
@ -144,7 +146,7 @@ Page({
let time = this.data.date let time = this.data.date
let timeRange = this.data.timeRange let timeRange = this.data.timeRange
wx.navigateTo({ wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange + '&rId=' + this.data.rId, url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange + '&rId=' + this.data.rId + '&dep=' + this.data.dep,
}) })
}, },

View File

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