1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <scroll-view scroll-x="true" class="picture">
- <view class="section" v-for="(item , index) in productList" @click="navigaitionTo(item)" :key="index">
- <image :src="item.appletsImage" ></image>
- <view class="cm-cover" v-if="pageData.floorContent.templateClassify === 4"></view>
- </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:`/pages/h5/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{
- position: relative;
- 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;
- }
- .cm-cover{
- z-index: 99;
- top: 0;
- left: 0;
- position: absolute;
- width: 100%;
- height: 100%;
- background:url(https://static.caimei365.com/app/img/icon2/cm_player.png) no-repeat center;
- background-size: 40rpx 40rpx;
- }
- }
- }
- </style>
|