完成携程机票修改视频聊天逻辑
|
|
@ -1,9 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<view style="width: 100%;" :style="{ height: `calc(${data.statusBarHeight}px + 88rpx)` }">
|
<view style="width: 100%;" :style="{ height: `calc(${data.statusBarHeight}px + 88rpx)` }">
|
||||||
<slot name="statusBar"></slot>
|
<!-- <slot name="statusBar"></slot> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="nav-bar-container" :style="{ backgroundColor: bgColor, zIndex: zIndex }">
|
<view class="nav-bar-container" :style="{ backgroundColor: bgColor, zIndex: zIndex }">
|
||||||
<view class="status-placeholder" :style="{ height: `${data.statusBarHeight}px` }"></view>
|
<view class="status-placeholder" :style="{ height: `${data.statusBarHeight}px` }">
|
||||||
|
<slot name="statusBar"></slot>
|
||||||
|
</view>
|
||||||
<view style="width: 100%;height: 88rpx;" @click="openPopup">
|
<view style="width: 100%;height: 88rpx;" @click="openPopup">
|
||||||
<slot>
|
<slot>
|
||||||
<uni-nav-bar backgroundColor="#00000000" class="nav-bar" :border="false" :title="title" v-bind="$attrs"
|
<uni-nav-bar backgroundColor="#00000000" class="nav-bar" :border="false" :title="title" v-bind="$attrs"
|
||||||
|
|
|
||||||
|
|
@ -6,76 +6,78 @@
|
||||||
<image v-if="dark=='light'" class="colse" src="/static/image/watermarkColseLight.png" mode=""></image>
|
<image v-if="dark=='light'" class="colse" src="/static/image/watermarkColseLight.png" mode=""></image>
|
||||||
<image v-else class="colse" src="/static/image/watermarkColseDark.png" mode=""></image> -->
|
<image v-else class="colse" src="/static/image/watermarkColseDark.png" mode=""></image> -->
|
||||||
<image class="watermarkImg" src="/static/image/watermark.png" mode=""></image>
|
<image class="watermarkImg" src="/static/image/watermark.png" mode=""></image>
|
||||||
<image class="colse" src="/static/image/watermarkColse.png" mode="" @click="$goRechargePage('watermark_close')"></image>
|
<image class="colse" src="/static/image/watermarkColse.png" mode=""
|
||||||
|
@click="$goRechargePage('watermark_close')"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
dark: {
|
dark: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'light'
|
default: 'light'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: "watermark",
|
name: "watermark",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
statusBarHeight: 0
|
statusBarHeight: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStatusBarHeight()
|
this.getStatusBarHeight()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStatusBarHeight() {
|
getStatusBarHeight() {
|
||||||
// 获取系统信息
|
// 获取系统信息
|
||||||
const systemInfo = uni.getSystemInfoSync()
|
const systemInfo = uni.getSystemInfoSync()
|
||||||
this.statusBarHeight = systemInfo.statusBarHeight
|
this.statusBarHeight = systemInfo.statusBarHeight
|
||||||
console.log('状态栏高度:', this.statusBarHeight + 'px')
|
console.log('状态栏高度:', this.statusBarHeight + 'px')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.watermark {
|
.watermark {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
z-index: 99 !important;
|
||||||
|
background-image: url('/static/image/watermarkBG.png');
|
||||||
|
background-size: 125px 125px;
|
||||||
|
|
||||||
|
.watermarkBox {
|
||||||
|
width: 200px;
|
||||||
|
height: 255px;
|
||||||
|
position: relative;
|
||||||
z-index: 99 !important;
|
z-index: 99 !important;
|
||||||
background-image: url('/static/image/watermarkBG.png');
|
|
||||||
background-size: 125px 125px;
|
|
||||||
.watermarkBox {
|
|
||||||
width: 200px;
|
|
||||||
height: 255px;
|
|
||||||
position: relative;
|
|
||||||
z-index: 99 !important;
|
|
||||||
|
|
||||||
.colse {
|
.colse {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -18px;
|
right: -18px;
|
||||||
top: -18px;
|
top: -18px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.watermarkImg {
|
|
||||||
width: 200px;
|
|
||||||
height: 55px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.watermarkImg {
|
||||||
|
width: 200px;
|
||||||
|
height: 55px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
2
main.js
|
|
@ -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.1.sp5')
|
uni.setStorageSync('version', '1.0.2.sp4')
|
||||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||||
|
|
||||||
app.use(globalMethods);
|
app.use(globalMethods);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="codefun-flex-col page">
|
<!-- 水印 -->
|
||||||
|
<view v-if="$isVip()">
|
||||||
|
<watermark dark="light" />
|
||||||
|
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark')">
|
||||||
|
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||||
|
</liu-drag-button>
|
||||||
|
</view>
|
||||||
|
<view class="codefun-flex-col page" :style="{ '--font-weight-bold': $system == 'iOS' ? 500 : 700 }">
|
||||||
|
|
||||||
<view class="codefun-flex-col group">
|
<view class="codefun-flex-col group">
|
||||||
|
|
||||||
|
|
@ -8,7 +15,7 @@
|
||||||
<NavBar title="订单详情" textColor="#fff" :bgColor="data.navBar.bgColor" :buttonGroup="buttonGroup"
|
<NavBar title="订单详情" textColor="#fff" :bgColor="data.navBar.bgColor" :buttonGroup="buttonGroup"
|
||||||
@button-click="util.clickTitlePopupButton" tipLayerType="ctrip-air-tickets-tip" isTipLayer
|
@button-click="util.clickTitlePopupButton" tipLayerType="ctrip-air-tickets-tip" isTipLayer
|
||||||
tipLayerText="修改机票信息">
|
tipLayerText="修改机票信息">
|
||||||
<template v-slot:statusBar>
|
<template v-if="$system == 'iOS'" v-slot:statusBar>
|
||||||
<view class="status-bar">
|
<view class="status-bar">
|
||||||
<image class="top-logo" style="width: 160rpx"
|
<image class="top-logo" style="width: 160rpx"
|
||||||
src="/static/image/other/air-tickets/ctrip-air/top-logo.png" mode="widthFix">
|
src="/static/image/other/air-tickets/ctrip-air/top-logo.png" mode="widthFix">
|
||||||
|
|
@ -20,7 +27,8 @@
|
||||||
<view class="text">订单详情</view>
|
<view class="text">订单详情</view>
|
||||||
<view class="level">
|
<view class="level">
|
||||||
<image style="width: 100%"
|
<image style="width: 100%"
|
||||||
:src="`/static/image/other/air-tickets/ctrip-air/level-1.png`" mode="widthFix">
|
:src="`/static/image/other/air-tickets/ctrip-air/level-${airTicketsInfo.ctripOrderInfo.level}.png`"
|
||||||
|
mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -110,7 +118,8 @@
|
||||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center">
|
<view class="codefun-flex-row codefun-justify-between codefun-items-center">
|
||||||
<view class="codefun-flex-row codefun-items-center">
|
<view class="codefun-flex-row codefun-items-center">
|
||||||
<text class="font_6 text_56">总计</text>
|
<text class="font_6 text_56">总计</text>
|
||||||
<text class="font_7 text_21 codefun-ml-8">¥{{ airTicketsInfo.orderInfo.price }}</text>
|
<text class="font_7 text_21 codefun-ml-8" @click="goEdit">¥{{ airTicketsInfo.orderInfo.price
|
||||||
|
}}</text>
|
||||||
<uni-icons class="codefun-shrink-0 codefun-ml-4" type="help" size="18"
|
<uni-icons class="codefun-shrink-0 codefun-ml-4" type="help" size="18"
|
||||||
color="#006FEF"></uni-icons>
|
color="#006FEF"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -136,7 +145,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="codefun-flex-col group_9">
|
<view class="codefun-flex-col group_9">
|
||||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch">
|
<view class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch">
|
||||||
<view class="codefun-flex-row">
|
<view class="codefun-flex-row" @click="goEdit">
|
||||||
<image class="codefun-shrink-0 image_13"
|
<image class="codefun-shrink-0 image_13"
|
||||||
src="/static/image/other/air-tickets/ctrip-air/airplant.png" />
|
src="/static/image/other/air-tickets/ctrip-air/airplant.png" />
|
||||||
<text class="codefun-self-center font_6 text_64 codefun-ml-6">{{
|
<text class="codefun-self-center font_6 text_64 codefun-ml-6">{{
|
||||||
|
|
@ -157,7 +166,7 @@
|
||||||
<text class="codefun-self-start font_8 text_30">{{ flightInfo.year }} 年 {{ flightInfo.date }} {{
|
<text class="codefun-self-start font_8 text_30">{{ flightInfo.year }} 年 {{ flightInfo.date }} {{
|
||||||
flightInfo.week
|
flightInfo.week
|
||||||
}}</text>
|
}}</text>
|
||||||
<view class="codefun-flex-row codefun-items-center codefun-self-stretch group_10">
|
<view class="codefun-flex-row codefun-items-center codefun-self-stretch group_10" @click="goEdit">
|
||||||
<image class="codefun-shrink-0 image_15"
|
<image class="codefun-shrink-0 image_15"
|
||||||
src="/static/image/other/air-tickets/ctrip-air/image1.png" />
|
src="/static/image/other/air-tickets/ctrip-air/image1.png" />
|
||||||
<view class="codefun-flex-col codefun-flex-1 codefun-ml-12">
|
<view class="codefun-flex-col codefun-flex-1 codefun-ml-12">
|
||||||
|
|
@ -180,20 +189,30 @@
|
||||||
style="flex-wrap: wrap; flex: 1; width: 100%;">
|
style="flex-wrap: wrap; flex: 1; width: 100%;">
|
||||||
<image class="codefun-shrink-0 image_8"
|
<image class="codefun-shrink-0 image_8"
|
||||||
:src="`/static/image/other/air-tickets/air-line/${airlineInfo.icon}.png`" />
|
:src="`/static/image/other/air-tickets/air-line/${airlineInfo.icon}.png`" />
|
||||||
<text class="font_11">{{ airlineInfo.name }}
|
<view class="font_11 codefun-flex-row codefun-items-center">{{
|
||||||
{{ airTicketsInfo.flightInfo.flightNumber }}</text>
|
airlineInfo.name }}
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
{{ airTicketsInfo.flightInfo.flightNumber }}
|
||||||
<text class="font_11">{{ airTicketsInfo.flightInfo.seatCategory }}</text>
|
<view class="codefun-shrink-0 section_8"></view>
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
</view>
|
||||||
<text class="font_11">{{ airTicketsInfo.flightInfo.aircraftType }}</text>
|
<view class="font_11 codefun-flex-row codefun-items-center">{{
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
airTicketsInfo.flightInfo.seatCategory }}<view
|
||||||
<text class="font_11" style="color: #EC6103;">{{
|
class="codefun-shrink-0 section_8">
|
||||||
airTicketsInfo.flightInfo.meal
|
</view>
|
||||||
}}</text>
|
</view>
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
<view class="font_11 codefun-flex-row codefun-items-center">{{
|
||||||
<text class="font_11" style="color: #EC6103;">{{
|
airTicketsInfo.flightInfo.aircraftType }}<view
|
||||||
airTicketsInfo.flightInfo.luggageCheckInQuota
|
class="codefun-shrink-0 section_8">
|
||||||
}}</text>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="font_11 codefun-flex-row codefun-items-center"
|
||||||
|
style="color: #EC6103;">{{
|
||||||
|
airTicketsInfo.flightInfo.meal
|
||||||
|
}}<view class="codefun-shrink-0 section_8"></view>
|
||||||
|
</view>
|
||||||
|
<view class="font_11 codefun-flex-row codefun-items-center"
|
||||||
|
style="color: #EC6103;">{{
|
||||||
|
airTicketsInfo.flightInfo.luggageCheckInQuota
|
||||||
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons class="codefun-shrink-0 codefun-ml-12" type="right" size="12"
|
<uni-icons class="codefun-shrink-0 codefun-ml-12" type="right" size="12"
|
||||||
|
|
@ -219,7 +238,7 @@
|
||||||
<text class="codefun-self-start font_6 text_41">已购 / 赠送服务</text>
|
<text class="codefun-self-start font_6 text_41">已购 / 赠送服务</text>
|
||||||
<view class="codefun-self-stretch grid mt-13">
|
<view class="codefun-self-stretch grid mt-13">
|
||||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item_1">
|
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item_1">
|
||||||
<view class="codefun-flex-row codefun-items-center">
|
<view style="flex: 1;" class="codefun-flex-row codefun-items-center">
|
||||||
<text class="font_8 text_42">优惠券</text>
|
<text class="font_8 text_42">优惠券</text>
|
||||||
<image class="codefun-shrink-0 image_18 codefun-ml-2"
|
<image class="codefun-shrink-0 image_18 codefun-ml-2"
|
||||||
src="/static/image/other/air-tickets/ctrip-air/give.png" />
|
src="/static/image/other/air-tickets/ctrip-air/give.png" />
|
||||||
|
|
@ -228,12 +247,12 @@
|
||||||
color="#C7C8CC"></uni-icons>
|
color="#C7C8CC"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item_2">
|
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item_2">
|
||||||
<text class="font_8 text_43">旅游专享券</text>
|
<text style="flex: 1;" class="font_8 text_43">旅游专享券</text>
|
||||||
<uni-icons class="codefun-shrink-0 codefun-ml-4" type="right" size="13"
|
<uni-icons class="codefun-shrink-0 codefun-ml-4" type="right" size="13"
|
||||||
color="#C7C8CC"></uni-icons>
|
color="#C7C8CC"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item">
|
<view class="codefun-flex-row codefun-justify-between codefun-items-center grid-item">
|
||||||
<view class="codefun-flex-row codefun-items-center">
|
<view style="flex: 1;" class="codefun-flex-row codefun-items-center">
|
||||||
<text class="font_8">机场美食券</text>
|
<text class="font_8">机场美食券</text>
|
||||||
<image class="codefun-shrink-0 image_18 codefun-ml-2"
|
<image class="codefun-shrink-0 image_18 codefun-ml-2"
|
||||||
src="/static/image/other/air-tickets/ctrip-air/give.png" />
|
src="/static/image/other/air-tickets/ctrip-air/give.png" />
|
||||||
|
|
@ -250,8 +269,8 @@
|
||||||
<view class="codefun-flex-row codefun-self-stretch group_17">
|
<view class="codefun-flex-row codefun-self-stretch group_17">
|
||||||
<text class="codefun-shrink-0 codefun-self-start font_13 text_47">出行人</text>
|
<text class="codefun-shrink-0 codefun-self-start font_13 text_47">出行人</text>
|
||||||
<view class="codefun-flex-col codefun-flex-1 codefun-relative group_16 ml-41">
|
<view class="codefun-flex-col codefun-flex-1 codefun-relative group_16 ml-41">
|
||||||
<text class="codefun-self-start text_23"><text style="margin-right: 6px;"
|
<text class="codefun-self-start text_23" @click="goEdit"><text
|
||||||
v-for="value in airTicketsInfo.passengersInfo">{{
|
style="margin-right: 6px;" v-for="value in airTicketsInfo.passengersInfo">{{
|
||||||
value.name }}</text></text>
|
value.name }}</text></text>
|
||||||
<view class="codefun-flex-row codefun-items-center codefun-self-stretch codefun-mt-8">
|
<view class="codefun-flex-row codefun-items-center codefun-self-stretch codefun-mt-8">
|
||||||
<text class="font_14 text_49">查看证件、航司预订号、修改姓名/证件</text>
|
<text class="font_14 text_49">查看证件、航司预订号、修改姓名/证件</text>
|
||||||
|
|
@ -264,8 +283,9 @@
|
||||||
<view
|
<view
|
||||||
class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-start group_18">
|
class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-start group_18">
|
||||||
<text class="font_13 text_50">联系手机</text>
|
<text class="font_13 text_50">联系手机</text>
|
||||||
<text class="text_23">+86 {{ airTicketsInfo.ticketNumber.replace(/(\d{3})\d{4}(\d{4})/,
|
<text class="text_23" @click="goEdit">+86 {{
|
||||||
'$1****$2')
|
airTicketsInfo.ticketNumber.replace(/(\d{3})\d{4}(\d{4})/,
|
||||||
|
'$1****$2')
|
||||||
}}</text>
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="codefun-self-stretch divider"></view>
|
<view class="codefun-self-stretch divider"></view>
|
||||||
|
|
@ -355,10 +375,14 @@ import airlineJson from '@/static/json/air-line.json';
|
||||||
const buttonGroup = [{
|
const buttonGroup = [{
|
||||||
name: "编辑机票信息",
|
name: "编辑机票信息",
|
||||||
click: () => {
|
click: () => {
|
||||||
util.goPage(`/pages/other/air-tickets/edit/edit?ticketsApp=ctrip&storageKey=${data.STORAGE_KEY}`)
|
goEdit()
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
function goEdit() {
|
||||||
|
util.goPage(`/pages/other/air-tickets/edit/edit?ticketsApp=ctrip&storageKey=${data.STORAGE_KEY}`)
|
||||||
|
}
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
navBar: {
|
navBar: {
|
||||||
bgColor: 'transparent'
|
bgColor: 'transparent'
|
||||||
|
|
@ -496,6 +520,8 @@ onPageScroll((e) => {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding-top: 16rpx;
|
||||||
|
padding-bottom: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-navbar__header-btns-right {
|
::v-deep .uni-navbar__header-btns-right {
|
||||||
|
|
@ -599,7 +625,7 @@ onPageScroll((e) => {
|
||||||
.text_5 {
|
.text_5 {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 44rpx;
|
font-size: 44rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
line-height: 40.48rpx;
|
line-height: 40.48rpx;
|
||||||
letter-spacing: 2.2rpx;
|
letter-spacing: 2.2rpx;
|
||||||
}
|
}
|
||||||
|
|
@ -689,7 +715,7 @@ onPageScroll((e) => {
|
||||||
.text_13 {
|
.text_13 {
|
||||||
color: #f2740d;
|
color: #f2740d;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
line-height: 18.38rpx;
|
line-height: 18.38rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -762,7 +788,7 @@ onPageScroll((e) => {
|
||||||
.font_4 {
|
.font_4 {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 24.72rpx;
|
line-height: 24.72rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -770,7 +796,7 @@ onPageScroll((e) => {
|
||||||
.font_3 {
|
.font_3 {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 22.24rpx;
|
line-height: 22.24rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -894,7 +920,6 @@ onPageScroll((e) => {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 16rpx 16rpx 0 0;
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
margin-top: -16rpx;
|
margin-top: -16rpx;
|
||||||
z-index: 99;
|
|
||||||
|
|
||||||
.group_8 {
|
.group_8 {
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
|
|
@ -1050,7 +1075,7 @@ onPageScroll((e) => {
|
||||||
.font_10 {
|
.font_10 {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1070,7 +1095,7 @@ onPageScroll((e) => {
|
||||||
border: solid 2rpx #0177d4;
|
border: solid 2rpx #0177d4;
|
||||||
|
|
||||||
.text_40 {
|
.text_40 {
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
line-height: 22.36rpx;
|
line-height: 22.36rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1079,7 +1104,7 @@ onPageScroll((e) => {
|
||||||
.font_7 {
|
.font_7 {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
line-height: 24.72rpx;
|
line-height: 24.72rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1384,7 +1409,7 @@ onPageScroll((e) => {
|
||||||
.font_6 {
|
.font_6 {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
line-height: 33.26rpx;
|
line-height: 33.26rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1399,7 +1424,7 @@ onPageScroll((e) => {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 999;
|
z-index: 9;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1474,7 +1499,7 @@ onPageScroll((e) => {
|
||||||
.font {
|
.font {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 24.72rpx;
|
line-height: 24.72rpx;
|
||||||
font-weight: 700;
|
font-weight: var(--font-weight-bold);
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -455,7 +455,7 @@ onLoad((options) => {
|
||||||
Object.assign(data.ticketsInfo, mergedData)
|
Object.assign(data.ticketsInfo, mergedData)
|
||||||
|
|
||||||
// 再次检查 tips 是否存在,如果不存在(比如 stored 是旧数据且 defaultData 也没这个字段 - 虽然 defaultData 应该有),初始化为空数组
|
// 再次检查 tips 是否存在,如果不存在(比如 stored 是旧数据且 defaultData 也没这个字段 - 虽然 defaultData 应该有),初始化为空数组
|
||||||
if (data.storageKey === 'fligggyAirTicketsInfo' && !data.ticketsInfo.fligggyOrderInfo.tips) {
|
if (data.storageKey === 'fliggyAirTicketsInfo' && !data.ticketsInfo.fligggyOrderInfo.tips) {
|
||||||
data.ticketsInfo.fligggyOrderInfo.tips = []
|
data.ticketsInfo.fligggyOrderInfo.tips = []
|
||||||
}
|
}
|
||||||
if (data.storageKey === 'ctripAirTicketsInfo' && !data.ticketsInfo.ctripOrderInfo.tips) {
|
if (data.storageKey === 'ctripAirTicketsInfo' && !data.ticketsInfo.ctripOrderInfo.tips) {
|
||||||
|
|
@ -486,7 +486,7 @@ const handleRightButtonClick = () => {
|
||||||
}
|
}
|
||||||
if (data.storageKey === 'ctripAirTicketsInfo') {
|
if (data.storageKey === 'ctripAirTicketsInfo') {
|
||||||
delete data.ticketsInfo.fligggyOrderInfo
|
delete data.ticketsInfo.fligggyOrderInfo
|
||||||
} else if (data.storageKey === 'fligggyAirTicketsInfo') {
|
} else if (data.storageKey === 'fliggyAirTicketsInfo') {
|
||||||
delete data.ticketsInfo.ctripOrderInfo
|
delete data.ticketsInfo.ctripOrderInfo
|
||||||
} else {
|
} else {
|
||||||
delete data.ticketsInfo.fligggyOrderInfo
|
delete data.ticketsInfo.fligggyOrderInfo
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
<view class="fc-price">
|
<view class="fc-price">
|
||||||
<text class="label">总价</text>
|
<text class="label">总价</text>
|
||||||
<view class="symbol">¥</view>
|
<view class="symbol">¥</view>
|
||||||
<text class="value">{{ airTickrtInfo.orderInfo.price }}</text>
|
<text class="value" @click="goEdit">{{ airTickrtInfo.orderInfo.price }}</text>
|
||||||
<uni-icons type="right" size="10" color="#1A1A1A"></uni-icons>
|
<uni-icons type="right" size="10" color="#1A1A1A"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="fc-rules">
|
<view class="fc-rules">
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flight-route">
|
<view class="flight-route" @click="goEdit">
|
||||||
<!-- Departure -->
|
<!-- Departure -->
|
||||||
<view class="route-left">
|
<view class="route-left">
|
||||||
<text class="time">{{ airTickrtInfo.flightInfo.startTime }}</text>
|
<text class="time">{{ airTickrtInfo.flightInfo.startTime }}</text>
|
||||||
|
|
@ -202,13 +202,16 @@
|
||||||
:class="{ 'last-passenger': index === airTickrtInfo.passengersInfo.length - 1 }"
|
:class="{ 'last-passenger': index === airTickrtInfo.passengersInfo.length - 1 }"
|
||||||
v-for="(item, index) in airTickrtInfo.passengersInfo" :key="index">
|
v-for="(item, index) in airTickrtInfo.passengersInfo" :key="index">
|
||||||
<text class="label" :class="{ 'empty': index !== 0 }">乘机人</text>
|
<text class="label" :class="{ 'empty': index !== 0 }">乘机人</text>
|
||||||
<view class="info">
|
<view class="info" @click="goEdit">
|
||||||
<text class="name">{{ item.name }}</text>
|
<text class="name">{{ item.name }}</text>
|
||||||
<text class="id-card">{{ item.idType }}:{{ item.idNumber }}</text>
|
<text class="id-card">{{ item.idType }}:{{ item.idType === '身份证' ?
|
||||||
|
stringUtil.maskIdCard(item.idNumber) : (item.idType === '护照' ?
|
||||||
|
stringUtil.maskPassport(item.idNumber) : item.idNumber) }}</text>
|
||||||
<view class="ticket-row">
|
<view class="ticket-row">
|
||||||
<text class="ticket-no">票号:{{ item.ticketNo }}</text>
|
<text class="ticket-no">票号:{{ item.ticketNo }}</text>
|
||||||
<image src="/static/image/other/air-tickets/fliggy-air/copy-blue.png"
|
<image style="width: 10px;"
|
||||||
mode="widthFix" class="copy-icon-sm"></image>
|
src="/static/image/other/air-tickets/fliggy-air/copy-blue.png" mode="widthFix"
|
||||||
|
class="copy-icon-sm"></image>
|
||||||
<text class="action-text">复制</text>
|
<text class="action-text">复制</text>
|
||||||
<text class="sub-text">({{ airTickrtInfo.flightInfo.startCity }}-{{
|
<text class="sub-text">({{ airTickrtInfo.flightInfo.startCity }}-{{
|
||||||
airTickrtInfo.flightInfo.endCity }})</text>
|
airTickrtInfo.flightInfo.endCity }})</text>
|
||||||
|
|
@ -299,15 +302,20 @@ import { ref, onMounted, reactive, toRefs, computed } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
|
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
|
||||||
import airlineJson from '@/static/json/air-line.json';
|
import airlineJson from '@/static/json/air-line.json';
|
||||||
import { util, numberUtil } from '@/utils/common.js';
|
import { util, numberUtil, stringUtil } from '@/utils/common.js';
|
||||||
|
|
||||||
const buttonGroup = [{
|
const buttonGroup = [{
|
||||||
name: "编辑机票信息",
|
name: "编辑机票信息",
|
||||||
click: () => {
|
click: () => {
|
||||||
util.goPage(`/pages/other/air-tickets/edit/edit?ticketsApp=fliggy&storageKey=${data.STORAGE_KEY}`)
|
goEdit()
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
|
function goEdit() {
|
||||||
|
util.goPage(`/pages/other/air-tickets/edit/edit?ticketsApp=fliggy&storageKey=${data.STORAGE_KEY}`)
|
||||||
|
}
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
STORAGE_KEY: 'fliggyAirTicketsInfo',
|
STORAGE_KEY: 'fliggyAirTicketsInfo',
|
||||||
navBar: {
|
navBar: {
|
||||||
|
|
@ -988,28 +996,31 @@ const onBack = () => {
|
||||||
.ticket-row {
|
.ticket-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8rpx;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 24rpx;
|
line-height: 24rpx;
|
||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
|
|
||||||
.action-text {
|
.action-text {
|
||||||
|
flex-shrink: 0;
|
||||||
color: #6F66D9;
|
color: #6F66D9;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copy-icon-sm {
|
.copy-icon-sm {
|
||||||
width: 20rpx;
|
flex-shrink: 0;
|
||||||
height: 20rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-text {
|
.sub-text {
|
||||||
|
flex-shrink: 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ticket-no {
|
.ticket-no {
|
||||||
|
flex-shrink: 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,11 @@
|
||||||
<text class="time-big alipay-font">{{ ticketData.flightInfo.startTime }}</text>
|
<text class="time-big alipay-font">{{ ticketData.flightInfo.startTime }}</text>
|
||||||
<text class="airport-text">{{ ticketData.flightInfo.startAirport }} </text>
|
<text class="airport-text">{{ ticketData.flightInfo.startAirport }} </text>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/other/air-tickets/qunar/location.png"
|
<view style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;">
|
||||||
style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;"></image>
|
<image class="location-icon"
|
||||||
|
src="/static/image/other/air-tickets/qunar/location.png"
|
||||||
|
style="width: 8px; display: block;" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="arrow-col">
|
<view class="arrow-col">
|
||||||
|
|
@ -111,8 +114,11 @@
|
||||||
<text class="time-big alipay-font">{{ ticketData.flightInfo.endTime }}</text>
|
<text class="time-big alipay-font">{{ ticketData.flightInfo.endTime }}</text>
|
||||||
<text class="airport-text">{{ ticketData.flightInfo.endAirport }}</text>
|
<text class="airport-text">{{ ticketData.flightInfo.endAirport }}</text>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/other/air-tickets/qunar/location.png"
|
<view style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;">
|
||||||
style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;"></image>
|
<image class="location-icon"
|
||||||
|
src="/static/image/other/air-tickets/qunar/location.png"
|
||||||
|
style="width: 8px; display: block;" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -120,19 +126,19 @@
|
||||||
|
|
||||||
<view class="flight-detail-row">
|
<view class="flight-detail-row">
|
||||||
<image class="item" src="/static/image/other/air-tickets/qunar/flight-number.png"
|
<image class="item" src="/static/image/other/air-tickets/qunar/flight-number.png"
|
||||||
mode="widthFix" style="width: 24rpx; height: 24rpx;margin-right: 4rpx;"></image>
|
mode="widthFix" style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
|
||||||
<text class="detail-item item">{{ ticketData.flightInfo.aircraftType }}</text>
|
<text class="detail-item item">{{ ticketData.flightInfo.aircraftType }}</text>
|
||||||
<text class="detail-divider item">|</text>
|
<text class="detail-divider item">|</text>
|
||||||
<image class="item" src="/static/image/other/air-tickets/qunar/seat-category.png"
|
<image class="item" src="/static/image/other/air-tickets/qunar/seat-category.png"
|
||||||
mode="widthFix" style="width: 24rpx; height: 24rpx;margin-right: 4rpx;"></image>
|
mode="widthFix" style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
|
||||||
<text class="detail-item item">{{ ticketData.flightInfo.seatCategory }}</text>
|
<text class="detail-item item">{{ ticketData.flightInfo.seatCategory }}</text>
|
||||||
<text class="detail-divider item">|</text>
|
<text class="detail-divider item">|</text>
|
||||||
<image class="item" src="/static/image/other/air-tickets/qunar/on-time.png"
|
<image class="item" src="/static/image/other/air-tickets/qunar/on-time.png"
|
||||||
mode="widthFix" style="width: 24rpx; height: 24rpx;margin-right: 4rpx;"></image>
|
mode="widthFix" style="width: 12px;margin-right: 4rpx; flex-shrink: 0;"></image>
|
||||||
<text class="detail-item item">准点率{{ ticketData.flightInfo.onTimeRate }}</text>
|
<text class="detail-item item">准点率{{ ticketData.flightInfo.onTimeRate }}</text>
|
||||||
<text class="detail-divider item">|</text>
|
<text class="detail-divider item">|</text>
|
||||||
<image class="item" src="/static/image/other/air-tickets/qunar/meal.png" mode="widthFix"
|
<image class="item" src="/static/image/other/air-tickets/qunar/meal.png" mode="widthFix"
|
||||||
style="width: 24rpx; height: 24rpx;margin-right: 4rpx;"></image>
|
style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
|
||||||
<text class="detail-item item">{{ ticketData.flightInfo.meal }}</text>
|
<text class="detail-item item">{{ ticketData.flightInfo.meal }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="tips-box">
|
<view class="tips-box">
|
||||||
|
|
@ -192,7 +198,9 @@
|
||||||
<view class="row-content"
|
<view class="row-content"
|
||||||
@click="util.goPage('/pages/other/air-tickets/edit/edit')">
|
@click="util.goPage('/pages/other/air-tickets/edit/edit')">
|
||||||
<view class="p-name">{{ p.name }}</view>
|
<view class="p-name">{{ p.name }}</view>
|
||||||
<view class="p-sub">{{ p.idType }}: {{ p.idNumber }}</view>
|
<view class="p-sub">{{ p.idType }}: {{ p.idType === '身份证' ?
|
||||||
|
stringUtil.maskIdCard(p.idNumber) : (p.idType === '护照' ?
|
||||||
|
stringUtil.maskPassport(p.idNumber) : p.idNumber) }}</view>
|
||||||
<view class="p-sub">
|
<view class="p-sub">
|
||||||
<text>票号:{{ p.ticketNo }}</text>
|
<text>票号:{{ p.ticketNo }}</text>
|
||||||
<image src="/static/image/other/air-tickets/qunar/copy-black.png"
|
<image src="/static/image/other/air-tickets/qunar/copy-black.png"
|
||||||
|
|
@ -345,7 +353,7 @@ import NavBar from '@/components/nav-bar/nav-bar.vue';
|
||||||
import { ref, onMounted, reactive, toRefs, computed } from 'vue';
|
import { ref, onMounted, reactive, toRefs, computed } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
|
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
|
||||||
import { util } from '@/utils/common.js';
|
import { util, stringUtil } from '@/utils/common.js';
|
||||||
import airlineJson from '@/static/json/air-line.json';
|
import airlineJson from '@/static/json/air-line.json';
|
||||||
|
|
||||||
const buttonGroup = [{
|
const buttonGroup = [{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<image class="icon" src="/static/image/other/video-call/float.png"></image>
|
<image class="icon" src="/static/image/other/video-call/float.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<text class="time">{{ videoData.timeText }}</text>
|
<text class="time">{{ data.timing }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="data.isEdit" class="right" @click.stop>
|
<view v-if="data.isEdit" class="right" @click.stop>
|
||||||
<view class="button" @click="confirmEdit">完成</view>
|
<view class="button" @click="confirmEdit">完成</view>
|
||||||
|
|
@ -169,7 +169,7 @@ const data = reactive({
|
||||||
videoData: {
|
videoData: {
|
||||||
micOn: true,
|
micOn: true,
|
||||||
speakerOn: true,
|
speakerOn: true,
|
||||||
cameraOn: false,
|
cameraOn: true,
|
||||||
mainVideoIndex: 0,
|
mainVideoIndex: 0,
|
||||||
timeText: '125:22',
|
timeText: '125:22',
|
||||||
videoList: [
|
videoList: [
|
||||||
|
|
@ -178,9 +178,10 @@ const data = reactive({
|
||||||
{ preview: '/static/image/other/video-call/defualt/voice_chat_3.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
{ preview: '/static/image/other/video-call/defualt/voice_chat_3.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
||||||
{ preview: '/static/image/other/video-call/defualt/voice_chat_4.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
{ preview: '/static/image/other/video-call/defualt/voice_chat_4.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
||||||
{ preview: '/static/image/other/video-call/defualt/voice_chat_5.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
{ preview: '/static/image/other/video-call/defualt/voice_chat_5.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 },
|
||||||
{ preview: '/static/image/other/video-call/defualt/voice_chat_me.jpg', videoUrl: '', savedVideoUrl: '', iconType: 1 }
|
{ preview: '/static/image/other/video-call/defualt/voice_chat_me.jpg', videoUrl: '', savedVideoUrl: '', iconType: 0 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
timing: 0,
|
||||||
videoDataBackup: null, // 编辑模式备份
|
videoDataBackup: null, // 编辑模式备份
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
statusBarHeight: 0,
|
statusBarHeight: 0,
|
||||||
|
|
@ -205,6 +206,7 @@ const data = reactive({
|
||||||
|
|
||||||
// 定时器引用,用于页面卸载时清理
|
// 定时器引用,用于页面卸载时清理
|
||||||
let statusBarTimer = null
|
let statusBarTimer = null
|
||||||
|
let timingTimer = null // 计时定时器
|
||||||
|
|
||||||
let { videoData, statusBarHeight } = toRefs(data)
|
let { videoData, statusBarHeight } = toRefs(data)
|
||||||
|
|
||||||
|
|
@ -261,11 +263,13 @@ onLoad(() => {
|
||||||
console.log('videoData1', videoData)
|
console.log('videoData1', videoData)
|
||||||
const videoDataNew = {
|
const videoDataNew = {
|
||||||
...videoData,
|
...videoData,
|
||||||
|
iconType: videoData.onMic ? videoData.iconType : 1,
|
||||||
videoList: videoData.videoList.map((item) => {
|
videoList: videoData.videoList.map((item) => {
|
||||||
item.videoUrl = plus.io.convertLocalFileSystemURL(item.savedVideoUrl)
|
item.videoUrl = plus.io.convertLocalFileSystemURL(item.savedVideoUrl)
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
data.timing = videoData.timeText
|
||||||
data.videoData = videoDataNew
|
data.videoData = videoDataNew
|
||||||
console.log('videoData2', data.videoData)
|
console.log('videoData2', data.videoData)
|
||||||
|
|
||||||
|
|
@ -279,6 +283,13 @@ onLoad(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
// 恢复计时
|
||||||
|
const videoData = uni.getStorageSync('videoData')
|
||||||
|
if (videoData && videoData.timeText) {
|
||||||
|
data.timing = videoData.timeText
|
||||||
|
}
|
||||||
|
startTimer()
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
util.setAndroidSystemBarColor('#232323')
|
util.setAndroidSystemBarColor('#232323')
|
||||||
// 保存定时器引用,以便在页面卸载时清理
|
// 保存定时器引用,以便在页面卸载时清理
|
||||||
|
|
@ -306,6 +317,13 @@ onHide(() => {
|
||||||
data.dragState.isDragging = false
|
data.dragState.isDragging = false
|
||||||
data.dragState.draggingIndex = -1
|
data.dragState.draggingIndex = -1
|
||||||
|
|
||||||
|
// 保存当前计时
|
||||||
|
if (data.timing) {
|
||||||
|
data.videoData.timeText = data.timing
|
||||||
|
uni.setStorageSync('videoData', data.videoData)
|
||||||
|
}
|
||||||
|
|
||||||
|
stopTimer() // 停止计时
|
||||||
console.log('🚪 页面隐藏,已清理定时器和状态')
|
console.log('🚪 页面隐藏,已清理定时器和状态')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -317,6 +335,14 @@ onUnmounted(() => {
|
||||||
statusBarTimer = null
|
statusBarTimer = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存当前计时
|
||||||
|
if (data.timing) {
|
||||||
|
data.videoData.timeText = data.timing
|
||||||
|
uni.setStorageSync('videoData', data.videoData)
|
||||||
|
}
|
||||||
|
|
||||||
|
stopTimer() // 停止计时
|
||||||
|
|
||||||
// 清理长按定时器
|
// 清理长按定时器
|
||||||
if (data.dragState.longPressTimer) {
|
if (data.dragState.longPressTimer) {
|
||||||
clearTimeout(data.dragState.longPressTimer)
|
clearTimeout(data.dragState.longPressTimer)
|
||||||
|
|
@ -329,7 +355,7 @@ onUnmounted(() => {
|
||||||
// 打开时间编辑弹窗
|
// 打开时间编辑弹窗
|
||||||
const openTimeEditPopup = () => {
|
const openTimeEditPopup = () => {
|
||||||
// 解析当前时间 (格式: "125:22")
|
// 解析当前时间 (格式: "125:22")
|
||||||
const parts = data.videoData.timeText.split(':')
|
const parts = data.timing.split(':')
|
||||||
data.tempMinutes = parts[0] || '0'
|
data.tempMinutes = parts[0] || '0'
|
||||||
data.tempSeconds = parts[1] || '00'
|
data.tempSeconds = parts[1] || '00'
|
||||||
data.showTimeEditPopup = true
|
data.showTimeEditPopup = true
|
||||||
|
|
@ -353,6 +379,10 @@ const saveTimeEdit = () => {
|
||||||
// 保存到storage
|
// 保存到storage
|
||||||
uni.setStorageSync('videoData', data.videoData)
|
uni.setStorageSync('videoData', data.videoData)
|
||||||
|
|
||||||
|
// 更新当前计时显示并重启计时器以确保同步
|
||||||
|
data.timing = data.videoData.timeText
|
||||||
|
startTimer()
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
data.showTimeEditPopup = false
|
data.showTimeEditPopup = false
|
||||||
}
|
}
|
||||||
|
|
@ -448,11 +478,10 @@ const saveImage = async () => {
|
||||||
|
|
||||||
const changeIconType = (item, index) => {
|
const changeIconType = (item, index) => {
|
||||||
|
|
||||||
if (index == data.videoData.videoList.length - 1) {
|
if (index == data.videoData.videoList.length - 1 && !data.videoData.micOn) {
|
||||||
item.iconType = item.iconType == 2 ? 0 : item.iconType + 1
|
return
|
||||||
} else {
|
|
||||||
item.iconType = item.iconType == 2 ? 0 : 2
|
|
||||||
}
|
}
|
||||||
|
item.iconType = item.iconType == 2 ? 0 : 2
|
||||||
uni.setStorageSync('videoData', data.videoData)
|
uni.setStorageSync('videoData', data.videoData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -610,6 +639,13 @@ const chooseImage = () => {
|
||||||
// 改变信息
|
// 改变信息
|
||||||
const changeInfo = (key) => {
|
const changeInfo = (key) => {
|
||||||
data.videoData[key] = !data.videoData[key]
|
data.videoData[key] = !data.videoData[key]
|
||||||
|
if (key == 'micOn') {
|
||||||
|
if (!data.videoData[key]) {
|
||||||
|
data.videoData.videoList[data.videoData.videoList.length - 1].iconType = 1
|
||||||
|
} else {
|
||||||
|
data.videoData.videoList[data.videoData.videoList.length - 1].iconType = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
uni.setStorageSync('videoData', data.videoData)
|
uni.setStorageSync('videoData', data.videoData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -772,6 +808,36 @@ const handleTouchEnd = (event, index) => {
|
||||||
const hangup = () => {
|
const hangup = () => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开始计时
|
||||||
|
const startTimer = () => {
|
||||||
|
stopTimer()
|
||||||
|
timingTimer = setInterval(() => {
|
||||||
|
if (!data.timing) return
|
||||||
|
let timeStr = String(data.timing)
|
||||||
|
if (timeStr.indexOf(':') === -1) return
|
||||||
|
|
||||||
|
let parts = timeStr.split(':')
|
||||||
|
let minutes = parseInt(parts[0]) || 0
|
||||||
|
let seconds = parseInt(parts[1]) || 0
|
||||||
|
|
||||||
|
seconds++
|
||||||
|
if (seconds >= 60) {
|
||||||
|
seconds = 0
|
||||||
|
minutes++
|
||||||
|
}
|
||||||
|
|
||||||
|
data.timing = `${minutes}:${seconds.toString().padStart(2, '0')}`
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 停止计时
|
||||||
|
const stopTimer = () => {
|
||||||
|
if (timingTimer) {
|
||||||
|
clearInterval(timingTimer)
|
||||||
|
timingTimer = null
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
|
@ -229,6 +229,20 @@ export const stringUtil = {
|
||||||
if (length < 8) return idCard;
|
if (length < 8) return idCard;
|
||||||
|
|
||||||
return idCard.substring(0, 4) + '*'.repeat(length - 8) + idCard.substring(length - 4);
|
return idCard.substring(0, 4) + '*'.repeat(length - 8) + idCard.substring(length - 4);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 护照号脱敏
|
||||||
|
* @param {string} passport - 护照号
|
||||||
|
* @returns {string} 脱敏后的护照号
|
||||||
|
*/
|
||||||
|
maskPassport(passport) {
|
||||||
|
if (!passport) return passport;
|
||||||
|
|
||||||
|
const length = passport.length;
|
||||||
|
if (length <= 4) return passport;
|
||||||
|
|
||||||
|
return passport.substring(0, 2) + '*'.repeat(length - 4) + passport.substring(length - 2);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ export default {
|
||||||
console.log("模拟请求:", JSON.stringify(user))
|
console.log("模拟请求:", JSON.stringify(user))
|
||||||
if (user.code == 0) {
|
if (user.code == 0) {
|
||||||
uni.setStorageSync('AppUser', user.data)
|
uni.setStorageSync('AppUser', user.data)
|
||||||
|
uni.setStorageSync('userInfo', user.data)
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: '提示',
|
// title: '提示',
|
||||||
// content: JSON.stringify(user.data),
|
// content: JSON.stringify(user.data),
|
||||||
|
|
|
||||||