public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string action = Request1.GetF("action"); if (action == "error") { Log.WriteLog("ticketResult1:" + "删除成功"); //删除文件 string path = HttpContext.Current.Server.MapPath(@"/weixin/"); path = path + "jsapi_ticket.json"; File.Delete(path); context.Response.Write("删除成功"); } else { _url = Request1.GetF("url"); Hashtable b = getSignPackage(); nonceStr = b["nonceStr"].ToString(); appId = b["appId"].ToString(); timestamp = b["timestamp"].ToString(); signature = b["signature"].ToString(); string json = @"wx.config({ debug: false, appId: '" + appId + @"', timestamp: " + timestamp + @", nonceStr: '" + nonceStr + @"', signature: '" + signature + @"', jsApiList: [ 'checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'translateVoice', 'startRecord', 'stopRecord', 'onRecordEnd', 'playVoice', 'pauseVoice', 'stopVoice', 'uploadVoice', 'downloadVoice', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'getNetworkType', 'openLocation', 'getLocation', 'hideOptionMenu', 'showOptionMenu', 'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard' ] });"; context.Response.Write(json); } }
public string get_response1(Request1 request) { return request.Name; }
public object Get(Request1 request) { return(new Request1Response()); }
public async Task <Response1> Test1(Request1 request) { return(await _dispatcher.DispatchAsync <Request1, Response1>(request)); }
public object GetJson(Request1 request) => request;
public object GetJsonAsync(Request1 request) => request;
public object AnyAsync(Request1 request) => request;
public object Get(Request1 request) => request;
public object Any(Request1 request) => request;
public Response1(Request1 request) { this.Request = request; }
public string get_response1(Request1 request) { return(request.Name); }
public object Any(Request1 request) { //... }
public IEnumerable <string> Get([FromQuery] Request1 model) { return(new string[] { "value1", "value2" }); }