Commit 3a71a7ac by 朱继来

Merge branch 'zjl_order_source_20180904' into development

parents 0d24e570 01e24d17
...@@ -245,6 +245,22 @@ function getOrderSource($order_id) ...@@ -245,6 +245,22 @@ function getOrderSource($order_id)
return false; return false;
} }
// 过滤来源字段
function handleOrderSource($order_source)
{
if (!$order_source) return false;
$source = explode(',', $order_source);
foreach ($source as $k => $v) {
if (!preg_match('/^(pf=|k=|adtag=|ptag=)/', $v)) {
unset($source[$k]);
}
}
return implode(',', $source);
}
Class OrderController extends Controller Class OrderController extends Controller
{ {
// 首页 // 首页
......
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
<tr> <tr>
<td class="table-list-title">Adtag或其它</td> <td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3"> <td class="table-list-content" colspan="3">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p> <p class="show-title" title="<?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?>"><?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?></p>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
<td class="table-list-content">{{$shippingNo ? substr($shippingNo, 0, -2) : ''}}</td> <td class="table-list-content">{{$shippingNo ? substr($shippingNo, 0, -2) : ''}}</td>
<td class="table-list-title">Adtag或其它</td> <td class="table-list-title">Adtag或其它</td>
<td class="table-list-content"> <td class="table-list-content">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p> <p class="show-title" title="<?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?>"><?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?></p>
</td> </td>
</tr> </tr>
</table> </table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment