diff --git a/pages.json b/pages.json index 71d7580..fc86c22 100644 --- a/pages.json +++ b/pages.json @@ -187,7 +187,7 @@ } }, { - "path": "train-tickets/fliggy-air-tickets/fliggy-air-tickets", + "path": "train-tickets/fliggy-train-tickets/fliggy-train-tickets", "style": { "navigationBarTitleText": "飞猪火车票", "navigationStyle": "custom" diff --git a/pages/other/tickets-app/index.vue b/pages/other/tickets-app/index.vue index e13f9cc..8e79ccf 100644 --- a/pages/other/tickets-app/index.vue +++ b/pages/other/tickets-app/index.vue @@ -80,7 +80,7 @@ const appList = [ logo: '/static/image/other/tickets-app/fliggy-logo.png', bgImage: '/static/image/other/tickets-app/fliggy-bg.png', airPath: '/pages/other/air-tickets/fliggy-air-tickets/fliggy-air-tickets', - trainPath: "开发中", + trainPath: "/pages/other/train-tickets/fliggy-train-tickets/fliggy-train-tickets", isHot: true }, ] diff --git a/pages/other/train-tickets/edit/edit.vue b/pages/other/train-tickets/edit/edit.vue index 9024f34..aa1a043 100644 --- a/pages/other/train-tickets/edit/edit.vue +++ b/pages/other/train-tickets/edit/edit.vue @@ -21,10 +21,14 @@ {{ ticketsInfo.orderInfo.orderTime }} - + 订单总价 + + 已购服务 + + @@ -103,7 +107,8 @@ 姓名 - + 票种 {{ passenger.type }} @@ -227,7 +232,8 @@ const defaultData = { "cashback": "25", "startDay": "01-01", "endDay": "01-02" - } + }, + serviceText: "多人连坐 ¥10x2份" } // 车票类型 const ticketType = [{ diff --git a/pages/other/train-tickets/fliggy-air-tickets/fliggy-air-tickets.vue b/pages/other/train-tickets/fliggy-air-tickets/fliggy-air-tickets.vue index 3fcf2f6..3ef91a3 100644 --- a/pages/other/train-tickets/fliggy-air-tickets/fliggy-air-tickets.vue +++ b/pages/other/train-tickets/fliggy-air-tickets/fliggy-air-tickets.vue @@ -123,11 +123,13 @@ {{ item.idType }}: - 5**************3 + {{ item.idType.includes('身份证') ? + showFristAndLastNumber(item.idNumber) : (item.idType.includes('护照') ? + stringUtil.maskPassport(item.idNumber) : item.idNumber) }} - 硬座 - ¥64.5 + {{ item.seatType }} + ¥{{ item.price }} @@ -185,8 +187,7 @@ 已购服务 - 多人连坐 - ¥ 10x2份 + {{ ticketsInfo.serviceText }} @@ -238,7 +239,19 @@ import NavBar from '@/components/nav-bar/nav-bar.vue'; import { reactive, ref, computed, toRefs } from 'vue'; import { onShow, onPageScroll } from '@dcloudio/uni-app'; -import { util } from '@/utils/common.js'; +import { util, stringUtil } from '@/utils/common.js'; + +const buttonGroup = [{ + name: "编辑车票信息", + click: () => { + goEdit() + } +}] + +function goEdit() { + util.goPage(`/pages/other/train-tickets/edit/edit?app=fliggy&storageKey=${data.STORAGE_KEY}`) +} + const data = reactive({ navBar: { bgColor: '#FCE041' @@ -269,8 +282,8 @@ const data = reactive({ "seatType": "商务座", "carriage": "01", "seatNo": "03C", - "idType": "外国护照(KR)", - "idNumber": 1236256324589623, + "idType": "身份证", + "idNumber": "1111111111111333", "price": "2110", "status": "已支付", "isMe": true, @@ -281,12 +294,19 @@ const data = reactive({ "cashback": "25", "startDay": "01-01", "endDay": "01-02" - } + }, + "serviceText": "多人连坐 ¥10x2份" }, }) - let { ticketsInfo } = toRefs(data) +onShow(() => { + const stored = uni.getStorageSync(data.STORAGE_KEY) + if (stored) { + Object.assign(data.ticketsInfo, stored) + } +}) + const formatDateTime = (timeStr, dateStr) => { if (!timeStr) return ''; const parts = timeStr.split(' '); @@ -316,12 +336,23 @@ const formatDateTime = (timeStr, dateStr) => { return `${month}-${day} ${week}`; } + +const showFristAndLastNumber = (str) => { + if (!str) { + return ''; + } + const len = str.length; + if (len <= 2) { + return str; + } + return str.slice(0, 1) + '*'.repeat(len - 2) + str.slice(-1); +} - + diff --git a/pages/other/train-tickets/qunar-train-tickets/components/box.vue b/pages/other/train-tickets/qunar-train-tickets/components/box.vue index 01b6544..1e5e135 100644 --- a/pages/other/train-tickets/qunar-train-tickets/components/box.vue +++ b/pages/other/train-tickets/qunar-train-tickets/components/box.vue @@ -122,9 +122,10 @@ page { .section_6 { padding: 24rpx 32rpx; - background-image: url('https://ide.code.fun/api/image?token=69aa2b4a9a40b800116f8c00&name=c0f80a6a5d1e928f0eebbb1c141f11c9.png'); + background-color: #ffffff; background-size: 100% 100%; background-repeat: no-repeat; + border-radius: 20rpx; .image_13 { width: 72rpx; diff --git a/static/image/other/train-tickets/fliggy/baozhang.png b/static/image/other/train-tickets/fliggy/baozhang.png new file mode 100644 index 0000000..3a8c824 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/baozhang.png differ diff --git a/static/image/other/train-tickets/fliggy/chezhandapin.png b/static/image/other/train-tickets/fliggy/chezhandapin.png new file mode 100644 index 0000000..bf2e63b Binary files /dev/null and b/static/image/other/train-tickets/fliggy/chezhandapin.png differ diff --git a/static/image/other/train-tickets/fliggy/dianzifapiao.png b/static/image/other/train-tickets/fliggy/dianzifapiao.png new file mode 100644 index 0000000..d0ed53d Binary files /dev/null and b/static/image/other/train-tickets/fliggy/dianzifapiao.png differ diff --git a/static/image/other/train-tickets/fliggy/feizhu-logo.png b/static/image/other/train-tickets/fliggy/feizhu-logo.png new file mode 100644 index 0000000..530abb0 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/feizhu-logo.png differ diff --git a/static/image/other/train-tickets/fliggy/lishi.png b/static/image/other/train-tickets/fliggy/lishi.png new file mode 100644 index 0000000..40db3e2 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/lishi.png differ diff --git a/static/image/other/train-tickets/fliggy/location.png b/static/image/other/train-tickets/fliggy/location.png new file mode 100644 index 0000000..6b05728 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/location.png differ diff --git a/static/image/other/train-tickets/fliggy/more.png b/static/image/other/train-tickets/fliggy/more.png new file mode 100644 index 0000000..982cb9a Binary files /dev/null and b/static/image/other/train-tickets/fliggy/more.png differ diff --git a/static/image/other/train-tickets/fliggy/share.png b/static/image/other/train-tickets/fliggy/share.png new file mode 100644 index 0000000..e76fcc4 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/share.png differ diff --git a/static/image/other/train-tickets/fliggy/tuigaishuoming.png b/static/image/other/train-tickets/fliggy/tuigaishuoming.png new file mode 100644 index 0000000..a169806 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/tuigaishuoming.png differ diff --git a/static/image/other/train-tickets/fliggy/weixin.png b/static/image/other/train-tickets/fliggy/weixin.png new file mode 100644 index 0000000..8764496 Binary files /dev/null and b/static/image/other/train-tickets/fliggy/weixin.png differ