ytf 2 anni fa
parent
commit
f146ed2d30

+ 32 - 1
admin/config/router.config.js

@@ -604,7 +604,38 @@ export default [
604 604
           },
605 605
         ],
606 606
       },
607
-      
607
+      // 直播
608
+      {
609
+        path: '/bussset_live',
610
+        icon: 'pay-circle',
611
+        name: 'live',
612
+        routes: [
613
+          //直播设置
614
+          {
615
+            path: '/bussset_live/setting',
616
+            name: 'setting',
617
+            component: './bussset/live/setting',
618
+          },
619
+          //标签管理
620
+          {
621
+            path: '/bussset_live/live_label',
622
+            name: 'label',
623
+            component: './bussset/live/setting',
624
+          },
625
+          //主播管理
626
+          {
627
+            path: '/bussset_live/author_lists',
628
+            name: 'author_lists',
629
+            component: './bussset/live/setting',
630
+          },
631
+          //直播管理
632
+          {
633
+            path: '/bussset_live/live_manage',
634
+            name: 'live_manage',
635
+            component: './bussset/live/setting',
636
+          },
637
+        ],
638
+      },
608 639
       
609 640
 
610 641
       // 积分商城

+ 4 - 3
admin/src/components/MDiyItemEdit/index.js

@@ -363,7 +363,7 @@ export default class MDiyItem extends Component {
363 363
         {...formItemLayoutModal}
364 364
         label={''}
365 365
       >
366
-        <Input maxLength={250} style={{ width: 300 }} value={data.info.live_name} disabled={true}/>
366
+        <Input maxLength={250} style={{ width: 300 }} value={data.info.name} disabled={true}/>
367 367
       </FormItem>
368 368
       </div>;
369 369
     } else if (data.url_type == 'svideo') {
@@ -417,7 +417,7 @@ export default class MDiyItem extends Component {
417 417
                           value={data.info.red_title} disabled={true}/>;
418 418
     } else if (data.url_type == 'live') {
419 419
       render_con = <Input key={`${select_data.type}_${select_data.id}_live${index}`} className={styles.more_link_input}
420
-                          value={data.info.live_name} disabled={true}/>;
420
+                          value={data.info.name} disabled={true}/>;
421 421
     } else if (data.url_type == 'svideo') {
422 422
       render_con = <Input key={`${select_data.type}_${select_data.id}_svideo${index}`} className={styles.more_link_input}
423 423
                           value={data.info.videoName} disabled={true}/>;
@@ -536,7 +536,8 @@ export default class MDiyItem extends Component {
536 536
       data.url = val.id;
537 537
       data.info = val;
538 538
     } else if (data.url_type == 'live') {
539
-      data.url = val.liveId;
539
+      // data.url = val.liveId;
540
+      data.url = val.roomId;
540 541
       data.info = val;
541 542
     } else if (data.url_type == 'svideo') {
542 543
       data.url = val.videoId;

+ 7 - 7
admin/src/components/SldDiyMoreImgModal/SldDiyMoreImgModal.js

@@ -516,15 +516,15 @@ export default class SldDiyMoreImgModal extends Component {
516 516
 				item.info = val;
517 517
 			} else if (item.type == 'topic') {
518 518
 			  if(this.props.client!=undefined&&this.props.client=='mobile'){
519
-          item.value = val.name;
520
-			  }else{
521
-          item.value = val.decoName;
522
-        }
519
+					item.value = val.name;
520
+				}else{
521
+					item.value = val.decoName;
522
+				}
523 523
 				item.info = val;
524 524
 			} else if (item.type == 'seckill') {
525
-        item.value = val.seckillName;
526
-        item.info = val;
527
-      }
525
+				item.value = val.seckillName;
526
+				item.info = val;
527
+			}
528 528
 		});
529 529
 		this.setState({ data, link_type: '' });
530 530
 	};

+ 41 - 3
admin/src/components/SldSelGoodsSingleDiy/index.js

@@ -137,6 +137,26 @@ export default class SldSelGoodsSingleDiy extends Component {
137 137
     },
138 138
   ];
139 139
 
