### 选中的id js
```
function down(){
var selected_checkboxs = $('.table-responsive tbody tr td:first-child [type="checkbox"]:checked');
var goodsids = selected_checkboxs.map(function () {
return $(this).val()
}).get();
console.log(goodsids)
window.location.href='/web/index.php?c=site&a=entry&m=ewei_shopv2&do=web&r=goods.down'
}
```
### 导出php
```
global $_W;
global $_GPC;
$id = $_GPC['id'];
require_once IA_ROOT . '/framework/library/phpexcel/PHPExcel.php';
require_once IA_ROOT . '/framework/library/phpexcel/PHPExcel/Writer/Excel5.php';
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator("Phpmarker")->setLastModifiedBy("Phpmarker")->settitle("Phpmarker")->setSubject("Phpmarker")->setDescription("Phpmarker")->setKeywords("Phpmarker")->setCategory("Phpmarker");
$objPHPExcel->getActiveSheet()->settitle('Phpmarker-' . date('Y-m-d'));
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(15);
$objPHPExcel->getActiveSheet()->freezePane('A10');
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue('A1', 'id')
->setCellValue('B1', 'uniacid')
->setCellValue('C1', 'pcate')
->setCellValue('D1', 'ccate')
->setCellValue('E1', 'type')
->setCellValue('F1', 'status')
->setCellValue('G1', 'title')
->setCellValue('H1', 'thumb')
->setCellValue('I1', 'content')
->setCellValue('J1', 'productprice')
->setCellValue('K1', 'marketprice')
->setCellValue('L1', 'costprice')
->setCellValue('M1', 'originalprice')
->setCellValue('N1', 'total')
->setCellValue('O1', 'createtime')
->setCellValue('P1', 'weight')
->setCellValue('Q1', 'maxprice')
->setCellValue('R1', 'minprice')
->setCellValue('S1', 'cates')
->setCellValue('T1', 'hasoption')
->setCellValue('U1', 'thumb_url')
->setCellValue('V1', 'isverify')
->setCellValue('W1', 'tcate')
->setCellValue('X1', 'discounts')
->setCellValue('Y1', 'tcates')
->setCellValue('Z1', 'keywords');
$goods = pdo_fetchall("SELECT * FROM ".tablename('ewei_shop_goods')." WHERE id in (".$_GPC['id'].") ");
foreach ($goods as $key => $value) {
$l1="A".($key+2);
$l2="B".($key+2);
$l3="C".($key+2);
$l4="D".($key+2);
$l5="E".($key+2);
$l6="F".($key+2);
$l7="G".($key+2);
$l8="H".($key+2);
$l9="I".($key+2);
$l10="J".($key+2);
$l11="K".($key+2);
$l12="L".($key+2);
$l13="M".($key+2);
$l14="N".($key+2);
$l15="O".($key+2);
$l16="P".($key+2);
$l17="Q".($key+2);
$l18="R".($key+2);
$l19="S".($key+2);
$l20="T".($key+2);
$l21="U".($key+2);
$l22="V".($key+2);
$l23="W".($key+2);
$l24="X".($key+2);
$l25="Y".($key+2);
$l26="Z".($key+2);
$objPHPExcel ->setActiveSheetIndex(0)
->setCellValue($l1, $value['id'])
->setCellValue($l2, $value['uniacid'])
->setCellValue($l3, $value['pcate'])
->setCellValue($l4, $value['ccate'])
->setCellValue($l5, $value['type'])
->setCellValue($l6, $value['status'])
->setCellValue($l7, $value['title'])
->setCellValue($l8, $value['thumb'])
->setCellValue($l9, $value['content'])
->setCellValue($l10, $value['productprice'])
->setCellValue($l11, $value['marketprice'])
->setCellValue($l12, $value['costprice'])
->setCellValue($l13, $value['originalprice'])
->setCellValue($l14, $value['total'])
->setCellValue($l15, $value['createtime'])
->setCellValue($l16, $value['weight'])
->setCellValue($l17, $value['maxprice'])
->setCellValue($l18, $value['minprice'])
->setCellValue($l19, $value['cates'])
->setCellValue($l20, $value['hasoption'])
->setCellValue($l21, $value['thumb_url'])
->setCellValue($l22, $value['isverify'])
->setCellValue($l23, $value['tcate'])
->setCellValue($l24, $value['discounts'])
->setCellValue($l25, $value['tcates'])
->setCellValue($l26, $value['keywords']);
}
$objPHPExcel->getActiveSheet()->setTitle('商品'.date("m-d",time()));
$objPHPExcel->setActiveSheetIndex(0);
$filename='商品'.date("m-d",time());
// Redirect output to a client’s web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$filename.'.xls"');
header('Cache-Control: max-age=0');
// If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');
// If you're serving to IE over SSL, then the following may be needed
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header('Pragma: public'); // HTTP/1.0
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
```
- 【11.18更新】人人商城弹出框
- 人人常用方法
- 人人分销【12.13更新】
- 分销走的升级逻辑
- 获取无限上级
- 【12.13更新】获取无限下级
- 统计伞下客户所有业绩
- 关于会员
- 注册走的逻辑
- 会员等级升级
- 关于商品
- 关于小程序
- 人人运费模板逻辑
- 订单创建
- 导入导出
- 导入
- 导出
- 人人快速导出
- 修改收货地址
- 人人客服消息
- 人人商城企业支付到零钱
- 人人商城DIY页面
- 订单【20201210更新】
- 支付逻辑【2020 12月10日更新】
- 订单创建1【20201210更新】
- 订单完成
- 人人权限修复
- 人人权限应用不出来修复
- 微信API
- 获取access_token
- 获取openid
- 修改公众号推送消息
- 问题修复
- 打印机开发
- 拼团
- 订单
- 拼团常用方法
- 余额详细不详细更改
- 修改菜单
- 关于微擎的事务处理逻辑
- 【11.20更新】余额记录不显示前端获得的余额
- BUG集合【2020年12月11日更新】
- 海报黑屏或者出不来
- 人人商城多商户无法上传图片解决办法
- 秒杀超卖解决方案【20210225更新】