import {
  request
} from '../_utils/request';
import {
  setStorage,
  getStorage
} from '~/utils/storage'

/** 获取OpenId */
export function getOpenId(data) {
  return new Promise((resolve, reject) => {
    request({
      url: `WeChatLogin/getOpenId`,
      method: 'POST',
      data: data,
      success: async function (res) {
        wx.setStorageSync("openId",res);
        resolve(res);
      },
    });

  })

}