87,921
社区成员
发帖
与我相关
我的任务
分享
<script>
var IsCreateLevel = true;
//品牌过滤 是否使用 规则
var IsBrandLimit = false;
function ShareUrlCreate(Brand_ID,BrandLevel) {
try {
TipLoad.loading();
if (IsCreateLevel) {
$.ajax({
type: 'POST',
url: 'Manager.asp',
data: { action: 'shareurl_NewOrder', Brand_ID: Brand_ID },
dataType: 'json',
timeout: 30000,
success: function (data) {
TipLoad.close();
if (data.id == 1) {
if (data.items) {
console.log(data);
// prompt dialog
alertify.prompt("请输入购买数量", function (e, str) {
// str is the input text
if (e) {
//取级别
var val = $('#select_level').val();
//console.log(val);
alertify.confirm('确定放购买吗?', function(e) {
if (e) {
TipLoad.loading();
//location.href = "ShareAgentList.asp?sq=1&sid=" + Brand_ID + "&BrandLevel=" + val;
//这里本来是用location.href 转向另外一个页面的,如何用POST把 BrandLevel= val这个值再写入 Manager.asp 而不用 页面转跳?
}else{
//没有确认
}
});
// console.log(val);
//
} else {
// user clicked "cancel"
}
}, "");
var list = [];
list = data.items;
//console.log(list);
var data = { list: list}
$('.alertify-text-wrapper').html(template('listHtml', data));
}
} else {
alertify.alert(data.messages);
}
},
error: function (xhr, type) {
alertify.error('超时,或服务错误');
}
});
} else {
location.href = "UrlCreate.php?Id=" + Brand_ID;
}
} catch (e) {
alert(e);
}
}
</script>