|
@@ -147,6 +147,7 @@
|
|
|
import {getUserInfo} from '@/api/user'
|
|
|
|
|
|
import {getStoreConfig} from '@/api/common'
|
|
|
+ import {checkpayment} from '@/api/payment'
|
|
|
import {editPayType,pay,getStoreOrderById,getMyStoreOrderById} from '@/api/storeOrder'
|
|
|
export default {
|
|
|
data() {
|
|
@@ -327,22 +328,23 @@
|
|
|
// 启动定时器并保存 ID
|
|
|
that.checkTimer = setInterval(() => {
|
|
|
const data = { orderId: that.order.id };
|
|
|
- getMyStoreOrderById(data).then(res => {
|
|
|
+ checkpayment(data).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- if (res.order.status == 3) {
|
|
|
+ if (res.status == 1) {
|
|
|
// 跳转前清除定时器
|
|
|
clearInterval(that.checkTimer);
|
|
|
uni.navigateTo({
|
|
|
url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
|
|
|
});
|
|
|
- }else{
|
|
|
- setTimeout(()=>{
|
|
|
- clearInterval(that.checkTimer);
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
|
|
|
- });
|
|
|
- },10000)
|
|
|
}
|
|
|
+ // else{
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // clearInterval(that.checkTimer);
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
|
|
|
+ // });
|
|
|
+ // },10000)
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
}, 4000);
|