You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.5 KiB
52 lines
1.5 KiB
<script>
|
|
import { VALID_LOGIN_STATUS } from "@/store/types/action-types";
|
|
import { SET_ROOT_FONT } from "@/store/types/muations-types";
|
|
|
|
export default {
|
|
globalData: {
|
|
pre_data: undefined,
|
|
spid: 0,
|
|
grade_id:0,
|
|
agent_id:0
|
|
},
|
|
onLaunch(options) {
|
|
this.$store.dispatch("app/" + VALID_LOGIN_STATUS);
|
|
this.$store.commit("app/" + SET_ROOT_FONT, { isInit: true });
|
|
|
|
const pre_data = this.$util.parseScene(options.query.scene);
|
|
this.globalData.pre_data = pre_data;
|
|
if (pre_data?.spread_uid) {
|
|
this.globalData.spid = pre_data.spread_uid;
|
|
}
|
|
if (options.query.agent_id) {
|
|
this.globalData.agent_id = options.query.agent_id;
|
|
uni.setStorageSync('agent_id',options.query.agent_id);
|
|
}
|
|
},
|
|
onShow(options) {
|
|
this.$store.commit("app/" + SET_ROOT_FONT, { isInit: false });
|
|
|
|
const pre_data = this.$util.parseScene(options?.query?.scene);
|
|
this.globalData.pre_data = pre_data;
|
|
if (pre_data?.spread_uid) {
|
|
this.globalData.spid = pre_data.spread_uid;
|
|
}
|
|
if (options.query.agent_id) {
|
|
this.globalData.agent_id = options.query.agent_id;
|
|
uni.setStorageSync('agent_id',options.query.agent_id);
|
|
}
|
|
/* #ifdef MP-TOUTIAO */
|
|
|
|
/* #endif */
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "@/static/style/reset.scss";
|
|
@import "@/static/style/base.scss";
|
|
@import "@/static/style/base2.scss";
|
|
@import "@/static/style/style.scss";
|
|
@import "@/static/style/iconfont.scss";
|
|
@import "@/static/style/iconfont2.scss";
|
|
</style>
|
|
|