解决C端适配

This commit is contained in:
red-deng-deng 2021-11-30 00:16:15 +08:00
parent 79ddf9d6f6
commit 2de538da04
2 changed files with 7 additions and 6 deletions

View File

@ -15,7 +15,6 @@
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage.css?v=1"> <link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage.css?v=1">
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css"> <link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css">
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api.js?v=1"></script> <script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api.js?v=1"></script>
<!-- <link rel="stylesheet" href="./homepage.css"> -->
</head> </head>
<style scoped> <style scoped>
* { * {
@ -228,7 +227,7 @@
popboxshow: false, popboxshow: false,
popboxtype: '兑换', popboxtype: '兑换',
topImg: '', topImg: '',
goodsShow:false, goodsShow:true,
goodsNum: false, goodsNum: false,
exchangeCommity: {}, //兑换选择的商品 exchangeCommity: {}, //兑换选择的商品
bgcolor: '', bgcolor: '',
@ -267,7 +266,7 @@
req.axiosPostproducts('/key/products', data).then(res => { req.axiosPostproducts('/key/products', data).then(res => {
if (res.code == 200) { if (res.code == 200) {
self.swiperDataList = res.data; self.swiperDataList = res.data;
self.goodsShow=res.data.length>=3; self.goodsShow=res.data.length>3;
if (res.data&&res.data.length>0) { if (res.data&&res.data.length>0) {
self.goodsNum = true; self.goodsNum = true;
self.onSelected(res.data[0]) self.onSelected(res.data[0])
@ -278,7 +277,7 @@
centeredSlides: true, centeredSlides: true,
observer: true, observer: true,
observeParents: true, observeParents: true,
loop: self.goodsShow, loop: true,
onSlideChangeEnd: function (swiper) { onSlideChangeEnd: function (swiper) {
let row = res.data[swiper.realIndex]; let row = res.data[swiper.realIndex];
self.onSelected(res.data[swiper.realIndex]) self.onSelected(res.data[swiper.realIndex])

View File

@ -158,8 +158,8 @@
</div> </div>
<div class="center" id="center"> <div class="center" id="center">
<img :src="imgList[1]" style="position: absolute;z-index: 1;" id="center_img"> <img :src="imgList[1]" style="position: absolute;z-index: 1;" id="center_img">
<input class="key" :maxlength="16" placeholder="请输入兑换码" v-model="key"/> <input class="key" :maxlength="16" :style={color:bgcolor?bgcolor:'#333'} placeholder="请输入兑换码" v-model="key"/>
<input class="code" :maxlength="5" placeholder="请输入验证码" v-model="code" /> <input class="code" :maxlength="5" :style={color:bgcolor?bgcolor:'#333'} placeholder="请输入验证码" v-model="code" />
<img src="#" alt="" class="codeimg" id="captcha_img" @click="changeyzmFn()"/> <img src="#" alt="" class="codeimg" id="captcha_img" @click="changeyzmFn()"/>
<div class="submit" @click="submit"></div> <div class="submit" @click="submit"></div>
</div> </div>
@ -179,6 +179,7 @@
key:'', key:'',
code:'', code:'',
imgList:[], imgList:[],
bgcolor:'#333',
promttip:'', promttip:'',
promtshow:false, promtshow:false,
popboxshow:false, popboxshow:false,
@ -196,6 +197,7 @@
if(res.code==200){ if(res.code==200){
self.loading=false; self.loading=false;
self.planData=res.data; self.planData=res.data;
self.bgcolor=res.data.bg_color;
let imgListobj=res.data.images; let imgListobj=res.data.images;
let imgarr=[] let imgarr=[]
for(let i in imgListobj){ for(let i in imgListobj){