调试接口

修改为测试环境,调试接口
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
});
}
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', //接口域名
// IMG_NAME: 'http://192.168.0.30:9227',
// 生产
DOMAIN_NAME_PREFIX: 'https://baoxiu.jsgdha.com/shoot-hand',
DOMAIN_NAME: 'https://baoxiu.jsgdha.com/shoot-hand', //接口域名
IMG_NAME: 'https://baoxiu.jsgdha.com/shoot-hand',
// DOMAIN_NAME_PREFIX: 'https://baoxiu.jsgdha.com/shoot-hand',
// DOMAIN_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: {
refreshMyPages: false,
homedata: {},

View File

@ -1,7 +1,9 @@
const app = getApp()
import Notify from '@vant/weapp/notify/notify';
import {
depLogin
} from "../../../api/login/login.js"
Page({
/**
@ -55,6 +57,7 @@ Page({
showLogin: false, // 是否展示弹出层
username: '', // 用户名
pwd: '', // 登录密码
depName: '', // 登录单位
beforeClose(action) {
return new Promise(resolve => {
if (action === 'confirm') {
@ -95,7 +98,7 @@ Page({
// 跳转会议预约页面
goRes(e) {
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
}
// 后台认证
depLogin({
loginName: uName,
password: pwd
}).then(res => {
if (res.code !== 0) {
Notify({
message: '认证失败!',
top: 50
})
} else {
// 认证通过
Notify({
type: 'success',
message: '认证通过!',
@ -201,10 +214,15 @@ Page({
['menuList[0].visible']: true,
username: '',
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,
roomDataList: {},
rId: '',
dep: '',
date: '',
queryParam: {
timeRangeDict: {
@ -92,6 +93,9 @@ Page({
// 首页过来会找不到rId设为空否则会报错
options.rId = ''
}
if (!options.dep) {
options.dep = ''
}
const time = options.time
if (!time || time === '') {
app.selfShowMsg('请选择时间!', '/pages/meeting/index/index')
@ -99,7 +103,8 @@ Page({
}
this.setData({
date: time,
rId: options.rId
rId: options.rId,
dep: options.dep
})
const _date = new Date(parseInt(time))
const _year = _date.getFullYear()
@ -291,7 +296,7 @@ Page({
timeRange = timeRange ? timeRange : 0
// 跳转预约详情
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,
date: '',
rId: '',
dep: '',
dateText: '',
timeRange: '',
timeRangeText: '',
@ -111,7 +112,7 @@ Page({
startTime = parseInt(date) + (parseInt(startTimeArr[0]) * 60 * 60 + parseInt(startTimeArr[1]) * 60) * 1000
let endTimeArr = endTime.split(':')
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) {
Notify('结束时间不能小于开始时间!')
@ -263,6 +264,7 @@ Page({
meetingRoomId: options.meetingRoomId,
date: time,
rId: options.rId,
dep: options.dep,
dateText: _year + '年' + _month + '月' + _day + '日',
timeRange: _timeRange,
timeRangeText: _timeRangeText,

View File

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

View File

@ -16,6 +16,7 @@ Page({
meetingRoomId: null,
date: '', // 选择的时间
rId: '', // 预约id
dep: '', // 预约单位
timeRange: '', // 选择的时间范围
detail: {},
bannerList: [],
@ -35,7 +36,8 @@ Page({
_this.setData({
date: time,
timeRange: timeRange,
rId: options.rId
rId: options.rId,
dep: options.dep
})
let meetingRoomId = options.id;
meetingRoomDetailRq(meetingRoomId).then(res => {
@ -144,7 +146,7 @@ Page({
let time = this.data.date
let timeRange = this.data.timeRange
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": {
"compileHotReLoad": true,
"urlCheck": true
"urlCheck": false
},
"condition": {
"miniprogram": {