Commit 3104ce49 authored by zhengke's avatar zhengke

修改组件

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