浏览代码

志愿者首页

chenjj 3 月之前
父节点
当前提交
4cda20ee19
共有 1 个文件被更改,包括 4 次插入4 次删除
  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" />