|
|
@@ -1,8 +1,7 @@
|
|
|
<template>
|
|
|
<app-view class="market">
|
|
|
<template #header>
|
|
|
- <app-navbar class="market-header" :show-back-button="false"
|
|
|
- :style="topBG" />
|
|
|
+ <app-navbar class="market-header" :show-back-button="false" :style="topBG" />
|
|
|
<div style="padding: 12px;font-size: 14px;display: flex;justify-content: space-between;">
|
|
|
<span>
|
|
|
{{ serverTime?.format('YYYY/MM/DD HH:mm:ss') }}
|
|
|
@@ -83,7 +82,7 @@ const subscribe = quoteSocket.createSubscribe()
|
|
|
const subscribeData = shallowRef<string[]>([])
|
|
|
// 系统时间
|
|
|
const serverTime = ref<Moment>()
|
|
|
-const topBG = ref<string>('--header-bg:url(\'../img/market-title-bg.jpg\')')
|
|
|
+const topBG = ref('')
|
|
|
|
|
|
// 请求背景图
|
|
|
useRequest(queryImageConfigs, {
|
|
|
@@ -91,9 +90,9 @@ useRequest(queryImageConfigs, {
|
|
|
imageType: 2
|
|
|
},
|
|
|
onSuccess: (res) => {
|
|
|
- console.log(res.data)
|
|
|
- if (res.data.length != 0) {
|
|
|
- topBG.value = `${getFileUrl(res.data[0].imagepath)}`
|
|
|
+ const [firstItem] = res.data
|
|
|
+ if (firstItem) {
|
|
|
+ topBG.value = `--header-bg:url(${getFileUrl(firstItem.imagepath)})`
|
|
|
}
|
|
|
}
|
|
|
})
|