Quellcode durchsuchen

活动图标显隐

skyline vor 1 Jahr
Ursprung
Commit
b181e32cc5

+ 1 - 1
src/components/charge-station/charge-station.vue

@@ -12,7 +12,7 @@
       <view>
         <view class="flex flex-align-center">
           <view class="fs-32 fw-bold" @click.stop="detail">{{ title }}</view>
-          <image class="ml-10" src="/static/images/coupon-center.png" mode="widthFix" style="width:32rpx"/>
+          <image class="ml-10" src="/static/images/coupon-center.png" mode="widthFix" style="width:32rpx" v-show="activityList&&activityList.length>0"/>
           <view class="coupon-box ml-5" @click.stop="toCouponCenter"
                 v-if="activityList&&activityList.length>0"
                 @touchstart="touchstart"

+ 2 - 2
src/pages-charge/machines/machines.vue

@@ -30,10 +30,9 @@
       <view class="station flex-column" v-if="canUseCount >= 0">
         <view style="display: inline-flex;align-items: center;">
           <view class="fs-40 fw-600 color-000">{{ title }}</view>
-          <image class="ml-10" src="/static/images/coupon-center.png" mode="widthFix" style="width:32rpx"/>
+          <image class="ml-10" src="/static/images/coupon-center.png" mode="widthFix" style="width:32rpx" v-show="location.activityList&&location.activityList.length>0"/>
           <view class="coupon-box ml-5"
                 v-if="location.activityList&&location.activityList.length>0"
-                @tap.stop="toCouponCenter"
           >
             <text @tap.stop="showStationCoupon">活动中</text>
           </view>
@@ -206,6 +205,7 @@ const location = ref({
   address: "",
   latitude: "",
   longitude: "",
+  activityList:[],
 });
 
 const station = ref();