|
@@ -12,14 +12,14 @@
|
|
|
<!-- 检查 -->
|
|
|
<view v-if="stepIndex===1" class="step-item step-two">
|
|
|
<view class="item top">
|
|
|
- <text>-请完成以下操作-</text>
|
|
|
+ <text class="item-text">-请完成以下操作-</text>
|
|
|
<image src="/static/img/cztis.png" mode="aspectFit"></image>
|
|
|
<view class="care">
|
|
|
注意:洗车过程中禁止移动车辆和上下车
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item bottom">
|
|
|
- <text>超高加装件不能清洗</text>
|
|
|
+ <text class="item-text">超高加装件不能清洗</text>
|
|
|
<image src="/static/img/zyts.png" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -294,10 +294,10 @@
|
|
|
if (res.status==200) {
|
|
|
let data = res.data
|
|
|
// 保存成功后 请求预支付返回吊起微信支付所需参数
|
|
|
- // this.getPayData(data)
|
|
|
- uni.redirectTo({
|
|
|
- url:`/pages/work/index/index?washCarType=${data.itemCode}&orderNo=${data.orderNo}`
|
|
|
- })
|
|
|
+ this.getPayData(data)
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url:`/pages/work/index/index?washCarType=${data.itemCode}&orderNo=${data.orderNo}`
|
|
|
+ // })
|
|
|
} else {
|
|
|
uni.hideLoading()
|
|
|
// 刷新服务项
|
|
@@ -313,24 +313,32 @@
|
|
|
uni.hideLoading()
|
|
|
if (res.status == 200) {
|
|
|
let data = res.data
|
|
|
- uni.requestPayment({
|
|
|
- provider: 'wxpay',
|
|
|
- timeStamp: data.timeStamp,
|
|
|
- nonceStr: data.nonceStr,
|
|
|
- package: data.package,
|
|
|
- signType: data.signType,
|
|
|
- paySign: data.paySign,
|
|
|
- success: function (res) {
|
|
|
- console.log('success:' + JSON.stringify(res));
|
|
|
- // 付款成功后开始洗车
|
|
|
- uni.redirectTo({
|
|
|
- url:`/pages/work/index/index?washCarType=${data.itemCode}&orderNo=${data.orderNo}`
|
|
|
- })
|
|
|
- },
|
|
|
- fail: function (err) {
|
|
|
- console.log('fail:' + JSON.stringify(err));
|
|
|
- }
|
|
|
- });
|
|
|
+ // 0元订单直接支付成功,不用吊微信支付
|
|
|
+ if (data.tradeStatus && data.tradeStatus=="PAID") {
|
|
|
+ // 付款成功后开始洗车
|
|
|
+ uni.redirectTo({
|
|
|
+ url:`/pages/work/index/index?washCarType=${data.itemCode}&orderNo=${data.orderNo}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.requestPayment({
|
|
|
+ provider: 'wxpay',
|
|
|
+ timeStamp: data.timeStamp,
|
|
|
+ nonceStr: data.nonceStr,
|
|
|
+ package: data.package,
|
|
|
+ signType: data.signType,
|
|
|
+ paySign: data.paySign,
|
|
|
+ success: function (res) {
|
|
|
+ console.log('success:' + JSON.stringify(res));
|
|
|
+ // 付款成功后开始洗车
|
|
|
+ uni.redirectTo({
|
|
|
+ url:`/pages/work/index/index?washCarType=${data.itemCode}&orderNo=${data.orderNo}`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: function (err) {
|
|
|
+ console.log('fail:' + JSON.stringify(err));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.toashMsg(res.message)
|
|
|
}
|
|
@@ -383,18 +391,19 @@
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
- // margin-top: 20rpx;
|
|
|
- // padding-top: 20rpx;
|
|
|
image{
|
|
|
width: 80%;
|
|
|
flex: 1;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
.top{
|
|
|
text{
|
|
|
color: #df928e;
|
|
|
font-size: 24rpx;
|
|
|
- // margin-top: 20rpx;
|
|
|
+ }
|
|
|
+ .item-text{
|
|
|
+ padding-top: 20rpx;
|
|
|
}
|
|
|
.care{
|
|
|
padding: 10rpx 20rpx;
|
|
@@ -409,8 +418,9 @@
|
|
|
text{
|
|
|
font-size: 24rpx;
|
|
|
color: #333;
|
|
|
+ }
|
|
|
+ .item-text{
|
|
|
padding-top: 20rpx;
|
|
|
- // margin-top: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|