重构第一版 智控助手小程序

This commit is contained in:
2025-12-30 15:21:19 +08:00
parent c25e282398
commit 3852e6ac20
32 changed files with 3584 additions and 123 deletions

View File

@@ -50,14 +50,16 @@ Page({
//确定选择酒店
ShowSelHotel: async function (e) {
let HotelCode
let id = e.currentTarget.dataset['id'];
if(id==-1){
id = this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].HotelId;
id = this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].HotelId;
HotelCode= this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].Code;
}
if(this.data.hotelIndex>=0){
app.globalData.HotelId=id
app.globalData.HotelCode=HotelCode
wx.navigateTo({
@@ -101,7 +103,7 @@ Page({
//登录
onLoad: async function (option) {
let that=this
this.setData({
userInfo: app.globalData.userinfo,
autho: app.globalData.autho
@@ -212,8 +214,14 @@ Page({
selectGroupIndex: _xiaoxi_selectGroupIndex,
hotelIndex: _xiaoxi_hotelIndex
})
//非选择 读取上次进行跳转
if(!this.data.issel && this.data.hotelIndex>-1){
let HotelCode= this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].Code;
let HotelId=this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].HotelId
app.globalData.HotelId=HotelId
app.globalData.HotelCode=HotelCode
wx.navigateTo({
url: '/pages/NewHome/NewHome?HotelId='+this.data.autho[this.data.selectGroupIndex].Hotels[this.data.hotelIndex].HotelId
})
@@ -221,6 +229,10 @@ Page({
// console.log(this.data.autho.length==1 && this.data.autho[0].Hotels.length==1 && option.issel!=0)
//非选择 如果只有一个酒店就直接进行跳转
if(this.data.autho.length==1 && this.data.autho[0].Hotels.length==1 && !this.data.issel){
let HotelCode= this.data.autho[0].Hotels[0].Code;
let HotelId=this.data.autho[0].Hotels[0].HotelId
app.globalData.HotelId=HotelId
app.globalData.HotelCode=HotelCode
wx.navigateTo({
url: '/pages/NewHome/NewHome?HotelId='+this.data.autho[0].Hotels[0].HotelId
})