udid.js 274 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import Taro from '@tarojs/taro'; import uuid from './uuid'; export default { get() { let udid = Taro.getStorageSync('udid'); if (udid) { return udid; } udid = uuid().replace(/-/g, ''); Taro.setStorageSync('udid', udid); return udid; } };