Browse Source

修改登录成功后跳转页面

master
王健 4 years ago
parent
commit
d180485d7c
  1. 26
      pages/auth/auth.js
  2. 10
      pages/calculation-detail/calculation-detail.js

26
pages/auth/auth.js

@ -78,7 +78,7 @@ Page({
)
setTimeout(() => {
wx.switchTab({
url: '/pages/index/index'
url: '/pages/look/look'
})
}, 1500)
}
@ -141,7 +141,7 @@ Page({
console.log(res);
setTimeout(() => {
wx.switchTab({
url: '/pages/index/index'
url: '/pages/look/look'
})
}, 1500)
})
@ -150,26 +150,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// var that = this;
// // 查看是否授权
// wx.getSetting({
// success: function (res) {
// console.log(res)
// if (res.authSetting['scope.userInfo']) {
// wx.getUserInfo({
// success: function (res) {
// console.log(res)
// //从数据库获取用户信息
// that.queryUsreInfo();
// //用户已经授权过
// // wx.switchTab({
// // url: '/pages/index/index'
// // })
// }
// });
// }
// }
// })
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -186,7 +166,7 @@ Page({
console.log(token)
if (token && token != '') {
wx.switchTab({
url: "/pages/index/index",
url: "/pages/look/look",
})
}
;

10
pages/calculation-detail/calculation-detail.js

@ -81,15 +81,7 @@ function initChart(canvas, width, height, dpr) {
}
Page({
onShareAppMessage: function (res) {
return {
title: 'ECharts 可以在微信小程序中使用啦!',
path: '/pages/index/index',
success: function () {
},
fail: function () {
}
}
onShareAppMessage: function () {
},
data: {
ec: {

Loading…
Cancel
Save