Commit efa13a31 authored by 王建威's avatar 王建威

bug fix

parent aa51d0aa
......@@ -13,13 +13,6 @@
}
</script>
<style>
/*每个页面公共css */
.unlogin_price{
font-size: 26rpx;
color: #999999;
height: 44rpx;
line-height: 44rpx;
text-align: left;
}
<style>
@import './static/iconfont.css';
</style>
<template>
<view class="uni-swiper__warp">
<slot />
<view v-if="mode === 'default'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='default'>
<view v-for="(item,index) in info" :style="{
'width': (index === current? dots.width*2:dots.width ) + 'px','height':dots.width/2 +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border-radius':'0px'}"
:key="index" class="uni-swiper__dots-item uni-swiper__dots-bar" />
</view>
<view v-if="mode === 'dot'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='dot'>
<view v-for="(item,index) in info" :style="{
'width': dots.width + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item" />
</view>
<view v-if="mode === 'round'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='round'>
<view v-for="(item,index) in info" :class="[index === current&&'uni-swiper__dots-long']" :style="{
'width':(index === current? dots.width*3:dots.width ) + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item " />
</view>
<view v-if="mode === 'nav'" key='nav' :style="{'background-color':dotsStyles.backgroundColor,'bottom':'0'}" class="uni-swiper__dots-box uni-swiper__dots-nav">
<text :style="{'color':dotsStyles.color}" class="uni-swiper__dots-nav-item">{{ (current+1)+"/"+info.length +' ' +info[current][field] }}</text>
</view>
<view v-if="mode === 'indexes'" key='indexes' :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box">
<view v-for="(item,index) in info" :style="{
'width':dots.width + 'px','height':dots.height +'px' ,'color':index === current?dots.selectedColor:dots.color,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item uni-swiper__dots-indexes"><text class="uni-swiper__dots-indexes-text">{{ index+1 }}</text></view>
<slot />
<view v-if="showDots">
<view v-if="mode === 'default'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='default'>
<view v-for="(item,index) in info" :style="{
'width': (index === current? dots.width*2:dots.width ) + 'px','height':dots.width/2 +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border-radius':'0px'}"
:key="index" class="uni-swiper__dots-item uni-swiper__dots-bar" />
</view>
<view v-if="mode === 'dot'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='dot'>
<view v-for="(item,index) in info" :style="{
'width': dots.width + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item" />
</view>
<view v-if="mode === 'round'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='round'>
<view v-for="(item,index) in info" :class="[index === current&&'uni-swiper__dots-long']" :style="{
'width':(index === current? dots.width*3:dots.width ) + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item " />
</view>
<view v-if="mode === 'nav'" key='nav' :style="{'background-color':dotsStyles.backgroundColor,'bottom':'0'}" class="uni-swiper__dots-box uni-swiper__dots-nav">
<text :style="{'color':dotsStyles.color}" class="uni-swiper__dots-nav-item">{{ (current+1)+"/"+info.length +' ' +info[current][field] }}</text>
</view>
<view v-if="mode === 'indexes'" key='indexes' :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box">
<view v-for="(item,index) in info" :style="{
'width':dots.width + 'px','height':dots.height +'px' ,'color':index === current?dots.selectedColor:dots.color,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}"
:key="index" class="uni-swiper__dots-item uni-swiper__dots-indexes"><text class="uni-swiper__dots-indexes-text">{{ index+1 }}</text></view>
</view>
</view>
</view>
</template>
......@@ -56,6 +58,10 @@
field: {
type: String,
default: ''
},
showDots: {
type: Boolean,
default: true
}
},
data() {
......
......@@ -2,7 +2,7 @@
"name": "shop_mobile_uni",
"appid": "__UNI__F904656",
"description": "",
"versionName": "1.0.1",
"versionName": "1.0.2",
"versionCode": "100",
"transformPx": false,
"app-plus": {
......@@ -51,7 +51,7 @@
"mode": "history",
"base": "/uni"
},
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.1/",
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.2/",
"optimization": {
"treeShaking": {
"enable": true
......
<template>
<view class="customer_content" :class="style_setting.padding_type === 1 ? 'need_padding' : ''" :style="[{'border-radius': style_setting.border_radius*2+'rpx','height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : {'background-color': style_setting.bg_color}]" @click="style_setting.link ? $jump(style_setting.link) : null">
<view class="customer_content" :class="style_setting.padding_type === 1 ? 'need_padding' : ''" :style="[{'border-radius': style_setting.border_radius*2+'rpx','height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]" @click="style_setting.link ? $jump(style_setting.link) : null">
</view>
</template>
......@@ -23,9 +23,10 @@
.customer_content {
background-repeat: no-repeat;
background-size: 100% 100%;
margin-bottom: 20rpx;
}
.need_padding {
width: 93.6%;
width: 702rpx;
margin: 0 auto;
}
</style>
<template>
<view>
<view v-if="style_setting.rank === 1" class="rank rank1" :style="[style_setting.bg_show ? {'background-image':style_setting.bg_url} : {'background-color': style_setting.bg_color},{'border-bottom-left-radius':style_setting.radius_bottom_left*2+'rpx', 'border-bottom-right-radius':style_setting.radius_bottom_right*2+'rpx', 'border-top-left-radius':style_setting.radius_top_left*2+'rpx', 'border-top-right-radius':style_setting.radius_top_right*2+'rpx'}]">
<view v-if="style_setting.rank === 1" class="rank rank1" :style="[style_setting.bg_show ? {'background-image':style_setting.bg_url} : {'background-color': style_setting.bg_color},{'border-bottom-left-radius':style_setting.radius_bottom_left*2+'rpx', 'border-bottom-right-radius':style_setting.radius_bottom_right*2+'rpx', 'border-top-left-radius':style_setting.radius_top_left*2+'rpx', 'border-top-right-radius':style_setting.radius_top_right*2+'rpx'}, style_setting.bg_style === 1 ? {'padding':'0 24rpx','box-sizing':'border-box'}: null]">
<view class="menuItem" v-for="(item, key) in menuArray" :key="key" :style="{'width': width}" @click="$jump(item.img_href)">
<image :src="item.img_url" class="icon_img"></image>
<text v-if="style_setting.font_show" class="title" :style="{'color': style_setting.font_color}">{{item.title}}</text>
</view>
</view>
<swiper v-else indicator-dots="true" :style="{'height': style_setting.rank*200+10+'rpx'}">
<swiper v-else indicator-dots="true" :style="[{'height': style_setting.rank*200+10+'rpx'}, style_setting.bg_style === 1 ? {'padding':'0 24rpx','box-sizing':'border-box'}: null]">
<swiper-item v-for="(item, key) in menuArray" :key="key" class="rank rank1">
<view class="menuItem" v-for="(val, index) in item" :key="index" :style="{'width': width}" @click="$jump(item.img_href)">
<image :src="val.img_url" class="icon_img"></image>
......
<template>
<view class="goods_content">
<view v-if="style_setting.arrange == 1" class="goods_box" :style="{'background-color': style_setting.bg_color}">
<view class="goods_content" v-if="dataList.length">
<view v-if="style_setting.arrange == 1" class="goods_box" :style="[{'background-color': style_setting.bg_color}, style_setting.listType === 3 ? {'padding': '24rpx 0'} : null]">
<view v-for="(item, key) in dataList" :key="key" class="goods_item" :style="width ? {'width':width} : ''">
<view :class="style_setting.listType === 2 ? 'image_box2' : 'image_box'">
<image v-if="style_setting.sign_show" class="logo" :style="{'width': style_setting.sign_size*2+'rpx','height': style_setting.sign_size*2+'rpx'}" :src="style_setting.sign_url"></image>
<image class="goods_img" :src="item.default_image || $noGoodsImg" @click="$jumpGoodDetail(item.goods_id)"></image>
</view>
<text class="goods_name" v-if="style_setting.title_show">{{item.goods_name}}</text>
<text class="goods_sub_name" v-if="style_setting.sub_title_show">{{item.goods_subname || ' '}}</text>
<view class="goods_price" v-if="isLogin">
<text class="goods_name1" v-if="style_setting.title_show">{{item.goods_name}}</text>
<text class="goods_sub_name1" v-if="style_setting.sub_title_show">{{item.goods_subname || ' '}}</text>
<view class="goods_price1" v-if="isLogin">
<text v-if="style_setting.price_show">{{item.price}}</text>
<i v-if="style_setting.cart_show" @click="$addCart(item.spec_id,1,isLogin)"></i>
<i class="eosfont icon_cart" v-if="style_setting.cart_show" @click="$addCart(item.spec_id,1,isLogin)">&#xe7e6;</i>
</view>
<view v-else class="unshow_price">登录显示价格</view>
<view v-else class="unshow_price1">登录显示价格</view>
</view>
<view v-if="spaceArray.length" v-for="(item, key) in spaceArray" :key="key+65535" :style="width ? {'width':width} : ''"></view>
</view>
......@@ -28,7 +28,7 @@
<text class="goods_sub_name" v-if="style_setting.sub_title_show">{{item.goods_subname || ' '}}</text>
<view class="goods_price" v-if="isLogin">
<text v-if="style_setting.price_show">{{item.price}}</text>
<i v-if="style_setting.cart_show" @click="$addCart(item.spec_id,1,isLogin)"></i>
<i class="eosfont icon_cart" v-if="style_setting.cart_show" @click="$addCart(item.spec_id,1,isLogin)">&#xe7e6;</i>
</view>
<view v-else class="unshow_price">登录显示价格</view>
</view>
......@@ -66,18 +66,23 @@
}
},
mounted() {
const { listType, arrange, goods_data_type, width } = this.style_setting;
const { goods_list, cate_goods_list } =this.wrapper_props;
const { listType, arrange, goods_data_type, width, additional_goods_show, goods_num } = this.style_setting;
const { goods_list, cate_goods_list, buy_goods_list } =this.wrapper_props;
if(listType == 2) {
this.width = '320rpx';
} else if (listType == 3) {
this.width = '230rpx';
} else {
this.width = width * 2 + 'rpx';
}
let list = [];
if(goods_data_type === 3) {
list = goods_list;
} else if (goods_data_type === 1) {
list = additional_goods_show ? cate_goods_list.concat(goods_list).slice(0,goods_num) : cate_goods_list
} else {
list = cate_goods_list.concat(goods_list)
let bgl = buy_goods_list || [];
list = additional_goods_show ? bgl.concat(goods_list).slice(0,goods_num) : bgl
}
const space = listType - list.length % listType;
if(space !== listType) {
......@@ -104,6 +109,7 @@
margin: 0 auto;
box-sizing: border-box;
background: #fff;
padding: 0 24rpx;
}
.goods_content, .swiper_content {
border-radius: 0 0 16rpx 16rpx;
......@@ -128,6 +134,11 @@
width: 90%;
text-align: left;
}
.unshow_price1 {
font-size: 20rpx;
width: 160rpx;
text-align: left;
}
.needAfter::after {
// content: '';
flex: auto;
......@@ -152,7 +163,11 @@
width:320rpx;
height: 320rpx;
}
.goods_name {
.goods_name1, .goods_sub_name1, .goods_price1 {
width: 160rpx !important;
margin: 0 auto;
}
.goods_name, .goods_name1 {
font-size: 22rpx;
color: #212121;
font-weight: 500;
......@@ -165,7 +180,7 @@
margin-bottom: 6rpx;
width: 90%;
}
.goods_sub_name {
.goods_sub_name, .goods_sub_name1 {
font-size: 22rpx;
color: #6e6e6e;
display: block;
......@@ -174,7 +189,7 @@
white-space: nowrap;
width: 90%;
}
.goods_price {
.goods_price, .goods_price1 {
width: 90%;
position: relative;
top: -4rpx;
......@@ -186,12 +201,15 @@
font-size: 24rpx;
color: #c3a070;
}
i {
display: inline-block;
width: 40rpx;
height: 40rpx;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAAAAACN7WTCAAABfElEQVRIx2P4TyZgGNU4qnFUIxEafx87+eYvORqvVFRUbiTLxstTSktW/yHHj7/2FRa9ICtw/kzM2wa2/MTmzZs2gTAEbL3yi0Co7sye/A9IfcpGBVlZU/7i1/g4o/gryObzEJtgdm4uyliDX+PXgpQn2Ly0LaUNv8Z/PYl7sGlcnTiRQMpZETsXm8aJccsJaDwTXfULU9/3ouiDBDS+j4z5jKnxU3T4IwIaf+SFXMXUeCsk+jOh3NEfuBpT4+bAwl+ENK7x68bUOMOvl2B+vOmd8h1d7F+F9xKCGj/5e75DF/sc6X6MoMbfOS7oiv6/dnF5SbjomODYhV4O7HIM+ExY4z5b+1lr1gPBurVr16xZs3rVipnetpV/CWv8XmiFAbzuElPKfd4wpb8PCPr7+yeAwMRJK14Mt5L822ZQmJ6FhOOHTSDOub/EaFwVCwYfwJxFYHbcR2I03stJTk5OgqaC6xkgTjdRNv7//R0I/sEKaWTOaI08qnHoaQQAAyi97TBEkioAAAAASUVORK5CYII=) no-repeat;
background-size: 100% 100%;
.icon_cart {
font-size: 30rpx;
}
// i {
// display: inline-block;
// width: 40rpx;
// height: 40rpx;
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAAAAACN7WTCAAABfElEQVRIx2P4TyZgGNU4qnFUIxEafx87+eYvORqvVFRUbiTLxstTSktW/yHHj7/2FRa9ICtw/kzM2wa2/MTmzZs2gTAEbL3yi0Co7sye/A9IfcpGBVlZU/7i1/g4o/gryObzEJtgdm4uyliDX+PXgpQn2Ly0LaUNv8Z/PYl7sGlcnTiRQMpZETsXm8aJccsJaDwTXfULU9/3ouiDBDS+j4z5jKnxU3T4IwIaf+SFXMXUeCsk+jOh3NEfuBpT4+bAwl+ENK7x68bUOMOvl2B+vOmd8h1d7F+F9xKCGj/5e75DF/sc6X6MoMbfOS7oiv6/dnF5SbjomODYhV4O7HIM+ExY4z5b+1lr1gPBurVr16xZs3rVipnetpV/CWv8XmiFAbzuElPKfd4wpb8PCPr7+yeAwMRJK14Mt5L822ZQmJ6FhOOHTSDOub/EaFwVCwYfwJxFYHbcR2I03stJTk5OgqaC6xkgTjdRNv7//R0I/sEKaWTOaI08qnHoaQQAAyi97TBEkioAAAAASUVORK5CYII=) no-repeat;
// background-size: 100% 100%;
// }
}
</style>
......@@ -27,7 +27,7 @@
<!-- <text class="hot_price">{{item.price}}</text> -->
<text class="hot_pro_price" v-else>登录显示价格</text>
</view>
<i class="hot_cart_icon" v-if="style_setting.cart_show" @click="$addCart(item.spec_id, 1,isLogin)"></i>
<i class="eosfont hot_cart_icon" v-if="style_setting.cart_show" @click="$addCart(item.spec_id, 1,isLogin)">&#xe7e6;</i>
</view>
</view>
</view>
......@@ -71,8 +71,9 @@
visibility: hidden;
}
.hot_main_content {
width: 93.6%;
width: 702rpx;
margin: 0 auto;
margin-bottom: 20rpx;
}
.hot_head_left {
display: inline-block;
......@@ -205,14 +206,10 @@
text-decoration: line-through;
}
.hot_cart_icon {
display: inline-block;
width: 44rpx;
height: 44rpx;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAAAAACN7WTCAAABfElEQVRIx2P4TyZgGNU4qnFUIxEafx87+eYvORqvVFRUbiTLxstTSktW/yHHj7/2FRa9ICtw/kzM2wa2/MTmzZs2gTAEbL3yi0Co7sye/A9IfcpGBVlZU/7i1/g4o/gryObzEJtgdm4uyliDX+PXgpQn2Ly0LaUNv8Z/PYl7sGlcnTiRQMpZETsXm8aJccsJaDwTXfULU9/3ouiDBDS+j4z5jKnxU3T4IwIaf+SFXMXUeCsk+jOh3NEfuBpT4+bAwl+ENK7x68bUOMOvl2B+vOmd8h1d7F+F9xKCGj/5e75DF/sc6X6MoMbfOS7oiv6/dnF5SbjomODYhV4O7HIM+ExY4z5b+1lr1gPBurVr16xZs3rVipnetpV/CWv8XmiFAbzuElPKfd4wpb8PCPr7+yeAwMRJK14Mt5L822ZQmJ6FhOOHTSDOub/EaFwVCwYfwJxFYHbcR2I03stJTk5OgqaC6xkgTjdRNv7//R0I/sEKaWTOaI08qnHoaQQAAyi97TBEkioAAAAASUVORK5CYII=) no-repeat;
background-size: 100% 100%;
font-size: 30rpx;
position: absolute;
right: 0;
top: 0;
top: 6rpx;
}
}
}
......
......@@ -2,7 +2,7 @@
<view>
<view v-if="style_setting.styleType === 1" class="maintitle_content1" :style="{'height': style_setting.titleHeight*2+'rpx','line-height': style_setting.titleHeight*2+'rpx','background-color':style_setting.bg_color,'padding-top':style_setting.padding_top*2+'rpx','padding-bottom':style_setting.padding_bottom*2+'rpx',}">
<view>
<i class="main_icon" :style="{'background-image':'url('+style_setting.icon_url+')'}" v-if="style_setting.iconShow"></i>
<i class="main_icon" :style="{'background-image':'url('+style_setting.icon_url+')'}" v-if="style_setting.iconShow === 1"></i>
<text class="main_title" :style="{'font-size':style_setting.title_font_size*2+'rpx','color':style_setting.title_color}">{{style_setting.title}}</text>
<text class="main_sub_title" :style="{'font-size': style_setting.sub_title_font_size*2+'rpx','color':style_setting.sub_title_color}">{{style_setting.sub_title}}</text>
</view>
......
<template>
<view class="navigation" :style="[{'height': style_setting.height*2+'rpx', 'height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : {'background-color': style_setting.bg_color}]">
<view class="navigation" :style="[{'height': style_setting.height*2+'rpx', 'height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]">
<view>
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="item.title_show">
<text class="navigation_text" :style="[{'color': item.title_color}, item.title_bg_show ? {'background-image': 'url('+item.title_bg_url+')'} : '']" @click="$jump(item.link)">
<i v-if="style_setting.title_icon_show" class="navigation_icon" :style="{'background-image': 'url('+item.title_icon_url+')'}"></i>
<i v-if="item.title_icon_show" class="navigation_icon" :style="{'background-image': 'url('+item.title_icon_url+')'}"></i>
<text>{{item.title}}</text>
</text>
</text>
......@@ -37,6 +37,7 @@
background-size: 100% 100%;
padding: 0 24rpx;
box-sizing: border-box;
border-right: 10rpx solid rgba(0,0,0,0.4);
.navigation_item {
width: 177.5rpx;
display: inline-block;
......
<template>
<view class="promo_content" :style="style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : {'background-color': style_setting.bg_color}">
<view class="promo_content" :style="[style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]">
<view class="flex">
<view>
<i v-if="style_setting.icon_show" class="promo_icon" :style="{'background-image': 'url('+style_setting.icon_url+')'}"></i>
......
......@@ -3,10 +3,10 @@
<i class="logo" :style="{'background-image': 'url('+wrapper_props.logo_url+')'}"></i>
<view class="search_view flex">
<icon type="search" class="search_icon" size="16" @click="search"></icon>
<input type="text" @click="search" class="search_input" v-model="keyword" :placeholder="wrapper_props.placeholder">
<input type="text" @click="search" class="search_input" v-model="keyword" placeholder="请输入商品名称" :value="wrapper_props.placeholder">
</view>
<text class="login_btn" @click="jumpPhpPage('app=member&act=login')" v-if="!isLogin">登录</text>
<uni-icons v-else type="person" size="30" @click="jumpPhpPage('app=member')"></uni-icons>
<i v-else class="eosfont person_icon" @click="jumpPhpPage('app=member')">&#xe636;</i>
</view>
</template>
......@@ -26,7 +26,7 @@
},
data() {
return {
keyword: ''
keyword: this.wrapper_props.placeholder
}
},
methods: {
......@@ -36,7 +36,7 @@
},
search() {
uni.navigateTo({
url: `/pages/searchhistory/searchhistory?keyword=`
url: `/pages/searchhistory/searchhistory?keyword=${this.keyword}`
});
}
},
......@@ -47,6 +47,10 @@
</script>
<style lang="less" scoped>
.person_icon {
font-size: 48rpx;
line-height: 60rpx;
}
.flex_searchbar {
display: flex;
justify-content: space-between;
......@@ -82,6 +86,9 @@
.search_input {
height: 60rpx;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.login_btn {
width: 92rpx;
......
<template>
<view>
<uni-swiper-dot :info="slide_list" :dotsStyles="{'width': 4,'height':4, 'bottom':5, 'selectedBackgroundColor':'#fff', 'backgroundColor': '#ccc', 'border':'none','selectedBorder':'none'}" :mode="slide_setting.tipsStyle === 1 ? 'dot' : 'default'" :current="current">
<swiper :autoplay="slide_setting.autoplay" :style="{'background-color': slide_setting.bg_color, 'height': slide_setting.slideHeight*2+'rpx'}" circular="true" interval="3000" @change="change">
<uni-swiper-dot :info="slide_list" :dotsStyles="{'width': 4,'height':4, 'bottom':5, 'selectedBackgroundColor':'#fff', 'backgroundColor': '#ccc', 'border':'none','selectedBorder':'none'}" :mode="slide_setting.tipsStyle === 1 ? 'dot' : 'default'" :current="current" :showDots="slide_setting.dots">
<swiper :autoplay="autoplay" :style="{'background-color': slide_setting.bg_color, 'height': slide_setting.slideHeight*2+'rpx'}" circular="true" :interval="interval" @change="change">
<swiper-item v-for="(item, key) in slide_list" :key="key">
<view :style="{'height': slide_setting.slideHeight*2+'rpx'}">
<image class="slide_img" :src="item.img_url" @click="$jump(item.img_href)"></image>
......@@ -25,8 +25,20 @@
slide_setting: this.wrapper_props.slide_setting,
slide_list: this.wrapper_props.slide_list,
current: 0,
interval: 3000,
autoplay: this.wrapper_props.slide_setting.autoplay
}
},
mounted() {
const { infinite } = this.slide_setting;
if(!infinite) {
const time = this.interval * this.slide_list.length;
setTimeout(() => {
this.autoplay = false;
}, time);
}
},
methods: {
change(e) {
this.current = e.detail.current;
......
......@@ -11,7 +11,7 @@
<input type="text" class="search_input" v-model="keyword" @confirm="search">
</view>
<text class="login_btn" @click="jumpPhpPage('app=member&act=login')" v-if="!isLogin">登录</text>
<uni-icons v-else type="person" size="30" @click="jumpPhpPage('app=member')"></uni-icons>
<i v-else class="eosfont person_icon" @click="jumpPhpPage('app=member')">&#xe636;</i>
</view>
<view class="flex tab_bar">
<text :class="{act: tabIndex === 1}" @click="jumpPhpPage()">首页</text>
......@@ -182,6 +182,10 @@
</script>
<style lang="less" scoped>
.person_icon {
font-size: 48rpx;
line-height: 60rpx;
}
.flex {
display: flex;
justify-content: space-between;
......
@font-face {font-family: "eosfont";
src: url('https://at.alicdn.com/t/font_1682539_5hrkarw1o62.ttf') format('truetype');
}
.eosfont {
font-family: "eosfont" !important;
font-style: normal;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment