Browse Source

直播修改

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

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

@@ -516,15 +516,15 @@ export default class SldDiyMoreImgModal extends Component {
516
 				item.info = val;
516
 				item.info = val;
517
 			} else if (item.type == 'topic') {
517
 			} else if (item.type == 'topic') {
518
 			  if(this.props.client!=undefined&&this.props.client=='mobile'){
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
 				item.info = val;
523
 				item.info = val;
524
 			} else if (item.type == 'seckill') {
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
 		this.setState({ data, link_type: '' });
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
   cat_columns = [
160
   cat_columns = [
141
     {
161
     {
142
       title: `${sldComLanguage('分类名称')}`,//分类名称
162
       title: `${sldComLanguage('分类名称')}`,//分类名称
@@ -238,7 +258,7 @@ export default class SldSelGoodsSingleDiy extends Component {
238
 
258
 
239
   componentWillReceiveProps(nextProps, nextContext) {
259
   componentWillReceiveProps(nextProps, nextContext) {
240
     let { columns, modaltitle, search_data, sldpagination } = this.state;
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
       if (nextProps.link_type == 'goods') {
262
       if (nextProps.link_type == 'goods') {
243
         columns = this.goods_columns;
263
         columns = this.goods_columns;
244
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
264
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
@@ -250,7 +270,18 @@ export default class SldSelGoodsSingleDiy extends Component {
250
         }];//筛选器
270
         }];//筛选器
251
         sldpagination = true;
271
         sldpagination = true;
252
         this.rowKey = 'goodsId';
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
         columns = this.cat_columns;
285
         columns = this.cat_columns;
255
         modaltitle = `${sldComLanguage('选择分类')}`;//选择分类
286
         modaltitle = `${sldComLanguage('选择分类')}`;//选择分类
256
         search_data = [];
287
         search_data = [];
@@ -356,6 +387,9 @@ export default class SldSelGoodsSingleDiy extends Component {
356
       //获取商品数据
387
       //获取商品数据
357
       dis_type = 'project/get_goods_lists';
388
       dis_type = 'project/get_goods_lists';
358
       new_params.state = 3;//在售状态
389
       new_params.state = 3;//在售状态
390
+    } else if (link_type == 'live') {
391
+      //获取直播数据
392
+      dis_type = 'project/get_live_lists';
359
     } else if (link_type == 'category') {
393
     } else if (link_type == 'category') {
360
       //获取分类数据
394
       //获取分类数据
361
       dis_type = 'project/get_cate_list_by_id';
395
       dis_type = 'project/get_cate_list_by_id';
@@ -387,7 +421,7 @@ export default class SldSelGoodsSingleDiy extends Component {
387
       callback: (res) => {
421
       callback: (res) => {
388
         this.setState({ loading: false });
422
         this.setState({ loading: false });
389
         if (res.state == 200) {
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
             data = res.data;
425
             data = res.data;
392
           } else if (link_type == 'category') {
426
           } else if (link_type == 'category') {
393
             //id为0直接赋值
427
             //id为0直接赋值
@@ -513,6 +547,10 @@ export default class SldSelGoodsSingleDiy extends Component {
513
       modalTableSeleData.actualSales = record.actualSales;
547
       modalTableSeleData.actualSales = record.actualSales;
514
       modalTableSeleData.mainImgUrl = record.mainImage;
548
       modalTableSeleData.mainImgUrl = record.mainImage;
515
       modalTableSeleData.defaultProductId = record.productId;
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
     } else if (link_type == 'topic') {
554
     } else if (link_type == 'topic') {
517
       if (this.props.client == 'mobile') {
555
       if (this.props.client == 'mobile') {
518
         modalTableSeleData.decoId = record.decoId;
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
   topic_columns_mobile = [
133
   topic_columns_mobile = [
113
     {
134
     {
114
       title: ' ',
135
       title: ' ',
@@ -201,7 +222,7 @@ export default class SldSelGoodsSingleDiy extends Component {
201
 
222
 
202
   componentWillReceiveProps(nextProps, nextContext) {
223
   componentWillReceiveProps(nextProps, nextContext) {
203
     let { columns, modaltitle, search_data, sldpagination } = this.state;
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
       if (nextProps.link_type == 'goods') {
226
       if (nextProps.link_type == 'goods') {
206
         columns = this.goods_columns;
227
         columns = this.goods_columns;
207
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
228
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
@@ -265,7 +286,18 @@ export default class SldSelGoodsSingleDiy extends Component {
265
         modaltitle = `选择秒杀活动`;
286
         modaltitle = `选择秒杀活动`;
266
         sldpagination = true;
287
         sldpagination = true;
267
         this.rowKey = 'seckillId';
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
       this.setState({
301
       this.setState({
270
         search_data,
302
         search_data,
271
         link_type: nextProps.link_type,
303
         link_type: nextProps.link_type,
@@ -298,6 +330,9 @@ export default class SldSelGoodsSingleDiy extends Component {
298
       //获取商品数据
330
       //获取商品数据
299
       dis_type = 'project/get_point_goods_lists';
331
       dis_type = 'project/get_point_goods_lists';
300
       new_params.state = 3;//在售状态
332
       new_params.state = 3;//在售状态
333
+    } else if (link_type == 'live') {
334
+      //获取直播数据
335
+      dis_type = 'project/get_live_lists';
301
     } else if (link_type == 'category') {
336
     } else if (link_type == 'category') {
302
       //获取分类数据
337
       //获取分类数据
303
       dis_type = 'project/get_point_label_list';
338
       dis_type = 'project/get_point_label_list';
@@ -309,7 +344,7 @@ export default class SldSelGoodsSingleDiy extends Component {
309
       callback: (res) => {
344
       callback: (res) => {
310
         this.setState({ loading: false });
345
         this.setState({ loading: false });
311
         if (res.state == 200) {
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
             data = res.data;
348
             data = res.data;
314
           } else if (link_type == 'category') {
349
           } else if (link_type == 'category') {
315
             //id为0直接赋值
350
             //id为0直接赋值
@@ -436,7 +471,11 @@ export default class SldSelGoodsSingleDiy extends Component {
436
       modalTableSeleData.actualSales = record.actualSales;
471
       modalTableSeleData.actualSales = record.actualSales;
437
       modalTableSeleData.mainImage = record.mainImage;
472
       modalTableSeleData.mainImage = record.mainImage;
438
       modalTableSeleData.productId = record.productId;
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
       modalTableSeleData.labelId = record.labelId;
479
       modalTableSeleData.labelId = record.labelId;
441
       modalTableSeleData.labelName = record.labelName;
480
       modalTableSeleData.labelName = record.labelName;
442
       modalTableSeleData.grade = record.grade;
481
       modalTableSeleData.grade = record.grade;

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

@@ -31,6 +31,11 @@ export default {
31
       const response = yield call(sldCommonService, payload, 'get', 'v3/goods/admin/goods/list');
31
       const response = yield call(sldCommonService, payload, 'get', 'v3/goods/admin/goods/list');
32
       if (callback) callback(response);
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
     //slodon_获取移动端装修列表
39
     //slodon_获取移动端装修列表
35
     * get_diy_page_lists({ payload, callback }, { call }) {
40
     * get_diy_page_lists({ payload, callback }, { call }) {
36
       const response = yield call(sldCommonService, payload, 'get', 'v3/system/admin/mobileDeco/list');
41
       const response = yield call(sldCommonService, payload, 'get', 'v3/system/admin/mobileDeco/list');
@@ -62,10 +67,10 @@ export default {
62
       callback && callback(response);
67
       callback && callback(response);
63
     },
68
     },
64
     // slodon_获取直播列表
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
     // slodon_获取短视频标签列表
74
     // slodon_获取短视频标签列表
70
     * get_svideo_label_lists({ payload, callback }, { call }) {
75
     * get_svideo_label_lists({ payload, callback }, { call }) {
71
       const response = yield call(sldCommonService, payload, 'get', 'v3/video/admin/video/label/list');
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
     { key: 'voucher_center', name: `${sldComLanguage('领券中心')}` },
726
     { key: 'voucher_center', name: `${sldComLanguage('领券中心')}` },
727
     { key: 'point', name: `${sldComLanguage('积分商城')}` },
727
     { key: 'point', name: `${sldComLanguage('积分商城')}` },
728
     { key: 'svideo_center', name: `${sldComLanguage('短视频中心')}` },
728
     { key: 'svideo_center', name: `${sldComLanguage('短视频中心')}` },
729
-    { key: 'live_center', name: `${sldComLanguage('直播中心')}` },
729
+    { key: 'live', name: `${sldComLanguage('直播中心')}` },
730
     { key: 'sign_center', name: `${sldComLanguage('签到中心')}` },
730
     { key: 'sign_center', name: `${sldComLanguage('签到中心')}` },
731
   ];
731
   ];
732
 }
732
 }