支付联调

This commit is contained in:
duan
2024-05-22 15:06:09 +08:00
parent 75ac4e967c
commit 925e2027e2
6 changed files with 178 additions and 81 deletions

View File

@@ -15,14 +15,14 @@
</view>
<view class="towcontent">
<view class="towcontentone">
{{orderinfo.couponsPrice}}
{{orderInfo.orderAmount}}
</view>
<view class="towcontentow flex-between">
<view class="towcontentow_O">
订单编号
</view>
<view class="towcontentow_T">
{{orderinfo.orderId}}
{{orderInfo.orderNo}}
</view>
</view>
<view class="towcontentow flex-between">
@@ -30,7 +30,7 @@
下单时间
</view>
<view class="towcontentow_T">
{{orderinfo.createTime}}
{{orderInfo.createdAt|createdAtfiter}}
</view>
</view>
<view class="towcontentow flex-between">
@@ -41,7 +41,7 @@
微信支付
</view>
</view>
<view class="towcontenthere flex-colum">
<view class="towcontenthere flex-colum" v-if="orderinfo">
<view class="towcontentherebox flex-center">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/yhj.png" mode=""></image>
<text>恭喜获得优惠券</text>
@@ -81,10 +81,24 @@
components: {
navseat
},
filters: {
createdAtfiter(d) {
const timestamp = d; // 待转换的时间戳
const date = new Date(timestamp); // 根据时间戳创建Date对象
const year = date.getFullYear(); // 获取年份
const month = date.getMonth() + 1; // 获取月份需要加1
const day = date.getDate(); // 获取日期
const hour = date.getHours(); // 获取小时
const minute = date.getMinutes(); // 获取分钟
const second = date.getSeconds(); // 获取秒数
const formattedDate = `${year}-${month}-${day} ${hour}:${minute}:${second}`; // 拼接成格式化后的日期字符串
return formattedDate
}
},
data() {
return {
titlename: '支付详情',
orderId:"",
orderId: "",
opacitys: false,
towcontentclickindex: 0,
windowHeight: '',
@@ -102,7 +116,7 @@
name: '饮品小吃'
}
],
orderinfo:null,
orderinfo: null,
form: {
address: '', //地址
type: '', //品类
@@ -112,6 +126,7 @@
size: 10, //页容量
status: 'loadmore'
},
orderInfo: null
};
},
onPageScroll(e) {
@@ -127,12 +142,15 @@
}
},
onLoad(e) {
console.log('调试',e)
this.orderId = e.orderId
setTimeout(() => {
this.GetTop()
}, 1000)
this.getinfo(e.orderId)
this.orderInfo = JSON.parse(e.orderInfo)
console.log('调试1', e)
console.log('调试2', JSON.parse(e.orderInfo))
console.log('调试3', this.orderInfo)
},
computed: {
HeighT() { //手机类型的尺寸
@@ -140,24 +158,27 @@
},
},
methods: {
async getinfo(id){
async getinfo(id) {
let res = await this.api.getYhqDouble({
orderId:id
// orderId: 420
orderId: id
})
console.log('调试1',res)
if(res.code==0){
this.orderinfo= res.data
if (res.code == 0) {
this.orderinfo = res.data
}
},
wantEvent(){
wantEvent() {
uni.redirectTo({
url: '/pages/index/index'
url: '/pages/order/order_detail?orderId=' + this.orderId
});
},
async DoublingEvent(){
async DoublingEvent() {
let res = await this.api.yhqDouble({
conponsId: this.listinfoid
conponsId: this.orderinfo.id
})
if (res.code == 0) {
this.wantEvent()
}
},
//G滚动底部
loadMore(e) {