- 小程序在PC端打开时如何适配PC的宽度和高度?
大家好,我在小程序上适配PC的宽度和高度时在app.js中使用如下语句,却提示windowWidth和windowHeigth没有定义,麻烦问下我该如何设置呢?谢谢 wx.getSystemInfo({ success: function (res) { windowWidth = res.windowWidth; windowHeigth = res.windowHeight; } })
2020-02-07 - 加载 “tcbDescribeEnvResourceException” 失败:Error: Int
加载 “tcbDescribeEnvResourceException” 失败:Error: InternalError, An error has occurred. Retry your request, but if the problem persists, contact us. (2a164841-2270-426e-85be-73f96bce3975) 请问这是怎么回事啊,内部错误,谢谢
2020-01-15 - 开发时可以获取用户信息,但是发布后却获取不了,怎么回事呢?
大家好,我在开发小程序的时候用如下指令来获取登陆用户的个人信息,在开发测试时是可以获取的,但是小程序发布后点击用户头像却获取不了,麻烦问下是怎么回事呢?代码如下: // 获取用户信息 wx.getSetting({ success: res => { if (res.authSetting['scope.userInfo']) { // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 wx.getUserInfo({ success: res => { this.setData({ avatarUrl: res.userInfo.avatarUrl, userInfo: res.userInfo }) } }) } } }) }, onGetUserInfo: function (e) { if (!this.data.logged && e.detail.userInfo) { this.setData({ logged: true avatarUrl: e.detail.userInfo.avatarUrl, userInfo: e.detail.userInfo }) } }, 样子显示如下,点击白色圆圈仅弹出是否接受获取个人信息?点击同意后却获取不了,但是在测试开发环节是可以的,用了好几个微信号验证都是这种情况,还请各位大拿指导,谢谢 [图片] 下面为开发过程中的效果图 [图片]
2020-01-15 - 小程序发布升级版本后无法自动更新,麻烦问下问题在哪呢?
大家好,我编写的小程序发布升级以后的版本后无法进行自动更新,麻烦问下问题在哪呢?每次都让客户自己重新启动,客户体验实在太差了,请各位大佬帮忙判断下,有劳费心了 小程序基于云开发进行的,仅用到了数据库管理账号和密码 版本号从2.0.0升级到了2.1.0 在app.js中添加了如下代码,运行正常 onLaunch: function() { const updateManager = wx.getUpdateManager() updateManager.onCheckForUpdate(function(res) { // 请求完新版本信息的回调 console.log(res.hasUpdate) }) updateManager.onUpdateReady(function() { wx.showModal({ title: '更新提示' content: '新版本已经准备好,是否重启应用?' success: function(res) { if (res.confirm) { // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate() } } }) }) updateManager.onUpdateFailed(function() { // 新版本下载失败 }) },
2020-01-11 - doctype html编译出错,提示unexpected character D,这是怎么回事呀?
各位大佬,下图中这个问题咋解决呀,还请各位大佬帮忙看下,多谢了 [图片] 源码如下: <!DOCTYPE html> <html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>验证</title> <base id="baseURL" href="http://www.helloworld.test/"> <script> (function (doc, win) { //设置html的fontsize //console.log(doc.documentElement); var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', recalc = function () { var clientWidth = docEl.clientWidth; if (!clientWidth) return; var size; if (clientWidth > 450) { size = 100 * (clientWidth / 2000) + 'px'; } else { size = 100 * (clientWidth / 750) + 'px'; } //console.log(size); docEl.style.fontSize = size; }; if (!doc.addEventListener) return; win.addEventListener(resizeEvt, recalc, false); doc.addEventListener('DOMContentLoaded', recalc, true); })(document, window); </script> <link href="/Content/Site.css" rel="stylesheet"> <script src="/Scripts/common.js?v=3"></script> </head> <body oncontextmenu="return false" onselectstart="return false" oncopy="return false;"> <div style="text-align: center;font-size: .4rem;"> <form action="http://www.helloworld.test//Binding/PostBinding" method="post" style="font-size: .5rem;"> 代号 <input id="UserId" type="text" name="UserId"><br> <input type="submit" name="BtnSave" value="提交" style="width: 2rem; height: .7rem;margin-top: .2rem;"> </form> <div style="margin-top: .6rem;"><span>欢迎来到人类新世界</span></div> <img style="width: 80%;" src="/Content/image/weixin.jpg"><br> <a href="http://www.helloworld.test//test.docx">说明文档</a> </div> <div><span style="font-size: .4rem; display: block;">打开新世界,开启新时代</span></div> </body></html>
2019-11-24 - 创建不了Page
[图片] 在jds文件夹上右键单击,选择新建Page,在显示出的方框中写入jds,回车,没有任何信息生成,重复多次,无效
2019-11-21