diff --git a/config/config.js b/config/config.js
index c96a165..89f95ba 100755
--- a/config/config.js
+++ b/config/config.js
@@ -1,33 +1,41 @@
var url = 'https://ciformall.youlane.cn'
//var url = 'http://localhost:8001'
-var apiPrefix = url + '/C/';
+var apiPrefix = url + '/C/api';
var config = {
name: "富茂",
api: {
/**
* 接口用途:login
*/
- login: '/api/user/login',
+ login: '/user/login',
/**
* 授权后获取用户的昵称,unionId等信息
*/
- getUserInfo: '/api/user/getUserInfo',
+ getUserInfo: '/user/getUserInfo',
/**
* 接口用途:授权后获取用户的手机号
*/
- getUserPhone: '/api/user/getUserPhone',
+ getUserPhone: '/user/getUserPhone',
/**
* 优惠券查询
*/
- couponList: '/wxCoupon/list',
+ couponList: '/coupon/list',
/**
* 优惠券详情
*/
- couponDetail: '/wxCoupon/findById',
+ couponDetail: '/coupon/findById',
/**
- * 下单
+ * 下订单
*/
- orderSave: '/wxOrder/save',
+ orderSave: '/order/save',
+ /**
+ * 支付订单
+ */
+ payOrderCreate: '/pay/create',
+ /**
+ * 订单列表
+ */
+ orderSave: '/order/list',
},
weapp: {
diff --git a/pages/coupons/details/index.js b/pages/coupons/details/index.js
index 64c261d..39c7f53 100644
--- a/pages/coupons/details/index.js
+++ b/pages/coupons/details/index.js
@@ -16,7 +16,7 @@ Page({
})
})
},
- aaa(){
+ orderfunc(){
wx.showLoading({
title: '加载中...',
})
@@ -28,13 +28,19 @@ Page({
if (res.data.code == 200) {
wx.showToast({
title: '购买成功',
- })
- wx.navigateBack({
- delta: 2
+ duration: 2000
})
setTimeout(() => {
wx.hideToast();
}, 2000)
+ wx.navigateBack({
+ delta: 2
+ })
+ } else {
+ wx.showToast({
+ title: res.data.message,
+ duration: 3000
+ })
}
})
}
diff --git a/pages/coupons/details/index.wxml b/pages/coupons/details/index.wxml
index df72178..b759cef 100644
--- a/pages/coupons/details/index.wxml
+++ b/pages/coupons/details/index.wxml
@@ -42,5 +42,5 @@
每桌限用2张
-
+
\ No newline at end of file