实例一谷粒网后台弹窗传值:
$.modalDialog({
title: "差异查询 ",
width: '80%',
height: 600,
resizable: true,
queryParams: { s:startDate,e:endDate },
href: "/admin/sale/orderm/differentialQueryView?",
onLoad: function () {
},
onLoadError: function (xmlHttpRequest, textStatus, errorThrown) {
if (xmlHttpRequest.status == 401) {
window.location.href = "{{route('login')}}";
} else {
$.messager.show({
title: "错误",
msg: xmlHttpRequest.responseText,
timeout: 1000 * 2
});
}
},
buttons: [{
text: '取消',
iconCls: 'icon-cancel',
handler: function () {
$.modalDialog.handler.dialog('destroy');
$.modalDialog.handler = undefined;
}
}
]
});
queryParams为A页面传值参数,
下面是B页面弹层取得A页面的值
$goodsdg.datagrid({
url: "{{url('admin/sale/orderm/differentialQuery')}}",
fit: true,
pagination: true,
pageSize: 20,
pageList: [20, 40, 60, 80, 100],
queryParams: {
s: "{{request()->input("s")}}",
e: "{{request()->input("e")}}"
},
rownumbers: true,
border: false,
singleSelect: true,
idField: 'id',
fitColumns: false,
columns: [[
{field : 'ordermid',title : 'ID',width : parseInt($(this).width()*0.02),checkbox:true},
{field: 'ordermcode', title: '订单编号', width: parseInt($(this).width() * 0.08)},
{field: 'ordermkindnum', title: '种类数', width: parseInt($(this).width() * 0.03)},
{field: 'ordermsumnum', title: '商品数量', width: parseInt($(this).width() * 0.03)},
{field: 'ordermmoney', title: '下单金额', width: parseInt($(this).width() * 0.05)},
{field: 'ordermactualmoney', title: '实际金额', width: parseInt($(this).width() * 0.05)},
{field: 'ordermstatus', title: '状态', width: parseInt($(this).width() * 0.05)},
{field: 'customername', title: '客户名称', width: parseInt($(this).width() * 0.05)},
{field: 'ordermshipcontact', title: '联系人', width: parseInt($(this).width() * 0.05)},
{field: 'ordermphone', title: '手机', width: parseInt($(this).width() * 0.07)},
{field: 'ordermtime', title: '下单时间', width: parseInt($(this).width() * 0.07)},
{field: 'wmTime', title: '出库时间', width: parseInt($(this).width() * 0.07)},
]],
toolbar: '#goodstb'
});
B页面的queryParams s和e的是值 是A页面传递过来的
{{request()->input("s")}}
{{request()->input("e")}}
实例二谷粒网微信微信转账支付页面跳转功能:
A页面 get形式传值
window.location.href = '{{url('guliwang/wxpay/paypictest')}}?oid=' + resp.ordermid+"&price="+price;
B页面 request取值
var oid = "{{request()->input("oid")}}";
{{request()->input("price")}}