Ver código fonte

志愿者首页

chenjj 3 meses atrás
pai
commit
4cda20ee19
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      pages/index.vue

+ 4 - 4
pages/index.vue

@@ -1,8 +1,8 @@
 <template>
   <view>
     <!-- 首页顶部定位区域 -->
-    <view class="home-banner" :class="{ 'home-banner-with-bg': showAddressBg }">
-      <view class="home-banner-left" :class="{ 'with-bg': userType == 1 }">
+    <view class="home-banner" :class="showAddressBg ? 'home-banner-with-bg' : ''">
+      <view class="home-banner-left" :class="userType == 1 && 'with-bg'">
         <view class="location-group" @click="cityClick">
           <img src="@/static/uview/common/map-pin-fill@1x.png" alt="" class="map-pin-fill">
           <text class="address-text">{{ data.address.name }}</text>
@@ -36,9 +36,9 @@
         </view>
       </view>
 
-      <Order v-if="userType === 2"/>
+      <Order v-if="userType === 2" />
 
-      <view class="home-ranking" :class="{ 'no-margin': userType === 2 }">
+      <view class="home-ranking" :class="userType === 2 && 'no-margin'">
         <ServIces :leftList="leftList" :rightList="rightList" :ValueZoneSwiper="ValueZoneSwiper" v-if="userType == 1">
         </ServIces>
         <RankingList v-if="userType === 2" />