【类 型】:feat

【主	题】:主页显示 已付款订单信息 实时显示
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-06-12 18:43:35 +08:00
parent 1efa9308f2
commit 1cbfd0ae03

View File

@ -20,6 +20,14 @@
</view>
</navigator>
</view>
<!-- 新订单 提示框 -->
<!-- 新订单提示框 -->
<view v-for="(item, index) in orderList" :key="index">
订单{{ item.order_sn }}
<text v-if="item.status === 'pending'">状态已付款</text>
<text v-else-if="item.status === 'processing'">状态备货中</text>
<text v-else-if="item.status === 'shipped'">状态已发货</text>
</view>
<!-- 主按钮 -->
<view class="flex mse" style="height: 222rpx;margin-top: 30rpx;">
<navigator url="/pages/shop/list">
@ -57,6 +65,11 @@
computed: {
userInfo() {
return this.$store.state.userInfo
},
//
orderList() {
const validStatuses = ['pending', 'processing', 'shipped'];
return this.$store.state.orderList.filter(item => validStatuses.includes(item.status));
}
},
onReady() {
@ -67,9 +80,9 @@
this.checkUserInfo()
// tabber
this.$store.commit('setTabbarCurrent', 0)
console.log(this.orderList)
},
methods: {
//
checkUserInfo() {
return checkUserInfo(this.$store)