在邮件发送道具页面的console下输入下列代码,则每种道具都会增加2个到指定用户,修改num可以修改发送数量,修改have可以修改要发送的道具列表

var item_arr = new Object();
var num = '2';
var have = ['11','12','13','14','15','21','22','23','24','25','31','32','33','34','35','41','42','43','44','45','51','52','53','54','55','61','62','63','64','65','66','67','68','69','71','72','73','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','101','102','103','104','105','106','107','108','109','110','111','121','122','123','124','125','126','128','131','132','141','142','143','144','147','148','149','150','154','155','156','157','160','161','162','163','164','165','166','167','168','169','170','171','172','173','174','175','176','177','254','255','900','901','902','903','904','905','906','907','908','909','910','911','912','913','914','915','916','917','918','919','920','921','922','923','924','925','1001','1003','1004','1005','1100','1101','1102','1103','1105','1200','1201','1202','1203','1204','1205','1206','1207','1208','1209','1210','1211','1212','1213','1214','1215','1216','1217','1218','1219','1220','1221','1222','1223','1224','1225','1226','1227','1228','1229','1230','1231','1232','1233','1234','1235','1236','1237','1238','1239','1240','1241','1242','1243','1244','1245','1246','1247','1248','1249','1250','1251','1252','1253','1254','1255','1256','1257','1258','1259','1260','5000','5001','5002','5003','5004','5005','5006','5007','5008','5009','5010','5011','5012','5013','5014','5015','5016','5017','5019','5020','5021','5023','5024','5025','5027','5028','5029','10200','20000','20001','20002','20003','20004','20005','21001','21002','21003','21004','21005','21006','21007','21008','21009','21010','21011','21012','21013','21014','21015','21016','21017','21018','21019','21020','21021','21022','21023','21024','21025','21026','21027','21028','21029','21030','20110','20120','20210','20220','20310','20320','20420','20510','20520','30610','30620','30630','30710','30720','30730','30810','30820','30830','30910','30920','30930','31010','31020','41310','41320','41330','43020','51810','51820','51830','51840','53120','50601','50602','50603','50604','50701','50702','50703','21110','21120','21210','21220','21310','21320','21420','21510','21520','31610','31620','31630','31710','31720','31730','31810','31820','31830','31910','31920','31930','32010','32020','42310','42320','42330','44020','52810','52820','52830','52840','54120','51601','51602','51603','51604','51701','51702','51703','51704'];
var item = '';
var arr = '';
var rand = 0;
var item_id = 0;
var item_name = '';
var str = '';



$('[name="item"]').find('option').each(function(){
    item_id = $(this).val();
    item_name = $(this).text();
    arr = item_name.split('-');

    if(have.indexOf(arr[0].trim()) == -1){
        return;
    }
    
    item_name = arr[0].trim() + '-' + arr[1].trim() + '-' + num;
    rand = Math.random()*Math.random();
    
    str = '<p data-number="' + rand + '">' +
          '<input name="items[]" type="hidden" value="'+item_name+'" />' +
          '<input type="text" class="form-control input-width input-margin" disabled="disabled" placeholder="道 具 : ' + arr[1] + '">' +
          '<input type="text" class="form-control input-width input-margin" disabled="disabled" placeholder="数 量 : ' + num + '">' +
          '<input class="input btn btn-danger but-margin" onclick="del('+rand+')" type="button" value="删除" / >' +
          '</p>';
    $('#item').append(str);
            
})

发表评论

电子邮件地址不会被公开。 必填项已用*标注