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