覃浩 hace 2 años
padre
commit
60bfce5c4d

+ 29 - 12
components/header.vue

@@ -1,7 +1,7 @@
 <template>
 <div style="background-color:#fff;overflow: hidden;" :style="{'border-bottom': borbtm?'1px solid':'none'}">
-    <u-navbar title="" @rightClick="rightClick" :autoBack="!isSwitch" placeholder @leftClick="leftClick" :leftIcon="isSwitch? '' : 'arrow-left' ">
-        <div slot="center" style="width:auto">
+    <u-navbar  title="" @rightClick="rightClick" :autoBack="!isSwitch" placeholder @leftClick="leftClick" :leftIcon="isSwitch? '' : 'arrow-left' ">
+        <div slot="center" style="width:80%;">
             <uni-data-select :clear="false" style="flex:1" v-model="hotelIds" :localdata="range" @change="change"></uni-data-select>
         </div>
     </u-navbar>
@@ -68,24 +68,41 @@ export default {
                     text: item.name
                 }
             })
-            this.hotelIds = newVal[0].id
         }
     },
     async mounted() {
-        let data = await getHotelList()
-        if (data.code == 200) {
-            this.$nextTick(() => {
-                this.$store.commit('setHotelIdList', data.result.records)
-                this.hotelIds = data.result.records[0].id
-                this.$store.commit('setHotelId', data.result.records[0].id)
-                this.$emit('change', data.result.records[0].id)
-            })
-        }
+        
     },
     methods: {
+		async getHotels(cb) {
+			let data = await getHotelList()
+			if (data.code == 200) {
+			    this.$nextTick(() => {
+					this.$store.commit('setHotelIdList', data.result.records)
+					let cacheStore = uni.getStorageSync("hotelInfo")
+					if(cacheStore) {
+						this.hotelIds = cacheStore.id
+						this.$store.commit('setHotelId', cacheStore.id)
+					} else {
+						this.hotelIds = data.result.records[0].id
+						uni.setStorageSync("hotelInfo",data.result.records[0])
+						this.$store.commit('setHotelId', data.result.records[0].id)
+					}
+					if(cb) {
+						cb()
+					}
+					this.$emit('change',this.hotelIds)
+			    })
+			}
+		},
         change(e) {
             console.log(e)
             this.$store.commit('setHotelId', e)
+			let hotels = this.hotelIdList
+			let index = hotels.findIndex(s=>s.id == e) 
+			if(index > -1) {
+				uni.setStorageSync("hotelInfo",hotels[index])
+			}
             console.log(this.hotelId);
             this.$emit('change', e)
         },

+ 20 - 0
main.js

@@ -6,6 +6,26 @@ import uView from '@/uni_modules/uview-ui'
 import store from './store/index'
 Vue.config.productionTip = false
 App.mpType = 'app'
+Date.prototype.format = function(fmt) { 
+     var o = { 
+        "M+" : this.getMonth()+1,                 //月份 
+        "d+" : this.getDate(),                    //日 
+        "h+" : this.getHours(),                   //小时 
+        "m+" : this.getMinutes(),                 //分 
+        "s+" : this.getSeconds(),                 //秒 
+        "q+" : Math.floor((this.getMonth()+3)/3), //季度 
+        "S"  : this.getMilliseconds()             //毫秒 
+    }; 
+    if(/(y+)/.test(fmt)) {
+            fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
+    }
+     for(var k in o) {
+        if(new RegExp("("+ k +")").test(fmt)){
+             fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+         }
+     }
+    return fmt; 
+}
 const app = new Vue({
     store,
     ...App

+ 33 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "酒店App老板",
+    "name" : "湘寓云",
     "appid" : "__UNI__60D7431",
     "description" : "",
     "versionName" : "1.0.0",
@@ -71,6 +71,38 @@
             /* SDK配置 */
             "sdkConfigs" : {
                 "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
             }
         }
     },

+ 2 - 2
pages.json

@@ -12,7 +12,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "uni-app"
+				"navigationBarTitleText": "首页"
 			}
 		}
 	    ,{
@@ -107,7 +107,7 @@
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
+		"navigationBarTitleText": "酒店管理系统",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	},

+ 60 - 32
pages/index/index.vue

@@ -3,21 +3,24 @@
     <div style="background:#fff">
         <div class="home-box">
             <div class="select-top">
