Browse Source

加了说明文件,手动开放与关闭。

soft5566 1 year ago
parent
commit
78fbc54736
9 changed files with 75 additions and 18 deletions
  1. 9 3
      App.vue
  2. 3 0
      index.html
  3. 5 0
      main.js
  4. 10 10
      pages.json
  5. 1 1
      pages/default/default.vue
  6. 19 2
      pages/index/index.vue
  7. 1 1
      pages/my_orderlist/my_orderlist.vue
  8. 1 1
      pages/order_room/order_room.vue
  9. 26 0
      static/说明.txt

+ 9 - 3
App.vue

@@ -1,14 +1,20 @@
 <script>
 <script>
 	export default {
 	export default {
 		onLaunch: function(options) {
 		onLaunch: function(options) {
+			// 系统没有开放前,请注释这段代码
+			uni.redirectTo({
+				url: '/pages/default/default'
+			})
+			return;
 			// console.log('App Launch')
 			// console.log('App Launch')
-			this.accredit(options)
+			// 系统没有开放前,请注释下面这行
+			// this.accredit(options)
 		},
 		},
 		onShow: function() {
 		onShow: function() {
-			console.log('App Show')
+			// console.log('App Show')
 		},
 		},
 		onHide: function() {
 		onHide: function() {
-			console.log('App Hide')
+			// console.log('App Hide')
 		},
 		},
 		methods: {
 		methods: {
 			accredit(options) {
 			accredit(options) {

+ 3 - 0
index.html

@@ -8,6 +8,9 @@
       document.write(
       document.write(
         '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
         '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
         (coverSupport ? ', viewport-fit=cover' : '') + '" />')
         (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+		<meta http-equiv="Pragma" content="no-cache" />
+		<meta http-equiv="Expires" content="0" />
     </script>
     </script>
     <title></title>
     <title></title>
     <!--preload-links-->
     <!--preload-links-->

+ 5 - 0
main.js

@@ -29,6 +29,11 @@ utils.storeEncryptedData('errorMsg', utils.getUrlKey('errorMsg'))
 
 
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 
 
+// 清除浏览器缓存
+if (window.location.href.indexOf('?') === -1) {
+  window.location.href += '?nocache=' + new Date().getTime()
+}
+
 const app = new Vue({
 const app = new Vue({
 	...App
 	...App
 })
 })

+ 10 - 10
pages.json

@@ -1,15 +1,15 @@
 {
 {
 	"pages": [
 	"pages": [
-		// {
-		// 	"path": "pages/default/default",
-		// 	"style": {
-		// 		"navigationBarTitleText": "公告",
-		// 		"enablePullDownRefresh": false,
-		// 		"transparentTitle": "always",
-		// 		"disableScroll": true
-		// 	}
-		// }
-		// , 
+		// 系统没有开放前,作为第一个页面,开发后作为最后一个页面
+		{
+			"path": "pages/default/default",
+			"style": {
+				"navigationBarTitleText": "公告",
+				"enablePullDownRefresh": false,
+				"transparentTitle": "always",
+				"disableScroll": true
+			}
+		}, 
 		{
 		{
 			"path": "pages/index/index",
 			"path": "pages/index/index",
 			"style": {
 			"style": {

+ 1 - 1
pages/default/default.vue

@@ -8,7 +8,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				description: "酒店预定系统8月15正式开放"
+				description: "酒店预订系统正在升级,预计很快将重新开放。"
 			};
 			};
 		},
 		},
 		mounted() {
 		mounted() {

+ 19 - 2
pages/index/index.vue

@@ -79,8 +79,7 @@
 					</image>
 					</image>
 					<image v-else-if="item.h_type.indexOf('高级') !== -1" class="room-image" src="../../static/index/adv1.jpg"
 					<image v-else-if="item.h_type.indexOf('高级') !== -1" class="room-image" src="../../static/index/adv1.jpg"
 						@click="inputDialogToggle(item.h_type)"></image>
 						@click="inputDialogToggle(item.h_type)"></image>
-					<image v-else class="room-image" src="../../static/index/lux.jpg"
-						@click="inputDialogToggle(item.h_type)"></image>
+					<image v-else class="room-image" src="../../static/index/lux.jpg" @click="inputDialogToggle(item.h_type)"></image>
 					<view class="room-name">{{ item.h_type }}</view>
 					<view class="room-name">{{ item.h_type }}</view>
 					<view v-if="item.h_type.indexOf('标准') !== -1" class="room-mark">描述:面积约20平方米,配置1.35米双人床一张,点击左侧图片查看更多。</view>
 					<view v-if="item.h_type.indexOf('标准') !== -1" class="room-mark">描述:面积约20平方米,配置1.35米双人床一张,点击左侧图片查看更多。</view>
 					<view v-else-if="item.h_type.indexOf('高级') !== -1" class="room-mark">描述:面积约28平方米,配置1.5米双人床一张,点击左侧图片查看更多。</view>
 					<view v-else-if="item.h_type.indexOf('高级') !== -1" class="room-mark">描述:面积约28平方米,配置1.5米双人床一张,点击左侧图片查看更多。</view>
@@ -236,6 +235,24 @@
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
+			// 获取当前时间
+			const now = new Date()
+			// 设置指定日期
+			const specifiedDate = new Date('2024-08-15');
+
+			// 将指定日期的时间设置为0时0分0秒
+			specifiedDate.setHours(0, 0, 0, 0);
+
+			// 比较当前时间和指定日期
+			if (now < specifiedDate) {
+				// 如果当前时间早于指定日期的0时0分0秒,执行跳转
+				uni.redirectTo({
+					url: '/pages/default/default' // 跳转的目标页面路径
+				});
+				
+				return;
+			}
+
 			// console.log('index.options:', options.card_number);
 			// console.log('index.options:', options.card_number);
 			if (!options.hasOwnProperty("card_number")) {
 			if (!options.hasOwnProperty("card_number")) {
 				uni.showLoading({
 				uni.showLoading({

+ 1 - 1
pages/my_orderlist/my_orderlist.vue

@@ -13,7 +13,7 @@
 		</scroll-view>
 		</scroll-view>
 		<!-- 订单样式 -->
 		<!-- 订单样式 -->
 		<view class="room-kuang">
 		<view class="room-kuang">
-			<view v-if="Inv == 2" class="cancel-rule">取消规则:未办理入住的订单在09月06号之前可以办理退款,09月06号凌晨后均不允许退款操作。</view>
+			<view v-if="Inv == 2" class="cancel-rule">取消规则:未办理入住的订单在入住当天前可以办理退款,入住当天凌晨后均不允许退款操作。</view>
 			<view class="room-xinxi" v-for="(item, index) in troom" :key="index">
 			<view class="room-xinxi" v-for="(item, index) in troom" :key="index">
 				<!-- <view @click="navigateToOrderMark(item.id)"> -->
 				<!-- <view @click="navigateToOrderMark(item.id)"> -->
 				<view>
 				<view>

+ 1 - 1
pages/order_room/order_room.vue

@@ -47,7 +47,7 @@
 			<text class="zhushi-mark"><text class="zhushi-circle"></text>入住免房费</text>
 			<text class="zhushi-mark"><text class="zhushi-circle"></text>入住免房费</text>
 			<text class="zhushi-mark"><text class="zhushi-circle"></text>提前选好房</text>
 			<text class="zhushi-mark"><text class="zhushi-circle"></text>提前选好房</text>
 		</view> -->
 		</view> -->
-		<view class="cancel-rule">取消规则:未办理入住的订单在09月06号之前可以办理退款,09月06号凌晨后均不允许退款操作。</view>
+		<view class="cancel-rule">取消规则:未办理入住的订单在入住当天前可以办理退款,入住当天凌晨后均不允许退款操作。</view>
 		<!-- 支付框 -->
 		<!-- 支付框 -->
 		<view class="fukuan">
 		<view class="fukuan">
 			<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥{{ payMount }}</view>
 			<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥{{ payMount }}</view>

+ 26 - 0
static/说明.txt

@@ -0,0 +1,26 @@
+系统开放,需要注释或释放的代码(系统关闭,相反过程)
+注释:
+1. App.vue
+	行:5 ~ 8
+	uni.redirectTo({
+		url: '/pages/default/default'
+	})
+	return;
+
+释放:
+1. App.vue
+	行:11
+		// this.accredit(options)
+
+作为所有页面pages的最后1个页面:
+1. pages.json
+	行:4 ~ 12
+		{
+			"path": "pages/default/default",
+			"style": {
+				"navigationBarTitleText": "公告",
+				"enablePullDownRefresh": false,
+				"transparentTitle": "always",
+				"disableScroll": true
+			}
+		},