Пример #1
0
        private void bindRP()
        {
            userInfo uInfo = new userInfo();

            uInfo = (userInfo)Session["userInfo"];

            string uid = uInfo.addr;

            string url = "http://120.27.45.83:8082/api/Mall/LBSAddressPost";

            string para = "address=" +uid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 1000)
            {
                List<ShopArea> shopArea2 = JsonHelper.DeserializeJsonToList<ShopArea>(JsonHelper.DeserializeJsonToObject<ShopArea1>(resp.data.ToString()).list.ToString());

                this.Repeater1.DataSource = shopArea2;

                this.Repeater1.DataBind();
            }
        }
Пример #2
0
        private void bindRP()
        {
            userInfo uInfo = new userInfo();

            uInfo = (userInfo)Session["userInfo"];

            string uid = uInfo.id;

            string url = "http://120.27.45.83:8082/api/Mall/getAddressList";

            string para = "user_id=" + uid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 1000)
            {
                List<userAddress> userAddresss = JsonHelper.DeserializeJsonToList<userAddress>(resp.data.ToString());

                this.Repeater1.DataSource = userAddresss;

                this.Repeater1.DataBind();
            }
        }
Пример #3
0
        public static string  getorderid(string uid, string orid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetUserOrderList";


            string ordercode = "";


            string para = "user_id=" + uid + "&type=0&start=0&limit=100";

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            resp             resp1  = JsonHelper.DeserializeJsonToObject <resp>(resp.data.ToString());
            List <orderInfo> orders = JsonHelper.DeserializeJsonToList <orderInfo>(resp1.list.ToString());

            foreach (orderInfo oi in orders)

            {
                if (oi.order_id == orid)
                {
                    ordercode = oi.order_code;

                    break;
                }
            }

            return(ordercode);
        }
Пример #4
0
        protected void AddCar()
        {
            string url = "http://120.27.45.83:8085/api/Mall/AddGoodsToCart";

            string para = "goods_id=" + Request.Form["id"].ToString() + "&user_id=" + Request.Form["userid"].ToString() + "&goods_num=1";

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);
        }
Пример #5
0
        protected void GetGoodsListByCategory()
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetGoodsListByCategory";

            string para = "start=0&limit=100&type=" + Request.Form["cid"].ToString();

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            Response.Write( resp.data.ToString());
        }
Пример #6
0
        protected void LBSPost()
        {
            string url = "http://120.27.45.83:8085/api/Mall/LBSPost";

            string para = "longitude="+ Request.Form["x"].ToString();

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            Response.Write(resp.data.ToString());
        }
Пример #7
0
        protected List<productList> bindRP2(string cid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetGoodsListByCategory";

            string para = "start=0&limit=100&type=" + cid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return JsonHelper.DeserializeJsonToList<productList>(JsonHelper.DeserializeJsonToObject<productInfo>(resp.data.ToString()).list.ToString());
        }
Пример #8
0
        public static string CancelOrder(string orderid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/CancelOrder";

            string para = "order_id=" + orderid;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return(resp.code.ToString());
        }
Пример #9
0
        protected void AddCar()
        {
            string url = "http://120.27.45.83:8085/api/Mall/AddGoodsToCart";



            string para = "goods_id=" + Request.Form["id"].ToString() + "&user_id=" + Request.Form["userid"].ToString() + "&goods_num=1";

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);
        }
Пример #10
0
        public static string GetOrderDetail(string orderid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetOrderDetail";

            string para = "order_id=" + orderid;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return(resp.data.ToString());
        }
Пример #11
0
        public static string WxPay(string Orderno)
        {
            string url = "http://120.27.45.83:8085/api/User/WxPay";

            string para = "Orderno=" + Orderno;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return(resp.data.ToString());
        }
