udid.js 295 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import uuid from '../vendors/uuid'; import wx from '../utils/wx'; export default { get() { let udid = wx.getStorageSync('udid'); if (udid) { return udid; } udid = uuid(); wx.setStorageSync('udid', udid); return udid; } };