export const storagePaymentBack = (paymentBack) => { my.setStorageSync({ key: 'paymentBack', data: { paymentBack: paymentBack } }); } export const storageUid = (uid) => { my.setStorageSync({ key: 'uid', data: { uid: uid }, }); } export function objectToQueryString(obj) { return Object.keys(obj).map(key => { let value = obj[key]; // 处理数组情况 if (Array.isArray(value)) { value = value.map(v => encodeURIComponent(v)).join(','); } else { value = encodeURIComponent(value); } return `${encodeURIComponent(key)}=${value}`; }).join('&'); }