聊天 定位
This commit is contained in:
parent
28c469e421
commit
fac2a2f48c
|
@ -447,8 +447,10 @@
|
||||||
class="eject-btns">
|
class="eject-btns">
|
||||||
去投诉
|
去投诉
|
||||||
</view>
|
</view>
|
||||||
<view :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat" class="eject-btns">
|
<view :custom-style="customStyle2" shape="circle" :plain="true" @click="goMsg(order)" class="eject-btns">
|
||||||
联系客服</view>
|
联系客服</view>
|
||||||
|
<!-- <view :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat" class="eject-btns">
|
||||||
|
联系客服</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
|
@ -2364,15 +2366,14 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goMsg() {
|
goMsg(order) {
|
||||||
let data = {
|
let data = {
|
||||||
userId: uni.getStorageSync('userId'),
|
userId: uni.getStorageSync('userId'),
|
||||||
focusedUserId: this.order.user.userId
|
focusedUserId: this.ordersId
|
||||||
}
|
}
|
||||||
this.$Request.postJson('/app/chat/insertChatConversation ', data).then(res => {
|
this.$Request.postJson('/app/chat/insertChatConversation', data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
let id = this.order.user.userId == res.data.userId ? res.data.focusedUserId : this.order
|
let id = this.ordersId == res.data.userId ? res.data.focusedUserId : this.ordersId
|
||||||
.user.userId
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/msg/im?chatConversationId=' + res.data.chatConversationId +
|
url: '/pages/msg/im?chatConversationId=' + res.data.chatConversationId +
|
||||||
'&byUserId=' + id
|
'&byUserId=' + id
|
||||||
|
|
|
@ -635,26 +635,26 @@
|
||||||
var that = this
|
var that = this
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log('位置名称:' + res.name);
|
console.log('经度:' + res);
|
||||||
console.log('详细地址:' + res.address);
|
|
||||||
console.log('纬度:' + res.latitude);
|
|
||||||
console.log('经度:' + res.longitude);
|
|
||||||
that.detailaddress = res.name
|
that.detailaddress = res.name
|
||||||
that.latitude = res.latitude
|
that.latitude = res.latitude
|
||||||
that.longitude = res.longitude
|
that.longitude = res.longitude
|
||||||
that.selectCity(res.longitude, res.latitude)
|
that.selectCity(res.longitude, res.latitude);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
selectCity(longitude, latitude) {
|
selectCity(longitude, latitude) {
|
||||||
this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
|
var that=this;
|
||||||
|
that.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.city = res.data.address ? res.data.address : '未知'
|
let chinaAddressParts = res.data.address.match(/^(?<province>[^省]+省|[^自]+自治区|[^市]+市|[^县]+县|[^区]+区|[^town]+town|[^镇]+镇)?(?<city>[^市]+市|[^县]+县|[^区]+区|[^town]+town|[^镇]+镇)?(?<district>[^区]+区|[^县]+县|[^乡]+乡|[^街道]+街道)?(?<street>.+)$/);
|
||||||
// uni.setStorageSync('city', res.data.province)
|
// uni.setStorageSync('city', res.data.province)
|
||||||
this.page = 1
|
that.city=chinaAddressParts.groups.street
|
||||||
// this.getorderlist('')
|
that.page = 1
|
||||||
this.getKTCityList();
|
// that.getorderlist('')
|
||||||
|
that.getKTCityList();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -197,12 +197,12 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '连接中...'
|
title: '连接中...'
|
||||||
})
|
})
|
||||||
console.log(userId,'*******************')
|
// console.log(userId,'*******************',websocketUtils.getWsBaseUrl())
|
||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
// url: 'ws://192.168.1.17:8881/gameTeamChat/' + userId + '_' + this.teamId,
|
// url: 'ws://192.168.1.17:8881/gameTeamChat/' + userId + '_' + this.teamId,
|
||||||
// url: 'wss://game.shengqianxiong.com.cn/wss/gameTeamChat/' + userId + '_' + this.teamId,
|
// url: 'wss://game.shengqianxiong.com.cn/wss/gameTeamChat/' + userId + '_' + this.teamId,
|
||||||
// url: 'ws://192.168.1.17:8180/sqx_fast/chatSocket/' + userId,
|
// url: 'ws://192.168.1.17:8180/sqx_fast/chatSocket/' + userId,
|
||||||
url: websocketUtils.getWsBaseUrl() + userId,
|
url: 'wss://sausers.blxinchuang.com/wss/websocket/' + userId,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: 'Hello'
|
msg: 'Hello'
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
if (!phone) {
|
if (!phone) {
|
||||||
phone = this.$queue.getData('userName');
|
phone = this.$queue.getData('userName');
|
||||||
}
|
}
|
||||||
console.log(this.byUserId)
|
console.log("this.byUserId",this.byUserId)
|
||||||
let data = {
|
let data = {
|
||||||
content: this.content,
|
content: this.content,
|
||||||
messageType: type,
|
messageType: type,
|
||||||
|
|
Loading…
Reference in New Issue