-                <uni-data-select style="width:auto;border: none;flex: none;" :clear="false" v-model="hotelIds" :localdata="range" @change="change"></uni-data-select>
+                <uni-data-select style="border: none;flex: none;" iconColor="#FFF" :clear="false" v-model="hotelIds" :localdata="range" @change="change"></uni-data-select>
             </div>
+			<div class="grid-data">
+				<div>
+				    <div>今日总收款/元</div>
+				    <div style="font-size: 18px;">{{todayTotalIncome}}</div>
+				</div>
+				<div>
+				    <div>在住/空置</div>
+				    <div style="font-size: 18px;">{{roomData.checkInRoomData}}/{{roomData.allRoomData - roomData.checkInRoomData}}</div>
+				</div>
+				<div>
+				    <div>入住率</div>
+				    <div style="font-size: 18px;">{{(((roomData.checkInRoomData/roomData.allRoomData) || 0)*100).toFixed(2)}}%</div>
+				</div>
+			</div>
             <div class="grid-data">
-                <div>
-                    <div>今日总收款/元</div>
-                    <div style="font-size: 18px;">{{todayTotalIncome}}</div>
-                </div>
-                <div>
-                    <div>在住/空置</div>
-                    <div style="font-size: 18px;">{{roomData.checkInRoomData}}/{{roomData.allRoomData - roomData.checkInRoomData}}</div>
-                </div>
-                <div>
-                    <div>入住率</div>
-                    <div style="font-size: 18px;">{{((roomData.checkInRoomData/roomData.allRoomData) || 0).toFixed(2)}}%</div>
-                </div>
+                
                 <div>
                     <div>今日总收入/元</div>
                     <div style="font-size: 18px;">{{todayIncome.reduce((pre, cur) => pre+cur.amount,0 ) || 0}}</div>
@@ -59,7 +62,7 @@
         <div class="grid-tabbar">
             <div v-for="(item, index) in tabbarList" @click="handleToPage(item)" :key="index" style="display:flex;flex-direction:column;align-items:center">
                 <image :src="item.icon" style="width:30px;height:30px;" />
-                <div>{{item.name}}</div>
+                <div class="tbr-name">{{item.name}}</div>
             </div>
         </div>
         <div class="notice">
@@ -432,10 +435,11 @@ export default {
     },
     async mounted() {
         // this.onload()
-        await this.getHotel();
-        this.onload()
-
     },
