|
@@ -1,18 +1,6 @@
|
|
<!-- 积分商城:商品列表 -->
|
|
<!-- 积分商城:商品列表 -->
|
|
<template>
|
|
<template>
|
|
<s-layout title="积分商城" navbar="normal" :leftWidth="0" :rightWidth="0">
|
|
<s-layout title="积分商城" navbar="normal" :leftWidth="0" :rightWidth="0">
|
|
- <!-- 筛选 -->
|
|
|
|
- <su-sticky bgColor="#fff">
|
|
|
|
- <view class="ss-flex">
|
|
|
|
- <view class="ss-flex-1">
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="list-icon" @tap="iconStatus = !iconStatus">
|
|
|
|
- <text v-if="iconStatus" class="sicon-goods-list" />
|
|
|
|
- <text v-else class="sicon-goods-card" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </su-sticky>
|
|
|
|
<scroll-view
|
|
<scroll-view
|
|
class="scroll-box"
|
|
class="scroll-box"
|
|
:style="{ height: pageHeight + 'rpx' }"
|
|
:style="{ height: pageHeight + 'rpx' }"
|
|
@@ -20,7 +8,7 @@
|
|
:scroll-with-animation="false"
|
|
:scroll-with-animation="false"
|
|
:enable-back-to-top="true"
|
|
:enable-back-to-top="true"
|
|
>
|
|
>
|
|
- <s-point-card ref="sPointCardRef" :property="sPointCardData" class="ss-p-x-20 ss-m-t-20"/>
|
|
|
|
|
|
+ <s-point-card ref="sPointCardRef" class="ss-p-x-20 ss-m-t-20"/>
|
|
<s-empty
|
|
<s-empty
|
|
v-if="activityTotal === 0"
|
|
v-if="activityTotal === 0"
|
|
icon="/static/goods-empty.png"
|
|
icon="/static/goods-empty.png"
|
|
@@ -40,7 +28,7 @@
|
|
<script setup>
|
|
<script setup>
|
|
import sheep from '@/sheep';
|
|
import sheep from '@/sheep';
|
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
|
- import { computed, reactive, ref } from 'vue';
|
|
|
|
|
|
+ import { reactive, ref } from 'vue';
|
|
import PointApi from '@/sheep/api/promotion/point';
|
|
import PointApi from '@/sheep/api/promotion/point';
|
|
import SLayout from '@/sheep/components/s-layout/s-layout.vue';
|
|
import SLayout from '@/sheep/components/s-layout/s-layout.vue';
|
|
|
|
|
|
@@ -50,32 +38,7 @@
|
|
const pageHeight =
|
|
const pageHeight =
|
|
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sheep.$platform.navbar - 350;
|
|
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sheep.$platform.navbar - 350;
|
|
|
|
|
|
- const sPointCardData = ref({
|
|
|
|
- 'layoutType': 'twoCol',
|
|
|
|
- });
|
|
|
|
- // 布局类型
|
|
|
|
- const LayoutTypeEnum = {
|
|
|
|
- // 单列大图
|
|
|
|
- ONE_COL_BIG_IMG: 'oneColBigImg',
|
|
|
|
- // 双列
|
|
|
|
- TWO_COL: 'twoCol',
|
|
|
|
- };
|
|
|
|
const sPointCardRef = ref();
|
|
const sPointCardRef = ref();
|
|
- // true - 单列布局;false - 双列布局
|
|
|
|
- const iconStatus = computed({
|
|
|
|
- get() {
|
|
|
|
- return sPointCardData.value.layoutType === LayoutTypeEnum.ONE_COL_BIG_IMG;
|
|
|
|
- },
|
|
|
|
- set(newValue) {
|
|
|
|
- newValue ? (sPointCardData.value.layoutType = LayoutTypeEnum.ONE_COL_BIG_IMG) :
|
|
|
|
- (sPointCardData.value.layoutType = LayoutTypeEnum.TWO_COL);
|
|
|
|
- // 只有双列布局时需要
|
|
|
|
- if (sPointCardData.value.layoutType === LayoutTypeEnum.TWO_COL) {
|
|
|
|
- // 分列
|
|
|
|
- sPointCardRef.value.calculateGoodsColumn();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
// 查询活动列表
|
|
// 查询活动列表
|
|
const activityPageParams = reactive({
|
|
const activityPageParams = reactive({
|
|
pageNo: 1, // 页码
|
|
pageNo: 1, // 页码
|