Commit f467178f authored by zhengke's avatar zhengke

修改

parent 062fd75c
......@@ -597,8 +597,14 @@
goReserce(){
let myCurrentInfo = this.dataList.currentPriceInfo;
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({
url: "/pages/jiuzhai/jz_Reserve?currentPriceInfo="+JSON.stringify(myCurrentInfo)
url: "/pages/jiuzhai/jz_Reserve?currentPriceInfo="+encodeURIComponent(myCurr)
});
}
},
......
......@@ -108,7 +108,7 @@
</view>
<view style="display:flex;">
<view class="jz_MyOrder_img">
<img :src="getFirstImg(item.imgCover)" alt="" />
<img mode='aspectFill' :src="getFirstImg(item.imgCover)" alt="" />
</view>
<view class="jz_XiaDan">
<view>下单时间:{{item.createDate}}</view>
......
......@@ -152,7 +152,7 @@
created() {},
onLoad(option) {
if (option.currentPriceInfo) {
this.currentPriceInfo = JSON.parse(option.currentPriceInfo);
this.currentPriceInfo = JSON.parse(decodeURIComponent(option.currentPriceInfo))
}
},
methods: {
......@@ -252,8 +252,11 @@
this.apipost("sellorder_post_SetOrderInfoForB2B", msg,
res => {
if (res.resultCode == 1) {
let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data);
uni.navigateTo({
url: "/pages/jiuzhai/jz_SureOrder"
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData)
});
} else {
......
<style>
.jz_SureOrder{
position: relative;
}
.jz_SureTop{
width: 100%;
box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13);
......@@ -21,11 +24,62 @@
.jz_SureCommodity{
padding:30rpx 0;
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;
}
.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>
<template>
<view class="jz_SureOrder">
<view class="jz_SureOrder" style="height:100vh;">
<view class="jz_SureTop">
<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="" />
......@@ -34,8 +88,46 @@
</view>
<view class="jz_SureContent">
<view class="jz_SureCommodity">
<view></view>
<view></view>
<view class="jz_SuOrder_img">
<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>
......@@ -56,29 +148,66 @@
pageIndex:1,
pageSize:15,
MiniAppUserId:0
}
},
orderData:{}
};
},
created() {
this.getOrderInfo();
},
onLoad(option) {
if(option.orderData){
this.orderData= JSON.parse(decodeURIComponent(option.orderData))
}
console.log(this.orderData,'this.orderData');
},
methods: {
getOrderInfo(){
this.userInfo = uni.getStorageSync('mall_UserInfo');
this.msg.MiniAppUserId = this.userInfo.UserId
this.apipost("sellorder_post_GetMiniAppTravelOrderList", this.msg,
res => {
if (res.resultCode == 1) {
console.log(res,'数据');
} else {
//支付
goZhifu(){
let url='/api/WeChatPay/GetTravlePayInfo'
let GoodsName = this.orderData.GoodsName;
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
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