Commit 7b2de868 authored by liziwl's avatar liziwl
Browse files

update auto picker

parent 5612881b
Loading
Loading
Loading
Loading
+49 −45
Original line number Diff line number Diff line
@@ -46,22 +46,27 @@ export default {
        }
        if (is_holiday) {
          console.log("节假日");
          var bus_div = document.getElementById("bustable");
          var this_day_btn = bus_div.getElementsByTagName("button")[1];
          this_day_btn.click();
        } else {
          console.log("工作日");
          var bus_div = document.getElementById("bustable");
          var this_day_btn = bus_div.getElementsByTagName("button")[0];
          this_day_btn.click();
        }
      }
    },
  }
</script>

<div id="bustable">
  <object-selector :objs="{
    '工作日 Workday': true,
    '节假日 Holiday': false
    }"
    v-slot="weekdayProps">
    }" v-slot="weekdayProps">
    <br />
    <object-selector
      :objs="weekdayProps.selected ? {
    <object-selector :objs="weekdayProps.selected ? {
        'Line 1 号线 │ 工学院方向 To COE': '/bus_times/one_down.json',
        'Line 1 号线 │ 欣园方向 To Joy Highland': '/bus_times/one_up.json',
        'Line 2 号线 │ 科研楼方向 To Research Building': '/bus_times/two_down.json',
@@ -69,9 +74,7 @@ export default {
      } : {
        'Line 1 号线 │ 工学院方向  To COE': '/bus_times/one_down_holiday.json',
        'Line 1 号线 │ 欣园方向 To Joy Highland': '/bus_times/one_up_holiday.json'
      }"
      v-slot="routeProps"
    >
      }" v-slot="routeProps">
      <data-request :path="routeProps.selected" v-slot="{ data }">
        <bus-timer v-if="data" v-bind="data"></bus-timer>
        <grid-list v-if="data" :data="data.times">
@@ -79,6 +82,7 @@ export default {
      </data-request>
    </object-selector>
  </object-selector>
</div>

<Adsense_unit>
</Adsense_unit>
 No newline at end of file