完成携程机票修改视频聊天逻辑
|
|
@ -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,14 +6,15 @@
|
||||||
<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,
|
||||||
|
|
@ -37,11 +38,11 @@
|
||||||
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;
|
||||||
|
|
@ -56,6 +57,7 @@
|
||||||
z-index: 99 !important;
|
z-index: 99 !important;
|
||||||
background-image: url('/static/image/watermarkBG.png');
|
background-image: url('/static/image/watermarkBG.png');
|
||||||
background-size: 125px 125px;
|
background-size: 125px 125px;
|
||||||
|
|
||||||
.watermarkBox {
|
.watermarkBox {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 255px;
|
height: 255px;
|
||||||
|
|
@ -77,5 +79,5 @@
|
||||||
height: 55px;
|
height: 55px;
|
||||||
pointer-events: none;
|
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);
|
||||||
|
|
|
||||||
|
|
@ -260,20 +260,20 @@
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import customTab from "@/components/custom-tab/custom-tab.vue"
|
import customTab from "@/components/custom-tab/custom-tab.vue"
|
||||||
import countUp from "@/components/countUp/countUp.vue"
|
import countUp from "@/components/countUp/countUp.vue"
|
||||||
import {
|
import {
|
||||||
postJson
|
postJson
|
||||||
} from "@/utils/requests.js"
|
} from "@/utils/requests.js"
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
watch,
|
watch,
|
||||||
nextTick,
|
nextTick,
|
||||||
toRefs
|
toRefs
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow,
|
onShow,
|
||||||
onReady,
|
onReady,
|
||||||
|
|
@ -281,55 +281,55 @@
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onBackPress,
|
onBackPress,
|
||||||
onUnload
|
onUnload
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
const {
|
const {
|
||||||
appContext,
|
appContext,
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
const popup = ref();
|
const popup = ref();
|
||||||
const coupon = ref();
|
const coupon = ref();
|
||||||
const couponBox = ref();
|
const couponBox = ref();
|
||||||
const myCoupon = ref();
|
const myCoupon = ref();
|
||||||
const dialogVipBenefits = [{
|
const dialogVipBenefits = [{
|
||||||
name: "模拟微信",
|
name: "模拟微信",
|
||||||
url: "/static/image/recharge/moniweixinDialog.png"
|
url: "/static/image/recharge/moniweixinDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "无广告",
|
name: "无广告",
|
||||||
url: "/static/image/recharge/wuguanggaoDialog.png"
|
url: "/static/image/recharge/wuguanggaoDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "无水印",
|
name: "无水印",
|
||||||
url: "/static/image/recharge/wushuiyinDialog.png"
|
url: "/static/image/recharge/wushuiyinDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "专属客服",
|
name: "专属客服",
|
||||||
url: "/static/image/recharge/zhuanshukefuDialog.png"
|
url: "/static/image/recharge/zhuanshukefuDialog.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// 套餐列表
|
// 套餐列表
|
||||||
const packageList = [{
|
const packageList = [{
|
||||||
name: "连续包月",
|
name: "连续包月",
|
||||||
delPrice: "89",
|
delPrice: "89",
|
||||||
price: "29",
|
price: "29",
|
||||||
lifespan: "一月"
|
lifespan: "一月"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "连续包季",
|
name: "连续包季",
|
||||||
delPrice: "189",
|
delPrice: "189",
|
||||||
price: "98",
|
price: "98",
|
||||||
lifespan: "一季"
|
lifespan: "一季"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "连续包年",
|
name: "连续包年",
|
||||||
delPrice: "365",
|
delPrice: "365",
|
||||||
price: "198",
|
price: "198",
|
||||||
lifespan: "一年"
|
lifespan: "一年"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
active_id: 0,
|
active_id: 0,
|
||||||
active_ids: 0,
|
active_ids: 0,
|
||||||
|
|
@ -433,29 +433,29 @@
|
||||||
// 添加一个标志位来防止快速连续点击导致的价格显示错误
|
// 添加一个标志位来防止快速连续点击导致的价格显示错误
|
||||||
isProcessingClick: false,
|
isProcessingClick: false,
|
||||||
banner: '/static/image/recharge/banner1.png',
|
banner: '/static/image/recharge/banner1.png',
|
||||||
})
|
})
|
||||||
|
|
||||||
let {
|
let {
|
||||||
buttonText,
|
buttonText,
|
||||||
selected,
|
selected,
|
||||||
benefitList,
|
benefitList,
|
||||||
noticeList,
|
noticeList,
|
||||||
commentList,
|
commentList,
|
||||||
paymentMethod
|
paymentMethod
|
||||||
} = toRefs(data)
|
} = toRefs(data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回监听
|
* 返回监听
|
||||||
*/
|
*/
|
||||||
onBackPress((e) => {
|
onBackPress((e) => {
|
||||||
if (e.from == 'backbutton' && data.appUser.vip == 1) {
|
if (e.from == 'backbutton' && data.appUser.vip == 1) {
|
||||||
open()
|
open()
|
||||||
return true; //阻止返回
|
return true; //阻止返回
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
onLoad(async () => {
|
onLoad(async () => {
|
||||||
const config = uni.getStorageSync('config').config
|
const config = uni.getStorageSync('config').config
|
||||||
const themeConfig = config?.['client.uniapp.theme']
|
const themeConfig = config?.['client.uniapp.theme']
|
||||||
if (themeConfig?.enable) {
|
if (themeConfig?.enable) {
|
||||||
|
|
@ -595,15 +595,15 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
|
|
||||||
})
|
})
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
// uni.offNativeEventReceive()
|
// uni.offNativeEventReceive()
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
try {
|
try {
|
||||||
if (plus.os.name === 'Android') {
|
if (plus.os.name === 'Android') {
|
||||||
let color = plus.android.newObject("android.graphics.Color");
|
let color = plus.android.newObject("android.graphics.Color");
|
||||||
|
|
@ -618,7 +618,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log("状态栏设置完毕!");
|
console.log("状态栏设置完毕!");
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
animation: { // 动画效果
|
animation: { // 动画效果
|
||||||
|
|
@ -627,18 +627,18 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 200);
|
}, 200);
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
plus.navigator.setStatusBarStyle("light");
|
plus.navigator.setStatusBarStyle("light");
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//TODO handle the exception
|
//TODO handle the exception
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function isToday(inputTime) {
|
function isToday(inputTime) {
|
||||||
// 获取当前日期的时间戳(去掉时分秒)
|
// 获取当前日期的时间戳(去掉时分秒)
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setHours(0, 0, 0, 0);
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
@ -651,9 +651,9 @@
|
||||||
|
|
||||||
// 比较时间戳
|
// 比较时间戳
|
||||||
return inputTimestamp === todayTimestamp;
|
return inputTimestamp === todayTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateTimeRemaining(targetTime) {
|
function calculateTimeRemaining(targetTime) {
|
||||||
// 获取目标时间和当前时间的时间戳
|
// 获取目标时间和当前时间的时间戳
|
||||||
const target = new Date(targetTime).getTime();
|
const target = new Date(targetTime).getTime();
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
|
|
@ -688,9 +688,9 @@
|
||||||
minutes: minutes,
|
minutes: minutes,
|
||||||
seconds: seconds
|
seconds: seconds
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function activeClick(status) {
|
function activeClick(status) {
|
||||||
myCoupon.value.close()
|
myCoupon.value.close()
|
||||||
if (status && data.active_ids > 0) {
|
if (status && data.active_ids > 0) {
|
||||||
let item = data.activeitems
|
let item = data.activeitems
|
||||||
|
|
@ -707,14 +707,14 @@
|
||||||
setPrice(true)
|
setPrice(true)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setActiveId(item) {
|
function setActiveId(item) {
|
||||||
data.active_ids = item.id
|
data.active_ids = item.id
|
||||||
data.activeitems = item
|
data.activeitems = item
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPrice(status) {
|
function setPrice(status) {
|
||||||
console.log("setPrice")
|
console.log("setPrice")
|
||||||
if (data.incrementTimer) {
|
if (data.incrementTimer) {
|
||||||
clearInterval(data.incrementTimer);
|
clearInterval(data.incrementTimer);
|
||||||
|
|
@ -796,9 +796,9 @@
|
||||||
console.log("最后", data.price)
|
console.log("最后", data.price)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 获取我的优惠券 */
|
/* 获取我的优惠券 */
|
||||||
async function getActivity() {
|
async function getActivity() {
|
||||||
let activity = await proxy.$requestPromise({
|
let activity = await proxy.$requestPromise({
|
||||||
url: 'api/activity/coupon',
|
url: 'api/activity/coupon',
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
@ -830,9 +830,9 @@
|
||||||
]
|
]
|
||||||
data.myActivity = deduplicateKeepLast(data.myActivity)
|
data.myActivity = deduplicateKeepLast(data.myActivity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deduplicateKeepLast(arr, idKey = 'id') {
|
function deduplicateKeepLast(arr, idKey = 'id') {
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
|
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
|
|
@ -841,10 +841,10 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
return Array.from(map.values());
|
return Array.from(map.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 领取优惠券 */
|
/* 领取优惠券 */
|
||||||
async function submitActivity() {
|
async function submitActivity() {
|
||||||
console.log("activity_id");
|
console.log("activity_id");
|
||||||
let activity_id = ''
|
let activity_id = ''
|
||||||
data.activity.forEach(item => {
|
data.activity.forEach(item => {
|
||||||
|
|
@ -879,24 +879,24 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
* @param {Object} index
|
* @param {Object} index
|
||||||
* 选择购买套餐
|
* 选择购买套餐
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
防抖
|
防抖
|
||||||
*/
|
*/
|
||||||
const debouncedOnSelect = debounce((items, index) => {
|
const debouncedOnSelect = debounce((items, index) => {
|
||||||
onSelect(items, index);
|
onSelect(items, index);
|
||||||
}, 200, false);
|
}, 200, false);
|
||||||
|
|
||||||
function debounce(func, wait, immediate = true) {
|
function debounce(func, wait, immediate = true) {
|
||||||
let timeout;
|
let timeout;
|
||||||
return function(...args) {
|
return function (...args) {
|
||||||
const later = () => {
|
const later = () => {
|
||||||
timeout = null;
|
timeout = null;
|
||||||
if (!immediate) func(...args);
|
if (!immediate) func(...args);
|
||||||
|
|
@ -908,8 +908,8 @@
|
||||||
|
|
||||||
if (callNow) func(...args);
|
if (callNow) func(...args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
async function onSelect(items, index) {
|
async function onSelect(items, index) {
|
||||||
data.active_id = 0
|
data.active_id = 0
|
||||||
data.activeCoupon = {}
|
data.activeCoupon = {}
|
||||||
data.active_ids = 0
|
data.active_ids = 0
|
||||||
|
|
@ -1016,22 +1016,22 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
paymentMethod.value = data.payList[0].type
|
paymentMethod.value = data.payList[0].type
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
data.countdown = true
|
data.countdown = true
|
||||||
}, 100);
|
}, 100);
|
||||||
await setPrice(true)
|
await setPrice(true)
|
||||||
await getActivity()
|
await getActivity()
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param {Object} value
|
* @param {Object} value
|
||||||
* 选择支付方式
|
* 选择支付方式
|
||||||
*/
|
*/
|
||||||
function onSelectPayment(value) {
|
function onSelectPayment(value) {
|
||||||
paymentMethod.value = value
|
paymentMethod.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
|
|
||||||
uni.setStorageSync('back_number', data.back_number + 1);
|
uni.setStorageSync('back_number', data.back_number + 1);
|
||||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||||
|
|
@ -1061,12 +1061,12 @@
|
||||||
coupon.value.open()
|
coupon.value.open()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成通知列表
|
* 随机生成通知列表
|
||||||
*/
|
*/
|
||||||
function generateNoticeList() {
|
function generateNoticeList() {
|
||||||
noticeList.value = []
|
noticeList.value = []
|
||||||
for (let i = 0; i <= 10; i++) {
|
for (let i = 0; i <= 10; i++) {
|
||||||
noticeList.value.push({
|
noticeList.value.push({
|
||||||
|
|
@ -1075,11 +1075,11 @@
|
||||||
package: getRandomItem()
|
package: getRandomItem()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 下单拉取支付
|
* 下单拉取支付
|
||||||
*/
|
*/
|
||||||
async function activateVip(type = '') {
|
async function activateVip(type = '') {
|
||||||
if (type == 'back') {
|
if (type == 'back') {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "click",
|
type: "click",
|
||||||
|
|
@ -1154,13 +1154,13 @@
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: paymentMethod.value,
|
provider: paymentMethod.value,
|
||||||
orderInfo: payData, //支付宝订单数据
|
orderInfo: payData, //支付宝订单数据
|
||||||
success: function(resss) {
|
success: function (resss) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 30000);
|
}, 30000);
|
||||||
paymentResult(paymentRes.data.orderId, paymentMethod.value)
|
paymentResult(paymentRes.data.orderId, paymentMethod.value)
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function (err) {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "event",
|
type: "event",
|
||||||
key: "pay_fail",
|
key: "pay_fail",
|
||||||
|
|
@ -1201,11 +1201,11 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 支付状态轮询函数
|
// 支付状态轮询函数
|
||||||
async function paymentResult(orderId, paytype) {
|
async function paymentResult(orderId, paytype) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '会员发放排队中,正在实时向服务器索要,请耐心等待。',
|
title: '会员发放排队中,正在实时向服务器索要,请耐心等待。',
|
||||||
|
|
@ -1311,19 +1311,19 @@
|
||||||
|
|
||||||
// 开始轮询
|
// 开始轮询
|
||||||
poll();
|
poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 随机抽取一个元素
|
// 随机抽取一个元素
|
||||||
function getRandomItem() {
|
function getRandomItem() {
|
||||||
const list = ['月度会员', '季度会员', '年度会员'];
|
const list = ['月度会员', '季度会员', '年度会员'];
|
||||||
const randomIndex = Math.floor(Math.random() * list.length);
|
const randomIndex = Math.floor(Math.random() * list.length);
|
||||||
return list[randomIndex];
|
return list[randomIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成时间提示语
|
* 随机生成时间提示语
|
||||||
*/
|
*/
|
||||||
function generateNaturalTimeAgo() {
|
function generateNaturalTimeAgo() {
|
||||||
const weights = [{
|
const weights = [{
|
||||||
range: [1, 30],
|
range: [1, 30],
|
||||||
weight: 30,
|
weight: 30,
|
||||||
|
|
@ -1390,12 +1390,12 @@
|
||||||
const amount = Math.floor(Math.random() * (max - min + 1)) + min;
|
const amount = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||||
|
|
||||||
return `${amount}${selected.unit}前`;
|
return `${amount}${selected.unit}前`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成电话号码
|
* 随机生成电话号码
|
||||||
*/
|
*/
|
||||||
function generateMaskedPhoneNumber() {
|
function generateMaskedPhoneNumber() {
|
||||||
// 常见手机号段
|
// 常见手机号段
|
||||||
const prefixes = [
|
const prefixes = [
|
||||||
'130', '131', '132', '133', '134', '135', '136', '137', '138', '139',
|
'130', '131', '132', '133', '134', '135', '136', '137', '138', '139',
|
||||||
|
|
@ -1418,13 +1418,13 @@
|
||||||
|
|
||||||
// 对中间4位进行掩码处理:前3位 + **** + 后4位
|
// 对中间4位进行掩码处理:前3位 + **** + 后4位
|
||||||
return fullNumber.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3');
|
return fullNumber.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回
|
* 返回
|
||||||
*/
|
*/
|
||||||
function back() {
|
function back() {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "click",
|
type: "click",
|
||||||
key: "recharge_dialog_cancel",
|
key: "recharge_dialog_cancel",
|
||||||
|
|
@ -1440,14 +1440,14 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Complete() {
|
function Complete() {
|
||||||
data.coupon = false
|
data.coupon = false
|
||||||
console.log("播放完成");
|
console.log("播放完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldBeTrue(obj) {
|
function shouldBeTrue(obj) {
|
||||||
// 情况1: 没有 features 字段 → 返回 true
|
// 情况1: 没有 features 字段 → 返回 true
|
||||||
if (!('features' in obj)) {
|
if (!('features' in obj)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1465,15 +1465,15 @@
|
||||||
|
|
||||||
// 情况4: 有 features 字段且不包含 alipay → 返回 false
|
// 情况4: 有 features 字段且不包含 alipay → 返回 false
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
* {
|
* {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.couponBox {
|
.couponBox {
|
||||||
width: 375px;
|
width: 375px;
|
||||||
height: 450px;
|
height: 450px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -1584,18 +1584,18 @@
|
||||||
top: -145px;
|
top: -145px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.couponButton {
|
.couponButton {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 37px;
|
margin-top: 37px;
|
||||||
width: 305px;
|
width: 305px;
|
||||||
height: 86px;
|
height: 86px;
|
||||||
margin-left: calc(50% - 152.5px);
|
margin-left: calc(50% - 152.5px);
|
||||||
z-index: 4 !important;
|
z-index: 4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container {
|
.page-container {
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
padding-bottom: 240rpx;
|
padding-bottom: 240rpx;
|
||||||
padding-bottom: calc(240rpx + constant(safe-area-inset-bottom)) !important;
|
padding-bottom: calc(240rpx + constant(safe-area-inset-bottom)) !important;
|
||||||
|
|
@ -1758,9 +1758,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes vertical-scroll {
|
@keyframes vertical-scroll {
|
||||||
from {
|
from {
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
}
|
}
|
||||||
|
|
@ -1768,9 +1768,9 @@
|
||||||
to {
|
to {
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-container {
|
.footer-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
@ -1870,13 +1870,13 @@
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 100%;
|
height: 104rpx;
|
||||||
width: 32%;
|
width: 32%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-container {
|
.dialog-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
|
|
@ -2001,16 +2001,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 100rpx;
|
top: 100rpx;
|
||||||
left: 36rpx;
|
left: 36rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-margin-wrap::after {
|
.uni-margin-wrap::after {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// content: '';
|
// content: '';
|
||||||
// left: 0;
|
// left: 0;
|
||||||
|
|
@ -2019,9 +2019,9 @@
|
||||||
// height: 18px;
|
// height: 18px;
|
||||||
// background-color: #f7f7f7;
|
// background-color: #f7f7f7;
|
||||||
// border-radius: 16px 16px 0px 0px;
|
// border-radius: 16px 16px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-margin-wrap {
|
.uni-margin-wrap {
|
||||||
// position: relative;
|
// position: relative;
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -2075,11 +2075,11 @@
|
||||||
padding: 0 100rpx;
|
padding: 0 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.placeholder {
|
.placeholder {
|
||||||
// display: none;
|
// display: none;
|
||||||
// position: relative;
|
// position: relative;
|
||||||
// background-color: #f7f7f7;
|
// background-color: #f7f7f7;
|
||||||
|
|
@ -2087,20 +2087,20 @@
|
||||||
// border-radius: 1rem 1rem 0 0;
|
// border-radius: 1rem 1rem 0 0;
|
||||||
// left: 0;
|
// left: 0;
|
||||||
// bottom: 30rpx;
|
// bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 由小到大缩放动画 */
|
/* 由小到大缩放动画 */
|
||||||
.animated-box {
|
.animated-box {
|
||||||
animation: scaleIn 1s ease-out forwards;
|
animation: scaleIn 1s ease-out forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 延迟动画 */
|
/* 延迟动画 */
|
||||||
.scale-in-delay {
|
.scale-in-delay {
|
||||||
animation: scaleIn 0.5s ease-out 0.2s forwards;
|
animation: scaleIn 0.5s ease-out 0.2s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 动画关键帧定义 */
|
/* 动画关键帧定义 */
|
||||||
@keyframes scaleIn {
|
@keyframes scaleIn {
|
||||||
0% {
|
0% {
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
@ -2114,17 +2114,17 @@
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.iosQuestion {
|
.iosQuestion {
|
||||||
.titleBox {
|
.titleBox {
|
||||||
.image {
|
.image {
|
||||||
margin-top: 3px !important;
|
margin-top: 3px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.question {
|
.question {
|
||||||
margin: 24rpx 32rpx;
|
margin: 24rpx 32rpx;
|
||||||
padding: 17px 13px;
|
padding: 17px 13px;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
|
|
@ -2161,9 +2161,9 @@
|
||||||
color: #AAAAAA;
|
color: #AAAAAA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.myCouponList {
|
.myCouponList {
|
||||||
|
|
||||||
margin: 24rpx 32rpx;
|
margin: 24rpx 32rpx;
|
||||||
padding: 17px 13px;
|
padding: 17px 13px;
|
||||||
|
|
@ -2231,9 +2231,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.myCouponContainer {
|
.myCouponContainer {
|
||||||
width: calc(100% - 52px);
|
width: calc(100% - 52px);
|
||||||
height: 400px;
|
height: 400px;
|
||||||
background-image: url('/static/image/recharge/myCouponContainerBg.png');
|
background-image: url('/static/image/recharge/myCouponContainerBg.png');
|
||||||
|
|
@ -2371,16 +2371,16 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.white-flow {
|
.white-flow {
|
||||||
background: linear-gradient(-45deg, transparent, transparent, transparent, transparent, transparent, transparent, transparent, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2), transparent, transparent, transparent, transparent, transparent, transparent, transparent);
|
background: linear-gradient(-45deg, transparent, transparent, transparent, transparent, transparent, transparent, transparent, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2), transparent, transparent, transparent, transparent, transparent, transparent, transparent);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 60% 100%;
|
background-size: 60% 100%;
|
||||||
animation: flow 2s infinite linear;
|
animation: flow 2s infinite linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flow {
|
@keyframes flow {
|
||||||
0% {
|
0% {
|
||||||
background-position: -100% 0;
|
background-position: -100% 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2388,25 +2388,25 @@
|
||||||
100% {
|
100% {
|
||||||
background-position: 200% 0;
|
background-position: 200% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-countdown-day {
|
::v-deep .uni-countdown-day {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
color: #2A2617 !important;
|
color: #2A2617 !important;
|
||||||
/* 例如,将文字颜色改为红色 */
|
/* 例如,将文字颜色改为红色 */
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
padding-right: 0 !important;
|
padding-right: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-countdown-splitor-day {
|
::v-deep .uni-countdown-splitor-day {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yanhua {
|
.yanhua {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 170px;
|
top: 170px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -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 }}
|
||||||
|
{{ airTicketsInfo.flightInfo.flightNumber }}
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
<view class="codefun-shrink-0 section_8"></view>
|
||||||
<text class="font_11">{{ airTicketsInfo.flightInfo.seatCategory }}</text>
|
</view>
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
<view class="font_11 codefun-flex-row codefun-items-center">{{
|
||||||
<text class="font_11">{{ airTicketsInfo.flightInfo.aircraftType }}</text>
|
airTicketsInfo.flightInfo.seatCategory }}<view
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
class="codefun-shrink-0 section_8">
|
||||||
<text class="font_11" style="color: #EC6103;">{{
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="font_11 codefun-flex-row codefun-items-center">{{
|
||||||
|
airTicketsInfo.flightInfo.aircraftType }}<view
|
||||||
|
class="codefun-shrink-0 section_8">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="font_11 codefun-flex-row codefun-items-center"
|
||||||
|
style="color: #EC6103;">{{
|
||||||
airTicketsInfo.flightInfo.meal
|
airTicketsInfo.flightInfo.meal
|
||||||
}}</text>
|
}}<view class="codefun-shrink-0 section_8"></view>
|
||||||
<view class="codefun-shrink-0 section_8"></view>
|
</view>
|
||||||
<text class="font_11" style="color: #EC6103;">{{
|
<view class="font_11 codefun-flex-row codefun-items-center"
|
||||||
|
style="color: #EC6103;">{{
|
||||||
airTicketsInfo.flightInfo.luggageCheckInQuota
|
airTicketsInfo.flightInfo.luggageCheckInQuota
|
||||||
}}</text>
|
}}</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,7 +283,8 @@
|
||||||
<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 {{
|
||||||
|
airTicketsInfo.ticketNumber.replace(/(\d{3})\d{4}(\d{4})/,
|
||||||
'$1****$2')
|
'$1****$2')
|
||||||
}}</text>
|
}}</text>
|
||||||
</view>
|
</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),
|
||||||
|
|
|
||||||