|
|
@@ -23,21 +23,140 @@
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
<div class="bg"></div>
|
|
|
- <div class="title">
|
|
|
- <div class="content">{{ packageInfo.name }}</div>
|
|
|
- <button class="btn-share" open-type="share">
|
|
|
- <img src="../static/imgs/icon_share.png" class="icon-share" />
|
|
|
- </button>
|
|
|
+ <div class="card top">
|
|
|
+ <div class="price">
|
|
|
+ <block v-for="(item, index) in amount" :key="index">
|
|
|
+ <price-tag color="red" :value="item"></price-tag>
|
|
|
+ <span class="red" v-if="index === 0">-</span>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <span class="sub" v-if="packageInfo.originalPrice">门市价¥{{ packageInfo.originalPrice }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ <div class="content">{{ packageDetail.name }}</div>
|
|
|
+ <!-- <button class="btn-share" open-type="share">
|
|
|
+ <img src="../static/imgs/icon_share.png" class="icon-share" />
|
|
|
+ </button> -->
|
|
|
+ </div>
|
|
|
+ <div class="desc">{{ packageDetail.title }}</div>
|
|
|
+
|
|
|
+ <div class="info">
|
|
|
+ <span>已售 {{ packageDetail.sale || 0 }}</span>
|
|
|
+ <span>库存 {{ packageDetail.inventory || 0 }}</span>
|
|
|
+ <span>{{ packageDetail.shareNum || 0 }}人分享</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <div class="feature">
|
|
|
+ <div class="label">特点</div>
|
|
|
+ <div class="tag" v-for="item in packageInfo.tag" :key="item">{{ item }}</div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
- <div class="desc">{{ packageInfo.title }}</div>
|
|
|
- <div class="price">
|
|
|
- <price-tag color="red" :value="packageInfo.amount"></price-tag>
|
|
|
+
|
|
|
+ <div class="card choose">
|
|
|
+ <div class="choose-spec" @click="showSpec = true">
|
|
|
+ <div class="name">选择</div>
|
|
|
+ <div class="content">
|
|
|
+ <span class="active" v-if="stockInfo">{{ stockInfo.specification }}({{ stockInfo.day }})</span>
|
|
|
+ <span v-else>规格/日期</span>
|
|
|
+ <img src="../static/imgs/icon_into.png" class="into" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="choose-spec">
|
|
|
+ <div class="name">服务</div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="serviece">
|
|
|
+ <img src="../static/svgs/icon_01_zhengpin.svg" alt="" />
|
|
|
+ <span>正品保障</span>
|
|
|
+ </div>
|
|
|
+ <div class="serviece">
|
|
|
+ <img src="../static/svgs/icon_01_guanfang.svg" alt="" />
|
|
|
+ <span>官方直营</span>
|
|
|
+ </div>
|
|
|
+ <div class="serviece">
|
|
|
+ <img src="../static/svgs/icon_03_wuyou.svg" alt="" />
|
|
|
+ <span>无忧售后</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="feature">
|
|
|
- <div class="label">特点</div>
|
|
|
- <div class="tag" v-for="item in packageInfo.tag" :key="item">{{ item }}</div>
|
|
|
+
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-title">商家信息</div>
|
|
|
+
|
|
|
+ <div class="attraction">
|
|
|
+ <img class="icon" :src="attraction.img" alt="" />
|
|
|
+ <div class="attraction-info">
|
|
|
+ <div class="title">
|
|
|
+ {{ attraction.name }}
|
|
|
+ </div>
|
|
|
+ <!-- <div class="sub">{{ attraction.introduction }}</div> -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <button>
|
|
|
+ <img src="../static/svgs/icon_xiangqingye_dianhua.svg" />
|
|
|
+ <span>联系</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="card">
|
|
|
+ <div class="card-title">活动详情</div>
|
|
|
+ <rich-text class="rich-text" :nodes="packageInfo.detail"></rich-text>
|
|
|
+
|
|
|
+ <div class="workflow">
|
|
|
+ <div class="workflow-item" v-for="(item, index) in workflow" :key="index">
|
|
|
+ <div class="name">{{ item.name }}</div>
|
|
|
+ <div class="desc">{{ item.desc }}</div>
|
|
|
+
|
|
|
+ <swiper class="workflow-cover" v-if="item.img.length > 0">
|
|
|
+ <swiper-item v-for="item in item.img" :key="item">
|
|
|
+ <img class="cover-img" mode="aspectFill" :src="item" />
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card note">
|
|
|
+ <div class="card-title">购买须知</div>
|
|
|
+
|
|
|
+ <div class="note-info">
|
|
|
+ <div class="name">活动日期</div>
|
|
|
+ <div class="val">{{ event.date }}</div>
|
|
|
+ <img class="icon" src="../static/svgs/icon_xuzhi_youxiaoqi.svg" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="note-info">
|
|
|
+ <div class="name">活动时间</div>
|
|
|
+ <div class="val">{{ event.time }}</div>
|
|
|
+ <img class="icon" src="../static/svgs/icon_xuzhi_shijian.svg" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="note-info">
|
|
|
+ <div class="name">活动地点</div>
|
|
|
+ <div class="val">{{ event.address }}</div>
|
|
|
+ <img class="icon" src="../static/svgs/icon_xuzhi_didian.svg" />
|
|
|
+ </div>
|
|
|
+ <div class="note-info">
|
|
|
+ <div class="name">活动对象</div>
|
|
|
+ <div class="val">{{ event.crowd }}</div>
|
|
|
+ <img class="icon" src="../static/svgs/icon_xuzhi_shijian.svg" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="note-info">
|
|
|
+ <div class="name">费用说明</div>
|
|
|
+ <div class="val" v-html="packageDetail.expenseDescription"></div>
|
|
|
+ <img class="icon" src="../static/svgs/icon_xuzhi_guize.svg" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card note">
|
|
|
+ <div class="card-title">注意事项</div>
|
|
|
+
|
|
|
+ <div class="tips" v-html="packageDetail.note"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <div class="card">
|
|
|
<div class="card-title">套餐内容</div>
|
|
|
<div class="table">
|
|
|
<div class="row head">
|
|
|
@@ -63,14 +182,12 @@
|
|
|
</div>
|
|
|
<div class="card">
|
|
|
<div class="card-title">使用方式</div>
|
|
|
- <div class="content">
|
|
|
+ <div class="card-content">
|
|
|
套餐购买成功后,套餐内的所有项目数量会计入我的项目余额中,在“我的-项目余额”中可查看,使用时,打开“我的核销码”给核销人员,核销人员会根据你本次需要消耗的具体项目及数量进行核销
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tip">温馨提示:由于会员套餐特殊性,出售后不可退款!</div>
|
|
|
- <div style="padding: 0 16px; margin-top: 30px;">
|
|
|
- <rich-text class="rich-text" :nodes="packageInfo.detail"></rich-text>
|
|
|
- </div>
|
|
|
+ <div style="padding: 0 16px; margin-top: 30px;"></div> -->
|
|
|
<div style="height: 70px;"></div>
|
|
|
</div>
|
|
|
<navigation-bar
|
|
|
@@ -79,15 +196,18 @@
|
|
|
:transparent="transparent"
|
|
|
isCircles
|
|
|
></navigation-bar>
|
|
|
- <div class="bottom-wrapper">
|
|
|
+ <!-- <div class="bottom-wrapper">
|
|
|
<div class="btn-large" @click="buy">立即购买</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <product-card :info="packageInfo" :show.sync="showSpec" :stockId.sync="stockId"></product-card>
|
|
|
</scroll-view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import NavigationBar from '../components/navigationBar.vue';
|
|
|
+import ProductCard from '../components/productCard.vue';
|
|
|
export default {
|
|
|
- components: { NavigationBar },
|
|
|
+ components: { NavigationBar, ProductCard },
|
|
|
data() {
|
|
|
return {
|
|
|
title: '',
|
|
|
@@ -97,14 +217,34 @@ export default {
|
|
|
img: []
|
|
|
},
|
|
|
packageGoods: [],
|
|
|
- leftIcon: 'back'
|
|
|
+ leftIcon: 'back',
|
|
|
+ amount: [],
|
|
|
+ showSpec: false,
|
|
|
+ attraction: {},
|
|
|
+ packageDetail: {},
|
|
|
+ stockId: 0
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.$http.get(`/package/get/${this.$mp.query.id}`).then(res => {
|
|
|
+ this.$http.get(`/package/getVO/${this.$mp.query.id}`).then(res => {
|
|
|
this.packageInfo = res;
|
|
|
this.title = res.name;
|
|
|
+
|
|
|
+ this.amount = res.amount.split('-');
|
|
|
});
|
|
|
+
|
|
|
+ this.$http
|
|
|
+ .get(`/package/get/${this.$mp.query.id}`)
|
|
|
+ .then(res => {
|
|
|
+ this.packageDetail = res;
|
|
|
+ return this.$http.get(`/attractions/get/${res.attractionsId}`);
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ res.img = res.img.shift() || '';
|
|
|
+ this.attraction = res;
|
|
|
+ });
|
|
|
+
|
|
|
+ // this.$http.get(`/attractions/get/${}`)
|
|
|
this.$http.postJson('/packageGoods/all', { size: 10000, query: { packageId: this.$mp.query.id } }).then(res => {
|
|
|
this.packageGoods = res.content;
|
|
|
});
|
|
|
@@ -119,6 +259,28 @@ export default {
|
|
|
computed: {
|
|
|
sum() {
|
|
|
return this.packageGoods.map(i => i.price).reduce((a, b) => a + b, 0);
|
|
|
+ },
|
|
|
+ workflow() {
|
|
|
+ if (this.packageInfo.workflow) {
|
|
|
+ return JSON.parse(this.packageInfo.workflow);
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ event() {
|
|
|
+ return this.packageDetail.event || {};
|
|
|
+ },
|
|
|
+ stocks() {
|
|
|
+ return this.packageInfo.stocks || [];
|
|
|
+ },
|
|
|
+ stockInfo() {
|
|
|
+ if (this.stockId) {
|
|
|
+ return [...this.stocks].find(item => {
|
|
|
+ return item.id === this.stockId;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -194,17 +356,15 @@ export default {
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.title {
|
|
|
- margin: 18px 16px 0 16px;
|
|
|
+ margin: 13px 0 0;
|
|
|
.flex();
|
|
|
align-items: flex-start;
|
|
|
.content {
|
|
|
color: black;
|
|
|
- font-size: 22px;
|
|
|
+ font-size: 20px;
|
|
|
font-weight: bold;
|
|
|
- font-weight: 500;
|
|
|
- margin-right: 10px;
|
|
|
flex-grow: 1;
|
|
|
- line-height: 30px;
|
|
|
+ line-height: 24px;
|
|
|
}
|
|
|
.btn-share {
|
|
|
width: 24px;
|
|
|
@@ -220,12 +380,41 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.desc {
|
|
|
- margin: 4px 0 0 16px;
|
|
|
+ margin: 4px 0 0;
|
|
|
font-size: 14px;
|
|
|
color: @text3;
|
|
|
+ line-height: 24px;
|
|
|
+}
|
|
|
+
|
|
|
+.info {
|
|
|
+ .flex();
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #c8c9cc;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
.price {
|
|
|
- margin: 18px 0 0 16px;
|
|
|
+ margin: 18px 0 0;
|
|
|
+ .flex();
|
|
|
+ span {
|
|
|
+ &.red {
|
|
|
+ font-size: 22px;
|
|
|
+ font-family: OSP-DIN;
|
|
|
+ color: #f53809;
|
|
|
+ line-height: 26px;
|
|
|
+ margin: 0 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.sub {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #c8c9cc;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-left: 8px;
|
|
|
+ align-self: flex-end;
|
|
|
+ text-decoration: line-through;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.feature {
|
|
|
.flex();
|
|
|
@@ -252,15 +441,19 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.card {
|
|
|
- margin: 10px 16px 0 16px;
|
|
|
+ margin: 10px 0;
|
|
|
background: #ffffff;
|
|
|
- border-radius: 8px;
|
|
|
- padding: 16px 16px 20px 16px;
|
|
|
+ border-radius: 16px;
|
|
|
+ padding: 16px;
|
|
|
+ transform: translateY(-14px);
|
|
|
+
|
|
|
+ &.top {
|
|
|
+ margin: 0 0;
|
|
|
+ }
|
|
|
.card-title {
|
|
|
font-size: 18px;
|
|
|
color: black;
|
|
|
font-weight: bold;
|
|
|
- font-weight: 500;
|
|
|
}
|
|
|
.table {
|
|
|
margin-top: 16px;
|
|
|
@@ -289,7 +482,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .content {
|
|
|
+ .card-content {
|
|
|
margin-top: 10px;
|
|
|
font-size: 14px;
|
|
|
color: black;
|
|
|
@@ -335,4 +528,215 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
margin-top: 8px;
|
|
|
}
|
|
|
+.choose {
|
|
|
+ padding: 0 16px;
|
|
|
+}
|
|
|
+.choose-spec {
|
|
|
+ .flex();
|
|
|
+ height: 70px;
|
|
|
+ position: relative;
|
|
|
+ .name {
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ flex-grow: 1;
|
|
|
+ margin-left: 42px;
|
|
|
+ .flex();
|
|
|
+ .into {
|
|
|
+ width: 7px;
|
|
|
+ height: 14px;
|
|
|
+ margin-left: 22px;
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #c8c9cc;
|
|
|
+ line-height: 24px;
|
|
|
+ flex-grow: 1;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .serviece {
|
|
|
+ .flex();
|
|
|
+ &:not(:first-child) {
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ margin-left: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #939599;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &:not(:last-child) {
|
|
|
+ &:after {
|
|
|
+ content: '';
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ height: 1px;
|
|
|
+ position: absolute;
|
|
|
+ left: 56px;
|
|
|
+ right: 0px;
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.attraction {
|
|
|
+ padding: 12px 0 0;
|
|
|
+ position: relative;
|
|
|
+ .flex();
|
|
|
+ align-items: flex-start;
|
|
|
+ .icon {
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
+ min-width: 44px;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .attraction-info {
|
|
|
+ flex-grow: 1;
|
|
|
+ margin-right: 84px;
|
|
|
+ margin-left: 6px;
|
|
|
+ .title {
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+ .sub {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #c8c9cc;
|
|
|
+ line-height: 24px;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ button {
|
|
|
+ position: absolute;
|
|
|
+ .flex-col();
|
|
|
+ right: 4px;
|
|
|
+ top: 12px;
|
|
|
+ img {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #ff7f1f;
|
|
|
+ line-height: 10px;
|
|
|
+ margin-top: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.workflow {
|
|
|
+ padding: 20px 0;
|
|
|
+ .workflow-item {
|
|
|
+ padding: 0 0 30px 20px;
|
|
|
+ position: relative;
|
|
|
+ .name,
|
|
|
+ .desc {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 26px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .workflow-cover {
|
|
|
+ width: 100%;
|
|
|
+ height: 200px;
|
|
|
+ margin-top: 8px;
|
|
|
+ .cover-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 200px;
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ background: #ff7f1f;
|
|
|
+ top: 8px;
|
|
|
+ left: -5px;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:not(:last-child) {
|
|
|
+ &:after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 15px;
|
|
|
+ width: 1px;
|
|
|
+ background: #ff7f1f;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.note {
|
|
|
+ padding-bottom: 14px;
|
|
|
+ .card-title {
|
|
|
+ padding-bottom: 11px;
|
|
|
+ border-bottom: 1px solid #f5f7fa;
|
|
|
+ }
|
|
|
+
|
|
|
+ .note-info {
|
|
|
+ position: relative;
|
|
|
+ padding-left: 24px;
|
|
|
+ margin-top: 30px;
|
|
|
+ .name {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .val {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #606266;
|
|
|
+ line-height: 26px;
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ position: absolute;
|
|
|
+ top: 4px;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tips {
|
|
|
+ padding-top: 14px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #606266;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|