getLanguage.js 251 B

123456789101112
  1. //获取用户选择的语言
  2. export async function getLanguage() {
  3. let language = "";
  4. await uni.getStorage({
  5. key: "language",
  6. success: function (res) {
  7. language = res.data;
  8. },
  9. });
  10. console.log(language);
  11. return language;
  12. }