|
@@ -206,6 +206,8 @@ var g = new common.grid({ |
|
@@ -206,6 +206,8 @@ var g = new common.grid({ |
206
|
//} else {
|
206
|
//} else {
|
207
|
// HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-success btn-xs info-toHomePage">同步逛频道</a>');
|
207
|
// HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-success btn-xs info-toHomePage">同步逛频道</a>');
|
208
|
//}
|
208
|
//}
|
|
|
209
|
+
|
|
|
210
|
+ HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-success btn-xs info-syncToGrass"同步到种草></a>');
|
209
|
|
211
|
|
210
|
return HtmArr.join('');
|
212
|
return HtmArr.join('');
|
211
|
}
|
213
|
}
|
|
@@ -344,12 +346,32 @@ $(document).on('click', '.info-sticky-cancel', function () { |
|
@@ -344,12 +346,32 @@ $(document).on('click', '.info-sticky-cancel', function () { |
344
|
});
|
346
|
});
|
345
|
});
|
347
|
});
|
346
|
|
348
|
|
|
|
349
|
+//同步到种草
|
|
|
350
|
+$(document).on('click', '.info-syncToGrass', function () {
|
|
|
351
|
+ var item = g.rows[$(this).data("index")];
|
|
|
352
|
+
|
|
|
353
|
+ common.util.__ajax({
|
|
|
354
|
+ url: '/guang/article/operation',
|
|
|
355
|
+ data: {
|
|
|
356
|
+ id: item.id
|
|
|
357
|
+ }
|
|
|
358
|
+ }, function (res) {
|
|
|
359
|
+
|
|
|
360
|
+ if (res.code == 200) {
|
|
|
361
|
+ common.util.__tip('同步成功', 'success');
|
|
|
362
|
+ g.reload();
|
|
|
363
|
+ } else {
|
|
|
364
|
+ common.util.__tip(res.message);
|
|
|
365
|
+ }
|
|
|
366
|
+ });
|
|
|
367
|
+});
|
|
|
368
|
+
|
347
|
//同步到逛频道
|
369
|
//同步到逛频道
|
348
|
$(document).on('click', '.info-toHomePage', function () {
|
370
|
$(document).on('click', '.info-toHomePage', function () {
|
349
|
var item = g.rows[$(this).data("index")];
|
371
|
var item = g.rows[$(this).data("index")];
|
350
|
|
372
|
|
351
|
common.util.__ajax({
|
373
|
common.util.__ajax({
|
352
|
- url: '/guang/article/operation',
|
374
|
+ url: '/guang/article/syncArticleToGrass',
|
353
|
data: {
|
375
|
data: {
|
354
|
id: item.id,
|
376
|
id: item.id,
|
355
|
isToHomePage: 1
|
377
|
isToHomePage: 1
|