fix: 更新API端点路径至v2版本
将/miniprogram/user/onlineCarHailing和/miniprogram/user等API端点路径更新为/v2/miniprogram/user/onlineCarHailing和/v2/miniprogram/user,以适配后端API的v2版本
This commit is contained in:
@@ -7,7 +7,7 @@ Page({
|
||||
code: ''
|
||||
},
|
||||
onLoad() {
|
||||
t.request('/miniprogram/coupons', {}, !0).then((res) => {
|
||||
t.request('/v2/miniprogram/coupons', {}, !0).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
tips: res.data.tips,
|
||||
@@ -23,7 +23,7 @@ Page({
|
||||
success: function (i) {
|
||||
console.log(i), wx.showLoading({
|
||||
title: ""
|
||||
}), e.globalData.qrcode = i.result, t.request("/miniprogram/identify", i, !0).then(function (t) {
|
||||
}), e.globalData.qrcode = i.result, t.request("/v2/miniprogram/identify", i, !0).then(function (t) {
|
||||
console.log("data", t), wx.hideLoading();
|
||||
// 保存设备编号
|
||||
getApp().globalData.devicecode = t.data.devicecode || getApp().globalData.devicecode;
|
||||
@@ -38,7 +38,7 @@ Page({
|
||||
startup: function () {
|
||||
if (getApp().globalData.devicecode) {
|
||||
// 已扫码,启动机器
|
||||
t.request('/miniprogram/machine/carwashcodestartup', { devicecode: getApp().globalData.devicecode, washcode: this.data.code }, !0).then((startRes) => {
|
||||
t.request('/v2/miniprogram/machine/carwashcodestartup', { devicecode: getApp().globalData.devicecode, washcode: this.data.code }, !0).then((startRes) => {
|
||||
if (startRes.code == 200) {
|
||||
wx.showToast({ title: startRes.message || '启动成功', icon: 'success' });
|
||||
// 跳转到洗车券列表页面
|
||||
@@ -73,7 +73,7 @@ Page({
|
||||
wx.showLoading({
|
||||
title: '兑换中...'
|
||||
})
|
||||
t.request('/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
|
||||
t.request('/v2/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user