Procházet zdrojové kódy

【小昆山官网】产品/物业详情 - 点击立即咨询按钮没有反应

master
王饶冀 před 3 roky
rodič
revize
b7511c2a6c

+ 45
- 9
digital-park-web/digital-park/src/views/investment-service/product-detail/ProductDetail.vue Zobrazit soubor

<div class="detial-container" v-loading="pageLoading" element-loading-text="数据加载中..."> <div class="detial-container" v-loading="pageLoading" element-loading-text="数据加载中...">
<div class="ditial-banner"> <div class="ditial-banner">
<div class="main-img"> <div class="main-img">
<img :src="formatImg(mainImg)" alt="main-img">
<img :src="formatImg(mainImg)" alt="main-img" />
</div> </div>
<div class="main-item"> <div class="main-item">
<div class="main-title" :title="productDetail.productName">{{ productDetail.productName }}</div>
<div
class="main-title"
:title="productDetail.productName"
>{{ productDetail.productName }}</div>
<div class="main-price"> <div class="main-price">
<span class="price-label">价格:</span> <span class="price-label">价格:</span>
<span class="price-value">¥{{ productDetail.showPrice }}</span> <span class="price-value">¥{{ productDetail.showPrice }}</span>
<span class="mian-detail-span">详情:</span> <span class="mian-detail-span">详情:</span>
{{ productDetail.productDescription }} {{ productDetail.productDescription }}
</div> </div>
<div class="main-btn">
<div class="main-btn" @click="linkCustomerService">
<img <img
src="~@assets/image/product/consult-icon.png" src="~@assets/image/product/consult-icon.png"
class="consult-icon" class="consult-icon"
<script> <script>
import "./ProductDetail.scss"; import "./ProductDetail.scss";
import { getByIdServiceProduct } from "@api/index.js"; import { getByIdServiceProduct } from "@api/index.js";
import { parseMarkdown,formatImg } from "@/utils/common";
import { parseMarkdown, formatImg } from "@/utils/common";
import { mapGetters } from "vuex";
export default { export default {
...mapGetters({
currentAccount: "currentAccount",
}),
data() { data() {
return { return {
pageLoading: false, pageLoading: false,
productDetail:{},
mainImg:"",
productDetail: {},
mainImg: "",
queryParams: {
token: "50aa11de78ee5cb27381df1679f24e15", // 与后台交互的凭证
noCanClose: 0, // PC端是否显示广告
uid: "", // 用户ID
nickName: "", //用户昵称
phone: "", //用户手机号
},
}; };
}, },
mounted() { mounted() {
if (data.status == 0) { if (data.status == 0) {
this.productDetail = data.data; this.productDetail = data.data;
let { productMasterImg } = this.productDetail; let { productMasterImg } = this.productDetail;
this.mainImg = productMasterImg ? productMasterImg[0] : "";
this.mainImg = productMasterImg
? productMasterImg[0]
: "";
} else if (data.status == 101) { } else if (data.status == 101) {
} else { } else {
this.$message.error(data.msg); this.$message.error(data.msg);
this.pageLoading = false; this.pageLoading = false;
}); });
}, },
linkCustomerService() {
console.log(1);
// 是否登录
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) { toPath(path) {
this.$router.push(path); this.$router.push(path);
}, },
parseMarkdown(str) { parseMarkdown(str) {
return str ? parseMarkdown(str) : ""; return str ? parseMarkdown(str) : "";
}, },
formatImg(url){
formatImg(url) {
return formatImg(url); return formatImg(url);
}
},
}, },
}; };
</script> </script>

+ 0
- 7
digital-park-web/digital-park/src/views/login/LoginFrom/LoginFrom.vue Zobrazit soubor

// 跳转客服 // 跳转客服
linkCustomerService() { linkCustomerService() {
// 是否登录 // 是否登录
console.log(this.currentAccount, "this.currentAccount");
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?`; let url = `http://www.parkkf.com/chat/index?`;
for (let key in this.queryParams) { for (let key in this.queryParams) {
if ( if (
url += `&${key}=${this.queryParams[key]}`; url += `&${key}=${this.queryParams[key]}`;
} }
} }
console.log(url);
window.open(url); window.open(url);
}, },
}, },

Načítá se…
Zrušit
Uložit