摘要:
1.wxml
2.wxss{{item.notice}}
.index-swiper {
position: relative;
margin: 20rpx 0 18rpx 0;
background-color: white;
width:702rpx;
height: 88rpx;
margin-left:24rpx;
border-radius: 8rpx;
}
.index-swiper::after {
content:" ";
position: absolute;
top:0;
bottom: 0;
left:0;
right:0;
}
.index-swiper-icon {
position: absolute;
top:22rpx;
left: 40rpx;
width: 48rpx;
height: 48rpx;
}
.index-swiper-content {
margin-left: 128rpx;
font-size: 26rpx;
height: 70rpx;
line-height: 70rpx;
}
.index-swiper-content-term{
margin-top:9rpx;
}
.index-swiper-content-term>text:first-of-type {
padding: 4rpx 12rpx;
margin-right: 18rpx;
color: #333;
}
3.js
import merchantModel from "../../models/merchant.js"
let app = getApp()
onShow() {
merchantModel.notice({ merid: app.globalData.merid }).then(res => {
if (res.result == 1 && res.data) {
this.setData({
notice: res.data,
});
}
});
},
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/99215.html
摘要:先放个效果如果能访问最好主要原理微信小程序现在实际上还是用的,里面搞动画效率最高的莫过于使用的了。由于微信小程序中无法获取到对应元素的宽度,这个时间只能写死或者根据的长度估算出一个值。 最近有个项目里面用到跑马灯,网上搜了下,虽然有人贴出来过一些实现,但是实际上都存在一些个问题。 哎,再造个轮子吧。 先放个效果:showImg(https://segmentfault.com/img/...
摘要:最近的项目中做了一个跑马灯的抽奖特效插件。这里主要是来写写自己的优化过程。所以写代码的时候一定要注意一些小细节哈。。。在以后,其返回的元素顺序等同于在中出现的先后顺序。尽管是一个数组。这时从加入执行队列到加入执行队列中间时间间隔是。 最近的项目中做了一个跑马灯的抽奖特效插件。上篇文章已经分享过html和css 的相关知识。这篇文章主要分享一些 JavaScript 相关的知识。这几天在...
阅读 2050·2023-04-25 18:27
阅读 1888·2021-10-19 11:44
阅读 772·2021-10-14 09:42
阅读 2361·2021-10-11 10:59
阅读 3004·2021-09-24 09:47
阅读 1940·2019-08-30 14:20
阅读 1329·2019-08-30 14:08
阅读 921·2019-08-29 15:15