Пример #12
0
        protected void regBt_Click(object sender, EventArgs e)
        {
            if (DateTime.Parse(Session["codetime1"].ToString()).AddSeconds(120) > DateTime.Now)
            {
                string mobilecode = this.code.Text.ToString().Trim();

                string pwd = this.pwd.Text.ToString().Trim();

                string repwd = this.repwd.Text.ToString().Trim();

                if (mobilecode != Session["code1"].ToString())
                {
                    Response.Write("<script>alert('验证码错误')</script>");
                    return;
                }

                userInfo uInfo = new userInfo();

                uInfo = (userInfo)Session["userInfo"];
                string uid = uInfo.id;

                string name = this.code.Text;

                string passwrod = this.pwd.Text;

                string url = "http://120.27.45.83:8085/api/User/UpdatePwd";

                string para = "user_id=" + uid + "&oldpassword="******"&password  ="******"<script>alert('修改密码成功');local.href='lsjyWeb/personalCenter.aspx'</script>");
                }
                else
                {
                    Response.Write("<script>alert('修改密码失败')</script>");

                }
            }
            else
            {

                Response.Write("<script>alert('验证码超时')</script>");
            }
        }
Пример #13
0
        public static string  listCart(string uid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/showCart";



            string para = "user_id=" + uid;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return(resp.data.ToString());
        }
Пример #14
0
        public static string clearCart(string uid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/DelAllGoodsToCart";



            string para = "user_id=" + uid;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return(resp.code.ToString());
        }
Пример #15
0
        public static List <ShopArea3> GetArea()
        {
            string url = "http://120.27.45.83:8085/api/Mall/LBSGetExtractingShopArea";



            string para = "address=上海";

            resp resp = new resp();


            List <ShopArea3> sa3 = JsonHelper.DeserializeJsonToList <ShopArea3>(Util.GetResp(url, para).data.ToString());

            return(sa3);
        }
Пример #16
0
        public static string createOrder(string userid, string addrid, string storeid, string pay_type, string postprice, string post_type, string goods_id, string goods_num, string ordernote, string deleveryTime, string shopid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/createOrder";

            string para = "user_id=" + userid + "&addressId=" + addrid + "&storeid=" + storeid + "&pay_type=" + pay_type + "&postprice=" + postprice + "&post_type=" + post_type + "&goods_id_list=" + goods_id + "&goods_num_list=" + goods_num + "&ordernote=" + ordernote + "&DeliveryTime=" + deleveryTime + "&ExtractingShopId=" + shopid;

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 0)
            {
                return("0");
            }


            return(resp.data.ToString());
        }
Пример #17
0
        protected void address_bt_Click(object sender, EventArgs e)
        {
            string url = "http://120.27.45.83:8082/api/Mall/EditAddress";

            string para = "id=" + this.aid.Value + "&address=" + this.address.Value + "&phone=" + this.mobile.Value + "&name=" + this.name.Value + "&user_id=" + this.uid.Value + "&is_default=1";
            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 1000)
            {
                Response.Write("<script>alert('修改地址成功');local.href='addressManage.aspx'</script>");

            }
            else
            {
                Response.Write("<script>alert('修改地址失败');local.href='addressManage.aspx'</script>");
            }
        }
Пример #18
0
        private void bindRP1()
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetCategory";

            string para = "user_id=0";

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            List<categoryList> categorylist = JsonHelper.DeserializeJsonToList<categoryList>(JsonHelper.DeserializeJsonToObject<categoryInfo>(resp.data.ToString()).categoryList.ToString());

            this.acid.Value = categorylist[0].Id;

            if (resp.code == 1000)
            {

                this.Repeater1.DataSource = categorylist;

                this.Repeater1.DataBind();
            }
        }
Пример #19
0
        protected void reg_send_submit_Click(object sender, EventArgs e)
        {
            string mobile = this.cell_txt.Value;

              resp res = new resp();

              res = Util.GetResp("http://120.27.45.83:8085/api/User/ValidatePhone", "Phone=" + mobile);

              if (res.code == 1000)
              {

                  //验证码
                  Session["code"] = DateTime.Now.Millisecond.ToString();
                  //验证码时间
                  Session["codetime"] = DateTime.Now.ToString();

                  CCPRestSDK api = new CCPRestSDK();

                  bool isInit = api.init("app.cloopen.com", "8883");
                  api.setAccount("8a48b5514f73ea32014f848582a61f2d", "42d2934251534741ab39067f67645812");
                  api.setAppId("8a48b5514f73ea32014f84882bd81f2f");

                  string[] data = { Session["code"].ToString(), "5" };

                  if (isInit)
                  {
                      api.SendTemplateSMS(mobile, "34439", data);

                  }

                  Response.Redirect("registB.aspx?mobile=" + mobile );

              }
              else
              {

                  Response.Write("<script>alert('您的手机号已被注册过!')</script>");
              }
        }
