fix: 更新API端点路径以匹配v2版本规范

This commit is contained in:
XiaoMo 2025-06-24 21:57:14 +08:00
parent e6c9b1b01d
commit ea5ed7c9ce
4 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ Page({
code: ''
},
onLoad() {
t.request('/v2/miniprogram/coupons', {}, !0).then((res) => {
t.request('/v2/miniprogram/coupons/index', {}, !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("/v2/miniprogram/identify", i, !0).then(function (t) {
}), e.globalData.qrcode = i.result, t.request("/v2/miniprogram/identify/index", i, !0).then(function (t) {
console.log("data", t), wx.hideLoading();
// 保存设备编号
getApp().globalData.devicecode = t.data.devicecode || getApp().globalData.devicecode;

View File

@ -157,7 +157,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/index", i, !0).then(function (t) {
console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode,
a.setData({
isScan: !!t.data.devicecode
@ -205,7 +205,7 @@ Page({
success: function (i) {
i.confirm && (a.isSubmit = !0, wx.showLoading({
title: "正在启动"
}), t.request(e.globalData.config.machine.startup, {
}), t.request('/v2/miniprogram/machine/startup', {
washcode: a.data.selectID
}, !0).then(function (e) {
a.isSubmit = !1, wx.hideLoading(), 200 == e.code && (wx.showModal({

View File

@ -86,7 +86,7 @@ Page({
success: function (i) {
wx.showLoading({
title: ""
}), t.globalData.qrcode = i.result, e.request("/v2/miniprogram/identify", i, !0).then(function (e) {
}), t.globalData.qrcode = i.result, e.request("/v2/miniprogram/identify/index", i, !0).then(function (e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
title: "提示",
content: e.message

View File

@ -122,7 +122,7 @@ module.exports = {
},
baseUrl: "https://t-jm.v0750.com/",
getDevicecode: function (e, a) {
o = e, n("https://t-jm.v0750.com/miniprogram/identify/reload", a, !0).then(function (e) {
o = e, n("https://t-jm.v0750.com/v2/miniprogram/identify/reload", a, !0).then(function (e) {
var a = e.data;
console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
});