+	 onShow() {
+		 this.getHotel();
+		
+	},
     methods: {
         //获取酒店数据
         async getHotel() {
@@ -443,18 +447,25 @@ export default {
             if (data.code == 200) {
                 this.$nextTick(() => {
                     this.$store.commit('setHotelIdList', data.result.records)
-                    this.hotelIds = data.result.records[0].id
-                    this.$store.commit('setHotelId', data.result.records[0].id)
+					let cacheStore = uni.getStorageSync("hotelInfo")
+					if(cacheStore) {
+						this.hotelIds = cacheStore.id
+						this.$store.commit('setHotelId', cacheStore.id)
+					} else {
+						this.hotelIds = data.result.records[0].id
+						uni.setStorageSync("hotelInfo",data.result.records[0])
+						this.$store.commit('setHotelId', data.result.records[0].id)
+					}
+					this.onload()
                 })
             }
             return data
         },
         onload() {
-            let str = new Date().toLocaleDateString()
+            let str = new Date()
             //后一天
-            let end = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toLocaleDateString()
-            str = str.replace(/\//g, '-')
-            end = end.replace(/\//g, '-')
+            let end = new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
+            
 
             // 房间数据统计
             getRevPAR().then(res => {
@@ -492,20 +503,23 @@ export default {
             })
 
             //今日总收款
+			console.log("nidayede ",str,end)
             getTodayTotalIncome({
-                startTime: str,
-                endTime: end
+                startTime: str.format("yyyy-MM-dd"),
+                endTime: end.format("yyyy-MM-dd")
             }).then(res => {
+				
                 if (res.code == 200 && res.result.records.length > 0) {
                     let brr = []
                     let data = res.result.records
+					this.todayTotalIncome = 0
                     data.forEach(item => {
                         let arr = []
                         arr = Object.keys(item).filter(items => items != 'department' && items != 'hotel_name')
                         brr = Object.keys(item).filter(items => items == '现金' || items == '微信' || items == '支付宝')
                         console.log(arr);
                         arr.forEach(ele => {
-                            this.todayTotalIncome += item[ele] * 1
+                            this.todayTotalIncome += parseFloat(item[ele]) * 1
                         })
                     })
                     let obj = {}
@@ -580,6 +594,11 @@ export default {
         change(e) {
             console.log("e:", e);
             this.hotelIds = e
+			let hotels = this.hotelIdList
+			let idx =  (hotels||[]).findIndex(s=>s.id == e)
+			if(idx > -1) {
+				uni.setStorageSync("hotelInfo",hotels[idx])
+			}
             this.$store.commit('setHotelId', e)
             this.onload()
         },
@@ -672,7 +691,7 @@ page {
     // height: 200px;
     // width: 200px;
     background-color: rgb(0, 186, 173);
-    border-radius: 0 0 20% 20%;
+    border-radius: 0 0 10% 10%;
 }
 
 .select-top {
@@ -723,17 +742,19 @@ page {
 }
 
 .grid-data {
-    display: grid;
+    display: flex;
     grid-template-columns: repeat(3, 1fr);
     grid-template-rows: repeat(2, 1fr);
     grid-gap: 30px 10px;
     color: #fff;
+	margin-top: 26rpx;
 }
 
 .grid-data>div {
     /* background-color: #fff; */
     /* border: 1px solid #eee; */
     display: flex;
+	width: 100%; 
     justify-content: space-between;
     flex-direction: column;
     align-items: center;
@@ -742,13 +763,20 @@ page {
 }
 
 .grid-tabbar {
-    display: grid;
-    grid-template-columns: repeat(5, 1fr);
-    grid-template-rows: repeat(3, 1fr);
-    gap: 10px;
+    display: flex;
+	flex-wrap: wrap;
+	justify-content: center;
+	align-items: center;
     margin-top: 20px;
     background: #fff;
 }
+.tbr-name{
+	font-size: .8rem;
+}
+.grid-tabbar>div{
+	width: 20%;
+	margin: 10px 0;
+}
 
 // .bgco {
 //     position: fixed;

+ 10 - 3
pages/login/login.vue

@@ -1,11 +1,11 @@
 <template>
 <div>
     <form>
-        <label for="username">Username:</label>
+        <label for="username">账号:</label>
         <input type="text" id="username" v-model="username">
-        <label for="password">Password:</label>
+        <label for="password">密码:</label>
         <input type="password" id="password" v-model="password">
-        <button type="submit" @click.prevent="login">Login</button>
+        <button type="submit" @click.prevent="login">登录</button>
     </form>
 </div>
 </template>
@@ -21,6 +21,13 @@ export default {
             password: ''
         }
     },
+	onShow() {
+		if(uni.getStorageSync('token')) {
+			uni.switchTab({
+			    url: '/pages/index/index'
+			})
+		}
+	},
     methods: {
         login() {
             // perform login logic here

+ 22 - 7
pages/roomOrders/roomOrders.vue

@@ -1,6 +1,6 @@
 <template>
 <view>
-    <Header @change="switchChange">
+    <Header ref="header" @change="switchChange">
         <template #search>
             <u--input v-model="keyWord" @change="searchWord" placeholder="房间号/姓名/手机号" border="surround" shape="circle" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" fontSize="12px" :customStyle="{border:'1px solid #e2e2e2',padding:'0 10px',margin:'0 10px',borderRadius:'20px'}">
             </u--input>
@@ -113,10 +113,18 @@ export default {
         if (options.current) {
             // this.sectionChange(options.current)
             this.current = options.current
-            this.getData()
+           
         }
-        this.getData()
     },
+	onShow(){
+		this.$nextTick(()=>{
+			this.$refs.header.getHotels(()=>{
+				setTimeout(()=>{
+					this.getData()
+				},500)
+			})
+		})
+	},
     filters: {},
     methods: {
         getData() {
@@ -358,15 +366,22 @@ page {
 
 .card-day-btm {
     margin-top: 10px;
-    display: grid;
+    display: flex;
+	flex-wrap: wrap;
     grid-template-columns: repeat(2, 1fr);
     justify-content: space-between;
     gap: 10px;
+	text-align: center;
+	div{
+		width: 100%;
+		text-align: center;
+		
+	}
 
     // div为偶数时右对齐
-    div:nth-child(even) {
-        text-align: right;
-    }
+    // div:nth-child(even) {
+    //     text-align: right;
+    // }
 }
 
 .day-detail {

+ 41 - 25
pages/roomStateDiagram/roomStateDiagram.vue

@@ -1,6 +1,6 @@
 <template>
 <view>
-    <Header @change="headerChange" :isSwitch="true">
+    <Header ref="header" @change="headerChange" :isSwitch="true">
         <template #search>
             <!-- <u--input placeholder="房间号/姓名/手机号/身份证号" border="surround" shape="circle" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" fontSize="12px" :customStyle="{border:'1px solid #e2e2e2',padding:'0 10px',margin:'0 10px',borderRadius:'20px'}" @change="searchChange"></u--input> -->
         </template>
@@ -30,22 +30,24 @@
         <div style="margin-top:10px">
             <div class="room-state-detail" v-for="item in dataList" :key="item.id">
                 <div class="room-state-detail-title">{{item.name.includes('栋')? item.name : item.buildingName + item.name}}:{{item.rooms.length}}间</div>
-                <div class="room-state-detail-grid">
-                    <div class="room-state-detail-card" v-for="sItem in item.rooms" :key="sItem.id" :style="{background: roomStatusColorList && roomStatusColorList.length > 0 ? getRoomStatusColor(sItem.roomInfo.roomStatus) : '',}">
-                        <div style="display:flex;justify-content: space-between;">
-                            <div><b>{{sItem.roomInfo.name}}</b></div>
-                            <div v-if="sItem.livingData.livingOrder" style="background:rgb(255, 141, 26);color:#fff;padding:1px 2px;border-radius:5px;">{{getCustomerSourceList(sItem.livingData.livingOrder.customerSource)}}</div>
-                        </div>
-                        <div v-if="sItem.livingData.livingOrder">
-                            <div style="width:100%;overflow: hidden;"><b>{{sItem.livingData.livingCustomers.customerName}}</b><span v-if="sItem.livingData.livingOrder.vipCustomerId" style="color:red; font-size: 12px;transform: scale(0.6);display:inline-block;">VIP</span></div>
-                            <div>{{sItem.livingData.livingOrder.dayCount}}天/{{ sItem.livingData.livingOrder.arrivalTime }}</div>
-                            <div style="width:100%;overflow: hidden;">¥{{sItem.livingData.price && sItem.livingData.price.length > 0  ? sItem.livingData.price[0].price : 0 }}/剩0</div>
-                        </div>
-                        <b v-else>
-                            {{sItem.layout.name}}
-                        </b>
-                    </div>
-                </div>
+                <div class="ctner">
+					<div class="room-state-detail-grid">
+					    <div class="room-state-detail-card" v-for="sItem in item.rooms" :key="sItem.id" :style="{background: roomStatusColorList && roomStatusColorList.length > 0 ? getRoomStatusColor(sItem.roomInfo.roomStatus) : '',}">
+					        <div style="display:flex;justify-content: space-between;">
+					            <div><b>{{sItem.roomInfo.name}}</b></div>
+					            <div v-if="sItem.livingData.livingOrder" style="background:rgb(255, 141, 26);color:#fff;padding:1px 2px;border-radius:5px;">{{getCustomerSourceList(sItem.livingData.livingOrder.customerSource)}}</div>
+					        </div>
+					        <div v-if="sItem.livingData.livingOrder">
+					            <div style="width:100%;overflow: hidden;"><b>{{sItem.livingData.livingCustomers.customerName}}</b><span v-if="sItem.livingData.livingOrder.vipCustomerId" style="color:red; font-size: 12px;transform: scale(0.6);display:inline-block;">VIP</span></div>
+					            <div>{{sItem.livingData.livingOrder.dayCount}}天/{{ sItem.livingData.livingOrder.arrivalTime }}</div>
+					            <div style="width:100%;overflow: hidden;">¥{{sItem.livingData.price && sItem.livingData.price.length > 0  ? sItem.livingData.price[0].price : 0 }}/剩0</div>
+					        </div>
+					        <b v-else>
+					            {{sItem.layout.name}}
+					        </b>
+					    </div>
+					</div>
+				</div>
             </div>
         </div>
     </div>
@@ -91,8 +93,16 @@ export default {
         }
     },
     mounted() {
-        this.getData()
+        
+	
     },
+	onShow() {
+		this.$nextTick(()=>{
+			this.$refs.header.getHotels(()=>{
+				
+			})
+		})
+	},
     methods: {
         sectionChange(i) {
             console.log(i)
@@ -279,20 +289,26 @@ page {
 }
 
 .room-state-detail-grid {
-    display: grid;
-    grid-template-columns: repeat(4, 1fr);
-    grid-gap: 10px;
-    padding: 10px;
+    display: flex;
+	flex-wrap: wrap;
+	align-items: center;
+	justify-content: start;
+	width: 96vw;
+	margin: 0 auto;
+    // grid-template-columns: repeat(4, 1fr);
+    // grid-gap: 10px;
+    // padding: 10px;
 }
 
 .room-state-detail-card {
-    width: 30vw;
-    height: 30vw;
+    width: calc(30vw);
+    height: calc(30vw );
     font-size: 12px;
     border-radius: 8px;
+	margin: 1vw;
     // background: red;
     color: #fff;
-    padding: 5px 5px;
+    padding: 1vw 1vw;
     box-sizing: border-box;
     //阴影
     box-shadow: 0 4px 5px rgba(0, 0, 0, 0.6);

BIN
static/logo.png


+ 14 - 8
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue

@@ -3,11 +3,11 @@
 		<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
 		<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
 			<view class="uni-select" :class="{'uni-select--disabled':disabled}">
-				<view class="uni-select__input-box" @click="toggleSelector">
-					<view v-if="current" class="uni-select__input-text">{{current}}</view>
-					<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
+				<view class="uni-select__input-box" >
+					<view v-if="current" class="uni-select__input-text" @click="toggleSelector">{{current}}</view>
+					<view v-else class="uni-select__input-text uni-select__input-placeholder" @click="toggleSelector">{{typePlaceholder}}</view>
 					<uni-icons v-if="current && clear && !disabled" type="clear" color="#c0c4cc" size="24" @click="clearVal" />
-					<uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
+					<uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" :color="iconColor" />
 				</view>
 				<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
 				<view class="uni-select__selector" v-if="showSelector">
@@ -52,6 +52,10 @@
 					return []
 				}
 			},
+			iconColor:{
+				type: String,
+				default: '#999'
+			},
 			value: {
 				type: [String, Number],
 				default: ''
@@ -358,6 +362,7 @@
 		width: 100%;
 		flex: 1;
 		height: 35px;
+		justify-content: center;
 
 		&--disabled {
 			background-color: #f5f7fa;
@@ -375,6 +380,7 @@
 
 	.uni-select__input-box {
 		height: 35px;
+		justify-content: center;
 		position: relative;
 		/* #ifndef APP-NVUE */
 		display: flex;
@@ -402,8 +408,8 @@
 		/* #endif */
 		position: absolute;
 		top: calc(100% + 12px);
-		left: 0;
-		width: 100%;
+		// left: 0;
+		// width: 100%;
 		background-color: #FFFFFF;
 		border: 1px solid #EBEEF5;
 		border-radius: 6px;
@@ -463,7 +469,7 @@
 	.uni-popper__arrow {
 		filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
 		top: -6px;
-		left: 10%;
+		left: 48%;
 		margin-right: 3px;
 		border-top-width: 0;
 		border-bottom-color: #EBEEF5;
@@ -479,7 +485,7 @@
 
 	.uni-select__input-text {
 		// width: 280px;
-		width: 100%;
+		width: fit-content;
 		color: $uni-main-color;
 		white-space: nowrap;
 		text-overflow: ellipsis;

+ 14 - 10
utils/api.js

@@ -1,5 +1,6 @@
 import request from './request.js'
-const pre = 'http://118.195.195.200:8080'
+const pre = 'http://118.195.195.200:8080/jeecg-boot'
+// const pre = 'http://192.168.2.9:8080/jeecg-boot'
 /**
  * 登录
  * @param {*} data 
@@ -7,7 +8,7 @@ const pre = 'http://118.195.195.200:8080'
  */
 export function login(data) {
   return request({
-    url: pre+'/jeecg-boot/sys/login',
+    url: pre+'/sys/login',
     method: 'POST',
     data
   })
@@ -21,7 +22,7 @@ export function login(data) {
  */
 export function getHotelList(data) {
   return request({
-    url: pre+'/jeecg-boot/business/busHotel/list?pageNo=1&pageSize=20',
+    url: pre+'/business/busHotel/list?pageNo=1&pageSize=20',
     method: 'GET',
     data
   })
@@ -33,7 +34,7 @@ export function getHotelList(data) {
 export function getTodayTotalIncome(data){
   console.log(data);
     return request({
-        url: pre+`/jeecg-boot/finance/summary/financeSummaryPage?departmentId=0&startTime=${data.startTime}&endTime=${data.endTime}`,
+        url: pre+`/finance/summary/financeSummaryPage?departmentId=0&startTime=${data.startTime}&endTime=${data.endTime}`,
         method: 'GET',
         // data
     })
@@ -45,7 +46,7 @@ export function getTodayTotalIncome(data){
  */
 export function getRevPAR(data){
     return request({
-        url: pre+'/jeecg-boot/rooms/cesRooms/roomSummary',
+        url: pre+'/rooms/cesRooms/roomSummary',
         method: 'GET',
         data
     })
@@ -58,7 +59,7 @@ export function getRevPAR(data){
  */
 export function getTodayIncome(data){
     return request({
-        url: pre+'/jeecg-boot/finance/summary/currentDayFinanceSummary',
+        url: pre+'/finance/summary/currentDayFinanceSummary',
         method: 'GET',
         data
     })
@@ -69,7 +70,7 @@ export function getTodayIncome(data){
  */
 export function getStaySource(data){
     return request({
-        url: pre+'/jeecg-boot/rooms/cesRooms/livingSourceStat',
+        url: pre+'/rooms/cesRooms/livingSourceStat',
         method: 'GET',
         data
     })
@@ -81,7 +82,7 @@ export function getStaySource(data){
  */
 export function getRoomStatus(data){
     return request({
-        url: pre+'/jeecg-boot/rooms/cesRooms/roomLiveStat',
+        url: pre+'/rooms/cesRooms/roomLiveStat',
         method: 'GET',
         data
     })
@@ -94,7 +95,7 @@ export function getRoomStatus(data){
  */
 export function getIncomeAndExpenditure(data){
     return request({
-        url: pre+'/jeecg-boot/finance/summary/financeSummary',
+        url: pre+'/finance/summary/financeSummary',
         method: 'GET',
         data
     })
@@ -106,9 +107,12 @@ export function getIncomeAndExpenditure(data){
  */
 export function getFutureRoomStatus(data){
     return request({
-        url: pre+'/jeecg-boot/business/busRoomBookingOrders/forward-fangtai',
+        url: pre+'/business/busRoomBookingOrders/forward-fangtai',
         method: 'GET',
         data
     })
 }
 
+export function getPre() {
+	return pre
+}

+ 1 - 1
utils/businessAnalysisApi.js

@@ -1,6 +1,6 @@
 import request from "./request";
 
-const pre = 'http://118.195.195.200:8080/jeecg-boot';
+const pre = require('./api').getPre();
 
 /**
  * 经营分析收入统计列表

+ 1 - 1
utils/customerOrder.js

@@ -1,6 +1,6 @@
 import request from "./request";
 
-const pre = 'http://118.195.195.200:8080/jeecg-boot';
+const pre = require('./api').getPre();
 
 /**
  * 获取酒店房子列表

+ 1 - 1
utils/incomeDetail.js

@@ -1,6 +1,6 @@
 import request from "./request";
 
-const pre = 'http://118.195.195.200:8080/jeecg-boot';
+const pre = require('./api').getPre();
 
 
 //#region 收入明细

+ 1 - 0
utils/request.js

@@ -47,6 +47,7 @@ function service(options = {}) {
                 //     duration: 3000,
                 //     title: `${res.data.msg}`
                 // });
+				uni.clearStorageSync()
                 uni.navigateTo({
                     url: '/pages/login/login'
                 });

+ 1 - 1
utils/roomService.js

@@ -1,6 +1,6 @@
 import request from "./request";
 
-const pre = 'http://118.195.195.200:8080/jeecg-boot';
+const pre = require('./api').getPre();
 
 
 /**