浏览代码

fix: 背景图拉伸导致边框颜色突出

chenlei 2 年之前
父节点
当前提交
dcc688c453
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      config/config.json
  2. 1 1
      pages/index/index.wxml
  3. 2 2
      pages/index/index.wxss

+ 2 - 2
config/config.json

@@ -1,7 +1,7 @@
 {
 {
   "title": "婚庆文化沉浸体验展",
   "title": "婚庆文化沉浸体验展",
   "banner": {
   "banner": {
-    "margin": "11rpx",
+    "style": "margin: 11rpx;",
     "btmShadow": true,
     "btmShadow": true,
     "border": {
     "border": {
       "width": "28rpx",
       "width": "28rpx",
@@ -52,5 +52,5 @@
     "bg": "/images/img-bd.png"
     "bg": "/images/img-bd.png"
   },
   },
   "timerBdImgPath": "/images/timer-bd.png",
   "timerBdImgPath": "/images/timer-bd.png",
-  "globalVar": "--record-title-color:rgba(0,0,0,0.6);--record-inner-color:rgba(0,0,0,0.6);--primary-color:#b78a2d;--text-color:rgba(0, 0, 0, 0.6);--text-tips-color:#898989;"
+  "globalVar": "--bg-color:#FFDEBB;--record-title-color:rgba(0,0,0,0.6);--record-inner-color:rgba(0,0,0,0.6);--primary-color:#b78a2d;--text-color:rgba(0, 0, 0, 0.6);--text-tips-color:#898989;"
 }
 }

+ 1 - 1
pages/index/index.wxml

@@ -1,7 +1,7 @@
 <!--index.wxml-->
 <!--index.wxml-->
 <view class="container" style="{{info.globalVar}}">
 <view class="container" style="{{info.globalVar}}">
   <view wx:if="{{info.globalVar}}" class="body" style="background-image:url({{cdn_url}}/images/bg.jpg);">
   <view wx:if="{{info.globalVar}}" class="body" style="background-image:url({{cdn_url}}/images/bg.jpg);">
-    <view wx:if="{{info.banner.list.length}}" class="swp">
+    <view wx:if="{{info.banner.list.length}}" class="swp" style="{{info.banner.style}}">
       <block wx:if="{{info.banner.border}}">
       <block wx:if="{{info.banner.border}}">
         <image style="width:{{info.banner.border.width}}" class="swp__bd top lf" src="{{cdn_url+info.banner.border['tp-lf']}}" mode="widthFix" />
         <image style="width:{{info.banner.border.width}}" class="swp__bd top lf" src="{{cdn_url+info.banner.border['tp-lf']}}" mode="widthFix" />
         <image style="width:{{info.banner.border.width}}" class="swp__bd top rt" src="{{cdn_url+info.banner.border['tp-rf']}}" mode="widthFix" />
         <image style="width:{{info.banner.border.width}}" class="swp__bd top rt" src="{{cdn_url+info.banner.border['tp-rf']}}" mode="widthFix" />

+ 2 - 2
pages/index/index.wxss

@@ -6,12 +6,12 @@
 .body {
 .body {
   min-height: 100vh;
   min-height: 100vh;
   overflow-y: auto;
   overflow-y: auto;
-  background: no-repeat center / cover;
+  background: no-repeat top / 100% auto;
+  background-color: var(--bg-color);
 }
 }
 
 
 .swp {
 .swp {
   position: relative;
   position: relative;
-  margin: 11rpx;
 }
 }
 .swp__shadow {
 .swp__shadow {
   position: absolute;
   position: absolute;