pointsMall.vue 1.4 KB
<template>
	<view>
		<u-navbar bgColor="#F6F8FA" title="积分商城" :placeholder="true" :autoBack="true"></u-navbar>
		<view>
			<search />
			<view class="mainBox" >
				<shops :list="shopList" :shopWidth="344" :shopHeight="344" :pointShop="true" />
			</view>
		</view>
		<view class="null flexV" v-if="!shopList.length">
			<image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image>
			<text>暂无商品信息</text>
		</view>
	</view>
</template>

<script setup>
	import {ref,reactive} from 'vue'
	import {onShow,onLoad} from '@dcloudio/uni-app'
	import search from '@/componets/searchBox.vue'
	import shops from '@/componets/shops.vue'
	import { getCodegood } from '@/api/'
	onShow(()=> {
		getCodegoods()
	})
	let shopList = ref([]) // 积分商品
	// 积分商品
	const getCodegoods = async ()=>{
	  try {
	    const res = await getCodegood()
		shopList.value = res
	    console.log('getCodegood', res)
	    // 保存数据
	  } catch (err) {
	    uni.showToast({ title:err,icon:'none' })
	    console.log('getCodegood', err)
	  }
	}
</script>

<style lang="scss">
	page {
		background: #F6F8FA;
	}
	.u-icon__icon {
	    display: none !important;
	}
	.mainBox {
		width: 100%;
		padding: 16rpx 24rpx;
		box-sizing: border-box;
		
	}
	
	.null {
		margin-top: 266rpx;
		
		text {
			position: relative;
			margin-top: -80rpx;
			color: #00000066;
			font-size: 26rpx
		}
		 
		image {
			width: 348rpx ;
			height: 348rpx;
		}
	}
</style>