askbot-dragon 0.6.17 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -27
- package/babel.config.js +5 -5
- package/dragon.iml +7 -7
- package/package.json +54 -52
- package/public/index.html +27 -26
- package/src/App.vue +31 -31
- package/src/api/index.js +1 -1
- package/src/api/mock.http +2 -2
- package/src/api/requestUrl.js +185 -185
- package/src/assets/less/common.css +6760 -6760
- package/src/assets/less/converSationContainer/common.less +4751 -4751
- package/src/assets/less/converSationContainer/converSatonContainer.less +492 -492
- package/src/assets/less/ticketMessage.less +319 -319
- package/src/components/ActionAlertIframe.vue +117 -117
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +1388 -1388
- package/src/components/FileType.vue +88 -88
- package/src/components/Message.vue +27 -27
- package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
- package/src/components/ask-components/Msgloading.vue +37 -37
- package/src/components/ask-components/SatisfactionV2.vue +15 -15
- package/src/components/chatContent.vue +512 -512
- package/src/components/feedBack.vue +133 -133
- package/src/components/file/AliyunOssComponents.vue +109 -109
- package/src/components/formTemplate.vue +1898 -2039
- package/src/components/message/ActionAlertIframe.vue +116 -116
- package/src/components/message/ShopMessage.vue +168 -168
- package/src/components/message/TextMessage.vue +895 -895
- package/src/components/message/TicketMessage.vue +173 -173
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +530 -530
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- package/src/components/selector/hOption.vue +20 -20
- package/src/components/selector/hSelector.vue +199 -199
- package/src/components/selector/hWrapper.vue +216 -216
- package/src/components/source/BotMessage.vue +24 -24
- package/src/components/source/CustomMessage.vue +24 -24
- package/src/components/test.vue +260 -260
- package/src/components/utils/AliyunIssUtil.js +72 -72
- package/src/components/utils/ckeditor.js +124 -0
- package/src/components/utils/format_date.js +18 -18
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +15 -15
- package/src/main.js +44 -43
- package/vue.config.js +34 -28
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="action_alert_iframe">
|
|
3
|
-
<iframe
|
|
4
|
-
class="grzh-iframe"
|
|
5
|
-
:id="tampId"
|
|
6
|
-
:data-name="tampId"
|
|
7
|
-
:src="actionAlertIframe.template"
|
|
8
|
-
width="100%"
|
|
9
|
-
:height="actionAlertIframe.height"
|
|
10
|
-
:scrolling="actionAlertIframe.scrolling"
|
|
11
|
-
frameborder="no"
|
|
12
|
-
border="0"
|
|
13
|
-
></iframe>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: "action_alert_iframe",
|
|
19
|
-
props: ["actionAlertIframe"],
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
name: "action_alert_iframe",
|
|
23
|
-
dataName: "",
|
|
24
|
-
tampId:'',
|
|
25
|
-
// 组件接收数据
|
|
26
|
-
actionAlertIframeObj: {
|
|
27
|
-
template: "url地址(可插入变量)",
|
|
28
|
-
description: "描述",
|
|
29
|
-
height: "frame高度",
|
|
30
|
-
width: "iframe 的宽度",
|
|
31
|
-
scrolling: "yes/no/auto(是否在 iframe 中显示滚动条)",
|
|
32
|
-
sandbox: [
|
|
33
|
-
"预留",
|
|
34
|
-
"启用一系列对 <iframe> 中内容的额外限制",
|
|
35
|
-
"参考 https://www.w3school.com.cn/tags/att_iframe_sandbox.asp",
|
|
36
|
-
],
|
|
37
|
-
frameborder: "0/1(是否显示框架周围的边框)",
|
|
38
|
-
displayStyle:
|
|
39
|
-
"iframe 样式(点击弹出/嵌入iframe 字符串类型后端未做限制)",
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
methods: {},
|
|
44
|
-
mounted() {
|
|
45
|
-
this.tampId = 'iframeId++' + new Date().getTime();
|
|
46
|
-
let tampUrl = this.actionAlertIframe.template;
|
|
47
|
-
console.log(tampUrl);
|
|
48
|
-
function GetRequest() {
|
|
49
|
-
var url = tampUrl.split("?")[1]; //获取url中"?"符后的字串
|
|
50
|
-
var theRequest = new Object();
|
|
51
|
-
console.log(url);
|
|
52
|
-
if (url) {
|
|
53
|
-
// var str = url.substr(1);
|
|
54
|
-
let strs = url.split("&");
|
|
55
|
-
for (var i = 0; i < strs.length; i++) {
|
|
56
|
-
theRequest[strs[i].split("=")[0]] = unescape(
|
|
57
|
-
strs[i].split("=")[1]
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return theRequest;
|
|
62
|
-
}
|
|
63
|
-
if (JSON.stringify(GetRequest()) == "{}") {
|
|
64
|
-
this.actionAlertIframe.template = this.actionAlertIframe.template + "?iframeId=" + this.tampId
|
|
65
|
-
} else {
|
|
66
|
-
this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
console.log(this.tampId, this.actionAlertIframe.template)
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
</script>
|
|
73
|
-
<style lang="less" scoped>
|
|
74
|
-
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
75
|
-
|
|
76
|
-
#action_alert_iframe {
|
|
77
|
-
width: 100%;
|
|
78
|
-
margin: 0 auto;
|
|
79
|
-
overflow-x: auto;
|
|
80
|
-
.grzh-iframe {
|
|
81
|
-
scrollbar-face-color: #9aa1c4;
|
|
82
|
-
/* 滚动条滑块按钮的颜色 */
|
|
83
|
-
scrollbar-highlight-color: #f60;
|
|
84
|
-
/* 滚动条整体颜色 */
|
|
85
|
-
scrollbar-3dlight-color: #f00;
|
|
86
|
-
scrollbar-darkshadow-color: #000;
|
|
87
|
-
/* 滚动条阴影 */
|
|
88
|
-
scrollbar-shadow-color: #000;
|
|
89
|
-
/* 三角箭头颜色 */
|
|
90
|
-
scrollbar-arrow-color: #394264;
|
|
91
|
-
/* 滚动条轨道颜色 */
|
|
92
|
-
scrollbar-track-color: #394264;
|
|
93
|
-
|
|
94
|
-
::-webkit-scrollbar {
|
|
95
|
-
width: 5px;
|
|
96
|
-
height: 5px;
|
|
97
|
-
}
|
|
98
|
-
::-webkit-scrollbar-thumb {
|
|
99
|
-
background-color: #999;
|
|
100
|
-
-webkit-border-radius: 5px;
|
|
101
|
-
border-radius: 5px;
|
|
102
|
-
}
|
|
103
|
-
::-webkit-scrollbar-thumb:vertical:hover {
|
|
104
|
-
background-color: #666;
|
|
105
|
-
}
|
|
106
|
-
::-webkit-scrollbar-thumb:vertical:active {
|
|
107
|
-
background-color: #333;
|
|
108
|
-
}
|
|
109
|
-
::-webkit-scrollbar-button {
|
|
110
|
-
display: none;
|
|
111
|
-
}
|
|
112
|
-
::-webkit-scrollbar-track {
|
|
113
|
-
background-color: #f1f1f1;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div id="action_alert_iframe">
|
|
3
|
+
<iframe
|
|
4
|
+
class="grzh-iframe"
|
|
5
|
+
:id="tampId"
|
|
6
|
+
:data-name="tampId"
|
|
7
|
+
:src="actionAlertIframe.template"
|
|
8
|
+
width="100%"
|
|
9
|
+
:height="actionAlertIframe.height"
|
|
10
|
+
:scrolling="actionAlertIframe.scrolling"
|
|
11
|
+
frameborder="no"
|
|
12
|
+
border="0"
|
|
13
|
+
></iframe>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "action_alert_iframe",
|
|
19
|
+
props: ["actionAlertIframe"],
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
name: "action_alert_iframe",
|
|
23
|
+
dataName: "",
|
|
24
|
+
tampId:'',
|
|
25
|
+
// 组件接收数据
|
|
26
|
+
actionAlertIframeObj: {
|
|
27
|
+
template: "url地址(可插入变量)",
|
|
28
|
+
description: "描述",
|
|
29
|
+
height: "frame高度",
|
|
30
|
+
width: "iframe 的宽度",
|
|
31
|
+
scrolling: "yes/no/auto(是否在 iframe 中显示滚动条)",
|
|
32
|
+
sandbox: [
|
|
33
|
+
"预留",
|
|
34
|
+
"启用一系列对 <iframe> 中内容的额外限制",
|
|
35
|
+
"参考 https://www.w3school.com.cn/tags/att_iframe_sandbox.asp",
|
|
36
|
+
],
|
|
37
|
+
frameborder: "0/1(是否显示框架周围的边框)",
|
|
38
|
+
displayStyle:
|
|
39
|
+
"iframe 样式(点击弹出/嵌入iframe 字符串类型后端未做限制)",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
methods: {},
|
|
44
|
+
mounted() {
|
|
45
|
+
this.tampId = 'iframeId++' + new Date().getTime();
|
|
46
|
+
let tampUrl = this.actionAlertIframe.template;
|
|
47
|
+
console.log(tampUrl);
|
|
48
|
+
function GetRequest() {
|
|
49
|
+
var url = tampUrl.split("?")[1]; //获取url中"?"符后的字串
|
|
50
|
+
var theRequest = new Object();
|
|
51
|
+
console.log(url);
|
|
52
|
+
if (url) {
|
|
53
|
+
// var str = url.substr(1);
|
|
54
|
+
let strs = url.split("&");
|
|
55
|
+
for (var i = 0; i < strs.length; i++) {
|
|
56
|
+
theRequest[strs[i].split("=")[0]] = unescape(
|
|
57
|
+
strs[i].split("=")[1]
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return theRequest;
|
|
62
|
+
}
|
|
63
|
+
if (JSON.stringify(GetRequest()) == "{}") {
|
|
64
|
+
this.actionAlertIframe.template = this.actionAlertIframe.template + "?iframeId=" + this.tampId
|
|
65
|
+
} else {
|
|
66
|
+
this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
console.log(this.tampId, this.actionAlertIframe.template)
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
73
|
+
<style lang="less" scoped>
|
|
74
|
+
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
75
|
+
|
|
76
|
+
#action_alert_iframe {
|
|
77
|
+
width: 100%;
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
overflow-x: auto;
|
|
80
|
+
.grzh-iframe {
|
|
81
|
+
scrollbar-face-color: #9aa1c4;
|
|
82
|
+
/* 滚动条滑块按钮的颜色 */
|
|
83
|
+
scrollbar-highlight-color: #f60;
|
|
84
|
+
/* 滚动条整体颜色 */
|
|
85
|
+
scrollbar-3dlight-color: #f00;
|
|
86
|
+
scrollbar-darkshadow-color: #000;
|
|
87
|
+
/* 滚动条阴影 */
|
|
88
|
+
scrollbar-shadow-color: #000;
|
|
89
|
+
/* 三角箭头颜色 */
|
|
90
|
+
scrollbar-arrow-color: #394264;
|
|
91
|
+
/* 滚动条轨道颜色 */
|
|
92
|
+
scrollbar-track-color: #394264;
|
|
93
|
+
|
|
94
|
+
::-webkit-scrollbar {
|
|
95
|
+
width: 5px;
|
|
96
|
+
height: 5px;
|
|
97
|
+
}
|
|
98
|
+
::-webkit-scrollbar-thumb {
|
|
99
|
+
background-color: #999;
|
|
100
|
+
-webkit-border-radius: 5px;
|
|
101
|
+
border-radius: 5px;
|
|
102
|
+
}
|
|
103
|
+
::-webkit-scrollbar-thumb:vertical:hover {
|
|
104
|
+
background-color: #666;
|
|
105
|
+
}
|
|
106
|
+
::-webkit-scrollbar-thumb:vertical:active {
|
|
107
|
+
background-color: #333;
|
|
108
|
+
}
|
|
109
|
+
::-webkit-scrollbar-button {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
::-webkit-scrollbar-track {
|
|
113
|
+
background-color: #f1f1f1;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
117
|
</style>
|
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Shop-Container">
|
|
3
|
-
<swiper ref="swiper">
|
|
4
|
-
<template>
|
|
5
|
-
<swiper-item
|
|
6
|
-
v-for="(item, index) in shopInfo"
|
|
7
|
-
:key="index"
|
|
8
|
-
@slideEven="slideLoadOn"
|
|
9
|
-
>
|
|
10
|
-
<template>
|
|
11
|
-
<div style="position: relative">
|
|
12
|
-
<div>
|
|
13
|
-
<div class="img" >
|
|
14
|
-
<img
|
|
15
|
-
:src="item.image"
|
|
16
|
-
alt=""
|
|
17
|
-
@load="SwiperImgLoad"
|
|
18
|
-
ref='imgShow'
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="Describe">
|
|
23
|
-
<span>{{item.describe}}</span>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="shopAttr">
|
|
26
|
-
<span>{{item.attr}}</span>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="ClickClass" >
|
|
29
|
-
<div class="clickItem" v-for="(itemClick,index) in item.click" :key="index">
|
|
30
|
-
<a :href="item.link"><span style="color: #409eff">{{itemClick.name}}</span></a>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="clickBtn">
|
|
35
|
-
<div class="preBtn" @click="preClickTest($event)">
|
|
36
|
-
<i class="el-icon-arrow-left" style="font-size: 16px;font-weight:800;position: absolute;top: 25%;left: 25%"></i></div>
|
|
37
|
-
<div class="nextBtn" @click="nextClickTest($event)">
|
|
38
|
-
<i class="el-icon-arrow-right" style="font-size: 16px;font-weight:800;position: absolute;top: 25%;left: 25%"></i></div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</template>
|
|
45
|
-
</swiper-item>
|
|
46
|
-
</template>
|
|
47
|
-
</swiper>
|
|
48
|
-
<!-- <div v-for="(item,index) in shopInfo" :key="index">
|
|
49
|
-
<div class="img">
|
|
50
|
-
<img src="../../assets/image/1.jpg" style="width: 90%">
|
|
51
|
-
</div>
|
|
52
|
-
<div class="Describe">
|
|
53
|
-
<span>{{item.describe}}</span>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="shopAttr">
|
|
56
|
-
<span>{{item.attr}}</span>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="ClickClass">
|
|
59
|
-
<div class="clickItem">
|
|
60
|
-
<a href=""><span style="color: #409eff">查看商品详情</span></a>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="clickItem">
|
|
63
|
-
<a href=""><span style="color: #409eff">立即购买</span></a>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>-->
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
|
|
72
|
-
<script>
|
|
73
|
-
import Swiper from "./swiper/ticketSwiper";
|
|
74
|
-
import SwiperItem from "./swiper/ticketSwiperItem";
|
|
75
|
-
export default {
|
|
76
|
-
name: "ShopMessage",
|
|
77
|
-
components:{Swiper,SwiperItem},
|
|
78
|
-
data(){
|
|
79
|
-
return{
|
|
80
|
-
shopInfo:[{image:require('../../assets/image/1.jpg'),describe:'商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'1',link2:'21',click:[{name:'点击购买'},{name:'查看商品详情'}]},
|
|
81
|
-
{image:require('../../assets/image/2.jpg'),describe:'商品描述商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'2',link2:22,click:[{name:'点击收藏'},{name:'查看商品详情'}]},
|
|
82
|
-
{image:require('../../assets/image/3.jpg'),describe:'商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'2',link2:22,click:[{name:'点击收藏'},{name:'查看商品详情'}]},
|
|
83
|
-
],
|
|
84
|
-
loadCheck: false,
|
|
85
|
-
isHeight:false,
|
|
86
|
-
scale:0,
|
|
87
|
-
test:{multiple:true},
|
|
88
|
-
slideWidth:'',
|
|
89
|
-
swiperStyle:{},
|
|
90
|
-
slideCount:0
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
mounted() {
|
|
94
|
-
},
|
|
95
|
-
methods:{
|
|
96
|
-
init(){
|
|
97
|
-
let swiperEl = document.querySelector(".swiper");
|
|
98
|
-
let slides = swiperEl.querySelectorAll(".slide");
|
|
99
|
-
this.swiperStyle = swiperEl.style;
|
|
100
|
-
this.slideWidth = swiperEl.offsetWidth;
|
|
101
|
-
this.slideCount=slides.length
|
|
102
|
-
if (this.shopInfo > 1) {
|
|
103
|
-
let firstSlide = slides[0].cloneNode(true);
|
|
104
|
-
let lastSlide = slides[this.slideCount - 1].cloneNode(true);
|
|
105
|
-
swiperEl.appendChild(firstSlide);
|
|
106
|
-
swiperEl.insertBefore(lastSlide, slides[0]);
|
|
107
|
-
//设置开头位置
|
|
108
|
-
this.setTransform(-this.slideWidth);
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
SwiperImgLoad() {
|
|
112
|
-
if (!this.loadCheck) {
|
|
113
|
-
this.$emit("SwiperImgLoadEvent");
|
|
114
|
-
this.loadCheck = true;
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
slideLoadOn() {
|
|
118
|
-
this.$refs.swiper.slideOn();
|
|
119
|
-
},
|
|
120
|
-
preClickTest(e){
|
|
121
|
-
let swiperEl = document.querySelector(".swiper");
|
|
122
|
-
console.log(swiperEl.offsetWidth)
|
|
123
|
-
console.log(e)
|
|
124
|
-
console.log('aaa')
|
|
125
|
-
},
|
|
126
|
-
nextClickTest(e){
|
|
127
|
-
let swiperEl = document.querySelector(".swiper");
|
|
128
|
-
console.log(swiperEl.offsetWidth)
|
|
129
|
-
console.log(e)
|
|
130
|
-
console.log('aaa')
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
</script>
|
|
135
|
-
|
|
136
|
-
<style scoped lang="less">
|
|
137
|
-
.Describe{
|
|
138
|
-
text-align: left;
|
|
139
|
-
line-height: 1.5;
|
|
140
|
-
padding: 10px 0;
|
|
141
|
-
}
|
|
142
|
-
.shopAttr{
|
|
143
|
-
color: #AAAAAA;
|
|
144
|
-
text-align: left;
|
|
145
|
-
line-height: 1.5;
|
|
146
|
-
padding: 10px 0;
|
|
147
|
-
}
|
|
148
|
-
.clickItem{
|
|
149
|
-
text-align: center;
|
|
150
|
-
padding: 12px 0;
|
|
151
|
-
border-top: 1px solid #AAAAAA;
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
a{
|
|
155
|
-
text-decoration: none;
|
|
156
|
-
}
|
|
157
|
-
/*.ClickClass div:last-of-type{
|
|
158
|
-
border-bottom:none;
|
|
159
|
-
}*/
|
|
160
|
-
.img img{
|
|
161
|
-
object-fit: contain;
|
|
162
|
-
}
|
|
163
|
-
/* .Describe{
|
|
164
|
-
padding: 10px 30px;
|
|
165
|
-
}
|
|
166
|
-
.shopAttr{
|
|
167
|
-
padding: 0 30px 10px 30px;
|
|
168
|
-
}*/
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Shop-Container">
|
|
3
|
+
<swiper ref="swiper">
|
|
4
|
+
<template>
|
|
5
|
+
<swiper-item
|
|
6
|
+
v-for="(item, index) in shopInfo"
|
|
7
|
+
:key="index"
|
|
8
|
+
@slideEven="slideLoadOn"
|
|
9
|
+
>
|
|
10
|
+
<template>
|
|
11
|
+
<div style="position: relative">
|
|
12
|
+
<div>
|
|
13
|
+
<div class="img" >
|
|
14
|
+
<img
|
|
15
|
+
:src="item.image"
|
|
16
|
+
alt=""
|
|
17
|
+
@load="SwiperImgLoad"
|
|
18
|
+
ref='imgShow'
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="Describe">
|
|
23
|
+
<span>{{item.describe}}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="shopAttr">
|
|
26
|
+
<span>{{item.attr}}</span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="ClickClass" >
|
|
29
|
+
<div class="clickItem" v-for="(itemClick,index) in item.click" :key="index">
|
|
30
|
+
<a :href="item.link"><span style="color: #409eff">{{itemClick.name}}</span></a>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="clickBtn">
|
|
35
|
+
<div class="preBtn" @click="preClickTest($event)">
|
|
36
|
+
<i class="el-icon-arrow-left" style="font-size: 16px;font-weight:800;position: absolute;top: 25%;left: 25%"></i></div>
|
|
37
|
+
<div class="nextBtn" @click="nextClickTest($event)">
|
|
38
|
+
<i class="el-icon-arrow-right" style="font-size: 16px;font-weight:800;position: absolute;top: 25%;left: 25%"></i></div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</template>
|
|
45
|
+
</swiper-item>
|
|
46
|
+
</template>
|
|
47
|
+
</swiper>
|
|
48
|
+
<!-- <div v-for="(item,index) in shopInfo" :key="index">
|
|
49
|
+
<div class="img">
|
|
50
|
+
<img src="../../assets/image/1.jpg" style="width: 90%">
|
|
51
|
+
</div>
|
|
52
|
+
<div class="Describe">
|
|
53
|
+
<span>{{item.describe}}</span>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="shopAttr">
|
|
56
|
+
<span>{{item.attr}}</span>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="ClickClass">
|
|
59
|
+
<div class="clickItem">
|
|
60
|
+
<a href=""><span style="color: #409eff">查看商品详情</span></a>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="clickItem">
|
|
63
|
+
<a href=""><span style="color: #409eff">立即购买</span></a>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>-->
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
import Swiper from "./swiper/ticketSwiper";
|
|
74
|
+
import SwiperItem from "./swiper/ticketSwiperItem";
|
|
75
|
+
export default {
|
|
76
|
+
name: "ShopMessage",
|
|
77
|
+
components:{Swiper,SwiperItem},
|
|
78
|
+
data(){
|
|
79
|
+
return{
|
|
80
|
+
shopInfo:[{image:require('../../assets/image/1.jpg'),describe:'商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'1',link2:'21',click:[{name:'点击购买'},{name:'查看商品详情'}]},
|
|
81
|
+
{image:require('../../assets/image/2.jpg'),describe:'商品描述商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'2',link2:22,click:[{name:'点击收藏'},{name:'查看商品详情'}]},
|
|
82
|
+
{image:require('../../assets/image/3.jpg'),describe:'商品描述商品描述商品描述商品描述',attr:'商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',link:'2',link2:22,click:[{name:'点击收藏'},{name:'查看商品详情'}]},
|
|
83
|
+
],
|
|
84
|
+
loadCheck: false,
|
|
85
|
+
isHeight:false,
|
|
86
|
+
scale:0,
|
|
87
|
+
test:{multiple:true},
|
|
88
|
+
slideWidth:'',
|
|
89
|
+
swiperStyle:{},
|
|
90
|
+
slideCount:0
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
mounted() {
|
|
94
|
+
},
|
|
95
|
+
methods:{
|
|
96
|
+
init(){
|
|
97
|
+
let swiperEl = document.querySelector(".swiper");
|
|
98
|
+
let slides = swiperEl.querySelectorAll(".slide");
|
|
99
|
+
this.swiperStyle = swiperEl.style;
|
|
100
|
+
this.slideWidth = swiperEl.offsetWidth;
|
|
101
|
+
this.slideCount=slides.length
|
|
102
|
+
if (this.shopInfo > 1) {
|
|
103
|
+
let firstSlide = slides[0].cloneNode(true);
|
|
104
|
+
let lastSlide = slides[this.slideCount - 1].cloneNode(true);
|
|
105
|
+
swiperEl.appendChild(firstSlide);
|
|
106
|
+
swiperEl.insertBefore(lastSlide, slides[0]);
|
|
107
|
+
//设置开头位置
|
|
108
|
+
this.setTransform(-this.slideWidth);
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
SwiperImgLoad() {
|
|
112
|
+
if (!this.loadCheck) {
|
|
113
|
+
this.$emit("SwiperImgLoadEvent");
|
|
114
|
+
this.loadCheck = true;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
slideLoadOn() {
|
|
118
|
+
this.$refs.swiper.slideOn();
|
|
119
|
+
},
|
|
120
|
+
preClickTest(e){
|
|
121
|
+
let swiperEl = document.querySelector(".swiper");
|
|
122
|
+
console.log(swiperEl.offsetWidth)
|
|
123
|
+
console.log(e)
|
|
124
|
+
console.log('aaa')
|
|
125
|
+
},
|
|
126
|
+
nextClickTest(e){
|
|
127
|
+
let swiperEl = document.querySelector(".swiper");
|
|
128
|
+
console.log(swiperEl.offsetWidth)
|
|
129
|
+
console.log(e)
|
|
130
|
+
console.log('aaa')
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<style scoped lang="less">
|
|
137
|
+
.Describe{
|
|
138
|
+
text-align: left;
|
|
139
|
+
line-height: 1.5;
|
|
140
|
+
padding: 10px 0;
|
|
141
|
+
}
|
|
142
|
+
.shopAttr{
|
|
143
|
+
color: #AAAAAA;
|
|
144
|
+
text-align: left;
|
|
145
|
+
line-height: 1.5;
|
|
146
|
+
padding: 10px 0;
|
|
147
|
+
}
|
|
148
|
+
.clickItem{
|
|
149
|
+
text-align: center;
|
|
150
|
+
padding: 12px 0;
|
|
151
|
+
border-top: 1px solid #AAAAAA;
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
a{
|
|
155
|
+
text-decoration: none;
|
|
156
|
+
}
|
|
157
|
+
/*.ClickClass div:last-of-type{
|
|
158
|
+
border-bottom:none;
|
|
159
|
+
}*/
|
|
160
|
+
.img img{
|
|
161
|
+
object-fit: contain;
|
|
162
|
+
}
|
|
163
|
+
/* .Describe{
|
|
164
|
+
padding: 10px 30px;
|
|
165
|
+
}
|
|
166
|
+
.shopAttr{
|
|
167
|
+
padding: 0 30px 10px 30px;
|
|
168
|
+
}*/
|
|
169
169
|
</style>
|