修改火车票埋点配置

This commit is contained in:
tangxinyue 2026-03-05 16:26:38 +08:00
parent b77ee8073d
commit b149dbd858
8 changed files with 1460 additions and 777 deletions

View File

@ -27,7 +27,7 @@ export function createApp() {
const systemInfo = uni.getStorageSync('systemInfo') || {} const systemInfo = uni.getStorageSync('systemInfo') || {}
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android' app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.2.sp8') uni.setStorageSync('version', '1.0.2.sp9')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);

View File

@ -184,6 +184,14 @@
"navigationBarTitleText": "携程火车票", "navigationBarTitleText": "携程火车票",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path" : "train-tickets/qunar-train-tickets/qunar-train-tickets",
"style" :
{
"navigationBarTitleText" : "去哪儿",
"navigationStyle": "custom"
}
} }
] ]
}, },

View File

@ -136,32 +136,32 @@
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
util, util,
uiUtil uiUtil
} from '@/utils/common.js' } from '@/utils/common.js'
import { import {
storage storage
} from '@/utils/storage.js' } from '@/utils/storage.js'
import { import {
get, get,
postJson postJson
} from '@/utils/requests.js' } from '@/utils/requests.js'
import { import {
ref, ref,
reactive, reactive,
toRefs toRefs
} from 'vue'; } from 'vue';
import { import {
onLoad, onLoad,
onShow, onShow,
onHide, onHide,
onUnload onUnload
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
// 内部埋点方法 // 内部埋点方法
const apiUserEvent = async (type, adminData) => { const apiUserEvent = async (type, adminData) => {
let uni_version = uni.getStorageSync("version") let uni_version = uni.getStorageSync("version")
if (type != 'uni') { if (type != 'uni') {
await postJson('a', 'api/user/event', { await postJson('a', 'api/user/event', {
@ -174,10 +174,10 @@
}), }),
}) })
} }
} }
// 内部跳转充值页方法 // 内部跳转充值页方法
const goRechargePage = () => { const goRechargePage = () => {
// 进入页面 // 进入页面
apiUserEvent('all', { apiUserEvent('all', {
type: "event", type: "event",
@ -190,64 +190,64 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/recharge/index' url: '/pages/common/recharge/index'
}); });
} }
// 菜单列表 // 菜单列表
const menuList = [{ const menuList = [{
icon: "yuemoni", icon: "yuemoni",
name: "余额模拟", name: "余额模拟",
isHot: false, isHot: false,
path: "/pages/balance/index" path: "/pages/balance/index"
}, },
{ {
icon: "zhangdanshencheng", icon: "zhangdanshencheng",
name: "账单生成", name: "账单生成",
isHot: false, isHot: false,
path: "/pages/bill/bill-list/bill-list" path: "/pages/bill/bill-list/bill-list"
}, },
{ {
icon: "licaiheika", icon: "licaiheika",
name: "理财黑卡", name: "理财黑卡",
isHot: true, isHot: true,
path: "/pages/finance-management/index" path: "/pages/finance-management/index"
// path: "" // path: ""
}, },
{ {
icon: "huabei", icon: "huabei",
name: "花呗", name: "花呗",
isHot: false, isHot: false,
path: "/pages/ant-credit-pay/index" path: "/pages/ant-credit-pay/index"
}, },
] ]
const otherList = [{ const otherList = [{
icon: "/static/image/index/qita/jipiao.png", icon: "/static/image/index/qita/jipiao.png",
name: "机票", name: "机票",
path: "/pages/other/tickets-app/index?type=airTicket" path: "/pages/other/tickets-app/index?type=airTicket"
}, },
{ {
icon: "/static/image/index/qita/huochepiao.png", icon: "/static/image/index/qita/huochepiao.png",
name: "火车票", name: "火车票",
// path: "/pages/other/train-tickets/12306-tickets/12306-tickets" // path: "/pages/other/train-tickets/12306-tickets/12306-tickets"
path: "/pages/other/tickets-app/index?type=trainTicket" path: "/pages/other/tickets-app/index?type=trainTicket"
}, },
{ {
icon: "/static/image/index/qita/gongzidan.png", icon: "/static/image/index/qita/gongzidan.png",
name: "工资单", name: "工资单",
path: "/pages/other/splash/splash" path: "/pages/other/splash/splash"
}, },
{ {
icon: "/static/image/index/qita/shipinqunliao.png", icon: "/static/image/index/qita/shipinqunliao.png",
name: "视频群聊", name: "视频群聊",
path: "/pages/other/video-group-chat/video-group-chat" path: "/pages/other/video-group-chat/video-group-chat"
}, },
{ {
icon: "/static/image/index/qita/card.png", icon: "/static/image/index/qita/card.png",
name: "身份证", name: "身份证",
path: "/pages/other/card/card" path: "/pages/other/card/card"
}, },
] ]
const data = reactive({ const data = reactive({
navBarBgColor: 'transparent', navBarBgColor: 'transparent',
statusBarHeight: 0, statusBarHeight: 0,
windowWidth: 0, windowWidth: 0,
@ -258,9 +258,9 @@
vision: "", vision: "",
platform: '', // 添加平台信息, platform: '', // 添加平台信息,
qqgroup: {} qqgroup: {}
}) })
const { const {
statusBarHeight, statusBarHeight,
windowWidth, windowWidth,
windowHeight, windowHeight,
@ -270,12 +270,12 @@
vision, vision,
platform, platform,
qqgroup qqgroup
} = toRefs(data); } = toRefs(data);
/** /**
* 处理页面滚动事件 * 处理页面滚动事件
*/ */
const handleScroll = (e) => { const handleScroll = (e) => {
const scrollTop = e.detail.scrollTop const scrollTop = e.detail.scrollTop
// 滚动超过20px时显示蓝色背景否则显示透明背景 // 滚动超过20px时显示蓝色背景否则显示透明背景
if (scrollTop > 20) { if (scrollTop > 20) {
@ -283,16 +283,16 @@
} else { } else {
data.navBarBgColor = 'transparent' data.navBarBgColor = 'transparent'
} }
} }
onLoad(async () => { onLoad(async () => {
// 获取平台信息 // 获取平台信息
const systemInfo = uni.getSystemInfoSync() const systemInfo = uni.getSystemInfoSync()
data.platform = systemInfo.platform data.platform = systemInfo.platform
data.vision = uni.getStorageSync('version') data.vision = uni.getStorageSync('version')
}) })
onShow(() => { onShow(() => {
// 启动时获取数据 // 启动时获取数据
fetchUserData() fetchUserData()
// 每次显示时刷新数据 // 每次显示时刷新数据
@ -308,12 +308,12 @@
plus.navigator.setStatusBarStyle("dark"); plus.navigator.setStatusBarStyle("dark");
}, 500) }, 500)
// #endif // #endif
}) })
/** /**
* 获取用户数据(从服务器) * 获取用户数据(从服务器)
*/ */
const fetchUserData = async () => { const fetchUserData = async () => {
try { try {
// 先设置默认值,避免页面显示异常 // 先设置默认值,避免页面显示异常
setUserData() setUserData()
@ -353,12 +353,12 @@
} catch (error) { } catch (error) {
console.error('获取用户数据异常:', error) console.error('获取用户数据异常:', error)
} }
} }
/** /**
* 获取用户信息 * 获取用户信息
*/ */
const fetchUserInfo = async () => { const fetchUserInfo = async () => {
const data = await get('', 'api/user', {}) const data = await get('', 'api/user', {})
if (data.code === 0) { if (data.code === 0) {
uni.setStorageSync('userInfo', data.data) uni.setStorageSync('userInfo', data.data)
@ -366,12 +366,12 @@
} else { } else {
throw new Error(data.message || '获取用户信息失败') throw new Error(data.message || '获取用户信息失败')
} }
} }
/** /**
* 获取用户配置 * 获取用户配置
*/ */
const fetchUserConfig = async () => { const fetchUserConfig = async () => {
const data = await get('', 'api/user/config', {}) const data = await get('', 'api/user/config', {})
if (data.code === 0) { if (data.code === 0) {
uni.setStorageSync('config', data.data) uni.setStorageSync('config', data.data)
@ -379,13 +379,13 @@
} else { } else {
throw new Error(data.message || '获取用户配置失败') throw new Error(data.message || '获取用户配置失败')
} }
} }
/** /**
* 设置用户数据(从本地存储读取) * 设置用户数据(从本地存储读取)
*/ */
const setUserData = () => { const setUserData = () => {
// 用户信息 - 提供默认值 // 用户信息 - 提供默认值
const userInfoData = storage.get("userInfo") const userInfoData = storage.get("userInfo")
data.userInfo = userInfoData || { data.userInfo = userInfoData || {
@ -427,9 +427,9 @@
} }
data.videoHelpList = [] data.videoHelpList = []
} }
} }
const clickMenu = (item) => { const clickMenu = (item) => {
if (!item.path) { if (!item.path) {
uiUtil.showError('开发中') uiUtil.showError('开发中')
} else { } else {
@ -440,61 +440,61 @@
} }
util.goPage(url) util.goPage(url)
} }
} }
// 开通vip // 开通vip
const openVip = () => { const openVip = () => {
goRechargePage() goRechargePage()
} }
/** /**
* 点击视频教程 * 点击视频教程
* @param item * @param item
*/ */
const clickVideoHelp = (item) => { const clickVideoHelp = (item) => {
const url = item.url const url = item.url
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${item.text}`) util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${item.text}`)
} }
/** /**
* 点击公告 * 点击公告
*/ */
const clickNotice = () => { const clickNotice = () => {
console.log("点击公告", noticeInfo.value) console.log("点击公告", noticeInfo.value)
if (!noticeInfo.value.url) return if (!noticeInfo.value.url) return
const url = noticeInfo.value.url + `&uni_id=${userInfo.value.user_id}` const url = noticeInfo.value.url + `&uni_id=${userInfo.value.user_id}`
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${noticeInfo.value.title}`) util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${noticeInfo.value.title}`)
} }
/** /**
* 终极兼容版复制函数 * 终极兼容版复制函数
*/ */
const copyNumber = (number) => { const copyNumber = (number) => {
if (!number) return; if (!number) return;
const text = String(number); const text = String(number);
uni.setClipboardData({ uni.setClipboardData({
data: text, data: text,
success: function() { success: function () {
uni.showToast({ uni.showToast({
title: '复制成功', title: '复制成功',
icon: 'none' icon: 'none'
}); });
}, },
fail: function() { fail: function () {
uni.showToast({ uni.showToast({
title: '复制失败', title: '复制失败',
icon: 'none' icon: 'none'
}); });
} }
}); });
} }
/** /**
* 退出模拟器 * 退出模拟器
*/ */
const exit = () => { const exit = () => {
console.log("退出模拟器") console.log("退出模拟器")
// 判断是否为 iOS 环境 // 判断是否为 iOS 环境
if (uni.getSystemInfoSync().platform === 'ios') { if (uni.getSystemInfoSync().platform === 'ios') {
@ -504,25 +504,25 @@
} else { } else {
plus.runtime.quit(); plus.runtime.quit();
} }
} }
const noticeContainer = ref(null); const noticeContainer = ref(null);
const noticeInner = ref(null); const noticeInner = ref(null);
const noticeBox = ref(null); const noticeBox = ref(null);
// #ifndef H5 // #ifndef H5
const animation = uni.requireNativePlugin('animation'); const animation = uni.requireNativePlugin('animation');
const dom = uni.requireNativePlugin('dom'); const dom = uni.requireNativePlugin('dom');
// #endif // #endif
let marqueeTimer = null; let marqueeTimer = null;
const currentMarqueeId = ref(0); const currentMarqueeId = ref(0);
const lastMarqueeText = ref(''); const lastMarqueeText = ref('');
/** /**
* 开始走马灯 * 开始走马灯
*/ */
const startMarquee = () => { const startMarquee = () => {
// 避免不必要的重置:如果文本没有变化且正在运行,则忽略 // 避免不必要的重置:如果文本没有变化且正在运行,则忽略
if (lastMarqueeText.value === noticeInfo.value.text && currentMarqueeId.value > 0) { if (lastMarqueeText.value === noticeInfo.value.text && currentMarqueeId.value > 0) {
return; return;
@ -570,12 +570,12 @@
}); });
}); });
}, 1000); // 增加延时确保渲染 }, 1000); // 增加延时确保渲染
} }
/** /**
* 执行滚动动画循环 * 执行滚动动画循环
*/ */
const runMarqueeAnimation = (containerWidth, textWidth, myId) => { const runMarqueeAnimation = (containerWidth, textWidth, myId) => {
// ID 校验如果当前ID不匹配说明已被新动画取代停止递归 // ID 校验如果当前ID不匹配说明已被新动画取代停止递归
if (myId !== currentMarqueeId.value) return; if (myId !== currentMarqueeId.value) return;
if (!noticeInner.value) return; if (!noticeInner.value) return;
@ -612,12 +612,12 @@
runMarqueeAnimation(containerWidth, textWidth, myId); runMarqueeAnimation(containerWidth, textWidth, myId);
}); });
}); });
} }
/** /**
* 停止走马灯 * 停止走马灯
*/ */
const stopMarquee = () => { const stopMarquee = () => {
// 清除定时器 // 清除定时器
if (marqueeTimer) { if (marqueeTimer) {
clearTimeout(marqueeTimer); clearTimeout(marqueeTimer);
@ -625,42 +625,42 @@
} }
// 增加ID使其失效 // 增加ID使其失效
currentMarqueeId.value++; currentMarqueeId.value++;
} }
onHide(() => { onHide(() => {
stopMarquee(); stopMarquee();
}) })
onUnload(() => { onUnload(() => {
stopMarquee(); stopMarquee();
}) })
</script> </script>
<style> <style>
.container { .container {
background-color: #F0F4F9; background-color: #F0F4F9;
} }
.margin-l-6 { .margin-l-6 {
margin-left: 6px; margin-left: 6px;
} }
.index-bg-img { .index-bg-img {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 0; z-index: 0;
} }
.nav-bar-box { .nav-bar-box {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
z-index: 9999; z-index: 9999;
background-color: transparent; background-color: transparent;
} }
.content-box { .content-box {
position: fixed; position: fixed;
top: 0rpx; top: 0rpx;
left: 0; left: 0;
@ -670,29 +670,29 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
::v-deep .uni-scroll-view-content { ::v-deep .uni-scroll-view-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.status-box { .status-box {
width: 100%; width: 100%;
} }
.nav-box { .nav-box {
height: 44px; height: 44px;
background-color: transparent; background-color: transparent;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.left-box { .left-box {
width: 60px; width: 60px;
height: 44px; height: 44px;
background-color: transparent; background-color: transparent;
@ -701,9 +701,9 @@
justify-content: center; justify-content: center;
position: relative; position: relative;
z-index: 10; z-index: 10;
} }
.title { .title {
flex: 1; flex: 1;
height: 44px; height: 44px;
font-size: 32rpx; font-size: 32rpx;
@ -714,33 +714,33 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.right-box { .right-box {
width: 60px; width: 60px;
height: 44px; height: 44px;
background-color: transparent; background-color: transparent;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.user-box { .user-box {
position: relative; position: relative;
margin: 24rpx 32rpx 0; margin: 24rpx 32rpx 0;
height: 120rpx; height: 120rpx;
z-index: 10; z-index: 10;
} }
.user-bg { .user-bg {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
} }
.user-info-box { .user-info-box {
position: absolute; position: absolute;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -752,49 +752,49 @@
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
z-index: 1; z-index: 1;
} }
.user-info { .user-info {
flex: 1; flex: 1;
} }
.user-avatar { .user-avatar {
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
border-radius: 50%; border-radius: 50%;
margin-right: 20rpx; margin-right: 20rpx;
} }
.name-box { .name-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.phone-text { .phone-text {
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
font-weight: bold; font-weight: bold;
margin-right: 12rpx; margin-right: 12rpx;
} }
.vip-logo { .vip-logo {
width: 60rpx; width: 60rpx;
height: 20rpx; height: 20rpx;
} }
.vip-end-time { .vip-end-time {
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #FFFFFF;
margin-top: 8rpx; margin-top: 8rpx;
} }
.open-vip-btn { .open-vip-btn {
height: 40rpx; height: 40rpx;
width: 116rpx; width: 116rpx;
} }
.notice-box { .notice-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@ -804,9 +804,9 @@
padding: 0 16rpx; padding: 0 16rpx;
height: 64rpx; height: 64rpx;
overflow: hidden; overflow: hidden;
} }
.sound-box { .sound-box {
height: 64rpx; height: 64rpx;
width: 50rpx; width: 50rpx;
display: flex; display: flex;
@ -814,35 +814,35 @@
justify-content: center; justify-content: center;
position: relative; position: relative;
z-index: 10; z-index: 10;
} }
.notice-content-wrapper { .notice-content-wrapper {
flex: 1; flex: 1;
flex-direction: row; flex-direction: row;
overflow: hidden; overflow: hidden;
} }
.notice-inner { .notice-inner {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.notice-content { .notice-content {
font-size: 24rpx; font-size: 24rpx;
color: #767676; color: #767676;
} }
.group-box { .group-box {
margin: 32rpx; margin: 32rpx;
margin-bottom: 0; margin-bottom: 0;
} }
.title-img { .title-img {
width: 140rpx; width: 140rpx;
height: 44rpx; height: 44rpx;
} }
.video-help-box { .video-help-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@ -853,47 +853,47 @@
margin-top: 16rpx; margin-top: 16rpx;
flex-wrap: wrap; flex-wrap: wrap;
padding-top: 8rpx; padding-top: 8rpx;
} }
.video-help-item { .video-help-item {
margin-top: 16rpx; margin-top: 16rpx;
width: 25%; width: 25%;
text-align: center; text-align: center;
flex-direction: column; flex-direction: column;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.video-help-img { .video-help-img {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
} }
.video-help-title { .video-help-title {
font-size: 24rpx; font-size: 24rpx;
color: #1A1A1A; color: #1A1A1A;
text-align: center; text-align: center;
} }
.menu-box { .menu-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 16rpx; margin-top: 16rpx;
} }
.item-box { .item-box {
position: relative; position: relative;
height: 156rpx; height: 156rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.menu-item { .menu-item {
display: flex; display: flex;
position: relative; position: relative;
flex-direction: row; flex-direction: row;
@ -903,47 +903,47 @@
border-radius: 16rpx; border-radius: 16rpx;
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
height: 140rpx; height: 140rpx;
} }
.menu-item-name { .menu-item-name {
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
color: #000000; color: #000000;
} }
.name-img { .name-img {
height: 28rpx; height: 28rpx;
} }
.hot-icon { .hot-icon {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 68rpx; width: 68rpx;
height: 30rpx; height: 30rpx;
z-index: 99; z-index: 99;
} }
.activity-box { .activity-box {
margin: 0 32rpx; margin: 0 32rpx;
} }
.footer-box { .footer-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 40rpx; margin-top: 40rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.vision-text { .vision-text {
font-size: 24rpx; font-size: 24rpx;
color: #767676; color: #767676;
} }
.ios-padding-bottom { .ios-padding-bottom {
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
</style> </style>

View File

@ -51,44 +51,51 @@ const {
let type = ref('airTicket') let type = ref('airTicket')
const appList = [{ const appList = [
name: '去哪儿APP', {
logo: '/static/image/other/tickets-app/qvnar-logo.png',
bgImage: '/static/image/other/tickets-app/qvnar-bg.png',
airPath: '/pages/other/air-tickets/qunar-air-tickets/qunar-air-tickets',
trainPath: "",
isHot: false
},
{
name: '飞猪APP',
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: "",
isHot: true
},
{
name: '携程APP', name: '携程APP',
logo: '/static/image/other/tickets-app/trip-com-logo.png', logo: '/static/image/other/tickets-app/trip-com-logo.png',
bgImage: '/static/image/other/tickets-app/trip-com-bg.png', bgImage: '/static/image/other/tickets-app/trip-com-bg.png',
airPath: '/pages/other/air-tickets/ctrip-air-tickets/ctrip-air-tickets', airPath: '/pages/other/air-tickets/ctrip-air-tickets/ctrip-air-tickets',
trainPath: "/pages/other/train-tickets/ctrip-train-tickets/ctrip-train-tickets", trainPath: "/pages/other/train-tickets/ctrip-train-tickets/ctrip-train-tickets",
isHot: false isHot: false
}, },
{ {
name: '铁路12306', name: '铁路12306',
logo: '/static/image/other/tickets-app/12306-logo.png', logo: '/static/image/other/tickets-app/12306-logo.png',
bgImage: '/static/image/other/tickets-app/12306-bg.png', bgImage: '/static/image/other/tickets-app/12306-bg.png',
airPath: '', airPath: '',
trainPath: "/pages/other/train-tickets/12306-tickets/12306-tickets", trainPath: "/pages/other/train-tickets/12306-tickets/12306-tickets",
isHot: false isHot: false
} }, {
name: '去哪儿APP',
logo: '/static/image/other/tickets-app/qvnar-logo.png',
bgImage: '/static/image/other/tickets-app/qvnar-bg.png',
airPath: '/pages/other/air-tickets/qunar-air-tickets/qunar-air-tickets',
trainPath: "开发中",
isHot: false
},
{
name: '飞猪APP',
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: "开发中",
isHot: true
},
] ]
onLoad((option) => { onLoad((option) => {
const appType = option.type const appType = option.type
if (appType == "trainTicket") { if (appType == "trainTicket") {
type.value = "trainTicket" type.value = "trainTicket"
//
proxy.$apiUserEvent('all', {
type: 'event',
key: 'train_ticket',
prefix: '.uni.other.',
value: "高铁票"
})
} else { } else {
type.value = "airTicket" type.value = "airTicket"
// //
@ -108,7 +115,7 @@ onLoad((option) => {
*/ */
const handleItemClick = (item) => { const handleItemClick = (item) => {
if (type.value == 'trainTicket') { if (type.value == 'trainTicket') {
if (item.trainPath) { if (item.trainPath && item.trainPath != "开发中") {
util.goPage(item.trainPath) util.goPage(item.trainPath)
} else { } else {
uni.showToast({ uni.showToast({

View File

@ -364,14 +364,6 @@ const calculateNightCount = () => {
onLoad(() => { onLoad(() => {
const sys = uni.getSystemInfoSync(); const sys = uni.getSystemInfoSync();
statusBarHeight.value = sys.statusBarHeight || 20; statusBarHeight.value = sys.statusBarHeight || 20;
//
proxy.$apiUserEvent('all', {
type: 'event',
key: 'train_ticket',
prefix: '.uni.other.',
value: "高铁票"
})
}); });
onShow(() => { onShow(() => {

View File

@ -96,22 +96,26 @@
</view> </view>
<view class="codefun-flex-row codefun-justify-between codefun-self-stretch group_9"> <view class="codefun-flex-row codefun-justify-between codefun-self-stretch group_9">
<view class="codefun-flex-col"> <view class="codefun-flex-col">
<text class="font_1 text_14">{{ formatDateTime(ticketsInfo.ticketInfo.departureTime, <text class="font_1 text_14 w-100">{{ formatDateTime(ticketsInfo.ticketInfo.departureTime,
ticketsInfo.ticketInfo.date) }}</text> ticketsInfo.ticketInfo.date) }}</text>
</view> </view>
<text class="font_1 text_15">{{ ticketsInfo.ticketInfo.duration }}</text> <text class="font_1 text_15">{{ ticketsInfo.ticketInfo.duration }}</text>
<text class="font_1 text_16">{{ formatDateTime(ticketsInfo.ticketInfo.arrivalTime, <text class="font_1 text_16 w-100 text-align-r">{{
formatDateTime(ticketsInfo.ticketInfo.arrivalTime,
ticketsInfo.ticketInfo.date) }}</text> ticketsInfo.ticketInfo.date) }}</text>
</view> </view>
<view <view
class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_10"> class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_10">
<text class="font_7" @click="goEdit">{{ ticketsInfo.ticketInfo.departureTime.split(' ')[1] }}</text> <text class="font_7 w-80" @click="goEdit">{{ ticketsInfo.ticketInfo.departureTime.split(' ')[1]
}}</text>
<image class="image_11" src="/static//image/other/train-tickets/ctrip/jingtingxinxi.png" /> <image class="image_11" src="/static//image/other/train-tickets/ctrip/jingtingxinxi.png" />
<text class="font_7" @click="goEdit">{{ ticketsInfo.ticketInfo.arrivalTime.split(' ')[1] }}</text> <text class="font_7 w-80 text-align-r" @click="goEdit">{{
ticketsInfo.ticketInfo.arrivalTime.split(' ')[1]
}}</text>
</view> </view>
<view <view
class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_11"> class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_11">
<view class="codefun-flex-row codefun-items-center"> <view class="codefun-flex-row codefun-items-center w-100">
<text class="font_8 text_18">{{ ticketsInfo.ticketInfo.departureStation }}</text> <text class="font_8 text_18">{{ ticketsInfo.ticketInfo.departureStation }}</text>
<image class="image_13 codefun-ml-4" <image class="image_13 codefun-ml-4"
src="/static//image/other/train-tickets/ctrip/location.png" /> src="/static//image/other/train-tickets/ctrip/location.png" />
@ -123,7 +127,7 @@
<uni-icons type="right" size="10" color="#767676"></uni-icons> <uni-icons type="right" size="10" color="#767676"></uni-icons>
</view> </view>
</view> </view>
<view class="codefun-flex-row codefun-items-center"> <view class="codefun-flex-row codefun-justify-end codefun-items-center w-100">
<image class="image_13" src="/static//image/other/train-tickets/ctrip/location.png" /> <image class="image_13" src="/static//image/other/train-tickets/ctrip/location.png" />
<text class="font_8 text_20 codefun-ml-2">{{ ticketsInfo.ticketInfo.arrivalStation }}</text> <text class="font_8 text_20 codefun-ml-2">{{ ticketsInfo.ticketInfo.arrivalStation }}</text>
</view> </view>
@ -413,6 +417,18 @@ const formatMMDD = (mdStr) => {
@import '/common/global.css'; @import '/common/global.css';
</style> </style>
<style lang="less"> <style lang="less">
.w-100 {
width: 100px;
}
.w-80 {
width: 80px;
}
.text-align-r {
text-align: right;
}
.ml-15 { .ml-15 {
margin-left: 15px; margin-left: 15px;
} }
@ -646,6 +662,9 @@ const formatMMDD = (mdStr) => {
.main-container { .main-container {
padding-bottom: 12px;
padding-bottom: calc(12px + constant(safe-area-inset-bottom));
padding-bottom: calc(12px + env(safe-area-inset-bottom));
.section_3 { .section_3 {
padding-bottom: 86px; padding-bottom: 86px;

View File

@ -130,7 +130,7 @@
<text class="label">积分</text> <text class="label">积分</text>
<input class="input" type="number" v-model="passenger.points" /> <input class="input" type="number" v-model="passenger.points" />
</view> </view>
<view class="form-item"> <view v-if="app != 'ctrip'" class="form-item">
<text class="label">证件类型</text> <text class="label">证件类型</text>
<input class="input" v-model="passenger.idType" /> <input class="input" v-model="passenger.idType" />
</view> </view>

View File

@ -0,0 +1,657 @@
<template>
<view class="codefun-flex-col section">
<view class="codefun-flex-col">
<NavBar :bgColor="data.navBar.bgColor">
<template v-slot:right>
<view class="codefun-flex-col group_2">
<view class="codefun-flex-row group_3">
<image class="image_4"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=44fab7ee90c95b87261af4a7daf16baa.png" />
<image class="image_4 ml-25"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=65cb30e87fa83964e97ff8fca353aae5.png" />
</view>
<view class="codefun-flex-row codefun-mt-4">
<text class="font text">退改说明</text>
<text class="font text_2 ml-11">客服</text>
</view>
</view>
</template>
</NavBar>
<view class="codefun-flex-row codefun-justify-between codefun-items-center group_4 codefun-mt-10">
<view class="codefun-flex-row codefun-items-center">
<image class="codefun-shrink-0 image_5"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=9eb41daef3c005e12021a9e662213233.png" />
<text class="text_5 ml-7">出票完成</text>
<view
class="codefun-flex-col codefun-justify-start codefun-items-center codefun-shrink-0 text-wrapper ml-7 codefun-justify-center">
<text class="font_5 text_6">订返程</text>
</view>
</view>
<view class="codefun-flex-col section_2">
<view class="codefun-self-start group_5">
<text class="font_2 text_3">¥</text>
<text class="font_2 text_4">411.3</text>
</view>
<image class="codefun-shrink-0 codefun-self-end image_7 image_8"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=57cd551df6c3f5bf9e1926e61e44b652.png" />
<text class="codefun-self-start text_7">支付明细</text>
</view>
</view>
</view>
</view>
<view class="main-box">
<view class="codefun-flex-col section_3">
<view class="codefun-flex-col view">
<view class="codefun-flex-row codefun-items-baseline codefun-self-stretch codefun-justify-between">
<text class="font_5 text_8">取票号:E452364128</text>
<view class="group_9 ml-25">
<text class="font_6">6A7A进站检票口,6B7B进站检票 6A7A进站检票口,6B7B进站检票</text>
</view>
</view>
<view class="codefun-flex-row equal-division codefun-justify-between">
<view class="codefun-flex-col group_10 group_28">
<text class="codefun-self-stretch font_3 text_16">10月07日 周二</text>
<text class="codefun-self-start font_8 mt-7">12:06</text>
</view>
<view class="codefun-flex-col codefun-items-center group_10 group_29">
<text class="font_5 text_17">3小时2分</text>
<image class="image_9 mt-11"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=04cc1a57adb212e81d9636e2ccf62d52.png" />
</view>
<view class="codefun-flex-col group_10 group_26">
<text class="codefun-self-start font_3 text_18">10月07日 周二</text>
<text class="codefun-self-end font_8 mt-7">12:06</text>
</view>
</view>
<view class="codefun-flex-row codefun-justify-center codefun-self-stretch codefun-relative group_11">
<view class="codefun-flex-row codefun-items-center pos">
<text class="font_9 text_19">长沙南</text>
<image class="codefun-shrink-0 image_4 ml-3"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=d359b87761ae865350a6df0242beabf4.png" />
</view>
<view class="codefun-flex-row codefun-items-center">
<text class="font_19 text_21">G5267</text>
<image class="codefun-shrink-0 image_10 codefun-ml-2"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=81fda3cc1109a351855d1057b2ba5637.png" />
</view>
<view class="codefun-flex-row codefun-items-center pos_2">
<image class="codefun-shrink-0 image_4"
src="https://ide.code.fun/api/image?token=69a8ecc59a40b800116f659f&name=d359b87761ae865350a6df0242beabf4.png" />
<text class="font_9 text_20 codefun-ml-4">虎门</text>
</view>
</view>
</view>
<view class="codefun-flex-col group_12">
<view class="codefun-flex-col section_1">
<view class="codefun-flex-col">
<view class="codefun-flex-row codefun-justify-between codefun-items-center">
<view class="codefun-flex-row codefun-items-baseline">
<text class="font_10">汪鱼</text>
<text class="font_11 text_22 codefun-ml-10">成人票</text>
</view>
<view class="codefun-flex-row">
<view
class="codefun-flex-col codefun-justify-start codefun-items-center codefun-shrink-0 text-wrapper_8">
<text class="font_4 text_23">靠窗</text>
</view>
<text class="font_12 text_51 codefun-ml-6">14车11F号</text>
</view>
</view>
<view class="codefun-flex-row codefun-justify-between codefun-mt-8">
<text class="codefun-self-start font_13">5102**********553</text>
<text class="codefun-self-center font_14 text_25">二等座</text>
</view>
</view>
<view class="codefun-flex-row codefun-justify-between codefun-items-center group_27 mt-19">
<text class="font_15 text_50">出票成功</text>
<view class="codefun-flex-row">
<view class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3">
<text class="font_16 text_27">分享</text>
</view>
<view
class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_1 codefun-ml-6">
<text class="font_16 text_28">改签</text>
</view>
<view
class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_5 codefun-ml-6">
<text class="font_16 text_29">退票</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import NavBar from '@/components/nav-bar/nav-bar.vue';
import { reactive } from 'vue'
const data = reactive({
navBar: {
bgColor: 'transparent'
}
})
</script>
<style>
@import '/common/global.css';
page {
background-color: #F2F5F9;
}
</style>
<style lang="less" scoped>
.ml-5 {
margin-left: 10rpx;
}
.ml-11 {
margin-left: 22rpx;
}
.ml-7 {
margin-left: 14rpx;
}
.ml-25 {
margin-left: 50rpx;
}
.mt-7 {
margin-top: 14rpx;
}
.mt-11 {
margin-top: 22rpx;
}
.ml-3 {
margin-left: 6rpx;
}
.mt-19 {
margin-top: 38rpx;
}
.section {
background: linear-gradient(180deg, #CDF2F6 0%, #F2F5F9 100%);
.group {
padding: 0 29.34rpx;
.image {
width: 34rpx;
height: 22rpx;
}
.image_2 {
width: 30rpx;
height: 22rpx;
}
.image_3 {
width: 48rpx;
height: 22.66rpx;
}
}
.image_5 {
width: 44rpx;
height: 44rpx;
}
.image_6 {
margin: 4rpx 0 3.92rpx;
}
.group_2 {
.group_3 {
padding-left: 23.26rpx;
padding-right: 4.64rpx;
.image_4 {
width: 28rpx;
height: 28rpx;
}
}
.font {
font-size: 18rpx;
line-height: 16.88rpx;
color: #363636;
}
.text {
line-height: 16.68rpx;
}
.text_2 {
line-height: 16.74rpx;
}
}
.group_4 {
padding-left: 20rpx;
padding-bottom: 30rpx;
.text_5 {
color: #363636;
font-size: 44rpx;
font-weight: 800;
line-height: 41.18rpx;
}
.text-wrapper {
border-radius: 25rpx;
width: 106rpx;
height: 50rpx;
border: solid 1rpx #28c2dd;
.font_5 {
font-size: 26rpx;
line-height: 21.14rpx;
color: #666666;
}
.text_6 {
color: #28c2dd;
font-size: 24rpx;
line-height: 21.7rpx;
}
}
.section_2 {
padding: 19.76rpx 16.2rpx 13.54rpx;
background-image: linear-gradient(270deg, #ffffff00 -64.3%, #ffffff 91.7%);
border-radius: 16rpx 0rpx 0rpx 16rpx;
width: 160rpx;
height: 94rpx;
.group_5 {
line-height: 20.46rpx;
.font_2 {
font-size: 26rpx;
line-height: 21.14rpx;
color: #fb8517;
}
.text_3 {
font-size: 28rpx;
line-height: 19.9rpx;
}
.text_4 {
font-size: 28rpx;
line-height: 20.46rpx;
}
}
.image_7 {
width: 20rpx;
height: 20rpx;
}
.image_8 {
margin-right: 11.8rpx;
}
.text_7 {
margin-left: 2.52rpx;
margin-top: 3.84rpx;
color: #363636;
font-size: 20rpx;
line-height: 18.62rpx;
}
}
}
}
.main-box {
padding: 10rpx 16rpx;
.ml-25 {
margin-left: 50rpx;
}
.section_3 {
padding: 20rpx 18rpx 0;
background-color: #ffffff;
border-radius: 20rpx;
.view {
margin: 0 14rpx;
padding-top: 2.96rpx;
.font_5 {
font-size: 26rpx;
line-height: 21.14rpx;
color: #666666;
}
.text_8 {
font-size: 24rpx;
}
.group_9 {
line-height: 21.76rpx;
height: 21.76rpx;
overflow: hidden;
overflow-x: auto;
flex: 1;
/* 隐藏横向滚动条,但保留滑动效果 */
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
.font_6 {
white-space: nowrap;
font-size: 22rpx;
line-height: 24rpx;
font-weight: 500;
color: #4FB26E;
}
}
.equal-division {
align-self: flex-start;
margin-top: 21rpx;
width: 100%;
.group_10 {
flex-shrink: 0;
.font_3 {
font-size: 26rpx;
line-height: 25.92rpx;
color: #363636;
}
.text_16 {
font-size: 28rpx;
line-height: 24rpx;
}
.font_8 {
font-size: 52rpx;
color: #363636;
}
.text_17 {
font-size: 24rpx;
line-height: 22.04rpx;
}
.image_9 {
width: 234rpx;
height: 44rpx;
}
.text_18 {
font-size: 28rpx;
line-height: 24rpx;
text-align: right;
width: 100%;
}
}
.group_28 {
padding: 16rpx 0;
width: 200rpx;
}
.group_29 {
padding: 18.84rpx 0 3.54rpx;
}
.group_26 {
padding: 16rpx 0;
width: 200rpx;
}
}
.group_11 {
.pos {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
.text_19 {
font-size: 28rpx;
line-height: 25.96rpx;
}
}
.font_19 {
font-size: 26rpx;
line-height: 28rpx;
color: #666666;
}
.text_21 {
font-size: 24rpx;
line-height: 17.54rpx;
}
.image_10 {
width: 30rpx;
height: 30rpx;
}
.pos_2 {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
.text_20 {
font-size: 28rpx;
line-height: 25.82rpx;
}
}
.image_4 {
width: 28rpx;
height: 28rpx;
}
.font_9 {
font-size: 26rpx;
line-height: 25.92rpx;
font-weight: 800;
color: #363636;
}
}
}
.group_12 {
padding: 38rpx 0 24rpx;
.section_1 {
padding: 28rpx 10.58rpx 22rpx 19.1rpx;
background-color: #f9fbfc;
border-radius: 16rpx;
.text_22 {
font-size: 24rpx;
line-height: 22.22rpx;
}
.text-wrapper_8 {
background-color: #9db2bd;
border-radius: 8rpx;
width: 56rpx;
height: 32rpx;
.text_23 {
line-height: 32rpx;
}
}
.text_51 {
margin-top: 2.92rpx;
}
.text_25 {
margin-right: 4.38rpx;
font-size: 28rpx;
}
.group_27 {
padding: 0 8.98rpx;
.text_50 {
font-size: 28rpx;
}
}
}
.section_4 {
padding: 28rpx 12.64rpx 22rpx 19.1rpx;
background-color: #f9fbfc;
border-radius: 16rpx;
.text_52 {
font-size: 24rpx;
line-height: 22.22rpx;
}
.text-wrapper_2 {
padding: 7.84rpx 0 5.92rpx;
background-color: #9db2bd;
border-radius: 8rpx;
width: 56rpx;
height: 32rpx;
.text_30 {
line-height: 18.24rpx;
}
}
.text_1 {
margin-top: 2.92rpx;
}
.text_49 {
margin-right: 2.32rpx;
font-size: 28rpx;
}
.group_1 {
padding-left: 8.98rpx;
padding-right: 7.36rpx;
.text_26 {
font-size: 28rpx;
}
}
}
.font_10 {
font-size: 26rpx;
line-height: 23.74rpx;
font-weight: 700;
color: #363636;
}
.font_11 {
font-size: 26rpx;
line-height: 21.14rpx;
font-weight: 700;
color: #999999;
}
.font_4 {
font-size: 20rpx;
color: #ffffff;
}
.font_12 {
font-size: 32rpx;
line-height: 29.6rpx;
color: #363636;
}
.font_13 {
font-size: 26rpx;
line-height: 19rpx;
font-weight: 700;
color: #999999;
}
.font_14 {
font-size: 26rpx;
line-height: 25.92rpx;
color: #545356;
}
.font_15 {
font-size: 26rpx;
line-height: 25.92rpx;
font-weight: 800;
color: #f5882c;
}
.text-wrapper_3 {
padding: 18.14rpx 0 17.54rpx;
background-color: #ffffff;
border-radius: 30rpx;
width: 104rpx;
height: 60rpx;
border: solid 1rpx #e0e4e3;
.text_27 {
font-size: 24rpx;
line-height: 22.32rpx;
}
}
.font_16 {
font-size: 26rpx;
line-height: 21.14rpx;
font-weight: 700;
color: #363636;
}
.text-wrapper_1 {
padding: 18.18rpx 0 17.52rpx;
background-color: #ffffff;
border-radius: 30rpx;
width: 104rpx;
height: 60rpx;
border: solid 1rpx #e0e4e3;
.text_28 {
font-size: 24rpx;
line-height: 22.3rpx;
}
}
.text-wrapper_5 {
padding: 19.26rpx 0 17.6rpx;
background-color: #ffffff;
border-radius: 30rpx;
width: 104rpx;
height: 60rpx;
border: solid 1rpx #e0e4e3;
.text_29 {
font-size: 24rpx;
}
}
}
}
}
</style>