| 1234567891011121314151617181920212223242526272829303132 | function showModel(data, content) {    wx.setStorageSync('qrCodeMsg', data);    wx.showModal({        title: '提示',        content: content,        showCancel: false,        success: (res => {            if (res.confirm) wx.reLaunch({                url: '/pages/login/index',            })        })    });}//解析二维码链接function setDataUrl(url, login) {    let q = url;    console.log("q", q);    const data = {        type: q.slice(q.indexOf("type=") + 5, q.indexOf('&')),        id: q.slice(q.lastIndexOf('=') + 1),        name: q.slice(q.lastIndexOf('fbrand=') + 7, q.lastIndexOf('&'))    }    if (!wx.getStorageSync('userData').token) {        return showModel(data, '当前未登录,请登录后进入!')    } else if (login) {        return showModel(data, '登录状态已过期,请重新登陆!')    };    return data;}module.exports = {    setDataUrl}
 |