Kaynağa Gözat

左上角搜索区分

jiayubo 3 ay önce
ebeveyn
işleme
6c34cda350
1 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 8 4
      pages/index.vue

+ 8 - 4
pages/index.vue

@@ -2,14 +2,14 @@
   <view>
     <!-- 首页顶部定位区域 -->
     <view class="home-banner" :class="{ 'home-banner-with-bg': showAddressBg }">
-      <view class="home-banner-left">
+      <view class="home-banner-left" :class="{ 'with-bg': userType == 1 }">
         <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>
           <image src="/static/img/Subscript.png" mode="widthFix" class="map-pin-Subscript"></image>
         </view>
-        <view class="address-text-bg"></view>
-        <view class="search-group" @click="searchClick">
+        <view class="address-text-bg" v-if="userType == 1"></view>
+        <view class="search-group" @click="searchClick" v-if="userType == 1">
           <img src="/static/img/map-pin-fill@1x.png" alt="" class="arrow-right">
           <view class="address-text-bg-text">搜索服务</view>
         </view>
@@ -350,9 +350,13 @@ onMounted(async () => {
     width: 516rpx;
     height: 64rpx;
     border-radius: 36rpx;
-    background: rgba(255, 255, 255, 0.56);
+    background: transparent;
     margin-left: 16rpx;
 
+    &.with-bg {
+      background: rgba(255, 255, 255, 0.56);
+    }
+
     .location-group {
       display: flex;
       align-items: center;