草庐IT

another_page

全部标签

uni-app调用微信小程序接口报错Component “pages/login/login“ does not have a method “onChooseAvatar“

项目场景:在uni-app中尝试使用接口获得用户头像但是出错了问题描述vue中template配置:buttonclass="avatar-wrapper"open-type="chooseAvatar"bind:chooseavatar="onChooseAvatar"> imageclass="avatar"src:avatarUrl>/image> /button>methods配置:buttonclass="avatar-wrapper"open-type="chooseAvatar"bind:chooseavatar="onChooseAvatar"> imageclass="ava

解决错误Whitelabel Error Page This application has no explicit mapping for /error(Method Not Allowed405)

在提交表单数据的时候,由于控制器controller中mapper处理头映射错误,导致出现PUT405错误代码。修复的方法有:①修改URL映射链接和映射方式//将Postmapping修改为PutMapping@PostMapping("/xxxxx")→@PutMapping("/xxxxx")publicxxxxxways(@RequestBodyxxx){ @AutoWired privateXXXXXxxxxx; xxxxx}②如果URL没问题的话,可能是没有添加springboot的全局扫描,导致映射失败.进入SpringbootApplication代码中查看是否添加全局扫描@M

uniapp运行时报错routeDone with a webviewId 1 that is not the current page

在开发微信小程序时使用HBuilderXuniapp开发运行时新手可能会出现routeDonewithawebviewId1thatisnotthecurrentpage这个报错,解决这个问题我们可以在微信小程序app.json文件中添加配置或者如果是uniapp对应的应该是pages.json文件。"lazyCodeLoading":"requiredComponents",添加这句重新编译一下应该问题就解决了 

uni-app的分包下小程序报错app.json: [“tabBar“][1][“pagePath“]: “xxxx“ need in [“pages“]

uni-app踩坑系列出错过程解决方案关于分包的静态文件建议出错过程如过项目没有采用分包,解决方案点这里如果项目采用分包,pages.json的文件格式如下项目运行起来,h5是可以的,但微信开发者工具报错解决方案tabBar下的list需要在pages下面找需要把tarBar的引入的页面放在pages文件夹,其他分包的放在分包目录运行项目,一切正常也可以跳转。关于分包的静态文件建议

小程序阻止手机自带的滑动返回退出事件(uni-app,微信小程序,page-container)

1、使用page-container前先在pages.json配置(重点!)"usingConponents":{ "page-container":"/pages/detail/detail" },2、在页面中配置page-container:show="true":close-on-slideDown="false":overlay="false":duration="false" style="z-index:99;width:100%;overflow:auto;height:100vh"@touchstart.native="onTouchStart" @touchmove.nat

不同Page间的AbilitySlice导航

可以通过配置Intent的Action导航到目标AbilitySlice。Page间的导航可以使用startAbility()或startAbilityForResult()方法,获得返回结果的回调为onAbilityResult()。在Ability中调用setResult()可以设置返回结果。页面布局比较简单,就略过了。具体请看代码:@OverridepublicvoidonStart(Intentintent){super.onStart(intent);super.setUIContent(ResourceTable.Layout_ability_main);//通过ID找到xml中的

关于微信小程序警告“Do not have handler in component: pages/xxx/xxx. “的解决方法

📚文章目录📌关于警告📄简单翻译一下🎯出现原因📝解决方法💻测试代码📌关于警告Donothave handlerincomponent:pages/register/register. Pleasemakesurethat handlerhasbeendefinedinpages/register/register.📄简单翻译一下🎯出现原因使用model:value="{{xxx}}",对表单进行数据的双向绑定,绑定后,在表单输入信息是弹出警告。虽然这些警告,问题不大,但是在表单数据中,每输入一个字符都会弹出一次,我这里的应用场景是手机号码,那怎么说我每输入一个数字就弹出一个警告,这样有可能会覆盖

go - 未定义 : function (declared in another package)

我的项目组织是这样的:GOPATH来源cvs/用户/项目main.go工具utils.gomain.go看起来像这样:packagemainimport("fmt""cvs/user/project/utils")funcmain(){...utilsDoSomething()...}和utils.go:packageutilsimport("fmt")funcutilsDoSomething(){...}编译器告诉我:main.goimportedandnotused:"cvs/user/project/utils"main.goundefined:utilsDoSomething我

go - 未定义 : function (declared in another package)

我的项目组织是这样的:GOPATH来源cvs/用户/项目main.go工具utils.gomain.go看起来像这样:packagemainimport("fmt""cvs/user/project/utils")funcmain(){...utilsDoSomething()...}和utils.go:packageutilsimport("fmt")funcutilsDoSomething(){...}编译器告诉我:main.goimportedandnotused:"cvs/user/project/utils"main.goundefined:utilsDoSomething我