baiqiu-cms-decoration-dg 0.0.22 → 0.0.24
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 +24 -0
- package/babel.config.js +5 -0
- package/{baiqiu-cms-decoration-dg.common.js → lib/baiqiu-cms-decoration-dg.common.js} +24 -24
- package/{baiqiu-cms-decoration-dg.common.js.map → lib/baiqiu-cms-decoration-dg.common.js.map} +1 -1
- package/{baiqiu-cms-decoration-dg.css → lib/baiqiu-cms-decoration-dg.css} +1 -1
- package/{baiqiu-cms-decoration-dg.umd.js → lib/baiqiu-cms-decoration-dg.umd.js} +24 -24
- package/{baiqiu-cms-decoration-dg.umd.js.map → lib/baiqiu-cms-decoration-dg.umd.js.map} +1 -1
- package/{baiqiu-cms-decoration-dg.umd.min.js → lib/baiqiu-cms-decoration-dg.umd.min.js} +4 -4
- package/lib/baiqiu-cms-decoration-dg.umd.min.js.map +1 -0
- package/package.json +50 -7
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +594 -0
- package/src/api/com-service.js +26 -0
- package/src/assets/iconfont/demo.css +539 -0
- package/src/assets/iconfont/iconfont.css +158 -0
- package/src/assets/iconfont/iconfont.eot +0 -0
- package/src/assets/iconfont/iconfont.json +254 -0
- package/src/assets/iconfont/iconfont.svg +89 -0
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/assets/img/pc-cms-v2/icon.png +0 -0
- package/src/assets/img/pc-cms-v2/next1.png +0 -0
- package/src/assets/img/pc-cms-v2/next2.png +0 -0
- package/src/assets/img/pc-cms-v2/prev1.png +0 -0
- package/src/assets/img/pc-cms-v2/prev2.png +0 -0
- package/src/assets/img/pc-cms-v2/text.png +0 -0
- package/src/components/cms/animate.scss +19 -0
- package/src/components/cms/buttonItem/buttonItem.js +135 -0
- package/src/components/cms/buttonItem/buttonItem.scss +95 -0
- package/src/components/cms/buttonItem/buttonItem.vue +47 -0
- package/src/components/cms/buttonItem/index.js +2 -0
- package/src/components/cms/cms.js +105 -0
- package/src/components/cms/cms.scss +46 -0
- package/src/components/cms/cms.vue +51 -0
- package/src/components/cms/customLayout/customLayout.js +46 -0
- package/src/components/cms/customLayout/customLayout.scss +8 -0
- package/src/components/cms/customLayout/customLayout.vue +15 -0
- package/src/components/cms/customLayout/index.js +2 -0
- package/src/components/cms/hotspot/hotspot.js +200 -0
- package/src/components/cms/hotspot/hotspot.scss +20 -0
- package/src/components/cms/hotspot/hotspot.vue +35 -0
- package/src/components/cms/hotspot/index.js +2 -0
- package/src/components/cms/imgNav/imgNav.js +176 -0
- package/src/components/cms/imgNav/imgNav.scss +113 -0
- package/src/components/cms/imgNav/imgNav.vue +123 -0
- package/src/components/cms/imgNav/index.js +2 -0
- package/src/components/cms/index.js +2 -0
- package/src/components/cms/mixin.js +239 -0
- package/src/components/cms/multipleLayout/index.js +2 -0
- package/src/components/cms/multipleLayout/multipleLayout.js +54 -0
- package/src/components/cms/multipleLayout/multipleLayout.scss +21 -0
- package/src/components/cms/multipleLayout/multipleLayout.vue +25 -0
- package/src/components/cms/productItem/index.js +2 -0
- package/src/components/cms/productItem/productItem.js +290 -0
- package/src/components/cms/productItem/productItem.scss +180 -0
- package/src/components/cms/productItem/productItem.vue +117 -0
- package/src/components/cms/singleLayout/index.js +2 -0
- package/src/components/cms/singleLayout/singleLayout.js +69 -0
- package/src/components/cms/singleLayout/singleLayout.scss +21 -0
- package/src/components/cms/singleLayout/singleLayout.vue +39 -0
- package/src/components/cms/slideLayout/index.js +2 -0
- package/src/components/cms/slideLayout/slideLayout.js +248 -0
- package/src/components/cms/slideLayout/slideLayout.scss +18 -0
- package/src/components/cms/slideLayout/slideLayout.vue +44 -0
- package/src/components/cms/swiperItem/index.js +2 -0
- package/src/components/cms/swiperItem/swiperItem.js +228 -0
- package/src/components/cms/swiperItem/swiperItem.scss +204 -0
- package/src/components/cms/swiperItem/swiperItem.vue +123 -0
- package/src/components/cms/tabLayout/index.js +2 -0
- package/src/components/cms/tabLayout/navItem/index.js +2 -0
- package/src/components/cms/tabLayout/navItem/navItem.js +47 -0
- package/src/components/cms/tabLayout/navItem/navItem.scss +23 -0
- package/src/components/cms/tabLayout/navItem/navItem.vue +13 -0
- package/src/components/cms/tabLayout/tabLayout.js +158 -0
- package/src/components/cms/tabLayout/tabLayout.scss +26 -0
- package/src/components/cms/tabLayout/tabLayout.vue +43 -0
- package/src/components/cms/textItem/index.js +2 -0
- package/src/components/cms/textItem/textItem.js +65 -0
- package/src/components/cms/textItem/textItem.scss +19 -0
- package/src/components/cms/textItem/textItem.vue +26 -0
- package/src/components/cms/utils.js +101 -0
- package/src/components/cms/videoItem/index.js +2 -0
- package/src/components/cms/videoItem/videoItem.js +96 -0
- package/src/components/cms/videoItem/videoItem.scss +27 -0
- package/src/components/cms/videoItem/videoItem.vue +56 -0
- package/src/components/cms/videoPlayer/index.js +2 -0
- package/src/components/cms/videoPlayer/videoPlayer.js +68 -0
- package/src/components/cms/videoPlayer/videoPlayer.scss +37 -0
- package/src/components/cms/videoPlayer/videoPlayer.vue +34 -0
- package/src/index.js +19 -0
- package/src/index.scss +221 -0
- package/src/main.js +8 -0
- package/src/utils/common.js +23 -0
- package/src/utils/http-client.js +101 -0
- package/src/utils/utils.js +63 -0
- package/baiqiu-cms-decoration-dg.umd.min.js.map +0 -1
- /package/{demo.html → lib/demo.html} +0 -0
- /package/{fonts → lib/fonts}/iconfont.529b3ed0.ttf +0 -0
- /package/{fonts → lib/fonts}/iconfont.580c918e.eot +0 -0
- /package/{fonts → lib/fonts}/iconfont.ea5b1aa2.woff +0 -0
- /package/{img → lib/img}/iconfont.654cc65b.svg +0 -0
package/src/index.scss
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
.lay-wrap {
|
2
|
+
.vdr {
|
3
|
+
border: none;
|
4
|
+
touch-action: auto;
|
5
|
+
outline: none;
|
6
|
+
}
|
7
|
+
|
8
|
+
// .video-js .vjs-big-play-button {
|
9
|
+
// font-size: 2.5em !important;
|
10
|
+
// line-height: 2.3em !important;
|
11
|
+
// height: 2.5em !important;
|
12
|
+
// width: 2.5em !important;
|
13
|
+
// -webkit-border-radius: 2.5em !important;
|
14
|
+
// -moz-border-radius: 2.5em !important;
|
15
|
+
// border-radius: 2.5em !important;
|
16
|
+
// background-color: #73859f;
|
17
|
+
// background-color: rgba($color: #000000, $alpha: 0.6) !important;
|
18
|
+
// border-width: 0.15em !important;
|
19
|
+
// margin-top: -1.25em !important;
|
20
|
+
// margin-left: -1.75em !important;
|
21
|
+
// border: 0.0666em solid transparent;
|
22
|
+
// }
|
23
|
+
|
24
|
+
.video-wrap .video-js .vjs-control-bar {
|
25
|
+
z-index: 99!important;
|
26
|
+
}
|
27
|
+
|
28
|
+
.vjs-has-started .vjs-control-bar {
|
29
|
+
z-index: 99!important;
|
30
|
+
}
|
31
|
+
|
32
|
+
.video-wrap .video-js .vjs-big-play-button {
|
33
|
+
opacity: 1!important;
|
34
|
+
}
|
35
|
+
|
36
|
+
// .vjs-big-play-button .vjs-icon-placeholder {
|
37
|
+
// font-size: 1.63em !important;
|
38
|
+
// }
|
39
|
+
|
40
|
+
// .video-js:hover .vjs-big-play-button, .video-js .vjs-big-play-button:focus {
|
41
|
+
// border-color: transparent;
|
42
|
+
// }
|
43
|
+
|
44
|
+
.vjs-paused .vjs-big-play-button,
|
45
|
+
.vjs-paused.vjs-has-started .vjs-big-play-button {
|
46
|
+
display: block !important;
|
47
|
+
opacity: 1;
|
48
|
+
}
|
49
|
+
|
50
|
+
.video-js .vjs-time-control {
|
51
|
+
display: block !important;
|
52
|
+
}
|
53
|
+
|
54
|
+
.video-js .vjs-remaining-time {
|
55
|
+
display: none !important;
|
56
|
+
}
|
57
|
+
|
58
|
+
.video-js .vjs-mouse-display {
|
59
|
+
display: none!important;
|
60
|
+
}
|
61
|
+
|
62
|
+
.video-js .vjs-tech {
|
63
|
+
object-fit: cover;
|
64
|
+
}
|
65
|
+
|
66
|
+
.vjs-poster img {
|
67
|
+
object-fit: cover;
|
68
|
+
}
|
69
|
+
|
70
|
+
// .video-js .vjs-time-control{
|
71
|
+
// text-align: center;
|
72
|
+
// min-width: 1em!important;
|
73
|
+
// padding: 0!important;
|
74
|
+
// line-height: 30px!important;
|
75
|
+
// }
|
76
|
+
|
77
|
+
.video-wrap .video-js .vjs-control-bar .vjs-button > .vjs-icon-placeholder:before {
|
78
|
+
line-height: 30px!important;
|
79
|
+
}
|
80
|
+
|
81
|
+
.video-js .vjs-play-progress:before {
|
82
|
+
top: -0.43em!important;
|
83
|
+
line-height: 1!important;
|
84
|
+
}
|
85
|
+
|
86
|
+
.video-js .vjs-mouse-display {
|
87
|
+
display: none!important;
|
88
|
+
}
|
89
|
+
|
90
|
+
.vjs-slider-horizontal .vjs-volume-level:before {
|
91
|
+
line-height: 1!important;
|
92
|
+
top: -0.55em
|
93
|
+
}
|
94
|
+
|
95
|
+
// 分页器样式三
|
96
|
+
.swiper-pagination.swiper-pagination-bullets {
|
97
|
+
&.swiper-pagination-3 {
|
98
|
+
.swiper-pagination-bullet {
|
99
|
+
opacity: 1;
|
100
|
+
background-color: var(--color)!important;
|
101
|
+
transition: all 0.3s;
|
102
|
+
&.swiper-pagination-bullet-active {
|
103
|
+
background-color: var(--activeColor)!important;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
.text-con {
|
110
|
+
p{
|
111
|
+
font-size: 16px;
|
112
|
+
}
|
113
|
+
p,h1,h2,h3,h4,h5,table,pre {
|
114
|
+
line-height: 1.5;
|
115
|
+
}
|
116
|
+
|
117
|
+
table,pre {
|
118
|
+
margin: 15px 0;
|
119
|
+
}
|
120
|
+
|
121
|
+
ul,ol{
|
122
|
+
margin: 10px 0 10px 20px;
|
123
|
+
}
|
124
|
+
ul li{
|
125
|
+
list-style-type: disc;
|
126
|
+
margin: 5px 0;
|
127
|
+
}
|
128
|
+
ol li{
|
129
|
+
list-style-type:decimal;
|
130
|
+
margin: 5px 0;
|
131
|
+
}
|
132
|
+
table td{
|
133
|
+
text-align: inherit;
|
134
|
+
}
|
135
|
+
table {
|
136
|
+
border-top: 1px solid #ccc;
|
137
|
+
border-left: 1px solid #ccc;
|
138
|
+
border-spacing: 0;
|
139
|
+
}
|
140
|
+
table th {
|
141
|
+
border-bottom: 2px solid #ccc;
|
142
|
+
text-align: center;
|
143
|
+
background-color: #f1f1f1;
|
144
|
+
}
|
145
|
+
table td, table th {
|
146
|
+
border-bottom: 1px solid #ccc;
|
147
|
+
border-right: 1px solid #ccc;
|
148
|
+
padding: 3px 5px;
|
149
|
+
min-height: 30px;
|
150
|
+
min-width: 30px;
|
151
|
+
}
|
152
|
+
a:-webkit-any-link {
|
153
|
+
cursor: pointer;
|
154
|
+
color: -webkit-link;
|
155
|
+
}
|
156
|
+
|
157
|
+
a {
|
158
|
+
width: auto;
|
159
|
+
height: auto;
|
160
|
+
}
|
161
|
+
font[size="2"] {
|
162
|
+
font-size: 12px;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
.swiper-container {
|
167
|
+
.swiper-button-prev {
|
168
|
+
pointer-events: auto;
|
169
|
+
background-image: none;
|
170
|
+
left: 20px;
|
171
|
+
&:hover {
|
172
|
+
.cms2iconfont {
|
173
|
+
color: var(--hoverColor) !important;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
&::after {
|
177
|
+
display: none;
|
178
|
+
}
|
179
|
+
|
180
|
+
.cms2iconfont {
|
181
|
+
font-size: 28px;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
.swiper-button-next {
|
186
|
+
pointer-events: auto;
|
187
|
+
background-image: none;
|
188
|
+
right: 20px;
|
189
|
+
|
190
|
+
&:hover {
|
191
|
+
.cms2iconfont {
|
192
|
+
color: var(--hoverColor) !important;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
&::after {
|
197
|
+
display: none;
|
198
|
+
}
|
199
|
+
|
200
|
+
.cms2iconfont {
|
201
|
+
font-size: 28px;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
|
206
|
+
.arrow {
|
207
|
+
width: 40px;
|
208
|
+
height: 40px;
|
209
|
+
background-color: #edf5fe;
|
210
|
+
border-radius: 50%;
|
211
|
+
display: flex;
|
212
|
+
align-items: center;
|
213
|
+
justify-content: center;
|
214
|
+
flex-shrink: 0;
|
215
|
+
|
216
|
+
.cms2iconfont {
|
217
|
+
font-size: 20px;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
package/src/main.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module.exports = {
|
2
|
+
entrance: function(that) {
|
3
|
+
window.addEventListener('scroll', ()=>{this.scroll(that)})
|
4
|
+
},
|
5
|
+
scroll: function(that) {
|
6
|
+
let h = document.documentElement.clientHeight || document.body.clientHeight
|
7
|
+
let eles = document.querySelectorAll('.entrance-con')
|
8
|
+
eles.forEach((item, index) => {
|
9
|
+
let top = item.getBoundingClientRect().top
|
10
|
+
if (top < h - 50 && item.firstChild.style.display == 'none') {
|
11
|
+
item.classList.add('entrance-demonstrate') // 该样式主要为商品组件使用,因为商品接口返回会慢于该方法的执行,若将商品组件至于页面第一个,且添加了入场动画,会造成初始进入页面动画不执行,滑动一下才执行
|
12
|
+
if(!(item.classList.contains('product-list')&&index == 0)) {
|
13
|
+
item.firstChild.style.display = 'block'
|
14
|
+
}
|
15
|
+
}
|
16
|
+
})
|
17
|
+
|
18
|
+
let refs = that.$refs.layModule
|
19
|
+
refs&&refs.forEach(item =>{
|
20
|
+
item&&item.reportData(h)
|
21
|
+
})
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import axios from "axios";
|
2
|
+
export const CONTENT_TYPE = {
|
3
|
+
json: "application/json;",
|
4
|
+
form: "application/x-www-form-urlencoded;",
|
5
|
+
html: "text/html;",
|
6
|
+
file: "multipart/form-data",
|
7
|
+
excel: "msexcel",
|
8
|
+
xml: "application/xml",
|
9
|
+
javascript: "application/x-javascript;charset=utf-8"
|
10
|
+
};
|
11
|
+
export const REQ_HEADERS = {
|
12
|
+
lang: "Accept-Language",
|
13
|
+
contentType: "Content-Type"
|
14
|
+
};
|
15
|
+
function checkResponse(response) {
|
16
|
+
if (response.status === 200) {
|
17
|
+
let result = response.data;
|
18
|
+
if (result.errorCode === "0") {
|
19
|
+
return result.data;
|
20
|
+
}
|
21
|
+
return response.data;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
axios.interceptors.response.use(checkResponse, error => {
|
25
|
+
// Do something with response error
|
26
|
+
return Promise.reject(error);
|
27
|
+
});
|
28
|
+
export class HttpClient {
|
29
|
+
static async call(
|
30
|
+
url,
|
31
|
+
{ method = "get", headers = {}, body = null, responseType = null} = {}
|
32
|
+
) {
|
33
|
+
let fetchUrl = url;
|
34
|
+
let params = {
|
35
|
+
method: method,
|
36
|
+
url: fetchUrl,
|
37
|
+
responseType: responseType || "json",
|
38
|
+
headers: headers
|
39
|
+
};
|
40
|
+
if (method === "get") {
|
41
|
+
params.params = body;
|
42
|
+
} else {
|
43
|
+
params.data = body;
|
44
|
+
}
|
45
|
+
// console.log("params", params);
|
46
|
+
const response = await axios(params).catch(error => {
|
47
|
+
if (error.response) {
|
48
|
+
// The request was made and the server responded with a status code
|
49
|
+
// that falls out of the range of 2xx
|
50
|
+
console.error(error.response.status, error.response.data);
|
51
|
+
} else if (error.request) {
|
52
|
+
// The request was made but no response was received
|
53
|
+
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
54
|
+
// http.ClientRequest in node.js
|
55
|
+
console.error(error.request);
|
56
|
+
} else {
|
57
|
+
// Something happened in finance up the request that triggered an Error
|
58
|
+
console.error("Error", error.message ? error.message : "");
|
59
|
+
}
|
60
|
+
// console.log(error.config)
|
61
|
+
});
|
62
|
+
return response;
|
63
|
+
}
|
64
|
+
static get(url, { mask = true, external = false, headers = {} } = {}) {
|
65
|
+
return HttpClient.call(url, {
|
66
|
+
headers,
|
67
|
+
external,
|
68
|
+
mask
|
69
|
+
});
|
70
|
+
}
|
71
|
+
static postBody(
|
72
|
+
url,
|
73
|
+
{
|
74
|
+
body = {},
|
75
|
+
language = "zh-CN",
|
76
|
+
module = "",
|
77
|
+
method = "post",
|
78
|
+
mask = true,
|
79
|
+
postData = true,
|
80
|
+
external = false,
|
81
|
+
headers = {},
|
82
|
+
compat
|
83
|
+
}
|
84
|
+
) {
|
85
|
+
return HttpClient.call(url, {
|
86
|
+
module,
|
87
|
+
method,
|
88
|
+
headers: Object.assign(headers, {
|
89
|
+
[REQ_HEADERS.contentType]: CONTENT_TYPE.json,
|
90
|
+
common:{
|
91
|
+
languageCode: language
|
92
|
+
}
|
93
|
+
}),
|
94
|
+
body: body,
|
95
|
+
postData,
|
96
|
+
external,
|
97
|
+
mask,
|
98
|
+
compat
|
99
|
+
});
|
100
|
+
}
|
101
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import {ComService} from '../api/com-service'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* cms数据采集上报
|
5
|
+
*/
|
6
|
+
function dataSaveDecorationPageComponentEventFn(params, envUrl) {
|
7
|
+
const service = new ComService()
|
8
|
+
const data = {
|
9
|
+
source: '',
|
10
|
+
medium: '',
|
11
|
+
commodity_id: params.popData.productCode || '', //商品item
|
12
|
+
commodity_name: params.popData.selectDataShow || '', //商品名称
|
13
|
+
commodity_sku_id: '',
|
14
|
+
order_id: '', //订单id
|
15
|
+
is_success: null, //订单是否成功
|
16
|
+
fail_reason: '', //订单失败原因
|
17
|
+
recommended_scenes_code: '', //商品推荐场景id
|
18
|
+
component_name: params.uniqueName, // 组件名称
|
19
|
+
component_id: params.uniqueId, //组件ID
|
20
|
+
component_type: params.componentType, //组件类型
|
21
|
+
first_navigation_commodity_id: '', //一级导航_id
|
22
|
+
first_navigation_name: '', //一级导航名称
|
23
|
+
hot_zone_id: params.popData.uniqueId || '', //热区_id
|
24
|
+
hot_zone_name: params.popData.uniqueName || '', //热区_名称
|
25
|
+
material_id: params.materialId, //素材id
|
26
|
+
material_name: params.materialName, //素材名称
|
27
|
+
navigation_type: '', //导航类型;1:一级导航,2:二级导航,3:三级导航
|
28
|
+
url_path: params.path, //当前页面
|
29
|
+
// referer: '', //http Referer
|
30
|
+
refer_info: params.refererPagePath, //上级页面
|
31
|
+
second_navigation_commodity_id: '', //二级导航_id
|
32
|
+
second_navigation_name: '', //二级导航名称
|
33
|
+
first_navigation_tap_id: '', //一级导航tab_id
|
34
|
+
first_navigation_tap_name: '', //一级导航tab名称
|
35
|
+
second_navigation_tap_id: '', //二级导航tab_id
|
36
|
+
second_navigation_tap_name: '', //二级导航tab名称
|
37
|
+
navigation_tap_type: '', //导航TapId类型;1:一级导航tap;2:二级导航tap
|
38
|
+
navigation_commodity_type: '', //导航组件类型;1:一级导航组件;2:二级导航组件
|
39
|
+
position: params.position, // 素材位置
|
40
|
+
trigger_Method_Type: params.componentMethodType
|
41
|
+
}
|
42
|
+
|
43
|
+
let distinctId = ''
|
44
|
+
|
45
|
+
if(localStorage.getItem(`${params.brand}Cookie`)) {
|
46
|
+
distinctId = localStorage.getItem(`${params.brand}Cookie`)
|
47
|
+
} else {
|
48
|
+
distinctId = `${parseInt(new Date().getTime())}${Math.floor(Math.random()*10000)}`
|
49
|
+
localStorage.setItem(`${params.brand}Cookie`, distinctId)
|
50
|
+
}
|
51
|
+
|
52
|
+
service.dataSaveDecorationPageComponentEvent(envUrl, {
|
53
|
+
eventProperty: JSON.stringify({
|
54
|
+
...data
|
55
|
+
}),
|
56
|
+
event: params.event,
|
57
|
+
distinctId,
|
58
|
+
})
|
59
|
+
}
|
60
|
+
|
61
|
+
export {
|
62
|
+
dataSaveDecorationPageComponentEventFn
|
63
|
+
}
|