代码拉取完成,页面将自动刷新
<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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。