- 拉起键盘的时候,设置不上推页面还是会上推页面?
拉起键盘的时候,设置input属性 adjust-position = “false” 不上推页面还是会上推页面 <input cursor-spacing="10" focus="{{inputfocus}}" adjust-position="false" bindinput="bindKeyInput" bindfocus="bindFocus" bindblur="bindBlur" class="inputstatus" bindkeyboardheightchange="bindkeyhide"></input>
2019-11-20 - canvas生成的图片为什么是透明的?
[图片] 在其他的地方打开就是黑色的,我设置canvas的背景色是白色的,难道填充不了? [图片] [代码]<[代码][代码]canvas[代码] [代码]canvas-id[代码][代码]=[代码][代码]'share'[代码] [代码]style[代码][代码]=[代码][代码]"display:{{canvasbox}};width:750rpx;height:1334rpx;margin:auto;background-color:rgba(255,255,255,1);"[代码][代码]></[代码][代码]canvas[代码][代码]>[代码] [代码] [代码][代码] [代码][代码]// 将生成的canvas图片,转为真实图片[代码][代码] [代码][代码]wx.canvasToTempFilePath({[代码][代码] [代码][代码]x: 0,[代码][代码] [代码][代码]y: 0,[代码][代码] [代码][代码]width: 375,[代码][代码] [代码][代码]height: 667,[代码][代码] [代码][代码]destWidth: 375,[代码][代码] [代码][代码]destHeight: 667,[代码][代码] [代码][代码]canvasId: [代码][代码]'share'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]let shareImg = res.tempFilePath;[代码][代码] [代码][代码]console.log([代码][代码]"shareImg:"[代码][代码], shareImg)[代码][代码] [代码][代码]// 获取用户是否开启用户授权相册[代码][代码] [代码][代码]wx.getSetting({[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]// 如果没有则获取授权[代码][代码] [代码][代码]if[代码] [代码](!res.authSetting[[代码][代码]'scope.writePhotosAlbum'[代码][代码]]) {[代码][代码] [代码][代码]wx.authorize({[代码][代码] [代码][代码]scope: [代码][代码]'scope.writePhotosAlbum'[代码][代码],[代码][代码] [代码][代码]success() {[代码][代码] [代码][代码]wx.saveImageToPhotosAlbum({[代码][代码] [代码][代码]filePath: shareImg,[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]console.log([代码][代码]"保存失败:"[代码][代码], res)[代码][代码] [代码][代码]wx.hideLoading()[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'保存成功'[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]fail(res) {[代码][代码] [代码][代码]console.log([代码][代码]"保存失败:"[代码][代码], res)[代码][代码] [代码][代码]wx.hideLoading()[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'保存失败'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'none'[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail() {[代码][代码] [代码][代码]// 如果用户拒绝过或没有授权,则再次打开授权窗口[代码][代码] [代码][代码]//(ps:微信api又改了现在只能通过button才能打开授权设置,以前通过openSet就可打开,下面有打开授权的button弹窗代码)[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]openSet: [代码][代码]true[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]// 有则直接保存[代码][代码] [代码][代码]wx.saveImageToPhotosAlbum({[代码][代码] [代码][代码]filePath: res.tempFilePath,[代码][代码] [代码][代码]success() {[代码][代码] [代码][代码]console.log([代码][代码]"保存成功:"[代码][代码], res)[代码][代码] [代码][代码]wx.hideLoading()[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'保存成功'[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail(res) {[代码][代码] [代码][代码]console.log([代码][代码]"保存失败:"[代码][代码],res)[代码][代码] [代码][代码]wx.hideLoading()[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'保存失败'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'none'[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"生成图片失败!"[代码][代码], res)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码]
2019-11-18 - 可以按需引入wxss文件么?
可以在wxml或者js文件里面按需引入wxss文件么?
2019-11-08 - 小程序开发工具打不开项目文件
-小程序开发工具打不开项目文件 -上周都是正常的,现在连官方demo都打不开,打开项目文件的时候说代码是不是有死循环,but之前是正常的; [图片]
2018-10-29