12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <scroll-view scroll-x="true" class="picture">
- <view class="section" v-for="(item , index) in productList" @click="navigaitionTo(item)">
- <image :src="item.adsImage" mode="heightFix"></image>
- </view>
- </scroll-view>
- </template>
- <script>
- export default{
- data(){
- return{
- productList:[]
- }
- },
- props:{
- pageData: {
- type: Object
- },
- userIdentity: {
- type: Number
- }
- },
- created() {
- this.initData(this.pageData);
- },
- methods:{
- initData(data){
- this.productList = data.floorImageList;
- },
- navigaitionTo(item){
- console.log(item);
- if(item.link){
- uni.navigateTo({
- url:`/h5/pages/article/path?link=${item.link}`
- })
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .picture{
- width: 750rpx;
- margin-left: -24rpx;
- white-space: nowrap;
- .section{
- display: inline-block;
- margin-right: 24rpx;
- width: 310rpx;
- height: 240rpx;
- overflow: hidden;
- border-radius: 16rpx;
- image{
- width: 310rpx;
- height: 240rpx;
- }
- &:first-child{
- margin-left: 24rpx;
- }
- }
- }
- </style>
|