聊天-更新

This commit is contained in:
lnn19986213 2022-10-08 16:05:31 +08:00
parent fb38578b44
commit 3c29660415
7 changed files with 460 additions and 896 deletions

175
package-lock.json generated
View File

@ -2988,6 +2988,44 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"css-loader": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/css-loader/-/css-loader-3.6.0.tgz",
@ -3061,6 +3099,13 @@
"slash": "^2.0.0"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz",
@ -3175,6 +3220,42 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
}
}
},
@ -4888,9 +4969,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001319",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz",
"integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw=="
"version": "1.0.30001418",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz",
"integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg=="
},
"capture-exit": {
"version": "2.0.0",
@ -16318,94 +16399,6 @@
"vue-style-loader": "^4.1.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz",
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": {
"version": "4.1.3",
"resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",

View File

@ -26,4 +26,5 @@ app.$mount()
import http from "@/request/index.js"
Vue.prototype.http=http
Vue.prototype.socketUrl = "ws://10.0.0.5:8080/webSocket"
// Vue.prototype.socketUrl = "ws://10.0.0.5:8080/webSocket"
Vue.prototype.socketUrl = "ws://yxx.ydool.net/webSocket"

View File

@ -92,11 +92,11 @@
"^/pre" : ""
} // pathRewrite/api,/apitarget/api
},
"/sock" : {
//
"target" : "ws:// 10.0.0.5:8080/webSocket", //
"changeOrigin" : true //
}
"/sock" : {
//
"target" : "ws:// 10.0.0.5:8080/webSocket", //
"changeOrigin" : true //
}
}
}
}

View File

@ -17,10 +17,10 @@
</view>
</view>
<!-- <view class="talk" @click="goTalk">
<view class="talk" @click="goTalk">
<image class="concat_ico" src="../../static/FamousArts/Talk.png" mode=""></image>
发起聊天
</view> -->
</view>
</view>
<!-- tabs -->
<u-tabs @click="clickTab" :scrollable="false" :list="list1"
@ -158,9 +158,12 @@
this.id = itm.id
},
goTalk(){
uni.showToast({
title:"发起聊天"
})
uni.navigateTo({
url:"/pagesA/msg/chat/chat?name=" + this.userName + '&linkId=' + '' + '&toUser=' + this.userId + '&toUserImg=' + this.userImg
})
// uni.showToast({
// title:""
// })
}
},

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template>
<view>
<view class="chat-list">
<view class="chat-list">
<view class="chat" v-for="(chat,index) in chatList" :key="index">
<view class="row" @tap="toChat(chat)">
<view class="left">
@ -26,14 +26,14 @@
export default {
data() {
return {
chatList:[]
chatList: []
}
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
onShow() {
this.getTalkList()
@ -51,71 +51,88 @@
});
})
},
toChat(chat){
toChat(chat) {
uni.navigateTo({
url:"chat/chat?name="+chat.user.userName + '&linkId=' + chat.linkId + '&toUser=' + chat.toUser + '&toUserImg=' + chat.user.images
url: "chat/chat?name=" + chat.user.userName + '&linkId=' + chat.linkId + '&toUser=' + chat
.toUser + '&toUserImg=' + chat.user.images
})
}
}
}
</script>
<style lang="scss">
page{
background-color: rgba(0,0,0,0);
<style lang="scss">
page {
background-color: rgba(0, 0, 0, 0);
}
.chat-list{
.chat-list {
width: 94%;
padding: 0 3%;
.chat{
.chat {
width: 100%;
height: 100upx;
padding: 20upx 0;
border-bottom: solid 1upx #eaeaea;
.row{
height: 100rpx;
padding: 20rpx 0;
border-bottom: solid 1rpx #eaeaea;
.row {
display: flex;
justify-content: flex-start;
.left{
flex-shrink:0;
width: 100upx;
height: 100upx;
image{
width: 100upx;
height: 100upx;
border-radius: 20upx;
.left {
flex-shrink: 0;
width: 100rpx;
height: 100rpx;
image {
width: 100rpx;
height: 100rpx;
border-radius: 20rpx;
}
}
.right{
flex-shrink:1;
.right {
flex-shrink: 1;
width: 98%;
padding-left: 2%;
.top{
.top {
width: 100%;
display: flex;
justify-content: space-between;
align-items: flex-end;
.usernam{
font-size: 26upx;
.usernam {
font-size: 26rpx;
}
.time{
font-size: 22upx;
.time {
font-size: 22rpx;
color: #bebebe;
}
}
.bottom{
.bottom {
width: 100%;
height: 40upx;
height: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.msg{
font-size: 25upx;
.msg {
width: 550rpx;
font-size: 25rpx;
color: #777;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.tis{
width: 35upx;
height: 35upx;
font-size: 22upx;
.tis {
width: 35rpx;
height: 35rpx;
font-size: 22rpx;
display: flex;
justify-content: center;
align-items: center;

View File

@ -6,9 +6,9 @@
export default {
config: {
// baseUrl: "http://192.168.0.57:8080/h5/api", //王锡
baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "http://10.0.0.36:8080/h5/api", //俞燕红
// baseUrl: "https://yxx.ydool.net/h5/api", //线上
baseUrl: "https://yxx.ydool.net/h5/api", //线上
header: {
'Content-Type': 'application/json;charset=UTF-8',
// 'Content-Type':'application/x-www-form-urlencoded'