小程序
小游戏
企业微信
微信支付
扫描小程序码分享
1:用网络图片,使用image组件,https路径,https域名已添加
2:编辑器上均可以显示,真机Android上均可以正常显示,ios不能显示
3:改用base64,使用background-image
4:编辑器上均可以显示,真机Android上均可以正常显示,ios不能显示
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
网络图片 给个地址呢?
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
可以显示呀
js data
listImg:["20190726101809/Auboh022g1FzIiKa.jpg", "20190726101809/ExzzadvN1wpYnwJ3.jpg", "20190726101809/oPvyGhIwPRYwFP0P.jpg", "20190726101809/taeiUav9v3ahxDVa.jpg", "20190726101809/Tc9WoewH9ynO18FV.jpg", "20190726101809/vX85uTfMzsg2e5we.jpg"],
wxml
<scroll-view scroll-x="true">
<view class="uploadWrap" scroll-x="true">
<view class="upload_Item" wx:for="{{listImg}}" wx:for-index="index" wx:key="index">
图{{index+1}}
<image class='upload_Item_img' src="https://jtvaj.iask.in/image/{{listImg[index]}}"></image>
<!-- <image class='upload_Item_img' src="http://118.26.65.45:8081/image/{{listImg[index]}}"></image> -->
<!-- <view style='width: 2000rpx; height: 100%; background-size: 100% 100%; background-repeat: no-repeat; background-image: url({{listImg[index]}});'> </view> -->
</view>
</scroll-view>
wxss
/* page{height:100%} */
.service-list{
padding: 0 20rpx;
}
.service-item{
display: flex;
padding: 20rpx 0;
border-bottom: 1rpx solid #e8e8e8;
.service-img{
width: 220rpx;
height: 156rpx;
.service-item image{
.service-text{
flex: 1;
margin-left: 20rpx;
width: 100%;
.service-text .service-tite{
color: #333;
font-size: 34rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.service-tags{
margin: 6rpx 0;
.service-tags text{
padding: 6rpx 6rpx;
border: 1rpx solid #f7982a;
line-height: 1;
color: #f7982a;
font-size: 26rpx;
border-radius: 4rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
.service-tag{
float: left;
padding: 6rpx 8rpx;
border: 2rpx solid black;
color: red;
font-size: 28rpx;
margin-right: 5rpx;
.service-city{
color: #666;
.search-extra-btn{
/* width: 20%; */
background-color: #f7982a;
/* .search-flex{
padding: 20rpx;
border-bottom: 1rpx solid #ddd;
position: absolute;
z-index: 13;
background: #f9f9f9;
margin-top: 0;
transition: all 0.3s;
height: 70rpx
} */
.container-body{
overflow-y: auto;
overflow-x: hidden;
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
width: 6px;
height: 6px;
background-color: #ffffff;
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: yellow;
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,.3);
background-color: #ff5500;
.top{
width: 50px;
height: 50px;
position: fixed;
right: 10px;
bottom: 10px;
z-index: 1;
/* background-color: yellow; */
text-align: center;
line-height: 50px;
.uploadWrap{position: fixed;height:100%; width:100%; display: flex; display: -webkit-box; flex-direction: column;flex:1;overflow-y: hidden;overflow-x: auto;}
.upload_Item{ width: 2000rpx; height: 100%; flex: 1;}
.upload_Item_img{ width: 2000rpx; height: 100%;}
您看看这样的呢 是布局的问题吗
麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
网络图片 给个地址呢?
可以显示呀
js data
listImg:["20190726101809/Auboh022g1FzIiKa.jpg", "20190726101809/ExzzadvN1wpYnwJ3.jpg", "20190726101809/oPvyGhIwPRYwFP0P.jpg", "20190726101809/taeiUav9v3ahxDVa.jpg", "20190726101809/Tc9WoewH9ynO18FV.jpg", "20190726101809/vX85uTfMzsg2e5we.jpg"],
wxml
<scroll-view scroll-x="true">
<view class="uploadWrap" scroll-x="true">
<view class="upload_Item" wx:for="{{listImg}}" wx:for-index="index" wx:key="index">
图{{index+1}}
<image class='upload_Item_img' src="https://jtvaj.iask.in/image/{{listImg[index]}}"></image>
<!-- <image class='upload_Item_img' src="http://118.26.65.45:8081/image/{{listImg[index]}}"></image> -->
<!-- <view style='width: 2000rpx; height: 100%; background-size: 100% 100%; background-repeat: no-repeat; background-image: url({{listImg[index]}});'> </view> -->
</view>
</view>
</scroll-view>
wxss
/* page{height:100%} */
.service-list{
padding: 0 20rpx;
}
.service-item{
display: flex;
padding: 20rpx 0;
border-bottom: 1rpx solid #e8e8e8;
}
.service-img{
width: 220rpx;
height: 156rpx;
}
.service-item image{
width: 220rpx;
height: 156rpx;
}
.service-text{
flex: 1;
margin-left: 20rpx;
width: 100%;
}
.service-text .service-tite{
color: #333;
width: 100%;
font-size: 34rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.service-tags{
margin: 6rpx 0;
}
.service-tags text{
padding: 6rpx 6rpx;
border: 1rpx solid #f7982a;
line-height: 1;
color: #f7982a;
font-size: 26rpx;
border-radius: 4rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
white-space: nowrap;
}
.service-tag{
float: left;
padding: 6rpx 8rpx;
border: 2rpx solid black;
line-height: 1;
color: red;
font-size: 28rpx;
border-radius: 4rpx;
margin-right: 5rpx;
margin-bottom: 10rpx;
white-space: nowrap;
}
.service-city{
color: #666;
}
.search-extra-btn{
white-space: nowrap;
/* width: 20%; */
background-color: #f7982a;
}
/* .search-flex{
display: flex;
padding: 20rpx;
border-bottom: 1rpx solid #ddd;
position: absolute;
z-index: 13;
background: #f9f9f9;
margin-top: 0;
transition: all 0.3s;
width: 100%;
height: 70rpx
} */
.container-body{
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
width: 6px;
height: 6px;
background-color: #ffffff;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: yellow;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,.3);
background-color: #ff5500;
}
.top{
width: 50px;
height: 50px;
position: fixed;
right: 10px;
bottom: 10px;
z-index: 1;
/* background-color: yellow; */
color: red;
text-align: center;
line-height: 50px;
}
.uploadWrap{position: fixed;height:100%; width:100%; display: flex; display: -webkit-box; flex-direction: column;flex:1;overflow-y: hidden;overflow-x: auto;}
.upload_Item{ width: 2000rpx; height: 100%; flex: 1;}
.upload_Item_img{ width: 2000rpx; height: 100%;}
您看看这样的呢 是布局的问题吗
麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)