1 Star 0 Fork 1

陈工/uniapp_init

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
App.vue 967 Bytes
一键复制 编辑 原始数据 按行查看 历史
陈工 提交于 2023-11-16 00:07 . 1
<script>
import store from '@/store/index.js'
export default {
onLaunch: function() {
this.defaultLogin();
},
methods: {
defaultLogin() {
uni.getStorage({
key: "token",
success: async (res) => {
if (res.data == "" || res.data == undefined || !res.data) return;
this.$initalToken(res.data);
store.commit('saveToken', res.data)
},
});
uni.getStorage({
key: "userInfo",
success: async (res) => {
if (res.data == "" || res.data == undefined || !res.data) return;
store.commit('saveUserInfo', res.data)
},
});
},
},
};
</script>
<style lang="scss">
.clock .uni-collapse-item {
border: 1px solid #ebeef5;
border-radius: 4px;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px;
background-color: #fff;
}
@import "@/uni_modules/uview-ui/index.scss";
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chen-lianwei1216/uniapp_init.git
git@gitee.com:chen-lianwei1216/uniapp_init.git
chen-lianwei1216
uniapp_init
uniapp_init
master

搜索帮助