diff --git a/app.json b/app.json index f1bff44..490601a 100644 --- a/app.json +++ b/app.json @@ -103,5 +103,11 @@ "desc": "微笑榆山将获取您的位置信息" } }, + "plugins": { + "work-plugin": { + "version": "1.0.2", + "provider": "wx0301bf7f534d97d1" + } + }, "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 666d2c9..8b26426 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -451,6 +451,17 @@ Page({ url: '../../pages/login/login' }) }) + }, + toPlugin () { + let token = wx.getStorageSync('token') + api.getCustomId().then(res => { + if (res.code == 0 && res.msg == 'success') { + wx.navigateTo({ + url: `plugin://work-plugin/main?token=${token}&customerId=${res.data}`, + }); + } + }).catch(err => { + console.log(err) + }) } - }) \ No newline at end of file