This commit is contained in:
木瓜一块八 2025-08-15 14:51:52 +08:00
parent 09348a2347
commit 968639f063
5 changed files with 51 additions and 32 deletions

View File

@ -100,6 +100,7 @@ export default Vue.extend({
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
this.addBtnLoading = true this.addBtnLoading = true
this.addData.url_link = window.location.href
reqNewHomeConsult(this.addData).then(response => { reqNewHomeConsult(this.addData).then(response => {
this.addBtnLoading = false this.addBtnLoading = false
if (response.status) { if (response.status) {

View File

@ -89,6 +89,10 @@
</div>
<div class="product-price">
<span class="price">¥{{ item.discount_price }}</span>
<span class="price-unit">{{ item.unit }} {{ item.short_term === '1' ? '(可短租)' : '' }} </span>
</div> </div>
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">

View File

@ -114,6 +114,10 @@
<div class="form-row"> <div class="form-row">
<el-form-item label="价格" prop="price" required class="form-item-half"> <el-form-item label="价格" prop="price" required class="form-item-half">
<template slot="label">
<span v-if="publish_type === '1'" >商品价格</span>
<span v-if="publish_type === '2'">预期价格</span>
</template>
<div class="price-unit-container"> <div class="price-unit-container">
<el-input v-model="form.price" placeholder="请输入价格" class="price-input"></el-input> <el-input v-model="form.price" placeholder="请输入价格" class="price-input"></el-input>
<el-input v-model="form.unit" placeholder="单位" class="unit-input"></el-input> <el-input v-model="form.unit" placeholder="单位" class="unit-input"></el-input>
@ -149,9 +153,10 @@
style="margin-left: 5px; color: #333; cursor: pointer;"></i> style="margin-left: 5px; color: #333; cursor: pointer;"></i>
</el-tooltip> </el-tooltip>
</template> </template>
<span v-if="form.discount !== 0 && form.price" style="color: red;font-size: 14px;font-weight: bold;">{{ <span v-if=" form.price && !isNaN(Number(form.price))" style="color: red;font-size: 14px;font-weight: bold;">
((form.price * <span v-if="form.discount == 0 || !form.discount">{{ Number(form.price)* 0.03.toFixed(2) }}</span>
form.discount/10)*0.03).toFixed(2) }}</span> <span v-else>{{ (Number(form.price) * Number(form.discount) / 10 * 0.03).toFixed(2) }}</span>
</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="enterprise-demand-detail"> <div class="enterprise-demand-detail">
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<h1 class="demand-title" style="margin: 0 0;"> <h1 class="demand-title" style="margin: 0 0;">
{{ productDetailInfo.product_name }} {{ productDetailInfo.product_name }}
</h1> </h1>
<button v-if="!isApprove" class="consult-btn" @click="openTalk">立即咨询</button> <button v-if="!isApprove" class="consult-btn" @click="openTalk">立即咨询</button>
</div> </div>
<!-- 标题区域 --> <!-- 标题区域 -->
<ul class="title-section"> <ul class="title-section">
@ -14,6 +14,11 @@
<span class="mylabel">企业名称</span> <span class="mylabel">企业名称</span>
<span class="value">{{ productDetailInfo.company_name }}</span> <span class="value">{{ productDetailInfo.company_name }}</span>
</li> </li>
<li class="info-item" style="margin:5px 0;">
<span class="mylabel"> <span v-if="productDetailInfo.publish_type === '1' ">商品价格</span> <span
v-else>预期价格</span></span>
<span class="value">{{ productDetailInfo.discount_price }}</span>
</li>
<li class="info-item" style="margin:5px 0;"> <li class="info-item" style="margin:5px 0;">
<span class="mylabel">所属类别</span> <span class="mylabel">所属类别</span>
<span class="value">{{ productDetailInfo.product_category }}</span> <span class="value">{{ productDetailInfo.product_category }}</span>
@ -43,13 +48,14 @@
<span class="value">{{ productDetailInfo.create_at ? productDetailInfo.create_at : '暂未发布' }}</span> <span class="value">{{ productDetailInfo.create_at ? productDetailInfo.create_at : '暂未发布' }}</span>
</li> </li>
</ul> </ul>
<div v-if="productDetailInfo.cart_flag==='1'" style="position: relative;width: 100%;padding-left: 16px;" class="mysection"> <div v-if="productDetailInfo.cart_flag === '1'" style="position: relative;width: 100%;padding-left: 16px;"
class="mysection">
<div class="section-title">配置数据</div> <div class="section-title">配置数据</div>
<div class="section-content"> <div class="section-content">
</div> </div>
</div> </div>
<ul v-if="productDetailInfo.cart_flag==='1'" class="adUl"> <ul v-if="productDetailInfo.cart_flag === '1'" class="adUl">
<li> <li>
<div class="leftBox"> <div class="leftBox">
<img src="https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png" alt=""> <img src="https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png" alt="">
@ -165,23 +171,24 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.consult-btn { .consult-btn {
width: fit-content; width: fit-content;
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%); background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
color: white; color: white;
border: none; border: none;
padding: 12px 24px; padding: 12px 24px;
border-radius: 8px; border-radius: 8px;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(39, 90, 255, 0.3);
}
}
&:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(39, 90, 255, 0.3);
}
}
.mylabel { .mylabel {
font-weight: 500; font-weight: 500;
color: #252424; color: #252424;
@ -344,6 +351,7 @@ export default {
border-radius: 8px; border-radius: 8px;
.info-item { .info-item {
width: 120px;
display: flex; display: flex;
margin-bottom: 10px; margin-bottom: 10px;
@ -433,7 +441,7 @@ export default {
margin-bottom: 30px; margin-bottom: 30px;
.section-title { .section-title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
font-weight: bold !important; font-weight: bold !important;

View File

@ -846,7 +846,7 @@ export default {
if (this.$route.query.fromPath === 'homePage') { if (this.$route.query.fromPath === 'homePage') {
// this.$router.push({path: "/homePage/index"}); // this.$router.push({path: "/homePage/index"});
if (this.$route.query.type === 'bd') { if (this.$route.query.type === 'bd') {
// this.$router.push('/product/baiduProduct') // this.$router.push('/product/baiduProduct')
this.goBaidu(this.$route.query.listUrl, this.$route.query.url) this.goBaidu(this.$route.query.listUrl, this.$route.query.url)
} else if (this.$route.query.type === 'ali') { } else if (this.$route.query.type === 'ali') {
@ -855,11 +855,12 @@ export default {
} else if (this.$route.query.type === 'rqy') { } else if (this.$route.query.type === 'rqy') {
this.$router.push("/product/productHome/k8s/createK8s"); this.$router.push("/product/productHome/k8s/createK8s");
} else { } else {
this.$router.push("/homePage/index"); this.$router.push(getHomePath());
} }
} else { } else {
this.$router.push({name: "productHome"});
this.$router.push(getHomePath());
} }
} else if (res.roles.includes('运营')) { } else if (res.roles.includes('运营')) {