Browse Source

fix: 🧩 搜索新增敬请期待

pull/6/head
liyongle 3 years ago
parent
commit
daf5296bde
  1. BIN
      src/assets/images/empty.png
  2. 9
      src/components/Search/Hot.vue
  3. 5
      src/components/Search/Result.vue
  4. 6
      src/composables/useHandleScreen.ts

BIN
src/assets/images/empty.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

9
src/components/Search/Hot.vue

@ -1,7 +1,7 @@
<template> <template>
<div v-if="list.length" class="hot-container">
<div class="hot-container">
<div class="title">{{ $t('hot') }}</div> <div class="title">{{ $t('hot') }}</div>
<ScrollView class="myScoll" :list="list" :pull-up="false">
<ScrollView v-if="list.length" class="myScoll" :list="list" :pull-up="false">
<div class="shop_list"> <div class="shop_list">
<div v-for="item in list" :key="item.shopCode" class="shop_item" @click="show(item)"> <div v-for="item in list" :key="item.shopCode" class="shop_item" @click="show(item)">
<div class="top"> <div class="top">
@ -17,6 +17,9 @@
</div> </div>
</div> </div>
</ScrollView> </ScrollView>
<div v-else>
<img src="@/assets/images/empty.png" alt="" />
</div>
</div> </div>
</template> </template>
@ -28,7 +31,7 @@ import { useStatistics } from '@/composables/useStatistics'
import ScrollView from '@/base/ScrollView/ScrollView.vue' import ScrollView from '@/base/ScrollView/ScrollView.vue'
const list = ref<HotSearch[]>([]) const list = ref<HotSearch[]>([])
getIndexJson().then(({ data }) => { getIndexJson().then(({ data }) => {
list.value = data.hotSearch
list.value = []
}) })
const store = useRootStore() const store = useRootStore()

5
src/components/Search/Result.vue

@ -16,7 +16,7 @@
</div> </div>
</div> </div>
</ScrollView> </ScrollView>
<img v-else class="empty" src="@/assets/images/nodata.svg" alt="" />
<img v-else class="empty" src="@/assets/images/empty.png" alt="" />
</div> </div>
</template> </template>
@ -110,8 +110,9 @@ function show(item: Shop) {
} }
} }
} }
.empty { .empty {
margin-left: 45px;
margin-left: -65px;
} }
} }
</style> </style>

6
src/composables/useHandleScreen.ts

@ -68,9 +68,11 @@ export const useHandleScreen = (callback: () => void) => {
await sleepToIndex() await sleepToIndex()
callback() callback()
} }
await sleepToWallpaper()
if (totalTime.value[1] !== -1) {
await sleepToWallpaper()
callback()
}
window?.android?.goScreenSave() //进入屏保 window?.android?.goScreenSave() //进入屏保
callback()
}, DELAY_CHECK_TIME) }, DELAY_CHECK_TIME)
} }

Loading…
Cancel
Save