jufubao-base 1.0.157-beta2 → 1.0.157
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/package.json +1 -1
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +1 -7
- package/src/components/JfbBaseEntry/Attr.js +0 -22
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +13 -77
- package/src/components/JfbBaseNotice/Attr.js +2 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +8 -7
- package/src/components/JfbBasePosterType/FourScreen.vue +4 -50
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +35 -0
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +3 -0
- package/src/components/JfbBaseVideo/XdVideo.vue +4 -0
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<view>
|
|
54
54
|
<view
|
|
55
55
|
class="jfb-base-card-info__body-info"
|
|
56
|
-
v-for="(item, index) in
|
|
56
|
+
v-for="(item, index) in valueKey"
|
|
57
57
|
:key="index"
|
|
58
58
|
>
|
|
59
59
|
<view class="jfb-base-card-info__body-info-label">{{item.label}}</view>
|
|
@@ -175,12 +175,6 @@ export default {
|
|
|
175
175
|
return this.is_show_balance === "Y";
|
|
176
176
|
}
|
|
177
177
|
return true;
|
|
178
|
-
},
|
|
179
|
-
showValueKey(){
|
|
180
|
-
if(this.info.is_expired === "Y"){
|
|
181
|
-
return this.valueKey.filter(item => item.key !== "end_time");
|
|
182
|
-
}
|
|
183
|
-
return this.valueKey;
|
|
184
178
|
}
|
|
185
179
|
},
|
|
186
180
|
created() {},
|
|
@@ -7,28 +7,6 @@ export default {
|
|
|
7
7
|
style: [],
|
|
8
8
|
content: (data) => {
|
|
9
9
|
return [
|
|
10
|
-
{
|
|
11
|
-
label: '选择综合入口类型:',
|
|
12
|
-
ele: 'xd-site-select-list',
|
|
13
|
-
valueKey: 'entryType',
|
|
14
|
-
value: data['entryType'],
|
|
15
|
-
placeholder: '请选择综合入口类型',
|
|
16
|
-
multiple: false,
|
|
17
|
-
groupKey:'content',
|
|
18
|
-
className: 'input50',
|
|
19
|
-
rules: [
|
|
20
|
-
{required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
|
|
21
|
-
],
|
|
22
|
-
handleCustom({action, data}) {
|
|
23
|
-
XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
|
|
24
|
-
.then(res => {
|
|
25
|
-
data.cb(res.list)
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.error(error);
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
10
|
{
|
|
33
11
|
label: '每行显示数量',
|
|
34
12
|
ele: 'xd-radio',
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
50
50
|
import extsMixins from "@/mixins/extsMixins";
|
|
51
51
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
52
|
-
import {
|
|
52
|
+
import {base64} from 'js-base64';
|
|
53
53
|
export default {
|
|
54
54
|
name: "JfbBaseEntry",
|
|
55
55
|
components: {
|
|
@@ -66,11 +66,9 @@
|
|
|
66
66
|
paddingInput: 20,
|
|
67
67
|
loadingList: true,
|
|
68
68
|
margin: {},
|
|
69
|
-
entryType: '',
|
|
70
69
|
}
|
|
71
70
|
},
|
|
72
71
|
computed: {
|
|
73
|
-
...mapState(['brandInfo']),
|
|
74
72
|
bodyStyle(){
|
|
75
73
|
return {
|
|
76
74
|
backgroundColor: this.bgcolor,
|
|
@@ -113,67 +111,17 @@
|
|
|
113
111
|
this.rowNum = getContainerPropsValue(container, 'content.rowNum', 1);
|
|
114
112
|
this.paddingInput = getContainerPropsValue(container, 'content.paddingInput', 20);
|
|
115
113
|
this.margin = getContainerPropsValue(container, 'content.margin', {});
|
|
116
|
-
this.entryType = getContainerPropsValue(container, 'content.entryType', 'default');
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
getCardPath(custom_redirect_data = {}){
|
|
120
|
-
//#ifdef H5
|
|
121
|
-
return null;
|
|
122
|
-
//#endif
|
|
123
|
-
//#ifdef MP-WEIXIN
|
|
124
|
-
const dir = custom_redirect_data.dir;
|
|
125
|
-
const actDir = this.projectAttr['deploy_dir'];
|
|
126
|
-
if(custom_redirect_data.appType === 'wxmp') {
|
|
127
|
-
if(dir === actDir) {
|
|
128
|
-
return {
|
|
129
|
-
cardPath: custom_redirect_data.path,
|
|
130
|
-
cardSelf: 'wxmp',
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
else return null;
|
|
134
|
-
}
|
|
135
|
-
else if(custom_redirect_data.appType === 'h5'){
|
|
136
|
-
return {
|
|
137
|
-
cardPath: custom_redirect_data.site_url,
|
|
138
|
-
cardSelf: 'h5',
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
else return null;
|
|
142
|
-
//#endif
|
|
143
114
|
},
|
|
144
115
|
getEntrySetting(){
|
|
145
116
|
this.$xdShowLoading({});
|
|
146
117
|
jfbRootExec("getEntrySetting", {
|
|
147
118
|
vm: this,
|
|
148
|
-
data: {
|
|
149
|
-
group_id:this.entryType || 'default'
|
|
150
|
-
}
|
|
119
|
+
data: {}
|
|
151
120
|
}).then(res => {
|
|
152
121
|
this.loadingList = false;
|
|
153
122
|
this.$xdHideLoading();
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.entryList = res.list.filter(item=>{
|
|
157
|
-
//#ifdef H5
|
|
158
|
-
//在H5平台应用中不可跳转到微信小程序应用
|
|
159
|
-
if(item.redirect_data.appType === 'wxmp'){
|
|
160
|
-
isH5FilterEntryList.push(item)
|
|
161
|
-
}
|
|
162
|
-
return item.redirect_data.appType !== 'wxmp';
|
|
163
|
-
//#endif
|
|
164
|
-
|
|
165
|
-
//#ifdef MP-WEIXIN
|
|
166
|
-
const dir = item['redirect_data'].dir;
|
|
167
|
-
const actDir = this.projectAttr['deploy_dir'];
|
|
168
|
-
if(item.redirect_data.appType === 'wxmp') {
|
|
169
|
-
if(dir !== actDir) isMpFilterEntryList.push(item)
|
|
170
|
-
return dir === actDir;
|
|
171
|
-
}
|
|
172
|
-
return true
|
|
173
|
-
//#endif
|
|
174
|
-
}).map(item => {
|
|
175
|
-
const {dir, path, host,appType} = item['redirect_data'];
|
|
176
|
-
if(appType === undefined) item.redirect_data.appType = 'h5';
|
|
123
|
+
this.entryList = res.list.map(item => {
|
|
124
|
+
const {dir, path, host} = item['redirect_data'];
|
|
177
125
|
item['image_url'] = getServiceUrl(item.image_url);
|
|
178
126
|
item['image_url2'] = item.image_url2 ? getServiceUrl(item.image_url2) : "";
|
|
179
127
|
item['image_url3'] = item.image_url3 ? getServiceUrl(item.image_url3) : "";
|
|
@@ -191,36 +139,24 @@
|
|
|
191
139
|
let jumpUrl = path;
|
|
192
140
|
|
|
193
141
|
//域名相同并且应用路径不相同时候处理
|
|
194
|
-
if(host === this.projectAttr.host
|
|
142
|
+
if(host === this.projectAttr.host
|
|
143
|
+
&& this.projectAttr['deploy_dir'] !== dir
|
|
144
|
+
){
|
|
195
145
|
jumpUrl = `//${host}/${dir}${path}`;
|
|
196
146
|
//#ifdef MP-WEIXIN
|
|
197
147
|
jumpUrl = `https:${jumpUrl}`;
|
|
198
148
|
//#endif
|
|
199
149
|
}
|
|
200
150
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const cardPathObject = this.getCardPath(custom_redirect_data);
|
|
207
|
-
if(cardPathObject !== null) {
|
|
208
|
-
const {cardPath, cardSelf} =cardPathObject
|
|
209
|
-
if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
|
|
210
|
-
}
|
|
211
|
-
|
|
151
|
+
if(item['redirect_data']['fixed_business_code'] === '') {
|
|
152
|
+
item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
153
|
+
}
|
|
154
|
+
else{
|
|
155
|
+
item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
212
156
|
}
|
|
213
|
-
//#endif
|
|
214
|
-
item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
|
|
215
157
|
return item;
|
|
216
158
|
});
|
|
217
|
-
|
|
218
|
-
console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
219
|
-
//#endif
|
|
220
|
-
//#ifdef H5
|
|
221
|
-
console.warn(`H5端被过滤的入口列表:${JSON.stringify(isH5FilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
222
|
-
//#endif
|
|
223
|
-
console.warn(`福利入口链接列表:${JSON.stringify(this.entryList.map(item=> `${item.redirect_data.appType}:${item.redirect_data['path']}`),null,2)}`);
|
|
159
|
+
console.log( this.entryList)
|
|
224
160
|
if(res.list.length === 1) this.toLink(this.entryList[0]);
|
|
225
161
|
if(res.list.length === 0) {
|
|
226
162
|
this.$xdAlert({content: '当前票券暂无支持服务'})
|
|
@@ -235,13 +235,7 @@
|
|
|
235
235
|
this.speedKey = Date.now()
|
|
236
236
|
}, 400)
|
|
237
237
|
|
|
238
|
-
}
|
|
239
|
-
is_hide_dailog(value){
|
|
240
|
-
if(value === 'N') {
|
|
241
|
-
storage.remove(this.containerId);
|
|
242
|
-
this.onJfbLoad();
|
|
243
|
-
}
|
|
244
|
-
},
|
|
238
|
+
}
|
|
245
239
|
},
|
|
246
240
|
computed:{
|
|
247
241
|
marginUi() {
|
|
@@ -287,6 +281,13 @@
|
|
|
287
281
|
return this.num > 1
|
|
288
282
|
},
|
|
289
283
|
|
|
284
|
+
is_hide_dailog(value){
|
|
285
|
+
if(value === 'N') {
|
|
286
|
+
storage.remove(this.containerId);
|
|
287
|
+
this.onJfbLoad();
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
|
|
290
291
|
},
|
|
291
292
|
created() {
|
|
292
293
|
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
@@ -147,50 +147,6 @@
|
|
|
147
147
|
handleAnimationfinish(e) {
|
|
148
148
|
this.current = e.detail.current;
|
|
149
149
|
},
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @description 过滤不可以用
|
|
153
|
-
* 当前项目未H5时,过滤所有小程序应用
|
|
154
|
-
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
155
|
-
* 站外地址直接返回
|
|
156
|
-
* 站内地址未选值直接返回
|
|
157
|
-
* 预览模式全过
|
|
158
|
-
*/
|
|
159
|
-
filterItem(){
|
|
160
|
-
let content = this.content.filter(item=>{
|
|
161
|
-
//预览模式
|
|
162
|
-
if( this.$configProject.isPreview) return true;
|
|
163
|
-
|
|
164
|
-
//非内部应用
|
|
165
|
-
if(item.redirect_type !== 'INN') {
|
|
166
|
-
return true
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
//内部应用
|
|
170
|
-
else {
|
|
171
|
-
let redirect_data;
|
|
172
|
-
try {
|
|
173
|
-
redirect_data = JSON.parse(item.redirect_data);
|
|
174
|
-
if(!redirect_data.appType) redirect_data.appType = 'h5'
|
|
175
|
-
//#ifdef H5
|
|
176
|
-
return redirect_data.appType !== 'wxmp';
|
|
177
|
-
//#endif
|
|
178
|
-
|
|
179
|
-
//#ifdef MP-WEIXIN
|
|
180
|
-
console.log(redirect_data,item,this.$parent.projectAttr)
|
|
181
|
-
debugger
|
|
182
|
-
//#endif
|
|
183
|
-
} catch (e) {
|
|
184
|
-
console.error(e)
|
|
185
|
-
return true
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
console.log(content)
|
|
190
|
-
return content;
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
194
150
|
init() {
|
|
195
151
|
if (this.timer) clearTimeout(this.timer);
|
|
196
152
|
this.timer = setTimeout(() => {
|
|
@@ -198,22 +154,19 @@
|
|
|
198
154
|
this.height = this.config.height;
|
|
199
155
|
this.padding = 0;
|
|
200
156
|
|
|
201
|
-
//过滤不可以用
|
|
202
|
-
const content = this.filterItem();
|
|
203
|
-
|
|
204
157
|
//静态图显示
|
|
205
158
|
if(this.config.isCarousel === false) {
|
|
206
|
-
this.list = content.filter((item,index)=>{
|
|
159
|
+
this.list = this.content.filter((item,index)=>{
|
|
207
160
|
return index < (this.config.cells * this.config.jdRows);
|
|
208
161
|
})
|
|
209
162
|
}
|
|
210
163
|
//轮播图显示
|
|
211
164
|
else {
|
|
212
165
|
let num = this.config.cells * this.config.jdRows;
|
|
213
|
-
let maxPage = Math.ceil(content.length / num);
|
|
166
|
+
let maxPage = Math.ceil(this.content.length / num);
|
|
214
167
|
let arr = [];
|
|
215
168
|
for(let i =1 ; i <= maxPage; i++) {
|
|
216
|
-
arr.push(this.$xdUniHelper.getLocalPaginationData(content, i, num))
|
|
169
|
+
arr.push(this.$xdUniHelper.getLocalPaginationData(this.content, i, num))
|
|
217
170
|
}
|
|
218
171
|
this.list = arr;
|
|
219
172
|
}
|
|
@@ -222,6 +175,7 @@
|
|
|
222
175
|
}, 100)
|
|
223
176
|
},
|
|
224
177
|
handleClick(item) {
|
|
178
|
+
debugger
|
|
225
179
|
//内部链接跳转地址
|
|
226
180
|
if (item.redirect_type === 'INN') {
|
|
227
181
|
try {
|
|
@@ -131,6 +131,41 @@
|
|
|
131
131
|
handleAnimationfinish(e) {
|
|
132
132
|
this.current = e.detail.current;
|
|
133
133
|
},
|
|
134
|
+
handleClick(item, index){
|
|
135
|
+
this.current = index;
|
|
136
|
+
const handle = (data) => {
|
|
137
|
+
try {
|
|
138
|
+
return JSON.parse(data);
|
|
139
|
+
} catch (e) {
|
|
140
|
+
return {}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
if(this.$configProject.isPreview) {
|
|
144
|
+
console.log(item)
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
if (item['redirect_type'] === 'EMP') return;
|
|
148
|
+
let url = '';
|
|
149
|
+
|
|
150
|
+
if (item['redirect_type'] === 'URL') {
|
|
151
|
+
url = handle(item['redirect_data']).url || ''
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (item['redirect_type'] === 'INN') {
|
|
155
|
+
url = handle(item['redirect_data']).page || ''
|
|
156
|
+
}
|
|
157
|
+
if (item['redirect_type'] === 'APP') {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (url === '') {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if(url.indexOf('?') === -1) url = `${url}?vs=${new Date().getTime()}`;
|
|
165
|
+
else url = `${url}&vs=${new Date().getTime()}`;
|
|
166
|
+
this.$xdUniHelper.navigateTo({url})
|
|
167
|
+
}
|
|
168
|
+
},
|
|
134
169
|
handleImage(list){
|
|
135
170
|
return list.map(item => {
|
|
136
171
|
return {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
:key="videoKey"
|
|
33
33
|
:poster="videoSetting"
|
|
34
34
|
:video="video"
|
|
35
|
+
:pack-this="$vm"
|
|
35
36
|
></xd-video>
|
|
36
37
|
<view class="not-video" v-if="video === ''">
|
|
37
38
|
<image :src="getVideoSrc"></image>
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
width:750,
|
|
73
74
|
bgColor:'',
|
|
74
75
|
radius:0,
|
|
76
|
+
$vm: {},
|
|
75
77
|
videoKey : Date.now()
|
|
76
78
|
}
|
|
77
79
|
},
|
|
@@ -124,6 +126,7 @@
|
|
|
124
126
|
}
|
|
125
127
|
},
|
|
126
128
|
created() {
|
|
129
|
+
this.$vm = this;
|
|
127
130
|
this.isPreview = this.$configProject.isPreview;
|
|
128
131
|
this.init(this.container);
|
|
129
132
|
},
|