/// <summary>
        /// 展示调用微信 JS-SDK
        /// </summary>
        /// <returns></returns>
        public async Task <ActionResult> JsScan()
        {
            //请先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”

            var appId  = ConfigurationManager.AppSettings["weixin.appId"];
            var config = await JsConfig.Generate(WeixinConfig.JsapiTicketManager, appId, Request.Url.ToString(),
                                                 new[]
            {
                JsApi.scanQRCode
            },
                                                 true).ConfigureAwait(false);

            ViewBag.wxconfig = JsonConvert.ToString(config);

            return(View());
        }
        public async Task <IActionResult> OnGetAsync()
        {
            //请先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”

            var appId  = _settings.AppId;
            var config = await JsConfig.Generate(_jsapi, appId, GetRequestUrl(),
                                                 new[]
            {
                JsApi.scanQRCode
            },
                                                 true).ConfigureAwait(false);

            WxConfig = JsonConvert.SerializeObject(config);

            return(Page());
        }