TA的每日心情 | 慵懒 4 天前 |
---|
签到天数: 27 天 [LV.4]偶尔看看III
|
多个版本的zhuce机,5.0,6,0,K3 Kingdee,
一起加油吧,
userNameInput: function (e) {
this.setData({
tel: e.detail.value
});
},
passWdInput: function (e) {
this.setData({
pwd: e.detail.value
});
},
//获取用户输入的密码
loginBtnClick: function (e) {
if (!this.tel || !this.pwd) {
uni.showToast({
title: '请输入用户和密码',
icon: 'none'
});
return;
}
var that = this; //提交
uni.request({
url: domain + "/stock/findAdmin",
method: "POST",
data: {
tel: '13714458262',
pwd: '123456'
},
success: function (res) {
if (res.data.code == 0) {
//登录成功 - 后记住密码
if (that.is_remember) {
var setUserLoginInfo = [{
'tel': that.tel,
'pwd': that.pwd
}]; //缓存
uni.setStorage({
key: "setUserLoginInfo",
data: setUserLoginInfo,
success: function () {}
});
}
var userid = res.data.data.userid; //userid全局存储
app.globalData.data.userid = userid; //跳转首页
// uni.reLaunch({
// url: '../index/index'
// });
} else {
uni.showToast({
title: res.data.msg,
icon: 'none'
});
}
setTimeout(function() {
uni.reLaunch({
url:'/pages/person/person'
})
// ({url: '/pages/person/person'});
})
},
});
},
//记住密码
rememberpwd: function (e) {
if (!this.tel || !this.pwd) return;
if (e.detail.value.length > 0) {
//被选中
this.setData({
is_remember: true
});
} else {
//未选中
this.setData({
is_remember: false
});
}
}
|
|