diff --git a/app.js b/app.js
index 45ce375..d24175a 100644
--- a/app.js
+++ b/app.js
@@ -98,7 +98,7 @@ App({
openid:null
},
serverUrl: 'https://safeyun.ctcshe.com/',
- //serverUrl: 'http://127.0.0.1:8002/',
+ //serverUrl: 'http://127.0.0.1:8000/',
//serverUrl: 'http://10.21.28.148:8000/',
//serverUrl: 'http://192.168.0.103:8000/',
//serverUrl:'http://10.0.11.195:8000/',
diff --git a/pages/bind/binduser.js b/pages/bind/binduser.js
index dae467c..245c0dc 100644
--- a/pages/bind/binduser.js
+++ b/pages/bind/binduser.js
@@ -56,6 +56,46 @@ Page({
}
});
},
+ denglu2: function(){
+ var data = this.data
+ data.username = 'test4'
+ data.password = 'q4'
+ wx.request({
+ url: getApp().globalData.serverUrl + 'bindmp',
+ header: {
+ 'content-type': 'application/json', //
+ },
+ method: 'POST',
+ data:data,
+ success: res => {
+ if (res.statusCode === 200) {
+ if (res.data.code == 1) {
+ wx.showToast({})
+ getApp().globalData.userInfo = {
+ userid: 0,
+ username: '',
+ name: '',
+ isaqy: 0,
+ mpopenid: '',
+ companyid: '',
+ perms: [],
+ openid:null
+ } //重置globaldata和session
+ getApp().mplogin()
+ wx.switchTab({
+ url: '/pages/main/main',
+ })
+ }else{
+ wx.showModal({
+ content: '账户或密码不正确!',
+ showCancel: false,
+ confirmText: "确定"
+ })
+ }
+ }
+ }
+ });
+ },
getUserbasic:function(){
var that = this
wx.request({
@@ -86,6 +126,12 @@ Page({
})
this.denglu()
},
+ onGetInfo2:function(e){
+ this.setData({
+ userInfo:e.detail.userInfo
+ })
+ this.denglu2()
+ },
/**
* 生命周期函数--监听页面加载
*/
diff --git a/pages/bind/binduser.wxml b/pages/bind/binduser.wxml
index fb1decb..c910680 100644
--- a/pages/bind/binduser.wxml
+++ b/pages/bind/binduser.wxml
@@ -30,6 +30,7 @@
账号错误或忘记密码?
+