config = Dever::db($this->table)->config; } # 设置订单的类型 public function set($type, $view) { return $this; } # 获取公共的where public function where($id) { $where = array(); $where['mid'] = $id; if (!$where) { Dever::alert('参数错误'); } return $where; } # 获取订单列表 public function getList($id) { $result = array(); $where = $this->where($id); $mobile = Dever::input('mobile'); if ($mobile) { $where['mobile'] = $mobile; } $status = Dever::input('status'); if ($status) { $where['status'] = $status; } $result['order'] = Dever::db($this->table)->getAll($where); if ($result['order']) { foreach ($result['order'] as $k => $v) { $result['order'][$k] = $this->getInfo($v, false); } } return $result; } # 查看详情 public function getView($id, $order_id, $show = true) { $where = $this->where($id); $where['id'] = $order_id; $result = Dever::db($this->table)->find($where); if (!$result) { Dever::alert('订单不存在'); } if ($show) { $result = $this->getInfo($result); } return $result; } # 获取订单详细信息 public function getInfo($info, $view = true) { $info['status_name'] = Dever::status($this->config['status'], $info['status']); $info['cdate'] = date('Y-m-d H:i', $info['cdate']); if ($info['operdate']) { $info['operdate'] = date('Y-m-d H:i', $info['operdate']); } else { $info['operdate'] = ''; } if ($info['fdate']) { $info['fdate'] = date('Y-m-d H:i', $info['fdate']); } else { $info['fdate'] = ''; } if ($view && $info['type'] == 1) { $info['ps_info'] = Dever::db('agent/dh_order_ps')->find(array('order_id' => $info['id'])); if ($info['ps_info']) { $info['ps_info']['service'] = Dever::array_decode($info['ps_info']['service']); $info['ps_info']['cdate'] = date('Y-m-d H:i', $info['ps_info']['cdate']); if ($info['ps_info']['qu_date']) { $info['ps_info']['qu_date'] = date('Y-m-d H:i', $info['ps_info']['qu_date']); } if ($info['ps_info']['qs_date']) { $info['ps_info']['qs_date'] = date('Y-m-d H:i', $info['ps_info']['qs_date']); } $status = Dever::db('agent/dh_order_ps')->config['status']; $info['ps_info']['status_name'] = $status[$info['ps_info']['status']]; if ($info['ps_info']['service']) { foreach ($info['ps_info']['service'] as $k => $v) { if (isset($v['order_num']) && $v['order_num']) { $info['ps_info']['service'][$k]['service_name'] = '商家自送'; if ($v['service_id'] > 0) { $service = Dever::db('shop/service')->find($v['service_id']); $info['ps_info']['service'][$k]['service_name'] = $service['name']; } } else { unset($info['ps_info']['service'][$k]); } } } } $goods_status = Dever::db('agent/dh_order_goods')->config['status']; if ($info['address_id']) { $info['address'] = Dever::db('agent/member_address')->find($info['address_id']); } $info['goods'] = Dever::db('agent/dh_order_goods')->select(array('order_id' => $info['id'])); foreach ($info['goods'] as $k => $v) { $goods_info = Dever::load('goods/lib/info')->getInfoBySku($v['goods_id'], $v['sku_id']); if (isset($goods_info['sku'])) { $sku = $goods_info['sku']['string']; } else { $sku = ''; } $info['goods'][$k] += array ( 'pic' => $goods_info['cover'], 'name' => $goods_info['name'], 'sku' => $sku, 'price' => $goods_info['price'], ); } } if ($info['type'] == 2) { $info['card'] = Dever::db('card/info')->find($info['type_id']); } if ($info['type'] == 3) { $info['prize'] = Dever::db('setting/prize')->find($info['type_id']); } return $info; } # 取消订单 public function cancel($id, $order_id) { $data = $this->getView($id, $order_id, false); if ($data['status'] == 1) { $state = Dever::db('agent/dh_order')->update(array('where_id' => $data['id'], 'status' => 7, 'operdate' => time())); if ($state) { $this->updateSell($data, 2); } return 'ok'; } else { Dever::alert('当前订单状态不允许取消'); } } # 得到商品和总价 public function goods($mid) { $goods_id = Dever::input('goods_id'); if (!$goods_id) { Dever::alert('请传入商品'); } $goods_id = explode(',', $goods_id); $num = Dever::input('num'); if (!$num) { Dever::alert('请传入商品数量'); } $num = explode(',', $num); $data['price'] = 0; $data['num'] = 0; $data['name'] = array(); $count = count($goods_id); $data['list'] = array(); $i = 0; foreach ($goods_id as $k => $v) { $n = isset($num[$k]) ? $num[$k] : 1; $data['list'][$i] = Dever::db('agent/member_goods')->find(array('mid' => $mid, 'id' => $v)); if ($data['list'][$i]) { $data['list'][$i]['num'] = $n; # 2是库存不足 $data['list'][$i]['ku_state'] = 1; $total = $data['list'][$i]['total_num'] - $data['list'][$i]['sell_num']; if ($total >= $n) { $data['list'][$i]['buy_num'] = $n; } else { $data['list'][$i]['buy_num'] = $total; } if ($data['list'][$i]['buy_num'] <= 0) { $data['list'][$i]['ku_state'] = 2; $data['list'][$i]['buy_num'] = 0; } $goods_info = Dever::load('goods/lib/info')->getInfoBySku($data['list'][$i]['type_id'], $data['list'][$i]['sku_id']); if (isset($goods_info['sku'])) { $sku = $goods_info['sku']['string']; } else { $sku = ''; } $data['list'][$i] += array ( 'pic' => $goods_info['cover'], 'name' => $goods_info['name'], 'sku' => $sku, 'price' => $goods_info['price'], ); if ($data['list'][$i]['ku_state'] == 1) { $data['num'] += $data['list'][$i]['buy_num']; $data['price'] += $goods_info['price'] * $data['list'][$i]['buy_num']; $data['name'] = '兑换商品'; } $i++; } } if ($data['num'] <= 0) { Dever::alert('没有商品可以兑换'); } return $data; } # 确认兑换 public function action($user, $name, $num, $price, $goods, $address_id, $dh_type, $type, $type_id, $info, $refer = '') { # 获取平台店 $shop = Dever::db('shop/info')->find(array('type' => 10)); if (!$shop) { Dever::alert('没有平台店'); } $order_data['shop_id'] = $shop['id']; $order_data['mid'] = $user['id']; $order_data['mobile'] = $user['mobile']; $order_data['address_id'] = $address_id; $order_data['name'] = $name; $order_data['num'] = $num; $order_data['info'] = $info; $order_data['price'] = $price; $order_data['dh_type'] = $dh_type; $order_data['type'] = $type; if ($type_id) { $order_data['type_id'] = $type_id; } if ($dh_type == 2) { $order_data['status'] = 5; } else { $order_data['status'] = 2; } $order_data['refund_cash'] = 0; $order_data['audit'] = 2; if ($type == 1) { $time = time(); $order_data_where = $order_data; $order_data_where['start'] = $time - 60; $order_data_where['end'] = $time; $order_data_where['option']['start'] = array('yes-cdate', '>='); $order_data_where['option']['end'] = array('yes-cdate', '<='); $info = Dever::db('agent/dh_order')->find($order_data_where); } else { $info = false; } $order_data['order_num'] = $this->getOrderId(); if (!$info) { $id = Dever::db('agent/dh_order')->insert($order_data); } else { return array ( 'order' => '', 'order_num' => $info['order_num'], 'order_id' => $info['id'], 'type' => 'test', ); } if (!$id) { Dever::alert('兑换失败'); } if ($goods) { foreach($goods as $k => $v) { if ($v['ku_state'] == 1) { $data['mid'] = $user['id']; $data['order_id'] = $id; $data['shop_id'] = $shop['id']; $data['goods_id'] = $v['type_id']; $data['sku_id'] = $v['sku_id']; $data['price'] = $v['price']; $data['num'] = $v['buy_num']; Dever::db('agent/dh_order_goods')->insert($data); } } } # 减少库存 增加销量 $order_data['id'] = $id; $this->updateSell($order_data); return array ( 'order_num' => $order_data['order_num'], 'order_id' => $id, 'type' => 'dh', ); } # 添加配送信息 public function updatePs($order, $status = 1, $service_id = -1, $order_num = '', $cdate = false) { $order = Dever::db('agent/dh_order')->find($order['id']); $where['order_id'] = $order['id']; $where['clear'] = true; $data = Dever::db('agent/dh_order_ps')->find($where); $service = array(); if ($service_id) { $service['service_id'] = $service_id; } if ($order_num) { $service['order_num'] = $order_num; } if (!$data) { $insert = $where; if ($service) { $insert['service'][] = $service; $insert['service'] = Dever::array_encode($insert['service']); } $insert['status'] = $status; if ($status == 2) { $insert['qu_date'] = time(); } $insert['mid'] = $order['mid']; if ($cdate) { $insert['cdate'] = $cdate; } Dever::db('agent/dh_order_ps')->insert($insert); } else { $update = $where; $update['where_id'] = $data['id']; $update['status'] = $status; if ($status == 2) { $update['qu_date'] = time(); } if ($status == 3) { $update['qs_date'] = time(); } if ($service) { $data['service'] = Dever::array_decode($data['service']); $update['service'] = $data['service']; $update['service'][] = $service; $update['service'] = Dever::array_encode($update['service']); } $update['mid'] = $order['mid']; if ($cdate) { $update['cdate'] = $cdate; } Dever::db('agent/dh_order_ps')->update($update); } } # 减少库存,增加销量 public function updateSell($order, $type = 1) { $method = 'incSell'; $name = '兑换商品'; $name_3 = '兑换名额'; if ($type == 2) { $method = 'decSell'; $name = '退回商品'; $name_3 = '退回名额'; } if ($order['type'] == 1) { $where['order_id'] = $order['id']; //$where['status'] = 3; $data = Dever::db('agent/dh_order_goods')->select($where); if ($data) { foreach ($data as $k => $v) { $up = array(); $up['where_mid'] = $order['mid']; $up['where_type'] = $order['type']; $up['where_type_id'] = $v['goods_id']; $up['where_sku_id'] = $v['sku_id']; $up['clear'] = true; $info = Dever::db('agent/member_goods')->findData($up); $up['set_sell_num'] = $v['num']; Dever::db('agent/member_goods')->$method($up); if ($type == 2) { Dever::load('agent/lib/member_set')->log($up['where_mid'], '', $up['where_type'], $up['where_type_id'], $up['where_sku_id'], $up['set_sell_num'], $info['num'], $info['num']+$up['set_sell_num'], $info['name'], $name); } else { Dever::load('agent/lib/member_set')->log($up['where_mid'], '', $up['where_type'], $up['where_type_id'], $up['where_sku_id'], $up['set_sell_num'], $info['num'], $info['num']-$up['set_sell_num'], $info['name'], $name); } } } } elseif ($order['type'] == 3) { $up['where_mid'] = $order['mid']; $up['where_type'] = $order['type']; $up['where_type_id'] = $order['type_id']; $up['where_sku_id'] = -1; $info = Dever::db('agent/member_goods')->findData($up); $up['set_sell_num'] = $order['num']; Dever::db('agent/member_goods')->$method($up); if ($type == 2) { Dever::load('agent/lib/member_set')->log($up['where_mid'], '', $up['where_type'], $up['where_type_id'], $up['where_sku_id'], $up['set_sell_num'], $info['num'], $info['num']+$up['set_sell_num'], $info['name'], $name_3); } else { Dever::load('agent/lib/member_set')->log($up['where_mid'], '', $up['where_type'], $up['where_type_id'], $up['where_sku_id'], $up['set_sell_num'], $info['num'], $info['num']-$up['set_sell_num'], $info['name'], $name_3); } } } # 完成 public function finish($info, $shop_id) { if ($info && $info['shop_id'] == $shop_id && $info['status'] <= 4) { $status = 5; $state = Dever::db('agent/dh_order')->update(array('where_id' => $info['id'], 'status' => $status, 'fdate' => time())); $this->updatePs($info, 3); $w['parent_type'] = 3; $w['parent_order_id'] = $info['id']; $w['status'] = 4; $buy_order = Dever::db('shop/buy_order')->select($w); if ($buy_order) { foreach ($buy_order as $k => $v) { Dever::load('mshop/lib/buy')->set(1,1)->finish($shop_id, $v['id']); } } return 'ok'; } else { Dever::alert('您没有权限核销'); } } # 平台订单已收货 public function yes_api() { $shop_id = Dever::input('shop_id'); $order_id = Dever::input('order_id'); $info = Dever::db('agent/dh_order')->find(array('id' => $order_id)); if ($info && $info['type'] == 10) { $this->finish($info, $shop_id); } else { Dever::alert('您没有权限核销'); } return 'reload'; } # 生成订单号 public function getOrderId() { $where['order_num'] = Dever::order('DH'); $state = Dever::db('agent/dh_order')->one($where); if (!$state) { return $where['order_num']; } else { return $this->getOrderId(); } } # 展示订单详情 public function show() { $id = Dever::input('order_id'); $config = Dever::db('agent/dh_order')->config; $info = Dever::db('agent/dh_order')->one($id); if ($info['type'] > 1) { return; } $tk_status = Dever::db('agent/dh_order_refund')->config['status']; $tk_process = Dever::db('agent/dh_order_refund')->config['process']; $status = $config['status'][$info['status']]; $tk = Dever::db('agent/dh_order_refund')->find(array('order_id' => $info['id'], 'type' => 1)); $shop = Dever::db('shop/info')->find($info['shop_id']); $user = Dever::db('agent/member')->find($info['mid']); $cdate = date('Y-m-d H:i', $info['cdate']); if ($info['operdate']) { $opertime = date('Y-m-d H:i', $info['operdate']); } else { $opertime = ''; } if ($info['fdate']) { $fdate = date('Y-m-d H:i', $info['fdate']); } else { $fdate = ''; } if (!$user) { $user['username'] = '无'; } if (!isset($user['name'])) { $user['truename'] = $user['name']; } if ($tk && $tk['process'] == 1) { $status = '申请' . $tk_status[$tk['status']]; $process = $tk_process[$tk['process']]; $process = ''; } $time = array(); $time[] = array('下单时间', $cdate); if ($opertime) { if ($info['status'] == 2) { $time[] = array('通知时间', $opertime); } if ($info['status'] == 7) { $time[] = array('取消时间', $opertime); } } if ($fdate) { $time[] = array('完成时间', $fdate); } $time[] = array('审核备注', $info['audit_desc']); $result = array(); $result[$info['order_num']] = array ( 'type' => 'info', 'content' => array ( array ( array('订单状态', $status), array('代理商姓名', $user['name']), array('联系电话', $info['mobile']), ), $time, ) ); if ($info['address_id'] > 0) { $address = Dever::load('agent/address')->getOne($info['mid'], $info['address_id']); if ($address) { $result['收货地址'] = array ( 'type' => 'info', 'content' => array ( array ( array('联系人', $address['contact']), array('联系电话', $address['mobile']), ), array ( array('收货地址', $address['address_info']), array('门牌号', $address['house_number']), ), ), ); } } $info['ps_info'] = Dever::db('agent/dh_order_ps')->find(array('order_id' => $info['id'])); if ($info['ps_info']) { $info['ps_info']['service'] = Dever::array_decode($info['ps_info']['service']); $info['ps_info']['cdate'] = date('Y-m-d H:i', $info['ps_info']['cdate']); if ($info['ps_info']['qs_date']) { $info['ps_info']['qs_date'] = date('Y-m-d H:i', $info['ps_info']['qs_date']); } else { $info['ps_info']['qs_date'] = '无'; } $status = Dever::db('agent/dh_order_ps')->config['status']; $info['ps_info']['status_name'] = $status[$info['ps_info']['status']]; $service = array(); if ($info['ps_info']['service']) { foreach ($info['ps_info']['service'] as $k => $v) { if (isset($v['order_num']) && $v['order_num']) { $info['ps_info']['service'][$k]['service_name'] = '商家自送'; if ($v['service_id'] > 0) { $service_info = Dever::db('shop/service')->find($v['service_id']); $info['ps_info']['service'][$k]['service_name'] = $service_info['name']; } $service[] = array ( array('名称', $info['ps_info']['service'][$k]['service_name']), array('单号', isset($v['order_num']) ? $v['order_num'] : ''), ); } } } $result['物流信息'] = array ( 'type' => 'info', 'content' => array ( array ( array('发货时间', $info['ps_info']['cdate']), array('收货时间', $info['ps_info']['qs_date']), array('查单', '点此手动查单'), ), ), ); $result['物流信息']['content'] = array_merge($result['物流信息']['content'], $service); } if (!$info['refund_cash']) { $info['refund_cash'] = 0; } if ($info['refund_cash'] > 0 && $tk) { $process = $tk_process[$tk['process']]; $tk['cdate'] = date('Y-m-d H:i', $tk['cdate']); $result['退款信息'] = array ( 'type' => 'info', 'content' => array ( array ( array('退款金额', $info['refund_cash']), array('数量', $info['num']), array('退款进度', $process), ), array ( array('申请时间', $tk['cdate']), array('退款原因', $tk['desc']), ), ), ); } $body = $refund_body = array(); $body_total = array(); $body_total['price'] = 0; $body_total['num'] = 0; $refund_body_total = array(); $refund_body_total['price'] = 0; $refund_body_total['num'] = 0; $goods = Dever::db('agent/dh_order_goods')->select(array('order_id' => $info['id'])); $goods_status = Dever::db('agent/dh_order_goods')->config['status']; foreach ($goods as $k => $v) { $goods_info = Dever::load('goods/lib/info')->getInfoBySku($v['goods_id'], $v['sku_id']); $status = Dever::status($goods_status, $v['status']); $tk = Dever::db('agent/dh_order_refund')->find(array('order_id' => $info['id'], 'order_goods_id' => $v['id'], 'type' => 2)); if ($tk && $tk['process'] == 1) { $status = '申请' . $tk_status[$tk['status']]; //$status .= ' [' . $tk_process[$tk['process']] . ']'; } if (isset($goods_info['sku'])) { $sku = $goods_info['sku']['string']; } else { $sku = '无'; } if ($info['status'] > 1 && $info['status'] < 7) { $tui = Dever::url('buy_order_tui?shop_id='.$v['shop_id'].'&order_goods_id=' . $v['id'] . '&order_id=' . $info['id'] . '&cash=' . $v['price'], 'shop'); $status = '退款'; $status = ''; } $d = array ( 'pic' => $goods_info['cover'], 'name' => $goods_info['name'], 'sku' => $sku, 'price' => $v['price'], 'num' => $v['num'], 'status' => $status, ); if ($tk && $v['status'] == 3) { $d['status'] = $tk_status[$tk['status']]; $refund_body[] = $d; $price = $v['price']*$v['num']; $refund_body_total['price'] += $price; $refund_body_total['num'] += $v['num']; } else { $body[] = $d; $price = $v['price']*$v['num']; $body_total['price'] += $price; $body_total['num'] += $v['num']; } } if ($body) { if ($refund_body_total['price']) { $body_total['set_price'] = $body_total['price'] - $refund_body_total['price']; } if ($refund_body_total['num']) { $body_total['set_num'] = $body_total['num'] - $refund_body_total['num']; } $result['商品清单'] = array ( 'type' => 'list', 'content' => $body, 'total' => $body_total, ); } if ($refund_body) { $result['退款商品'] = array ( 'type' => 'list', 'content' => $refund_body, 'total' => $refund_body_total, ); } # 平台门店采购单 $buy_order = Dever::db('shop/buy_order')->getDataToId(array('type' => 1, 'type_id' => $info['shop_id'], 'parent_type' => 3, 'parent_order_id' => $info['id'])); $source_order_id = array(); if ($buy_order) { $source_order_id = array_keys($buy_order); } # 平台门店结算单 if ($source_order_id) { $cash_order = Dever::db('cash/order')->getDataByOrderId(array('source_order_id' => $source_order_id)); $col = 'cash'; } if (isset($cash_order) && $cash_order) { $head = array('序号', '结算单号', '数量', '金额', '结算类型', '入账状态', '审核状态', '结算时间', '审核备注', '管理'); $body = array(); $config = Dever::db('cash/order')->config; foreach ($cash_order as $k => $v) { $cdate = date('Y-m-d H:i', $v['cdate']); $fdate = $v['fdate'] ? date('Y-m-d H:i', $v['fdate']) : ''; $operdate = $v['operdate'] ? date('Y-m-d H:i', $v['operdate']) : ''; $cash = $v[$col]; $url = Dever::url('project/database/list?project=shop&table=buy_order_goods&order_id='.$v['source_order_id'].'&page_type=1', 'manage'); $v['source_order_num'] = ''.$v['source_order_num'].''; $m = ''; if ($v['audit'] == 1 && $v['audit_type'] == 2) { $url = Dever::url('project/database/update?project=cash&table=order&where_id='.$v['id'].'&col=audit,desc', 'manage'); $m = '审核'; } $d = array ( $k+1, $v['order_num'], $v['num'], $cash, $config['config_jstype'][$v['jstype']], $config['config_status'][$v['status']], $config['config_audit'][$v['audit']], $operdate, $v['desc'], $m, ); $body[] = $d; } $result['对账清单'] = array ( 'type' => 'table', 'content' => array ( 'head' => $head, 'body' => $body, ) ); } $head_btn[] = array ( 'type' => 'link', 'link' => Dever::url('project/database/list?project=agent&table=dh_order&menu=agent&search_option_state=1', 'manage'), 'name' => '返回上一页', ); if (Dever::load('manage/auth')->checkFunc('agent.dh_order', 'editdhaddress', '修改地址')) { if ($info['address_id']>0){ $head_btn[] = array ( 'type' => 'edit', 'link' => Dever::url('project/database/update?project=agent&table=member_address&search_option_info_id='.$info['id'].'&search_option_mid='.$info['mid'].'&search_option_contact='.$address['contact'].'&search_option_mobile='.$address['mobile'].'&search_option_area='.$address['area'].'&search_option_address='.$address['address'].'&search_option_house_number='.$address['house_number'].'&status=1&col=contact,mobile,area,address,house_number,mid,info_id', 'manage'), 'name' => '修改地址', ); } } $audit = Dever::input('audit'); if($audit==1){ # 审核信息 $this->show_audit($info, $result); } $head = array ( 'name' => '基本信息', 'btn' => $head_btn, ); $html = Dever::show($head, $result); return $html; } public function addressUpdate($id,$name,$data) { $info_id = Dever::param('info_id',$data); if ($info_id) { $info = Dever::db('agent/dh_order')->find($info_id); if ($info) { $where['where_id'] = $info['id']; $where['address_id'] = $id; Dever::db('agent/dh_order')->update($where); } } } private function show_audit($info, &$result) { $info['type'] = 3; $goods = Dever::db('agent/dh_order_goods')->select(array('order_id' => $info['id'], 'status' => 1)); $shop = Dever::db('shop/info')->find($info['shop_id']); list($data, $source) = Dever::load('mshop/lib/buy')->assign($goods, $info, $shop, true); // print_R($data);die; if ($info) { $head = array('序号', '商品编号', '商品名称', '供货商', '订货总数量', '商品计量单位', '订货单总金额'); $body = array(); $i = 0; if ($data) { foreach ($data as $k => $v) { foreach ($v as $v1) { $goods_info = Dever::load('goods/lib/info')->getInfoBySku($v1['goods_id'], $v1['sku_id']); if (isset($goods_info['sku'])) { $sku = '[' . $goods_info['sku']['string'] . ']'; } else { $sku = ''; } $d = array ( $i+1, $goods_info['code'], $goods_info['name'] . $sku, Dever::load('mshop/lib/buy')->getSelect($source, $v1['source_id'], $v1['order_goods_id']), $v1['num'], $goods_info['unit'], $v1['price'] * $v1['num'], ); $body[] = $d; $i++; } } } if ($goods) { foreach ($goods as $k => $v) { $goods_info = Dever::load('goods/lib/info')->getInfoBySku($v['goods_id'], $v['sku_id']); if (isset($goods_info['sku'])) { $sku = '[' . $goods_info['sku']['string'] . ']'; } else { $sku = ''; } $d = array ( $i+1, $goods_info['code'], $goods_info['name'] . $sku, Dever::load('mshop/lib/buy')->getSelect($source, false, $v['id']), $v['num'], $goods_info['unit'], $v['price'] * $v['num'], ); $body[] = $d; $i++; } } $btn = array(); $btn[] = array( 'type' => 'click', 'content' => 'setAudit()', 'name' => '全部调整' ); $result['商品拆单'] = array ( 'type' => 'table', 'head' => array('name' => '供货商:' . Dever::load('mshop/lib/buy')->getSelect($source, false, false), 'btn' => $btn), 'content' => array ( 'head' => $head, 'body' => $body, ) ); $url = Dever::url('lib/dhorder.audit_set_commit?json=1&order_id=' . $info['id'], 'agent'); // print_R($url);die; $result['审核结果'] = array ( 'type' => 'html', 'content' => '