【代码评审】积分商城部分
parent
ea98ba45ca
commit
09dc98db16
1369
pages.json
1369
pages.json
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
<!-- 页面 -->
|
<!-- 积分商城:商品列表 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="积分商城">
|
<s-layout title="积分商城">
|
||||||
<view class="ss-p-20">
|
<view class="ss-p-20">
|
||||||
|
@ -8,14 +8,14 @@
|
||||||
:data="item"
|
:data="item"
|
||||||
priceColor="#FF3000"
|
priceColor="#FF3000"
|
||||||
@tap="sheep.$router.go('/pages/goods/point', { id: item.id })"
|
@tap="sheep.$router.go('/pages/goods/point', { id: item.id })"
|
||||||
></s-point-card>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<s-empty
|
<s-empty
|
||||||
v-if="state.pagination.total === 0"
|
v-if="state.pagination.total === 0"
|
||||||
icon="/static/goods-empty.png"
|
icon="/static/goods-empty.png"
|
||||||
text="暂无积分商品"
|
text="暂无积分商品"
|
||||||
></s-empty>
|
/>
|
||||||
<uni-load-more
|
<uni-load-more
|
||||||
v-if="state.pagination.total > 0"
|
v-if="state.pagination.total > 0"
|
||||||
:status="state.loadStatus"
|
:status="state.loadStatus"
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
});
|
});
|
||||||
async function getData(page = 1, list_rows = 5) {
|
async function getData(page = 1, list_rows = 5) {
|
||||||
|
// TODO @puhui999:分页重写成,我们的代码风格。原先的有点复杂
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let res = await sheep.$api.app.scoreShop.list({
|
let res = await sheep.$api.app.scoreShop.list({
|
||||||
list_rows,
|
list_rows,
|
||||||
|
|
|
@ -17,11 +17,7 @@ const PointApi = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
// 获得积分商城活动明细
|
||||||
* 获得积分商城活动明细
|
|
||||||
* @param {number} id 积分商城活动编号
|
|
||||||
* @return {*}
|
|
||||||
*/
|
|
||||||
getPointActivity: (id) => {
|
getPointActivity: (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: 'promotion/point-activity/get-detail',
|
url: 'promotion/point-activity/get-detail',
|
||||||
|
|
Loading…
Reference in New Issue