Commit 0104987e by 朱继来

自营新增自提

parent 6e3a293a
......@@ -1494,7 +1494,13 @@ Class OrderController extends Controller
public function changeShipping(Request $request, $id='')
{
if($request->isMethod('post')){
$data['map'] = $request->input();
$data['shipping_type'] = $request->input('shipping_type', 1);
$data['consignee'] = $request->input('consignee', '');
$data['mobile'] = $request->input('mobile', '');
$data['province'] = $request->input('province', 0);
$data['city'] = $request->input('city', 0);
$data['district'] = $request->input('district', '');
$data['address'] = $request->input('address', '');
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
......
......@@ -63,6 +63,35 @@
<script>
var tags = "{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}";
var shipping_type = "{{isset($order_info) ? $order_info['order_shipping_type'] : 1}}";
var goods_type = "{{isset($order_info) ? $order_info['order_goods_type'] : 1}}";
$('.shipping_type').each(function() {
if ($(this).val() == shipping_type) {
$(this).attr('checked', true);
}
})
// 自提时隐藏省市区
if (shipping_type == 2) {
$('.address-info').hide();
}
if (goods_type == 2) {
var self_addr = '深圳市光明新区新湖街道楼村社区荔都路32号A栋三楼';
} else {
var self_addr = '深圳市龙岗区坂田五和大道南2号万科星火online六栋三楼猎芯科技';
}
$('.shipping_type').change(function() {
if ($(this).val() == 2) {
$('.address-info').hide();
$('textarea[name=address]').val(self_addr);
} else {
$('.address-info').show();
$('textarea[name=address]').val('');
}
})
$.lie.order.details();
</script>
\ No newline at end of file
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