1234567891011121314151617181920212223242526272829303132 |
- import Notify from '../miniprogram_npm/@vant/weapp/notify/notify';
- module.exports={
- //是否登录
- isLogin:(data)=>{
- var token = wx.getStorageSync('token')
- console.log(token)
- if(token){
- return true
- }
-
- wx.showModal({
- title: '提示',
- content: '您未登录,请先登录',
- complete: (res) => {
- if (res.cancel) {
-
- }
-
- if (res.confirm) {
- wx.navigateTo({
- url: '/pages/login/login',
- })
- }
- }
- })
- return false
- },
- //提示
- notify:(obj)=>{
- Notify(obj)
- }
- }
|