From 36218aa3980d1b690ae543dc2ae78967a73b7b49 Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Tue, 11 Dec 2018 19:40:32 +0800
Subject: [PATCH] =?UTF-8?q?[=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=EF=BC=8C?=
=?UTF-8?q?=E5=88=B8=E8=AF=A6=E6=83=85=E5=85=8D=E8=B4=B9=E5=88=B8=E9=A2=86?=
=?UTF-8?q?=E5=8F=96=E6=88=90=E5=8A=9F=E4=BB=A5=E5=90=8E=E7=9A=84=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 +-
config/config.js | 2 +-
pages/coupon/detail/index.js | 15 ++++++++-------
pages/order/detail/index.js | 8 ++++++--
pages/order/detail/index.wxml | 2 +-
pages/user/index.wxml | 2 +-
project.config.json | 2 +-
7 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/app.json b/app.json
index 7395f46..2b54b22 100644
--- a/app.json
+++ b/app.json
@@ -49,7 +49,7 @@
"text": "首页"
},
{
- "pagePath": "pages/cartest/cartest",
+ "pagePath": "pages/passCar/passCar",
"iconPath": "assets/img/pass1.png",
"selectedIconPath": "assets/img/pass0.png",
"text": "停车"
diff --git a/config/config.js b/config/config.js
index c2581e8..74bd335 100755
--- a/config/config.js
+++ b/config/config.js
@@ -166,7 +166,7 @@ var config = {
},
weapp: {
- AppId: "wx0d61e1d3a179a34e"
+ AppId: "wx026ee7f6290aa336"
},
ErrorCode: {
NICK_NOT_AUTH: 11004,
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 5c7eee8..84d638e 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -280,7 +280,13 @@ Page({
.then(res => {
wx.hideLoading()
console.log(res);
- if (!type) {
+ if (!type&&type!='free') {
+ wx.navigateTo({
+ url: `/pages/order/detail/index?orderId=${
+ orderId
+ }`
+ });
+ } else if (type == 'free'){
wx.navigateTo({
url: `/pages/order/detail/index?orderId=${
orderId
@@ -490,16 +496,11 @@ Page({
})
} else {
// 免费券
- that.payOrderUpdate(orderId, "0", 1, '', 'fail');
+ that.payOrderUpdate(orderId, "0", 1, '', 'free');
wx.setStorage({
key: 'couponNum',
data: "couponNum"
})
- wx.navigateTo({
- url: `/pages/order/detail/index?orderId=${
- that.data.orderId
- }`
- });
// setTimeout(function () {
// }, 1000)
// if (that.data.data.type == 5) {
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index b917686..81bf686 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -153,7 +153,7 @@ Page({
});
} else {
// 免费券
- that.payOrderUpdate(orderId, "0", 1,'','fail') // 支付成功
+ that.payOrderUpdate(orderId, "0", 1,'','free') // 支付成功
wx.showToast({
title: "支付成功",
duration: 2000,
@@ -177,7 +177,7 @@ Page({
})
.then(res => {
wx.hideLoading()
- if (!type) {
+ if (!type&&type!='free') {
wx.showToast({
title: "购买成功",
duration: 2000,
@@ -197,6 +197,10 @@ Page({
}, 1600);
}
});
+ } else if (type == 'free'){
+ wx.redirectTo({
+ url: `/pages/order/detail/index?orderId=${orderId}`
+ });
}
})
.catch(err => {
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 2795714..5b0a558 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -72,7 +72,7 @@
-
+
diff --git a/pages/user/index.wxml b/pages/user/index.wxml
index 66009e2..c497bf3 100644
--- a/pages/user/index.wxml
+++ b/pages/user/index.wxml
@@ -57,7 +57,7 @@
-
+
智能停车
diff --git a/project.config.json b/project.config.json
index 91bb4e9..0286e72 100644
--- a/project.config.json
+++ b/project.config.json
@@ -12,7 +12,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.0.9",
- "appid": "wx0d61e1d3a179a34e",
+ "appid": "wx026ee7f6290aa336",
"projectname": "C",
"isGameTourist": false,
"condition": {