Commit a6926dc2 authored by 黄奎's avatar 黄奎

页面修改

parent 3d2add3c
<style>
.customPoster .custom_Main {
display: flex;
}
......@@ -330,9 +329,11 @@
margin: 5px;
padding: 0 5px;
}
.activeCustomer {
border: 1px solid #409eff!important;
.activeCustomer {
border: 1px solid #409eff !important;
}
.custom_rightCheck .el-radio {
height: 32px;
line-height: 32px;
......@@ -374,11 +375,11 @@
<div class="custom_Main">
<div class="custom_mobile_box">
<div class="custom_bg_box">
<div class="custom_bg_pic" :style="{ backgroundImage:'url('+ShareMsg.PosterBgImg+')'}">
<div class="custom_bg_pic" :style="{ backgroundImage:'url('+ShareMsg.LiveBgImg+')'}">
</div>
<div class="custom_AppImage" v-if="ShareMsg.IsShowQrCode==0" :style="{left:ShareMsg.QrCodePaddingLeft+'px',
width:ShareMsg.QrCodeSize+'px',height:ShareMsg.QrCodeSize+'px',top:ShareMsg.QrCodePaddingTop+'px',
'borderRadius':ShareMsg.QrCodeType==0?'50%':'0%'}"></div>
<div class="custom_AppImage" v-if="ShareMsg.IsShowQrCode==0" :style="{left:ShareMsg.LiveQrCodePaddingLeft+'px',
width:ShareMsg.LiveQrCodeSize+'px',height:ShareMsg.LiveQrCodeSize+'px',top:ShareMsg.LiveQrCodePaddingTop+'px',
'borderRadius':ShareMsg.LiveQrCodeType==0?'50%':'0%'}"></div>
</div>
</div>
<div class="custom_formBody">
......@@ -387,35 +388,32 @@
<div class="el-card__header">二维码设置</div>
<el-form label-width="20%" style="padding:20px;">
<el-form-item label="样式" size="small">
<el-radio-group v-model="ShareMsg.QrCodeType">
<el-radio-group v-model="ShareMsg.LiveQrCodeType">
<el-radio :label="0">圆形</el-radio>
<el-radio :label="1">方形</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="大小" size="small">
<el-slider v-model="ShareMsg.QrCodeSize" @change="getCodeMax(ShareMsg.QrCodeSize)" :max="300"
<el-slider v-model="ShareMsg.LiveQrCodeSize" @change="getCodeMax(ShareMsg.LiveQrCodeSize)" :max="300"
show-input>
</el-slider>
</el-form-item>
<el-form-item label="上边距" size="small">
<el-slider v-model="ShareMsg.QrCodePaddingTop" :max="maxTwocodeTop" show-input></el-slider>
<el-slider v-model="ShareMsg.LiveQrCodePaddingTop" :max="maxTwocodeTop" show-input></el-slider>
</el-form-item>
<el-form-item label="左边距" size="small">
<el-slider v-model="ShareMsg.QrCodePaddingLeft" :max="maxTwocodeLeft" show-input></el-slider>
<el-slider v-model="ShareMsg.LiveQrCodePaddingLeft" :max="maxTwocodeLeft" show-input></el-slider>
</el-form-item>
</el-form>
</template>
</div>
<div class="customShareBtn">
<el-button size="small" type="primary" @click="SetFenXiaoPoster()">保存</el-button>
<el-button size="small" type="primary" @click="SetLiveConfig()">保存</el-button>
</div>
</div>
</div>
</template>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
......@@ -427,16 +425,15 @@
//二维码最大左边距
maxTwocodeLeft: 0,
//分销默认背景图
sharePosterDefaultImg: this.domainManager().ImageUrl + '/Static/shareposterdefault.jpg',
sharePosterDefaultImg: this.domainManager().ImageUrl + '/Static/livedefault.jpg',
//分销海报
ShareMsg: {
Id: 0,
PosterBgImg: "", //海报背景图
IsShowQrCode: 0, //是否显示二维码(0-显示,1-不显示)
QrCodeSize: 0, //二维码大小
QrCodePaddingTop: 0, //二维码上间距
QrCodePaddingLeft: 0, //二维码左间距
QrCodeType: 0, //二维码形状(0-圆形,1-方形)
LiveBgImg: "", //海报背景图
LiveQrCodeSize: 0, //二维码大小
LiveQrCodePaddingTop: 0, //二维码上间距
LiveQrCodePaddingLeft: 0, //二维码左间距
LiveQrCodeType: 0, //二维码形状(0-圆形,1-方形)
},
};
},
......@@ -444,31 +441,30 @@
methods: {
//拉伸二维码尺寸动态设置最大值
getCodeMax(chicun) {
this.maxTwocodeTop = 1334 - chicun;
this.maxTwocodeLeft = 750 - chicun;
this.maxTwocodeTop = 1334 - chicun;
this.maxTwocodeLeft = 750 - chicun;
},
//获取分销海报
GetFenXiaoPoster() {
this.apipost("/api/Tenant/GetFenXiaoPoster", {}, res => {
GetLiveConfig() {
this.apipost("/api/Tenant/GetLiveConfig", {}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
if (jsonData) {
this.ShareMsg.Id = jsonData.Id;
this.ShareMsg.PosterBgImg = jsonData.PosterBgImg;
this.ShareMsg.LiveBgImg = jsonData.LiveBgImg;
this.ShareMsg.IsShowQrCode = jsonData.IsShowQrCode;
this.ShareMsg.QrCodePaddingTop = jsonData.QrCodePaddingTop;
this.ShareMsg.QrCodePaddingLeft = jsonData.QrCodePaddingLeft;
this.ShareMsg.QrCodeSize = jsonData.QrCodeSize;
this.ShareMsg.QrCodeType = jsonData.QrCodeType;
this.ShareMsg.LiveQrCodePaddingTop = jsonData.LiveQrCodePaddingTop;
this.ShareMsg.LiveQrCodePaddingLeft = jsonData.LiveQrCodePaddingLeft;
this.ShareMsg.LiveQrCodeSize = jsonData.LiveQrCodeSize;
this.ShareMsg.LiveQrCodeType = jsonData.LiveQrCodeType;
} else {
this.ShareMsg.PosterBgImg = this.sharePosterDefaultImg;
this.ShareMsg.LiveBgImg = this.sharePosterDefaultImg;
this.ShareMsg.IsShowQrCode = 0;
this.ShareMsg.QrCodeSize = 162;
this.ShareMsg.QrCodePaddingTop = 1022;
this.ShareMsg.QrCodePaddingLeft = 76;
this.ShareMsg.QrCodeSize = 162;
this.ShareMsg.QrCodeType = 0;
this.ShareMsg.LiveQrCodeSize = 162;
this.ShareMsg.LiveQrCodePaddingTop = 1022;
this.ShareMsg.LiveQrCodePaddingLeft = 76;
this.ShareMsg.LiveQrCodeSize = 162;
this.ShareMsg.LiveQrCodeType = 0;
}
} else {
this.Error(res.data.message);
......@@ -476,14 +472,21 @@
})
},
//添加修改分销海报
SetFenXiaoPoster() {
SetLiveConfig() {
this.apipost("/api/Tenant/SetLiveConfig", this.ShareMsg, res => {
if (res.data.resultCode == 1) {
this.GetLiveConfig();
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
}
},
mounted() {
this.maxTwocodeTop = 1334 - this.ShareMsg.QrCodeSize;
this.maxTwocodeLeft = 750 - this.ShareMsg.QrCodeSize;
this.GetFenXiaoPoster();
this.GetLiveConfig();
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment