消息中心
This commit is contained in:
@@ -40,6 +40,13 @@
|
||||
>
|
||||
</view>
|
||||
|
||||
<view class="order-msg-list" v-if="listinfo.status=='done'">
|
||||
<view class="item" v-for="item in orderMsgList" :key="item.id">
|
||||
<msg-list-item :content="item.content" :title="item.title"
|
||||
:create-time="item.createTime"></msg-list-item>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wxQrcode" v-if="shopQrcode">
|
||||
<view class="left">
|
||||
<text class="title">扫码加好友,优惠多多</text>
|
||||
@@ -265,6 +272,8 @@ import { useCartsStore } from "@/stores/carts.js";
|
||||
import { useWebSocket } from "@/stores/carts-websocket.js";
|
||||
import * as chatApi from "@/http/php/chat";
|
||||
|
||||
import MsgListItem from '@/components/msg-list-item/msg-list-item.vue'
|
||||
|
||||
function pwdClose() {
|
||||
ispws.value = false;
|
||||
pay_unlock();
|
||||
@@ -413,6 +422,7 @@ import rechargeFree from "./components/rechargeFree.vue";
|
||||
import paymentMethodes from "@/components/paymentMethod.vue"; //支付方式
|
||||
import { onShow, onBackPress } from "@dcloudio/uni-app";
|
||||
import { onHide } from "@dcloudio/uni-app";
|
||||
import { getMsgByOrderIdReq } from "../../common/api/account/message";
|
||||
// 输入支付密码
|
||||
const ispws = ref(false);
|
||||
let userInfo = uni.cache.get("userInfo");
|
||||
@@ -502,8 +512,24 @@ const orderorderInfo = async (isNpwGetOrderDetail = false) => {
|
||||
console.log(res);
|
||||
|
||||
getOrderInfoAfterCalcInit(res);
|
||||
|
||||
if (listinfo.status == 'done') {
|
||||
getOrderMsgInfo()
|
||||
}
|
||||
};
|
||||
|
||||
const orderMsgList = ref([])
|
||||
|
||||
// 获取订单消息
|
||||
const getOrderMsgInfo = async () => {
|
||||
orderMsgList.value = []
|
||||
let res = await getMsgByOrderIdReq(listinfo.id)
|
||||
|
||||
if (res) {
|
||||
orderMsgList.value = res
|
||||
}
|
||||
}
|
||||
|
||||
//拿到订单数据后续初始化处理
|
||||
function getOrderInfoAfterCalcInit(res) {
|
||||
console.log("getOrderInfoAfterCalcInit", res);
|
||||
@@ -1762,4 +1788,8 @@ page {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.order-msg-list {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order-msg-list" v-if="listinfo.status=='done'">
|
||||
<view class="item" v-for="item in orderMsgList" :key="item.id">
|
||||
<msg-list-item :content="item.content" :title="item.title"
|
||||
:create-time="item.createTime"></msg-list-item>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wxQrcode" v-if="shopQrcode">
|
||||
<view class="left">
|
||||
<text class="title">扫码加好友,优惠多多</text>
|
||||
@@ -123,6 +130,11 @@
|
||||
onShow,
|
||||
onBackPress
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
getMsgByOrderIdReq
|
||||
} from "@/common/api/account/message";
|
||||
|
||||
import MsgListItem from '@/components/msg-list-item/msg-list-item.vue'
|
||||
|
||||
// 输入支付密码
|
||||
const ispws = ref(false)
|
||||
@@ -172,8 +184,10 @@
|
||||
let res = await APIgetOrderById({
|
||||
orderId: orderId.value
|
||||
})
|
||||
console.log("orderorderInfo1: res == ", res);
|
||||
if (res) {
|
||||
Object.assign(listinfo, res);
|
||||
console.log("orderorderInfo: res == ", res);
|
||||
// 历史订单
|
||||
if (listinfo.detailMap) {
|
||||
let combinedArray = [];
|
||||
@@ -206,6 +220,22 @@
|
||||
listinfo.pointsDiscountAmount = 0
|
||||
// console.log(listinfo)
|
||||
|
||||
console.log("orderorderInfo list info: ", listinfo);
|
||||
if (listinfo.status == 'done') {
|
||||
getOrderMsgInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const orderMsgList = ref([])
|
||||
|
||||
// 获取订单消息
|
||||
const getOrderMsgInfo = async () => {
|
||||
orderMsgList.value = []
|
||||
let res = await getMsgByOrderIdReq(orderId.value)
|
||||
|
||||
if (res) {
|
||||
orderMsgList.value = res
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +447,7 @@
|
||||
// })
|
||||
//return
|
||||
// }
|
||||
if (orderVIP.value.payPwd == '') {
|
||||
if (orderVIP.value.payPwd == '') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您还未设置支付密码,是否去设置?',
|
||||
@@ -584,6 +614,7 @@
|
||||
orderVIP.value = uni.cache.get('orderVIP')
|
||||
// 积分信息
|
||||
|
||||
console.log("orderInfo onMounted");
|
||||
orderorderInfo()
|
||||
})
|
||||
</script>
|
||||
@@ -1056,4 +1087,8 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.order-msg-list {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user