| 123456789101112131415161718192021222324252627282930313233 |
- function getbindid(options, store) {
- /* 通过分享小程序进入 */
- if (options.pid) {
- let pid = uni.getStorageSync('sys_pid');
- if (pid == '') {
- uni.setStorageSync('sys_pid', options.pid)
- } else {
- if (options.pid != '' && options.pid != pid) {
- uni.setStorageSync('sys_pid', options.pid)
- }
- }
- console.log('通过分享小程序进入首页1', options)
- }
- /* 通过扫推广小程序码进入首页 */
- if (options.scene) {
- const scene = decodeURIComponent(options.scene)
- if (scene) {
- let pid = uni.getStorageSync('sys_pid');
- if (pid == '') {
- uni.setStorageSync('sys_pid', scene)
- } else {
- if (scene != '' && scene != pid) {
- uni.setStorageSync('sys_pid', scene)
- }
- }
- }
- console.log('通过分享小程序进入首页2', uni.getStorageSync('sys_pid'))
- }
- }
- module.exports = {
- getbindid
- }
|