今天,是个重要的日子,因为,今天是美丽的星期五,是打工人无比期待的星期五,是万众瞩目,无比辉煌的星期五...同时,今天也是我立志要写文章的第二天,废话不罗嗦。开始:
bug:汇总:看一下今天的bug都是啥
1:按钮缺少下拉箭头
这个需求他没说明白 我也懒得没问 就用css before属性加上了
代码:
html:
<view class="pull button" @click="reset">全部</view>
css:
.button::before{
content: '';
position: absolute;
width: 0;
height: 0;
left: 66px;
top:64px;
border-top: 7px solid white;
border-bottom: 4px solid transparent;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
}
效果图:
2:用u-swiper轮播图片显示不全的问题:
这这这 以前没写过uniapp的小程序 轮播之前写的好多bug 唉 都是自己悟出来的,结果发现其实好简单...
html:
<view class="swiperstyle">
<u-swiper :list="imgListTwo" mode="number" img-mode="scaleToFill" height="450" indicator-pos="bottomRight"></u-swiper>
</view>
js:
getServeDetail(id) {
let _this = this
let detailDataArr = []
_this.imgListTwo = []
let params = {
partyMassesId: id
}
wx.request({
url: _this.$httpApi.install.cardInfo,
data: params,
method: 'GET',
success: function(res) {
if (res.data.code == 1) {
_this.detailData = res.data.result
if (_this.detailData.partyMassesTel == null) {
_this.detailData.partyMassesTel = "空"
}
//展示图片
res.data.result.picture.forEach((i) => {
_this.imgListTwo.push({
image: i
})
})
_this.detailData.location = JSON.parse(_this.detailData.location);
_this.longitude = _this.detailData.location.coordinates[0] //经度
_this.latitude = _this.detailData.location.coordinates[1] //纬度
_this.markers[0].longitude = _this.detailData.location.coordinates[0]
_this.markers[0].latitude = _this.detailData.location.coordinates[1]
console.log("sadas" + _this.markers.longitude)
let obj = {
longitude: _this.longitude,
latitude: _this.latitude,
name: _this.detailData.partyMassesName,
address: _this.detailData.partyMassesAddress
}
detailDataArr.push(obj);
_this.navigationList = detailDataArr
console.log("导航list", JSON.stringify(_this.navigationList))
}
}
})
},
其实没完全显示就是没设置高度height的原因 噢还加了个img-mode缩放属性 然后就好喽!
挑着写俩 别的也没啥了
周五喽 还有半个小时下班!!!!!
收工!