Commit 07be67dd authored by Mac's avatar Mac

1

parent ad855a9c
...@@ -31,11 +31,16 @@ ...@@ -31,11 +31,16 @@
<el-form-item label="讲师国籍" prop="Nationality" class="is-required" size="small"> <el-form-item label="讲师国籍" prop="Nationality" class="is-required" size="small">
<el-input v-model="addMsg.Nationality" /> <el-input v-model="addMsg.Nationality" />
</el-form-item> </el-form-item>
<el-form-item label="是否外国人" size="small"> <el-form-item label="国旗" class="is-required" size="small">
<el-switch v-model="addMsg.IsForeigners" active-color="#409EFF" :active-value="1" <el-button @click="openChangeDig(2)" size="small">选择文件</el-button>
:inactive-value="0"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
</el-switch> <img v-if="!addMsg.ForeignersUrl || addMsg.ForeignersUrl==''"
src="../../assets/img/default.png" style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.ForeignersUrl"
alt="">
</div>
</el-form-item> </el-form-item>
<el-form-item label="上架状态" size="small"> <el-form-item label="上架状态" size="small">
<el-switch v-model="addMsg.TeacherStatus" active-color="#409EFF" :active-value="1" <el-switch v-model="addMsg.TeacherStatus" active-color="#409EFF" :active-value="1"
:inactive-value="2"> :inactive-value="2">
...@@ -100,8 +105,8 @@ ...@@ -100,8 +105,8 @@
WorkYears:'', WorkYears:'',
TeacherStatus:2, TeacherStatus:2,
LableNameList:'', LableNameList:'',
IsForeigners:0,//是否外国人0-否,1-是
Nationality:'',//老师国籍 Nationality:'',//老师国籍
ForeignersUrl:'',//国家图片
}, },
dynamicTags: [], dynamicTags: [],
inputVisible: false, inputVisible: false,
...@@ -165,6 +170,10 @@ ...@@ -165,6 +170,10 @@
let url = this.getIconLink(msg.url) let url = this.getIconLink(msg.url)
this.addMsg.TeacherLogo = url this.addMsg.TeacherLogo = url
} }
if(this.imgType==2){
let url = this.getIconLink(msg.url)
this.addMsg.ForeignersUrl = url
}
this.changeState = false; this.changeState = false;
}, },
...@@ -180,6 +189,10 @@ ...@@ -180,6 +189,10 @@
this.Error('请上传品牌Logo') this.Error('请上传品牌Logo')
return false return false
} }
if(this.addMsg.ForeignersUrl==''){
this.Error('请上传国家国旗')
return false
}
this.addMsg.LableNameList = this.dynamicTags this.addMsg.LableNameList = this.dynamicTags
let content = this.$refs.ue.getUEContent(); let content = this.$refs.ue.getUEContent();
...@@ -328,5 +341,7 @@ ...@@ -328,5 +341,7 @@
margin-left: 10px; margin-left: 10px;
vertical-align: bottom; vertical-align: bottom;
} }
.addLecturer .el-form-item__content{
line-height: 0;
}
</style> </style>
<style> <style>
/*-----------------设置部分--------------*/ /*-----------------设置部分--------------*/
.diy-goods .diy-component-edit .diy-goods-label { .diy-teacher .diy-component-edit .diy-teacher-label {
width: 85px; width: 85px;
} }
.diy-goods .diy-component-edit .cat-item { .diy-teacher .diy-component-edit .cat-item {
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
margin-bottom: 5px; margin-bottom: 5px;
padding: 15px; padding: 15px;
max-width: 400px; max-width: 400px;
} }
.diy-goods .diy-component-edit .goods-list { .diy-teacher .diy-component-edit .goods-list {
flex-wrap: wrap; flex-wrap: wrap;
} }
.diy-goods .diy-component-edit .goods-item, .diy-teacher .diy-component-edit .goods-item,
.diy-goods .diy-component-edit .goods-add { .diy-teacher .diy-component-edit .goods-add {
width: 50px; width: 50px;
height: 50px; height: 50px;
position: relative; position: relative;
...@@ -24,21 +24,21 @@ ...@@ -24,21 +24,21 @@
margin-bottom: 15px; margin-bottom: 15px;
} }
.diy-goods .diy-component-edit .goods-add .el-button { .diy-teacher .diy-component-edit .goods-add .el-button {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
} }
.diy-goods .diy-component-edit .goods-pic { .diy-teacher .diy-component-edit .goods-pic {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }
.diy-goods .diy-component-edit .goods-delete { .diy-teacher .diy-component-edit .goods-delete {
position: absolute; position: absolute;
left: calc(100% - 10px); left: calc(100% - 10px);
top: -10px; top: -10px;
...@@ -50,15 +50,15 @@ ...@@ -50,15 +50,15 @@
z-index: 1; z-index: 1;
} }
.diy-goods .diy-component-edit .goods-item:hover .goods-delete { .diy-teacher .diy-component-edit .goods-item:hover .goods-delete {
visibility: visible; visibility: visible;
} }
.diy-goods .diy-component-edit .cat-item-options { .diy-teacher .diy-component-edit .cat-item-options {
position: relative; position: relative;
} }
.diy-goods .diy-component-edit .cat-item-options .el-button { .diy-teacher .diy-component-edit .cat-item-options .el-button {
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
width: 25px; width: 25px;
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
/*-----------------预览部分--------------*/ /*-----------------预览部分--------------*/
.diy-goods .diy-component-preview .cat-list-left { .diy-teacher .diy-component-preview .cat-list-left {
width: 160px; width: 160px;
} }
.diy-goods .diy-component-preview .cat-item { .diy-teacher .diy-component-preview .cat-item {
height: 104px; height: 104px;
padding: 0 10px; padding: 0 10px;
text-align: center; text-align: center;
...@@ -86,55 +86,55 @@ ...@@ -86,55 +86,55 @@
white-space: nowrap; white-space: nowrap;
} }
.diy-goods .diy-component-preview .cat-list-left .cat-name { .diy-teacher .diy-component-preview .cat-list-left .cat-name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.diy-goods .diy-component-preview .cat-item.active { .diy-teacher .diy-component-preview .cat-item.active {
color: #ff4544; color: #ff4544;
} }
.diy-goods .diy-component-preview .cat-list-top .cat-item { .diy-teacher .diy-component-preview .cat-list-top .cat-item {
margin: 0 20px; margin: 0 20px;
} }
.diy-goods .diy-component-preview .cat-list-top { .diy-teacher .diy-component-preview .cat-list-top {
overflow-x: auto; overflow-x: auto;
} }
.diy-goods .diy-component-preview .cat-list-top.cat-style-1 .cat-item { .diy-teacher .diy-component-preview .cat-list-top.cat-style-1 .cat-item {
border-bottom: 4px solid transparent; border-bottom: 4px solid transparent;
} }
.diy-goods .diy-component-preview .cat-list-top.cat-style-2 .cat-name { .diy-teacher .diy-component-preview .cat-list-top.cat-style-2 .cat-name {
background: #ff4544; background: #ff4544;
color: #fff; color: #fff;
border-radius: 100px; border-radius: 100px;
padding: 0 18px; padding: 0 18px;
} }
.diy-goods .diy-component-preview .cat-list-top .cat-item.active { .diy-teacher .diy-component-preview .cat-list-top .cat-item.active {
border-bottom-color: #ff4544; border-bottom-color: #ff4544;
} }
.diy-goods .diy-component-preview .cat-list-left .cat-item { .diy-teacher .diy-component-preview .cat-list-left .cat-item {
border-left: 2px solid transparent; border-left: 2px solid transparent;
} }
.diy-goods .diy-component-preview .cat-list-left .cat-item.active { .diy-teacher .diy-component-preview .cat-list-left .cat-item.active {
border-left-color: #ff4544; border-left-color: #ff4544;
} }
.diy-goods .diy-component-preview .goods-list { .diy-teacher .diy-component-preview .goods-list {
padding: 11px; padding: 11px;
} }
.diy-goods .diy-component-preview .goods-item { .diy-teacher .diy-component-preview .goods-item {
padding: 11px; padding: 11px;
} }
.diy-goods .diy-component-preview .goods-pic { .diy-teacher .diy-component-preview .goods-pic {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
width: 99.8%; width: 99.8%;
...@@ -145,22 +145,22 @@ ...@@ -145,22 +145,22 @@
border-radius: 10px 10px 0 0; border-radius: 10px 10px 0 0;
} }
.diy-goods .diy-component-preview .goods-pic-3-2 { .diy-teacher .diy-component-preview .goods-pic-3-2 {
height: 471px; height: 471px;
} }
.diy-goods .diy-component-preview .goods-name { .diy-teacher .diy-component-preview .goods-name {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 10px; margin-bottom: 10px;
} }
.diy-goods .diy-component-preview .goods-name-static { .diy-teacher .diy-component-preview .goods-name-static {
height: 94px; height: 94px;
} }
.diy-goods .diy-component-preview .goods-price { .diy-teacher .diy-component-preview .goods-price {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -168,45 +168,47 @@ ...@@ -168,45 +168,47 @@
line-height: 48px; line-height: 48px;
} }
.diy-goods .diy-component-preview .goods-list-style--1 .goods-item, .diy-teacher .diy-component-preview .goods-list-style--1 .goods-item,
.diy-goods .diy-component-preview .goods-list-style-1 .goods-item { .diy-teacher .diy-component-preview .goods-list-style-1 .goods-item {
width: 100%; width: 100%;
} }
.diy-goods .diy-component-preview .goods-list-style-2 .goods-item { .diy-teacher .diy-component-preview .goods-list-style-2 .goods-item {
width: 50%; width: 50%;
} }
.diy-goods .diy-component-preview .goods-list-style-3 .goods-item { .diy-teacher .diy-component-preview .goods-list-style-3 .goods-item {
width: 33.333333%; width: 33.333333%;
} }
.diy-goods .diy-component-preview .goods-list-style-0 .goods-item { .diy-teacher .diy-component-preview .goods-list-style-0 .goods-item {
width: 249px; width: 249px;
} }
.diy-goods .diy-component-preview .goods-list-style--1 .goods-pic { .diy-teacher .diy-component-preview .goods-list-style--1 .goods-pic {
width: 200px; width: 200px;
height: 200px; height: 200px;
border-radius: 10px 0 0 10px; border-radius: 10px 0 0 10px;
} }
.diy-goods .diy-component-preview .goods-list-style-2 .goods-pic { .diy-teacher .diy-component-preview .goods-list-style-2 .goods-pic {
height: 342px; height: 342px;
border-radius: 10px 10px 0 0; border-radius: 10px 10px 0 0;
} }
.diy-goods .diy-component-preview .goods-list-style-0 .goods-pic, .diy-teacher .diy-component-preview .goods-list-style-0 .goods-pic,
.diy-goods .diy-component-preview .goods-list-style-3 .goods-pic { .diy-teacher .diy-component-preview .goods-list-style-3 .goods-pic {
height: 200px; width: 80px;
border-radius: 10px 10px 0 0; height: 80px;
border-radius: 50%;
margin-top: 20px;
} }
.diy-goods .diy-component-preview .goods-pic-fill-0 { .diy-teacher .diy-component-preview .goods-pic-fill-0 {
background-size: contain; background-size: contain;
} }
.diy-goods .diy-component-preview .buy-btn { .diy-teacher .diy-component-preview .buy-btn {
border-color: #ff4544; border-color: #ff4544;
color: #ff4544; color: #ff4544;
padding: 0 20px; padding: 0 20px;
...@@ -215,12 +217,12 @@ ...@@ -215,12 +217,12 @@
font-size: 24px; font-size: 24px;
} }
.diy-goods .diy-component-preview .buy-btn.el-button--primary { .diy-teacher .diy-component-preview .buy-btn.el-button--primary {
background-color: #ff4544; background-color: #ff4544;
color: #fff; color: #fff;
} }
.diy-goods .diy-component-preview .goods-tag { .diy-teacher .diy-component-preview .goods-tag {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -232,25 +234,25 @@ ...@@ -232,25 +234,25 @@
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.diy-goods hr { .diy-teacher hr {
border: none; border: none;
height: 1px; height: 1px;
background-color: #e2e2e2; background-color: #e2e2e2;
} }
.diy-goods .diy-component-preview .goods-item .buy-btn.is-round { .diy-teacher .diy-component-preview .goods-item .buy-btn.is-round {
border-radius: 24px; border-radius: 24px;
} }
.diy-goods .goods-item.goods-cat-list { .diy-teacher .goods-item.goods-cat-list {
border-top: 1px solid #e2e2e2; border-top: 1px solid #e2e2e2;
} }
.diy-goods .goods-item.goods-cat-list:first-of-type { .diy-teacher .goods-item.goods-cat-list:first-of-type {
border-top: 0; border-top: 0;
} }
.diy-goods .cat-list { .diy-teacher .cat-list {
max-height: 500px; max-height: 500px;
overflow: auto; overflow: auto;
} }
...@@ -270,7 +272,7 @@ ...@@ -270,7 +272,7 @@
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)" <el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)"
style="right: -25px; top: 30px;"></el-button> style="right: -25px; top: 30px;"></el-button>
</div> </div>
<div class="diy-goods"> <div class="diy-teacher">
<div class="diy-component-preview" :style="{'backgroundColor':data.backgroundColor,'borderRadius':data.SearchFilletPX+'px'}"> <div class="diy-component-preview" :style="{'backgroundColor':data.backgroundColor,'borderRadius':data.SearchFilletPX+'px'}">
<div :flex="cMainFlex" :style="{marginLeft:data.PaddingLeft+'px', <div :flex="cMainFlex" :style="{marginLeft:data.PaddingLeft+'px',
marginRight:data.PaddingRight+'px',marginTop:data.PaddingTop+'px', marginRight:data.PaddingRight+'px',marginTop:data.PaddingTop+'px',
...@@ -281,7 +283,7 @@ ...@@ -281,7 +283,7 @@
<div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex" <div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex"
:class="data.catPosition==='left'?'goods-cat-list':''"> :class="data.catPosition==='left'?'goods-cat-list':''">
<div style="display: inline-block;" :style="cGoodsItemWidth"> <div style="display: inline-block;" :style="cGoodsItemWidth">
<div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;border:1px solid rgb(226, 226, 226)"> <div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;border:1px solid rgb(226, 226, 226);display: flex;flex-direction: column;align-items: center">
<div class="goods-pic" <div class="goods-pic"
:class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill" :class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill"
:style="'background-image: url('+getIconLink(goods.picUrl)+')'"> :style="'background-image: url('+getIconLink(goods.picUrl)+')'">
...@@ -291,9 +293,10 @@ ...@@ -291,9 +293,10 @@
<template>{{goods.name}}</template> <template>{{goods.name}}</template>
</div> </div>
<div flex="box:last"> <div flex="box:last">
<div class="goods-price"> <div style="text-align: center">
<!-- <template>¥{{goods.price}}</template> --> <template>{{goods.nationality}}</template>
</div> </div>
<div> <div>
<template v-if="cShowBuyBtn"> <template v-if="cShowBuyBtn">
<template v-if="data.buyBtn==='cart'"> <template v-if="data.buyBtn==='cart'">
...@@ -309,6 +312,9 @@ ...@@ -309,6 +312,9 @@
</template> </template>
</div> </div>
</div> </div>
<div style="text-align: center">
<template>{{goods.lableName}}</template>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -324,9 +330,9 @@ ...@@ -324,9 +330,9 @@
<!-- <el-form-item label="老师添加">--> <!-- <el-form-item label="老师添加">-->
<!-- <el-radio v-model="data.addGoodsType" :label="0">自定义</el-radio>--> <!-- <el-radio v-model="data.addGoodsType" :label="0">自定义</el-radio>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item v-show="data.addGoodsType == 0" label="老师列表"> <el-form-item label="老师列表">
<draggable v-model="data.list" class="goods-list" style="display:flex;"> <draggable v-model="data.TeacherList" class="goods-list" style="display:flex;">
<div class="goods-item" v-for="(goods,goodsIndex) in data.list" :key="goodsIndex"> <div class="goods-item" v-for="(goods,goodsIndex) in data.TeacherList" :key="goodsIndex">
<el-tooltip effect="dark" content="移除老师" placement="top"> <el-tooltip effect="dark" content="移除老师" placement="top">
<el-button @click="deleteGoods(goodsIndex,null)" circle class="goods-delete" type="danger" <el-button @click="deleteGoods(goodsIndex,null)" circle class="goods-delete" type="danger"
icon="el-icon-close"></el-button> icon="el-icon-close"></el-button>
...@@ -372,7 +378,7 @@ ...@@ -372,7 +378,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="圆角"> <el-form-item label="圆角">
<el-input type="number" size="small" :min="0" v-model="data.SearchFilletPX"> <el-input type="number" size="small" :min="0" v-model="data.SearchFilletPX" >
<template slot="append">px</template> <template slot="append">px</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -472,9 +478,8 @@ ...@@ -472,9 +478,8 @@
}, },
deleteGoods(goodsIndex, catIndex) { deleteGoods(goodsIndex, catIndex) {
if (catIndex !== null) { if (catIndex !== null) {
} else { } else {
this.data.list.splice(goodsIndex, 1); this.data.TeacherList.splice(goodsIndex, 1);
} }
}, },
listStyleChange(listStyle) { listStyleChange(listStyle) {
...@@ -508,7 +513,7 @@ ...@@ -508,7 +513,7 @@
if (this.comIndex !== null) { if (this.comIndex !== null) {
} else { } else {
this.data.list = this.data.list.concat(myArray); this.data.TeacherList = this.data.TeacherList.concat(myArray);
} }
this.isShowGoods = false; this.isShowGoods = false;
this.$refs.choiceGood.toggleSelection(); this.$refs.choiceGood.toggleSelection();
...@@ -555,7 +560,7 @@ ...@@ -555,7 +560,7 @@
id: null, id: null,
name: null, name: null,
menuName: null, menuName: null,
goodsList: this.data.list, goodsList: this.data.TeacherList,
}]; }];
} }
}, },
...@@ -619,7 +624,7 @@ ...@@ -619,7 +624,7 @@
}, },
cGoodsItemWidth() { cGoodsItemWidth() {
if (this.data.listStyle === 0) { if (this.data.listStyle === 0) {
return 'width: 200px;'; return 'width: 240px;';
} }
return 'width: 100%;'; return 'width: 100%;';
}, },
......
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
<el-form-item label="是否开启"> <el-form-item label="是否开启">
<el-switch v-model="addMsg.IsShow" :active-value="1" :inactive-value="0"></el-switch> <el-switch v-model="addMsg.IsShow" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item> </el-form-item>
<el-form-item label="是否开启"> <el-form-item label="音频时间">
<el-input placeholder="请输入内容" v-model="addMsg.Seconds" size="small" type="number" :min="0" style="max-width:600px"> <el-input placeholder="请输入内容" v-model="addMsg.Seconds" size="small" type="number" :min="0" style="max-width:600px">
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品视频"> <el-form-item label="音频地址">
<el-input v-model="addMsg.MusicUrl" size="small" placeholder="请输入内容" style="max-width:600px"> <el-input v-model="addMsg.MusicUrl" size="small" placeholder="请输入内容" style="max-width:600px">
<el-button @click="changevideo = true" slot="append">添加</el-button> <el-button @click="changevideo = true" slot="append">添加</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
......
...@@ -1446,7 +1446,7 @@ ...@@ -1446,7 +1446,7 @@
PaddingBottom:0, //下边距 PaddingBottom:0, //下边距
PaddingLeft:0, //左边距 PaddingLeft:0, //左边距
PaddingRight:0, //右边距 PaddingRight:0, //右边距
list: [], //商品列表 TeacherList: [], //商品列表
} }
} }
this.dataList.push(lsObj); this.dataList.push(lsObj);
......
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