cover-view 内wx:for中的内容在真机上无法显示。已填加代码片段
发布于 6 年前 作者 fang01 4689 次浏览 来自 问答

cover-view内wx:for中的内容在真机上不显示

wxml文件:

<view class=“custom” style=“padding-top:0px”>

<image src=’/pages/images/head2.png’></image>

<view class=‘tarbar’>

<view class=‘tarbar-1’>

<view class=‘goback’  bindtap=‘goback’ ><image src=’/pages/images/goback.png’ style=‘width:8px;height:14px’></image></view>

<view style=‘font-size:13px;margin-left:40rpx;text-align:center;’>{{onsiteName}}——{{offsiteName}}</view>

<view></view>

</view>

</view>

</view>

<!–<view class=“empty_custom” style=“padding-top:{{statusBarHeight}}px”></view>–>

<view class=‘container’ style=‘margin-top:105px;’>

<map id=“map”  longitude="{{cenLng}}" latitude="{{cenLat}}" scale=“13” controls="{{controls}}"       bindcontroltap=“controltap” markers="{{markers}}" bindmarkertap=“markertap” polyline="{{polyline}}" bindregionchange=“regionchange” show-location style=“width: 100%; height: {{mheight}}px;”>

</map>

<cover-view class=‘modal-dialog’>

<cover-view class=‘lineinfo’>

<cover-view class=‘lineinfo-im’>

<cover-view style=‘margin-top:10rpx;’><cover-image src=’/pages/images/line/lineon.png’ style=‘width:25px;height:28px;’></cover-image></cover-view>

<cover-view style=‘margin-top:10rpx;’>{{onsiteName}}</cover-view>

</cover-view>

<cover-view class=‘lineinfo-cen’>

<cover-view class=‘lineinfo-cen-on’ style=‘border-bottom: 1px solid #fff;’>

<cover-view>{{start_time}}</cover-view>

<cover-view>¥{{price}}</cover-view>

</cover-view>

<cover-view class=‘lineinfo-cen-on’>

<cover-view>{{mileage}}公里</cover-view>

<cover-view>{{}}站</cover-view>

<cover-view>{{take_time}}分钟</cover-view>

</cover-view>

</cover-view>

<cover-view class=‘lineinfo-im’>

<cover-view style=‘margin-top:10rpx;’><cover-image src=’/pages/images/line/lineoff.png’ style=‘width:25px;height:28px;’></cover-image></cover-view>

<cover-view style=‘margin-top:10rpx;’>{{offsiteName}}</cover-view>

</cover-view>

</cover-view>

<cover-view class=‘arrowdown’  hidden=’{{arrowdown}}’>

<cover-image src=’/pages/images/line/arrow-down.png’ bindtap=‘open_down’ style=‘width:16px;height:9px;margin-top:20rpx;’></cover-image>

</cover-view>

<cover-view class=‘line-site’ hidden=’{{!arrowdown}}’>

<cover-view wx:for="{{markers}}" wx:key=“id”>

<cover-view class=‘tuijian’ bindtap=‘switch’ data-id=’{{item.id}}’ >

<cover-view class=‘map-line-text’ style=‘width:95%;margin-top:20rpx;’>

<cover-view style=‘width:10%;’><cover-image src="{{item.iconPath}}" style=’{{item.style}}’ /></cover-view>

<cover-view style=‘width:70%;padding-top:5px;’>{{item.name}}</cover-view>

<cover-view style=‘width:20%;color:666;text-align:right;padding-top:5px;’>{{item.site_time}}</cover-view>

</cover-view>

</cover-view>

</cover-view>

<cover-view class=‘up-img’ hidden=’{{!arrowdown}}’>

<cover-image src="/pages/images/line/arrow-line-route.png" bindtap=‘kindToggle’ style=“width:16px;height:15px;z-index:99px”></cover-image>

</cover-view>

</cover-view>

</cover-view>

<cover-view class=‘nav1’  bindtap=’{{tickstu?“tpticket”:""}}’>

<cover-view class=‘nav’>

<cover-view class=‘bt’ style=‘margin-left:30rpx;’>日票</cover-view>

</cover-view>

</cover-view>

<cover-view class=‘tickdate’ hidden=’{{dateflag}}’>

<cover-view class=‘dateBox’ style=‘height:80rpx;padding-top:10rpx;’>

<cover-view class=‘boxwn’><cover-image src=’/pages/images/line/arrow-left.png’ bindtap=‘lastmonth’ style=‘width:9px;height:16px;’></cover-image> </cover-view>

<cover-view style=‘width:80%;’>{{ year }} 年 {{ month}}月</cover-view>

<cover-view class=‘boxwn’><cover-image src=’/pages/images/line/arrow-right.png’ bindtap=‘nextmonth’ style=‘width:9px;height:16px;’></cover-image></cover-view>

</cover-view>

<cover-view class=“week”>

<cover-view style=‘display: flex;flex-direction: row;font-size:14px,width:100%;’>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

<cover-view style=‘width: {{ sysW+1 }}px; height: 80rpx; line-height: {{ sysW }}px;text-align:center;’></cover-view>

</cover-view>

</cover-view>

<cover-view  style=‘width:100%;’ >

<cover-view class=‘box1’ style=‘width: {{ (sysW+1) * 7 }}px;’>

//wx:for块内的内容在真机上都不显示,模拟器上正常

<block wx:for=’{{ arr }}’>    

    <cover_view data-id=‘cch_{{item.id}}’ bindtap=’{{item.state==1&&!item.state1 ? “choose” : “”}}’ style=‘background:{{item.bkcolor}};width: {{ sysW }}px; height: {{ sysW }}px; border-right:1rpx solid #ccc;border-bottom:1px solid #ccc;margin-top:5rpx;font-size:26rpx;text-align:center’ >

        <cover_view style=‘display:flex;flex-direction:column;width: {{ sysW }}px; height: {{ sysW }}px;’ wx:if=’{{item.state==1}}’>

            <cover_view style=‘display:flex;flex-direction:row;height:40px;width:100%’><cover_view style=“width:40%;text-align:center;”>{{ item.day }}</cover_view><cover_view style=“width:60%;text-align:center;color:{{item.color}}”>{{item.name}}</cover_view></cover_view>

            <cover_view style=‘color:#fff;height:40px;’>¥{{item.curprice}}</cover_view>

            </cover_view>

        <cover_view style=“line-height: {{ sysW }}px;” wx:else>{{item.day}}</cover_view>

    

    </cover_view>

</block>

</cover-view>

</cover-view>

<cover-view class=‘buytick’>

<cover-view class=‘ticklan’>

<cover-view style=‘width:30%;font-size:14px;margin-top:15rpx;’>¥{{total_price}}.00</cover-view>

<cover-view style=‘width:20%;font-size:12px;margin-top:25rpx;’>共{{tickets}}张</cover-view>

<cover-view class=‘bul’>

<cover-view class=‘but’ bindtap=’{{etflag?“buyticket”:""}}’ style=‘font-size:15px;padding-top:15rpx;’>购票</cover-view>

</cover-view>

</cover-view>

</cover-view>

</cover-view>

</view>

在真机调试实数据监测是正常的。监测数据如下

真机显示截屏:

模拟器显示:

有哪位大侠帮我看看,谢谢了!

6 回复

模拟器也没有正常显示的哦

同样问题,楼主解决了吗

你好,需要点击日票按钮才能显示日历

我也是一样的问题楼主解决了吗

我有map上的问题可以加个好友吗楼主

代码太多了,不知道这个bug对你是否有影响

回到顶部