Пример #20
0
        private void setAddress()
        {
            string url = "http://120.27.45.83:8082/api/Mall/getAddressInfo";

            string para = "key="+ Request.QueryString["aid"].ToString();

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            userAddress user = JsonHelper.DeserializeJsonToObject<userAddress>(resp.data.ToString());

            this.name.Value = user.name;

            this.mobile.Value = user.phone;

            this.area.Value = user.area;

            this.address.Value = user.address;

            this.aid.Value = user.id;

            this.uid.Value = user.user_id;
        }
Пример #21
0
        public static string clearCart(string uid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/DelAllGoodsToCart";

            string para = "user_id=" + uid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.code.ToString();
        }
Пример #22
0
        public static string getorderid(string uid,string orid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetUserOrderList";

            string ordercode = "";

            string para = "user_id=" + uid + "&type=0&start=0&limit=100";

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            resp resp1 = JsonHelper.DeserializeJsonToObject<resp>(resp.data.ToString());
            List<orderInfo> orders=JsonHelper.DeserializeJsonToList<orderInfo>(resp1.list.ToString());

            foreach (orderInfo oi in orders)

            {
                if (oi.order_id == orid)
                {

                    ordercode= oi.order_code;

                    break;
                }

            }

            return ordercode;
        }
Пример #23
0
        public static string GetOrderDetail(string orderid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetOrderDetail";

            string para = "order_id=" + orderid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.data.ToString();
        }
Пример #24
0
        public static string CancelOrder(string orderid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/CancelOrder";

            string para = "order_id=" + orderid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.code.ToString();
        }
Пример #25
0
        /// <summary>
        /// 设置默认自提点
        /// </summary>
        private void setZiTiDian()
        {
            if (Request.QueryString["macid"] != null)
            {

                this.Label1.Text = Request.QueryString["title"].ToString();

                this.goid.Value = Request.QueryString["macid"].ToString();

                this.machid.Value = Request.QueryString["macid"].ToString();
            }
            else
            {

            string url = "http://120.27.45.83:8085/api/Mall/LBSAddressPost";

            string para = "address=" + "上海"; //this.address.Text;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            List<ShopArea> shopArea2 = JsonHelper.DeserializeJsonToList<ShopArea>(JsonHelper.DeserializeJsonToObject < ShopArea1 > (resp.data.ToString()).list.ToString());

            this.Label1.Text = shopArea2[0].title;

            this.goid.Value = shopArea2[0].geotable_id;

            this.machid.Value = shopArea2[0].mch_id;

            }
        }
Пример #26
0
        /// <summary>
        /// 添加到购物车
        /// </summary>
        /// <param name="goodid"></param>
        /// <param name="userid"></param>
        /// <param name="num"></param>
        private void AddCar(string goodid, string userid, int num)
        {
            Util.clearCart(userid);

            string url = "http://120.27.45.83:8085/api/Mall/AddGoodsToCart";

            string para = "goods_id=" + goodid + "&user_id=" + userid + "&goods_num=" + num.ToString();

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);
        }
Пример #27
0
        public static string WxPay(string Orderno)
        {
            string url = "http://120.27.45.83:8085/api/User/WxPay";

            string para = "Orderno=" + Orderno ;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.data.ToString();
        }
Пример #28
0
        public static string EditOrderShippingStatus(string orderid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/EditOrderShippingStatus";

            string para = "order_id=" + orderid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.code.ToString();
        }
Пример #29
0
        /// <summary>
        /// 设置默认地址
        /// </summary>
        private void setAddress()
        {
            string url = "http://120.27.45.83:8082/api/Mall/getDefaultAddress";

            string para = "user_id=" + uInfo.id;

            if (Request.QueryString["addr10"] != null)
            {
                url = "http://120.27.45.83:8085/api/Mall/getAddressInfo";

                para = "key=" + Request.QueryString["addr10"].ToString();
            }

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 1000)
            {

                userAddress user = JsonHelper.DeserializeJsonToObject<userAddress>(resp.data.ToString());

                this.name.Text = user.name;

                this.mobile.Text = user.phone;

                if (user == null)
                {
                    this.address.Text = "请选择地址";
                    this.hf1.Value = "0";
                }
                else
                {
                    this.address.Text = user.area + user.address;
                    this.hf1.Value = user.id;
                }

            }
        }
