This commit is contained in:
2019-12-19 14:18:09 +08:00
parent c3addc7383
commit f51effaf09
3 changed files with 59 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
// pages/personal/personal.js
// pages/personal/personal.js.
import {request} from "../../utils/bin"
Page({
/**
@@ -13,9 +14,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.setData({
openid:wx.getStorageSync("openid")
})
},
toorder() {
wx.navigateTo({
@@ -57,6 +56,13 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
login(){
if(this.data.openid == ""){
wx.navigateTo({
url:"/pages/login/login"
})
}
},
onReady: function() {
},
@@ -65,7 +71,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.setData({
openid:wx.getStorageSync("openid")
})
request({
url:"User/validateOpenid"
}).then((res)=>{
console.log(res)
})
},
/**