- wx.chooseImage()在真机环境下获取同一张图片两次的路径不一致
把相册设为图片背景的时候没问题,但是过了一段时候再去看,背景图就变成白屏了,不知道是为甚么,个人预估是因为在真机上的两次图片的路径不一致的原因 这是获取相册图片的代码 wx.chooseImage({ count: 1, success: (res) => { console.log(res.tempFilePaths[0]); wx.setStorage({ key: 'backgroundImage', data: res.tempFilePaths[0], }); wx.showToast({ title: '设置成功', }); }, }) 图片作为背景图 <image class='bgd' src="{{backgroundImage}}" mode='aspectFill' ></image> Onshow时候会设置图片的路径 var BgiUrl = wx.getStorageSync('backgroundImage'); this.setData({ backgroundImage: BgiUrl != '' ? BgiUrl : "https://lg-n8uihw4i-1253681281.cos.ap-shanghai.myqcloud.com/kcb-bg.jpg" }); .bgd { width: 100%; height: 100%; position: fixed; background-position: fixed; filter: brightness(85%); z-index: -1; /* overflow: hidden; */ }
2018-12-18 - 在部分机型样式错误
[图片] [图片] 在有些机型上会产生textarea不显示的错误 代码片段 <view class='form-title'>兴趣爱好</view> <view class="section-text"> <textarea placeholder-class="interest" auto-height="true" placeholder="你的兴趣爱好特长等" cursor-spacing='140' /> </view> <view class='form-title'>个人经历</view> <view class="section-text"> <textarea name="exp" auto-height="true" placeholder-class="experience" placeholder="过去与意向部门工作或学习的相关经历" cursor-spacing='140' /> </view> wxss .section-text { width: 100%;display: flex;flex-direction: row;align-items: center;font-size: 16px;background-color: #fff;border-bottom: 1px solid rgb(245, 245, 245); } .form-title, input, .picker { padding-left: 30rpx; } .form-title {height: 80rpx;font-size: 16px;display: flex;flex-direction: row;justify-content: flex-start;align-items: center;border-bottom: 1px solid rgb(245, 245, 245); } textarea {width: 95%;display: flex;flex-direction: row;justify-content: flex-start;align-items: flex-start;padding-left: 30rpx; }
2018-11-13