diff --git a/core/model/wpfw.php b/core/model/wpfw.php index afd69d5..8ba1fc9 100644 --- a/core/model/wpfw.php +++ b/core/model/wpfw.php @@ -27,14 +27,14 @@ class Wpfw_EweiShopV2Model { } $wpset = pdo_fetch("select * from " . tablename('ewei_shop_good_wpfw') . ' where deleted=0 and goods_id=:goods_id and uniacid=:uniacid Limit 1', array(':goods_id' => $goods_id, ':uniacid' => $_W['uniacid'])); if(empty($wpset)){ - return array('wpfw_url'=>$sysset['default_url'],'wpfw_api_key'=>$sysset['api_key']); + return array('open_wpfw'=>1,'wpfw_url'=>$sysset['default_url'],'wpfw_api_key'=>$sysset['api_key']); }else{ + return array('open_wpfw'=>1,'wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']); if($wpset['wpfw_type'] == 0){ - return array('wpfw_url'=>'','wpfw_api_key'=>''); + return array('open_wpfw'=>0,'wpfw_url'=>'','wpfw_api_key'=>''); }else{ - return array('wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']); + return array('open_wpfw'=>$wpset['wpfw_type'],'wpfw_url'=>$wpset['url'],'wpfw_api_key'=>$wpset['api_key']); } - } } public function good_set_wpset($goods_id,$url,$api_key) @@ -73,7 +73,7 @@ class Wpfw_EweiShopV2Model { //所有请求参数按照字母先后顺序排 ksort($params); //定义字符串开始所包括的字符串 - $stringToBeSigned = $apiKey.'&'; + $stringToBeSigned = $apiKey; //把所有参数名和参数值串在一起 foreach ($params as $k => $v) { @@ -83,7 +83,7 @@ class Wpfw_EweiShopV2Model { //使用MD5进行加密,再转化成大写 $sign = strtoupper(md5($stringToBeSigned)); $params['sign'] = $sign; - var_dump($stringToBeSigned); + //var_dump($stringToBeSigned); return $params; } public function order_post($order_id = null, $order_sn = null) @@ -91,25 +91,54 @@ class Wpfw_EweiShopV2Model { global $_W; $order_info = $this->get_order_info($order_id,$order_sn); if($order_info['error'] != 0){ - return array('msg' => "参数错误,未找到订单!", 'error' => 552001); + return array('msg' => "参数错误,未找到订单!", 'error' => 552001, 'status' => 552001); } //保存推送结果 $data = array(); //todo:订单的商品 $goods = $order_info['order']['goods']; if(empty($goods)){ - return array('msg' => "参数错误,未找到订单下的商品!", 'error' => 552001); + return array('msg' => "参数错误,未找到订单下的商品!", 'error' => 552001, 'status' => 552001); } + $set = []; foreach($goods as $item){ - $data['id'] = $item['id']; - $set = $this->good_get_wpset($item['id']); - $data['wpfw'] = $set; - if(!empty($set['wpfw_url'])){ - $info = json_encode($order_info['order']); - $res = ihttp_post($set['wpfw_url'],$this->generateSign(array('order'=>$info),$set['wpfw_api_key'])); - var_dump($res); + $gset = $this->good_get_wpset($item['id']); + if(empty($set['wpfw_url']) && $gset['open_wpfw'] > 0 && empty($set['wpfw_url'])){ + $set = $gset; } } + if(empty($set['wpfw_url']) || $set['open_wpfw'] == 0){ + return array('msg' => "订单的推送url为空或不支持推送!", 'error' => 552001, 'status' => 552001); + } + $info = json_encode($order_info['order']); + $to_data = $this->generateSign(array('order'=>$info),$set['wpfw_api_key']); + $request = ihttp_post($set['wpfw_url'],$to_data); + + + if(!empty($request['errno'])){ + return array('status' => $request['errno'], 'message' => '推送失败 (errno:'.$request['errno'].' message: ' . $request['message'] . ')'); + } + $result = json_decode($request['content'], true); + if ($request['code'] != 200) { + $result['message'] = $request['headers']['X-Ca-Error-Message']; + $result['message'] = $request['message']; + return array('status' => 0, 'message' => '推送失败(错误信息: ' . $result['message'] . ')'); + }else{ + return array('status' => 1, 'message' => '推送成功'); + } + return $result; + } + public function all_poste_status() + { + $all_poste_status = array( + //'-1' => array('css' => 'default', 'name' => '已关闭'), + '0' => array('css' => 'danger', 'name' => '未推送'), + '1' => array('css' => 'success', 'name' => '检查成功'), + '2' => array('css' => 'warning', 'name' => '检查失败'), + '3' => array('css' => 'info', 'name' => '进行中'), + '4' => array('css' => 'success', 'name' => '已完成') + ); + return $all_poste_status; } /** * 获取商品详情 diff --git a/core/web/order/detail.php b/core/web/order/detail.php index 255efba..b29636d 100644 --- a/core/web/order/detail.php +++ b/core/web/order/detail.php @@ -128,8 +128,6 @@ class Detail_EweiShopV2Page extends WebPage { $r['optionname'] = $this->option_title($r['specs']); -// $option_title = pdo_fetch('SELECT title FROM'.tablename('ewei_shop_goods_spec_item').' WHERE uniacid = '.intval($_W['uniacid']).' AND id = '.intval($r['specs'])); -// $r['optionname'] = $option_title['title']; } if(empty($r['gtitle'])!=true){ $r['title']=$r['gtitle']; @@ -234,10 +232,14 @@ class Detail_EweiShopV2Page extends WebPage { $order_fields = false; $order_data = false; + $g_diyformfields = ''; + $g_diyformdata = ''; if (p('diyform')) { $diyform_set = p('diyform')->getSet(); foreach ($goods as $g) { if (!empty($g['diyformdata'])) { + $g_diyformfields = $g['diyformfields']; + $g_diyformdata = $g['diyformdata']; break; } } @@ -249,6 +251,10 @@ class Detail_EweiShopV2Page extends WebPage { $order_data = iunserializer($item['diyformdata']); } } + if(!empty($g_diyformfields) && !empty($g_diyformdata) && empty($order_data)){ + $order_fields = iunserializer($g_diyformfields); + $order_data = iunserializer($g_diyformdata); + } } if (com('verify')) { $verifyinfo = iunserializer($item['verifyinfo']); diff --git a/core/web/order/list.php b/core/web/order/list.php index 1750872..7ac535c 100644 --- a/core/web/order/list.php +++ b/core/web/order/list.php @@ -119,15 +119,6 @@ class List_EweiShopV2Page extends WebPage { if ($searchfield == 'ordersn') { $condition .= " AND locate(:keyword,o.ordersn)>0"; } else if ($searchfield == 'member') { -// if(empty($_GPC['isprecise'])) -// { -// $condition .= " AND (locate(:keyword,m.realname)>0 or locate(:keyword,m.mobile)>0 or locate(:keyword,m.nickname)>0)"; -// }else -// { -// $condition .= " AND (m.realname=:keyword or m.mobile=:keyword or m.nickname=:keyword)"; -// } -// $priceCondition .= " AND (nickname LIKE '%".$_GPC['keyword']."%' OR realname LIKE '%".$_GPC['keyword']."%' OR mobile LIKE '%".$_GPC['keyword']."%') "; -// $memberCondition = " AND (nickname LIKE '%".$_GPC['keyword']."%' OR realname LIKE '%".$_GPC['keyword']."%' OR mobile LIKE '%".$_GPC['keyword']."%') "; } elseif ($searchfield == "member_group") { $group = pdo_fetchall("select id from " . tablename("ewei_shop_member_group") . " where uniacid = :uniacid AND groupname like :group_name", array(":uniacid" => $_W["uniacid"], ":group_name" => "%" . $_GPC["keyword"] . "%")); if (!empty($group)) { @@ -163,7 +154,7 @@ class List_EweiShopV2Page extends WebPage { } else if ($searchfield == 'expresssn') { $condition .= " AND locate(:keyword,o.expresssn)>0"; } else if ($searchfield == 'saler') { -// $condition .= " AND (locate(:keyword,m.realname)>0 or locate(:keyword,m.mobile)>0 or locate(:keyword,m.nickname)>0 or locate(:keyword,s.salername)>0 )"; + if(p('merch')){ $condition .= " AND (locate(:keyword,sm.realname)>0 or locate(:keyword,sm.mobile)>0 or locate(:keyword,sm.nickname)>0 or locate(:keyword,s.salername)>0 or locate(:keyword,ms.salername)>0 )"; }else{ @@ -431,7 +422,7 @@ class List_EweiShopV2Page extends WebPage { } $gdata = pdo_fetchall("select * from " . tablename('ewei_shop_member_group') . " where uniacid = $uniacid"); - $ldata = pdo_fetchall("select * from " . tablename("ewei_shop_member_level") . " where uniacid = " . $uniacid); + $ldata = pdo_fetchall("select * from " . tablename("ewei_shop_member_level") . " where uniacid = " . $uniacid); $paytype = array( '0' => array('css' => 'default', 'name' => '未支付'), @@ -451,6 +442,7 @@ class List_EweiShopV2Page extends WebPage { '2' => array('css' => 'warning', 'name' => '待收货'), '3' => array('css' => 'success', 'name' => '已完成') ); + $postestatus = m('wpfw')->all_poste_status(); $is_merch = array(); $is_merchname = 0; @@ -613,6 +605,7 @@ class List_EweiShopV2Page extends WebPage { $goods = ''; $is_singlerefund=false;//是否正在维权 $is_singlerefund_success = false; + $wpfw=[];//todo:网培服务 foreach ($order_goods as &$og) { if(!$is_singlerefund && ($og['single_refundstate']==1 ||$og['single_refundstate']==2)){ $is_singlerefund=true;//存在维权申请,需要处理后再发货 @@ -631,7 +624,11 @@ class List_EweiShopV2Page extends WebPage { $og['thumb'] = $thumb; } } - + $wpfwset = m('wpfw')->good_get_wpset($og['id']); + if(empty($wpfw['wpfw_url'])){ + $wpfw = $wpfwset; + } + $value['wpfwset'] = $wpfw; //读取规格的成本价 if (!empty($og['option_costprice'])) { $og['costprice'] = $og['option_costprice']; @@ -701,13 +698,11 @@ class List_EweiShopV2Page extends WebPage { $dflag = 1; foreach ($diyformdata_array as $da) { - if (!empty($diy_title_data)) { if(array_key_exists($da['key'], $diy_title_data)) { $dflag = 0; } } - if ($dflag == 1) { $diy_title_data[$da['key']] = $da['name']; } @@ -717,6 +712,11 @@ class List_EweiShopV2Page extends WebPage { } /*零宽度字符​问题导致写入文本异常*/ $og['goods_diyformdata'] = str_replace("\xE2\x80\x8B", "", $diyformdata); + $og['goods_diyformdata_array'] = $diyformdata_array; + if(empty($value['goods_diyformdata_array'])){ + $value['goods_diyformdata_array'] = $diyformdata_array; + } + //var_dump($diyformdata_array); } if(empty($og['gtitle'])!=true){ $og['title']=$og['gtitle']; @@ -733,6 +733,7 @@ class List_EweiShopV2Page extends WebPage { $value['commission3'] = $commission3; } $value['goods'] = set_medias($order_goods, 'thumb'); + $value['goods_str'] = $goods; if (!empty($agentid) && $level > 0) { @@ -860,7 +861,7 @@ class List_EweiShopV2Page extends WebPage { array('title' => '粉丝昵称', 'field' => 'nickname', 'width' => 12), array('title' => '会员id', 'field' => 'uid', 'width' => 12), array('title' => '会员姓名', 'field' => 'mrealname', 'width' => 12), - array("title" => "会员等级", "field" => "levelname", "width" => 12), + array("title" => "会员等级", "field" => "levelname", "width" => 12), array('title' => 'openid', 'field' => 'openid', 'width' => 24), array('title' => '会员手机手机号', 'field' => 'mmobile', 'width' => 12), array('title' => '收货姓名(或自提人)', 'field' => 'realname', 'width' => 12), @@ -1067,20 +1068,6 @@ class List_EweiShopV2Page extends WebPage { } } else { $temp_verify_orderids[] = $orderid; - // 否则去表里查 -// $sql = 'select s.storename,sa.salername,sa.id,m.nickname from ' . tablename('ewei_shop_verifygoods_log') . ' vgl -// left join ' . tablename('ewei_shop_verifygoods') . ' vg on vg.id = vgl.verifygoodsid -// left join ' . tablename('ewei_shop_store') . ' s on s.id = vgl.storeid -// left join ' . tablename('ewei_shop_saler') . ' sa on sa.id = vgl.salerid -// left join ' . tablename('ewei_shop_order_goods') . ' og on vg.ordergoodsid = og.id -// left join ' . tablename('ewei_shop_member') . ' m on m.openid = sa.openid -// where og.orderid='.$orderid.' ORDER BY vgl.verifydate DESC '; -// -// $res = pdo_fetchall($sql); -// foreach ($res as $k => $v) { -// $row['salerinfo'] .= "[" . $v['id'] . "]" . $v['salername'] . "(".$v['nickname'].")"; -// $row['storeinfo'] .= '[' .$v['storename'] .']'; -// } } } diff --git a/core/web/order/op.php b/core/web/order/op.php index cc6457a..e4f736e 100644 --- a/core/web/order/op.php +++ b/core/web/order/op.php @@ -7,6 +7,9 @@ * http://www.we7shop.cn * TEL: 4000097827/18661772381/15865546761 */ + +use function Qiniu\json_decode; + if (!defined('IN_IA')) { exit('Access Denied'); } @@ -36,7 +39,7 @@ class Op_EweiShopV2Page extends WebPage { $this->message('未找到订单!', '', 'error'); } - $order_goods = pdo_fetchall('select single_refundstate from ' . tablename('ewei_shop_order_goods'). ' where orderid=:orderid and uniacid=:uniacid', array(':uniacid' => $_W['uniacid'], ':orderid' => $item['id'])); + $order_goods = pdo_fetchall('select id,single_refundstate,diyformfields,diyformdata from ' . tablename('ewei_shop_order_goods'). ' where orderid=:orderid and uniacid=:uniacid', array(':uniacid' => $_W['uniacid'], ':orderid' => $item['id'])); $is_singlerefund=false;//是否正在维权 foreach ($order_goods as $og){ @@ -46,7 +49,7 @@ class Op_EweiShopV2Page extends WebPage { } } - return array('id' => $id, 'item' => $item,'is_singlerefund'=>$is_singlerefund); + return array('id' => $id, 'item' => $item,'is_singlerefund'=>$is_singlerefund,'order_goods'=>$order_goods[0]); } function changeprice() { @@ -918,7 +921,43 @@ class Op_EweiShopV2Page extends WebPage { } include $this->template(); } + function poste() { + global $_W, $_GPC; + $opdata = $this->opData(); + extract($opdata); + $res = m('wpfw')->order_post($id); + //var_dump($res); + //show_json(1); + die(json_encode($res)); + //die(json_decode($ret)); + } + function diyformdata() { + global $_W, $_GPC; + $opdata = $this->opData(); + extract($opdata); + + $diyformdata_array=[]; + if (p('diyform') && !empty($order_goods['diyformfields']) && !empty($order_goods['diyformdata'])) { + $f_data = p('diyform')->getDiyformData(iunserializer($order_goods['diyformdata']), iunserializer($order_goods['diyformfields']), $this->member); + } + //自定义 + $diyformid = 0; + $fields = iunserializer($order_goods['diyformfields']); + //$field_data_name = 'gdiy'; + if ($_W['ispost']) { + $formdata = p('diyform')->getPostDatas($fields); + if (is_error($formdata)) { + show_json(0, $formdata['message']); + } + $diydata['diyformfields'] = iserializer($fields); + $diydata['diyformdata'] = iserializer($formdata); + pdo_update('ewei_shop_order_goods', $diydata, array('id' => $order_goods['id'])); + //pdo_debug(); + show_json(1); + } + include $this->template(); + } function changeexpress() { global $_W, $_GPC; $opdata = $this->opData(); diff --git a/plugin/app/core/mobile/order/index.php b/plugin/app/core/mobile/order/index.php index a65e16f..3a17a84 100644 --- a/plugin/app/core/mobile/order/index.php +++ b/plugin/app/core/mobile/order/index.php @@ -381,6 +381,7 @@ class Index_EweiShopV2Page extends AppMobilePage $trade['freightText'] = '含运费'; } } + $wpfwset = m("common")->getSysset("wpfwset"); //秒杀风格色 $seckill_color=''; if($order['seckilldiscountprice']>0){ @@ -487,8 +488,8 @@ class Index_EweiShopV2Page extends AppMobilePage * */ if(!empty($g['cannotrefund']) && empty($g['refund']) && empty($g['returngoods']) && empty($g['exchange'])){ $goodsrefund = false ; - } - } + } + } if($order['status']==1){ /* * 退款优化V1.10 @@ -507,6 +508,12 @@ class Index_EweiShopV2Page extends AppMobilePage if($g['type']==1 && $entity = true){ $entity = true; } + if($wpfwset['open_wpfw'] == 1){ + $g_wp = m('wpfw')->good_get_wpset($g['id']); + if($g_wp['open_wpfw'] > 0){ + $wpfwset = $g_wp; + } + } } } $diyform_flag = 0; @@ -1089,6 +1096,7 @@ class Index_EweiShopV2Page extends AppMobilePage $result['use_membercard'] = $use_membercard; $result['membercard_info'] = $membercard_info; + $result['wpfwset'] = $wpfwset; return app_json($result); } diff --git a/plugin/app/core/mobile/order/pay.php b/plugin/app/core/mobile/order/pay.php index 3b944a2..d1fcb7d 100644 --- a/plugin/app/core/mobile/order/pay.php +++ b/plugin/app/core/mobile/order/pay.php @@ -41,6 +41,62 @@ class Pay_EweiShopV2Page extends AppMobilePage } else if ($order['status'] >= 1) { return app_error(AppError::$OrderAlreadyPay); } + //todo:小程序支付时处理自定义表单 + $wpfwset = m("common")->getSysset("wpfwset"); + $param = array(':orderid'=>$order['id'],':uniacid'=>$_W['uniacid']); + $goods = pdo_fetchall("select g.id from " . tablename('ewei_shop_order_goods') . " og "." left join " . tablename('ewei_shop_goods') . " g on g.id=og.goodsid " . " where og.orderid=:orderid and og.uniacid=:uniacid ", $param); + if (!empty($goods)) { + foreach ($goods as $g) { + if($wpfwset['open_wpfw'] == 1){ + $g_wp = m('wpfw')->good_get_wpset($g['id']); + if($g_wp['open_wpfw'] > 0){ + $wpfwset = $g_wp; + } + } + } + } + $order_fields = false; + $order_data = false; + $g_diyformfields = ''; + $g_diyformdata = ''; + if (p('diyform')) { + $diyformfields = ""; + $showdiyform = false; + if (p('diyform')) { + $diyformfields = ",o.diyformfields,o.diyformdata"; + } + $goods = pdo_fetchall("SELECT o.fullbackid,g.*{$diyformfields} FROM " . tablename ('ewei_shop_order_goods') . + " o left join " . tablename('ewei_shop_goods') . " g on o.goodsid=g.id " + . " WHERE o.orderid=:orderid and o.uniacid=:uniacid", array(':orderid' => $order['id'], ':uniacid' => $_W['uniacid'])); + $diyform_set = p('diyform')->getSet(); + foreach ($goods as $g) { + if (!empty($g['diyformdata'])) { + $g_diyformfields = $g['diyformfields']; + $g_diyformdata = $g['diyformdata']; + break; + } + } + //订单统一模板 + if (!empty($order['diyformid'])) { + $orderdiyformid = $order['diyformid']; + if (!empty($orderdiyformid)) { + $order_fields = iunserializer($order['diyformfields']); + $order_data = iunserializer($order['diyformdata']); + } + } + if(!empty($g_diyformfields) && !empty($g_diyformdata) && empty($order_data)){ + $order_fields = iunserializer($g_diyformfields); + $order_data = iunserializer($g_diyformdata); + } + if(!empty($order_fields)){ + foreach ($order_fields as $key => $item) { + $order_fields[$key]['diy_type']=$key; + if($item['data_type']==5 && !empty($order_data[$key]) && is_array($order_data[$key])){ + $order_data[$key] = set_medias($order_data[$key]); + } + } + } + } $log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"])); if (empty($log)) { $log = pdo_fetch("SELECT * FROM " . tablename("core_paylog") . " WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid limit 1", array(":uniacid" => $uniacid, ":module" => EWEI_SHOP_V2_MODULE_NAME, ":tid" => $order["ordersn"] . "_wxapp")); @@ -135,7 +191,7 @@ class Pay_EweiShopV2Page extends AppMobilePage }else{ $wechat['payinfo']=$res; } -// 检测微信支付时的库存问题 + //检测微信支付时的库存问题 if(!$this->checkwxstock($order['id'])){ $wechat = array('success' => false); }; @@ -173,7 +229,15 @@ class Pay_EweiShopV2Page extends AppMobilePage 'ordersn' => $order['ordersn'], 'price' => $order['price'], 'title' => $set['shop']['name'] . "订单", + 'diydata' => $order_data, + 'diyfields' => $order_fields, ), + 'diyform' => array( + 'fields'=>$order_fields, + 'diyformfields'=>$order_fields, + 'diyformdata'=>$order_data, + ), + 'wpfw'=>$wpfwset, 'credit' => $credit, 'wechat' => $wechat, 'alipay' => $alipay, diff --git a/plugin/diyform/core/model.php b/plugin/diyform/core/model.php index a47faba..0fa48fc 100644 --- a/plugin/diyform/core/model.php +++ b/plugin/diyform/core/model.php @@ -593,6 +593,9 @@ class DiyformModel extends PluginModel } else { if ($value['data_type'] == 3) { if (is_array($_GPC[$field_data_name . $key])) { + if(!$tp_value){ + $tp_value = []; + } foreach ($_GPC[$field_data_name . $key] as $k1 => $v1) { $tp_value[] = trim($v1); } diff --git a/plugin/diyform/template/web_v3/diyform_inputfix.html b/plugin/diyform/template/web_v3/diyform_inputfix.html new file mode 100644 index 0000000..0558aa4 --- /dev/null +++ b/plugin/diyform/template/web_v3/diyform_inputfix.html @@ -0,0 +1,111 @@ + + + +{php $field_data_name = empty($field_data_name)?'field_data':$field_data_name} +{php $i=0;} +{loop $fields $k1 $v1} +
+ {if $v1['data_type'] == 13} + + + {else} + +
+ + {if $v1['data_type'] == 0} + + {elseif $v1['data_type']==1} + + + + {elseif $v1['data_type']==2} + + + + {elseif $v1['data_type']==3} + {loop $v1['tp_text'] $k2 $v2} + + {/loop} + {elseif $v1['data_type']==5} + {if $_W['plugin']=='merch' && !empty($_W['merchid'])} + {php echo tpl_form_field_multi_image2($field_data_name.$i, $f_data[$k1],array('dest_dir'=>'merch/'.$_W['merchid']))} + {else} + {php echo tpl_form_field_multi_image2($field_data_name.$i, $f_data[$k1])} + {/if} + + {elseif $v1['data_type']==6} + + {elseif $v1['data_type']==7} + {php echo tpl_form_field_date($field_data_name.$i,$f_data[$k1])} + + {elseif $v1['data_type']==8} + {php echo tpl_form_field_eweishop_daterange($field_data_name.$i,array('starttime'=>$f_data[$k1][0],'endtime'=>$f_data[$k1][1]))} + {else if $v1['data_type'] == 9} + + {php echo $f_data[$k1]['province']!='请选择省份'?$f_data[$k1]['province']:''}-{php echo $f_data[$k1]['city']!='请选择城市'?$f_data[$k1]['city']:''}{if !empty($f_data[$k1]['area'])}-{php echo $f_data[$k1]['area']}{/if} +

+ + + + + + {elseif $v1['data_type']==11} + + {elseif $v1['data_type']==12} + + + {elseif $v1['data_type']==14} + {loop $v1['tp_text'] $k2 $v2} + + {/loop} + {/if} +
+ {/if} + +
+{php $i++} +{/loop} diff --git a/plugin/diyform/template/web_v3/diyformwp.html b/plugin/diyform/template/web_v3/diyformwp.html new file mode 100644 index 0000000..2de9fee --- /dev/null +++ b/plugin/diyform/template/web_v3/diyformwp.html @@ -0,0 +1,71 @@ + + {if $value['data_type'] == 0 || $value['data_type'] == 1 || $value['data_type'] == 2 || $value['data_type'] == 6} + + {if !empty($datas[$key])} + {php echo str_replace("\n","|",$datas[$key])} + {else} + 未填写 + {/if} + + + {else if $value['data_type'] == 3} + {if !empty($datas[$key])} + {loop $datas[$key] $k1 $v1} + {php echo $v1.'|'} + {/loop} + {else} + 未填写 + {/if} + + {else if $value['data_type'] == 5} + {if !empty($datas[$key])} + {if empty($show_style)} + {loop $datas[$key] $k1 $v1} + + {/loop} + {else if $show_style==1} + {loop $datas[$key] $k1 $v1} +
+ {/loop} + {else if $show_style==2} + {loop $datas[$key] $k1 $v1} + + {php break;} + {/loop} + + 查看全部 + {/if} + {/if} + + {else if ($value['data_type'] == 7 || $value['data_type'] == 11 || $value['data_type'] == 14)} + + {php echo !empty($datas[$key])?$datas[$key]:'未填写'} + + {else if ($value['data_type'] == 8 || $value['data_type'] == 12)} + + {if !empty($datas[$key]) && !empty($datas[$key][0]) && !empty($datas[$key][1])} + {loop $datas[$key] $k1 $v1} + {php echo $v1} + {/loop} + {else} + 未填写 + {/if} + + {else if $value['data_type'] == 9} + {php echo $datas[$key]['province']!='请选择省份'&&$datas[$key]['province']!=''?$datas[$key]['province']:'未填写'}-{php echo $datas[$key]['city']!='请选择城市'&&$datas[$key]['city']!=''?$datas[$key]['city']:'未填写'}{if !empty($datas[$key]['area'])}-{php echo $datas[$key]['area']}{/if} + {else if $value['data_type'] == 10} + {php echo $datas[$key]['name1']} + | + {php echo $datas[$key]['name2']} + {/if} + diff --git a/plugin/diyform/template/web_v3/temp/tpl.html b/plugin/diyform/template/web_v3/temp/tpl.html index 39cc374..149cbf3 100644 --- a/plugin/diyform/template/web_v3/temp/tpl.html +++ b/plugin/diyform/template/web_v3/temp/tpl.html @@ -6,9 +6,14 @@ {ifp 'diyform.temp.edit|diyform.add'} + {if $data_type==13} + + + {else} - + {/if} + {else} {if $flag=1 && $data_type==6}身份证{else}{php echo $v1['tp_name']}{/if} {/if} diff --git a/plugin/open_api/core/mobile/upsql.php b/plugin/open_api/core/mobile/upsql.php index 00c4d90..b72f0f8 100644 --- a/plugin/open_api/core/mobile/upsql.php +++ b/plugin/open_api/core/mobile/upsql.php @@ -14,16 +14,19 @@ CREATE TABLE `ims_ewei_shop_good_wpfw` ( PRIMARY KEY (`id`,`goods_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; "; + + pdo_run($sql); -// if(!pdo_fieldexists("ewei_message_mass_sign", "id")) { -// pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;"); -// } + +if(!pdo_fieldexists("ewei_shop_order", "poste")) { + pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `poste` tinyint(1) NOT NULL DEFAULT '0';"); +} header('content-type:application/json'); global $_GPC; if($_GPC['sql_key']!='wanshangliaoliao'){ - echo json_encode(array('error' => 1, 'message' => 'sql key出错!')); + echo json_encode(array('error' => 1, 'message' => 'sql key出错!'),JSON_UNESCAPED_UNICODE); die; }else{ - echo json_encode(array('error' => 0, 'message' => '数据库更新完成!')); + echo json_encode(array('error' => 0, 'message' => '数据库更新完成!'),JSON_UNESCAPED_UNICODE); } \ No newline at end of file diff --git a/template/web_v3/order/detail.html b/template/web_v3/order/detail.html index 86b34ae..6058a3a 100644 --- a/template/web_v3/order/detail.html +++ b/template/web_v3/order/detail.html @@ -544,11 +544,12 @@ {php echo str_replace("\n","
", $item['virtual_str'])}
{/if} - + {if !empty($user['carrier_realname']) }
  • 联系人: {$user['carrier_realname']}, {$user['carrier_mobile']}
  • + {/if} {else if !$isonlyverifygoods}
  • 自提码: @@ -595,32 +596,66 @@ {/if} {/if} {if !empty($order_data)} + + +
  • + + + 复制信息 + + +
  • + + + + {/if} @@ -1218,6 +1253,18 @@ $(".diymore2").show(); $(".diymore22").hide(); }); + myrequire(["clipboard"], function(t) { + new t("#copydiy",{ + text: function(t) { + var cid = $(t).data("cid"); + var mt = $('#'+cid).html().replace(/\s+/g,""); + return mt.replace(/###/g, "\n"); + } + }).on("success", function(t) { + tip.msgbox.suc("复制成功") + }) + }); + }); function showDiyInfo(obj){ diff --git a/template/web_v3/order/list.html b/template/web_v3/order/list.html index 78fb5f7..d7dc26b 100644 --- a/template/web_v3/order/list.html +++ b/template/web_v3/order/list.html @@ -238,6 +238,14 @@
    + + + + +