Пример #30
0
        public static string createOrder(string userid, string addrid, string storeid, string pay_type, string postprice, string post_type, string goods_id, string goods_num, string ordernote, string deleveryTime, string shopid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/createOrder";

            string para = "user_id=" + userid + "&addressId=" + addrid + "&storeid=" + storeid + "&pay_type=" + pay_type + "&postprice=" + postprice + "&post_type=" + post_type + "&goods_id_list=" + goods_id + "&goods_num_list=" + goods_num + "&ordernote=" + ordernote + "&DeliveryTime=" + deleveryTime + "&ExtractingShopId=" + shopid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 0)
            {

                return "0";
            }

            return resp.data.ToString();
        }
Пример #31
0
        public static string listCart(string uid)
        {
            string url = "http://120.27.45.83:8085/api/Mall/showCart";

            string para = "user_id=" + uid;

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            return resp.data.ToString();
        }
Пример #32
0
        protected void regBt_Click(object sender, EventArgs e)
        {
            if (DateTime.Parse(Session["codetime"].ToString()).AddSeconds(120) > DateTime.Now)
            {
                string  mobilecode=this.code.Text.ToString().Trim();

                string pwd = this.pwd.Text.ToString().Trim();

                string repwd = this.repwd.Text.ToString().Trim();

                if (mobilecode != Session["code"].ToString())
                {
                    Response.Write("<script>验证码错误</script>");
                    return;
                }

                if (pwd != repwd)
                {
                    Response.Write("<script>密码不一致</script>");
                    return;
                }

                string url = "http://120.27.45.83:8085/api/User/RegisterOne";

                string name = mobile;

                string paras = "nickname=" + name + "&password="******"&confirm_password="******"&phone=" + mobile;

                var tempEntity = new { code = string.Empty, msg = string.Empty, time = string.Empty };
                JsonHelper.SerializeObject(tempEntity);
                //json5 : {"ID":0,"Name":""}
                tempEntity = JsonHelper.DeserializeAnonymousType(publicClass.RequestUrl(url, paras), tempEntity);

                if (tempEntity.code == "1000")
                {

                    //登陆

                    string loginUrl = "http://120.27.45.83:8085/api/User/login";

                    string loginpara = "phone=" + mobile + "&password="******"userInfo"] = user;

               Response.Write("<script>alert('注册成功');local.href='lsjyWeb/personalCenter.aspx'</script>");
                    Response.Redirect("index.aspx");
                }
                else
                {
                    Response.Write("<script>alert('注册失败')</script>");
                }

            }
            else
            {

                Response.Write("<script>alert('验证码超时')</script>");
            }
        }
Пример #33
0
        private void BindRepeater1()
        {
            string url = "http://120.27.45.83:8085/api/Mall/GetUserOrderList";

            userInfo uInfo = new userInfo();

            uInfo = (userInfo)Session["userInfo"];

            string uid = uInfo.id;

            string para = "user_id=" + uid + "&type=0&start=0&limit=100";

            resp resp = new resp();

            resp = QLWeiXin.Code.Util.GetResp(url, para);

            this.Repeater1.DataSource = JsonHelper.DeserializeJsonToList<orderInfo>(JsonHelper.DeserializeJsonToObject < orderInfo1 > (resp.data.ToString()).list.ToString());

            this.Repeater1.DataBind();
        }
Пример #34
0
        public static List<ShopArea3> GetArea()
        {
            string url = "http://120.27.45.83:8085/api/Mall/LBSGetExtractingShopArea";

            string para = "address=上海";

            resp resp = new resp();

             List<ShopArea3> sa3 = JsonHelper.DeserializeJsonToList<ShopArea3>(Util.GetResp(url, para).data.ToString());

             return sa3;
        }