jufubao-admin-library 1.1.29 → 1.1.31
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.
|
@@ -100,7 +100,7 @@ module.exports = {
|
|
|
100
100
|
{
|
|
101
101
|
title: '贺卡管理 - 素材配置数据',
|
|
102
102
|
mapFn: "setGreetingCardBaseConfig",
|
|
103
|
-
path: '/saas-admin/v1/bless_material/:material_id',
|
|
103
|
+
path: '/saas-admin/v1/bless_material/config/:material_id',
|
|
104
104
|
isRule: false,
|
|
105
105
|
data: {
|
|
106
106
|
material_id:['素材ID', 'string|number', '必填'],
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
:class="{'g-active':item.value === custom_group_id,'g-no-active':item.value !== custom_group_id}"
|
|
20
20
|
v-for="item in search_group_list"
|
|
21
21
|
:icon="item.value === custom_group_id?'el-icon-check':''"
|
|
22
|
+
:key="item.value"
|
|
22
23
|
:command="item.value"
|
|
23
24
|
>{{item.label}}</el-dropdown-item>
|
|
24
25
|
</el-dropdown-menu>
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
<hr>
|
|
70
71
|
<div style="font-size: 30px">Detail:{{materialDetailConfig}}</div>
|
|
71
72
|
</template>
|
|
72
|
-
{{materialData}}
|
|
73
73
|
<div
|
|
74
74
|
v-if="isShowPhone"
|
|
75
75
|
v-for="(item,key) in materialData"
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
class="iphone-box-content"
|
|
78
78
|
@click="handleEditCard(item['key'])"
|
|
79
79
|
:class="{active:mainActive === item['key']}"
|
|
80
|
+
|
|
80
81
|
:style="{height: item.outHeight}"
|
|
81
82
|
>
|
|
82
83
|
<div class="iphone-box-content__image" :style="item.image"></div>
|
|
@@ -147,10 +148,8 @@ export default {
|
|
|
147
148
|
listValue:{
|
|
148
149
|
handler(value){
|
|
149
150
|
if(this.materialDataTimer) clearTimeout(this.materialDataTimer);
|
|
150
|
-
this.
|
|
151
|
-
|
|
152
|
-
this.setMaterialConfig(value)
|
|
153
|
-
}, 500)
|
|
151
|
+
this.setMaterialData(value);
|
|
152
|
+
this.setMaterialConfig(value)
|
|
154
153
|
},
|
|
155
154
|
deep: true
|
|
156
155
|
},
|
|
@@ -180,7 +179,7 @@ export default {
|
|
|
180
179
|
isPc: true,
|
|
181
180
|
firstLoading:false,
|
|
182
181
|
defaultCoverImage: '//img.jufubao.cn/component/dome-cover.png',
|
|
183
|
-
defaultDetailImage: '
|
|
182
|
+
defaultDetailImage: '',//img.jufubao.cn/component/dome-detail.png',
|
|
184
183
|
|
|
185
184
|
//地址栏中参数(超管)
|
|
186
185
|
group_id: '',
|
|
@@ -211,6 +210,7 @@ export default {
|
|
|
211
210
|
|
|
212
211
|
|
|
213
212
|
//编辑模式下使用变量
|
|
213
|
+
bless_id:null,//祝福ID
|
|
214
214
|
mainActive:'', //编辑时候区分是封面还是详情原始快
|
|
215
215
|
materialCoverKey:{
|
|
216
216
|
material_cover_config:'materialCoverConfig',
|
|
@@ -257,6 +257,10 @@ export default {
|
|
|
257
257
|
if(query.x_material_id) {
|
|
258
258
|
this.custom_x_material_id = Number(query.x_material_id);
|
|
259
259
|
}
|
|
260
|
+
|
|
261
|
+
//祝福ID
|
|
262
|
+
if(query['bless_id']) this.bless_id = query['bless_id'];
|
|
263
|
+
|
|
260
264
|
this.isPc = isPlatform().isPc;
|
|
261
265
|
this.initDataCard();
|
|
262
266
|
},
|
|
@@ -427,6 +431,11 @@ export default {
|
|
|
427
431
|
if(this.search_group_name) params.filters.material_name = this.search_group_name;
|
|
428
432
|
this.getGreetingCardList(params)
|
|
429
433
|
.then(res=>{
|
|
434
|
+
//过滤未配置模版
|
|
435
|
+
res.data.list = res.data.list.filter(item=>{
|
|
436
|
+
return (item.material_cover_config && item.material_detail_config)
|
|
437
|
+
});
|
|
438
|
+
|
|
430
439
|
if(this.custom_active_item) {
|
|
431
440
|
res.data.list = this.custom_active_item.concat(res.data.list.filter(item=>{
|
|
432
441
|
return item.id !== this.custom_active_material_id
|
|
@@ -483,8 +492,9 @@ export default {
|
|
|
483
492
|
debugger
|
|
484
493
|
this.$message({message:'操作成功!',type:"success"});
|
|
485
494
|
window['xdLocalStore'].set('xd-card-x-material-id', res.data.x_material_id || this.custom_x_material_id);
|
|
495
|
+
window['xdLocalStore'].set('xd-card-active', 1);
|
|
486
496
|
setTimeout(()=>{
|
|
487
|
-
this.$router.
|
|
497
|
+
this.$router.push(`/cards/edit/${this.bless_id}`);
|
|
488
498
|
},1500)
|
|
489
499
|
loading.close()
|
|
490
500
|
})
|
|
@@ -602,18 +612,15 @@ export default {
|
|
|
602
612
|
handleEditCard(key){
|
|
603
613
|
if(key === this.mainActive) return;
|
|
604
614
|
this.clearEditCard();
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
this.initForm(this.getFromParams())
|
|
608
|
-
},50)
|
|
609
|
-
|
|
615
|
+
this.mainActive = key;
|
|
616
|
+
this.initForm(this.getFromParams(),Loading.service({}))
|
|
610
617
|
},
|
|
611
618
|
|
|
612
619
|
getFromParams(){
|
|
613
620
|
return this[this.materialCoverKey[this.mainActive]];
|
|
614
621
|
},
|
|
615
622
|
|
|
616
|
-
initForm(params={}){
|
|
623
|
+
initForm(params={},loading){
|
|
617
624
|
let defaultHeight = 760;
|
|
618
625
|
let defaultImage = this.defaultCoverImage
|
|
619
626
|
let defaultTop = 470;
|
|
@@ -739,6 +746,11 @@ export default {
|
|
|
739
746
|
].filter(i=>i);
|
|
740
747
|
this.status = true;
|
|
741
748
|
this.listValueKey = Date.now();
|
|
749
|
+
this.$nextTick(()=>{
|
|
750
|
+
setTimeout(()=>{
|
|
751
|
+
if(loading) loading.close()
|
|
752
|
+
}, this.$xdHelper.random(5,10) * 100)
|
|
753
|
+
})
|
|
742
754
|
},
|
|
743
755
|
|
|
744
756
|
setMaterialData(item, key = null){
|
|
@@ -985,6 +997,10 @@ export default {
|
|
|
985
997
|
position: relative;
|
|
986
998
|
cursor: pointer;
|
|
987
999
|
|
|
1000
|
+
&.noCursor {
|
|
1001
|
+
cursor: default!important;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
988
1004
|
&.active::after {
|
|
989
1005
|
content: ' ';
|
|
990
1006
|
position: absolute;
|