2 Star 0 Fork 0

laishui_nb/ershou_for_foront

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
App.vue 2.15 KB
一键复制 编辑 原始数据 按行查看 历史
杜常松 提交于 2024-02-22 10:45 . 项目初始化
<script>
const chatIM = require('./xilu/chat.js');
export default {
onLaunch: function() {
let app = this;
app.$core.onRequestComplete(function (ret, response) {
if(ret && ret.code===401) {
if(app.$core.getUserinfo()) {
app.$core.logout();
uni.navigateTo({url: '/pages/login/login'});
uni.showToast({title: '登录过期,请重新登录',icon:'none'});
}
}
});
setTimeout(function () {
// app初始化完成后再执行
let userinfo = app.$core.getUserinfo();
if (userinfo) {
app.globalData.userinfo = userinfo;
chatIM.connectSocket();
}
app.$core.get({url:'xilumarket.common/init_config',data:{},loading:false,success:(ret)=>{
app.globalData.config = ret.data.config;
app.globalData.chat_config.emoList = ret.data.emo
}})
//1.定位
app.$core.getLocation();
},1);
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
globalData: {
isIos: false,
platformStatus: 1,
statusBarHeight: 20,
//小程序配置的接口请求域名,为项目部署的服务器路径
appid: '',
//wsDomain: 'ws://xilumarket.com:8183',
wsDomain: 'wss://ershou.dayupintuan.com',
apiBaseUri: "https://ershou.dayupintuan.com/api",
////前端上传图片补全域名,如oss的https://xxxx.oss-cn-shanghai.aliyuncs.com,或https://your.site.com
storageBaseUri: "",
//阿里OSS的上传路径
uploadOssStatus: false,
alioss: {endpoint:''},
config:{
logo:''
},
userinfo:null,
chat_config: {
SocketTask: null,
Timer: null,
ErrorMsg: [],
MaxRetryCount: 30, // 最大重连次数
CurrentRetryCount: 0,
ortherdata: null, //其他通用数据
emoList:[], //表情
messageCount:0, //未读消息数
},
Event: {
CurrentCityChange: "currentCityChange",
CurrentCityChange2: "currentCityChange2"
},
defaultCity:{
id: 104,
name: '上海市'
},
},
}
</script>
<style>
/*每个页面公共css */
@import "@/static/style.css";
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/laishui_nb/ershou_for_foront.git
git@gitee.com:laishui_nb/ershou_for_foront.git
laishui_nb
ershou_for_foront
ershou_for_foront
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385