</br>
<script>
$(function() {
$(".provinceid").change();
$(".Voprovince").change();
})
$(".Voprovince").change(function() {
var idcheckValue = $(".Voprovince").val();
$.post('/order/ajax_city', {
"id": idcheckValue,
},
function(yyy) {
if (yyy.status == 1) {
var s = yyy.data;
$(".Vocityid").empty();
for (var i = s.length - 1; i >= 0; i--) {
$(".Vocityid").append("<option value=" + s[i]["cityid"] + ">" + s[i]["city"] + "</option>");
};
} else {
alert(yyy.info);
}
},
'json');
});
$(".provinceid").change(function() {
var checkValue = $(".provinceid").val();
$.post('/order/ajax_city', {
"id": checkValue,
},
function(xxx) {
if (xxx.status == 1) {
var k = xxx.data;
$(".cityid").empty();
for (var i = k.length - 1; i >= 0; i--) {
$(".cityid").append("<option value=" + k[i]["cityid"] + ">" + k[i]["city"] + "</option>");
};
} else {
alert(xxx.info);
}
},
'json');
});
$(".account-spanDow").click(function() {
var store_name = $.trim($(".store_name").val());
var store_type = $.trim($(".store_type").val());
var person_name = $.trim($(".person_name").val());
var person_phone = $.trim($(".person_phone").val());
var provinceid = $.trim($(".provinceid").val());
var cityid = $.trim($(".cityid").val());
var detail_add = $.trim($(".detail_add").val());
var rrr = $(".store_name").val();
if ($.trim(rrr) == "") {
alert("请填写商铺名称");
return false;
};
var rrr = $(".store_type").val();
if ($.trim(rrr) == "") {
alert("请选择商铺性质");
return false;
};
var rrr = $(".person_name").val();
if ($.trim(rrr) == "") {
alert("请填写商家姓名");
return false;
};
var rrr = $(".person_phone").val();
if ($.trim(rrr) == "") {
alert("请填写联系电话");
return false;
};
var rrr = $(".provinceid").val();
if ($.trim(rrr) == "") {
alert("请选择所在省/市");
return false;
};
var rrr = $(".cityid").val();
if ($.trim(rrr) == "") {
alert("请选择所在区/县");
return false;
};
var rrr = $(".detail_add").val();
if ($.trim(rrr) == "") {
alert("请填写详细地址");
return false;
};
$.post('/Home/Index/personal_account', {
"store_name": store_name,
"store_type": store_type,
"person_name": person_name,
"person_phone": person_phone,
"provinceid": provinceid,
"cityid": cityid,
"detail_add": detail_add
},
function(ty) {
console.log(ty);
if (ty.status == 1) {
alert("提交成功,请等待工作人员联系");
$(".account").hide();
} else if (ty.status == 2) {
alert(ty.info);
} else {
alert(ty.info);
}
},
'json');
});
</br>
网友评论