@@ -49,7 +49,7 @@ | |||||
"text": "首页" | "text": "首页" | ||||
}, | }, | ||||
{ | { | ||||
"pagePath": "pages/cartest/cartest", | |||||
"pagePath": "pages/passCar/passCar", | |||||
"iconPath": "assets/img/pass1.png", | "iconPath": "assets/img/pass1.png", | ||||
"selectedIconPath": "assets/img/pass0.png", | "selectedIconPath": "assets/img/pass0.png", | ||||
"text": "停车" | "text": "停车" | ||||
@@ -166,7 +166,7 @@ var config = { | |||||
}, | }, | ||||
weapp: { | weapp: { | ||||
AppId: "wx0d61e1d3a179a34e" | |||||
AppId: "wx026ee7f6290aa336" | |||||
}, | }, | ||||
ErrorCode: { | ErrorCode: { | ||||
NICK_NOT_AUTH: 11004, | NICK_NOT_AUTH: 11004, | ||||
@@ -280,7 +280,13 @@ Page({ | |||||
.then(res => { | .then(res => { | ||||
wx.hideLoading() | wx.hideLoading() | ||||
console.log(res); | console.log(res); | ||||
if (!type) { | |||||
if (!type&&type!='free') { | |||||
wx.navigateTo({ | |||||
url: `/pages/order/detail/index?orderId=${ | |||||
orderId | |||||
}` | |||||
}); | |||||
} else if (type == 'free'){ | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/order/detail/index?orderId=${ | url: `/pages/order/detail/index?orderId=${ | ||||
orderId | orderId | ||||
@@ -490,16 +496,11 @@ Page({ | |||||
}) | }) | ||||
} else { | } else { | ||||
// 免费券 | // 免费券 | ||||
that.payOrderUpdate(orderId, "0", 1, '', 'fail'); | |||||
that.payOrderUpdate(orderId, "0", 1, '', 'free'); | |||||
wx.setStorage({ | wx.setStorage({ | ||||
key: 'couponNum', | key: 'couponNum', | ||||
data: "couponNum" | data: "couponNum" | ||||
}) | }) | ||||
wx.navigateTo({ | |||||
url: `/pages/order/detail/index?orderId=${ | |||||
that.data.orderId | |||||
}` | |||||
}); | |||||
// setTimeout(function () { | // setTimeout(function () { | ||||
// }, 1000) | // }, 1000) | ||||
// if (that.data.data.type == 5) { | // if (that.data.data.type == 5) { | ||||
@@ -153,7 +153,7 @@ Page({ | |||||
}); | }); | ||||
} else { | } else { | ||||
// 免费券 | // 免费券 | ||||
that.payOrderUpdate(orderId, "0", 1,'','fail') // 支付成功 | |||||
that.payOrderUpdate(orderId, "0", 1,'','free') // 支付成功 | |||||
wx.showToast({ | wx.showToast({ | ||||
title: "支付成功", | title: "支付成功", | ||||
duration: 2000, | duration: 2000, | ||||
@@ -177,7 +177,7 @@ Page({ | |||||
}) | }) | ||||
.then(res => { | .then(res => { | ||||
wx.hideLoading() | wx.hideLoading() | ||||
if (!type) { | |||||
if (!type&&type!='free') { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: "购买成功", | title: "购买成功", | ||||
duration: 2000, | duration: 2000, | ||||
@@ -197,6 +197,10 @@ Page({ | |||||
}, 1600); | }, 1600); | ||||
} | } | ||||
}); | }); | ||||
} else if (type == 'free'){ | |||||
wx.redirectTo({ | |||||
url: `/pages/order/detail/index?orderId=${orderId}` | |||||
}); | |||||
} | } | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
@@ -72,7 +72,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 待付款 显示立即购买的按钮 --> | <!-- 待付款 显示立即购买的按钮 --> | ||||
<view wx:if="{{order.orderStatus==0}}" class="buy-view app-border-top"> | |||||
<view wx:if="{{order.orderStatus==0&&order.salePrice!=0}}" class="buy-view app-border-top"> | |||||
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button> | <button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button> | ||||
</view> | </view> | ||||
<view class='game' bindtap="gotogame" wx-if="{{showIf}}"> | <view class='game' bindtap="gotogame" wx-if="{{showIf}}"> | ||||
@@ -57,7 +57,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</navigator> | </navigator> | ||||
<navigator url="/pages/cartest/cartest" open-type="switchTab"> | |||||
<navigator url="/pages/passCar/passCar" open-type="switchTab"> | |||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image class='icons' src="./../../assets/img/che.png" mode='widthFix'></image>智能停车</view> | <image class='icons' src="./../../assets/img/che.png" mode='widthFix'></image>智能停车</view> | ||||
@@ -12,7 +12,7 @@ | |||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.0.9", | "libVersion": "2.0.9", | ||||
"appid": "wx0d61e1d3a179a34e", | |||||
"appid": "wx026ee7f6290aa336", | |||||
"projectname": "C", | "projectname": "C", | ||||
"isGameTourist": false, | "isGameTourist": false, | ||||
"condition": { | "condition": { | ||||