feat: 优先专区上轮播图
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
circular
|
circular
|
||||||
></up-swiper>
|
></up-swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mid-panel">
|
<view class="mid-panel">
|
||||||
<up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
|
<up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
|
||||||
<view style="margin:0 12rpx">信任桥兑换</view>
|
<view style="margin:0 12rpx">信任桥兑换</view>
|
||||||
@@ -33,7 +34,6 @@ import TopSafe from '@/components/common/top-safe.nvue'
|
|||||||
import MyBtn from '@/components/common/my-btn.vue'
|
import MyBtn from '@/components/common/my-btn.vue'
|
||||||
import FenItem from '@/components/shop/fen-item.vue'
|
import FenItem from '@/components/shop/fen-item.vue'
|
||||||
import { searchList } from '@/api/product.js';
|
import { searchList } from '@/api/product.js';
|
||||||
import func from '@/utils/func.js';
|
|
||||||
import { getCarouselImage } from '@/api/common.js';
|
import { getCarouselImage } from '@/api/common.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -107,8 +107,8 @@ export default {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height:156rpx;
|
height:120rpx;
|
||||||
min-height:156rpx;
|
min-height:120rpx;
|
||||||
}
|
}
|
||||||
.swiper-view{
|
.swiper-view{
|
||||||
width:100%;
|
width:100%;
|
||||||
|
|||||||
@@ -8,8 +8,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</Header>
|
</Header>
|
||||||
|
|
||||||
|
<view class="swiper-view">
|
||||||
|
<up-swiper
|
||||||
|
:list="swiperList"
|
||||||
|
style="width:100%"
|
||||||
|
circular
|
||||||
|
></up-swiper>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mid-panel">
|
||||||
|
<up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
|
||||||
|
<view style="margin:0 12rpx">信任桥优选</view>
|
||||||
|
<up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="setting-view">
|
<view class="setting-view">
|
||||||
<YouItem @ok="onJumpShop" style="margin-top:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></YouItem>
|
<YouItem @ok="onJumpShop" style="margin-bottom:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></YouItem>
|
||||||
</view>
|
</view>
|
||||||
<up-toast ref="uToastRef"></up-toast>
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</view>
|
</view>
|
||||||
@@ -21,19 +36,22 @@ import TopSafe from '@/components/common/top-safe.nvue'
|
|||||||
import MyBtn from '@/components/common/my-btn.vue'
|
import MyBtn from '@/components/common/my-btn.vue'
|
||||||
import YouItem from '@/components/shop/you-item.vue'
|
import YouItem from '@/components/shop/you-item.vue'
|
||||||
import { searchList } from '@/api/product.js';
|
import { searchList } from '@/api/product.js';
|
||||||
|
import { getCarouselImage } from '@/api/common.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Header, TopSafe,MyBtn,YouItem },
|
components: { Header, TopSafe,MyBtn,YouItem },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList:[
|
dataList:[
|
||||||
]
|
],
|
||||||
|
swiperList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.init();
|
this.init();
|
||||||
|
this.getCarouselImage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
@@ -49,6 +67,16 @@ export default {
|
|||||||
if(resp && resp.bizcode === 100){
|
if(resp && resp.bizcode === 100){
|
||||||
this.dataList = resp.data || [];
|
this.dataList = resp.data || [];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async getCarouselImage(){
|
||||||
|
const params={
|
||||||
|
pageUi:4,
|
||||||
|
}
|
||||||
|
const resp = await getCarouselImage(params);
|
||||||
|
if(resp && resp.bizcode === 100){
|
||||||
|
const data = resp.data || [];
|
||||||
|
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onJumpShop(id){
|
onJumpShop(id){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -76,6 +104,21 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.mid-panel{
|
||||||
|
width:100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height:120rpx;
|
||||||
|
min-height:120rpx;
|
||||||
|
}
|
||||||
|
.swiper-view{
|
||||||
|
width:100%;
|
||||||
|
height:268rpx;
|
||||||
|
min-height:268rpx;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.setting-view {
|
.setting-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 88rpx - var(--status-bar-height));
|
height: calc(100% - 88rpx - var(--status-bar-height));
|
||||||
|
|||||||
Reference in New Issue
Block a user