baiqiu-cms-decoration-dg 0.1.0 → 0.1.4

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.
Files changed (109) hide show
  1. package/lib/baiqiu-cms-decoration-dg.common.js +90075 -0
  2. package/lib/baiqiu-cms-decoration-dg.css +7 -0
  3. package/lib/baiqiu-cms-decoration-dg.umd.js +90085 -0
  4. package/lib/baiqiu-cms-decoration-dg.umd.min.js +48 -0
  5. package/lib/demo.html +10 -0
  6. package/{dist/img/iconfont.654cc65b.svg → lib/img/iconfont.210a3a86.svg} +89 -89
  7. package/package.json +5 -10
  8. package/babel.config.js +0 -5
  9. package/dist/css/app.d43615c0.css +0 -1
  10. package/dist/css/chunk-vendors.ef1800aa.css +0 -7
  11. package/dist/favicon.ico +0 -0
  12. package/dist/index.html +0 -1
  13. package/dist/js/app.453dd14c.js +0 -2
  14. package/dist/js/app.453dd14c.js.map +0 -1
  15. package/dist/js/chunk-vendors.cfd53f93.js +0 -37
  16. package/dist/js/chunk-vendors.cfd53f93.js.map +0 -1
  17. package/public/favicon.ico +0 -0
  18. package/public/index.html +0 -17
  19. package/src/App.vue +0 -594
  20. package/src/api/com-service.js +0 -26
  21. package/src/assets/iconfont/demo.css +0 -539
  22. package/src/assets/iconfont/iconfont.css +0 -158
  23. package/src/assets/iconfont/iconfont.eot +0 -0
  24. package/src/assets/iconfont/iconfont.json +0 -254
  25. package/src/assets/iconfont/iconfont.svg +0 -89
  26. package/src/assets/iconfont/iconfont.ttf +0 -0
  27. package/src/assets/iconfont/iconfont.woff +0 -0
  28. package/src/assets/iconfont/iconfont.woff2 +0 -0
  29. package/src/assets/img/pc-cms-v2/creation.png +0 -0
  30. package/src/assets/img/pc-cms-v2/icon.png +0 -0
  31. package/src/assets/img/pc-cms-v2/mobileNav.png +0 -0
  32. package/src/assets/img/pc-cms-v2/next1.png +0 -0
  33. package/src/assets/img/pc-cms-v2/next2.png +0 -0
  34. package/src/assets/img/pc-cms-v2/prev1.png +0 -0
  35. package/src/assets/img/pc-cms-v2/prev2.png +0 -0
  36. package/src/assets/img/pc-cms-v2/text.png +0 -0
  37. package/src/components/cms/animate.scss +0 -19
  38. package/src/components/cms/buttonItem/buttonItem.js +0 -135
  39. package/src/components/cms/buttonItem/buttonItem.scss +0 -95
  40. package/src/components/cms/buttonItem/buttonItem.vue +0 -47
  41. package/src/components/cms/buttonItem/index.js +0 -2
  42. package/src/components/cms/cms.js +0 -104
  43. package/src/components/cms/cms.scss +0 -46
  44. package/src/components/cms/cms.vue +0 -51
  45. package/src/components/cms/customLayout/customLayout.js +0 -46
  46. package/src/components/cms/customLayout/customLayout.scss +0 -8
  47. package/src/components/cms/customLayout/customLayout.vue +0 -15
  48. package/src/components/cms/customLayout/index.js +0 -2
  49. package/src/components/cms/hotspot/hotspot.js +0 -200
  50. package/src/components/cms/hotspot/hotspot.scss +0 -20
  51. package/src/components/cms/hotspot/hotspot.vue +0 -35
  52. package/src/components/cms/hotspot/index.js +0 -2
  53. package/src/components/cms/imgNav/imgNav.js +0 -176
  54. package/src/components/cms/imgNav/imgNav.scss +0 -113
  55. package/src/components/cms/imgNav/imgNav.vue +0 -123
  56. package/src/components/cms/imgNav/index.js +0 -2
  57. package/src/components/cms/index.js +0 -2
  58. package/src/components/cms/mixin.js +0 -239
  59. package/src/components/cms/multipleLayout/index.js +0 -2
  60. package/src/components/cms/multipleLayout/multipleLayout.js +0 -54
  61. package/src/components/cms/multipleLayout/multipleLayout.scss +0 -21
  62. package/src/components/cms/multipleLayout/multipleLayout.vue +0 -25
  63. package/src/components/cms/productItem/index.js +0 -2
  64. package/src/components/cms/productItem/productItem.js +0 -290
  65. package/src/components/cms/productItem/productItem.scss +0 -180
  66. package/src/components/cms/productItem/productItem.vue +0 -117
  67. package/src/components/cms/singleLayout/index.js +0 -2
  68. package/src/components/cms/singleLayout/singleLayout.js +0 -63
  69. package/src/components/cms/singleLayout/singleLayout.scss +0 -21
  70. package/src/components/cms/singleLayout/singleLayout.vue +0 -42
  71. package/src/components/cms/slideLayout/index.js +0 -2
  72. package/src/components/cms/slideLayout/slideLayout.js +0 -248
  73. package/src/components/cms/slideLayout/slideLayout.scss +0 -18
  74. package/src/components/cms/slideLayout/slideLayout.vue +0 -44
  75. package/src/components/cms/swiperItem/index.js +0 -2
  76. package/src/components/cms/swiperItem/swiperItem.js +0 -228
  77. package/src/components/cms/swiperItem/swiperItem.scss +0 -204
  78. package/src/components/cms/swiperItem/swiperItem.vue +0 -123
  79. package/src/components/cms/tabLayout/index.js +0 -2
  80. package/src/components/cms/tabLayout/navItem/index.js +0 -2
  81. package/src/components/cms/tabLayout/navItem/navItem.js +0 -47
  82. package/src/components/cms/tabLayout/navItem/navItem.scss +0 -23
  83. package/src/components/cms/tabLayout/navItem/navItem.vue +0 -13
  84. package/src/components/cms/tabLayout/tabLayout.js +0 -158
  85. package/src/components/cms/tabLayout/tabLayout.scss +0 -26
  86. package/src/components/cms/tabLayout/tabLayout.vue +0 -43
  87. package/src/components/cms/textItem/index.js +0 -2
  88. package/src/components/cms/textItem/textItem.js +0 -65
  89. package/src/components/cms/textItem/textItem.scss +0 -41
  90. package/src/components/cms/textItem/textItem.vue +0 -26
  91. package/src/components/cms/utils.js +0 -101
  92. package/src/components/cms/videoItem/index.js +0 -2
  93. package/src/components/cms/videoItem/videoItem.js +0 -96
  94. package/src/components/cms/videoItem/videoItem.scss +0 -27
  95. package/src/components/cms/videoItem/videoItem.vue +0 -56
  96. package/src/components/cms/videoPlayer/index.js +0 -2
  97. package/src/components/cms/videoPlayer/videoPlayer.js +0 -68
  98. package/src/components/cms/videoPlayer/videoPlayer.scss +0 -37
  99. package/src/components/cms/videoPlayer/videoPlayer.vue +0 -34
  100. package/src/index.js +0 -23
  101. package/src/index.scss +0 -221
  102. package/src/main.js +0 -8
  103. package/src/utils/common.js +0 -23
  104. package/src/utils/http-client.js +0 -101
  105. package/src/utils/utils.js +0 -63
  106. package/webpack.config.js +0 -109
  107. /package/{dist → lib}/fonts/iconfont.529b3ed0.ttf +0 -0
  108. /package/{dist → lib}/fonts/iconfont.580c918e.eot +0 -0
  109. /package/{dist → lib}/fonts/iconfont.ea5b1aa2.woff +0 -0
package/src/index.scss DELETED
@@ -1,221 +0,0 @@
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 DELETED
@@ -1,8 +0,0 @@
1
- import Vue from 'vue'
2
- import App from './App.vue'
3
-
4
- Vue.config.productionTip = false
5
-
6
- new Vue({
7
- render: h => h(App),
8
- }).$mount('#app')
@@ -1,23 +0,0 @@
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
- }
@@ -1,101 +0,0 @@
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
- }
@@ -1,63 +0,0 @@
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
- }
package/webpack.config.js DELETED
@@ -1,109 +0,0 @@
1
- var path = require("path");
2
- var webpack = require("webpack");
3
-
4
- var entry = "./src/main.js";
5
- var filename = "build.js";
6
-
7
- if (process.env.NODE_ENV !== "development") {
8
- entry = "./src/index.js";
9
- filename = "baiqiu-cms-decoration.min.js";
10
- }
11
-
12
- function resolve (dir) {
13
- return path.join(__dirname, '..', dir)
14
- }
15
-
16
-
17
- module.exports = {
18
- entry,
19
- output: {
20
- path: path.resolve(__dirname, "./dist"),
21
- publicPath: "/dist/",
22
- filename,
23
- library: "bq-cms2.0-decoration.min",
24
- libraryTarget: "umd",
25
- umdNamedDefine: true
26
- },
27
- module: {
28
- rules: [
29
- {
30
- test: /\.css$/,
31
- use: ["vue-style-loader", "css-loader"]
32
- },
33
- {
34
- test: /\.scss$/,
35
- use: ["vue-style-loader", "css-loader", "sass-loader"]
36
- },
37
- {
38
- test: /\.sass$/,
39
- use: ["vue-style-loader", "css-loader", "sass-loader?indentedSyntax"]
40
- },
41
- {
42
- test: /\.vue$/,
43
- loader: "vue-loader",
44
- options: {
45
- loaders: {
46
- scss: ["vue-style-loader", "css-loader", "sass-loader"],
47
- sass: [
48
- "vue-style-loader",
49
- "css-loader",
50
- "sass-loader?indentedSyntax"
51
- ]
52
- }
53
- }
54
- },
55
- {
56
- test: /\.js$/,
57
- loader: "babel-loader",
58
- exclude: /node_modules/
59
- },
60
- {
61
- test: /\.(png|jpg|gif|svg)$/,
62
- loader: "file-loader",
63
- options: {
64
- name: "[name].[ext]?[hash]"
65
- }
66
- },
67
- {
68
- test: /\.(woff|ttf|eot|svg)/,
69
- loader: "file-loader?name=font/[name].[ext]"
70
- }
71
- ]
72
- },
73
- resolve: {
74
- alias: {
75
- vue$: "vue/dist/vue.esm.js"
76
- },
77
- extensions: ["*", ".js", ".vue", ".json"]
78
- },
79
- devServer: {
80
- historyApiFallback: true,
81
- noInfo: true,
82
- overlay: true
83
- },
84
- performance: {
85
- hints: false
86
- },
87
- devtool: "#eval-source-map"
88
- };
89
-
90
- if (process.env.NODE_ENV === "production") {
91
- module.exports.devtool = "#source-map";
92
- // http://vue-loader.vuejs.org/en/workflow/production.html
93
- module.exports.plugins = (module.exports.plugins || []).concat([
94
- new webpack.DefinePlugin({
95
- "process.env": {
96
- NODE_ENV: '"production"'
97
- }
98
- }),
99
- new webpack.optimize.UglifyJsPlugin({
100
- sourceMap: true,
101
- compress: {
102
- warnings: false
103
- }
104
- }),
105
- new webpack.LoaderOptionsPlugin({
106
- minimize: true
107
- })
108
- ]);
109
- }
File without changes
File without changes
File without changes