diff --git a/miniprogram/pages/formid/formid.wxml b/miniprogram/pages/formid/formid.wxml
index 9140ba0..3a3b3f8 100644
--- a/miniprogram/pages/formid/formid.wxml
+++ b/miniprogram/pages/formid/formid.wxml
@@ -27,7 +27,7 @@
-
+
*
密码
@@ -36,7 +36,7 @@
-
+
*
确认密码
diff --git a/miniprogram/pages/home/home.js b/miniprogram/pages/home/home.js
index eb23a18..46f333b 100644
--- a/miniprogram/pages/home/home.js
+++ b/miniprogram/pages/home/home.js
@@ -48,6 +48,7 @@ Page({
// title: "加载中,请稍后",
// mask: true
// })
+ this.initLoad()
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js
index 9450170..8f77c9f 100644
--- a/miniprogram/pages/login/login.js
+++ b/miniprogram/pages/login/login.js
@@ -7,7 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
- userName: '',//13000000001
+ mobile: '',//17637262085
password: ''//123456
},
@@ -68,7 +68,7 @@ Page({
},
handleLogin () {
var that = this;
- if (that.data.userName == '') {
+ if (that.data.mobile == '') {
wx.showToast({
title: '请输入用户名',
icon: 'none',
@@ -92,11 +92,11 @@ Page({
var code = res.code;
if (code) {
var params = {
- username: that.data.userName,
+ mobile: that.data.mobile,
password: that.data.password,
wxCode: code
};
- api.userLogin(params).then( (res) =>{
+ api.getToken(params).then( (res) =>{
if (res.code == 0) {
wx.setStorageSync('token', res.data.token);
wx.setStorageSync('userTagKey', res.data.userTagKey);
@@ -122,9 +122,9 @@ Page({
// getToken(){
// },
- getUserName(e) {
+ getmobile(e) {
this.setData({
- userName: e.detail.value
+ mobile: e.detail.value
});
},
getPassword (e) {
diff --git a/miniprogram/pages/login/login.wxml b/miniprogram/pages/login/login.wxml
index fc8f107..f559272 100644
--- a/miniprogram/pages/login/login.wxml
+++ b/miniprogram/pages/login/login.wxml
@@ -10,7 +10,7 @@
-->
-
+
diff --git a/miniprogram/pages/my/my.js b/miniprogram/pages/my/my.js
index 6ec2c28..d332117 100644
--- a/miniprogram/pages/my/my.js
+++ b/miniprogram/pages/my/my.js
@@ -118,40 +118,25 @@ Page({
content: '确定退出登录',
success(res) {
if (res.confirm) {
- than.logout()
- // wx.showLoading({
- // title: "退出中,请稍后...",
- // mask: true,
- // success() {
- // setTimeout(() => {
- // wx.removeStorage({
- // key: 'token',
- // })
+ wx.showLoading({
+ title: "退出中,请稍后...",
+ mask: true,
+ success() {
+ setTimeout(() => {
+ wx.removeStorage({
+ key: 'token',
+ })
- // wx.reLaunch({
- // url: '/pages/login/login'
- // })
- // }, 1000)
- // }
- // })
+ wx.reLaunch({
+ url: '/pages/login/login'
+ })
+ }, 1000)
+ }
+ })
}
}
})
},
- logout(){
- api.logout().then(res=>{
- if(res.code === 0){
- wx.removeStorage({
- key: 'token',
- })
- wx.reLaunch({
- url: '/pages/login/login'
- })
- }
- }).catch(err=>{
- console.log(err);
- })
- },
tapchangeImg() {
const _this = this;
wx.chooseMedia({
diff --git a/miniprogram/subpages/centralHousehold/pages/centralHousehold/centralHousehold.wxml b/miniprogram/subpages/centralHousehold/pages/centralHousehold/centralHousehold.wxml
index 928c558..db9746a 100644
--- a/miniprogram/subpages/centralHousehold/pages/centralHousehold/centralHousehold.wxml
+++ b/miniprogram/subpages/centralHousehold/pages/centralHousehold/centralHousehold.wxml
@@ -1,6 +1,8 @@