修复了开发环境下的URL配置,并添加了支付状态查询API,商品规格显示,以及预约取货功能。

This commit is contained in:
mkm 2024-07-31 12:07:16 +08:00
parent 0cd6ce7a25
commit f260d52b73
4 changed files with 44 additions and 18 deletions

View File

@ -1,14 +1,14 @@
VITE_NOW_TYPE = 'dist'
# VITE_PUSH_URL = 'ws://192.168.1.201:8787'
# VITE_BASE_URL = 'http://192.168.1.201:8545'
#VITE_PUSH_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
#VITE_BASE_URL = 'https://ceshi-multi-store.lihaink.cn'
# VITE_PUSH_URL = 'ws://192.168.1.22:8787'
# VITE_BASE_URL = 'http://192.168.1.22:8545'
VITE_PUSH_URL ='wss://test-multi-store.lihaink.cn/pull'
VITE_BASE_URL = 'https://test-multi-store.lihaink.cn'
VITE_PUSH_URL ='wss://test-multi-store.lihaink.cn/pull'
VITE_BASE_URL = 'https://test-multi-store.lihaink.cn'
# VITE_PUSH_URL ='wss://multi-store.lihaink.cn/pull'
# VITE_BASE_URL = 'https://multi-store.lihaink.cn'

View File

@ -219,3 +219,10 @@ export function userProductStorageApi(data) {
export function userProductStorageSupplyApi(data) {
return request.post(`/user_product_storage/UserProductStorage/supply`, data)
}
/**
* @description 支付状态查询
*/
export function storeOrderQueryApi(data) {
return request.get(`/store_order/StoreOrder/wechatQuery`, { params: data })
}

View File

@ -234,6 +234,7 @@ onUnmounted(() => {
</div>
</template>
</el-table-column>
<el-table-column prop="cart_info.store_info" label="商品规格" width="150" />
<el-table-column prop="cart_info.price" label="单价" width="150" />
<el-table-column prop="cart_info.cart_num" label="数量" width="150" />
<el-table-column prop="cart_info.pay_price" label="总价" width="150">

View File

@ -6,7 +6,8 @@ import {
orderLadingApi,
cartListApi,
cashierinfoListApi,
cashierinfoDetailsApi
cashierinfoDetailsApi,
storeOrderQueryApi
} from "@/api/store.js";
import { useUserStore } from "@/store/user.js";
import { ElMessage } from "element-plus";
@ -59,6 +60,19 @@ const rePay = () => {
});
payRef.value.drawer = true;
};
const query = () => {
if (formData.value.order_id) {
storeOrderQueryApi({ 'order_no': formData.value.order_id }).then(res => {
console.log(res)
})
}else{
ElMessage({
message: '订单号不能为空',
type: "error",
});
}
};
const getOrderStatus = (id) => {
orderStatusApi({
@ -122,16 +136,16 @@ const getDetail = () => {
const emit = defineEmits(['rePaySuccess'])
const paySuccess = (data = null) => {
// data = {
// out_trade_no: "PF171568087790938356", //
// create_time: "2024-05-14 17:59:05", //
// trade_type: "MICROPAY", //
// transaction_id: "4200002159202405159003084211", //
// }
// if(data) onPrint(data);
setTimeout(()=>{
emit('rePaySuccess');
})
// data = {
// out_trade_no: "PF171568087790938356", //
// create_time: "2024-05-14 17:59:05", //
// trade_type: "MICROPAY", //
// transaction_id: "4200002159202405159003084211", //
// }
// if(data) onPrint(data);
setTimeout(() => {
emit('rePaySuccess');
})
};
@ -224,11 +238,13 @@ onUnmounted(() => {
<el-table-column label="商品信息">
<template #default="{ row }">
<div style="display: flex; align-items: center">
<el-image style="height: 3rem; width: 3rem;flex-shrink: 0;" :src="row.cart_info?.image"></el-image>
<el-image style="height: 3rem; width: 3rem;flex-shrink: 0;"
:src="row.cart_info?.image"></el-image>
<span style="margin-left: 0.5rem">{{ row.cart_info?.name }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="cart_info.store_info" label="商品规格" width="150" />
<el-table-column prop="cart_info.price" label="单价" width="150" />
<el-table-column prop="cart_info.cart_num" label="数量" width="150" />
<el-table-column prop="cart_info.pay_price" label="总价" width="150">
@ -237,7 +253,8 @@ onUnmounted(() => {
<div style="height: 8rem;"></div>
</div>
<div class="footer" v-if="!formData.paid">
<el-button type="primary" size="large" @click="rePay">重新支付</el-button>
<el-button type="primary" size="large" @click="rePay">重新支付</el-button>
<el-button type="primary" size="large" @click="query" v-if="formData.pay_type == 9">查询支付</el-button>
</div>
</div>
<div v-else>
@ -295,6 +312,7 @@ onUnmounted(() => {
}
}
}
.footer {
position: absolute;
bottom: 0;
@ -311,6 +329,6 @@ onUnmounted(() => {
border-top: 1px solid #eee;
}
}
}
</style>