diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue index 6b6e3c1..c88306e 100644 --- a/components/tabBar/tabBar.vue +++ b/components/tabBar/tabBar.vue @@ -53,18 +53,13 @@ }, onLoad() { this.aindex = this.msg - + }, onShow() { - + }, mounted() { - this.interval = setInterval(() => { - // this.getbottom() - }, 3000); - - console.log(this.aindex); this.aindex = this.msg }, methods:{ diff --git a/config.js b/config.js index 35fdfe2..90b7fd2 100644 --- a/config.js +++ b/config.js @@ -1,9 +1,10 @@ // 应用全局配置 module.exports = { // baseUrl: 'https://www.nuoyunr.com/admin-api', - baseUrl: 'http://192.168.31.130:48080/admin-api', + baseUrl: 'http://127.0.0.1:48080/admin-api', imagesUrl: 'http://www.nuoyunr.com/lananRsc', baseImageUrl: 'https://www.nuoyunr.com/minio', + wsUrl: 'ws://127.0.0.1:48080', // 应用信息 appInfo: { // 应用名称 diff --git a/main.js b/main.js index c7d898e..d724e6b 100644 --- a/main.js +++ b/main.js @@ -18,6 +18,9 @@ let timerId; export function startSocketConnect(userId) { SocketTask = null SocketTask = connect(userId); + Vue.prototype.$msgSocket = SocketTask + console.log(SocketTask,211221); + console.log(uni.getStorageSync('userId'),21212); if (!timerId && uni.getStorageSync('userId')) { timerId = setInterval(() => { sendSocketMessage(SocketTask) @@ -31,7 +34,7 @@ export function closeSocketMain(userId) { } Vue.prototype.$startSocketConnect = startSocketConnect Vue.prototype.$closeSocketMain = closeSocketMain -Vue.prototype.$msgSocket = SocketTask + Vue.prototype.$imgeUrl = 'http://www.nuoyunr.com/lananRsc'; // #ifndef VUE3 diff --git a/pages/Login/login.vue b/pages/Login/login.vue index 46f65a8..6c76312 100644 --- a/pages/Login/login.vue +++ b/pages/Login/login.vue @@ -222,7 +222,7 @@ uni.setStorageSync('roleSelect','worker') uni.setStorageSync('userId',res.data.user.id) uni.hideLoading(); - this.$startSocketConnect() + this.$startSocketConnect(res.data.user.id) uni.redirectTo({ url:'/pages/staff/staff' }) diff --git a/pages/index/orderdetails.vue b/pages/index/orderdetails.vue index 60f91a4..f50cd20 100644 --- a/pages/index/orderdetails.vue +++ b/pages/index/orderdetails.vue @@ -93,14 +93,22 @@ {{index +1}} - {{ item.title }} + {{ item.title }} {{ item.createTime }} - + + {{ item.content }} + + + + + + + - + @@ -659,7 +667,7 @@ box-sizing: border-box; width: 100%; height: 100%; - background: #F4F4F4; + background: #fff; } .top-heder { @@ -699,6 +707,11 @@ box-sizing: border-box; padding: 10px; background: white; + padding-bottom: 0px; + padding-top: 0px; + margin-top: 0px; + margin-bottom: 0px; + // display: flex; // align-items: center; // justify-content: center; @@ -829,6 +842,7 @@ } .times { + width: 30%; font-size: 15px; font-weight: 400; color: #999999; @@ -1071,11 +1085,13 @@ } .xb_ { - width: 35px; + + width: 13%; height: 35px; display: flex; align-items: center; - justify-content: center; + box-sizing: border-box; + padding-left: 10px; color: #0D2E8D; font-size: 22px; font-weight: bold; diff --git a/pages/staff/staff.vue b/pages/staff/staff.vue index 353bcd3..e57ce9b 100644 --- a/pages/staff/staff.vue +++ b/pages/staff/staff.vue @@ -124,8 +124,12 @@ export default { } }, onLoad() { + console.log(6060606); + this.$startSocketConnect(uni.getStorageSync('userId')) + this.msgInfo() }, onShow() { + console.log( this.$msgSocket,131); this.getList() }, watch: {