コード例 #1
0
        public ActionResult Index(string UserID, string UserName, string IsCustomer)
        {
            ViewBag.Title = "售后录入";

            string code  = Request.QueryString["code"];
            string state = Request.QueryString["state"];

            string           accessToken         = wcc.Accesstoken();
            string           jsapt_tickectString = JSAPI.GetTickect(accessToken);
            wx_js_api_ticket jsapt_ticket        = JsonConvert.DeserializeObject <wx_js_api_ticket>(jsapt_tickectString);
            long             timestamp           = JSAPI.GetTimeStamp();
            string           noncestr            = "nostop";
            string           retstring           = null;

            string url = null;

            if (string.IsNullOrEmpty(UserID))
            {
                url = "http://kocel.stopno.net/Home/Index" + "?code=" + code + "&state=" + state;
            }
            else
            {
                url = "http://kocel.stopno.net/Home/Index?UserID=" + UserID + "&UserName="******"&IsCustomer=No";
            }
            string signture = JSAPI.GetSignature(jsapt_ticket.ticket, noncestr, timestamp, url, out retstring);

            ViewBag.timestamp = timestamp;
            ViewBag.noncestr  = noncestr;
            ViewBag.signture  = signture;

            if (IsCustomer != "No")
            {
                IsCustomer = "Yes";
            }
            ViewBag.UserID     = UserID;
            ViewBag.UserName   = UserName;
            ViewBag.IsCustomer = IsCustomer;

            return(View());
        }
コード例 #2
0
        public ActionResult GetPDF()
        {
            ViewBag.Title = "产品说明书查询";

            string code  = Request.QueryString["code"];
            string state = Request.QueryString["state"];

            string           accessToken         = wcc.Accesstoken();
            string           jsapt_tickectString = JSAPI.GetTickect(accessToken);
            wx_js_api_ticket jsapt_ticket        = JsonConvert.DeserializeObject <wx_js_api_ticket>(jsapt_tickectString);
            long             timestamp           = JSAPI.GetTimeStamp();
            string           noncestr            = "nostop";
            string           retstring           = null;

            string url = "http://kocel.stopno.net/Home/GetPDF" + "?code=" + code + "&state=" + state;

            string signture = JSAPI.GetSignature(jsapt_ticket.ticket, noncestr, timestamp, url, out retstring);

            ViewBag.timestamp = timestamp;
            ViewBag.noncestr  = noncestr;
            ViewBag.signture  = signture;

            return(View());
        }