fix: 修改背景图片

This commit is contained in:
zhangds 2024-06-04 12:00:02 +08:00
parent c32ff7e7ad
commit ac6d837840
3 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,6 @@
// const baseurl = "http://192.168.110.39:8080"; // 本地
const baseurl = "http://192.168.110.39:8080"; // 本地
// const baseurl = "http://lottery.unipay.test.86698.cn/api"; // 测试
const baseurl = "https://lottery.unipay.api.86698.cn"; // 正式
// const baseurl = "https://lottery.unipay.api.86698.cn"; // 正式
// 统一请求
// 返送之前
axios.interceptors.request.use((config) => {

View File

@ -8,14 +8,12 @@
width: 100%;
padding-bottom: 0.2rem;
position: relative;
background-color: #3387c2;
}
.banner {
width: 100%;
height: 3.68rem;
background: url("https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/department-of-finance/img/banner1.png?v=222")
no-repeat;
background-size: 100%;
}
.goods-box {

View File

@ -33,7 +33,9 @@
<body>
<div id="app">
<div v-if="state.showPage">
<div class="banner"></div>
<div class="banner"
:style="`background:url(${state.id === 11 ? state.bg[0] : state.bg[1]}) no-repeat;background-size: 100%;`">
</div>
<div class="goods-box">
<div class="goods-list-box-bg">
<div class="goods-list-box">
@ -119,6 +121,11 @@
createApp({
setup() {
const state = reactive({
bg: [
"https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/department-of-finance/img/banner1.png?v=222",
"https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/department-of-finance/img/banner2.png?v=333",
],
id: 11,
token: "",
showPage: false,
showPop: false,
@ -279,6 +286,7 @@
try {
req.axiosGet("/front/homeData").then(res => {
if (res.code === 200) {
state.id = res.data.id;
state.goodsList = res.data.prizes;
// 设置勾选
let el = res.data.prizes.find(item => item.is_receive === 1);