重构会员卡数据库
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<!-- 其他功能 -->
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<uni-card :border="false" :is-shadow="false" :padding="0">
|
||||
<uv-cell :title="item.comments" :label="item.createTime" :value="`-${item.money}`" :cellStyle="{ padding: '10px 0' }" :border="false"></uv-cell>
|
||||
<uv-cell :title="item.comments" :label="item.createTime" :value="`${item.price}`" :cellStyle="{ padding: '10px 0' }" :border="false"></uv-cell>
|
||||
</uni-card>
|
||||
</block>
|
||||
<!-- 登录组件 -->
|
||||
@@ -21,20 +21,20 @@ const userStore = useUserStore();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userCardId: 0,
|
||||
cardId: 0,
|
||||
list: [],
|
||||
isLogin: false,
|
||||
logo: uni.getStorageSync('app_logo'),
|
||||
};
|
||||
},
|
||||
onLoad(o) {
|
||||
this.userCardId = o.id;
|
||||
this.cardId = o.id;
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload(e) {
|
||||
const app = this;
|
||||
const { userCardId } = this;
|
||||
const { cardId } = this;
|
||||
// 当前登录用户信息
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
if (Object.keys(userInfo).length > 0) {
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
}
|
||||
|
||||
// 获取会员卡使用记录
|
||||
Api.pageUserCardLog({userCardId}).then((res) => {
|
||||
Api.pageUserCardLog({cardId}).then((res) => {
|
||||
app.list = res.list;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user