Compare commits
2 Commits
f07b1d5d11
...
52e80be212
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52e80be212 | ||
|
|
216a76781e |
@ -107,8 +107,16 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
cusCode: fingerprintHash,
|
cusCode: fingerprintHash,
|
||||||
tenantId: 'main',
|
tenantId: 'main',
|
||||||
prodId:id
|
prodId:id,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
|
// 简单判断是否为手机端
|
||||||
|
if (/android|webos|iphone|ipod|BlackBerry|iemobile|opera mini/i.test(userAgent.toLowerCase())) {
|
||||||
|
data.equipment = '手机端';
|
||||||
|
} else {
|
||||||
|
data.equipment = 'pc端';
|
||||||
|
}
|
||||||
// 这里使用箭头函数,确保 `this` 指向当前 Vue 实例
|
// 这里使用箭头函数,确保 `this` 指向当前 Vue 实例
|
||||||
this.$axios.$post('/web/chatMain', data).then((res) => {
|
this.$axios.$post('/web/chatMain', data).then((res) => {
|
||||||
if (res.id != null) {
|
if (res.id != null) {
|
||||||
|
|||||||
@ -21,8 +21,9 @@ export const mutations = {
|
|||||||
}
|
}
|
||||||
else if (e.data.startsWith("系统通知")){
|
else if (e.data.startsWith("系统通知")){
|
||||||
state.notices.push(e.data);
|
state.notices.push(e.data);
|
||||||
}
|
}else if (e.data.startsWith("close")){
|
||||||
else {
|
console.log(e.data)
|
||||||
|
} else {
|
||||||
state.messages.push(JSON.parse(e.data));
|
state.messages.push(JSON.parse(e.data));
|
||||||
console.log(state.messages);
|
console.log(state.messages);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user