fix(duiquan): 调整输入框样式及启动成功后的跳转逻辑
调整输入框的样式,增加高度和行高,并修改启动成功后的跳转逻辑,使用 `redirectTo` 替代 `navigateTo`,避免页面堆栈问题
This commit is contained in:
parent
7b5e501e6c
commit
0fd71a66ec
@ -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' });
|
||||
}
|
||||
});
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user