You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
190 lines
5.0 KiB
190 lines
5.0 KiB
<template>
|
|
<view class="body">
|
|
<view class="one">
|
|
<image src="../../static/img/left_white.png" mode="" @click="back()"></image>
|
|
<view class="one_text">{{ title }}</view>
|
|
</view>
|
|
<!-- <uni-nav-bar left-icon="left" @clickLeft="back()" backgroundColor="#000" color="#fff" :title="title" :fixed="true" />
|
|
<view v-for="(item,index) in list " :key="item.zone_id"> -->
|
|
<view v-for="(item1,index1) in item.blocks " :key="item1.block_pic">
|
|
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}">
|
|
<!-- class="discount page_padding" -->
|
|
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" ></image>
|
|
</view>
|
|
<view class="TWOPIC" v-if="item.zone_code =='TWOPIC'">
|
|
<image :src="item1.block_pic"></image>
|
|
</view>
|
|
<!-- TWOPIC -->
|
|
<view class="TWOPIC" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'">
|
|
<image :src="item1.block_pic" @click="imgTo(item1)"mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
|
|
</view>
|
|
<!-- THREEPIC -->
|
|
<view class="THREEPIC":style="{height:(item.zone_code=='THREEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'">
|
|
<image :src="item1.block_pic" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
|
|
</view>
|
|
<!-- FOURPIC -->
|
|
<view class="FOURPIC":style="{height:(item.zone_code=='FOURPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'">
|
|
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
|
|
</view>
|
|
<!-- FIVEPIC -->
|
|
<view class="FIVEPIC" :style="{height:(item.zone_code=='FIVEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'">
|
|
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
|
|
</view>
|
|
<!-- SIXPIC -->
|
|
<view class="SIXPIC":style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'">
|
|
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import {defaultRequest,defaultRequest4} from '../../api/index.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
list:[],
|
|
data: {
|
|
_action:'getpagedata',
|
|
pagecode:''
|
|
},
|
|
title:''
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
console.log(e)
|
|
this.title = e.title
|
|
this.data.pagecode = e.id
|
|
this.getpage()
|
|
},
|
|
methods: {
|
|
getpage(){
|
|
|
|
let imglist
|
|
defaultRequest(this.data).then( res =>{
|
|
if(res.error ==0){
|
|
|
|
console.log(res,'数据')
|
|
this.list= res.data.zones
|
|
console.log(this.list)
|
|
this.list.map( item =>{
|
|
console.log(item,'item')
|
|
})
|
|
}
|
|
})
|
|
},
|
|
back(){
|
|
uni.navigateBack({
|
|
delta:1
|
|
})
|
|
},
|
|
imgTo(item){
|
|
console.log(item,'item')
|
|
//console.log(item.block_link.includes('dope.youhui'))
|
|
let goodid
|
|
|
|
if(item.goodid){
|
|
|
|
uni.navigateTo({
|
|
url:'../productDetails/index?goodid='+item.goodid
|
|
})
|
|
}
|
|
else if(item.block_link){
|
|
const i = item.block_link.indexOf('?')
|
|
goodid = item.block_link.substring(i);
|
|
////console.log(item.block_link)
|
|
if(item.block_link.includes('goodslist')){
|
|
uni.navigateTo({
|
|
url:'../category/productList'+ goodid+'&tag=1'
|
|
})
|
|
}
|
|
else if(item.block_link.includes('goodid')){
|
|
uni.navigateTo({
|
|
url:'../productDetails/index'+goodid+'&img=1'
|
|
})
|
|
}
|
|
else if(item.block_link.includes('dope.youhui')){
|
|
uni.navigateTo({
|
|
url:'./pickUpCentre'
|
|
})
|
|
}else if(item.block_link.includes('dope.adspecial')){
|
|
uni.navigateTo({
|
|
url:'../specialTitle/index'+goodid
|
|
})
|
|
}
|
|
}
|
|
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
page{
|
|
background-color: aliceblue;
|
|
margin: 20rpx;
|
|
}
|
|
.ONEPIC{
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: -12rpx 0;
|
|
image{
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
&:nth-last-child(){
|
|
margin-bottom: 10rpx;
|
|
}
|
|
}
|
|
.TWOPIC{
|
|
width: 100%;
|
|
display: flex;
|
|
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.THREEPIC{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
.FOURPIC{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.FIVEPIC{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.SIXPIC{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.body{
|
|
background-color: #000;
|
|
|
|
}
|
|
</style>
|
|
|