jufubao-admin-library 1.1.30 → 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>
@@ -76,6 +77,7 @@
76
77
  class="iphone-box-content"
77
78
  @click="handleEditCard(item['key'])"
78
79
  :class="{active:mainActive === item['key']}"
80
+
79
81
  :style="{height: item.outHeight}"
80
82
  >
81
83
  <div class="iphone-box-content__image" :style="item.image"></div>
@@ -146,10 +148,8 @@ export default {
146
148
  listValue:{
147
149
  handler(value){
148
150
  if(this.materialDataTimer) clearTimeout(this.materialDataTimer);
149
- this.materialDataTimer = setTimeout(()=>{
150
- this.setMaterialData(value);
151
- this.setMaterialConfig(value)
152
- }, 500)
151
+ this.setMaterialData(value);
152
+ this.setMaterialConfig(value)
153
153
  },
154
154
  deep: true
155
155
  },
@@ -179,7 +179,7 @@ export default {
179
179
  isPc: true,
180
180
  firstLoading:false,
181
181
  defaultCoverImage: '//img.jufubao.cn/component/dome-cover.png',
182
- defaultDetailImage: '//img.jufubao.cn/component/dome-detail.png',
182
+ defaultDetailImage: '',//img.jufubao.cn/component/dome-detail.png',
183
183
 
184
184
  //地址栏中参数(超管)
185
185
  group_id: '',
@@ -210,6 +210,7 @@ export default {
210
210
 
211
211
 
212
212
  //编辑模式下使用变量
213
+ bless_id:null,//祝福ID
213
214
  mainActive:'', //编辑时候区分是封面还是详情原始快
214
215
  materialCoverKey:{
215
216
  material_cover_config:'materialCoverConfig',
@@ -256,6 +257,10 @@ export default {
256
257
  if(query.x_material_id) {
257
258
  this.custom_x_material_id = Number(query.x_material_id);
258
259
  }
260
+
261
+ //祝福ID
262
+ if(query['bless_id']) this.bless_id = query['bless_id'];
263
+
259
264
  this.isPc = isPlatform().isPc;
260
265
  this.initDataCard();
261
266
  },
@@ -426,6 +431,11 @@ export default {
426
431
  if(this.search_group_name) params.filters.material_name = this.search_group_name;
427
432
  this.getGreetingCardList(params)
428
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
+
429
439
  if(this.custom_active_item) {
430
440
  res.data.list = this.custom_active_item.concat(res.data.list.filter(item=>{
431
441
  return item.id !== this.custom_active_material_id
@@ -482,8 +492,9 @@ export default {
482
492
  debugger
483
493
  this.$message({message:'操作成功!',type:"success"});
484
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);
485
496
  setTimeout(()=>{
486
- this.$router.back();
497
+ this.$router.push(`/cards/edit/${this.bless_id}`);
487
498
  },1500)
488
499
  loading.close()
489
500
  })
@@ -601,18 +612,15 @@ export default {
601
612
  handleEditCard(key){
602
613
  if(key === this.mainActive) return;
603
614
  this.clearEditCard();
604
- setTimeout(()=>{
605
- this.mainActive = key;
606
- this.initForm(this.getFromParams())
607
- },50)
608
-
615
+ this.mainActive = key;
616
+ this.initForm(this.getFromParams(),Loading.service({}))
609
617
  },
610
618
 
611
619
  getFromParams(){
612
620
  return this[this.materialCoverKey[this.mainActive]];
613
621
  },
614
622
 
615
- initForm(params={}){
623
+ initForm(params={},loading){
616
624
  let defaultHeight = 760;
617
625
  let defaultImage = this.defaultCoverImage
618
626
  let defaultTop = 470;
@@ -738,6 +746,11 @@ export default {
738
746
  ].filter(i=>i);
739
747
  this.status = true;
740
748
  this.listValueKey = Date.now();
749
+ this.$nextTick(()=>{
750
+ setTimeout(()=>{
751
+ if(loading) loading.close()
752
+ }, this.$xdHelper.random(5,10) * 100)
753
+ })
741
754
  },
742
755
 
743
756
  setMaterialData(item, key = null){
@@ -984,6 +997,10 @@ export default {
984
997
  position: relative;
985
998
  cursor: pointer;
986
999
 
1000
+ &.noCursor {
1001
+ cursor: default!important;
1002
+ }
1003
+
987
1004
  &.active::after {
988
1005
  content: ' ';
989
1006
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {