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.
38 lines
792 B
38 lines
792 B
<script>
|
|
import { mapMutations } from 'vuex';
|
|
import { delParam,delEmptyParam } from 'util/stringUtil.js';
|
|
export default {
|
|
onLaunch: async function(e) {
|
|
// #ifdef H5
|
|
if (e.query.usersn && e.query.token) {
|
|
this.login({ userSn: e.query.usersn, token: e.query.token });
|
|
var url = window.location.href;
|
|
url = delParam(url, 'usersn');
|
|
url = delParam(url, 'token');
|
|
if(url.indexOf('?&')>0)
|
|
{
|
|
url=url.replace('?&','?');
|
|
}
|
|
url=delEmptyParam(url);
|
|
window.location.href = url;
|
|
}
|
|
// #endif
|
|
|
|
console.log('App Launch');
|
|
},
|
|
onShow: function(e) {
|
|
console.log('App Show');
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide');
|
|
},
|
|
|
|
methods: {
|
|
...mapMutations('user', ['login'])
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "uview-ui/index.scss";
|
|
</style>
|
|
|