Commit f467178f authored by zhengke's avatar zhengke

修改

parent 062fd75c
...@@ -597,8 +597,14 @@ ...@@ -597,8 +597,14 @@
goReserce(){ goReserce(){
let myCurrentInfo = this.dataList.currentPriceInfo; let myCurrentInfo = this.dataList.currentPriceInfo;
myCurrentInfo.startCityName = this.dataList.startCityName; myCurrentInfo.startCityName = this.dataList.startCityName;
let imgCover = JSON.parse(this.dataList.imgCover);
if(imgCover.length>0){
myCurrentInfo.CoverImg = imgCover[0].Url;
}
let myCurr = JSON.stringify(myCurrentInfo);
console.log(myCurrentInfo,'myCurrentInfo');
uni.navigateTo({ uni.navigateTo({
url: "/pages/jiuzhai/jz_Reserve?currentPriceInfo="+JSON.stringify(myCurrentInfo) url: "/pages/jiuzhai/jz_Reserve?currentPriceInfo="+encodeURIComponent(myCurr)
}); });
} }
}, },
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</view> </view>
<view style="display:flex;"> <view style="display:flex;">
<view class="jz_MyOrder_img"> <view class="jz_MyOrder_img">
<img :src="getFirstImg(item.imgCover)" alt="" /> <img mode='aspectFill' :src="getFirstImg(item.imgCover)" alt="" />
</view> </view>
<view class="jz_XiaDan"> <view class="jz_XiaDan">
<view>下单时间:{{item.createDate}}</view> <view>下单时间:{{item.createDate}}</view>
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
created() {}, created() {},
onLoad(option) { onLoad(option) {
if (option.currentPriceInfo) { if (option.currentPriceInfo) {
this.currentPriceInfo = JSON.parse(option.currentPriceInfo); this.currentPriceInfo = JSON.parse(decodeURIComponent(option.currentPriceInfo))
} }
}, },
methods: { methods: {
...@@ -252,8 +252,11 @@ ...@@ -252,8 +252,11 @@
this.apipost("sellorder_post_SetOrderInfoForB2B", msg, this.apipost("sellorder_post_SetOrderInfoForB2B", msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data);
uni.navigateTo({ uni.navigateTo({
url: "/pages/jiuzhai/jz_SureOrder" url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData)
}); });
} else { } else {
......
<style> <style>
.jz_SureOrder{
position: relative;
}
.jz_SureTop{ .jz_SureTop{
width: 100%; width: 100%;
box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13); box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13);
...@@ -21,11 +24,62 @@ ...@@ -21,11 +24,62 @@
.jz_SureCommodity{ .jz_SureCommodity{
padding:30rpx 0; padding:30rpx 0;
display: flex; display: flex;
border-bottom:1px solid #E6E6E6;
}
.jzSureMoney{
color:#333333;
font-weight: bold;
font-size:20rpx;
}
.jz_SuOrder_img{
width: 100rpx;
height: 100rpx;
border-radius: 20rpx;
overflow: hidden;
flex-shrink: 0;
}
.jz_SuOrder_img img{
width:100%;
height:100%;
}
.jz_OrderNum{
color:#8F8F90;
font-size:24rpx;
margin-right:50rpx;
}
.jz_GoodName{
color:#333333;
font-size:28rpx;
width:70%;
margin-left:15px;
font-weight:bold;
}
.jz_OrderBold{
color:#08090E;
font-weight:bold;
}
.jz_PayDiv{
position: absolute;
width:90%;
margin:auto;
bottom:30rpx;
display:flex;
justify-content: space-between; justify-content: space-between;
} }
.jz_CancleBtn{
width:310rpx;
height:80rpx;
border:1px solid #111111;
border-radius: 16rpx;
color:#111111;
font-weight: bold;
text-align: center;
line-height: 80rpx;
font-size: 28rpx;
}
</style> </style>
<template> <template>
<view class="jz_SureOrder"> <view class="jz_SureOrder" style="height:100vh;">
<view class="jz_SureTop"> <view class="jz_SureTop">
<view style="display:flex;align-items: center;"> <view style="display:flex;align-items: center;">
<img style="width:53rpx;height:53rpx;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dfk.png" alt="" /> <img style="width:53rpx;height:53rpx;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dfk.png" alt="" />
...@@ -34,8 +88,46 @@ ...@@ -34,8 +88,46 @@
</view> </view>
<view class="jz_SureContent"> <view class="jz_SureContent">
<view class="jz_SureCommodity"> <view class="jz_SureCommodity">
<view></view> <view class="jz_SuOrder_img">
<view></view> <img mode="aspectFill" :src="orderData.CoverImg" alt="" />
</view>
<view style="display:flex;justify-content: space-between;">
<view class="jz_GoodName">
{{orderData.GoodsName}}
</view>
<view class="jzSureMoney">
<text style="font-size:20rpx;margin-right:10rpx;">¥</text>
<text style="font-size:28rpx;">{{orderData.PreferPrice}}</text>
</view>
</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">订单编号</view>
<view class="jz_OrderBold">{{orderData.OrderNo}}</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">下单时间</view>
<view class="jz_OrderBold">{{orderData.CreateDate}}</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">支付方式</view>
<view class="jz_OrderBold"></view>
</view>
<view class="jz_SureCommodity" style="justify-content: space-between;">
<view class="jz_OrderNum">商品总额</view>
<view><text style="margin-right:10rpx;">¥</text>{{orderData.PreferPrice}}</view>
</view>
<view class="jz_SureCommodity" style="justify-content: flex-end;">
<view style="color:#08090E;font-size:28rpx;">实付款:</view>
<view style="color:#F20707;font-weight: bold;">
<text style="font-size:22rpx;margin-right:10rpx;">¥</text>
<text style="font-size:28rpx;">{{orderData.PreferPrice}}</text>
</view>
</view>
<view class="jz_PayDiv">
<view class="jz_CancleBtn">取消</view>
<view class="jz_CancleBtn" @click="goZhifu()" style="background-color: #111111;color:#fff;">去付款</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -56,29 +148,66 @@ ...@@ -56,29 +148,66 @@
pageIndex:1, pageIndex:1,
pageSize:15, pageSize:15,
MiniAppUserId:0 MiniAppUserId:0
} },
orderData:{}
}; };
}, },
created() { created() {
this.getOrderInfo();
}, },
onLoad(option) { onLoad(option) {
if(option.orderData){
this.orderData= JSON.parse(decodeURIComponent(option.orderData))
}
console.log(this.orderData,'this.orderData');
}, },
methods: { methods: {
getOrderInfo(){ //支付
this.userInfo = uni.getStorageSync('mall_UserInfo'); goZhifu(){
this.msg.MiniAppUserId = this.userInfo.UserId let url='/api/WeChatPay/GetTravlePayInfo'
this.apipost("sellorder_post_GetMiniAppTravelOrderList", this.msg, let GoodsName = this.orderData.GoodsName;
res => { GoodsName = GoodsName.slice(0, 10)
if (res.resultCode == 1) { this.request2({
console.log(res,'数据'); url: url,
} else { data: {
OrderId:this.orderData.OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
} }
}, },
null res => {
let orderInfo = JSON.parse(res.data);
console.log(orderInfo)
this.goPay(orderInfo)
}
); );
},
goPay(orderInfo){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: orderInfo.timeStamp,
nonceStr: orderInfo.nonceStr,
package: orderInfo.package,
signType: orderInfo.signType,
paySign: orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
//todo
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment