Преглед на файлове

[支付][修复]:微信支付接口调试通过

tags/2.2.4
Stormeye.Wu преди 6 години
родител
ревизия
059e1a3e37
променени са 4 файла, в които са добавени 18 реда и са изтрити 17 реда
  1. +3
    -3
      common/common.js
  2. +12
    -12
      config/config.js
  3. +2
    -1
      pages/coupons/details/index.js
  4. +1
    -1
      project.config.json

+ 3
- 3
common/common.js Целия файл

@@ -137,13 +137,13 @@ const func = {
wx.request({
url: config.api.orderSave,
header: {
"token": app.globalData.token
'token': app.globalData.token
},
method: "Post",
data: {
couponId: couponId,
token: app.globalData.token
},
method: "POST",
success: function (res) {
resolve(res)
},
@@ -163,11 +163,11 @@ const func = {
header: {
"token": app.globalData.token
},
method: "Post",
data: {
orderId: orderId,
token: app.globalData.token
},
method: "POST",
success: function (res) {
resolve(res)
},


+ 12
- 12
config/config.js Целия файл

@@ -1,45 +1,45 @@
var url = 'https://ciformall.youlane.cn'
//var url = 'http://localhost:8001'
var apiPrefix = url + '/C/api';
//var url = 'https://ciformall.youlane.cn'
var url = 'http://localhost:8001'
var apiPrefix = url + '/C';
var config = {
name: "富茂",
api: {
/**
* 接口用途:login
*/
login: '/user/login',
login: '/api/user/login',
/**
* 授权后获取用户的昵称,unionId等信息
*/
getUserInfo: '/user/getUserInfo',
getUserInfo: '/api/user/getUserInfo',
/**
* 接口用途:授权后获取用户的手机号
*/
getUserPhone: '/user/getUserPhone',
getUserPhone: '/api/user/getUserPhone',
/**
* 优惠券查询
*/
couponList: '/coupon/list',
couponList: '/wxCoupon/list',
/**
* 优惠券详情
*/
couponDetail: '/coupon/findById',
couponDetail: '/wxCoupon/findById',
/**
* 下订单
*/
orderSave: '/order/save',
orderSave: '/api/order/save',
/**
* 支付订单
*/
payOrderCreate: '/pay/create',
payOrderCreate: '/api/pay/create',
/**
* 订单列表
*/
orderSave: '/order/list',
orderList: '/api/order/list',
},

weapp: {
AppId: 'wx649b3be73c1afe47',
AppId: 'wx8eb8275b78db4ede',
}
};



+ 2
- 1
pages/coupons/details/index.js Целия файл

@@ -26,7 +26,8 @@ Page({
wx.hideLoading();
console.log(res)
if (res.data.code == 200) {
Common.payOrderCreate(res.data.data.id)

Common.payOrderCreate('' + res.data.data.id)
.then(res =>{
wx.requestPayment({
timeStamp: res.data.data.timeStamp,


+ 1
- 1
project.config.json Целия файл

@@ -12,7 +12,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.2.2",
"appid": "wx649b3be73c1afe47",
"appid": "wx8eb8275b78db4ede",
"projectname": "C",
"isGameTourist": false,
"condition": {


Зареждане…
Отказ
Запис