Commit 3104ce49 authored by zhengke's avatar zhengke

修改组件

parent 366bfb2d
...@@ -358,17 +358,6 @@ ...@@ -358,17 +358,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`; `background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
...@@ -433,11 +433,9 @@ ...@@ -433,11 +433,9 @@
<el-form-item v-if="data.type === 'before-video'" label="视频播放链接" prop="video_url"> <el-form-item v-if="data.type === 'before-video'" label="视频播放链接" prop="video_url">
<el-input v-model="data.video_url" placeholder="请输入视频原地址或选择上传视频"> <el-input v-model="data.video_url" placeholder="请输入视频原地址或选择上传视频">
<template slot="append"> <template slot="append">
<!-- <app-attachment :multiple="false" :max="1" v-model="data.video_url" type="video"> --> <el-tooltip class="item" effect="dark" content="支持格式mp4;支持编码H.264;视频大小不能超过50 MB" placement="top">
<el-tooltip class="item" effect="dark" content="支持格式mp4;支持编码H.264;视频大小不能超过50 MB" placement="top"> <el-button size="mini" @click="changeState1=true">添加视频</el-button>
<el-button size="mini" @click="choicImg=true">添加视频</el-button> </el-tooltip>
</el-tooltip>
<!-- </app-attachment> -->
</template> </template>
</el-input> </el-input>
<el-link class="box-grow-0" type="primary" style="font-size:12px" v-if='data.video_url' :underline="false" <el-link class="box-grow-0" type="primary" style="font-size:12px" v-if='data.video_url' :underline="false"
...@@ -499,20 +497,26 @@ ...@@ -499,20 +497,26 @@
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px"> <el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg> <ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog> </el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
export default { export default {
props: ["advData", "index", "dataLeng"], props: ["advData", "index", "dataLeng"],
components: { components: {
ChooseImg ChooseImg,
Choosevideo
}, },
data() { data() {
return { return {
loading: false, loading: false,
choicImg:false, choicImg:false,
changeState1:false,
data: this.advData.data, data: this.advData.data,
}; };
...@@ -532,22 +536,16 @@ ...@@ -532,22 +536,16 @@
couponClose(row, index) { couponClose(row, index) {
row.award_coupons.splice(index, 1); row.award_coupons.splice(index, 1);
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
this.data.pic_url = msg.url; this.data.pic_url = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//选择视频
Selectvideo(val){
this.data.video_url=val.Path;
this.changeState1=false;
}
}, },
computed: { computed: {
......
...@@ -350,17 +350,6 @@ ...@@ -350,17 +350,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`; `background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
...@@ -330,17 +330,6 @@ ...@@ -330,17 +330,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`; `background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
...@@ -95,16 +95,6 @@ ...@@ -95,16 +95,6 @@
this.data.backgroundPicUrl = msg.url; this.data.backgroundPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
// 热区选择(edit) // 热区选择(edit)
selectHotspot(e) { selectHotspot(e) {
if (e && e.length) { if (e && e.length) {
......
...@@ -92,16 +92,6 @@ ...@@ -92,16 +92,6 @@
this.data.picUrl = msg.url; this.data.picUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接 //获取选择链接
getChoiceLink() { getChoiceLink() {
//调用子组件方法 //调用子组件方法
......
...@@ -136,16 +136,6 @@ ...@@ -136,16 +136,6 @@
} }
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
}, },
computed: { computed: {
cListStyle() { cListStyle() {
......
...@@ -675,17 +675,6 @@ ...@@ -675,17 +675,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url){
let str=''
if(url.indexOf('http')!=-1){
str=url
}else{
str= 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+url
}
return str;
},
//选择商品分类 //选择商品分类
getChoiceFenlei(){ getChoiceFenlei(){
var ckedArr=this.$refs.ChooseFenlei.getChoicedFenlei(); var ckedArr=this.$refs.ChooseFenlei.getChoicedFenlei();
......
...@@ -389,17 +389,6 @@ ...@@ -389,17 +389,6 @@
} }
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`; `background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
...@@ -281,16 +281,6 @@ ...@@ -281,16 +281,6 @@
this.data.picUrl = msg.url; this.data.picUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接 //获取选择链接
getChoiceLink() { getChoiceLink() {
//调用子组件方法 //调用子组件方法
......
...@@ -333,16 +333,6 @@ ...@@ -333,16 +333,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
......
...@@ -103,16 +103,6 @@ ...@@ -103,16 +103,6 @@
this.data.backgroundPicUrl = msg.url; this.data.backgroundPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//得到地图信息 //得到地图信息
mapEvent(e) { mapEvent(e) {
this.data.location = e.lat + ',' + e.long; this.data.location = e.lat + ',' + e.long;
......
...@@ -205,17 +205,6 @@ ...@@ -205,17 +205,6 @@
this.data.list[this.comImgIndex].link.url = obj.PageUrl; this.data.list[this.comImgIndex].link.url = obj.PageUrl;
this.isShowLink = false; this.isShowLink = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
}, },
computed: { computed: {
......
...@@ -377,16 +377,6 @@ ...@@ -377,16 +377,6 @@
this.commonIndex=index; this.commonIndex=index;
this.selectType=2; this.selectType=2;
}, },
//判断是否包含http
getIconLink(url){
let str=''
if(url.indexOf('http')!=-1){
str=url
}else{
str= 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+url
}
return str;
},
//点击触发父组件删除 //点击触发父组件删除
delPlugin(){ delPlugin(){
this.$emit('comDelPlugin', this.index); this.$emit('comDelPlugin', this.index);
......
...@@ -230,16 +230,6 @@ ...@@ -230,16 +230,6 @@
} }
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
}, },
computed: { computed: {
cStyle() { cStyle() {
......
...@@ -310,16 +310,6 @@ ...@@ -310,16 +310,6 @@
this.data.goodsTagPicUrl = msg.url; this.data.goodsTagPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) { cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` + let style = `background-image: url(${this.getIconLink(picUrl)});` +
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
<el-radio v-model="data.navStyle" :label="2">样式2(全部展示)</el-radio> <el-radio v-model="data.navStyle" :label="2">样式2(全部展示)</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="收起图标"> <el-form-item label="收起图标">
<app-image-upload width="100" height="100" v-model="data.closedPicUrl"></app-image-upload>
<div class="zk_pic_box" @click="choicImg=true,getImgUtl(1)" <div class="zk_pic_box" @click="choicImg=true,getImgUtl(1)"
flex="main:center cross:center" flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(data.closedPicUrl) + ')'}"> :style="{backgroundImage:'url(' + getIconLink(data.closedPicUrl) + ')'}">
...@@ -190,11 +189,17 @@ ...@@ -190,11 +189,17 @@
<el-switch v-model="data.customize.opened"></el-switch> <el-switch v-model="data.customize.opened"></el-switch>
</el-form-item> </el-form-item>
<el-form-item v-if="data.customize.opened" label="图标"> <el-form-item v-if="data.customize.opened" label="图标">
<app-image-upload width="100" height="100" v-model="data.customize.picUrl"></app-image-upload> <div class="zk_pic_box" @click="choicImg=true,getImgUtl(9)"
flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(data.customize.picUrl) + ')'}">
<i v-if="data.customize.picUrl==''" class="el-icon-picture-outline"></i>
<el-button type="danger" v-if="data.customize.picUrl!=''" class="image-delete" size="mini"
icon="el-icon-close" @click.stop="data.customize.picUrl=''" circle></el-button>
</div>
</el-form-item> </el-form-item>
<el-form-item v-if="data.customize.opened" label="跳转链接"> <el-form-item v-if="data.customize.opened" label="跳转链接">
<el-input :disabled="true" size="small" v-model="data.customize.link_url" autocomplete="off"> <el-input :disabled="true" size="small" v-model="data.customize.link_url" autocomplete="off">
<el-button size="mini" @click="isShowLink=true">选择链接</el-button> <el-button slot="append" size="mini" @click="isShowLink=true">选择链接</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -280,6 +285,9 @@ ...@@ -280,6 +285,9 @@
case 8: case 8:
this.data.mapNav.picUrl=msg.url; this.data.mapNav.picUrl=msg.url;
break; break;
case 9:
this.data.customize.picUrl=msg.url;
break;
} }
this.choicImg = false; this.choicImg = false;
}, },
...@@ -290,22 +298,12 @@ ...@@ -290,22 +298,12 @@
this.data.customize.link_url = obj.PageUrl; this.data.customize.link_url = obj.PageUrl;
this.isShowLink = false; this.isShowLink = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
getImgUtl(type,) { getImgUtl(type,) {
this.type = type; this.type = type;
}, },
mapEvent(e) { mapEvent(e) {
this.data.mapNav.location = e.lat + ',' + e.long; this.data.mapNav.location = e.lat + ',' + e.long;
this.isShowMap=false;
}, },
}, },
......
...@@ -224,16 +224,6 @@ ...@@ -224,16 +224,6 @@
} }
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
deleteStore(index) { deleteStore(index) {
this.data.list.splice(index, 1); this.data.list.splice(index, 1);
}, },
......
...@@ -100,16 +100,6 @@ ...@@ -100,16 +100,6 @@
this.data.picUrl = msg.url; this.data.picUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接 //获取选择链接
getChoiceLink() { getChoiceLink() {
//调用子组件方法 //调用子组件方法
......
...@@ -89,16 +89,6 @@ ...@@ -89,16 +89,6 @@
this.data.backgroundPicUrl = msg.url; this.data.backgroundPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
}, },
computed: { computed: {
cFlexDir() { cFlexDir() {
......
...@@ -101,16 +101,6 @@ ...@@ -101,16 +101,6 @@
this.data.navs[this.ckedIndex].picUrl = msg.url; this.data.navs[this.ckedIndex].picUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//点击选图片 //点击选图片
getImgChoice(index) { getImgChoice(index) {
this.choicImg = true; this.choicImg = true;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</label> </label>
<el-input size="small" v-model="data.url" placeholder="请输入视频原地址或选择上传视频"> <el-input size="small" v-model="data.url" placeholder="请输入视频原地址或选择上传视频">
<template slot="append"> <template slot="append">
<el-button size="mini" @click="choicImg=true">选择文件</el-button> <el-button size="mini" @click="changeState1=true">选择文件</el-button>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -62,19 +62,27 @@ ...@@ -62,19 +62,27 @@
<!-- 选择图片文件 --> <!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px"> <el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg> <ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
export default { export default {
props: ["videoData", "index", "dataLeng"], props: ["videoData", "index", "dataLeng"],
components: { components: {
ChooseImg ChooseImg,
Choosevideo
}, },
data() { data() {
return { return {
choicImg: false, choicImg: false,
changeState1:false,
data: this.videoData.data, data: this.videoData.data,
}; };
}, },
...@@ -95,16 +103,11 @@ ...@@ -95,16 +103,11 @@
this.data.pic_url = msg.url; this.data.pic_url = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http //选择视频
getIconLink(url) { Selectvideo(val){
let str = '' this.data.url=val.Path;
if (url.indexOf('http') != -1) { this.changeState1=false;
str = url },
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
}, },
computed: { computed: {
......
...@@ -311,17 +311,6 @@ ...@@ -311,17 +311,6 @@
} }
this.choicImg = false; this.choicImg = false;
}, },
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
chooseColor() { chooseColor() {
this.data.background = this.background; this.data.background = this.background;
}, },
......
...@@ -54,9 +54,9 @@ export default { ...@@ -54,9 +54,9 @@ export default {
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://192.168.2.214:8200"; //domainUrl = "http://192.168.2.214:8200";
// domainUrl = "https://localhost:5001"; // domainUrl = "https://localhost:5001";
domainUrl = "http://192.168.2.65"; domainUrl = "http://192.168.0.102:8200";
// domainUrl = "http://192.168.2.17:8088"; // domainUrl = "http://192.168.2.17:8088";
let locationName = window.location.hostname; let locationName = window.location.hostname;
...@@ -182,7 +182,19 @@ export default { ...@@ -182,7 +182,19 @@ export default {
query: obj query: obj
}); });
} }
//公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) {
let str = ''
if(url!=''){
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
}
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
......
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