diff --git a/pages/duiquan/duiquan.js b/pages/duiquan/duiquan.js index 8068d58..53b393c 100644 --- a/pages/duiquan/duiquan.js +++ b/pages/duiquan/duiquan.js @@ -40,11 +40,15 @@ Page({ // 已扫码,启动机器 t.request('/miniprogram/machine/carwashcodestartup', { devicecode: getApp().globalData.devicecode, washcode: this.data.code }, !0).then((startRes) => { if (startRes.code == 200) { - wx.showToast({ title: '启动成功', icon: 'success' }); + wx.showToast({ title: startRes.message || '启动成功', icon: 'success' }); // 跳转到洗车券列表页面 - wx.navigateTo({ url: '/pages/washCodeList/washCodeList' }); + wx.redirectTo({ + url: "/pages/user/user" + }) } else { - wx.navigateTo({ url: '/pages/washCodeList/washCodeList' }); + wx.redirectTo({ + url: "/pages/washCodeList/washCodeList" + }); wx.showToast({ title: startRes.message || '启动失败', icon: 'none' }); } }); diff --git a/pages/duiquan/duiquan.wxss b/pages/duiquan/duiquan.wxss index 7142362..a41d302 100644 --- a/pages/duiquan/duiquan.wxss +++ b/pages/duiquan/duiquan.wxss @@ -20,11 +20,14 @@ .input { margin: 30rpx 0; - padding: 22rpx; + padding: 0 22rpx; + height: 88rpx; + line-height: 88rpx; border-radius: 10rpx; background-color: #fff; border: 2rpx solid #eee; box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1); + color: #333; } .tips { diff --git a/pages/washCodeList/washCodeList.js b/pages/washCodeList/washCodeList.js index a6568cf..ce4a16d 100644 --- a/pages/washCodeList/washCodeList.js +++ b/pages/washCodeList/washCodeList.js @@ -36,12 +36,12 @@ Page({ }, selectItem: function (t) { - + // 1. 提示用户先绑定设备, isScan if (!this.data.isScan) return wx.showModal({ title: "提示", content: "请先扫码设备~" - }),!1; + }), !1; var e = t.currentTarget.dataset, a = (e.index, e.code); @@ -124,6 +124,9 @@ Page({ }), e.request('/miniprogram/machine/carwashcodestartup', { washcode: a.data.selectID }, !0).then(function (t) { + // 成功后返回提示 + wx.showToast({ title: t.message || '启动成功', icon: 'success' }); + // 成功后跳转 a.isSubmit = !1, wx.hideLoading(), 200 == t.code && wx.redirectTo({ url: "/pages/user/user" });