refactor: 统一API路径前缀并更新静态资源域名
- 将所有API路径从'/v2/miniprogram'统一为'/miniprogram' - 更新静态资源域名从'http://jm.v0750.com'到'https://jm-static.v0750.com' - 在utils/login.js中设置统一的baseUrl为'https://t-jm.v0750.com/v3' - 移除不再使用的initial_url和baseUrl配置项
This commit is contained in:
1
.cloudbase/container/debug.json
Normal file
1
.cloudbase/container/debug.json
Normal file
@@ -0,0 +1 @@
|
||||
{"containers":[],"config":{}}
|
||||
@@ -37,8 +37,8 @@ Page({
|
||||
wx.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
|
||||
t.request('/v2/miniprogram/user/onlineCarHailing', { mobile }, !0).then((res) => {
|
||||
|
||||
t.request('/miniprogram/user/onlineCarHailing', { mobile }, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
wx.showToast({
|
||||
|
||||
@@ -7,7 +7,7 @@ Page({
|
||||
code: ''
|
||||
},
|
||||
onLoad() {
|
||||
t.request('/v2/miniprogram/coupons/index', {}, !0).then((res) => {
|
||||
t.request('/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/index", i, !0).then(function (t) {
|
||||
}), e.globalData.qrcode = i.result, t.request("/miniprogram/identify/index", i, !0).then(function (t) {
|
||||
console.log("data", t), wx.hideLoading();
|
||||
// 保存设备编号
|
||||
getApp().globalData.deviceData = t.data || getApp().globalData.deviceData || {};
|
||||
@@ -45,7 +45,7 @@ Page({
|
||||
});
|
||||
|
||||
// 已扫码,启动机器
|
||||
t.request('/v2/miniprogram/' + getApp().globalData.deviceData.type + '/carwashcodestartup', params, !0).then((startRes) => {
|
||||
t.request('/miniprogram/' + getApp().globalData.deviceData.type + '/carwashcodestartup', params, !0).then((startRes) => {
|
||||
if (startRes.code == 200) {
|
||||
wx.showToast({ title: startRes.message || '启动成功', icon: 'success' });
|
||||
// 跳转到洗车券列表页面
|
||||
@@ -81,7 +81,7 @@ Page({
|
||||
wx.showLoading({
|
||||
title: '兑换中...'
|
||||
})
|
||||
t.request('/v2/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
|
||||
t.request('/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(),
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(),
|
||||
require("../../utils/login.js")), i = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
@@ -39,7 +39,7 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return s, e.prev = 1, e.next = 4, n.request(n.baseUrl + "shop/details", {
|
||||
return s, e.prev = 1, e.next = 4, n.request("/shop/details", {
|
||||
id: s.data.id
|
||||
}, !0);
|
||||
|
||||
@@ -76,7 +76,7 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ],
|
||||
r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ],
|
||||
i = 0, s = 0;
|
||||
|
||||
case 5:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(),
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
@@ -43,7 +43,7 @@ Page({
|
||||
page: 1
|
||||
});
|
||||
var t = this.data.historyList.indexOf(this.data.kw);
|
||||
t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw),
|
||||
t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw),
|
||||
this.setData({
|
||||
historyList: this.data.historyList
|
||||
}), this.getData();
|
||||
@@ -64,12 +64,12 @@ Page({
|
||||
case 2:
|
||||
return r.setData({
|
||||
loading: !0
|
||||
}), r, t.prev = 4, t.next = 7, s.request(s.baseUrl + "shop/search", {
|
||||
}), r, t.prev = 4, t.next = 7, s.request("/shop/search", {
|
||||
keyword: r.data.kw
|
||||
}, !0);
|
||||
|
||||
case 7:
|
||||
n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1,
|
||||
n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1,
|
||||
o.data.forEach(function(t) {
|
||||
var a = t.price.split("."), i = e(a, 2);
|
||||
t.price_buck = i[0], t.price_cent = i[1];
|
||||
|
||||
@@ -41,7 +41,7 @@ Page({
|
||||
e.globalData.latitude = res.latitude;
|
||||
e.globalData.longitude = res.longitude;
|
||||
// 获取网点列表
|
||||
t.request('/v2/miniprogram/branch/lists', {
|
||||
t.request('/miniprogram/branch/lists', {
|
||||
latitude: res.latitude || '',
|
||||
longitude: res.longitude || ''
|
||||
}, !0).then(function (res) {
|
||||
@@ -52,7 +52,7 @@ Page({
|
||||
},
|
||||
fail: function () {
|
||||
// 即使获取位置失败也加载网点列表,只是不传入经纬度参数
|
||||
t.request('/v2/miniprogram/branch/lists', {}, !0).then(function (res) {
|
||||
t.request('/miniprogram/branch/lists', {}, !0).then(function (res) {
|
||||
a.setData({
|
||||
wangdianList: res.data || []
|
||||
});
|
||||
@@ -70,7 +70,7 @@ Page({
|
||||
});
|
||||
|
||||
// 获取首页数据
|
||||
t.request('/v2/miniprogram/index/home', { method: 'GET' }, !0).then(function (e) {
|
||||
t.request('/miniprogram/index/home', { method: 'GET' }, !0).then(function (e) {
|
||||
a.setData({
|
||||
banner: e.data.banner,
|
||||
tmplIds: e.data.tmplIds,
|
||||
@@ -93,7 +93,7 @@ Page({
|
||||
getData: function () {
|
||||
var a = this;
|
||||
// 获取首页数据
|
||||
t.request('/v2/miniprogram/index/balance', e.globalData.deviceData, !0).then(function (e) {
|
||||
t.request('/miniprogram/index/balance', e.globalData.deviceData, !0).then(function (e) {
|
||||
a.setData({
|
||||
user: e.data || [],
|
||||
});
|
||||
@@ -164,7 +164,7 @@ Page({
|
||||
success: function (i) {
|
||||
console.log(i), wx.showLoading({
|
||||
title: ""
|
||||
}), e.globalData.qrcode = i.result, t.request("/v2/miniprogram/identify/index", i, !0).then(function (t) {
|
||||
}), e.globalData.qrcode = i.result, t.request("/miniprogram/identify/index", i, !0).then(function (t) {
|
||||
console.log("data", t), wx.hideLoading(),
|
||||
e.globalData.deviceData = t.data || e.globalData.deviceData || {};
|
||||
e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode;
|
||||
@@ -236,7 +236,7 @@ Page({
|
||||
var a = this;
|
||||
if (a.data.oneTimeLoading) return !1;
|
||||
a.setData({ oneTimeLoading: !0 });
|
||||
t.request('/v2/miniprogram/recharge/once', e.globalData.deviceData || {}, !0).then(function (res) {
|
||||
t.request('/miniprogram/recharge/once', e.globalData.deviceData || {}, !0).then(function (res) {
|
||||
a.setData({
|
||||
oneTimeOptions: res.data && res.data.list ? res.data.list : (res.data || []),
|
||||
showOneTimeOptions: !0,
|
||||
@@ -253,7 +253,7 @@ Page({
|
||||
var a = this, i = evt.currentTarget.dataset.id;
|
||||
if (!i) return !1;
|
||||
wx.showLoading({ title: "" });
|
||||
t.request('/v2/miniprogram/recharge/once/create', {
|
||||
t.request('/miniprogram/recharge/once/create', {
|
||||
id: i,
|
||||
devicecode: e.globalData.devicecode
|
||||
}, !0).then(function (res) {
|
||||
@@ -290,7 +290,7 @@ Page({
|
||||
success: function (i) {
|
||||
i.confirm && (a.isSubmit = !0, wx.showLoading({
|
||||
title: "正在启动"
|
||||
}), t.request('/v2/miniprogram/' + e.globalData.deviceData.type + '/startup', e.globalData.deviceData || {}, !0).then(function (e) {
|
||||
}), t.request('/miniprogram/' + e.globalData.deviceData.type + '/startup', e.globalData.deviceData || {}, !0).then(function (e) {
|
||||
a.isSubmit = !1, wx.hideLoading(), 200 == e.code && (wx.showModal({
|
||||
title: "",
|
||||
content: e.message
|
||||
|
||||
@@ -28,7 +28,7 @@ Page({
|
||||
var n = Object.assign(this.userInfo, t, {
|
||||
code: a
|
||||
});
|
||||
o.request('/v2/miniprogram/index/authorization', n, !0).then(function(o) {
|
||||
o.request('/miniprogram/index/authorization', n, !0).then(function(o) {
|
||||
if (wx.hideLoading(), console.log("toAuthorization", "app.globalData.needJumpUrl", e.globalData.needJumpUrl, o),
|
||||
200 != o.code) return wx.showModal({
|
||||
title: "提示",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(),
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
@@ -54,7 +54,7 @@ Page({
|
||||
return a.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return e, t.prev = 1, t.next = 4, r.request(r.baseUrl + "shop/home", {}, !0);
|
||||
return e, t.prev = 1, t.next = 4, r.request("/shop/home", {}, !0);
|
||||
|
||||
case 4:
|
||||
o = t.sent, (s = o.data).recommendedList.forEach(function(e) {
|
||||
@@ -99,7 +99,7 @@ Page({
|
||||
case 3:
|
||||
return s.setData({
|
||||
loading: !0
|
||||
}), e.prev = 4, e.next = 7, r.request(r.baseUrl + "shop/home/shopList", {
|
||||
}), e.prev = 4, e.next = 7, r.request("/shop/home/shopList", {
|
||||
type: s.data.tab,
|
||||
point: {
|
||||
lng: s.longitude,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
|
||||
require("../../utils/login.js")), a = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
@@ -26,12 +26,12 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request(t.baseUrl + "shop/order/detail", {
|
||||
return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request("/shop/order/detail", {
|
||||
orderid: o
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
|
||||
if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
|
||||
d.orderValidity && d.orderValidity.length > 0) for (c = 0; c < d.orderValidity.length; c++) i.data.orderValidity[c] = a.changeTime(new Date(1e3 * d.orderValidity[c]));
|
||||
i.setData({
|
||||
showLoding: !1,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
@@ -82,7 +82,7 @@ Page({
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/create", {
|
||||
return t.prev = 0, t.next = 3, a.request("/shop/order/create", {
|
||||
token: n.data.token
|
||||
}, !0);
|
||||
|
||||
@@ -119,7 +119,7 @@ Page({
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/num", {
|
||||
return t.prev = 0, t.next = 3, a.request("/shop/order/num", {
|
||||
uniqid: n.data.shoppingCartList.uniqid,
|
||||
cartnum: n.data.num
|
||||
}, !0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(),
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
@@ -70,7 +70,7 @@ Page({
|
||||
case 2:
|
||||
return r.setData({
|
||||
loading: !0
|
||||
}), t.prev = 3, t.next = 6, n.request(n.baseUrl + "shop/order/lists", {
|
||||
}), t.prev = 3, t.next = 6, n.request("/shop/order/lists", {
|
||||
page: r.data.next_page,
|
||||
typeid: r.data.tab
|
||||
}, !0);
|
||||
@@ -79,7 +79,7 @@ Page({
|
||||
s = t.sent, i = s.data, r.setData({
|
||||
loading: !1,
|
||||
showLoding: !1
|
||||
}), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1,
|
||||
}), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1,
|
||||
r.setData({
|
||||
type: i.type,
|
||||
count: i.count,
|
||||
@@ -108,7 +108,7 @@ Page({
|
||||
case 0:
|
||||
return s = a.currentTarget.dataset, i = s.orderid, o = s.index, wx.showLoading({
|
||||
title: "正在删除"
|
||||
}), t.prev = 2, t.next = 5, n.request(n.baseUrl + "shop/order/delete", {
|
||||
}), t.prev = 2, t.next = 5, n.request("/shop/order/delete", {
|
||||
orderid: i
|
||||
}, !0);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
require("../../utils/login.js")), r = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
@@ -41,7 +41,7 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return r, e.prev = 1, e.next = 4, a.request(a.baseUrl + "shop/order/submit", {
|
||||
return r, e.prev = 1, e.next = 4, a.request("/shop/order/submit", {
|
||||
uniqid: r.data.uniqid,
|
||||
name: r.data.name,
|
||||
mobile: r.data.mobile,
|
||||
@@ -74,15 +74,15 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request(a.baseUrl + "shop/order/detail", {
|
||||
return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request("/shop/order/detail", {
|
||||
orderid: s
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status),
|
||||
i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status),
|
||||
1 == o.orderData.status && wx.redirectTo({
|
||||
url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + o.orderData.orderid
|
||||
}), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)),
|
||||
}), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)),
|
||||
n.setData({
|
||||
showLoding: !1,
|
||||
ordercart: o.ordercart,
|
||||
@@ -143,7 +143,7 @@ Page({
|
||||
return e.abrupt("return", !1);
|
||||
|
||||
case 7:
|
||||
return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request(a.baseUrl + "shop/order/pay", {
|
||||
return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request("/shop/order/pay", {
|
||||
token: r.data.token,
|
||||
mark: r.data.tips
|
||||
}, !0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(),
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
require("../../utils/common.js");
|
||||
@@ -22,7 +22,7 @@ Page({
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request(i.baseUrl + "shop/notify/paymentSuccessful", {
|
||||
return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request("/shop/notify/paymentSuccessful", {
|
||||
orderid: a
|
||||
}, !0);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Page({
|
||||
title: '查询中...'
|
||||
})
|
||||
|
||||
t.request('/v2/miniprogram/refund/query', { mobile }, !0).then((res) => {
|
||||
t.request('/miniprogram/refund/query', { mobile }, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
@@ -70,7 +70,7 @@ Page({
|
||||
})
|
||||
return
|
||||
}
|
||||
t.request('/v2/miniprogram/pay/refund', {token: this.data.userInfo.token}, !0).then((res) => {
|
||||
t.request('/miniprogram/pay/refund', {token: this.data.userInfo.token}, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
wx.showToast({
|
||||
@@ -117,7 +117,7 @@ Page({
|
||||
})
|
||||
return
|
||||
}
|
||||
t.request('/v2/miniprogram/pay/refundOffline', {token: this.data.userInfo.token}, !0).then((res) => {
|
||||
t.request('/miniprogram/pay/refundOffline', {token: this.data.userInfo.token}, !0).then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code == 200) {
|
||||
wx.showToast({
|
||||
|
||||
@@ -34,7 +34,7 @@ Page({
|
||||
loading: true
|
||||
});
|
||||
|
||||
e.request('/v2/miniprogram/substituteWash/index', {}, true).then(function (res) {
|
||||
e.request('/miniprogram/substituteWash/index', {}, true).then(function (res) {
|
||||
a.setData({
|
||||
loading: false
|
||||
});
|
||||
@@ -93,7 +93,7 @@ Page({
|
||||
mask: true
|
||||
});
|
||||
|
||||
e.request('/v2/miniprogram/substituteWash/pay', { token: a.data.token }, true).then(function (res) {
|
||||
e.request('/miniprogram/substituteWash/pay', { token: a.data.token }, true).then(function (res) {
|
||||
wx.hideLoading();
|
||||
|
||||
if (res.code === 200) {
|
||||
|
||||
@@ -21,7 +21,7 @@ Page({
|
||||
var n = this;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), e.request('/v2/miniprogram/user', {}, !0).then(function (t) {
|
||||
}), e.request('/miniprogram/user', {}, !0).then(function (t) {
|
||||
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message
|
||||
@@ -65,13 +65,13 @@ Page({
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
wx.uploadFile({
|
||||
url: 'https://t-jm.v0750.com/miniprogram/upload',
|
||||
url: 'https://t-jm.v0750.com/miniprogram/user/upload',
|
||||
filePath: res.tempFiles[0].tempFilePath,
|
||||
name: 'file',
|
||||
success: function (uploadRes) {
|
||||
var data = JSON.parse(uploadRes.data);
|
||||
if (data.code == 200) {
|
||||
e.request('/v2/miniprogram/user/update', {
|
||||
e.request('/miniprogram/user/update', {
|
||||
avatar: data.data.url
|
||||
}, true).then(function (res) {
|
||||
if (res.code == 200) {
|
||||
@@ -102,7 +102,7 @@ Page({
|
||||
success: function (res) {
|
||||
if (res.confirm && res.content) {
|
||||
// 发送请求到后端,更新用户昵称
|
||||
e.request('/v2/miniprogram/user/update', {
|
||||
e.request('/miniprogram/user/update', {
|
||||
nickname: res.content
|
||||
}, true).then(function (res) {
|
||||
if (res.code == 200) {
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<view class="tel">{{user.mobile}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image class="xunzhang" mode="widthFix" src="http://jm.v0750.com/image/xunzhang.png" wx:if="{{user.groupid==6}}"></image>
|
||||
<image class="zhe" mode="widthFix" src="http://jm.v0750.com/image/zhe.png" wx:if="{{user.isdiscount}}"></image>
|
||||
<image class="xunzhang" mode="widthFix" src="https://jm-static.v0750.com/image/xunzhang.png" wx:if="{{user.groupid==6}}"></image>
|
||||
<image class="zhe" mode="widthFix" src="https://jm-static.v0750.com/image/zhe.png" wx:if="{{user.isdiscount}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-capital shadow">
|
||||
|
||||
@@ -100,7 +100,7 @@ Page({
|
||||
},
|
||||
// 获取网点详情信息
|
||||
getBranchDetail() {
|
||||
t.request('/v2/miniprogram/branch/detail', {
|
||||
t.request('/miniprogram/branch/detail', {
|
||||
number: this.data.number,
|
||||
latitude: wx.getStorageSync('latitude'),
|
||||
longitude: wx.getStorageSync('longitude'),
|
||||
@@ -118,7 +118,7 @@ Page({
|
||||
// 获取机器列表
|
||||
getMachineList() {
|
||||
|
||||
t.request('/v2/miniprogram/branch/machine', {
|
||||
t.request('/miniprogram/branch/machine', {
|
||||
number: this.data.number,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
||||
@@ -20,7 +20,7 @@ Page({
|
||||
var o = this;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), i.request('/v2/miniprogram/coupons/details', {
|
||||
}), i.request('/miniprogram/coupons/details', {
|
||||
id: this.data.id
|
||||
}, !0).then(function (e) {
|
||||
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
|
||||
@@ -40,7 +40,7 @@ Page({
|
||||
received: function () {
|
||||
if (this.isSubmit) return !1;
|
||||
var t = this;
|
||||
this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request('/v2/miniprogram/coupons/receive', {
|
||||
this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request('/miniprogram/coupons/receive', {
|
||||
id: t.data.id,
|
||||
token: t.data.info.token
|
||||
}, !0).then(function (e) {
|
||||
|
||||
@@ -59,7 +59,7 @@ Page({
|
||||
if (this.isloading) return !1;
|
||||
wx.showLoading(), this.setData({
|
||||
loading: !0
|
||||
}), this.isloading = !0, e.request('/v2/miniprogram/coupons/lists', { devicecode: t.globalData.devicecode }, !0).then(function (t) {
|
||||
}), this.isloading = !0, e.request('/miniprogram/coupons/lists', { devicecode: t.globalData.devicecode }, !0).then(function (t) {
|
||||
if (o.isloading = !1, o.setData({
|
||||
loading: !1
|
||||
}), wx.hideLoading(), 200 != t.code) return wx.showModal({
|
||||
@@ -86,7 +86,7 @@ Page({
|
||||
success: function (i) {
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), t.globalData.qrcode = i.result, e.request("/v2/miniprogram/identify/index", i, !0).then(function (e) {
|
||||
}), t.globalData.qrcode = i.result, e.request("/miniprogram/identify/index", i, !0).then(function (e) {
|
||||
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: e.message
|
||||
@@ -128,7 +128,7 @@ Page({
|
||||
|
||||
i.confirm && (a.isSubmit = !0, wx.showLoading({
|
||||
title: "正在启动"
|
||||
}), e.request('/v2/miniprogram/' + t.globalData.deviceData.type + '/carwashcodestartup', params, !0).then(function (t) {
|
||||
}), e.request('/miniprogram/' + t.globalData.deviceData.type + '/carwashcodestartup', params, !0).then(function (t) {
|
||||
// 成功后返回提示
|
||||
wx.showToast({ title: t.message || '启动成功', icon: 'success' });
|
||||
// 成功后跳转
|
||||
|
||||
@@ -19,7 +19,7 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
var a = this;
|
||||
e.request('/v2/miniprogram/index/balance', getApp().globalData.deviceData, !0).then(function (res) {
|
||||
e.request('/miniprogram/index/balance', getApp().globalData.deviceData, !0).then(function (res) {
|
||||
if (!res.data || !res.data.progressorder) {
|
||||
wx.showToast({
|
||||
title: '没有进行中的订单',
|
||||
@@ -117,7 +117,7 @@ Page({
|
||||
content: '确定要结算此次洗车订单吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
e.request('/v2/miniprogram/' + getApp().globalData.deviceData.type + '/shutdown', {
|
||||
e.request('/miniprogram/' + getApp().globalData.deviceData.type + '/shutdown', {
|
||||
orderid: this.data.orderid
|
||||
}, true).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
||||
@@ -11,11 +11,14 @@ function t() {
|
||||
}
|
||||
|
||||
function n(a) {
|
||||
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
||||
|
||||
|
||||
var baseUrl = "https://t-jm.v0750.com/v3";
|
||||
|
||||
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
||||
// a 是否 https, 如果不是自动补全
|
||||
if (!/^https/.test(a)) {
|
||||
a = 'https://t-jm.v0750.com' + a;
|
||||
a = baseUrl + a;
|
||||
}
|
||||
|
||||
// method 默认为 GET
|
||||
@@ -92,7 +95,7 @@ function n(a) {
|
||||
}
|
||||
|
||||
function c(e, a) {
|
||||
console.log("appstart", e), o = a, n("https://t-jm.v0750.com/v2/miniprogram/index", {
|
||||
console.log("appstart", e), o = a, n("/miniprogram/index", {
|
||||
code: e
|
||||
}, !0).then(function (e) {
|
||||
var o = e.data;
|
||||
@@ -103,7 +106,6 @@ function c(e, a) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
initial_url: "https://t-jm.v0750.com/miniprogram",
|
||||
login: t,
|
||||
request: n,
|
||||
pageStart: function (e) {
|
||||
@@ -120,9 +122,8 @@ module.exports = {
|
||||
c(res.code, e);
|
||||
});
|
||||
},
|
||||
baseUrl: "https://t-jm.v0750.com/",
|
||||
getDevicecode: function (e, a) {
|
||||
o = e, n("https://t-jm.v0750.com/v2/miniprogram/identify/reload", a, !0).then(function (e) {
|
||||
o = e, n("/miniprogram/identify/reload", a, !0).then(function (e) {
|
||||
var a = e.data;
|
||||
if (e.code == 200) {
|
||||
o.globalData.deviceData = a || {};
|
||||
|
||||
Reference in New Issue
Block a user