积分接口联调

This commit is contained in:
2024-03-21 23:22:24 +08:00
parent 792aa4268a
commit 4fb648f003
9 changed files with 67 additions and 33 deletions

View File

@@ -1,23 +1,25 @@
<template>
<view class='card-view'>
<text class='category-title'>2023-02-12</text>
<view class='item c-flex-column' v-for='(item,index) in 3' :key='index'>
<!-- <text class='category-title'>2023-02-12</text>-->
<!-- <view class='item c-flex-column' v-for='(item,index) in 3' :key='index'>-->
<view class='c-flex-row'>
<text class='primary-text-color' style='flex: 1'>消费</text>
<text class='accent-text-color'>-30</text>
<text class='primary-text-color' style='flex: 1'>{{item?.remark}}</text>
<text class='accent-text-color'>{{item?.value}}</text>
</view>
<view class='c-flex-row'>
<text class='secondary-text-color' style='flex: 1'>2023-06-27 15:02:11</text>
<text class='secondary-text-color' style='flex: 1'>{{ item?.createtime }}</text>
<text style='color: #999999'>会员积分30.00</text>
</view>
<view class='divider' style='margin-top: 20rpx'/>
</view>
<!-- </view>-->
</view>
</template>
<script lang='ts' setup>
import { IntegralBean } from '@/api/user/types';
defineProps({
item: Object
item: Object as PropType<IntegralBean>
});
</script>

View File

@@ -1,7 +1,7 @@
<template>
<view class='content'>
<view class='top-view c-flex-column'>
<text>2520</text>
<text>{{ userInfo.integration }}</text>
<text>会员积分</text>
</view>
<text class='integral-detail-title'>积分明细</text>
@@ -12,9 +12,23 @@
</template>
<script lang='ts' setup>
import IntegralItem from '@/pages/mine/subs/integral/components/integral-item.vue';
import IntegralItem from './components/integral-item.vue';
import { getIntegralList } from '@/api/user';
import { useUserStore } from '@/store';
const userStore = useUserStore();
const { userInfo } = storeToRefs(userStore);
const tradeList = ref([]);
onLoad((e) => {
fetchData();
});
const fetchData = async () => {
const { rows } = await getIntegralList({ 'pageNum': 1, 'pageSize': 10, 'bean': {} });
tradeList.value = rows;
};
const tradeList = ref([1, 2, 3, 4, 5]);
</script>
<style lang='scss' scoped>
@@ -47,7 +61,7 @@ const tradeList = ref([1, 2, 3, 4, 5]);
position: relative;
}
scroll-view{
scroll-view {
width: auto;
}
</style>