1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <scroll-view scroll-x="true" class="picture">
- <view class="section" v-for="(item , index) in productList" @click="navigaitionTo(item)">
- <image :src="item.appletsImage" mode="heightFix"></image>
- </view>
- </scroll-view>
- </template>
- <script>
- import caimeiApi from '@/common/config/caimeiApi.js'
- 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){
- if (item.adsImage === '' && item.linkType === -1) {
- return
- }else if(item.linkType === -1){
- uni.navigateTo({
- url:`/h5/pages/activity/activity-detail?adsImage=${item.adsImage}&title=${item.name}`
- })
- }else{
- caimeiApi.FlooryNavigateTo(item)
- }
- }
- }
- }
- </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>
|