微信小程序 wx.request POST500 (Internal Server Error) 10C

在模拟器里url: 'http://localhost:27709/WebService1.asmx/Name通过了,换成域名就报错
——POST http://www.****.***/WebService1.asmx/Name 500 (Internal Server Error)
开发环境里已经屏蔽了,不校验合法域名了,应该不会报错呀;
域名访问正常,没有备案也没有https证书,只是学习时试用,请各位大神赐教

4个回答

500肯定是服务端报错了,而且是服务器接收了,执行报错了,才会报500,直接看后台日志,应该可以查询到报错的

你看下POST的问题,因为小程序默认发送的请求头是application/json ,而POST 在服务端接收的请求头是 application/x-www-form-urlencoded,
报错可能是服务器没有拿到你POST的参数

chinayhf
地星蓝色 小程序这端用的也是application/x-www-form-urlencoded
一年多之前 回复

把res.data抛出去,发现是一个网页的html代码

把代码拷贝出来,贴到记事本中,另存为a.htm, 你就看到服务器端抱什么错了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
微信小程序util.js里写登录的方法返回的结果怎么是undefined?
我把这个登录方法现在util.js里,调用后出来的结果是undefined,我能这么写吗? ``` function wxlogin () { wx.login ({ success: function (res) { let code = res.code; if (code) { wx.getUserInfo({ success: function (res) { wx.request ({ url: run_url + "weixin/getUserInfo", header: { 'content-type': 'application/json' }, data: { encryptedData: res.encryptedData, iv: res.iv, code: code }, success: function (res) { let userContent = res.data.userContent; if (userContent == '' || userContent == undefined) { console.log("login error!"); } else { var openId = userContent.openId; var sessionKey = userContent.sessionKey; var userId; if (res.data.status) { userId = userContent.userId; } else { userId = '' } return { openId: openId, sessionKey: sessionKey, userId: userId } } }, fail: function (err) { console.log("login error!"); return false; } }) }, fail: function (err) { console.log("user has not authorized to USERINFO yet!"); return false; } }) } else { console.log("err"); return false; } }, fail: function (err) { console.log("err"); return false; } }) } ```
微信小程序使用wx.openlocation显示网页已经不存在
**index.wxml** ``` <map id="map" longitude="116.715790" latitude="23.362490" markers="{{markers}}" scale="18" style="width: 100%; height: 300px;" bindtap="click"> </map> ``` **index.js** var QQMapWX = require('../../libs/qqmap-wx-jssdk.min.js'); var qqmapsdk; Page({ onLoad: function (options) { qqmapsdk = new QQMapWX({ key: '****' }) }, click: function (e) { wx.openLocation({ latitude: 23.562490, longitude: 116.615790, scale: 18, }) } **点击地图后,报错如下** 无法访问此网站 网址为 qqmap://map/routeplan?type=drive&referer=kpweizhi&from=我的位置&fromcoord=CurrentLocation&to= &tocoord=23.56249,116.61579 的网页可能暂时无法连接,或者它已永久性地移动到了新网址。 ERR_UNKNOWN_URL_SCHEME
微信小程序,springboot怎么保持会话状态。谢谢解答
微信小程序的官方教程里说让自己生成一个登陆状态,用于业务传输。 我让服务器生成一个sessionid传给小程序=》小程序收到也能保存=》有业务请求用get方法返回到服务器时=》服务器读出来的sessionid和之前的不一样。麻烦各位帮忙看看 小程序的发送代码 ``` wx.request({ url: 'http://192.168.31.109:8080/user/checkLogin', header: {'Cookie':'JSESSIONID=' + wx.getStorageSync("serverSeesion")}, method: "GET", data:{ JSESSIONID: wx.getStorageSync("serverSeesion") }, success: function (res) { console.log("123="+res.data) } }) ``` 服务器的接收代码 ``` /** * 验证与小程序同步性 * @param request * @return */ @RequestMapping(value = "/checkLogin") public Result checkWXloginType(HttpServletRequest request) { System.err.println("logintype=" + request.getSession().getAttribute("WXLOGINTYPE")); //之前设置的session 这里都为null了 System.err.println("sid=" + request.getSession().getAttribute("sid"));//之前设置的session 这里都为null了 return resultUT.putVal(LogEnum.LOG_F0, request.getSession().getId());//之前设置的session 这里都为null了 } ```
微信小程序的授权问题
LoginError {type: "ERR_LOGIN_MISSING_SESSION", message: "登录失败(ERR_LOGIN_FAILED):鉴权服务调用失败:#1012 - $NO_APPID_SET_ON_SERVER"} 再微信小程序授权中,提示上面的错误,这是什么原因?怎么解决》
ionic3打包出错,求大佬帮忙!!
今天打包的时候cordova build android就出现下面这个错误,以前都没有问题的,请问是哪的问题?该如何解决了,求具体如何操作。。。 C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace3996090bdb7ad492e3b5bcd\res\values\values.xml:246:5-69: AAPT: error: resource android:attr/fontVariationSettings not found. C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace3996090bdb7ad492e3b5bcd\res\values\values.xml:246:5-69: AAPT: error: resource android:attr/ttcIndex not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:248: error: resource android:attr/fontVariationSettings not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:248: error: resource android:attr/ttcIndex not found. error: failed linking references. =============== 全部的: PS D:\code\ysda\ysda> cordova build android cordova-android-support-gradle-release: Android platform: V7+ cordova-android-support-gradle-release: Wrote custom version '26.+' to D:\code\ysda\ysda\platforms\android\app\build.gra dle cordova-android-support-gradle-release: Wrote custom version '26.+' to D:\code\ysda\ysda\platforms\android\cordova-andro id-support-gradle-release\zxh-cordova-android-support-gradle-release.gradle Android Studio project detected cordova-android-support-gradle-release: Android platform: V7+ cordova-android-support-gradle-release: Wrote custom version '26.+' to D:\code\ysda\ysda\platforms\android\app\build.gra dle cordova-android-support-gradle-release: Wrote custom version '26.+' to D:\code\ysda\ysda\platforms\android\cordova-andro id-support-gradle-release\zxh-cordova-android-support-gradle-release.gradle ANDROID_HOME=C:\Users\Administrator\AppData\Local\Android\sdk JAVA_HOME=E:\Java\jdk1.8.0_91 studio Starting a Gradle Daemon (subsequent builds will be faster) BUILD SUCCESSFUL in 5s 1 actionable task: 1 executed Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. +----------------------------------------------------------------- | cordova-android-support-gradle-release: 26.+ +----------------------------------------------------------------- Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doL ast(Action) instead. at build_dxxuwns2wpt3q41rnhqfnnu3n.run(D:\Code\YSDA\ysda\platforms\android\app\build.gradle:152) :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl :CordovaLib:compileDebugRenderscript :CordovaLib:checkDebugManifest :CordovaLib:generateDebugBuildConfig :CordovaLib:prepareLintJar :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:platformAttrExtractor :CordovaLib:processDebugManifest :CordovaLib:javaPreCompileDebug :CordovaLib:processDebugJavaRes NO-SOURCE :app:preBuild UP-TO-DATE :app:preDebugBuild :app:compileDebugAidl :CordovaLib:packageDebugRenderscript NO-SOURCE :app:compileDebugRenderscript :app:checkDebugManifest :app:generateDebugBuildConfig :app:prepareLintJar :app:generateDebugResValues :app:generateDebugResources :app:mergeDebugResources :app:createDebugCompatibleScreenManifests :app:processDebugManifest :app:splitsDiscoveryTaskDebug :app:compileDebugNdk NO-SOURCE :CordovaLib:mergeDebugShaders :CordovaLib:compileDebugShaders :CordovaLib:generateDebugAssets :CordovaLib:mergeDebugAssets :app:mergeDebugShaders :app:compileDebugShaders :app:generateDebugAssets :app:mergeDebugAssets :CordovaLib:compileDebugNdk NO-SOURCE :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug :app:mergeDebugJniLibFolders :app:processDebugJavaRes NO-SOURCE :app:validateSigningDebug :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:compileDebugJavaWithJavacע: ijЩ�����ļ�ʹ�û�����ѹ�ʱ�� API�� ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣 :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug :app:processDebugResourcesC:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace 3996090bdb7ad492e3b5bcd\res\values\values.xml:246:5-69: AAPT: error: resource android:attr/fontVariationSettings not fou nd. C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace3996090bdb7ad492e3b5bcd\re s\values\values.xml:246:5-69: AAPT: error: resource android:attr/ttcIndex not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml :248: error: resource android:attr/fontVariationSettings not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml :248: error: resource android:attr/ttcIndex not found. error: failed linking references. Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796) at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551) at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109) at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(Default TaskClassInfoStore.java:173) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskC lassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskC lassInfoStore.java:121) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.j ava:111) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter. java:92) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70 ) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachin gStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExec uter.java:88) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactState TaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.j ava:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34 ) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter. java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecute r.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecute r.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor .java:124) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor. java:80) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.j ava:105) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.j ava:99) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99 ) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:60) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:128) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:311) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:202) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:132) at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:107) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java :43) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:4 0) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:45) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java :71) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java :45) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecute r.java:51) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecute r.java:32) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter. java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter. java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigura tionBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigura tionBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE xecuter.java:64) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE xecuter.java:29) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct ionExecuter.java:55) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct ionExecuter.java:42) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:58) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:33) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.ja va:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aap t2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794) ... 121 more Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463) at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415) at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332) at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104) FAILED 36 actionable tasks: 36 executed FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > Failed to execute aapt * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 31s cmd: Command failed with exit code 1 Error output: ע: ijЩ�����ļ�ʹ�û�����ѹ�ʱ�� API�� ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣 C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace3996090bdb7ad492e3b5bcd\re s\values\values.xml:246:5-69: AAPT: error: resource android:attr/fontVariationSettings not found. C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\ac54a0ace3996090bdb7ad492e3b5bcd\re s\values\values.xml:246:5-69: AAPT: error: resource android:attr/ttcIndex not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml :248: error: resource android:attr/fontVariationSettings not found. D:\Code\YSDA\ysda\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml :248: error: resource android:attr/ttcIndex not found. error: failed linking references. Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796) at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551) at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109) at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(Default TaskClassInfoStore.java:173) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskC lassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskC lassInfoStore.java:121) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.j ava:111) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter. java:92) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70 ) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachin gStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExec uter.java:88) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactState TaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.j ava:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34 ) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter. java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecute r.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecute r.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor .java:124) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor. java:80) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.j ava:105) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.j ava:99) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99 ) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:60) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:128) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:311) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:202) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:132) at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:107) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java :43) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildO perationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:4 0) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:45) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java :71) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java :45) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecute r.java:51) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecute r.java:32) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter. java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter. java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigura tionBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigura tionBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE xecuter.java:64) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE xecuter.java:29) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct ionExecuter.java:55) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct ionExecuter.java:42) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:58) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:33) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.ja va:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aap t2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794) ... 121 more Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463) at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415) at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332) at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104) FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > Failed to execute aapt
手机测试 wx.config 无反应,愿意发微信红包, 求大佬帮忙分析解决
我在微信开发工具测试, wx.config 显示ok , wx.chooseWXPay.没有此SDK或暂不支持此SDK模拟 **问题出在, 我用手机测试 (ios,android) wx.config无反应,** erro和ready均不进入 wx.chooseWXPay也无法用, 我在https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=jsapisign 验证了签名是一毛一样的, 求教大佬, 我这代码是出了啥毛病 ``` <!doctype html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <html lang="zh-cn"> <head> <%@include file="/pc/inc/commoncontent.inc"%> <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script src="<%=contextPath%>/m/smartHotel/script/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> </script> <title>订单-支付</title> <span class="disb picNum padTB30"><i class="disib iconPic" onClick="openPic(this);" >3532rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr张</i></span> </head> <body> <script type="text/javascript"> var appId1,timeStamp1,nonceStr1,packageStr1,signType1,paySign1; $(document).ready(function () { $.ajax({ url : contextPath+ "/weixin/hotelorder/wxPay.action", type:"post", dataType:'json', //接受数据格式 async: false, data:{url:window.location.href.split('#')[0].replace(/\&/g,"%26")},//传参,建议使用json //1:手机号, 2:房间数.3单价4总价 5: 当前bedid 6 :入住人 姓名 7 发票8 入住日离开日 error:function(data){//请求失败时处理 // alert(data); window.location.href = '<%=contextPath%>/m/smartHotel/html/yysb.html'/*预订失败页*/ }, success:function(data) { if( data) { appId1 = data.pay.appId; timeStamp1 = data.pay.timeStamp; nonceStr1 = data.pay.nonceStr; packageStr1 = data.pay.package; signType1 = data.pay.signType; paySign1 = data.pay.paySign; } wx.config({ debug:false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId:data.pay.appId, // 必填,公众号的唯一标识 timestamp:data.config.timestamp, // 必填,生成签名的时间戳 nonceStr:data.config.noncestr, // 必填,生成签名的随机串 signature:data.config.configSign, // 必填,签名,见附录1 jsApiList:['chooseWXPay','closeWindow'] }); wx.error(function(res){ alert("error enter"); }); wx.ready(function(){ alert("ready enter"); pay(); }); //onBridgeReady(); // alert("success inter"); } }); }); function pay() { // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。 console.log(appId1 +" / "+ timeStamp1+" / " + nonceStr1+" / "+packageStr1 +" / "+ signType1+" / "+paySign1); wx.chooseWXPay({ timestamp:timeStamp1, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 nonceStr:nonceStr1, // 支付签名随机串,不长于 32 位 package:packageStr1, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) signType:signType1, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' paySign:paySign1, // 支付签名 success:function(res) { alert("8888888888888"); alert(res); alert(res.errMsg); console.log(res.errMsg); // 支付成功后的回调函数 if (res.errMsg == "chooseWXPay:ok") { //支付成功 alert('支付成功'); } else { alert(res.errMsg); } } }); } function onBridgeReady(){ alert("进入了onbridgeready"); WeixinJSBridge.log("889"); WeixinJSBridge.invoke( 'getBrandWCPayRequest', { "appId":appId1, //公众号名称,由商户传入 "timeStamp":timeStamp1, //时间戳,自1970年以来的秒数 "nonceStr":nonceStr1, //随机串 "package":packageStr1, "signType":"MD5", //微信签名方式: "paySign":paySign1 //微信签名 }, function(res){ WeixinJSBridge.log(res); alert("进入了success"); alert(res.errorMsg); // 使用以下方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回 ok,但并不保证它绝对可靠。 if(res.errMsg == "get_brand_wcpay_request:ok") { alert("支付成功"); // window.location.href = "${pageContext.request.contextPath}/wx/success?orderId=${orderId}"; }else if(res.errMsg == "get_brand_wcpay_request:fail"){ alert('支付失败'); }else if(res.errMsg == "get_brand_wcpay_request:cancel"){ alert('支付取消'); }else{ alert(res.errMsg); } } ); } function openPic() { pay(); //wx.closeWindow(); } //调用模拟 回调 // $.ajax({ // url : contextPath+ "/weixin/hotelorder/moniWXPay.action", // type:"post", // dataType:'json', //接受数据格式 // async: false, // data:{parm1:getQueryString2("orderId")},//传参,建议使用json // error:function(data){//请求失败时处理 // alert(data); // }, // success:function(data) // { // if(data.result =="success") // { // window.location.href = '<%=contextPath%>/m/smartHotel/html/yycg.jsp?orderId='+getQueryString2("orderId"); // } // // } // }); function getQueryString2(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if(r != null) return decodeURI(r[2]); return null; } </script> </body> </html> ```
小程序云函数调用失败?
完全新手小白。想要实现小程序中用户微信登录。使用的是小程序QuickStart中云函数的login函数。 login函数: ``` const cloud = require('wx-server-sdk') // 初始化 cloud cloud.init({ env: 'test-711f36' }) const db = cloud.database(); /** * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端 * * event 参数包含小程序端调用传入的 data * */ exports.main = (event, context) => { console.log(event) console.log(context) // 可执行其他自定义逻辑 // console.log 的内容可以在云开发云函数调用日志查看 // 获取 WX Context (微信调用上下文),包括 OPENID、APPID、及 UNIONID(需满足 UNIONID 获取条件) const wxContext = cloud.getWXContext() return { event, openid: wxContext.OPENID, appid: wxContext.APPID, unionid: wxContext.UNIONID, } } ``` app.js中对云函数的调用: ``` onLaunch: function () { if (!wx.cloud) { console.error('请使用 2.2.3 或以上的基础库以使用云能力') } else { wx.cloud.init({ env: 'test - 711f36', traceUser: true, }) } ``` app.json: ``` "cloud": true, ``` 在想要调用云函数的.js文件中调用云函数: ``` onGetOpenid: function () { // 调用云函数 wx.cloud.callFunction({ name: 'login', data: {}, success: res => { console.log('[云函数] [login] user openid: ', res.result.openid) app.globalData.openid = res.result.openid wx.navigateTo({ url: '../userConsole/userConsole', }) }, fail: err => { console.error('[云函数] [login] 调用失败', err) wx.navigateTo({ url: '../deployFunctions/deployFunctions', }) } }) }, ``` 编译报错如下图: ![图片说明](https://img-ask.csdn.net/upload/201905/19/1558260828_490873.png) 云函数已经部署好: ![图片说明](https://img-ask.csdn.net/upload/201905/19/1558261361_309128.png) 进入云开发控制台后发现了一个报错: ![图片说明](https://img-ask.csdn.net/upload/201905/19/1558261445_972352.png) 想请问大家这要怎么解决?
微信小程序调用企业付款时报错(nodejs搭建后台)
我用nodejs搭建的后台,在调用微信企业付款时报“xml解析错误”,求大神解决啊! ``` 请求参数: <xml> <mch_appid>xxxxxxxx</mch_appid> <desc>提现</desc> <mchid>xxxxxxxxxxxxx</mchid> <openid>xxxxxxxxxxxxxx</openid> <partner_trade_no>LCVRM74N1557636034118</partner_trade_no> <spbill_create_ip>127.0.0.1</spbill_create_ip> <amount>1</amount> <check_name>NO_CHECK</check_name> <re_user_name>xxx</re_user_name> <sign>C7C01FC16EE94CE2A416A4C939953834</sign> </xml> 请求:options = { url: 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers', method: "POST", json: true, headers: { "content-type": "application/json;charset=utf-8" }, body: formData, key: fs.readFileSync('../server/common/file/wxpay/apiclient_key.pem'), //将微信生成的证书放入 cert目录下 cert: fs.readFileSync('../server/common/file/wxpay/apiclient_cert.pem') }; 返回结果: return_code: [ 'SUCCESS' ], return_msg: [ 'XML解析错误' ], result_code: [ 'FAIL' ], err_code: [ 'XML_ERROR' ], err_code_des: [ 'XML解析错误' ] ``` 求大神解决啊!
运行Vue项目时,报错npm ERR! errno 1 npm ERR! Failed at the single@1.0.0 dev script.
运行Vue项目时,报错,不清楚是哪里出了问题 ``` Error: Cannot find module 'webpack-cli/bin/config-yargs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (E:\HBuilderProjects\Vue\single\node_modules\_webpack-dev-server@3.7.1@webpack-dev-server\bin\webpack-dev-server.js:60:1) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! single@1.0.0 dev: `webpack-dev-server --open --hot --port 8020` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the single@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\asus\AppData\Roaming\npm-cache\_logs\2019-06-15T16_43_01_654Z-debug.log ``` ``` ``` 这个是package.json文件 ``` { "name": "single", "version": "1.0.0", "description": "", "main": "main.js", "scripts": { "dev": "webpack-dev-server --open --hot --port 8020" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "vue": "^2.6.10" }, "devDependencies": { "babel-core": "^6.26.3", "babel-loader": "^8.0.6", "babel-preset-env": "^1.7.0", "css-loader": "^3.0.0", "file-loader": "^4.0.0", "vue-html-loader": "^1.2.4", "vue-loader": "^15.7.0", "vue-style-loader": "^4.1.2", "vue-template-compiler": "^2.6.10", "webpack": "^4.34.0", "webpack-dev-server": "^3.7.1" } } ```
Android 长按EditText时程序崩溃(华为4.4的手机),是什么原因?
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_menu_selectall_material.xml from drawable resource ID #0x7f020021 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at android.content.res.Resources.loadDrawable(Resources.java:2160) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.huawei.android.content.res.ResourcesEx.loadDrawable(ResourcesEx.java:636) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at android.content.res.Resources.getDrawable(Resources.java:747) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:105) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:182) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:178) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:168) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:446) 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1062) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:87) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:221) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:72) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.getMenuView(ActionMenuPresenter.java:159) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.widget.ActionBarContextView.initForMode(ActionBarContextView.java:247) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2447) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2387) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.view.View.startActionMode(View.java:4555) 04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.widget.Editor.setSelectionActionMode(Editor.java:4186) 04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.widget.Editor.startSelectionActionMode(Editor.java:1561)
微信小程序关于多张图片上传之后,路径却存不到数据库中的问题
# 第一部分 ``` var imageslist = []; //设置了一个空数组进行储存图片云端路径 var images = that.data.images; for (var i = 0; i < images.length; i++) { let randString = Math.floor(Math.random() * 1000000).toString() + '.png' wx.cloud.uploadFile({ cloudPath: randString, filePath: images[i], success: res => { //let imageslist = that.data.imageslist; imageslist.push(res.fileID) ; //将图片路径添加到数组中 }, fail: err => { wx.showToast({ title: '图片上传失败', }) } }) } that.setData({ imageslist }) console.log(imageslist);//打印 ``` ## 打印结果为 ``` [] 0: "cloud://mycheng-d9e08f.6d79-mycheng-d9e08f/794476.png" 1: "cloud://mycheng-d9e08f.6d79-mycheng-d9e08f/19686.png" length: 2 nv_length: (...) __proto__: Array(0) ``` ## _然后存到数据库中 ``` db.collection('topic').add({ data: { index: 0, content: that.data.content, des: that.data.des, style: "book", date: new Date().toLocaleString(), images: that.data.imageslist,//这个地方存到数据库 userInfo: that.data.userInfo, isLike: that.data.isLike, }, ``` ## 结果却是在数据库中显示images为空
POST 。。。net::ERR_SSL_PROTOCOL_ERROR
微信小程序,连接服务器,向服务器发送数据,后台是php文件 POST https://www.XXX/login.php net::ERR_SSL_PROTOCOL_ERROR
OkHttp无法访问http://baidu.com
提示出错 st W/System.err: java.net.UnknownHostException: Unable to resolve host "baidu.com": No address associated with hostname 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at java.net.InetAddress.lookupHostByName(InetAddress.java:479) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at java.net.InetAddress.getAllByNameImpl(InetAddress.java:259) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at java.net.InetAddress.getAllByName(InetAddress.java:221) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:278) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:216) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:392) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:342) 03-28 14:35:14.118 14410-14439/com.example.administrator.test W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:520)
求解!!!!!请问怎样调用在django自带的数据库中新建立的数据表?
下面是view.py 的一部分代码,我想把用户输入的数据存到“书籍信息表”,但是 不知道哪里出问题了,django自带了sqlite3数据库,要使用在sqlite3里新建立的表要不要先连接,求解!!! 数据表分别有:用户信息表、书籍信息表、管理员信息表 from django.shortcuts import render, redirect from .models import 用户信息表, 书籍信息表, 管理员信息表 from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.contrib import auth def sell(request): if request.method == ‘GET’: return render(request, ‘我要卖.html’) elif request.method == ‘POST’: 书名 = request.POST【‘书名’】 作者 = request.POST【‘作者’】 try: ISDN码 = request.POST【‘ISDN’】 出版社 = request.POST【‘出版社’】 卖家联系方式 = request.POST【‘电话’】 product = 书籍信息表() product.book_name = 书名 product.author = 作者 product.isdn码 = ISDN码 product.publisher = 出版社 product.Tel = 卖家联系方式 product.save() return redirect(‘主页’) except Exception as err: return render(redirect, ‘我要卖.html’, {‘错误’: ‘请填写完整信息!’})
【求教】使用pycharm编写python爬虫,连接不上本地MySQL服务器
#小白自学修炼中,在编写python爬虫时,需要连接上本地MySQL服务器,将爬取的内容存放。 求教问题描述>>> 问题: #pycharm编写的程序连接不上本地MySQL服务 ### 环境: * python3.6 * ide:pycharm * 本地mysql服务已开启。 mysql版本:5.7 ## 源代码: ``` # 导入开发包 from bs4 import BeautifulSoup as bs from urllib.request import urlopen import re import pymysql # 获得数据库的连接 connection = pymysql.connect( host='localhost', user='root', password='123456', db='baidu', charset='utf8mb4' ) try: # 获得会话指针 with connection.cursor() as cursor: # 创建sql语句 sql = "insert into urls ('urlname','urlhref') values (%s,%s)" # 向baiduurls表提交操作 cursor.execute(sql, ("1", "1")) # 提交操作 connection.commit() finally: connection.close() ``` ## ## 出现的问题 ``` Traceback (most recent call last): File "C:/Pycharm/pro_2020/百度百科爬虫/craw_url.py", line 12, in <module> db='baidu' raise exc pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (timed out)") ``` 无法连接本地mysql数据库,另外数据库我在第三方工具上创建了一个名为“baidu”的数据库;我在命令行下查询了,确实创建着有。只是在pycharm里连接不到本地MySQL。 ## 尝试过、并失败了的的方法 ``` 防火墙已关闭,依然连接失败; net start mysql MySQL服务器doc命令行尝试连接,依然连接失败; host = 127.0.0.1,依然连接失败; ``` 真心在线求各位老哥老姐教教弟弟,不胜感激!
解決 vue code ELIFECYCLE 的方法
![图片说明](https://img-ask.csdn.net/upload/201911/28/1574908016_151108.jpg) ![图片说明](https://img-ask.csdn.net/upload/201911/28/1574909752_15853.png) 環境 npm -v 6.12.0 node -v -->v8.16.1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! tabbar@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the tabbar@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. google 百度查找方法一(不ok) ``` rm -rf node_modules rm package-lock.json npm cache clear --force npm install ``` 方法二(還是不OK) ``` npm uninstall webpack-dev-server npm install webpack-dev-server@2.9.1 ``` vue版本和webpack-dev-server版本不匹配導致
微信小程序真机调试上传图片是会断开调试
## 问题描述 **我首先用手机拍照,然后用canvas打上水印,将保存后的图片链接保存在一个数组。打开真机调试,图片数组forEach循环,在循环中转成base64然后上传。发现有时候,能全部上传成功,有时候一个都不成功然后断开调试** ## 代码片段 ``` function postTask(){ if (uploaded === len) { param.mrUrl = imgPath.join(';') common.postRequest(url, param, ()=>{}, addsuccess, that.onFailed); } } let failImg = 0 imgList.forEach((e, i) => { if (i === 0) { wx.showLoading({ title: '正在上传', }) } // console.log(1) wx.getFileSystemManager().readFile({ filePath: e, encoding: 'base64', success(res) { // console.log(2) let stream = res.data // console.log(stream.length) let param2 = {} param2.stream = stream param2.fileName = e.slice(11) param2.type = 3 common.postRequest(postImgUrl, param2, () => {}, (res) => { // wx.hideLoading(); if (res.StatusCode === 0) { uploaded++ imgPath.push(res.Data) // console.log(imgPath) // 所有图片上传完成后,开始上传任务数据 postTask() } else { uploaded++ wx.showToast({ title: '图片上传失败', }) // 所有图片上传完成后,开始上传任务数据 postTask() console.log(res.Msg) } }, () => { uploaded++ // 所有图片上传完成后,开始上传任务数据 postTask() }); }, fail(err){ failImg++ console.log(failImg+'张图片上传失败') } }) }) ```
昨天晚上电脑更新了一下,今天打开vue文件,执行cnpm install后执行npm run serve报错,为什么?
![图片说明](https://img-ask.csdn.net/upload/201908/30/1567155401_358659.png) 这是源码 D:\xiaowa-master>cnpm install √ Installed 23 packages √ Linked 0 latest versions √ Run 0 scripts √ All packages installed (used 198ms(network 187ms), speed 29.85kB/s, json 1(5.58kB), tarball 0B) D:\xiaowa-master>npm run serve > hello-world@0.1.0 serve D:\xiaowa-master > vue-cli-service serve internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'semver' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (D:\xiaowa-master\node_modules\_@vue_cli-service@3.11.0@@vue\cli-service\bin\vue-cli-service.js:3:16) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hello-world@0.1.0 serve: `vue-cli-service serve` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hello-world@0.1.0 serve script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\1255109002\AppData\Roaming\npm-cache\_logs\2019-08-30T08_57_09_953Z-debug.log D:\xiaowa-master> 哪位大哥能帮帮忙
【小白提问】.net core 2.2 发布到IIS后 webapi 404错误
环境 .net core 2.2,ef core, 前台页面lay-ui 本机测试都正常,发布到IIS后,MVC 绑定数据都正常访问正常,Layui table ajax调用的都报404错误。 ![图片说明](https://img-ask.csdn.net/upload/201912/03/1575366379_942361.png) ![图片说明](https://img-ask.csdn.net/upload/201912/03/1575366361_646674.png) 接口代码: ``` [HttpPost] public IActionResult List() { _logger.LogInformation("==================={path}", HttpContext.Request.Path); Logger.Info(HttpContext.Request.Path); var result = new Object(); var success = new object(); var msg = new object(); var data = new object(); var code = 0; try { data = _context.ItemsLending.ToList(); Logger.Info(JsonConvert.SerializeObject(data));//此处调用日志记录函数记录日志 } catch (Exception e) { _logger.LogError("==================={path},{err}", HttpContext.Request.Path,e.Message); Logger.Info(e.Message);//此处调用日志记录函数记录日志 } result = (new { code, msg, data }); return Json(result); } ``` 尝试加了Log,发现完全没有调用这个接口,只有打开页面的log js ``` table.render({ elem: '#LendingList' , url: '/Lending/List/' , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增 , method: 'post' , cols: [[ { field: 'id', title: 'Id', sort: true, templet: '#detail' } , { field: 'staffId', title: 'Staff ID' } , { field: 'item', title: 'Item' } , { field: 'lendingDate', title: 'Lending date', sort: true } , { field: 'preReturnDate', title: 'Pre return date' } , { field: 'returnDate', title: 'Return date' } , { field: 'status', title: 'Status' } , { field: 'remarks', title: 'Remarks', width: '20%', minWidth: 100 } //minWidth:局部定义当前单元格的最小宽度,layui 2.2.1 新增 ]] }); ```
微信支付:asp post xml
msxml3.dll 错误 指定资源下载失败。 代码: function PostHTTPPage(url,data) dim Http set Http=server.createobject("MSXML2.ServerXMLHTTP") Http.open "Post",url,False Http.setRequestHeader"CONTENT-TYPE","application/x-www-form-urlencoded" Http.send(data) if Http.readystate<>4 then exit function PostHTTPPage=bytesToBSTR(Http.responseBody,"utf-8") set http=nothing if err.number<>0 then err.Clear end Function 有没有大神能给解决一下、可有偿
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
Android 9.0系统新特性,对刘海屏设备进行适配
其实Android 9.0系统已经是去年推出的“老”系统了,这个系统中新增了一个比较重要的特性,就是对刘海屏设备进行了支持。一直以来我也都有打算针对这个新特性好好地写一篇文章,但是为什么直到拖到了Android 10.0系统都发布了才开始写这篇文章呢?当然,一是因为我这段时间确实比较忙,今年几乎绝大部分的业余时间都放到写新书上了。但是最主要的原因并不是这个,而是因为刘海屏设备的适配存在一定的特殊性
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问

相似问题

2
Android java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in
1
移动端 接入微信扫码登录 一直给登录失败、一般错误
1
微信小程序,springboot怎么保持会话状态。谢谢解答
2
按照第一行代码上打酷欧天气提示我 Value Request of type java.lang.String cannot be converte
2
手机测试 wx.config 无反应,愿意发微信红包, 求大佬帮忙分析解决
1
微信小程序真机调试上传图片是会断开调试
3
console.log(res.data); 输出值为 undefinde
1
微信小程序关于多张图片上传之后,路径却存不到数据库中的问题
2
vue-element-admin 中npm install 急等!我的git环境变量也配置了 dos 输入git也没问题 真是玄学!
2
okhttp抛出, Response response = client.newCall(request).execute();报错,该怎么解决
2
npm i --global --product ion windows-build-tools 报错
1
微信小程序调用企业付款时报错(nodejs搭建后台)
2
eggjs获取原生的request,就和用express中的request一样
0
小程序云函数调用失败?
1
运行Vue项目时,报错npm ERR! errno 1 npm ERR! Failed at the single@1.0.0 dev script.
3
在微信内使用微信支付,支付成功后97%的人可以跳转到成功页,3%的人无法跳转
1
未报错,但无法把客户端数据写入数据库中
1
androidstudio为啥连不上mysql呀,老报如下错
1
昨天晚上电脑更新了一下,今天打开vue文件,执行cnpm install后执行npm run serve报错,为什么?