Преглед изворни кода

[订单][修复]:订单下单接口问题,token启用

tags/2.2.4
Stormeye.Wu пре 6 година
родитељ
комит
333f9fa5ac
3 измењених фајлова са 27 додато и 13 уклоњено
  1. +16
    -8
      config/config.js
  2. +10
    -4
      pages/coupons/details/index.js
  3. +1
    -1
      pages/coupons/details/index.wxml

+ 16
- 8
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: {


+ 10
- 4
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
})
}
})
}

+ 1
- 1
pages/coupons/details/index.wxml Прегледај датотеку

@@ -42,5 +42,5 @@
<text><text class='spot'></text>每桌限用2张</text>
</view>
</view>
<button bindtap='aaa' class='buy'>立即购买</button>
<button bindtap='orderfunc' class='buy'>立即购买</button>
</view>

Loading…
Откажи
Сачувај