|
|
|
@ -16,11 +16,12 @@ |
|
|
|
|
|
|
|
<view class="summary"> |
|
|
|
<view class="card info"> |
|
|
|
<view class="card-header">{{ detail.name }}</view> |
|
|
|
<view class="card-header">{{ detail.title }}</view> |
|
|
|
<view class="card-content"> |
|
|
|
<view class="desc">{{ detail.desc }}</view> |
|
|
|
<view class="flex tags" v-if="detail.tags"> |
|
|
|
<view class="tag" v-for="(tag, tIdx) in detail.tags" :key="tIdx"> |
|
|
|
<!-- todo: check key --> |
|
|
|
<view class="desc">{{ detail.brief }}</view> |
|
|
|
<view class="flex tags" v-if="detail.tagDetails"> |
|
|
|
<view class="tag" v-for="(tag, tIdx) in detail.tagDetails" :key="tIdx"> |
|
|
|
{{ tag }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -31,10 +32,10 @@ |
|
|
|
<text class="highlight">{{ priceInt }}</text> |
|
|
|
<text>{{ `${priceFrac}起` }}</text> |
|
|
|
</view> |
|
|
|
<view class="price-bef" v-if="detail.originalPrice">¥<text>{{ detail.originalPrice }}</text></view> |
|
|
|
<view class="price-bef" v-if="detail.priceOrigin">¥<text>{{ detail.priceOrigin }}</text></view> |
|
|
|
</view> |
|
|
|
<view class="registered" v-if="detail.registered"> |
|
|
|
{{ `${detail.registered}人已报名` }} |
|
|
|
<view class="registered" v-if="detail.applyNum"> |
|
|
|
{{ `${detail.applyNum}人已报名` }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -43,6 +44,7 @@ |
|
|
|
<view class="card"> |
|
|
|
<view class="card-header">选择团期</view> |
|
|
|
<view class="card-content"> |
|
|
|
<!-- todo: check key --> |
|
|
|
<timeOptionsSelect v-model="selectTime" :options="detail.timeOptions"></timeOptionsSelect> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -146,24 +148,24 @@ |
|
|
|
return Array.isArray(image) ? image : image.split(',') |
|
|
|
}, |
|
|
|
priceInt() { |
|
|
|
return parseInt(this.detail.currentPrice) |
|
|
|
return parseInt(this.detail.priceDiscount) |
|
|
|
}, |
|
|
|
priceFrac() { |
|
|
|
return (this.detail.currentPrice % this.priceInt).toFixed(2).slice(1) |
|
|
|
return (this.detail.priceDiscount % this.priceInt).toFixed(2).slice(1) |
|
|
|
}, |
|
|
|
displayContent() { |
|
|
|
const { |
|
|
|
itineraryHighlights, |
|
|
|
courseObjectives, |
|
|
|
itineraryDetail, |
|
|
|
special, |
|
|
|
target, |
|
|
|
process, |
|
|
|
} = this.detail |
|
|
|
|
|
|
|
if (this.current == 0) { |
|
|
|
return itineraryHighlights |
|
|
|
return special |
|
|
|
} else if (this.current == 1) { |
|
|
|
return courseObjectives |
|
|
|
return target |
|
|
|
} else if (this.current == 2) { |
|
|
|
return itineraryDetail |
|
|
|
return process |
|
|
|
} |
|
|
|
|
|
|
|
return '' |
|
|
|
@ -178,24 +180,24 @@ |
|
|
|
this.fetchComment(id) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async fetchDetail(id) { |
|
|
|
|
|
|
|
async fetchDetail(activityId) { |
|
|
|
// todo: delete |
|
|
|
this.detail = { |
|
|
|
id: '001', |
|
|
|
image: new Array(6).fill('/static/image/temp-20.png').join(','), |
|
|
|
name: '新疆天山行7/9日丨醉美伊犁&吐鲁番双套餐', |
|
|
|
desc: '每天车程4小时内,含一程高铁丨喀拉峻草原、夏塔古道、昭苏天马、赛里木湖、昭苏油菜花、伊犁薰衣草丨吐鲁番坎儿井&火焰山', |
|
|
|
tags: ['坝上草原', '自然探索', '户外探索', '亲子游玩'], |
|
|
|
currentPrice: 688.99, |
|
|
|
originalPrice: 1200, |
|
|
|
registered: 4168, |
|
|
|
title: '新疆天山行7/9日丨醉美伊犁&吐鲁番双套餐', |
|
|
|
brief: '每天车程4小时内,含一程高铁丨喀拉峻草原、夏塔古道、昭苏天马、赛里木湖、昭苏油菜花、伊犁薰衣草丨吐鲁番坎儿井&火焰山', |
|
|
|
tagDetails: ['坝上草原', '自然探索', '户外探索', '亲子游玩'], |
|
|
|
priceDiscount: 688.99, |
|
|
|
priceOrigin: 1200, |
|
|
|
applyNum: 4168, |
|
|
|
timeOptions: [ |
|
|
|
{ |
|
|
|
id: '0011', |
|
|
|
startDate: '08/25', |
|
|
|
endDate: '09/01', |
|
|
|
currentPrice: 1200.99, |
|
|
|
originalPrice: 2300, |
|
|
|
priceDiscount: 1200.99, |
|
|
|
priceOrigin: 2300, |
|
|
|
adultsPrice: 2400, |
|
|
|
teenagerPrice: 1800, |
|
|
|
childPrice: 1200.99, |
|
|
|
@ -204,8 +206,8 @@ |
|
|
|
id: '0012', |
|
|
|
startDate: '09/02', |
|
|
|
endDate: '09/11', |
|
|
|
currentPrice: 1200.99, |
|
|
|
originalPrice: 2300, |
|
|
|
priceDiscount: 1200.99, |
|
|
|
priceOrigin: 2300, |
|
|
|
adultsPrice: 2400, |
|
|
|
teenagerPrice: 1800, |
|
|
|
childPrice: 1200.99, |
|
|
|
@ -214,28 +216,24 @@ |
|
|
|
id: '0013', |
|
|
|
startDate: '09/12', |
|
|
|
endDate: '09/19', |
|
|
|
currentPrice: 1200.99, |
|
|
|
originalPrice: 2300, |
|
|
|
priceDiscount: 1200.99, |
|
|
|
priceOrigin: 2300, |
|
|
|
adultsPrice: 2400, |
|
|
|
teenagerPrice: 1800, |
|
|
|
childPrice: 1200.99, |
|
|
|
}, |
|
|
|
], |
|
|
|
itineraryHighlights: ` |
|
|
|
<p> |
|
|
|
<img style="width: 100%;" src="/static/image/temp-31.png" mode="widthFix"/> |
|
|
|
<img style="width: 100%;" src="/static/image/temp-32.png" mode="widthFix"/> |
|
|
|
<img style="width: 100%;" src="/static/image/temp-33.png" mode="widthFix"/> |
|
|
|
<img style="width: 100%;" src="/static/image/temp-34.png" mode="widthFix"/> |
|
|
|
<img style="width: 100%;" src="/static/image/temp-35.png" mode="widthFix"/> |
|
|
|
special: ` |
|
|
|
<p style="font-size: 36rpx;"> |
|
|
|
行程亮点 |
|
|
|
</p> |
|
|
|
`, |
|
|
|
courseObjectives: ` |
|
|
|
target: ` |
|
|
|
<p style="font-size: 36rpx;"> |
|
|
|
课程目标 |
|
|
|
<p> |
|
|
|
`, |
|
|
|
itineraryDetail: ` |
|
|
|
process: ` |
|
|
|
<p style="font-size: 36rpx;"> |
|
|
|
详细行程 |
|
|
|
<p> |
|
|
|
@ -243,45 +241,42 @@ |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
try { |
|
|
|
const result = await this.$fetch('getProductDetail', { id }) |
|
|
|
|
|
|
|
const { specs } = result |
|
|
|
let arr = specs |
|
|
|
arr?.sort?.((a, b) => a.sortOrder - b.sortOrder) |
|
|
|
const spec = arr?.[0] |
|
|
|
|
|
|
|
this.detail = { |
|
|
|
...result, |
|
|
|
specId: spec?.id || null, |
|
|
|
specName: spec?.specName || null, |
|
|
|
} |
|
|
|
const result = await this.$fetch('queryActivityById', { activityId }) |
|
|
|
|
|
|
|
// todo: init options |
|
|
|
this.detail = result |
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
async fetchComment(id) { |
|
|
|
|
|
|
|
// todo: fetch by activity id |
|
|
|
|
|
|
|
this.commentList = [ |
|
|
|
{ |
|
|
|
avatar: '/static/image/temp-30.png', |
|
|
|
avatar: '/pages_order/static/temp-30.png', |
|
|
|
name: '战斗世界', |
|
|
|
createTime: '2025-07-12', |
|
|
|
content: '凌玉姐姐很温柔很耐心很负责我很喜欢她龙哥知识渊博很幽默给我们讲解很多内容行程很有趣我学到了很多东西最难忘的就是库木塔格沙漠我们爬到了很高的顶端看夕阳绝美还有我也很喜欢夏塔古道我们爬到了第四个卡拉房子的最远端看到了壮观的雪山下次还想参加活动去南疆', |
|
|
|
image: '/static/image/temp-36.png', |
|
|
|
image: '/pages_order/static/temp-38.png', |
|
|
|
}, |
|
|
|
{ |
|
|
|
avatar: '/static/image/temp-30.png', |
|
|
|
avatar: '/pages_order/static/temp-30.png', |
|
|
|
name: '战斗世界', |
|
|
|
createTime: '2025-07-12', |
|
|
|
content: '凌玉姐姐很温柔很耐心很负责我很喜欢她龙哥知识渊博很幽默给我们讲解很多内容行程很有趣我学到了很多东西最难忘的就是库木塔格沙漠我们爬到了很高的顶端看夕阳绝美还有我也很喜欢夏塔古道我们爬到了第四个卡拉房子的最远端看到了壮观的雪山下次还想参加活动去南疆', |
|
|
|
image: '/static/image/temp-36.png', |
|
|
|
image: '/pages_order/static/temp-38.png', |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
// todo: fetch |
|
|
|
}, |
|
|
|
onCollect() { |
|
|
|
this.$store.dispatch('collect', this.id) |
|
|
|
|
|
|
|
// todo: set collectd and change btn to cancel collect? |
|
|
|
}, |
|
|
|
onBuy() { |
|
|
|
this.$refs.orderInfoPopup.open({ selectTime: this.selectTime }) |
|
|
|
|