bugfix 一个url错误,还有登录检查数据

wechat_user_type
Ge Hao 7 years ago
parent 3778f43d2d
commit 492656c66c
  1. 2
      app.js
  2. 9
      pages/mine/mine.js

@ -86,7 +86,7 @@ App({
}
that.globalData.token = token
that.request({
url: `${that.globalData.API_URL}/sessions/new`,
url: `${that.globalData.API_URL}/sessions/login`,
data: {code: that.globalData.code},
success: function(res) {
if (!res.data.token) {

@ -100,6 +100,7 @@ Page({
bindLoginMobilecode: function(e) {
if (!this.bindCheckMobile(this.data.mobile)) { return }
if (!(e.detail.value.code && e.detail.value.code.length === 4)) { return }
wx.showToast({
title: '登录中...',
icon: 'loading',
@ -112,6 +113,14 @@ Page({
bindLoginPassword: function(e) {
var mobile = e.detail.value.mobile
if (!this.bindCheckMobile(mobile)) { return }
if (!e.detail.value.password) {
wx.showModal({
title: '错误',
content: '请输入密码'
})
return
}
wx.showToast({
title: '登录中...',
icon: 'loading',

Loading…
Cancel
Save