@@ -41,25 +41,14 @@ | |||
import "./ProductDetail.scss"; | |||
import { getByIdServiceProduct } from "@api/index.js"; | |||
import { parseMarkdown, formatImg } from "@/utils/common"; | |||
import { mapGetters } from "vuex"; | |||
import { linkCustomerService } from "@mixin/customerService"; | |||
export default { | |||
computed: { | |||
...mapGetters({ | |||
currentAccount: "currentAccount", | |||
}), | |||
}, | |||
mixins: [linkCustomerService], | |||
data() { | |||
return { | |||
pageLoading: false, | |||
productDetail: {}, | |||
mainImg: "", | |||
queryParams: { | |||
token: "50aa11de78ee5cb27381df1679f24e15", // 与后台交互的凭证 | |||
noCanClose: 0, // PC端是否显示广告 | |||
uid: "", // 用户ID | |||
nickName: "", //用户昵称 | |||
phone: "", //用户手机号 | |||
}, | |||
}; | |||
}, | |||
mounted() { | |||
@@ -95,25 +84,6 @@ export default { | |||
this.pageLoading = false; | |||
}); | |||
}, | |||
linkCustomerService() { | |||
// 是否登录 | |||
if (this.currentAccount) { | |||
this.queryParams.uid = this.currentAccount.accountId; | |||
this.queryParams.nickName = this.currentAccount.accountName; | |||
this.queryParams.phone = this.currentAccount.mobilePhone; | |||
} | |||
let url = `http://www.parkkf.com/chat/index?`; | |||
for (let key in this.queryParams) { | |||
if ( | |||
this.queryParams[key] !== "" && | |||
this.queryParams[key] !== undefined && | |||
this.queryParams[key] !== null | |||
) { | |||
url += `&${key}=${this.queryParams[key]}`; | |||
} | |||
} | |||
window.open(url); | |||
}, | |||
toPath(path) { | |||
this.$router.push(path); | |||
}, |
@@ -121,7 +121,7 @@ import Footer from "@components/Footer.vue"; | |||
import "./PropertyDetail.scss"; | |||
import { getByIdPropertyManage } from "@api/index.js"; | |||
import { parseMarkdown, formatImg } from "@/utils/common"; | |||
import { mapGetters } from "vuex"; | |||
import { linkCustomerService } from "@mixin/customerService"; | |||
const ListingFacilities = { | |||
精装修: 1, | |||
有线网络: 2, | |||
@@ -135,11 +135,7 @@ const ListingFacilities = { | |||
export default { | |||
components: { Nav, Footer }, | |||
computed: { | |||
...mapGetters({ | |||
currentAccount: "currentAccount", | |||
}), | |||
}, | |||
mixins: [linkCustomerService], | |||
data() { | |||
return { | |||
pageLoading: false, | |||
@@ -334,25 +330,6 @@ export default { | |||
}); | |||
return style; | |||
}, | |||
linkCustomerService() { | |||
// 是否登录 | |||
if (this.currentAccount) { | |||
this.queryParams.uid = this.currentAccount.accountId; | |||
this.queryParams.nickName = this.currentAccount.accountName; | |||
this.queryParams.phone = this.currentAccount.mobilePhone; | |||
} | |||
let url = `http://www.parkkf.com/chat/index?`; | |||
for (let key in this.queryParams) { | |||
if ( | |||
this.queryParams[key] !== "" && | |||
this.queryParams[key] !== undefined && | |||
this.queryParams[key] !== null | |||
) { | |||
url += `&${key}=${this.queryParams[key]}`; | |||
} | |||
} | |||
window.open(url); | |||
}, | |||
}, | |||
}; | |||
</script> |
@@ -267,7 +267,9 @@ import Utils from "@/utils/encrypt"; | |||
import { sendMsg } from "@/utils/common"; | |||
// 导入cookie操作 | |||
import { setCookie, getCookie, delCookie } from "@/utils/cookie-util"; | |||
import { linkCustomerService } from "@mixin/customerService"; | |||
export default { | |||
mixins: [linkCustomerService], | |||
data() { | |||
return { | |||
// 登录loading | |||
@@ -682,21 +684,6 @@ export default { | |||
this.phoneCodeError = false; | |||
this.mobilePhoneError = false; | |||
}, | |||
// 跳转客服 | |||
linkCustomerService() { | |||
// 是否登录 | |||
let url = `http://www.parkkf.com/chat/index?`; | |||
for (let key in this.queryParams) { | |||
if ( | |||
this.queryParams[key] !== "" && | |||
this.queryParams[key] !== undefined && | |||
this.queryParams[key] !== null | |||
) { | |||
url += `&${key}=${this.queryParams[key]}`; | |||
} | |||
} | |||
window.open(url); | |||
}, | |||
}, | |||
destroyed() { | |||
clearInterval(this.sendTimer); |