140
+  live_columns = [
141
+    {
142
+      title: ' ',
143
+      dataIndex: 'roomId',
144
+      align: 'center',
145
+      width: 30,
146
+      render: (text, record, index) => getTableNum(this.state.params, pageSize, index),
147
+    }, {
148
+      title: `直播名称`,//直播名称
149
+      align: 'center',
150
+      dataIndex: 'name',
151
+      width: 200,
152
+    },  {
153
+      title: `主播名称`,//主播名称
154
+      align: 'center',
155
+      dataIndex: 'anchorName',
156
+      width: 200,
157
+    }, 
158
+  ];
159
+
140 160
   cat_columns = [
141 161
     {
142 162
       title: `${sldComLanguage('分类名称')}`,//分类名称
@@ -238,7 +258,7 @@ export default class SldSelGoodsSingleDiy extends Component {
238 258
 
239 259
   componentWillReceiveProps(nextProps, nextContext) {
240 260
     let { columns, modaltitle, search_data, sldpagination } = this.state;
241
-    if (nextProps.link_type == 'goods' || nextProps.link_type == 'category' || nextProps.link_type == 'topic' || nextProps.link_type == 'seckill' || nextProps.link_type == 'voucher') {
261
+    if (nextProps.link_type == 'goods' || nextProps.link_type == 'live' || nextProps.link_type == 'category' || nextProps.link_type == 'topic' || nextProps.link_type == 'seckill' || nextProps.link_type == 'voucher') {
242 262
       if (nextProps.link_type == 'goods') {
243 263
         columns = this.goods_columns;
244 264
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
@@ -250,7 +270,18 @@ export default class SldSelGoodsSingleDiy extends Component {
250 270
         }];//筛选器
251 271
         sldpagination = true;
252 272
         this.rowKey = 'goodsId';
253
-      } else if (nextProps.link_type == 'category') {
273
+      }  else if (nextProps.link_type == 'live') {
274
+        columns = this.live_columns;
275
+        modaltitle = `选择直播`;//选择直播
276
+        search_data = [{
277
+          type: 'input',
278
+          label: `直播名称`,//直播名称
279
+          name: 'name',
280
+          placeholder: `请输入直播名称`,//请输入直播名称
281
+        }];//筛选器
282
+        sldpagination = true;
283
+        this.rowKey = 'roomId';
284
+      }  else if (nextProps.link_type == 'category') {
254 285
         columns = this.cat_columns;
255 286
         modaltitle = `${sldComLanguage('选择分类')}`;//选择分类
256 287
         search_data = [];
@@ -356,6 +387,9 @@ export default class SldSelGoodsSingleDiy extends Component {
356 387
       //获取商品数据
357 388
       dis_type = 'project/get_goods_lists';
358 389
       new_params.state = 3;//在售状态
390
+    } else if (link_type == 'live') {
391
+      //获取直播数据
392
+      dis_type = 'project/get_live_lists';
359 393
     } else if (link_type == 'category') {
360 394
       //获取分类数据
361 395
       dis_type = 'project/get_cate_list_by_id';
@@ -387,7 +421,7 @@ export default class SldSelGoodsSingleDiy extends Component {
387 421
       callback: (res) => {
388 422
         this.setState({ loading: false });
389 423
         if (res.state == 200) {
390
-          if (link_type == 'goods' || link_type == 'topic' || link_type == 'seckill' || link_type == 'voucher') {
424
+          if (link_type == 'goods' || link_type == 'live' || link_type == 'topic' || link_type == 'seckill' || link_type == 'voucher') {
391 425
             data = res.data;
392 426
           } else if (link_type == 'category') {
393 427
             //id为0直接赋值
@@ -513,6 +547,10 @@ export default class SldSelGoodsSingleDiy extends Component {
513 547
       modalTableSeleData.actualSales = record.actualSales;
514 548
       modalTableSeleData.mainImgUrl = record.mainImage;
515 549
       modalTableSeleData.defaultProductId = record.productId;
550
+    } else if (link_type == 'live') {
551
+      modalTableSeleData.roomId = record.roomId;
552
+      modalTableSeleData.name = record.name;
553
+      modalTableSeleData.anchorName = record.anchorName;
516 554
     } else if (link_type == 'topic') {
517 555
       if (this.props.client == 'mobile') {
518 556
         modalTableSeleData.decoId = record.decoId;

+ 43 - 4
admin/src/components/point/SldSelGoodsSingleDiy/index.js

@@ -109,6 +109,27 @@ export default class SldSelGoodsSingleDiy extends Component {
109 109
     },
110 110
   ];
111 111
 
112
+  live_columns = [
113
+    {
114
+      title: ' ',
115
+      dataIndex: 'roomId',
116
+      align: 'center',
117
+      width: 30,
118
+      render: (text, record, index) => getTableNum(this.state.params, pageSize, index),
119
+    }, {
120
+      title: `直播名称`,//直播名称
121
+      align: 'center',
122
+      dataIndex: 'name',
123
+      width: 200,
124
+    },  {
125
+      title: `主播名称`,//主播名称
126
+      align: 'center',
127
+      dataIndex: 'anchorName',
128
+      width: 200,
129
+    }, 
130
+  ];
131
+
132
+
112 133
   topic_columns_mobile = [
113 134
     {
114 135
       title: ' ',
@@ -201,7 +222,7 @@ export default class SldSelGoodsSingleDiy extends Component {
201 222
 
202 223
   componentWillReceiveProps(nextProps, nextContext) {
203 224
     let { columns, modaltitle, search_data, sldpagination } = this.state;
204
-    if (nextProps.link_type == 'goods' || nextProps.link_type == 'category' || nextProps.link_type == 'topic'||nextProps.link_type == 'seckill') {
225
+    if (nextProps.link_type == 'goods' || nextProps.link_type == 'live' || nextProps.link_type == 'category' || nextProps.link_type == 'topic'||nextProps.link_type == 'seckill') {
205 226
       if (nextProps.link_type == 'goods') {
206 227
         columns = this.goods_columns;
207 228
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
@@ -265,7 +286,18 @@ export default class SldSelGoodsSingleDiy extends Component {
265 286
         modaltitle = `选择秒杀活动`;
266 287
         sldpagination = true;
267 288
         this.rowKey = 'seckillId';
268
-      }
289
+      } else if (nextProps.link_type == 'live') {
290
+        columns = this.live_columns;
291
+        modaltitle = `选择直播`;//选择直播
292
+        search_data = [{
293
+          type: 'input',
294
+          label: `直播名称`,//直播名称
295
+          name: 'name',
296
+          placeholder: `请输入直播名称`,//请输入直播名称
297
+        }];//筛选器
298
+        sldpagination = true;
299
+        this.rowKey = 'roomId';
300
+      } 
269 301
       this.setState({
270 302
         search_data,
271 303
         link_type: nextProps.link_type,
@@ -298,6 +330,9 @@ export default class SldSelGoodsSingleDiy extends Component {
298 330
       //获取商品数据
299 331
       dis_type = 'project/get_point_goods_lists';
300 332
       new_params.state = 3;//在售状态
333
+    } else if (link_type == 'live') {
334
+      //获取直播数据
335
+      dis_type = 'project/get_live_lists';
301 336
     } else if (link_type == 'category') {
302 337
       //获取分类数据
303 338
       dis_type = 'project/get_point_label_list';
@@ -309,7 +344,7 @@ export default class SldSelGoodsSingleDiy extends Component {
309 344
       callback: (res) => {
310 345
         this.setState({ loading: false });
311 346
         if (res.state == 200) {
312
-          if (link_type == 'goods' || link_type == 'topic' || link_type == 'seckill') {
347
+          if (link_type == 'goods' || link_type == 'live' || link_type == 'topic' || link_type == 'seckill') {
313 348
             data = res.data;
314 349
           } else if (link_type == 'category') {
315 350
             //id为0直接赋值
@@ -436,7 +471,11 @@ export default class SldSelGoodsSingleDiy extends Component {
436 471
       modalTableSeleData.actualSales = record.actualSales;
437 472
       modalTableSeleData.mainImage = record.mainImage;
438 473
       modalTableSeleData.productId = record.productId;
439
-    }else if (link_type == 'category') {
474
+    } else if (link_type == 'live') {
475
+      modalTableSeleData.roomId = record.roomId;
476
+      modalTableSeleData.name = record.name;
477
+      modalTableSeleData.anchorName = record.anchorName;
478
+    } else if (link_type == 'category') {
440 479
       modalTableSeleData.labelId = record.labelId;
441 480
       modalTableSeleData.labelName = record.labelName;
442 481
       modalTableSeleData.grade = record.grade;

+ 9 - 4
admin/src/models/project.js

@@ -31,6 +31,11 @@ export default {
31 31
       const response = yield call(sldCommonService, payload, 'get', 'v3/goods/admin/goods/list');
32 32
       if (callback) callback(response);
33 33
     },
34
+    //slodon_获取直播列表
35
+    * get_live_lists({ payload, callback }, { call }) {
36
+      const response = yield call(sldCommonService, payload, 'get', 'v3/live/broad/list');
37
+      if (callback) callback(response);
38
+    },
34 39
     //slodon_获取移动端装修列表
35 40
     * get_diy_page_lists({ payload, callback }, { call }) {
36 41
       const response = yield call(sldCommonService, payload, 'get', 'v3/system/admin/mobileDeco/list');
@@ -62,10 +67,10 @@ export default {
62 67
       callback && callback(response);
63 68
     },
64 69
     // slodon_获取直播列表
65
-    * get_live_lists({ payload, callback }, { call }) {
66
-      const response = yield call(sldCommonService, payload, 'get', 'v3/video/admin/video/live/list');
67
-      if (callback) callback(response);
68
-    },
70
+    // * get_live_lists({ payload, callback }, { call }) {
71
+    //   const response = yield call(sldCommonService, payload, 'get', 'v3/video/admin/video/live/list');
72
+    //   if (callback) callback(response);
73
+    // },
69 74
     // slodon_获取短视频标签列表
70 75
     * get_svideo_label_lists({ payload, callback }, { call }) {
71 76
       const response = yield call(sldCommonService, payload, 'get', 'v3/video/admin/video/label/list');

+ 1 - 1
admin/src/utils/util_data.js

@@ -726,7 +726,7 @@ export function m_diy_link_type() {
726 726
     { key: 'voucher_center', name: `${sldComLanguage('领券中心')}` },
727 727
     { key: 'point', name: `${sldComLanguage('积分商城')}` },
728 728
     { key: 'svideo_center', name: `${sldComLanguage('短视频中心')}` },
729
-    { key: 'live_center', name: `${sldComLanguage('直播中心')}` },
729
+    { key: 'live', name: `${sldComLanguage('直播中心')}` },
730 730
     { key: 'sign_center', name: `${sldComLanguage('签到中心')}` },
731 731
   ];
732 732
 }