protected void Page_Load(object sender, EventArgs e) { WebAjaxHelper ajax = new WebAjaxHelper(); //实例化 WebAjaxHelper类 if (Request.HttpMethod.ToLower() == "post") //获取用户端的传输方法(全转化为小写)是否为post { string jsonType = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["jsonType"], ""); string id = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["id"], ""); string name = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["name"], ""); string pwd = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["pwd"], ""); string newPwd = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["newPwd"], ""); string remark = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["remark"], ""); string type = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["type"], ""); string number = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["number"], ""); string count = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["count"], ""); string typeC = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["typeC"], ""); string typeT = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["typeT"], ""); string typeB = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["typeB"], ""); string isVal = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["isVal"], ""); string cid = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["cid"], ""); string price_s = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["price_s"], ""); string price_m = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["price_m"], ""); string status = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["status"], ""); string url = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["url"], ""); string word = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["word"], ""); string endTime = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["endTime"], ""); string startTime = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["startTime"], ""); string token = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["token"], ""); string code = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["code"], ""); if (!string.IsNullOrEmpty(jsonType)) { if (jsonType == "adminLogin") { if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(pwd)) { ajax.AdminLogin(name, pwd, code); } else if (string.IsNullOrEmpty(name)) { Response.Write("提示:用户名不能为空"); HttpContext.Current.ApplicationInstance.CompleteRequest(); } else { Response.Write("提示:密码不能为空"); HttpContext.Current.ApplicationInstance.CompleteRequest(); } return; } else if (jsonType == "checkAdminLogin")//校验读卡登陆 { if (!string.IsNullOrEmpty(code)) { ajax.CheckAdminLogin(code); } return; } else if (jsonType == "adminIsEnable")//账户的启用 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsEnable", "M_AdminUser"); return; } } else if (jsonType == "addAdminAmount")//添加账户信息 { if (!string.IsNullOrEmpty(name)) { ajax.AddAdminAmount(name, cid, number, remark); return; } } else if (jsonType == "AdminLogout")//用户退出 { ajax.AdminLogout(); return; } else if (jsonType == "assignCard")//分配卡片 { ajax.AssignCardToAdmin(); return; } else if (jsonType == "checkAdminAssign")//校验分配卡号 { if (!string.IsNullOrEmpty(code) && !string.IsNullOrEmpty(id)) { ajax.CheckAdminReadCardNum(code, id); } return; } else if (jsonType == "getFareCarry")//获取配送信息 { ajax.GetFareCarry(id); return; } else if (jsonType == "getProvience")//获取所有的省 { ajax.GetProvience(); return; } else if (jsonType == "addNewFareTemp")//添加运费模板 { if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(type) && !string.IsNullOrEmpty(typeB)) { ajax.AddNewFareTemplate(name, url, ToolHelper.ConventToInt32(startTime, 48), ToolHelper.ConventToInt32(type, 20), typeB, typeC); return; } } else if (jsonType == "deleteFareTemp")//删除运费模板 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteFareTemp(id); return; } } else if (jsonType == "updateFirstMoney")//更新首次运费金额 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateFareCarryFirstMoney(id, number); return; } } else if (jsonType == "updateContunueMoney")//更新续费金额 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateFareCarryContinueMoney(id, number); return; } } else if (jsonType == "deleteAdmin")//删除账户 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteAdminAmount(id); return; } } else if (jsonType == "updateAdminPwd")//更改密码 { if (!string.IsNullOrEmpty(pwd) && !string.IsNullOrEmpty(newPwd)) { ajax.UpdateAdminPwd(pwd, newPwd); return; } } else if (jsonType == "updataAdminName")//更改管理员名称 { if (!string.IsNullOrEmpty(id)) { ajax.UpdataAdminName(number, id); return; } } else if (jsonType == "updataAdminPhone")//更改管理员联系方式 { if (!string.IsNullOrEmpty(id)) { ajax.UpdataAdminPhone(number, id); return; } } else if (jsonType == "updataAdminPwd")//重置管理员账户密码 { if (!string.IsNullOrEmpty(id)) { ajax.UpdataAdminPwd(id); return; } } else if (jsonType == "xfOrderTradeGetAgain")//重新获取XF系统该笔订单的流水号信息 { if (!string.IsNullOrEmpty(id)) { ajax.XFOrderTradeGetAgain(id); return; } } else if (jsonType == "xfTradeSyncAgain") { if (!string.IsNullOrEmpty(id)) { ajax.XFTradeSyncAgain(id); return; } } else if (jsonType == "addSuppliers")//添加供应商 { if (!string.IsNullOrEmpty(number) && !string.IsNullOrEmpty(name)) { ajax.AddSuppliers(number, name); return; } } else if (jsonType == "deleteSuppliers")//删除供应商 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteSuppliers(id); return; } } else if (jsonType == "suppliersIsEnable")//供应商的启用 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsEnable", "M_Suppliers"); return; } } else if (jsonType == "suppliersDesc")//供应商描述 { if (!string.IsNullOrEmpty(id)) { ajax.ChangeTextarea(id, number, "M_Suppliers"); return; } } #region 类目管理 else if (jsonType == "categoryOrderBy")//更新类目排序 { int outSysID; if (!string.IsNullOrEmpty(id) && int.TryParse(id, out outSysID)) { ajax.UpdateOrderBy(outSysID, number, "M_Category"); return; } } else if (jsonType == "categoryIsEnable")//设置类目的启禁 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsEnable", "M_Category"); return; } } else if (jsonType == "deleteCategory")//删除类目信息 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteCategory(id); return; } } else if (jsonType == "addCategory")//添加类目信息 { int outParentID = 0; if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(id) && int.TryParse(id, out outParentID)) //父类不为空 { ajax.AddCategory(ToolHelper.DelRepeatData(name.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries)), outParentID); //一维数组去重复 return; } else if (!string.IsNullOrEmpty(name) && string.IsNullOrEmpty(id)) { ajax.AddCategory(ToolHelper.DelRepeatData(name.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries)), outParentID);//一维数组去重复 return; } } else if (jsonType == "updateCategory")//更新类目信息 { int outSysID = 0; if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(cid) && int.TryParse(cid, out outSysID))//父类不为空 { ajax.UpdateCategory(name, outSysID, id); return; } } #endregion #region 品牌管理 else if (jsonType == "deleteBrand")//删除品牌信息 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteBrand(id); return; } } else if (jsonType == "brandIsShow")//设置品牌的启禁 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsShow", "M_Brand"); return; } } else if (jsonType == "brandOrderBy")//更新品牌排序 { int outSysID; if (!string.IsNullOrEmpty(id) && int.TryParse(id, out outSysID)) { ajax.UpdateOrderBy(outSysID, number, "M_Brand"); return; } } else if (jsonType == "brandDescribe")//更改品牌描述 { if (!string.IsNullOrEmpty(id)) { ajax.ChangeTextarea(id, word, "M_Brand"); return; } } else if (jsonType == "addBrand")//添加品牌名称 { if (!string.IsNullOrEmpty(name)) { ajax.AddBrand(ToolHelper.DelRepeatData(name.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries)));//一维数组去重复 return; } } else if (jsonType == "updateBrand")//修改品牌信息 { int outSysID = 0; if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(id) && int.TryParse(id, out outSysID)) { ajax.UpdateBrand(name, outSysID); return; } } #endregion #region 轮播管理 else if (jsonType == "rollIsEnable")//设置轮播的启禁 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsEnable", "M_Roll"); return; } } else if (jsonType == "deleteRoll")//删除轮播信息 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteRoll(id); return; } } else if (jsonType == "rollOrderBy")//轮播信息排序 { int outSysID; if (!string.IsNullOrEmpty(id) && int.TryParse(id, out outSysID)) { ajax.UpdateOrderBy(outSysID, number, "M_Roll"); return; } } else if (jsonType == "addRoll")//添加轮播信息 { ajax.AddRoll(); return; } else if (jsonType == "updateRoll")//更新轮播信息 { int outSysID = 0; if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(cid) && int.TryParse(cid, out outSysID)) { ajax.UpdateRoll(id, type, outSysID); return; } } #endregion #region 联想数据 else if (jsonType == "searchCates")//联想类目信息 { ajax.SearchCates(name); return; } else if (jsonType == "searchBrands")//联想品牌信息 { ajax.SearchBrand(name); return; } else if (jsonType == "searchGoods")//联想商品信息 { ajax.SearchGoods(name); return; } else if (jsonType == "searchAdvs")//联想广告信息 { ajax.SearchAdvs(name); return; } #endregion else if (jsonType == "exportOrderInfo")//导出订单信息 { ajax.ExportOrderInfoList(url); return; } #region 产品操作 else if (jsonType == "chooseCpyInfo")//选择公司信息 { ajax.ChooseCpyInfo(); return; } else if (jsonType == "assignCpyToGoods")//分配当前商品指向公司 { string[] cpyInfo = word.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); ajax.AssignCpyToGoods(id, ToolHelper.DelRepeatData(cpyInfo)); return; } else if (jsonType == "deleteGoods")//删除产品信息 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteGoods(id); return; } } else if (jsonType == "changePrice")//更改商品价格 { decimal outShopPrice; decimal outMarketPrice; if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(price_s) && !string.IsNullOrEmpty(price_m) && decimal.TryParse(price_s, out outShopPrice) && decimal.TryParse(price_m, out outMarketPrice)) { ajax.ChangePrice(id, outShopPrice, outMarketPrice); return; } } else if (jsonType == "updateInverntory")//更新商品库存 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateInverntory(id, number); return; } } else if (jsonType == "updateQuotaNumber")//更新商品限购件数 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateQuotalNumber(id, number); return; } } else if (jsonType == "updateWeight")//更新商品重量 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateWeight(id, number); return; } } else if (jsonType == "goodsSellerNote")//更改商品备注信息 { if (!string.IsNullOrEmpty(id)) { ajax.ChangeTextarea(id, word, "M_Goods"); return; } } else if (jsonType == "exportGoodsInfo")//导出商品信息 { ajax.ExportGoodsInfoList(type, url); return; } else if (jsonType == "goodsOrderBy")//更新产品排序 { if (!string.IsNullOrEmpty(id)) { ajax.UpdateGoodsOrderBy(id, number); return; } } else if (jsonType == "goodsNew")//设置上新产品 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsNew", "M_Goods"); return; } } else if (jsonType == "goodsIsEnable")//设置产品的启禁 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsEnable", "M_Goods"); return; } } else if (jsonType == "goodsIsPromote")//设置产品的启禁 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(status)) { ajax.ChangeCheckBox(id, status, "IsPromote", "M_Goods"); return; } } else if (jsonType == "addGoodsInfo")//添加新的商品信息 { if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(cid) && !string.IsNullOrEmpty(price_s) && !string.IsNullOrEmpty(price_m) && !string.IsNullOrEmpty(type) && !string.IsNullOrEmpty(typeC) && !string.IsNullOrEmpty(typeT) && !string.IsNullOrEmpty(count)) { try { ajax.AddNewGoods(name, cid, Convert.ToDecimal(price_s), Convert.ToDecimal(price_m), Convert.ToInt32(typeC), Convert.ToInt32(typeT), ToolHelper.ConventToInt32(typeB, 0), Convert.ToInt32(count), word, remark, ToolHelper.ConventToDouble(number, 0), type); return; } catch { } } } else if (jsonType == "updataGoodsDetial")//更新商品详情 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(typeB) && !string.IsNullOrEmpty(typeC) && !string.IsNullOrEmpty(price_m) && !string.IsNullOrEmpty(price_s) && !string.IsNullOrEmpty(isVal) && !string.IsNullOrEmpty(cid)) { try { ajax.UpdataGoodsDetial(id, name, Convert.ToInt32(typeB), ToolHelper.ConventToInt32(typeT, 0), Convert.ToInt32(typeC), word, url, remark, Convert.ToDecimal(price_s), Convert.ToDecimal(price_m), isVal, cid); return; } catch { } } } else if (jsonType == "deleteCpyGoods")//取消当前商品的推荐 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteCpyGoods(id); return; } } else if (jsonType == "deleteErrLog")//删除错误日志 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteErrLog(id); return; } } else if (jsonType == "getBrandName")//获取品牌名称 { ajax.GetBrandName(id); return; } #endregion #region 模块处理 else if (jsonType == "getModalList")//获取所有模块 { ajax.GetModalList(); return; } else if (jsonType == "getAdminModalList")//获取当前用户模块 { ajax.GetAdminModalList(id); return; } else if (jsonType == "assignAdminModal")//分配用户模块 { ajax.AssignAdminModal(id, ToolHelper.DelRepeatData(word.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))); return; } #endregion #region 相册管理 else if (jsonType == "getGalleryImgList")//获取商品的相册图片 { ajax.GetGalleryImgList(id); return; } else if (jsonType == "deleteGalleryImg")//删除商品图册轮播图 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteGalleryImg(id); return; } } else if (jsonType == "deleteImgs")//图片管理-删除图片 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteFileManageImgs(id); return; } } #endregion #region 退货商品处理 else if (jsonType == "orderGoods")//获取当前订单的商品信息 { if (!string.IsNullOrEmpty(id)) { ajax.SearchOrderGoods(id); return; } } else if (jsonType == "reBackOrderGoods")//获取当前退货订单的退货商品信息 { if (!string.IsNullOrEmpty(id)) { ajax.SearchReBackOrderGoods(id); return; } } else if (jsonType == "confirmDelivery")//确认当前订单的物流信息 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(number)) { ajax.ConfirmDelivery(id, name, number, remark); return; } } else if (jsonType == "rebackGoods")//提交退货申请 { if (!string.IsNullOrEmpty(number) && !string.IsNullOrEmpty(type) && !string.IsNullOrEmpty(remark) && !string.IsNullOrEmpty(cid)) { ajax.ReBackOrderGoods(id, number, type, remark, cid); return; } } else if (jsonType == "reBackOrderIsPass")//通过退换货订单申请 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(type) && !string.IsNullOrEmpty(url)) { int outType = 0; if (int.TryParse(type, out outType)) { ajax.ReBackOrderIsPass(id, outType, remark, url); return; } } } else if (jsonType == "reBackOrderGoodsIsOK")//退货商品确认无误 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(remark) && !string.IsNullOrEmpty(type)) { int outType = 0; if (int.TryParse(type, out outType)) { ajax.ReBackOrderGoodsIsOK(id, outType, remark); return; } } } else if (jsonType == "reBackOrderMoney")//用户执行退款操作 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(number)) { ajax.ReBackOrderMoney(id, ToolHelper.ConventToDecimal(number, 0)); return; } } else if (jsonType == "changeGoodsForCustomer") { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(number)) { ajax.ChangeGoodsForCustomer(id, name, number); return; } } #endregion #region 异常订单处理 else if (jsonType == "htOrderToSuccess")//海淘推送至海关出错-恢复正常 { if (!string.IsNullOrEmpty(id)) { ajax.HtOrderToSuccess(id); return; } } #endregion Response.Write("UNLOGIN"); HttpContext.Current.ApplicationInstance.CompleteRequest(); } } else { Response.Write("UNLOGIN"); HttpContext.Current.ApplicationInstance.CompleteRequest();//结束执行 } }
protected void Page_Load(object sender, EventArgs e) { WebAjaxHelper ajax = new WebAjaxHelper(); //实例化 WebAjaxHelper类 if (Request.HttpMethod.ToLower() == "post") //获取用户端的传输方法(全转化为小写)是否为post { string jsonType = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["jsonType"], ""); string id = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["id"], ""); string name = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["name"], ""); string pwd = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["pwd"], ""); string newPwd = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["newPwd"], ""); string remark = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["remark"], ""); string type = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["type"], ""); string sort = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["sort"], ""); string pageNow = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["pageNow"], ""); string pageSize = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["pageSize"], ""); string number = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["number"], ""); string address = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["address"], ""); string id_1 = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["id_1"], ""); string id_2 = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["id_2"], ""); string id_3 = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["id_3"], ""); string phone = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["phone"], ""); string code = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["code"], ""); string cardNo = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.Form["cardNo"], ""); if (!string.IsNullOrEmpty(jsonType)) { if (jsonType == "logining")//用户进行登陆 { if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(pwd)) { //ajax.UserLogin(name, pwd); return; } } else if (jsonType == "trun_index") { ajax.Trun_Index(); return; } else if (jsonType == "getGoodsList")//首页获取商品的列表 { if (!string.IsNullOrEmpty(pageNow) && !string.IsNullOrEmpty(pageSize)) { ajax.GetGoodsListByIndexPage(pageNow, pageSize); } return; } else if (jsonType == "getByPageGoodsList")//获取商品的展示页商品列表 { if (!string.IsNullOrEmpty(pageNow) && !string.IsNullOrEmpty(pageSize) && !string.IsNullOrEmpty(sort)) { ajax.GetGoodsListByPage(type, sort, pageNow, pageSize, name); } return; } else if (jsonType == "getCpyGoodsList")//首页获取公司推荐的商品信息 { ajax.GetGoodsListByCpyIndexPage(); return; } else if (jsonType == "getRollInfoList") { ajax.GetRollInfoList(); return; } else if (jsonType == "getNewRecomGoodsList") { ajax.GetNewRecomGoodsList(); return; } #region 购物车集 else if (jsonType == "getUserCartList")//获取购物车列表信息 { if (!string.IsNullOrEmpty(id)) { ajax.GetUserCartList(id); return; } } else if (jsonType == "getUserCartListToSubmit")//获取购物车列表信息用于提交订单信息 { if (!string.IsNullOrEmpty(sort)) { string[] cartList = sort.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); ajax.GetUserCartListToSubmitOrder(ToolHelper.DelRepeatData(cartList), id); return; } } else if (jsonType == "changeCartNumber")//改变购物车商品的数量 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(type)) { ajax.ChangeCartNumber(id, type); return; } } else if (jsonType == "changeCartNumbers")//改变购物车商品的数量 { if (!string.IsNullOrEmpty(id)) { ajax.ChangeCartNumbers(id, number); return; } } else if (jsonType == "addGoodsToCart")//添加商品进购物车 { if (!string.IsNullOrEmpty(id)) { ajax.AddGoodsToCart(id, number); return; } } else if (jsonType == "deleteUserCart")//删除购物车的一件商品 { if (!string.IsNullOrEmpty(id)) { ajax.DeleteUserCart(id); return; } } else if (jsonType == "addUserOrder")//提交购物车生成订单 { if (!string.IsNullOrEmpty(address) && !string.IsNullOrEmpty(number) && !string.IsNullOrEmpty(id_1) && !string.IsNullOrEmpty(id_2) && !string.IsNullOrEmpty(sort)) { string[] cartList = sort.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); ajax.AddUserOrder(address, number, id_1, id_2, ToolHelper.DelRepeatData(cartList)); return; } } #endregion #region 订单列表 else if (jsonType == "getUserOrderList")//获取用户的订单列表 { ajax.GetUserOrderList(type, pageNow, pageSize); return; } else if (jsonType == "getUserOrderGoods")//获取用户的订单商品 { ajax.GetUserOrderGoods(id); return; } #endregion #region 收货地址 else if (jsonType == "deleteUserAddress")//删除用户的收货地址 { ajax.DeleteUserAddress(id); return; } else if (jsonType == "getUserAddress")//获取用户的地址 { ajax.GetUserAddress(id); return; } else if (jsonType == "getUserAddressList")//获取当前用户的配送地址列表 { ajax.GetUserAddressList(); return; } else if (jsonType == "choseChildAddress")//选择城市/地区 { ajax.ChoseChildAddress(id); return; } else if (jsonType == "addUserAddress")//添加用户的收货地址 { if (!string.IsNullOrEmpty(id_1) && !string.IsNullOrEmpty(id_2) && !string.IsNullOrEmpty(id_3) && !string.IsNullOrEmpty(address) && !string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(number) && !string.IsNullOrEmpty(cardNo)) { ajax.AddUserAddress(id_1, id_2, id_3, address, number, name, cardNo); return; } } else if (jsonType == "updateUserAddress")//更改用户的收货地址 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(id_1) && !string.IsNullOrEmpty(id_2) && !string.IsNullOrEmpty(id_3) && !string.IsNullOrEmpty(address) && !string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(number)) { ajax.UpdateUserAddress(id, id_1, id_2, id_3, address, number, name, cardNo); return; } } else if (jsonType == "getThisAddress")//获取当前收货地址 { ajax.GetChoiceAddress(id); return; } #endregion #region 订单集合 else if (jsonType == "cancelOrder")//用户取消订单支付 { ajax.CancelOrder(id); return; } else if (jsonType == "confirmOrder")//用户确认收货 { ajax.ConrirmOrder(id); return; } else if (jsonType == "toSubmitCardBanlance")//用户提交订单支付 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(number) && !string.IsNullOrEmpty(code)) { ajax.SubmitCardBanlance(id, number, code); return; } } #endregion #region 用户信息 else if (jsonType == "toSubmitCode")//用户发送验证码 { ajax.SubmitCode(phone, number); return; } else if (jsonType == "toSubmitCodeForLogin")//用户发送登陆验证码 { if (!string.IsNullOrEmpty(phone)) { ajax.SubmitCodeForLogin(phone); return; } } else if (jsonType == "toSetOrderCode")//用户发送订单手机验证码 { ajax.SetOrderCode(); return; } else if (jsonType == "toSubmitBindingInfo")//用户提交绑定信息 { if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(code)) { ajax.SubmitBindingInfo(phone, number, code, remark); return; } } else if (jsonType == "changePhone")//换绑手机 { ajax.ChangePhone(phone); return; } else if (jsonType == "changeNickName")//更换昵称 { ajax.ChangeNikeName(name); return; } #endregion else if (jsonType == "getSubCategoryList")//获取子类目的类目信息 { ajax.GetSubCategoryList(type); return; } //else if(jsonType== "unwrapPhone")//解绑手机 //{ // ajax.UnwrapPhone(); // return; //} //else if(jsonType== "getUserSysID")//获取用户的ID(用来判断用户是否登陆) //{ // Response.Write(WebLoginHelper.GetUserID()); // HttpContext.Current.ApplicationInstance.CompleteRequest(); // return; //} Response.Write("UNLOGIN"); HttpContext.Current.ApplicationInstance.CompleteRequest(); } else { Response.Write("UNLOGIN"); HttpContext.Current.ApplicationInstance.CompleteRequest();//结束执行 } } }