73 lines
1.7 KiB
Vue
73 lines
1.7 KiB
Vue
|
<script>
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
import {
|
|||
|
getUserInfo,
|
|||
|
} from "@/api/user";
|
|||
|
|
|||
|
import {
|
|||
|
HTTP_REQUEST_URL
|
|||
|
} from './config/app';
|
|||
|
import {
|
|||
|
getconfig,
|
|||
|
history
|
|||
|
} from '@/api/public.js'
|
|||
|
|
|||
|
|
|||
|
export default {
|
|||
|
data() {
|
|||
|
return {
|
|||
|
|
|||
|
}
|
|||
|
},
|
|||
|
onLaunch: function(option) {
|
|||
|
|
|||
|
},
|
|||
|
onShow(option) {
|
|||
|
uni.sendHostEvent('live', option, (ret) => {
|
|||
|
//发送消息成功回调
|
|||
|
console.log('消息成功' + JSON.stringify(option.referrerInfo));
|
|||
|
});
|
|||
|
if (option.referrerInfo?.extraData?.uniMP) {
|
|||
|
uni.clearStorageSync();
|
|||
|
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
|
|||
|
this.$store.commit("LOGIN", {
|
|||
|
'token': option.referrerInfo?.extraData?.token,
|
|||
|
'time': 604800
|
|||
|
});
|
|||
|
this.GetUserInfo()
|
|||
|
|
|||
|
}
|
|||
|
},
|
|||
|
onHide: function() {
|
|||
|
|
|||
|
},
|
|||
|
|
|||
|
methods: {
|
|||
|
GetUserInfo() {
|
|||
|
getUserInfo().then(res => {
|
|||
|
this.$store.commit('SET_USERINFO', res.data);
|
|||
|
});
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
},
|
|||
|
}
|
|||
|
</script>
|
|||
|
<style lang="scss">
|
|||
|
/* #ifndef APP-PLUS-NVUE || APP-NVUE */
|
|||
|
|
|||
|
@import url("static/iconfont/iconfont.css");
|
|||
|
|
|||
|
@import 'static/css/base.css';
|
|||
|
|
|||
|
@import 'static/css/style.scss';
|
|||
|
/*#endif*/
|
|||
|
</style>
|