Chore(首页):代码注释&去掉多余代码

This commit is contained in:
lifizer
2024-07-31 21:49:37 +08:00
parent 46b4f05a6b
commit 1033e0ee04
2 changed files with 6 additions and 13 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
/> />
<image <image
v-if="item.isOldBrand" v-if="item.isOldBrand"
:src="webUrl + '/home/old-mark'" :src="webUrl + '/home/old-mark.png'"
class="mark-img" class="mark-img"
/> />
<image <image
+5 -12
View File
@@ -150,7 +150,7 @@
@click="hotelItemClickHandle(hotelItem)" @click="hotelItemClickHandle(hotelItem)"
> >
<image :src="webUrl + '/home/home-number' + (hotelIndex + 1) + '.png'" class="mark" /> <image :src="webUrl + '/home/home-number' + (hotelIndex + 1) + '.png'" class="mark" />
<image :src="webUrl + '/home/icon-hotel-btn'" class="btn" /> <image :src="webUrl + '/home/icon-hotel-btn.png'" class="btn" />
<image :src="hotelItem.logo" class="logo" /> <image :src="hotelItem.logo" class="logo" />
<view class="info"> <view class="info">
<view class="name one-t">{{ hotelItem.name }}</view> <view class="name one-t">{{ hotelItem.name }}</view>
@@ -245,7 +245,6 @@
<script> <script>
import XddTabbar from '@/components/xdd-tabbar' import XddTabbar from '@/components/xdd-tabbar'
import XddProductItem from '@/components/xdd-product-item' import XddProductItem from '@/components/xdd-product-item'
import { mapGetters } from 'vuex'
import { getCouponReceive } from '@/api/user' import { getCouponReceive } from '@/api/user'
import { getHomeData, getShareImage } from '@/api/public' import { getHomeData, getShareImage } from '@/api/public'
import { sharpBannar } from '@/api/goods' import { sharpBannar } from '@/api/goods'
@@ -290,15 +289,15 @@ export default {
// 老用户弹窗 // 老用户弹窗
isOldUser: true, isOldUser: true,
oldUserPopup: {}, oldUserPopup: {},
// 民宿专题轮播
contentHomestay: [], contentHomestay: [],
// 节日专题
contentFestival: {}, contentFestival: {},
seasonalFood: {},
pageKeyId: Object.freeze('appIndex'), pageKeyId: Object.freeze('appIndex'),
scrollTop: 0 scrollTop: 0
} }
}, },
computed: mapGetters(['userInfo', 'isLogin']), onLoad() {
onLoad(options) {
uni.hideTabBar() uni.hideTabBar()
const _this = this const _this = this
_this.init() _this.init()
@@ -315,11 +314,6 @@ export default {
} }
}) })
}, },
onShow() {
const today = new Date()
this.month = today.getMonth() + 1
this.date = today.getDate()
},
onHide() { onHide() {
this.pageToHideHandle() this.pageToHideHandle()
}, },
@@ -343,6 +337,7 @@ export default {
}) })
this.getLocationData() this.getLocationData()
}, },
// 定位失败,重新唤起定位授权
reLocateHandle() { reLocateHandle() {
if (this.cityName) return if (this.cityName) return
getLocationSetting(() => openLocationSettting().then(() => { getLocationSetting(() => openLocationSettting().then(() => {
@@ -525,8 +520,6 @@ export default {
.slider-banner { .slider-banner {
position: relative; position: relative;
z-index: 2; z-index: 2;
width: auto !important;
-webkit-transform: rotate(0);
} }
.subject-box { .subject-box {
padding: 12rpx; padding: 12rpx;