小程序
小游戏
企业微信
微信支付
扫描小程序码分享
微信升级后,微信小程序 cover-view上的文字和图片突然全部都不能显示了,这是为什么啊
6 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,问题已复现,我们会尽快进行修复。目前先改成wx:if控制
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
请提供下复现代码
//index.js
Page({
data: {
cost: 3,
loadingHidden: true,
timer: '0:00:00',
percent: '0%',
isUse: false,
startTime: '0:00:00',
scale: 18,
latitude: 0,
longitude: 0,
},
//回到自己的位置
onLoad: function (options) {
this.mapCtx = wx.createMapContext("ParkingMap")
this.movetoPosition();
wx.getSystemInfo({
success: (res) => {
this.setData({
controls: [{
id: 1,
iconPath: '/images/test.png',
position: {
left: 20,
top: res.windowHeight - 90,
width: 50,
height: 50
clickable: true
}]
})
}
bindcontroltap: function(e) {
switch (e.controlId) {
case 1:
loadingHidden: !this.data.loadingHidden,
isUse: !this.data.isUse
//定位函数
movetoPosition: function () {
this.mapCtx.moveToLocation();
<!--pages/index/index.wxml-->
<view class="mapContainer">
<map id="ParkingMap"
latitude="{{latitude}}"
longitude="{{longitude}}"
scale="{{scale}}"
controls="{{controls}}"
bindcontroltap = "bindcontroltap"
markers="{{markers}}"
bindmarkertap="bindmarkertap"
show-location>
<cover-view class='timerView' hidden='{{!isUse}}'>
<cover-view class='start'>
<cover-view class='caption'>起始时间:</cover-view>
<cover-view class='time'>{{startTime}}</cover-view>
</cover-view>
<cover-view class='end'>
<cover-view class='caption'>使用时长:</cover-view>
<cover-view class='time'>{{timer}}</cover-view>
<cover-view class='caption'>费用(元):</cover-view>
<cover-view class='time'>{{cost}}</cover-view>
<cover-view class='loadingCover' disable-scroll="true" hidden='{{loadingHidden}}'>
<cover-view class='imageView'>
<cover-image class='loadingImage' src='/images/loading.png' ></cover-image>
<cover-view class='loadingText'>{{percent}}</cover-view>
</map>
</view>
/**index.wxss**/
.mapContainer{
position: absolute;
width: 100%;
height: 100%;
#ParkingMap{
left: 0;
top: 0;
right: 0;
bottom: 0;
.timerView{
height: 15%;
width: 90%;
display: flex;
align-items: stretch;
justify-content: center;
flex-direction: row;
background: white;
margin:5%;
border: 1px solid #F0F0F0;
/* text-align: center */
.loadingCover{
/* position: absolute; */
align-items: center;
height: 80%;
background: transparent
.imageView{
position: relative;
width: 120px;
height: 150px;
background-color: #383838;
color: #F0F0F0;
text-align: center;
.loadingCover cover-image{
margin: 15%;
width: 70%;
height: 60%;
background-color: #383838
.loadingText{
border-color: #383838
点击地图上的控件,两个cover-view会显示,模拟器上测试没问题,真机测试时,cover-view上的图片和文字都显示不出来。 手机是iphone6s,微信版本6.5.22,升级前是可以正常显示的。
同出现问题!请官方尽快修复
好的,多谢
问题解决了吗?
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,问题已复现,我们会尽快进行修复。目前先改成wx:if控制
请提供下复现代码
//index.js
Page({
data: {
cost: 3,
loadingHidden: true,
timer: '0:00:00',
percent: '0%',
isUse: false,
startTime: '0:00:00',
scale: 18,
latitude: 0,
longitude: 0,
},
//回到自己的位置
onLoad: function (options) {
this.mapCtx = wx.createMapContext("ParkingMap")
this.movetoPosition();
wx.getSystemInfo({
success: (res) => {
this.setData({
controls: [{
id: 1,
iconPath: '/images/test.png',
position: {
left: 20,
top: res.windowHeight - 90,
width: 50,
height: 50
},
clickable: true
}]
})
}
})
},
bindcontroltap: function(e) {
switch (e.controlId) {
case 1:
this.setData({
loadingHidden: !this.data.loadingHidden,
isUse: !this.data.isUse
})
}
},
//定位函数
movetoPosition: function () {
this.mapCtx.moveToLocation();
},
})
<!--pages/index/index.wxml-->
<view class="mapContainer">
<map id="ParkingMap"
latitude="{{latitude}}"
longitude="{{longitude}}"
scale="{{scale}}"
controls="{{controls}}"
bindcontroltap = "bindcontroltap"
markers="{{markers}}"
bindmarkertap="bindmarkertap"
show-location>
<cover-view class='timerView' hidden='{{!isUse}}'>
<cover-view class='start'>
<cover-view class='caption'>起始时间:</cover-view>
<cover-view class='time'>{{startTime}}</cover-view>
</cover-view>
<cover-view class='end'>
<cover-view class='caption'>使用时长:</cover-view>
<cover-view class='time'>{{timer}}</cover-view>
</cover-view>
<cover-view class='end'>
<cover-view class='caption'>费用(元):</cover-view>
<cover-view class='time'>{{cost}}</cover-view>
</cover-view>
</cover-view>
<cover-view class='loadingCover' disable-scroll="true" hidden='{{loadingHidden}}'>
<cover-view class='imageView'>
<cover-image class='loadingImage' src='/images/loading.png' ></cover-image>
<cover-view class='loadingText'>{{percent}}</cover-view>
</cover-view>
</cover-view>
</map>
</view>
/**index.wxss**/
.mapContainer{
position: absolute;
width: 100%;
height: 100%;
}
#ParkingMap{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
.timerView{
position: absolute;
height: 15%;
width: 90%;
display: flex;
align-items: stretch;
justify-content: center;
flex-direction: row;
background: white;
margin:5%;
border: 1px solid #F0F0F0;
/* text-align: center */
}
.loadingCover{
/* position: absolute; */
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 80%;
background: transparent
}
.imageView{
position: relative;
width: 120px;
height: 150px;
background-color: #383838;
color: #F0F0F0;
text-align: center;
}
.loadingCover cover-image{
position: relative;
margin: 15%;
width: 70%;
height: 60%;
align-items: center;
background-color: #383838
}
.loadingText{
color: #F0F0F0;
background-color: #383838;
border-color: #383838
}
点击地图上的控件,两个cover-view会显示,模拟器上测试没问题,真机测试时,cover-view上的图片和文字都显示不出来。 手机是iphone6s,微信版本6.5.22,升级前是可以正常显示的。
同出现问题!请官方尽快修复
好的,多谢
问题解决了吗?