123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <view class="wrap" @click="clickInfoList()">
- <swiper
- id="_swiper_up"
- :indicator-dots="indicatorDots"
- :autoplay="autoplay" :interval="interval" :duration="duration" vertical="true" circular="true">
- <block v-for="(item,index) in list" :key="index">
- <swiper-item >
- <view class="itme_text">
- <view>
- <image class='gb' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/new.png'></image>
- 最新价格:<{{item.goodsName}}>
- <text style="margin-right: 10px;margin-left: 10px;" :class="item.newPrice > item.openPrice ? 'text-red':'text-green'">{{item.newPrice}}</text>
- 元/手
- </view>
- </view>
- </swiper-item>
- </block>
- </swiper>
- </view>
-
- </template>
- <script>
- export default {
- name: 'swiper_up',
- data() {
- return {
- typeList: {
- left: 'icon-zuo',
- right: 'icon-you',
- up: 'icon-shang',
- down: 'icon-xia'
- },
- }
- },
- props: {
- indicatorDots: {
- type: Boolean,
- default: false
- },
- autoplay: {
- type: Boolean,
- default: true
- },
- interval: {
- type: String,
- default: '3000'
- },
- duration: {
- type: String,
- default: '1000'
- },
- list: {
- type: Array,
- default: []
- },
- },
- created(){
- console.log(this.list,this.autoplay)
- },
- onLoad(){
- console.log(this.list)
- },
- methods: {
- clickInfoList(){
- uni.navigateTo({
- url: `/pageB/info/info_list`
- })
- },
- eventClick() {
- this.$emit('eventClick');
- }
-
- },
- }
- </script>
- <style scoped>
- .wrap{
- height: 92rpx;
- margin-bottom: 20rpx;
- background: #fff;
- line-height: 92rpx;
- position: relative;
- width:100%;
- margin:0 auto;
- margin-top:12px;
- /* box-shadow: 2px 2px 4px rgba(0,0,0,0.07); */
- /* background:url('./bert-suggest/icons/bg@2x%20(1).png'); */
- background-size: cover;
- /* border-radius: 20rpx; */
- background: white;
- border-radius: 20rpx;
- }
- .wrap::before{
- /* content: "";
- position: absolute;
- background: #fff;
- display: block;
- width: 78rpx;
- height: 78rpx;
- left: -15px;
- z-index: 1;
- -webkit-border-radius: 30%;
- border-radius: 30%; */
- }
- .wrap::after{
- /* content: "";
- position: absolute;
- background: #fff;
- display: block;
- width: 78rpx;
- height: 78rpx;
- right: -15px;
- z-index: 1;
- -webkit-border-radius: 30%;
- border-radius: 30%; */
- }
- .gb{
- width:60rpx;
- height:40rpx;
- vertical-align: middle;
- margin:0 24rpx 0 33rpx;
-
- }
- .horn{
- width:14px;height:14px;
- vertical-align: middle;
- margin-right: 10px;
- }
- swiper {
- width: 100%;
- height: 68rpx;
- position: absolute;
- left: 0rpx;
- top: 0rpx;
- pointer-events: none;
- cursor: default;
- z-index:2;
- }
- .cuIcon-notification{
- margin-right:10rpx;
- }
- .itme_text {
- font-size: 26rpx;
- z-index: 999;
- color: #000000;
- }
- </style>
|