Compare commits
2 Commits
738f058281
...
bd3a2e9cce
| Author | SHA1 | Date |
|---|---|---|
|
|
bd3a2e9cce | |
|
|
d9459b1bd0 |
|
|
@ -9,6 +9,10 @@
|
|||
"customPlaygroundType" : "local",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-harmony"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
62
App.vue
|
|
@ -142,28 +142,45 @@
|
|||
*/
|
||||
initFromExtraData(extraData) {
|
||||
// 批量设置 Storage,减少 I/O 次数
|
||||
const storageData = {
|
||||
host: extraData.host,
|
||||
header: {
|
||||
"x-token": extraData['x-token'],
|
||||
"x-version": extraData['x-version'],
|
||||
"x-platform": extraData['x-platform'],
|
||||
"x-device-id": extraData['x-device-id'],
|
||||
"x-mobile-brand": extraData['x-mobile-brand'],
|
||||
"x-mobile-model": extraData['x-mobile-model'],
|
||||
"x-channel": extraData['x-channel'],
|
||||
"x-package": extraData['x-package'],
|
||||
"x-click-id": extraData['x-click-id'],
|
||||
// #ifdef APP-PLUS
|
||||
"header": {
|
||||
"version": this.$version,
|
||||
let storageData={}
|
||||
if(uni.getStorageSync('isTest')){
|
||||
storageData = {
|
||||
host: extraData.host,
|
||||
header: {
|
||||
"x-token": extraData['x-token'],
|
||||
"x-version": extraData['x-version'],
|
||||
"x-platform": extraData['x-platform'],
|
||||
"x-device-id": extraData['x-device-id'],
|
||||
"x-mobile-brand": extraData['x-mobile-brand'],
|
||||
"x-mobile-model": extraData['x-mobile-model'],
|
||||
"x-channel": extraData['x-channel'],
|
||||
"x-package": extraData['x-package'],
|
||||
"x-click-id": extraData['x-click-id'],
|
||||
// #ifdef APP-PLUS
|
||||
"header": {
|
||||
"version": this.$version,
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
encrypt: extraData['encrypt'],
|
||||
decrypt: extraData['decrypt']
|
||||
}
|
||||
}else{
|
||||
if (extraData['safeBottom']) {
|
||||
this.$store.state["safeBottomAz"]=Number(extraData['safeBottom'])||0
|
||||
}
|
||||
storageData = {
|
||||
host: extraData.host,
|
||||
header: {
|
||||
// #ifdef APP-PLUS
|
||||
"header": {
|
||||
"version": this.$version,
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
encrypt: extraData['encrypt'],
|
||||
decrypt: extraData['decrypt']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 批量写入
|
||||
Object.keys(storageData).forEach(key => {
|
||||
uni.setStorageSync(key, storageData[key])
|
||||
|
|
@ -171,6 +188,9 @@
|
|||
if (extraData['isCombo']) {
|
||||
uni.setStorageSync('isCombo', extraData['isCombo'])
|
||||
}
|
||||
if (extraData['paytype']) {
|
||||
uni.setStorageSync('isCombo', extraData['paytype'] == 'combo' ? 'ok' : '')
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -183,7 +203,7 @@
|
|||
const devConfig = {
|
||||
host: "https://flaunt.batiao8.com/",
|
||||
header: {
|
||||
"x-token": "ebe42caa-845a-4cb2-a324-18abe8ced7c0"
|
||||
"x-token": "55e2481e-cbd2-4d2d-82d3-b47e191fcfc0"
|
||||
},
|
||||
decrypt: "e4rOtnF8tJjtHO7ecZeJHN1rapED5ImB",
|
||||
encrypt: "xn08hYoizXhZ1zHP8DVqfCm2yHxPmhil"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<view class="footer" :class="['footer_'+type]" :style="data.style">
|
||||
<view class="item" v-for="(item,index) in list" :key="index">
|
||||
<view class="footer" :class="['footer_'+type]" :style="data.style" >
|
||||
<view class="item" v-for="(item,index) in list" :key="index" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<image :src="`/static/image/call/${type}TabbarImg${index+1}.png`" mode=""></image>
|
||||
<text>{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer footerZhangwei" :class="['footer_'+type]">
|
||||
<view class="footer footerZhangwei" :class="['footer_'+type]" :style="{'margin-top':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
<view class="bottom-box fixed-bottom-box" :class="{ 'safe-area': $system == 'iOS' && data.keyboardHeight == 0 }"
|
||||
:style="{ bottom: data.keyboardHeight + 'px' }">
|
||||
:style="{ bottom: data.keyboardHeight + 'px' ,'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<slot name="bottom">
|
||||
<view class="bottom-container flex-align-center" v-show="!sortMode">
|
||||
<image v-if="phone != 'huawei' && phone != 'vivo'" class="add-img shrink-0"
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="bottom-placeholder" :style="{ height: (data.bottomBoxHeight) + 'px' }">
|
||||
<view class="bottom-placeholder" :style="{ height: (data.bottomBoxHeight+$store.state.safeBottomAz) + 'px' }">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<view class="safeBottomBox">
|
||||
<view class="safeBottomFiexd" :style="{ height: safeBottomAz + 'px', backgroundColor: bgColor }">
|
||||
</view>
|
||||
<view class="safeBottomZhangwei" :style="{ height: safeBottomAz + 'px' }">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, getCurrentInstance } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#EDEDED'
|
||||
}
|
||||
})
|
||||
|
||||
const instance = getCurrentInstance()
|
||||
const safeBottomAz = computed(() => {
|
||||
const store = instance?.appContext?.config?.globalProperties?.$store
|
||||
const height = store?.state?.safeBottomAz
|
||||
return Number(height) || 0
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.safeBottomBox {
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
overflow: hidden;
|
||||
.safeBottomFiexd {
|
||||
width: 100vw;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
65
main.js
|
|
@ -24,13 +24,70 @@ export function createApp() {
|
|||
if (!systemInfo.platform) {
|
||||
systemInfo = uni.getSystemInfoSync() || {}
|
||||
}
|
||||
const windowInfo = uni.getWindowInfo();
|
||||
app.config.globalProperties.$store = {
|
||||
state: {
|
||||
safeBottom: windowInfo.safeAreaInsets?.bottom || 0,
|
||||
safeBottomAz: 0
|
||||
}
|
||||
}
|
||||
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
app.config.globalProperties.$system = plus.os.name;
|
||||
// #endif
|
||||
app.config.globalProperties.$systemInfo = systemInfo
|
||||
uni.setStorageSync('version', '1.0.6.sp22')
|
||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||
app.config.globalProperties.$systemInfo = systemInfo;
|
||||
uni.setStorageSync('version', '1.0.7.sp5');
|
||||
app.config.globalProperties.$version = uni.getStorageSync('version');
|
||||
// 环境:development→测试,production→正式(跟构建环境走,无需手改)
|
||||
const isTest = process.env.NODE_ENV === 'development';
|
||||
app.config.globalProperties.$isTest = isTest;
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const version = plus.runtime.version;
|
||||
// #endif
|
||||
|
||||
const compareVersion = (v1, v2) => {
|
||||
const a = String(v1).split('.')
|
||||
const b = String(v2).split('.')
|
||||
const len = Math.max(a.length, b.length)
|
||||
for (let i = 0; i < len; i++) {
|
||||
const n1 = parseInt(a[i] || '0', 10)
|
||||
const n2 = parseInt(b[i] || '0', 10)
|
||||
if (n1 > n2) return 1
|
||||
if (n1 < n2) return -1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//安卓和ios
|
||||
// #ifdef APP-PLUS && !APP-HARMONY
|
||||
if (plus.os.name == 'iOS') {
|
||||
if (compareVersion(version, '1.9') >= 0 && !isTest) {
|
||||
uni.setStorageSync('isTest', false)
|
||||
} else {
|
||||
uni.setStorageSync('isTest', true)
|
||||
}
|
||||
} else {
|
||||
if (compareVersion(version, '2.2.0') >= 0 && !isTest) {
|
||||
uni.setStorageSync('isTest', false)
|
||||
} else {
|
||||
uni.setStorageSync('isTest', true)
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
//鸿蒙
|
||||
// #ifdef APP-PLUS && APP-HARMONY
|
||||
if (compareVersion(version, '2.1.7') >= 0&&!isTest) {
|
||||
uni.setStorageSync('isTest', false)
|
||||
} else {
|
||||
uni.setStorageSync('isTest', true)
|
||||
}
|
||||
// #endif
|
||||
//h5环境
|
||||
// #ifndef APP-PLUS
|
||||
uni.setStorageSync('isTest', true)
|
||||
// #endif
|
||||
|
||||
|
||||
app.use(globalMethods);
|
||||
return {
|
||||
app
|
||||
|
|
|
|||
|
|
@ -11,7 +11,19 @@
|
|||
"splashScreens" : {
|
||||
"startWindowIcon" : "resource/icon.png", // 启动页图标路径
|
||||
"startWindowBackground" : "#123456" // 启动页背景颜色
|
||||
}
|
||||
},
|
||||
"bundleName" : "cn.zuom8.jsloction",
|
||||
"signingConfigs" : {
|
||||
"default" : {
|
||||
"certpath" : "C:\\Users\\Administrator\\Desktop\\jisuloca\\test\\debug.cer",
|
||||
"keyAlias" : "__uni__1be0b2f",
|
||||
"keyPassword" : "000000189B31358AF1B1A6FD1CB2D1011E32DF02389A1F92604ECEB091A66654CDCDF6DB4DD18BC3",
|
||||
"profile" : "C:\\Users\\Administrator\\Desktop\\jisuloca\\test\\jsloction_debugDebug.p7b",
|
||||
"signAlg" : "SHA256withECDSA",
|
||||
"storeFile" : "C:\\Users\\Administrator\\Desktop\\jisuloca\\hmos.p12",
|
||||
"storePassword" : "000000185660236954705CE2E46C7A2FA76565A93989A8DDD5810CC2760ED8D2B479EDD9C488B982"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"app-plus" : {
|
||||
|
|
@ -25,6 +37,12 @@
|
|||
"autoclose" : false,
|
||||
"delay" : 0
|
||||
},
|
||||
|
||||
"compatible" : {
|
||||
"runtimeVersion": "4.75",
|
||||
"compilerVersion": "5.14",
|
||||
"ignoreVersion" : true
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"name": "video-player 视频播放器 html5视频播放器-解决频层级、覆盖",
|
||||
"version": "2.0.0",
|
||||
"dependencies": {
|
||||
"@batiao/batiao-sdk-uniapp-unimp": "1.0.374",
|
||||
"crypto-js": "^4.2.0",
|
||||
"lottie-web": "^5.13.0",
|
||||
"uuid": "^13.0.0"
|
||||
|
|
@ -19,6 +20,12 @@
|
|||
"lint-staged": "^16.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@batiao/batiao-sdk-uniapp-unimp": {
|
||||
"version": "1.0.374",
|
||||
"resolved": "http://maven.batiao8.com/repository/mpnpm-releases/@batiao/batiao-sdk-uniapp-unimp/-/batiao-sdk-uniapp-unimp-1.0.374.tgz",
|
||||
"integrity": "sha512-jEQBgTwaZewB2ZzJHYQjWsA4UhZnd7xnSIzUdoYTLKJ3B+gXHmGWSNhJ5MzaXKH3Uxbot2mmWT+TSw8WSZN2Sg==",
|
||||
"license": "UNLICENSED"
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@batiao/batiao-sdk-uniapp-unimp": "1.0.374",
|
||||
"crypto-js": "^4.2.0",
|
||||
"lottie-web": "^5.13.0",
|
||||
"uuid": "^13.0.0"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" source="uni_alipay_huabei" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_huabei')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="page-container">
|
||||
|
|
@ -118,6 +118,7 @@
|
|||
</view>
|
||||
<canvas canvas-id="crop-canvas"
|
||||
style="position: fixed; left: -9999px; width: 750rpx; height: 100vh; pointer-events: none;"></canvas>
|
||||
<ZdySafeBottom bgColor="#fff"/>
|
||||
<!-- 编辑弹窗 -->
|
||||
<uni-popup ref="popup" type="center" :mask-click="false">
|
||||
<view class="popup-content">
|
||||
|
|
@ -190,6 +191,7 @@
|
|||
|
||||
<script setup>
|
||||
import NavBar from '@/components/nav-bar/nav-bar'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
numberUtil,
|
||||
util
|
||||
|
|
@ -340,7 +342,7 @@ onLoad((option) => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
@ -463,7 +465,9 @@ const confirmImage = () => {
|
|||
data.huabeiInfo.image = saveRes.savedFilePath
|
||||
selectedImage.value = '' // 隐藏编辑模式
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}, 200)
|
||||
// 保存到缓存
|
||||
uni.setStorageSync(data.huabeiInfoStorageKey, data.huabeiInfo)
|
||||
|
|
@ -524,7 +528,9 @@ const chooseImage = () => {
|
|||
selectedImage.value = res.tempFilePaths[0]
|
||||
data.showMask = true
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
// #endif
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
|
|
@ -561,7 +567,9 @@ const handleTouchEnd = () => {
|
|||
const closeImage = () => {
|
||||
selectedImage.value = ''
|
||||
data.showMask = false
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
|
||||
<view class="page-container">
|
||||
<view class="main-container">
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" source="uni_alipay_huabei" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_huabei')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -407,18 +407,22 @@ onPageScroll((e) => {
|
|||
data.navBar.bgColor = '#F6F6F6'
|
||||
data.navBar.textColor = '#1a1a1a'
|
||||
data.isTop = false
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
// #endif
|
||||
} else {
|
||||
// 回到顶部时恢复原色
|
||||
data.navBar.bgColor = '#717E91'
|
||||
data.navBar.textColor = '#fff'
|
||||
data.isTop = true
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F6F6F6')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<template>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" source="uni_alipay_balance" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_balance')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container" :style="{ height: data.windowHeight + 'px' }">
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<scroll-view class="menu-scroll-view" scroll-x="true" @scroll="onMenuScroll"
|
||||
:show-scrollbar="false">
|
||||
<view class="menu-content">
|
||||
<view class="item menu-icon-box" v-for="item in menuList">
|
||||
<view class="item menu-icon-box" v-for="(item, index) in menuList" :key="index" >
|
||||
<image class="menu-icon" :src="`/static/image/balance/menu-icon/${item.label}.png`"
|
||||
mode="">
|
||||
</image>
|
||||
|
|
@ -89,6 +89,8 @@
|
|||
<view class="blue-text">我的客服</view>
|
||||
<view class="footer-text">余额升级服务由支付宝和网商银行提供</view>
|
||||
</view>
|
||||
|
||||
<safeBottom bgColor="#F0F3F8"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
|
@ -113,6 +115,8 @@
|
|||
<script setup>
|
||||
//import NavBar from '@/components/nav-bar/nav-bar'
|
||||
import BalanceList from '@/components/balance-list/balance-list.vue'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
import { fastEntranceList } from '@/static/json/initial.json'
|
||||
import {
|
||||
util,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_pay-successful" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_pay-successful')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -218,9 +218,10 @@
|
|||
|
||||
|
||||
<!-- 底部操作区 -->
|
||||
<view class="footer-section">
|
||||
<view class="footer-section" :style="{'padding-bottom':($store.state.safeBottomAz+24)+'px'}">
|
||||
<view class="finish-btn" @click="goBack">完成</view>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f5f5f5"/>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
|
@ -242,6 +243,8 @@ import {
|
|||
import {
|
||||
defaultData
|
||||
} from './data.json';
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const {
|
||||
appContext,
|
||||
proxy
|
||||
|
|
@ -307,7 +310,7 @@ onMounted(() => {
|
|||
|
||||
onShow(() => {
|
||||
loadStorageData();
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F5F5F5')
|
||||
uni.setNavigationBarColor({
|
||||
animation: { // 动画效果
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_transfer" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_transfer')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -149,9 +149,10 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 底部操作区 -->
|
||||
<view class="footer-section">
|
||||
<view class="footer-section" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="finish-btn" @click="goBack">完成</view>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f5f5f5"/>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<uni-popup ref="editPopup" type="center">
|
||||
|
|
@ -251,6 +252,7 @@ import {
|
|||
util,
|
||||
numberUtil
|
||||
} from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const {
|
||||
appContext,
|
||||
proxy
|
||||
|
|
@ -487,7 +489,7 @@ onMounted(() => {
|
|||
});
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F5F5F5')
|
||||
uni.setNavigationBarColor({
|
||||
animation: { // 动画效果
|
||||
|
|
|
|||
|
|
@ -609,7 +609,7 @@ let {
|
|||
} = toRefs(data)
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F5F5F5')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<template>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" source="uni_alipay_bill_details" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_bill_details')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view style="overflow: hidden;overflow-y: scroll; height: 100vh;">
|
||||
|
|
@ -241,6 +241,8 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<ZdySafeBottom bgColor="#F5F5F5"/>
|
||||
</view>
|
||||
|
||||
|
||||
|
|
@ -251,6 +253,7 @@
|
|||
import navBar from '@/components/nav-bar/nav-bar.vue'
|
||||
import billManagementPopup from '@/components/bill-management-popup/bill-management-popup.vue'
|
||||
import addBillJson from '@/static/json/add-bill.json'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const {
|
||||
billBottomIconList,
|
||||
classifyTabBar
|
||||
|
|
@ -364,7 +367,7 @@ const visibleItemInfoList = computed(() => {
|
|||
|
||||
onShow(() => {
|
||||
getBillData(data.billId)
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F5F5F5')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<template>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" source="uni_alipay_bill" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_bill')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view style="overflow: hidden;height: 100vh;;">
|
||||
|
|
@ -112,6 +112,7 @@
|
|||
<view class="bill-list">
|
||||
<BalanceList :isBalance="false" :list="item.list" @longPress="onLongPress" @onBill="billClick" />
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#F5F5F5"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
|
@ -134,6 +135,7 @@ import {
|
|||
} from '@/utils/common.js'
|
||||
import navBar from '@/components/nav-bar/nav-bar.vue'
|
||||
import BalanceList from '@/components/balance-list/balance-list.vue'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
import {
|
||||
reactive,
|
||||
|
|
@ -247,7 +249,7 @@ onShow(() => {
|
|||
// 初始获取状态栏高度和屏幕高度
|
||||
updateStatusBarHeight()
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F5F5F5')
|
||||
uni.setNavigationBarColor({
|
||||
animation: { // 动画效果
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_call" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_call')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<callList :type="data.type" ref="callLogList"></callList>
|
||||
<tabbar :type="data.type" />
|
||||
<image v-if="data.type != 'ios'" :src="`/static/image/call/${data.type}BtnImg.png`" mode="" class="btnImg"
|
||||
:class="['btnImg_' + data.type]"></image>
|
||||
:class="['btnImg_' + data.type]" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -39,6 +39,7 @@ onReady(() => {
|
|||
|
||||
})
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
try {
|
||||
if (plus.os.name === 'Android') {
|
||||
let colorTabbar = "#FAFAFA"
|
||||
|
|
@ -55,6 +56,7 @@ onShow(() => {
|
|||
} catch (error) {
|
||||
console.log("修改导航条颜色失败", error);
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
onPageScroll((e) => {
|
||||
// console.log(e)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_call" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_call')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="ios" v-if="data.type=='ios'">
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<tabbar type2='ios'/>
|
||||
</view>
|
||||
<view class="xiaomi" v-else-if="data.type=='xiaomi'" style="padding-bottom: 30px;">
|
||||
<view class="container" >
|
||||
<view class="container" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="status" :style="{height:$systemInfo.statusBarHeight+'px'}"> </view>
|
||||
<view class="header" @click="openEditModalDetail()">
|
||||
<image @click.stop="back()" class="back-icon" src="/static/image/call/detail/xiaomiBack.png" :style="{position: 'fixed',
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="oppo" v-else-if="data.type=='oppo'">
|
||||
<view class="group_47573">
|
||||
<view class="group_47573" >
|
||||
<view class="status" :style="{height:$systemInfo.statusBarHeight+'px'}"> </view>
|
||||
<view class="rectangle_22291">
|
||||
<!-- 顶部 -->
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flexcontainer_12">
|
||||
<view class="flexcontainer_12" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="group_48097">
|
||||
<image class="group_13967" src="/static/image/call/detail/oppoIcon6.png" /><text class="text_20"> 收藏 </text>
|
||||
</view>
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
<text class="text_4">通话记录</text>
|
||||
<image class="group_13972" mode="aspectFill" src="/static/image/call/detail/huaweiIcon6.png" />
|
||||
</view>
|
||||
<view class="group_48119">
|
||||
<view class="group_48119" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="rectangle_23184_1" @click="openEditModal()">
|
||||
<!-- 第一条 -->
|
||||
<view class="group_13973" v-for="(item,index) in data.list" :key="index">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<template>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
<!-- <view v-if="$isVip()">
|
||||
<watermark :dark="data.dark" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view> -->
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@
|
|||
<view class="text text1">我们不会自动扣费,会员到期后需要您手动续费。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-container">
|
||||
|
|
@ -126,7 +129,7 @@
|
|||
<text class="name">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttonBoxs " :class="{ 'christmas': data.isChristmas }">
|
||||
<view class="buttonBoxs " :class="{ 'christmas': data.isChristmas }" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="hongbao" v-if="data.ishongBao">
|
||||
<c-lottie ref="cLottieRef" :loop="false" src='/static/lottie/hongbao.json' width="100vw"
|
||||
height='216vw'></c-lottie>
|
||||
|
|
@ -667,6 +670,7 @@
|
|||
// uni.offNativeEventReceive()
|
||||
})
|
||||
onReady(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
try {
|
||||
if (plus.os.name === 'Android') {
|
||||
let color = plus.android.newObject("android.graphics.Color");
|
||||
|
|
@ -697,6 +701,7 @@
|
|||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
|
||||
|
||||
|
|
@ -916,7 +921,7 @@
|
|||
activity_id = activity_id.replace(',', '')
|
||||
if (activity_id != "") {
|
||||
console.log("activity_id", activity_id);
|
||||
let activityRes = await postJson('q', 'api/activity', {
|
||||
let activityRes = await postJson('', 'api/activity', {
|
||||
activity_id: activity_id //activity_id+"="
|
||||
})
|
||||
console.log(activityRes)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
<uni-icons type="forward" size="18" color="#AEAEAE"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<ZdySafeBottom bgColor="#f0f3f8"/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -29,6 +31,7 @@ import {
|
|||
} from '@/utils/common.js'
|
||||
const videoHelpList = ref([]);
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
onLoad(() => {
|
||||
const configData = storage.get("config")
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<template>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_finance" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_finance')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container flex flex-column" @touchstart="handleTouchStart" @touchmove.stop.prevent="handleTouchMove"
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="!selectedImage" class="content flex-1 flex-column flex" @touchstart="clickHandleTouchStart"
|
||||
<view v-if="!selectedImage" class="content flex-1 flex-column flex" @touchstart="clickHandleTouchStart" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}"
|
||||
@touchend="clickHandleTouchEnd">
|
||||
<view v-if="financeInfo.bgImage" class="w100 h100" style="margin-top: -1px;">
|
||||
<image class="w100 h100" :src="financeInfo.bgImage" mode="widthFix">
|
||||
|
|
@ -188,13 +188,13 @@
|
|||
</view>
|
||||
<canvas canvas-id="crop-canvas"
|
||||
style="position: fixed; left: -9999px; width: 750rpx; height: 100vh; pointer-events: none;"></canvas>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<view class="bottom-box"
|
||||
:class="`navigation-menu-${financeInfo.navigationMenuStyle}` + ($system == 'iOS' ? ' ios-bottom-box' : '')">
|
||||
<view class="bottom-item" v-for="item in navigationMenu" :key="item.name" @click="clickBottomItem(item)">
|
||||
<view class="bottom-item" v-for="item in navigationMenu" :key="item.name" @click="clickBottomItem(item)" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<image
|
||||
:src="`/static/image/finance-management/navigation-menu/${financeInfo.navigationMenuStyle}/${item.icon}.png`">
|
||||
</image>
|
||||
|
|
@ -264,6 +264,7 @@ import {
|
|||
navigationMenu,
|
||||
myAssets
|
||||
} from '@/static/json/fortune.json'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
numberUtil,
|
||||
util
|
||||
|
|
@ -365,7 +366,7 @@ onShow(async () => {
|
|||
...uni.getStorageSync('financeInfo')
|
||||
}
|
||||
console.log("financeInfo.value", financeInfo.value)
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor(financeInfo.value.navigationMenuStyle == 'style-1' ? '#ffffff' : '#F8F8F8')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
@ -584,7 +585,9 @@ const chooseImage = () => {
|
|||
selectedImage.value = res.tempFilePaths[0]
|
||||
data.showMask = true
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
// #endif
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
|
|
@ -663,7 +666,9 @@ const confirmImage = () => {
|
|||
financeInfo.value.bgImage = saveRes.savedFilePath
|
||||
selectedImage.value = '' // 隐藏编辑模式
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}, 200)
|
||||
// 保存到缓存
|
||||
uni.setStorageSync("financeInfo", financeInfo.value)
|
||||
|
|
@ -712,7 +717,9 @@ const clickHandleTouchEnd = () => {
|
|||
const closeImage = () => {
|
||||
selectedImage.value = ''
|
||||
data.showMask = false
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -750,7 +757,7 @@ const closeStyleDialog = () => {
|
|||
const confirmStyleDialog = (type) => {
|
||||
financeInfo.value.navigationMenuStyle = type
|
||||
uni.setStorageSync('financeInfo', financeInfo.value)
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor(financeInfo.value.navigationMenuStyle == 'style-1' ? '#ffffff' : '#F8F8F8')
|
||||
// #endif
|
||||
stylePopup.value.close()
|
||||
|
|
|
|||
|
|
@ -125,13 +125,17 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- <view style="border: 1px solid red; text-align: center;padding: 10px;" @click="exit">退出模拟器</view> -->
|
||||
|
||||
<view class="footer-box" :class="{ 'ios-padding-bottom': platform === 'ios' }">
|
||||
<text class="vision-text">版本:{{ vision }}</text>
|
||||
<text class="vision-text margin-l-6" v-if="qqgroup.enable">{{ qqgroup.text }}</text>
|
||||
<text class="vision-text" @click="copyNumber(qqgroup.number)">{{ qqgroup.number }}</text>
|
||||
</view>
|
||||
|
||||
<view v-if="platform != 'ios'" :style="{'height':'40px','background':'#F0F4F9'}">
|
||||
|
||||
</view>
|
||||
<view v-if="platform != 'ios'" class="footer-box-safeBottom" :style="{'height':'40px','background':'#F0F4F9',width:data.windowWidth+'px'}">
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -161,10 +165,11 @@ import {
|
|||
onUnload,
|
||||
onReady
|
||||
} from '@dcloudio/uni-app';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
onReady(() => {
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.closeSplashscreen();
|
||||
// #endif
|
||||
}, 500);
|
||||
|
|
@ -630,7 +635,9 @@ const exit = () => {
|
|||
console.log('宿主App回传的数据:' + ret);
|
||||
});
|
||||
} else {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.runtime.quit();
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -764,6 +771,11 @@ onUnload(() => {
|
|||
})
|
||||
</script>
|
||||
<style>
|
||||
.footer-box-safeBottom{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.container {
|
||||
background-color: #F0F4F9;
|
||||
}
|
||||
|
|
@ -1065,6 +1077,7 @@ onUnload(() => {
|
|||
justify-content: center;
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.vision-text {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_message" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_message')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view :class="`${data.phone}-style`">
|
||||
|
|
@ -619,7 +619,7 @@ onLoad((options) => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
if (data.phone == 'oppo') {
|
||||
util.setAndroidSystemBarColor('#FAFAFA')
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_message" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_message')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
@edit-item="editItem">
|
||||
</MessageList>
|
||||
</MessageNavBar>
|
||||
|
||||
<ZdySafeBottom v-if="data.phone!='oppo'&&data.phone!='xiaomi'" bgColor="#fff"/>
|
||||
<!-- 添加短信弹窗 -->
|
||||
<view v-if="showAddPopup" class="add-mask" @tap="closeAddPopup">
|
||||
<view class="add-popup" @tap.stop>
|
||||
|
|
@ -136,6 +136,8 @@
|
|||
<script setup>
|
||||
import MessageNavBar from '@/components/message/list/message-nav-bar.vue'
|
||||
import MessageList from '@/components/message/list/list.vue'
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
import defaultData from './defaultData.json'
|
||||
import {
|
||||
ref,
|
||||
|
|
@ -194,7 +196,7 @@ onLoad((options) => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
if (data.phone == 'oppo') {
|
||||
util.setAndroidSystemBarColor('#FAFAFA')
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view>
|
||||
<!-- Custom Nav Bar -->
|
||||
<view class="custom-nav-bar" :class="{ 'android-nav': isAndroid }">
|
||||
|
|
@ -56,13 +56,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f0f3f8"/>
|
||||
</view>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_about_iphone" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_about_iphone')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -73,6 +74,7 @@ import { util } from '@/utils/common.js'
|
|||
import { onShow, onLoad, onPageScroll } from '@dcloudio/uni-app'
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const CACHE_KEY = 'about_iphone_data';
|
||||
|
||||
// Removed scroll logic, styling is now fully CSS-driven
|
||||
|
|
@ -146,7 +148,7 @@ const statusBarHeight = ref(0);
|
|||
const isAndroid = ref(false);
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F2F1F6')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<watermark dark="light" source="uni_alipay_other_airTickets_ctrip" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_airTickets_ctrip')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="codefun-flex-col page" :style="{ '--font-weight-bold': $system == 'iOS' ? 500 : 700 }">
|
||||
|
|
@ -309,8 +309,8 @@
|
|||
<image class="image_19 pos_15" src="/static/image/other/air-tickets/ctrip-air/connect-icon.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="codefun-flex-col codefun-mt-8">
|
||||
<view class="codefun-flex-col section_12">
|
||||
<view class="codefun-flex-col codefun-mt-8" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="codefun-flex-col section_12" >
|
||||
<text class="codefun-self-start font_6 text_52">出行服务</text>
|
||||
<view class="codefun-self-stretch grid_2 mt-19">
|
||||
<view class="codefun-flex-col codefun-items-center grid-item_4">
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
<text class="font_8 text_54">更多服务</text>
|
||||
<image class="image_11 codefun-ml-6" src="/static/image/other/air-tickets/ctrip-air/more.png" />
|
||||
</view>
|
||||
<view class="codefun-flex-col codefun-justify-start section_14">
|
||||
<view class="codefun-flex-col codefun-justify-start section_14" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="codefun-flex-row equal-division_3">
|
||||
<view
|
||||
class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_5 text-wrapper_1">
|
||||
|
|
@ -373,6 +373,8 @@ import { util } from '@/utils/common.js';
|
|||
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
|
||||
import airlineJson from '@/static/json/air-line.json';
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const buttonGroup = [{
|
||||
name: "编辑机票信息",
|
||||
click: () => {
|
||||
|
|
@ -426,7 +428,7 @@ onShow(() => {
|
|||
if (stored) {
|
||||
Object.assign(data.airTicketsInfo, stored);
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<watermark dark="light" source="uni_alipay_other_airTickets_fliggy" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_airTickets_fliggy')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="page-container">
|
||||
|
|
@ -279,10 +279,13 @@
|
|||
<!-- Note: User image shows floating bottom bar but cut off. Assuming standard action buttons -->
|
||||
</view>
|
||||
<view class="safe-area-inset-bottom"></view> <!-- Spacer -->
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="footer-bar">
|
||||
<view class="flex flex-justify-between">
|
||||
<view class="flex flex-justify-between" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="flex-1 flex flex-align-center flex-justify-center">
|
||||
<image class="footer-icon" src="/static/image/other/air-tickets/fliggy-air/zhibo.png" />
|
||||
<text class="text">联系飞猪</text>
|
||||
|
|
@ -392,7 +395,7 @@ onShow(() => {
|
|||
const mergedData = deepMerge(baseData, stored);
|
||||
Object.assign(data.airTickrtInfo, mergedData);
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<watermark dark="light" source="uni_alipay_other_airTickets_qunar" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_airTickets_qunar')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="page-container">
|
||||
|
|
@ -334,16 +334,19 @@
|
|||
</view>
|
||||
|
||||
<!-- Branding -->
|
||||
<view class="branding-area">
|
||||
<view class="branding-area" >
|
||||
<image class="image" src="/static/image/other/air-tickets/qunar/branding-area-image.png"
|
||||
mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Bottom Fixed -->
|
||||
<view class="bottom-bar">
|
||||
<view class="bottom-bar" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<button class="invoice-btn">开具发票</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -404,7 +407,7 @@ onShow(() => {
|
|||
Object.assign(data.ticketData, stored);
|
||||
}
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip() && !selectedImage">
|
||||
<watermark dark="light" source="uni_alipay_other_bank" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_bank')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="group_45764" v-if="!selectedImage" :style="{'padding-top':$systemInfo.statusBarHeight+'px'}">
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
</view>
|
||||
<image class="dee351fc65540488ca79ac78c10072f2" src="/static/image/other/bank/gsyh/bottomImg.png" />
|
||||
<view class="footer"></view>
|
||||
|
||||
<ZdySafeBottom bg-color="#fff"/>
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
|
|
@ -294,6 +294,7 @@
|
|||
import { reactive, onMounted, ref, getCurrentInstance } from 'vue';
|
||||
import NavBar from '@/components/nav-bar/nav-bar'
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const instance = getCurrentInstance();
|
||||
const CACHE_KEY = 'gsyh_account_info';
|
||||
const BANNER_IMAGE_KEY = 'gsyh_banner_image';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_bank" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_bank')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<NavBar v-if="selectedImage" title="拼图" bgColor="#EFEFEF" noBack @back="closeImageEdit" isRightButton
|
||||
|
|
@ -128,6 +128,7 @@
|
|||
</view>
|
||||
<Home class="home" />
|
||||
|
||||
<ZdySafeBottom bgColor="#f8f8f8"/>
|
||||
<!-- 卡号信息弹窗 -->
|
||||
<view class="dask" v-if="data.isShow">
|
||||
<view class="info">
|
||||
|
|
@ -221,6 +222,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
reactive,
|
||||
onMounted,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_bank" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_bank')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="flexcontainer">
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f7f7f7"/>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
|
|
@ -181,6 +182,7 @@
|
|||
} from 'vue';
|
||||
|
||||
const CACHE_KEY = 'nyyh_account_info';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
|
|
@ -358,7 +360,6 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
z-index: 0;
|
||||
// margin-top: -86rpx;
|
||||
margin-left: 0;
|
||||
background-color: $color-white;
|
||||
|
|
@ -1184,6 +1185,8 @@
|
|||
left: 0;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
|
||||
z-index: 99;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
|
|
@ -1191,7 +1194,7 @@
|
|||
width: 750rpx;
|
||||
height: 96rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
background-color: #fff;
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_bank" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_bank')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="flexcontainer">
|
||||
|
|
@ -170,7 +170,9 @@
|
|||
</view>
|
||||
<canvas canvas-id="crop-canvas"
|
||||
style="position: fixed; left: -9999px; width: 750rpx; height: 100vh; pointer-events: none;"></canvas>
|
||||
<ZdySafeBottom bgColor="#f8f8f8"/>
|
||||
</view>
|
||||
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
<view class="editDialog_header">
|
||||
|
|
@ -258,6 +260,7 @@
|
|||
|
||||
<script setup>
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
|
|
|
|||
|
|
@ -12,12 +12,14 @@
|
|||
<view class="button-container">
|
||||
<button class="btn-save-image" @click="saveImage">保存图片</button>
|
||||
</view>
|
||||
<view style="width: 0px;height: 0;overflow: hidden;" v-if="data.shuaxing">
|
||||
<view style="width: 0px;height: 0;overflow: hidden;" v-if="data.shuaxing && data.bgImg">
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress"
|
||||
:css="`width:${data.width}px;height:${data.height }px;background-color:#fff;`">
|
||||
<l-painter-view
|
||||
:css="`margin-top:109px;margin-left:75px;position: relative;width:666px;height:406px;background-image: url('${data.bgImg}');background-size:6660px 406px;`">
|
||||
<!-- 头部年月 -->
|
||||
:css="`margin-top:109px;margin-left:75px;position: relative;width:666px;height:406px;`">
|
||||
<!-- 背景图:用 image 替代 background-image,避免鸿蒙本地路径不生效 -->
|
||||
<l-painter-image :src="data.bgImg" css="width:666px;height:406px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 姓名 -->
|
||||
<l-painter-view :css="`position: absolute;left:122px;top:54px;`">
|
||||
<l-painter-text :css="data.textCss+data.textCssLeft" :text="data.form.name" />
|
||||
</l-painter-view>
|
||||
|
|
@ -27,25 +29,36 @@
|
|||
<l-painter-view :css="`position: absolute;left:262px;top:102px;`">
|
||||
<l-painter-text :css="data.textCss2+data.textCssLeft" :text="data.form.nation" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:122px;top:152px;`">
|
||||
<l-painter-text v-for="(item,index) in data.form.year.toString()" :css="data.textCss3+data.textCssLeft"
|
||||
:text="item" :key="index" />
|
||||
<!-- 出生年:逐字绝对定位,避免鸿蒙下多 text 竖排/重叠 -->
|
||||
<l-painter-text
|
||||
v-for="(item, index) in String(data.form.year)"
|
||||
:key="'year-' + index"
|
||||
:css="data.textCssDigit + `position:absolute;left:${122 + index * 18}px;top:152px;`"
|
||||
:text="item"
|
||||
/>
|
||||
<!-- 月 / 日 -->
|
||||
<l-painter-view :css="`position: absolute;left:216px;top:152px;`">
|
||||
<l-painter-text :css="data.textCssMonthDay" :text="String(data.form.month)" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:192px;top:152px;`">
|
||||
<l-painter-text :css="data.textCss2+data.textCssCenter" :text="data.form.month.toString()" />
|
||||
<l-painter-view :css="`position: absolute;left:278px;top:152px;`">
|
||||
<l-painter-text :css="data.textCssMonthDay" :text="String(data.form.day)" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:254px;top:152px;`">
|
||||
<l-painter-text :css="data.textCss2+data.textCssCenter" :text="data.form.day.toString()" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:122px;top:200px;width:274px;`">
|
||||
<l-painter-text v-for="(item,index) in data.form.address" :css="data.textCss3+data.textCssLeft" :text="item"
|
||||
:key="index" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:223px;top:322px;`">
|
||||
<l-painter-text v-for="(item,index) in data.form.idNumber" :css="data.textCss4+data.textCssLeft" :text="item"
|
||||
:key="index" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:48px;top:62px;`">
|
||||
<!-- 住址 -->
|
||||
<l-painter-text
|
||||
v-for="(item, index) in addressChars"
|
||||
:key="'addr-' + index"
|
||||
:css="data.textCssDigit + `position:absolute;left:${item.left}px;top:${item.top}px;`"
|
||||
:text="item.text"
|
||||
/>
|
||||
<!-- 身份证号 -->
|
||||
<l-painter-text
|
||||
v-for="(item, index) in String(data.form.idNumber || '')"
|
||||
:key="'id-' + index"
|
||||
:css="data.textCssId + `position:absolute;left:${223 + index * 20}px;top:322px;`"
|
||||
:text="item"
|
||||
/>
|
||||
<!-- 照片(right 在鸿蒙易失效,改为 left) -->
|
||||
<l-painter-view :css="`position: absolute;left:422px;top:62px;`">
|
||||
<l-painter-image v-if="data.form.photo" :src="data.form.photo" css="width: 196px; height: 230px;" />
|
||||
<l-painter-view v-else css="width: 196px; height: 230px;background-color:#fff;">
|
||||
</l-painter-view>
|
||||
|
|
@ -114,7 +127,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_card')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -128,6 +141,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
watch,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
|
|
@ -145,7 +159,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
proxy
|
||||
} = getCurrentInstance();
|
||||
const data = reactive({
|
||||
shuaxing:true,
|
||||
shuaxing: false,
|
||||
navbar: {
|
||||
title: "身份证",
|
||||
bgColor: '#EDEDED',
|
||||
|
|
@ -153,7 +167,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
width: 800,
|
||||
height: 600,
|
||||
code: '',
|
||||
bgImg:'',
|
||||
bgImg: '',
|
||||
form: {
|
||||
name: '某某',
|
||||
gender: '男',
|
||||
|
|
@ -165,23 +179,70 @@ import { imgLocal } from '@/utils/common.js';
|
|||
idNumber: '110000200001010000',
|
||||
photo: '',
|
||||
},
|
||||
textCss: 'word-spacing: 20px;font-family: "SimHei", "Microsoft YaHei", sans-serif;width:100px;color:#3D3D3D;font-size:24px; mix-blend-mode: overlay;',
|
||||
textCss2: 'word-spacing: 20px;font-family: "SimHei", "Microsoft YaHei", sans-serif;width:100px;text-align: left;color:#3D3D3D;font-size:22px;mix-blend-mode: overlay;',
|
||||
textCss3: 'word-spacing: 20px;letter-spacing: 10px;margin-right:2px;font-family: "SimHei", "Microsoft YaHei", sans-serif;text-align: left;color:#3D3D3D;font-size:22px;mix-blend-mode: overlay;',
|
||||
textCss4: 'word-spacing: 20px;margin-right:3px;letter-spacing: 10px;font-family: "card", "Microsoft YaHei", sans-serif;text-align: left;color:#1a1a1a;font-size:28px;mix-blend-mode: overlay;display:flex;',
|
||||
|
||||
textCss: 'font-family: "SimHei", "Microsoft YaHei", sans-serif;width:100px;color:#3D3D3D;font-size:24px;',
|
||||
textCss2: 'font-family: "SimHei", "Microsoft YaHei", sans-serif;width:100px;text-align: left;color:#3D3D3D;font-size:22px;',
|
||||
// 年/月/日/住址单字
|
||||
textCssDigit: 'font-family: "SimHei", "Microsoft YaHei", sans-serif;width:22px;color:#3D3D3D;font-size:22px;',
|
||||
textCssMonthDay: 'font-family: "SimHei", "Microsoft YaHei", sans-serif;width:40px;text-align:center;color:#3D3D3D;font-size:22px;',
|
||||
// 身份证号单字(专用字体)
|
||||
textCssId: 'font-family: "card", "Microsoft YaHei", sans-serif;width:22px;color:#1a1a1a;font-size:28px;',
|
||||
textCssLeft: 'text-align: left;',
|
||||
textCssCenter: 'text-align: center;'
|
||||
})
|
||||
|
||||
/** 住址逐字坐标(固定字宽换行,避免鸿蒙流式布局异常) */
|
||||
const addressChars = computed(() => {
|
||||
const chars = String(data.form.address || '').split('')
|
||||
const startLeft = 122
|
||||
const startTop = 200
|
||||
const step = 26
|
||||
const lineHeight = 32
|
||||
const perLine = 10
|
||||
return chars.map((text, index) => ({
|
||||
text,
|
||||
left: startLeft + (index % perLine) * step,
|
||||
top: startTop + Math.floor(index / perLine) * lineHeight
|
||||
}))
|
||||
})
|
||||
|
||||
function loadCardFont() {
|
||||
return new Promise((resolve) => {
|
||||
uni.loadFontFace({
|
||||
family: 'card',
|
||||
source: 'url("/static/font/card.ttf")',
|
||||
success: () => resolve(true),
|
||||
fail: (err) => {
|
||||
console.warn('身份证号码字体加载失败', err)
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function loadCardBg() {
|
||||
try {
|
||||
const localPath = await imgLocal.getLocalImage('other/card/cardBGImg.png')
|
||||
return localPath || ''
|
||||
} catch (e) {
|
||||
console.error('身份证背景图加载失败', e)
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
// 弹窗相关
|
||||
const showEditPopup = ref(false);
|
||||
const editForm = ref({});
|
||||
onLoad(async(option) => {
|
||||
data.bgImg= await imgLocal.getLocalImage('other/card/cardBGImg.png');
|
||||
uni.showLoading({
|
||||
title: "生成中"
|
||||
})
|
||||
await loadCardFont()
|
||||
data.bgImg = await loadCardBg()
|
||||
data.shuaxing = !!data.bgImg
|
||||
if (!data.bgImg) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: '背景图加载失败', icon: 'none' })
|
||||
}
|
||||
// 进入身份证页面埋点
|
||||
proxy.$apiUserEvent('all', {
|
||||
type: 'event',
|
||||
|
|
@ -288,6 +349,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
|
|
@ -300,7 +362,10 @@ import { imgLocal } from '@/utils/common.js';
|
|||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
// 预览图片
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<!-- 自定义头部导航栏 -->
|
||||
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
||||
:bgColor="data.navbar.bgColor" :isBack="true" />
|
||||
<view class="footer-box" v-if="data.typeList.length>1">
|
||||
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == getType(index) }"
|
||||
<view class="footer-box" v-if="data.typeList.length>1" >
|
||||
<view class="btn" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == getType(index) }"
|
||||
@click="setType(index)">
|
||||
{{ item }}
|
||||
</view>
|
||||
|
|
@ -20,9 +20,10 @@
|
|||
</view>
|
||||
<view style="width: 0px;height: 0;overflow: hidden;" v-if="data.shuaxing">
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:250px;"
|
||||
v-if="data.type == 0">
|
||||
v-if="data.type == 0 && data.bgImg1">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:250px;background-image: url('${data.bgImg1}');position: relative;`">
|
||||
:css="`width:351px;height:250px;position: relative;`">
|
||||
<l-painter-image :src="data.bgImg1" css="width:351px;height:250px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 标题 -->
|
||||
<l-painter-view :css="`position: absolute;left:${data.graduate.type == 0 ? 46 : 85}px;top:67px;`">
|
||||
<l-painter-image :src="data.graduate.title"
|
||||
|
|
@ -88,9 +89,10 @@
|
|||
</l-painter-view>
|
||||
</l-painter>
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:262px;"
|
||||
v-else-if="data.type == 1">
|
||||
v-else-if="data.type == 1 && data.bgImg2">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:262px;background-image: url('${data.bgImg2}');position: relative;`">
|
||||
:css="`width:351px;height:262px;position: relative;`">
|
||||
<l-painter-image :src="data.bgImg2" css="width:351px;height:262px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<l-painter-view :css="`position: absolute;right:126px;bottom:113px;`">
|
||||
<l-painter-text :css="data.textCss2 + 'text-align: right;color:#838383;'" :text="data.graduate.name" />
|
||||
</l-painter-view>
|
||||
|
|
@ -102,34 +104,37 @@
|
|||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:350px;height:552px;"
|
||||
v-else-if="data.type == 2">
|
||||
<l-painter-view
|
||||
:css="`width:350px;height:552px;background-image: url('/static/image/other/certificate/couple/bgImage.png');position: relative;`">
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:123px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.name" />
|
||||
<l-painter-image src="/static/image/other/certificate/couple/love.png"
|
||||
css="width: 10px;height: 9px;margin: 0 5px;" />
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.name2" />
|
||||
:css="`width:350px;height:552px;position: relative;`">
|
||||
<l-painter-image src="/static/image/other/certificate/couple/bgImage.png"
|
||||
css="width:350px;height:552px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 持证人:绝对定位,避免鸿蒙 flex 错位 -->
|
||||
<l-painter-text :css="data.textCssCouple + `position:absolute;left:39px;top:123px;`"
|
||||
:text="data.graduate.name" />
|
||||
<l-painter-image src="/static/image/other/certificate/couple/love.png"
|
||||
:css="`position:absolute;left:${coupleHolder.iconLeft}px;top:125px;width:10px;height:9px;`" />
|
||||
<l-painter-text :css="data.textCssCouple + `position:absolute;left:${coupleHolder.name2Left}px;top:123px;`"
|
||||
:text="data.graduate.name2" />
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:175px;`">
|
||||
<l-painter-text :css="data.textCssCouple" :text="data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:175px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.time" />
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:224px;width:180px;`">
|
||||
<l-painter-text :css="data.textCssCouple + 'width:180px;'" :text="data.graduate.dec" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:224px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'" :text="data.graduate.dec" />
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:45px;`">
|
||||
<l-painter-text :css="data.textCssCouple" :text="'发证时间: ' + data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:45px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'" :text="'发证时间: ' + data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:27px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'"
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:27px;`">
|
||||
<l-painter-text :css="data.textCssCouple"
|
||||
:text="`发证单位: ${$isVip() ? '装样大师恋爱委员会' : '幸福恋爱委员会'}`" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:34px;top:93px;`">
|
||||
<l-painter-view :css="`position: absolute;left:156px;top:93px;`">
|
||||
<l-painter-image :src="data.graduate.image" css="width: 160px;height: 110px;" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:19px;top:181px;`">
|
||||
<l-painter-view :css="`position: absolute;left:227px;top:181px;`">
|
||||
<l-painter-image :src="`/static/image/other/certificate/couple/${$isVip() ? 'icon1' : 'icon2'}.png`"
|
||||
css="width: 104px;height: 92px;" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:55px;bottom:21px;`">
|
||||
<l-painter-view :css="`position: absolute;left:251px;bottom:21px;`">
|
||||
<l-painter-qrcode text="http://u8t.cn/QJ?sc=DpK" image="/static/image/other/certificate/couple/image.png"
|
||||
css="width: 44px; height: 44px" />
|
||||
</l-painter-view>
|
||||
|
|
@ -141,38 +146,41 @@
|
|||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:350px;height:552px;"
|
||||
v-else-if="data.type == 3">
|
||||
<l-painter-view
|
||||
:css="`width:350px;height:552px;background-image: url('/static/image/other/certificate/couple/bgImage2.png');position: relative;`">
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:123px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.name" />
|
||||
<l-painter-image src="/static/image/other/certificate/couple/noLove.png"
|
||||
css="width: 10px;height: 9px;margin: 0 5px;" />
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.name2" />
|
||||
:css="`width:350px;height:552px;position: relative;`">
|
||||
<l-painter-image src="/static/image/other/certificate/couple/bgImage2.png"
|
||||
css="width:350px;height:552px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 持证人 -->
|
||||
<l-painter-text :css="data.textCssCouple + `position:absolute;left:39px;top:123px;`"
|
||||
:text="data.graduate.name" />
|
||||
<l-painter-image src="/static/image/other/certificate/couple/noLove.png"
|
||||
:css="`position:absolute;left:${coupleHolder.iconLeft}px;top:125px;width:10px;height:9px;`" />
|
||||
<l-painter-text :css="data.textCssCouple + `position:absolute;left:${coupleHolder.name2Left}px;top:123px;`"
|
||||
:text="data.graduate.name2" />
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:175px;`">
|
||||
<l-painter-text :css="data.textCssCouple" :text="data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:175px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3" :text="data.graduate.time" />
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:224px;width:180px;`">
|
||||
<l-painter-text :css="data.textCssCouple + 'width:180px;'" :text="data.graduate.dec" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:39px;top:224px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'" :text="data.graduate.dec" />
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:45px;`">
|
||||
<l-painter-text :css="data.textCssCouple" :text="'发证时间: ' + data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:45px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'" :text="'发证时间: ' + data.graduate.time" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:27px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss3 + 'width: 180px;'"
|
||||
<l-painter-view :css="`position: absolute;left:33px;bottom:27px;`">
|
||||
<l-painter-text :css="data.textCssCouple"
|
||||
:text="`发证单位: ${$isVip() ? '装样大师分手委员会' : '分手快乐委员会'}`" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:34px;top:93px;`">
|
||||
<l-painter-view :css="`position: absolute;left:156px;top:93px;`">
|
||||
<l-painter-image :src="data.graduate.image" css="width: 160px;height: 110px;" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:34px;top:93px;`">
|
||||
<l-painter-view :css="`position: absolute;left:156px;top:93px;`">
|
||||
<l-painter-image src="/static/image/other/certificate/couple/imageDask.png"
|
||||
css="width: 160px;height: 110px;" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:19px;top:181px;`">
|
||||
<l-painter-view :css="`position: absolute;left:227px;top:181px;`">
|
||||
<l-painter-image :src="`/static/image/other/certificate/couple/${$isVip() ? 'icon1' : 'icon2'}2.png`"
|
||||
css="width: 104px;height: 92px;" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;right:55px;bottom:21px;`">
|
||||
<l-painter-view :css="`position: absolute;left:251px;bottom:21px;`">
|
||||
<l-painter-qrcode text="http://u8t.cn/QJ?sc=DpK" image="/static/image/other/certificate/couple/image.png"
|
||||
css="width: 44px; height: 44px" />
|
||||
</l-painter-view>
|
||||
|
|
@ -231,24 +239,26 @@
|
|||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:248px;"
|
||||
v-else-if="data.type == 6">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:248px;background-image: url('/static/image/other/certificate/god/bgImg.png');position: relative;`">
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:181px;display: flex;align-items: center;`">
|
||||
:css="`width:351px;height:248px;position: relative;`">
|
||||
<l-painter-image src="/static/image/other/certificate/god/bgImg.png"
|
||||
css="width:351px;height:248px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:181px;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:60px;text-align:center;'" :text="data.graduate.name" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:204px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:204px;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:60px;text-align:center;'" :text="data.graduate.age" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:161px;top:44px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:166px;font-size:11px;'"
|
||||
:text="' 兹证明 '+data.graduate.name+' 同志,肤白兹证明貌美,聪颖过人,身材窃窕,婉约温柔,沉鱼落雁,闭月羞花,迷倒一群高富帅,人称“女神”,通过外貌协会权威认证,特发此证。'" />
|
||||
<!-- 兹证明:手动换行,鸿蒙下 width 自动折行不生效 -->
|
||||
<l-painter-view :css="`position: absolute;left:161px;top:44px;width:166px;`">
|
||||
<l-painter-text :css="data.textCssGodBody" :text="goddessCertText" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:171px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:171px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="data.graduate.time1" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:190px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:190px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="data.graduate.time2" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:208px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:208px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="'装样大师颜值委员会'" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:60px;top:84px;`">
|
||||
|
|
@ -262,24 +272,25 @@
|
|||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:248px;"
|
||||
v-else-if="data.type == 7">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:248px;background-image: url('/static/image/other/certificate/god/bgImg2.png');position: relative;`">
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:181px;display: flex;align-items: center;`">
|
||||
:css="`width:351px;height:248px;position: relative;`">
|
||||
<l-painter-image src="/static/image/other/certificate/god/bgImg2.png"
|
||||
css="width:351px;height:248px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:181px;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:60px;text-align:center;'" :text="data.graduate.name" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:204px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:74px;top:204px;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:60px;text-align:center;'" :text="data.graduate.age" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:161px;top:44px;display: flex;align-items: center;`">
|
||||
<l-painter-text :css="data.textCss6 +'width:166px;font-size:11px;'"
|
||||
:text="' 兹证明 '+data.graduate.name+'同志,肤若凝脂,气宇轩昂,聪慧果敢,身形挺拔,温润如玉,才貌双全,迷倒万千少女心,人称“男神”,经颜值与气质协会权威认证,特发此证。'" />
|
||||
<l-painter-view :css="`position: absolute;left:161px;top:44px;width:166px;`">
|
||||
<l-painter-text :css="data.textCssGodBody" :text="godCertText" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:171px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:171px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="data.graduate.time1" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:190px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:190px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="data.graduate.time2" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:208px;display: flex;align-items: center;`">
|
||||
<l-painter-view :css="`position: absolute;left:211px;top:208px;`">
|
||||
<l-painter-text :css="data.textCss6 " :text="'装样大师颜值委员会'" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;left:60px;top:84px;`">
|
||||
|
|
@ -530,7 +541,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_certificate')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -544,6 +555,7 @@
|
|||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
watch,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
|
|
@ -588,7 +600,7 @@
|
|||
"value": 1,
|
||||
"text": "清华大学"
|
||||
}],
|
||||
shuaxing: true,
|
||||
shuaxing: false,
|
||||
navbar: {
|
||||
title: "证书",
|
||||
bgColor: '#EDEDED',
|
||||
|
|
@ -600,9 +612,12 @@
|
|||
textCssRight: 'word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;width:100px;color:#3D3D3D;font-size:5px; mix-blend-mode: overlay;',
|
||||
textCss2: 'word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "宋体", sans-serif;width:100px;color:#3D3D3D;font-size:5.2px; mix-blend-mode: overlay;',
|
||||
textCss3: 'word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "宋体", sans-serif;color:#3D3D3D;font-size:12px; mix-blend-mode: overlay;',
|
||||
// 情侣/分手证文字(去掉 letter-spacing,避免鸿蒙字距异常)
|
||||
textCssCouple: 'font-family: "宋体", sans-serif;color:#3D3D3D;font-size:12px;',
|
||||
textCss4: 'font-weight: bold;font-family: "宋体", sans-serif;color:#3D3D3D;font-size:13px; mix-blend-mode: overlay;',
|
||||
textCss5: 'font-weight: bold;font-family: "宋体", sans-serif;color:#3D3D3D;font-size:13px; mix-blend-mode: overlay;',
|
||||
textCss6: 'font-weight: bold;font-family: "宋体", sans-serif;color:#3D3D3D;font-size:10px; mix-blend-mode: overlay;',
|
||||
textCssGodBody: 'font-weight:bold;font-family:"宋体",sans-serif;color:#3D3D3D;font-size:11px;width:166px;line-height:1.45em;',
|
||||
textCss7: 'font-weight: bold;font-family: "宋体", sans-serif;color:#3D3D3D;font-size:13px; mix-blend-mode: overlay;',
|
||||
textFont:'font-family:"certificate";',
|
||||
textCssLeft: 'text-align: left;',
|
||||
|
|
@ -619,12 +634,59 @@
|
|||
]
|
||||
})
|
||||
|
||||
/** 持证人:按姓名字数算爱心/第二姓名位置(font-size 12 ≈ 每字 12px) */
|
||||
const coupleHolder = computed(() => {
|
||||
const nameLen = String(data.graduate?.name || '').length
|
||||
const charW = 12
|
||||
const startLeft = 39
|
||||
const gap = 5
|
||||
const iconW = 10
|
||||
const iconLeft = startLeft + nameLen * charW + gap
|
||||
const name2Left = iconLeft + iconW + gap
|
||||
return { iconLeft, name2Left }
|
||||
})
|
||||
|
||||
/** 按字数插入换行(鸿蒙 canvas 窄宽不自动折行) */
|
||||
function wrapTextByChars(text, charsPerLine = 15) {
|
||||
const s = String(text || '')
|
||||
const lines = []
|
||||
for (let i = 0; i < s.length; i += charsPerLine) {
|
||||
lines.push(s.slice(i, i + charsPerLine))
|
||||
}
|
||||
return lines.join('\n')
|
||||
}
|
||||
|
||||
const goddessCertText = computed(() => {
|
||||
const name = data.graduate?.name || ''
|
||||
const text = ` 兹证明 ${name} 同志,肤白貌美,聪颖过人,身材窈窕,婉约温柔,沉鱼落雁,闭月羞花,迷倒一群高富帅,人称“女神”,通过外貌协会权威认证,特发此证。`
|
||||
return wrapTextByChars(text, 15)
|
||||
})
|
||||
|
||||
const godCertText = computed(() => {
|
||||
const name = data.graduate?.name || ''
|
||||
const text = ` 兹证明 ${name}同志,肤若凝脂,气宇轩昂,聪慧果敢,身形挺拔,温润如玉,才貌双全,迷倒万千少女心,人称“男神”,经颜值与气质协会权威认证,特发此证。`
|
||||
return wrapTextByChars(text, 15)
|
||||
})
|
||||
|
||||
// 弹窗相关
|
||||
const showEditPopup = ref(false);
|
||||
const editForm = ref({});
|
||||
onLoad(async(option) => {
|
||||
data.bgImg1= await imgLocal.getLocalImage('other/certificate/graduate/graduate1.png');
|
||||
data.bgImg2= await imgLocal.getLocalImage('other/certificate/graduate/graduate2.png');
|
||||
uni.showLoading({
|
||||
title: "生成中"
|
||||
})
|
||||
try {
|
||||
data.bgImg1 = await imgLocal.getLocalImage('other/certificate/graduate/graduate1.png')
|
||||
} catch (e) {
|
||||
console.error('毕业证书背景1加载失败', e)
|
||||
data.bgImg1 = ''
|
||||
}
|
||||
try {
|
||||
data.bgImg2 = await imgLocal.getLocalImage('other/certificate/graduate/graduate2.png')
|
||||
} catch (e) {
|
||||
console.error('毕业证书背景2加载失败', e)
|
||||
data.bgImg2 = ''
|
||||
}
|
||||
data.styleType=option.styleType||0
|
||||
if(data.styleType==0){
|
||||
data.navbar.title='毕业证书'
|
||||
|
|
@ -660,9 +722,11 @@
|
|||
]
|
||||
setType(0)
|
||||
}
|
||||
// uni.showLoading({
|
||||
// title: "生成中"
|
||||
// })
|
||||
data.shuaxing = true
|
||||
if (data.styleType == 0 && !data.bgImg1 && !data.bgImg2) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: '背景图加载失败', icon: 'none' })
|
||||
}
|
||||
// 进入毕业证书页面埋点
|
||||
proxy.$apiUserEvent('all', {
|
||||
type: 'event',
|
||||
|
|
@ -860,7 +924,7 @@
|
|||
editForm.value.icon = '/static/image/other/certificate/graduate/icon1.png';
|
||||
}
|
||||
}
|
||||
const getType = (index) => {
|
||||
const getType = (index) => {
|
||||
switch (Number(data.styleType)) {
|
||||
case 0:
|
||||
return index
|
||||
|
|
@ -945,6 +1009,7 @@
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
|
|
@ -957,7 +1022,10 @@
|
|||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
// 预览图片
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="honor-of-kings">
|
||||
<nav-bar title="和平精英" bgColor="#F5F5F5" isRightButton :rightButtonText="rightButtonText"
|
||||
@right-click="onRightClick">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_game_heping')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -50,10 +50,10 @@
|
|||
</view>
|
||||
|
||||
<!-- 主题选择区域 -->
|
||||
<view class="theme-selector">
|
||||
<view class="theme-selector" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<scroll-view scroll-x="true" class="theme-scroll" :show-scrollbar="false">
|
||||
<view class="theme-list">
|
||||
<view class="theme-item" v-for="(item, index) in ['样式一', '样式二']" :key="index + 1"
|
||||
<view class="theme-list" >
|
||||
<view class="theme-item" v-for="(item, index) in ['样式一', '样式二']" :key="index + 1"
|
||||
:class="{ active: hePingData.type == index + 1 }" @click="handleChangeTheme(index + 1)">
|
||||
<text class="theme-text">{{ item }}</text>
|
||||
</view>
|
||||
|
|
@ -356,6 +356,7 @@ const handleSave = () => {
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
|
|
@ -368,7 +369,10 @@ function convertLocalImageToFile(localPath) {
|
|||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -30,48 +30,48 @@
|
|||
:css="`position: absolute; left: ${honorData.type == 3 ? '230.3px' : '215.3px'}; top: ${$system == 'iOS' ? '83px' : '85.6px'}; width: ${honorData.nickname.length * 14.9}px;`"></l-painter-image>
|
||||
<!-- 收到花束 -->
|
||||
<l-painter-text :text="honorData.receivedFlowers"
|
||||
css="position: absolute; left: 358.5px; top: 131.4px; font-size: 9px; color: #DAF2FF;transform: translateX(-50%);font-family: WangZheFont2;"></l-painter-text>
|
||||
css="position: absolute; left: 338.5px; top: 131.4px; width: 40px; text-align: center; font-size: 9px; color: #DAF2FF;font-family: WangZheFont2;"></l-painter-text>
|
||||
<!-- 热度数 -->
|
||||
<l-painter-text :text="honorData.popularityCount"
|
||||
css="position: absolute; left: 386.3px; top: 131.4px; font-size: 9px; color: #DAF2FF;transform: translateX(-50%);font-family: WangZheFont2;"></l-painter-text>
|
||||
css="position: absolute; left: 366.3px; top: 131.4px; width: 40px; text-align: center; font-size: 9px; color: #DAF2FF;font-family: WangZheFont2;"></l-painter-text>
|
||||
<!-- 点赞数 -->
|
||||
<l-painter-text :text="honorData.likeCount"
|
||||
css="position: absolute; left: 414.0px; top: 131.4px; font-size: 9px; color: #DAF2FF;transform: translateX(-50%);font-family: WangZheFont2;"></l-painter-text>
|
||||
css="position: absolute; left: 394.0px; top: 131.4px; width: 40px; text-align: center; font-size: 9px; color: #DAF2FF;font-family: WangZheFont2;"></l-painter-text>
|
||||
<!-- 荣誉一 -->
|
||||
<l-painter-text :text="honorData.honor1"
|
||||
css="position: absolute; left: 247.5px; top: 145.6px; font-size: 9px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
<!-- 荣誉二 -->
|
||||
css="position: absolute; left: 207.5px; top: 145.6px; width: 80px; text-align: center; font-size: 9px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 荣誉二(文案较长,需足够宽度避免换行下移) -->
|
||||
<l-painter-text :text="honorData.honor2"
|
||||
css="position: absolute; left: 465.6px; top: 173.6px; font-size: 8px; color: #71B1D3;transform: scale(0.85),translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 300.6px; top: 149px; width: 180px; text-align: center; font-size: 7px; line-height: 1em; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 巅峰万强 -->
|
||||
<l-painter-text v-if="honorData.type == 4" :text="honorData.peakStrong"
|
||||
css="position: absolute; left: 257.3px; top: 192.8px; font-size: 8px; color: #E9F5FB;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 227.3px; top: 192.8px; width: 60px; text-align: center; font-size: 8px; color: #E9F5FB;"></l-painter-text>
|
||||
<!-- 对战场次 -->
|
||||
<l-painter-text :text="honorData.matchCount"
|
||||
css="position: absolute; left: 138.0px; top: 242.3px; font-size: 12px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 113.0px; top: 242.3px; width: 50px; text-align: center; font-size: 12px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 对战被赞 -->
|
||||
<l-painter-text :text="honorData.matchLikeCount"
|
||||
css="position: absolute; left: 199.5px; top: 242.3px; font-size: 12px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 174.5px; top: 242.3px; width: 50px; text-align: center; font-size: 12px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 图鉴等级 -->
|
||||
<l-painter-text :text="honorData.pokedexLevel"
|
||||
css="position: absolute; left: 319.5px; top: 238.8px; font-size:9px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 299.5px; top: 238.8px; width: 40px; text-align: center; font-size:9px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 皮肤数 -->
|
||||
<l-painter-text :text="honorData.skinCount"
|
||||
css="position: absolute; left: 377.3px; top: 238.8px; font-size:9px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 357.3px; top: 238.8px; width: 40px; text-align: center; font-size:9px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 游戏天数 -->
|
||||
<l-painter-text v-if="honorData.type == 1 || honorData.type == 2" :text="honorData.gameDays"
|
||||
css="position: absolute; left: 202.1px; top: 282.2px; font-size:10px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 177.1px; top: 282.2px; width: 50px; text-align: center; font-size:10px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 峡谷对战局数 -->
|
||||
<l-painter-text v-if="honorData.type == 1 || honorData.type == 2"
|
||||
:text="honorData.riftMatchCount"
|
||||
css="position: absolute; left: 322.2px; top: 282.2px; font-size:10px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 297.2px; top: 282.2px; width: 50px; text-align: center; font-size:10px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 大乱斗对战局数 -->
|
||||
<l-painter-text v-if="honorData.type == 1 || honorData.type == 2"
|
||||
:text="honorData.aramMatchCount"
|
||||
css="position: absolute; left: 379.9px; top: 282.2px; font-size:10px; color: #71B1D3;transform: translateX(-50%);"></l-painter-text>
|
||||
css="position: absolute; left: 354.9px; top: 282.2px; width: 50px; text-align: center; font-size:10px; color: #71B1D3;"></l-painter-text>
|
||||
<!-- 亲密度 -->
|
||||
<l-painter-text v-if="honorData.type == 3 || honorData.type == 4" :text="honorData.intimacy"
|
||||
css="position: absolute; left: 348.0px; top: 296.2px; font-size:10px; color: #71B1D3;transform: translateX(-50%);font-family: WangZheFont2;"></l-painter-text>
|
||||
css="position: absolute; left: 323.0px; top: 296.2px; width: 50px; text-align: center; font-size:10px; color: #71B1D3;font-family: WangZheFont2;"></l-painter-text>
|
||||
|
||||
<!-- 水印 -->
|
||||
<l-painter-image v-if="$isVip()" src="/static/image/other/shuiying.png"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_wangzhe')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 主题选择区域 -->
|
||||
<view class="theme-selector">
|
||||
<view class="theme-selector" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<scroll-view scroll-x="true" class="theme-scroll" :show-scrollbar="false">
|
||||
<view class="theme-list">
|
||||
<view class="theme-item" v-for="(item, index) in ['样式一', '样式二', '样式三', '样式四']" :key="index + 1"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="honor-of-kings">
|
||||
<nav-bar title="三角洲结算页" bgColor="#F5F5F5" isRightButton :rightButtonText="rightButtonText"
|
||||
@right-click="onRightClick">
|
||||
|
|
@ -15,98 +15,65 @@
|
|||
<l-painter-image :src="`/static/image/other/game/sanjiaozhou/style-${data.type}.jpg`"
|
||||
css="width: 750.0px; display: block;"></l-painter-image>
|
||||
|
||||
<l-painter-view css="position: absolute; left: 73px; top: 113px; white-space: nowrap;">
|
||||
<!-- 地图 -->
|
||||
<l-painter-image :src="`/static/image/other/game/sanjiaozhou/line.png`"
|
||||
css="display: inline-block; vertical-align: middle; height: 22px; width: 1px;"></l-painter-image>
|
||||
<l-painter-view
|
||||
css="display: inline-block; vertical-align: middle; padding-left: 4px; min-width: 60px;">
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:6px; line-height:6px; margin-bottom: 4px; white-space: nowrap;"
|
||||
:text="data.map.level"></l-painter-text>
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:10px; line-height:10px; white-space: nowrap;"
|
||||
:text="data.map.name"></l-painter-text>
|
||||
</l-painter-view>
|
||||
<!-- 撤离点 -->
|
||||
<l-painter-image :src="`/static/image/other/game/sanjiaozhou/line.png`"
|
||||
css="display: inline-block; vertical-align: middle; height: 22px; width: 1px;margin-left: 2px;"></l-painter-image>
|
||||
<l-painter-view
|
||||
css="display: inline-block; vertical-align: middle; padding-left: 4px; min-width: 60px;">
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:6px; line-height:6px; margin-bottom: 4px; white-space: nowrap;"
|
||||
text="撤离点"></l-painter-text>
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:10px; line-height:10px; white-space: nowrap;"
|
||||
:text="data.extractionPoint"></l-painter-text>
|
||||
</l-painter-view>
|
||||
<!-- 时长 -->
|
||||
<l-painter-image :src="`/static/image/other/game/sanjiaozhou/line.png`"
|
||||
css="display: inline-block; vertical-align: middle; height: 22px; width: 1px;margin-left: 2px;"></l-painter-image>
|
||||
<l-painter-view
|
||||
css="display: inline-block; vertical-align: middle; padding-left: 4px; min-width: 60px;">
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:6px; line-height:6px; margin-bottom: 4px; white-space: nowrap;"
|
||||
text="时长"></l-painter-text>
|
||||
<l-painter-text v-for="(char, idx) in String(data.duration).split('')"
|
||||
:key="'durationNum_' + idx" :css="getTimeCharStyle(char, idx, $system)"
|
||||
:text="getDefeatIconText(char)"></l-painter-text>
|
||||
</l-painter-view>
|
||||
<!-- 对局时间 -->
|
||||
<l-painter-image :src="`/static/image/other/game/sanjiaozhou/line.png`"
|
||||
css="display: inline-block; vertical-align: middle; height: 22px; width: 1px;margin-left: 2px;"></l-painter-image>
|
||||
<l-painter-view
|
||||
css="display: inline-block; vertical-align: middle; padding-left: 4px; min-width: 60px;">
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:6px; line-height:6px; margin-bottom: 4px; white-space: nowrap;"
|
||||
text="对局时间"></l-painter-text>
|
||||
<!-- <l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:10px; line-height:10px; white-space: nowrap;"
|
||||
:text="data.map.name"></l-painter-text> -->
|
||||
<l-painter-text v-for="(char, idx) in String(data.matchTime).split('')"
|
||||
:key="'matchTimeNum_' + idx" :css="getTimeCharStyle(char, idx, $system)"
|
||||
:text="getDefeatIconText(char)"></l-painter-text>
|
||||
</l-painter-view>
|
||||
|
||||
</l-painter-view>
|
||||
<!-- 顶部信息栏:绝对定位,避免鸿蒙 inline-block 竖排 -->
|
||||
<!-- 地图 -->
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/line.png"
|
||||
css="position:absolute;left:73px;top:113px;height:22px;width:1px;"></l-painter-image>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:78px;top:113px;color:#CDCDCD;font-size:6px;line-height:1em;"
|
||||
:text="data.map.level"></l-painter-text>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:78px;top:123px;color:#CDCDCD;font-size:10px;line-height:1em;"
|
||||
:text="data.map.name"></l-painter-text>
|
||||
<!-- 撤离点 -->
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/line.png"
|
||||
css="position:absolute;left:155px;top:113px;height:22px;width:1px;"></l-painter-image>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:160px;top:113px;color:#CDCDCD;font-size:6px;line-height:1em;"
|
||||
text="撤离点"></l-painter-text>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:160px;top:123px;color:#CDCDCD;font-size:10px;line-height:1em;"
|
||||
:text="data.extractionPoint"></l-painter-text>
|
||||
<!-- 时长 -->
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/line.png"
|
||||
css="position:absolute;left:237px;top:113px;height:22px;width:1px;"></l-painter-image>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:242px;top:113px;color:#CDCDCD;font-size:6px;line-height:1em;"
|
||||
text="时长"></l-painter-text>
|
||||
<l-painter-text v-for="(item, idx) in durationChars" :key="'durationNum_' + idx"
|
||||
:css="item.css" :text="item.text"></l-painter-text>
|
||||
<!-- 对局时间 -->
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/line.png"
|
||||
css="position:absolute;left:319px;top:113px;height:22px;width:1px;"></l-painter-image>
|
||||
<l-painter-text
|
||||
css="position:absolute;left:324px;top:113px;color:#CDCDCD;font-size:6px;line-height:1em;"
|
||||
text="对局时间"></l-painter-text>
|
||||
<l-painter-text v-for="(item, idx) in matchTimeChars" :key="'matchTimeNum_' + idx"
|
||||
:css="item.css" :text="item.text"></l-painter-text>
|
||||
|
||||
<!-- 本局收获 -->
|
||||
<l-painter-view
|
||||
css="position: absolute; left: 73px; top: 175px; white-space: nowrap; display: block;">
|
||||
<l-painter-text
|
||||
v-for="(char, idx) in String(data.harvest).replace(/\B(?=(\d{3})+(?!\d))/g, ',').split('')"
|
||||
:key="'harvestNum_' + idx" :css="getHarvestCharStyle(char, idx, $system)"
|
||||
:text="getDefeatIconText(char)"></l-painter-text>
|
||||
</l-painter-view>
|
||||
<l-painter-text v-for="(item, idx) in harvestChars" :key="'harvestNum_' + idx"
|
||||
:css="item.css" :text="item.text"></l-painter-text>
|
||||
|
||||
<!-- 击败干员 -->
|
||||
<l-painter-view
|
||||
css="position: absolute; left: 73px; top: 250px; white-space: nowrap; display: block;">
|
||||
<l-painter-text v-for="(char, idx) in String(data.defeat).split('')"
|
||||
:key="'bigNum_' + idx"
|
||||
:css="`display: inline-block; color:#DBE5E6; font-size:22px; line-height:6px; margin-bottom: 4px; font-family: myIconFont; margin-left: ${idx === 0 ? '0' : '-2px'};`"
|
||||
:text="getDefeatIconText(char)"></l-painter-text>
|
||||
</l-painter-view>
|
||||
<l-painter-text v-for="(item, idx) in defeatChars" :key="'bigNum_' + idx"
|
||||
:css="item.css" :text="item.text"></l-painter-text>
|
||||
|
||||
<!-- 高光击败 -->
|
||||
<l-painter-view v-for="(item, index) in data.defeatInfo" :key="index"
|
||||
:css="`display: inline-block; vertical-align: middle;position: absolute; left: 73px; top: ${295 + index * 16}px; `">
|
||||
<l-painter-view css="display: inline-block;">
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/kill.png"
|
||||
css="width: 12px; height: 12px; display: inline-block;margin-right:2px"></l-painter-image>
|
||||
<l-painter-text
|
||||
css="display: inline-block; color:#DBE5E6; font-size:9px; line-height:6px; margin-bottom: 4px; white-space: nowrap;"
|
||||
:text="`${item.name} [${item.rank}]`"></l-painter-text>
|
||||
</l-painter-view>
|
||||
</l-painter-view>
|
||||
<template v-for="(item, index) in data.defeatInfo" :key="'kill_' + index">
|
||||
<l-painter-image src="/static/image/other/game/sanjiaozhou/kill.png"
|
||||
:css="`position:absolute;left:73px;top:${295 + index * 16}px;width:12px;height:12px;`"></l-painter-image>
|
||||
<l-painter-text
|
||||
:css="`position:absolute;left:87px;top:${297 + index * 16}px;color:#DBE5E6;font-size:9px;line-height:1em;`"
|
||||
:text="`${item.name} [${item.rank}]`"></l-painter-text>
|
||||
</template>
|
||||
|
||||
<!-- 玩家名称 -->
|
||||
<!-- 玩家名称(鸿蒙不支持 rotate,保持位置) -->
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:10px; line-height:10px; white-space: nowrap;transform:rotate(10deg);position:absolute;left:424px;top:310px;"
|
||||
css="color:#CDCDCD;font-size:10px;line-height:1em;position:absolute;left:424px;top:310px;"
|
||||
:text="data.name"></l-painter-text>
|
||||
|
||||
<l-painter-text
|
||||
css="display: block; color:#CDCDCD; font-size:7px; line-height:10px; white-space: nowrap;transform:rotate(10deg);position:absolute;left:422px;top:321px;opacity: 0.6;"
|
||||
css="color:#CDCDCD;font-size:7px;line-height:1em;position:absolute;left:422px;top:321px;opacity:0.6;"
|
||||
text="信守不渝"></l-painter-text>
|
||||
|
||||
<!-- 水印 -->
|
||||
|
|
@ -122,7 +89,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_sanjiaozhou')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -131,7 +98,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 主题选择区域 -->
|
||||
<view class="theme-selector">
|
||||
<view class="theme-selector" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<scroll-view scroll-x="true" class="theme-scroll" :show-scrollbar="false">
|
||||
<view class="theme-list">
|
||||
<view class="theme-item" v-for="(item, index) in ['样式一', '样式二', '样式三', '样式四']" :key="index + 1"
|
||||
|
|
@ -236,7 +203,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||
import { ref, reactive, computed, onMounted, getCurrentInstance } from 'vue'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
const rightButtonText = ref("编辑");
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
|
@ -283,36 +250,55 @@ const getDefeatIconText = (defeatStr) => {
|
|||
return String(defeatStr).split('').map(char => digitIconMap[char] || char).join('');
|
||||
};
|
||||
|
||||
const getTimeCharStyle = (char, idx, system) => {
|
||||
const fontSize = char === '-' ? 12 : (char === ':' ? 4 : 10);
|
||||
let marginLeft = '-2px';
|
||||
if (idx === 0 || system === 'iOS') {
|
||||
marginLeft = char === '-' ? '2px' : '0px';
|
||||
}
|
||||
let marginRight = '0';
|
||||
if ([' ', '-', ':'].includes(char)) {
|
||||
if (char === '-' && system === 'Android') {
|
||||
marginLeft = '0px'
|
||||
/** 时长/对局时间:按步进绝对定位(鸿蒙 inline-block 不横排) */
|
||||
function layoutTimeChars(str, startLeft, startTop) {
|
||||
let x = startLeft
|
||||
return String(str || '').split('').map((char) => {
|
||||
const fontSize = char === '-' ? 12 : (char === ':' ? 4 : 10)
|
||||
const step = char === ':' ? 4 : (char === '-' ? 10 : (char === ' ' ? 6 : 8))
|
||||
const left = x
|
||||
x += step
|
||||
return {
|
||||
text: getDefeatIconText(char),
|
||||
css: `position:absolute;left:${left}px;top:${startTop}px;color:#CDCDCD;font-size:${fontSize}px;line-height:1em;font-family:myIconFont;`
|
||||
}
|
||||
if (char === ':' && system === 'Android') {
|
||||
marginRight = '-1px';
|
||||
marginLeft = '-1px'
|
||||
} else if (char === ' ' && system === 'Android') {
|
||||
marginRight = '2px';
|
||||
} else {
|
||||
marginRight = '1rpx';
|
||||
}
|
||||
}
|
||||
return `display: inline-block; vertical-align: bottom; color:#CDCDCD; font-size:${fontSize}px; line-height:6px; margin-bottom: 4px; font-family:myIconFont; margin-left: ${marginLeft}; margin-right: ${marginRight};`;
|
||||
};
|
||||
})
|
||||
}
|
||||
|
||||
const getHarvestCharStyle = (char, idx, system) => {
|
||||
const fontSize = char === ',' ? 6 : 22;
|
||||
let marginLeft = idx === 0 ? '0' : (char === ',' ? (system === 'iOS' ? '3px' : '1px') : (system === 'iOS' ? '2px' : '-3px'));
|
||||
let marginRight = char === ',' && system === 'Android' ? '2px' : '0';
|
||||
let marginTop = char === ',' ? '3px' : '0';
|
||||
return `display: inline-block; vertical-align: bottom; color:#DBE5E6; font-size:${fontSize}px; margin-bottom: 4px; font-family: myIconFont; margin-left: ${marginLeft}; margin-right: ${marginRight}; margin-top: ${marginTop};`;
|
||||
};
|
||||
/** 本局收获数字 */
|
||||
function layoutHarvestChars(str, startLeft, startTop) {
|
||||
const formatted = String(str || '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
let x = startLeft
|
||||
return formatted.split('').map((char) => {
|
||||
const fontSize = char === ',' ? 6 : 22
|
||||
const step = char === ',' ? 8 : 19
|
||||
const top = char === ',' ? startTop + 3 : startTop
|
||||
const left = x
|
||||
x += step
|
||||
return {
|
||||
text: getDefeatIconText(char),
|
||||
css: `position:absolute;left:${left}px;top:${top}px;color:#DBE5E6;font-size:${fontSize}px;line-height:1em;font-family:myIconFont;`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 击败干员数字 */
|
||||
function layoutDefeatChars(str, startLeft, startTop) {
|
||||
let x = startLeft
|
||||
return String(str || '').split('').map((char) => {
|
||||
const left = x
|
||||
x += 20
|
||||
return {
|
||||
text: getDefeatIconText(char),
|
||||
css: `position:absolute;left:${left}px;top:${startTop}px;color:#DBE5E6;font-size:22px;line-height:1em;font-family:myIconFont;`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const durationChars = computed(() => layoutTimeChars(data.duration, 242, 123))
|
||||
const matchTimeChars = computed(() => layoutTimeChars(data.matchTime, 324, 123))
|
||||
const harvestChars = computed(() => layoutHarvestChars(data.harvest, 73, 182))
|
||||
const defeatChars = computed(() => layoutDefeatChars(data.defeat, 73, 250))
|
||||
|
||||
onLoad(() => {
|
||||
const cachedData = uni.getStorageSync('sanjiaozhouData');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="honor-of-kings">
|
||||
<nav-bar title="无畏契约" bgColor="#F5F5F5" isRightButton :rightButtonText="rightButtonText"
|
||||
@right-click="onRightClick">
|
||||
|
|
@ -16,23 +16,27 @@
|
|||
|
||||
<!-- 人物图片 -->
|
||||
<l-painter-image :src="wuweiData.imgUrl" :css="characterStyle"></l-painter-image>
|
||||
<!-- 击败 -->
|
||||
<l-painter-text :text="wuweiData.killCount" :css="killCountStyle"></l-painter-text>
|
||||
<template v-if="wuweiData.type == 1">
|
||||
<!-- 击败 -->
|
||||
<l-painter-text :text="wuweiData.killCount"
|
||||
:css="`${style1TextCommonStyle}; left:61px;`"></l-painter-text>
|
||||
<!-- 精准射击 -->
|
||||
<l-painter-text :text="wuweiData.shooting"
|
||||
:css="`${style1TextCommonStyle}; left:151px;`"></l-painter-text>
|
||||
:css="`${style1TextCommonStyle}; left:131px;`"></l-painter-text>
|
||||
<!-- 输出伤害 -->
|
||||
<l-painter-text :text="wuweiData.output"
|
||||
:css="`${style1TextCommonStyle}; left:221px;`"></l-painter-text>
|
||||
:css="`${style1TextCommonStyle}; left:201px;`"></l-painter-text>
|
||||
<!-- 获得资金 -->
|
||||
<l-painter-text :text="wuweiData.harvest"
|
||||
:css="`${style1TextCommonStyle}; left:292px;`"></l-painter-text>
|
||||
:css="`${style1TextCommonStyle}; left:272px;`"></l-painter-text>
|
||||
<!-- 三连击败 -->
|
||||
<l-painter-text :text="wuweiData.threeKill"
|
||||
:css="`${style1TextCommonStyle}; left:362px;`"></l-painter-text>
|
||||
:css="`${style1TextCommonStyle}; left:342px;`"></l-painter-text>
|
||||
</template>
|
||||
<template v-if="wuweiData.type == 2">
|
||||
<!-- 击败 -->
|
||||
<l-painter-text :text="wuweiData.killCount"
|
||||
css="position: absolute; left: 70px; bottom: 122px; width:40px; text-align:center; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;"></l-painter-text>
|
||||
<!-- 头像 -->
|
||||
<l-painter-image :src="wuweiData.avatar"
|
||||
css="position:absolute;left:65.5px;bottom:68.5px;width:42px;height:42px"></l-painter-image>
|
||||
|
|
@ -41,13 +45,13 @@
|
|||
css="position: absolute; left: 119px; bottom: 82px; font-size: 13px; font-family: Arial, sans-serif; color: #FFFFFF; width: 117px;"></l-painter-text>
|
||||
<!-- 阵败 -->
|
||||
<l-painter-text :text="wuweiData.defeatsCount"
|
||||
css="position: absolute; left: 152.5px; bottom: 122px; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;transform: translateX(-50%)"></l-painter-text>
|
||||
css="position: absolute; left: 132.5px; bottom: 122px; width: 40px; text-align: center; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;"></l-painter-text>
|
||||
<!-- 助攻 -->
|
||||
<l-painter-text :text="wuweiData.assistCount"
|
||||
css="position: absolute; left: 215px; bottom: 122px; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;transform: translateX(-50%)"></l-painter-text>
|
||||
css="position: absolute; left: 195px; bottom: 122px; width: 40px; text-align: center; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;"></l-painter-text>
|
||||
<!-- 战斗分 -->
|
||||
<l-painter-text :text="`平均战斗评分:${wuweiData.battlePoints}`"
|
||||
css="position: absolute; left: 150px; bottom: 153px; font-size:10px;color: #FFFFFF;line-height: 10px;transform: translateX(-50%)"></l-painter-text>
|
||||
css="position: absolute; left: 80px; bottom: 153px; width: 140px; text-align: center; font-size:10px;color: #FFFFFF;line-height: 10px;"></l-painter-text>
|
||||
</template>
|
||||
<!-- 水印 -->
|
||||
<l-painter-image v-if="$isVip()" src="/static/image/other/shuiying.png"
|
||||
|
|
@ -62,7 +66,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_game_wuweiqiyue')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -71,7 +75,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 主题选择区域 -->
|
||||
<view class="theme-selector">
|
||||
<view class="theme-selector" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<scroll-view scroll-x="true" class="theme-scroll" :show-scrollbar="false">
|
||||
<view class="theme-list">
|
||||
<view class="theme-item" v-for="(item, index) in ['样式一', '样式二']" :key="index + 1"
|
||||
|
|
@ -203,15 +207,7 @@ const characterStyle = computed(() => {
|
|||
}
|
||||
});
|
||||
|
||||
const killCountStyle = computed(() => {
|
||||
if (wuweiData.type == 1) {
|
||||
return `position: absolute; left: 81px; bottom:79px; font-size: 16px;color: #FFFFFF;line-height: 16px;transform: translateX(-50%)`;
|
||||
} else {
|
||||
return `position: absolute; left: 90px; bottom: 122px; font-size: 18px;font-weight: 700;color: #FFFFFF;line-height: 18px;transform: translateX(-50%)`;
|
||||
}
|
||||
});
|
||||
|
||||
const style1TextCommonStyle = `position: absolute; bottom:79px; font-size: 16px;color: #FFFFFF;line-height: 16px;transform: translateX(-50%)`;
|
||||
const style1TextCommonStyle = `position: absolute; bottom:79px; width:40px; text-align:center; font-size: 16px;color: #FFFFFF;line-height: 16px;`;
|
||||
|
||||
|
||||
// 手动处理中英文混合宽度的截断,避免依赖 line-clamp 和底层画布可能引发的居中对齐问题
|
||||
|
|
@ -450,6 +446,7 @@ const handleSave = () => {
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
|
|
@ -462,7 +459,10 @@ function convertLocalImageToFile(localPath) {
|
|||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
|
|
@ -107,7 +108,10 @@
|
|||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="ranking-page">
|
||||
<nav-bar title="从夯到拉" bgColor="#F5F5F5" isRightButton :rightButtonText="rightButtonText"
|
||||
@right-click="onRightClick">
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
</image>
|
||||
|
||||
<view class="ranking-table">
|
||||
<view v-for="(item, index) in tierList" :key="index" class="ranking-row">
|
||||
<view v-for="(item, index) in tierList" :key="index" class="ranking-row">
|
||||
<view class="label-box" :style="{ backgroundColor: item.bgColor }"
|
||||
@click="changeRowBgColor(index)">
|
||||
<!-- <text class="label-text" :class="{ 'with-stroke': item.hasStroke }"
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-tabs">
|
||||
<view class="bottom-tabs" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="tab-item" :class="{ active: type == 'base' }" @click="switchType('base')">基础</view>
|
||||
<view class="tab-item" :class="{ active: type == 'skin' }" @click="switchType('skin')">皮肤</view>
|
||||
</view>
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_ranking')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
<script setup>
|
||||
import { reactive, ref, onMounted, computed } from 'vue';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const CACHE_KEY = 'score_center_info';
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ function back(){
|
|||
<view v-if="$isVip()" >
|
||||
<watermark dark="light" source="uni_alipay_other_score" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_score')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -135,6 +136,8 @@ function back(){
|
|||
<view class="home_indicator"></view>
|
||||
</view>
|
||||
|
||||
<safeBottom bgColor="#f4f7fb" />
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
<script setup>
|
||||
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
|
|
@ -126,7 +127,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_score" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_score')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -199,6 +200,8 @@
|
|||
|
||||
</view>
|
||||
|
||||
<safeBottom bgColor="#efefef" />
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<script setup>
|
||||
<script setup>
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
import wmWatermark from "@/components/wm-watermark/wm-watermark.vue"
|
||||
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
|
|
@ -129,7 +130,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
<view v-if="$isVip()" >
|
||||
<watermark dark="light" source="uni_alipay_other_score" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_score')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -267,6 +268,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<safeBottom bgColor="#F3F8FB" />
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
<script setup>
|
||||
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
physics: '66',
|
||||
chemistry: '85',
|
||||
geography: '86',
|
||||
time:'2025-6-25'
|
||||
time: '2025-6-25'
|
||||
}
|
||||
});
|
||||
const total = computed(() => {
|
||||
|
|
@ -103,35 +104,39 @@
|
|||
const clearAvatar = () => {
|
||||
editDialog.data.avatar = '';
|
||||
};
|
||||
function back(){
|
||||
|
||||
function back() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
function onChangeStartDate(e){
|
||||
editDialog.data.time=e
|
||||
|
||||
function onChangeStartDate(e) {
|
||||
editDialog.data.time = e
|
||||
console.log(e)
|
||||
}
|
||||
function getTime(times,status){
|
||||
let list=times.split('-')
|
||||
if(status){
|
||||
return list[0]+'年'
|
||||
}else{
|
||||
return list[0]+'年'+list[1]+'月'
|
||||
|
||||
function getTime(times, status) {
|
||||
let list = times.split('-')
|
||||
if (status) {
|
||||
return list[0] + '年'
|
||||
} else {
|
||||
return list[0] + '年' + list[1] + '月'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="div">
|
||||
<view v-if="$isVip()" >
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_score" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_score')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;"></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="group_1" :style="{'padding-top':$systemInfo.statusBarHeight*2+'rpx'}">
|
||||
<view class="rectangle_273">
|
||||
<image @click="back()" class="group_14010" src="/static/image/other/score/chongqing/close.png" />
|
||||
<view class="flexcontainer"><text class="text_1"> 成绩查询-河北省普通高校招生考试 </text><text class="text_2"> xxcx.hebeea.edu.cn
|
||||
<view class="flexcontainer"><text class="text_1"> 成绩查询-河北省普通高校招生考试 </text><text class="text_2">
|
||||
xxcx.hebeea.edu.cn
|
||||
</text></view>
|
||||
<image class="group_14011" src="/static/image/other/score/chongqing/more.png" />
|
||||
</view>
|
||||
|
|
@ -143,20 +148,22 @@
|
|||
<image src="/static/image/other/score/hebei/heibeiheaderBg.png" mode="widthFix" style="width: 100%;"></image>
|
||||
<view class="group_48368">
|
||||
<view class="rectangle_23396">
|
||||
<view class="flexcontainer"><text class="text_1"> {{ getTime(data.form.time,1) }}河北省普通高校招生考试<br>成绩查询 </text></view>
|
||||
<view class="flexcontainer"><text class="text_1"> {{ getTime(data.form.time,1) }}河北省普通高校招生考试<br>成绩查询 </text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/image/other/score/hebei/Watermark.png" mode="widthFix" class="watermark"></image>
|
||||
<view class="rectangle_23397" @click="openEditDialog">
|
||||
<view class="table2">
|
||||
<view class="flexcontainer_1">
|
||||
<view class="group_48370">
|
||||
<view class="text_2"> <text style="margin-right: 20rpx;margin-left:10rpx;"> 姓</text>名:{{data.form.name}} </view>
|
||||
<view class="text_2"> <text style="margin-right: 20rpx;margin-left:10rpx;"> 姓</text>名:{{data.form.name}}
|
||||
</view>
|
||||
<text class="text_3"> 考生号:{{data.form.examNumber}} </text>
|
||||
<text class="text_4"> 证件号:{{data.form.idNumber}} </text>
|
||||
</view>
|
||||
<view class="group_48369">
|
||||
<view class="rectangle_23389">
|
||||
<image :src="data.form.avatar||'/static/image/other/score/qrcode.png'" mode="aspectFill" />
|
||||
<image :src="data.form.avatar||'/static/image/other/score/qrcode.png'" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -208,7 +215,7 @@
|
|||
<view class="group_48383">
|
||||
<view class="flexcontainer_5">
|
||||
<text class="text_25"> 版权所有 </text>
|
||||
<image class="div_241" src="/static/image/other/score/hebei/Copyright.png" ></image>
|
||||
<image class="div_241" src="/static/image/other/score/hebei/Copyright.png"></image>
|
||||
<text class="text_26"> 河北省教育考试院 </text>
|
||||
</view>
|
||||
<text class="text_27"> 未经我单位书面许可不得链接此查询系统 </text>
|
||||
|
|
@ -216,6 +223,8 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<safeBottom bgColor="#ffffff" />
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<view v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
|
|
@ -276,7 +285,7 @@
|
|||
<view class="formItem">
|
||||
<text>时间</text>
|
||||
<view style="width:100%;">
|
||||
<DateTimePicker :defaultDate="editDialog.data.time" :mode="1" @onChange="onChangeStartDate" />
|
||||
<DateTimePicker :defaultDate="editDialog.data.time" :mode="1" @onChange="onChangeStartDate" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -531,20 +540,17 @@
|
|||
z-index: 0;
|
||||
margin-left: 16rpx;
|
||||
margin-top: 12rpx;
|
||||
/* 右侧渐隐 */
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to right,
|
||||
#000 0%,
|
||||
#000 80%,
|
||||
transparent 100%
|
||||
);
|
||||
/* 右侧渐隐 */
|
||||
-webkit-mask-image: linear-gradient(to right,
|
||||
#000 0%,
|
||||
#000 80%,
|
||||
transparent 100%);
|
||||
|
||||
mask-image: linear-gradient(to right,
|
||||
#000 0%,
|
||||
#000 80%,
|
||||
transparent 100%);
|
||||
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
#000 0%,
|
||||
#000 80%,
|
||||
transparent 100%
|
||||
);
|
||||
.text_1 {
|
||||
position: relative;
|
||||
font-size: 36rpx;
|
||||
|
|
@ -596,7 +602,8 @@
|
|||
align-items: flex-start;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
.watermark{
|
||||
|
||||
.watermark {
|
||||
position: absolute;
|
||||
width: 650rpx;
|
||||
left: 50rpx;
|
||||
|
|
@ -604,6 +611,7 @@
|
|||
z-index: 999;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 矩形 23396 */
|
||||
.rectangle_23396 {
|
||||
position: relative;
|
||||
|
|
@ -661,6 +669,7 @@
|
|||
z-index: 0;
|
||||
margin-top: 40rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
.group_48369 {
|
||||
position: relative;
|
||||
width: 188rpx;
|
||||
|
|
@ -669,6 +678,7 @@
|
|||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
z-index: 0;
|
||||
|
||||
.rectangle_23389 {
|
||||
width: 188rpx;
|
||||
height: 188rpx;
|
||||
|
|
@ -678,6 +688,7 @@
|
|||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
@ -1379,7 +1390,7 @@
|
|||
|
||||
margin-top: 40rpx;
|
||||
border: 1px solid #DBDBDB;
|
||||
padding-bottom: 1px;
|
||||
padding-bottom: 1px;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
prefix: '.uni.other.',
|
||||
value:'高考查询'
|
||||
})
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
// 保存定时器引用,以便在页面卸载时清理
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
||||
:bgColor="data.navbar.bgColor" :isBack="true" />
|
||||
<view class="footer-box">
|
||||
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||
<view class="btn" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||
@click="setType(index)">
|
||||
{{item}}
|
||||
</view>
|
||||
|
|
@ -17,88 +17,92 @@
|
|||
</view>
|
||||
<image :src="data.code" mode="widthFix" style="width:calc( 100vw - 24px);margin:0 12px;" @click="previewImage">
|
||||
</image>
|
||||
<view class="button-container">
|
||||
<view class="button-container" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<button class="btn-save-image" @click="saveImage">保存图片</button>
|
||||
</view>
|
||||
<view style="width: 0px;height: 0;overflow: hidden;" v-if="data.shuaxing">
|
||||
<view style="width: 0px;height: 0;overflow: hidden;" v-if="data.shuaxing && currentBgImg">
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
||||
v-if="data.type == 0">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:460px;background-image: url('${data.bgImg1}');position: relative;`">
|
||||
<l-painter-view css="width:351px;height:460px;position: relative;">
|
||||
<l-painter-image :src="data.bgImg1" css="width:351px;height:460px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 落款日期 -->
|
||||
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
||||
<l-painter-view css="position: absolute;left:82px;bottom:100px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.dateText)" />
|
||||
</l-painter-view>
|
||||
<!-- 敬赠落款 -->
|
||||
<l-painter-view :css="`position: absolute;left:100px;bottom:94px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.donorLine" />
|
||||
<l-painter-view css="position: absolute;left:100px;bottom:100px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.donorLine)" />
|
||||
</l-painter-view>
|
||||
<!-- 受赠对象 -->
|
||||
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.recipientLine" />
|
||||
<!-- 受赠对象(画布宽351,原 right:72 → left:267,避免鸿蒙 right 定位失效) -->
|
||||
<l-painter-view css="position: absolute;top:80px;left:267px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.recipientLine)" />
|
||||
</l-painter-view>
|
||||
<!-- 中心大字 -->
|
||||
<l-painter-view :css="`position: absolute;top:86px;left:171px;`">
|
||||
<!-- 中心大字装饰(原 right 均改为 left,字宽按 20px) -->
|
||||
<l-painter-view css="position: absolute;top:80px;left:168px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:112px;left:124px;`">
|
||||
<l-painter-view css="position: absolute;top:108px;left:120px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:112px;right:116px;`">
|
||||
<l-painter-view css="position: absolute;top:108px;left:219px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:155px;left:107px;`">
|
||||
<l-painter-view css="position: absolute;top:150px;left:102px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:155px;right:101px;`">
|
||||
<l-painter-view css="position: absolute;top:150px;left:235px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:198px;left:141px;`">
|
||||
<l-painter-view css="position: absolute;top:192px;left:136px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:198px;right:126px;`">
|
||||
<l-painter-view css="position: absolute;top:192px;left:211px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:112px;left:158px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss2+'width:50px;text-align: center;'" :text="data.banner.centerChar" />
|
||||
<!-- 中心主字 -->
|
||||
<l-painter-view css="position: absolute;top:105px;left:135px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss2" :text="data.banner.centerChar" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;bottom:165px;left:10px;`">
|
||||
<!-- 上句赞语 -->
|
||||
<l-painter-view css="position: absolute;bottom:160px;left:0;">
|
||||
<l-painter-text :css="data.textFont+data.textCss3" :text="data.banner.phraseTop" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;bottom:118px;left:10px;`">
|
||||
<!-- 下句赞语 -->
|
||||
<l-painter-view css="position: absolute;bottom:118px;left:0;">
|
||||
<l-painter-text :css="data.textFont+data.textCss3" :text="data.banner.phraseBottom" />
|
||||
</l-painter-view>
|
||||
|
||||
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
||||
<l-painter-view v-if="$isVip()" css="position: absolute;left:127px;bottom:132px;">
|
||||
<l-painter-image src="/static/image/other/card/shuiyin2.png" css="width: 97px;height: 28px;" />
|
||||
</l-painter-view>
|
||||
</l-painter-view>
|
||||
</l-painter>
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
||||
v-else-if="data.type == 1">
|
||||
<l-painter-view
|
||||
:css="`width:351px;height:460px;background-image: url('${data.bgImg2}');position: relative;`">
|
||||
<l-painter-view css="width:351px;height:460px;position: relative;">
|
||||
<l-painter-image :src="data.bgImg2" css="width:351px;height:460px;position:absolute;left:0;top:0;object-fit:fill;" />
|
||||
<!-- 落款日期 -->
|
||||
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
||||
<l-painter-view css="position: absolute;left:82px;bottom:100px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.dateText)" />
|
||||
</l-painter-view>
|
||||
<!-- 敬赠落款 -->
|
||||
<l-painter-view :css="`position: absolute;left:100px;bottom:94px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.donorLine" />
|
||||
<l-painter-view css="position: absolute;left:100px;bottom:100px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.donorLine)" />
|
||||
</l-painter-view>
|
||||
<!-- 受赠对象 -->
|
||||
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.recipientLine" />
|
||||
<l-painter-view css="position: absolute;top:80px;left:267px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss" :text="toVerticalText(data.banner.recipientLine)" />
|
||||
</l-painter-view>
|
||||
<!-- 上句赞语(右列) -->
|
||||
<l-painter-view css="position: absolute;top:95px;left:188px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss4" :text="toVerticalText(data.banner.phraseTop)" />
|
||||
</l-painter-view>
|
||||
<!-- 下句赞语(左列) -->
|
||||
<l-painter-view css="position: absolute;top:95px;left:118px;">
|
||||
<l-painter-text :css="data.textFont+data.textCss4" :text="toVerticalText(data.banner.phraseBottom)" />
|
||||
</l-painter-view>
|
||||
|
||||
<l-painter-view :css="`position: absolute;top:102px;right:131px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss4" :text="data.banner.phraseTop" />
|
||||
</l-painter-view>
|
||||
<l-painter-view :css="`position: absolute;top:102px;left:142px;`">
|
||||
<l-painter-text :css="data.textFont+data.textCss4" :text="data.banner.phraseBottom" />
|
||||
</l-painter-view>
|
||||
|
||||
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
||||
<l-painter-view v-if="$isVip()" css="position: absolute;left:127px;bottom:132px;">
|
||||
<l-painter-image src="/static/image/other/card/shuiyin2.png" css="width: 97px;height: 28px;" />
|
||||
</l-painter-view>
|
||||
</l-painter-view>
|
||||
|
|
@ -147,7 +151,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_silkBanner')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -156,7 +160,7 @@
|
|||
<script setup>
|
||||
// 自定义头部
|
||||
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
|
||||
import {
|
||||
ref,
|
||||
|
|
@ -204,6 +208,28 @@ import { imgLocal } from '@/utils/common.js';
|
|||
return Object.assign(defaultBanner(type), raw && typeof raw === 'object' ? raw : {})
|
||||
}
|
||||
|
||||
/** 竖排:用换行代替窄 width 自动折行(鸿蒙 canvas measureText 下窄宽不换行) */
|
||||
function toVerticalText(text) {
|
||||
return String(text ?? '').split('').join('\n')
|
||||
}
|
||||
|
||||
async function loadBannerBg(path, fallback) {
|
||||
try {
|
||||
const localPath = await imgLocal.getLocalImage(path)
|
||||
return localPath || fallback
|
||||
} catch (e) {
|
||||
console.error('背景图加载失败,使用本地兜底', path, e)
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
|
||||
function refreshPainter() {
|
||||
data.shuaxing = false
|
||||
setTimeout(() => {
|
||||
data.shuaxing = true
|
||||
}, 80)
|
||||
}
|
||||
|
||||
const data = reactive({
|
||||
isShow:false,
|
||||
type: 0,
|
||||
|
|
@ -218,25 +244,26 @@ import { imgLocal } from '@/utils/common.js';
|
|||
width: 800,
|
||||
height: 600,
|
||||
code: '',
|
||||
textCss: 'text-align: center;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;width:10px;color:#FFDD6D;font-size:10px; mix-blend-mode: overlay;',
|
||||
|
||||
textCss1: 'font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:20px; mix-blend-mode: overlay;',
|
||||
textCss2: 'font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:80px; mix-blend-mode: overlay;',
|
||||
textCss3: 'text-align: center;width:351px;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:30px; mix-blend-mode: overlay;',
|
||||
textCss4: 'text-align: center;width:20px;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:40px; mix-blend-mode: overlay;',
|
||||
textCss: 'text-align:center;font-weight:400;width:12px;color:#FFDD6D;font-size:12px;line-height:1.15em;',
|
||||
textCss1: 'text-align:center;font-weight:400;width:20px;color:#FFDD6D;font-size:20px;line-height:1em;',
|
||||
textCss2: 'text-align:center;font-weight:400;width:82px;color:#FFDD6D;font-size:78px;line-height:1em;',
|
||||
textCss3: 'text-align:center;width:351px;font-weight:400;letter-spacing:16px;color:#FFDD6D;font-size:28px;line-height:1em;',
|
||||
textCss4: 'text-align:center;width:44px;font-weight:400;color:#FFDD6D;font-size:40px;line-height:1.15em;',
|
||||
textFont: 'font-family:"certificate2";',
|
||||
typeList: ['样式1', '样式2']
|
||||
})
|
||||
|
||||
const currentBgImg = computed(() => data.type === 0 ? data.bgImg1 : data.bgImg2)
|
||||
|
||||
// 弹窗相关
|
||||
const showEditPopup = ref(false);
|
||||
const editForm = ref({});
|
||||
onLoad(async(option) => {
|
||||
data.bgImg1= await imgLocal.getLocalImage('other/silkBanner/banner1.png');
|
||||
data.bgImg2= await imgLocal.getLocalImage('other/silkBanner/banner2.png');
|
||||
uni.showLoading({
|
||||
title: "生成中"
|
||||
})
|
||||
data.bgImg1 = await loadBannerBg('other/silkBanner/banner1.png', '/static/image/other/silkBanner/banner1.png')
|
||||
data.bgImg2 = await loadBannerBg('other/silkBanner/banner2.png', '/static/image/other/silkBanner/banner2.png')
|
||||
// 进入锦旗页面埋点
|
||||
proxy.$apiUserEvent('all', {
|
||||
type: 'event',
|
||||
|
|
@ -247,10 +274,20 @@ import { imgLocal } from '@/utils/common.js';
|
|||
data.banner = mergeBanner(uni.getStorageSync("silkBanner" + data.type), data.type)
|
||||
const config = uni.getStorageSync('config')
|
||||
console.log("---config---", config);
|
||||
const font = config.config['client.uniapp.font']
|
||||
const font = config?.config?.['client.uniapp.font']
|
||||
|
||||
const startPaint = () => {
|
||||
data.isShow = true
|
||||
data.shuaxing = true
|
||||
}
|
||||
|
||||
if (!font?.certificate2) {
|
||||
console.warn('字体配置缺失,直接生成锦旗')
|
||||
startPaint()
|
||||
return
|
||||
}
|
||||
|
||||
console.log("字体地址信息", font.certificate2);
|
||||
// Font loading logic
|
||||
const fontUrl = font.certificate2;
|
||||
const fontName = 'certificate2';
|
||||
|
||||
|
|
@ -259,26 +296,22 @@ import { imgLocal } from '@/utils/common.js';
|
|||
family: fontName,
|
||||
source: `url("${path}")`,
|
||||
success() {
|
||||
data.isShow=true
|
||||
data.shuaxing=true
|
||||
startPaint()
|
||||
console.log('字体加载成功');
|
||||
},
|
||||
fail(err) {
|
||||
data.isShow=true
|
||||
data.shuaxing=true
|
||||
startPaint()
|
||||
console.error('字体加载失败', err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// #ifdef H5
|
||||
// H5 环境直接从 URL 加载字体
|
||||
loadFont(fontUrl);
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
// 非 H5 环境使用下载和保存逻辑
|
||||
const savedFontPath = uni.getStorageSync(' ');
|
||||
const savedFontPath = uni.getStorageSync('certificate2_font_path');
|
||||
if (savedFontPath) {
|
||||
loadFont(savedFontPath);
|
||||
} else {
|
||||
|
|
@ -296,14 +329,16 @@ import { imgLocal } from '@/utils/common.js';
|
|||
},
|
||||
fail: (err) => {
|
||||
console.error('保存文件失败', err);
|
||||
// Fallback: 尝试加载临时路径
|
||||
loadFont(res.tempFilePath);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
startPaint()
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('下载字体失败', err);
|
||||
startPaint()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -322,11 +357,14 @@ import { imgLocal } from '@/utils/common.js';
|
|||
|
||||
})
|
||||
function setType(index) {
|
||||
if (data.type === index) return
|
||||
uni.showLoading({
|
||||
title: "生成中"
|
||||
})
|
||||
data.type = index
|
||||
data.banner = mergeBanner(uni.getStorageSync("silkBanner" + data.type), data.type)
|
||||
data.code = ''
|
||||
refreshPainter()
|
||||
}
|
||||
|
||||
function successImage(e) {
|
||||
|
|
@ -354,11 +392,9 @@ import { imgLocal } from '@/utils/common.js';
|
|||
uni.showLoading({
|
||||
title: "生成中"
|
||||
})
|
||||
data.shuaxing = false
|
||||
data.banner = mergeBanner(editForm.value, data.type)
|
||||
setTimeout(() => {
|
||||
data.shuaxing = true
|
||||
}, 100)
|
||||
data.code = ''
|
||||
refreshPainter()
|
||||
uni.setStorageSync("silkBanner" + data.type, data.banner)
|
||||
// 关闭弹窗
|
||||
showEditPopup.value = false;
|
||||
|
|
@ -376,19 +412,21 @@ import { imgLocal } from '@/utils/common.js';
|
|||
*/
|
||||
function convertLocalImageToFile(localPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 1. 读取本地图片为 Base64(避免 Image 对象直接加载本地路径的兼容问题)
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.io.resolveLocalFileSystemURL(localPath, (entry) => {
|
||||
entry.file((file) => {
|
||||
const reader = new plus.io.FileReader();
|
||||
reader.onload = (e) => {
|
||||
const base64Data = e.target.result; // 格式如 data:image/jpeg;base64,/9j/...
|
||||
resolve(e.target.result)
|
||||
};
|
||||
reader.onerror = (err) => reject(err);
|
||||
reader.readAsDataURL(file); // 读取为 DataURL
|
||||
reader.readAsDataURL(file);
|
||||
}, reject);
|
||||
}, reject);
|
||||
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
reject(new Error('plus.io not supported'))
|
||||
// #endif
|
||||
});
|
||||
}
|
||||
// 预览图片
|
||||
|
|
@ -765,7 +803,13 @@ import { imgLocal } from '@/utils/common.js';
|
|||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 30rpx 0;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 86px;
|
||||
width: 100vw;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.btn-save-image {
|
||||
|
|
@ -790,6 +834,9 @@ import { imgLocal } from '@/utils/common.js';
|
|||
transform: translateY(0);
|
||||
box-shadow: 0 2rpx 6rpx rgba(7, 140, 193, 0.3);
|
||||
}
|
||||
.container {
|
||||
padding-bottom: 220rpx;
|
||||
}
|
||||
.footer-box {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
|
@ -799,6 +846,7 @@ import { imgLocal } from '@/utils/common.js';
|
|||
justify-content: center;
|
||||
padding-bottom: constant(safe-area-inset-bottom); // 兼容 IOS<11.2
|
||||
padding-bottom: env(safe-area-inset-bottom); // 兼容 IOS>11.2
|
||||
z-index: 10;
|
||||
.btn {
|
||||
font-size: 18px;
|
||||
color: #767676;
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
:bgColor="data.navbar.bgColor" :isBack="true" />
|
||||
<image :src="data.code" mode="widthFix" style="width: 100vw;" @click="previewImage"></image>
|
||||
<view class="footer-box">
|
||||
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||
<view class="btn" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||
@click="setType(index)">
|
||||
样式{{index+1}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-container">
|
||||
<view class="button-container" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<button class="btn-save-image" @click="saveImage">保存图片</button>
|
||||
</view>
|
||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" hidden
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_gongzhitiao')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_tickets_12306" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_tickets_12306')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -144,8 +144,7 @@
|
|||
<!-- 分享区 -->
|
||||
<view class="share-section">
|
||||
<text class="share-tips">美好旅途,快与朋友一起分享吧~</text>
|
||||
<image style="width: 158rpx;height: 50rpx;"
|
||||
src="/static/image/other/train-tickets/12306-tickets/share.png">
|
||||
<image style="width: 158rpx;height: 50rpx;" src="/static/image/other/train-tickets/12306-tickets/share.png">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
|
|
@ -157,11 +156,9 @@
|
|||
|
||||
<!-- 广告Banner -->
|
||||
<view class="ad-banner">
|
||||
<image class="bg-image" src="/static/image/other/train-tickets/12306-tickets/hotel-bg.png"
|
||||
mode="widthFix">
|
||||
<image class="bg-image" src="/static/image/other/train-tickets/12306-tickets/hotel-bg.png" mode="widthFix">
|
||||
</image>
|
||||
<image class="bg-image" style="opacity: 0;position: relative;"
|
||||
src="/static/image/other/train-tickets/12306-tickets/hotel-bg.png" mode="widthFix">
|
||||
<image class="bg-image" style="opacity: 0;position: relative;" src="/static/image/other/train-tickets/12306-tickets/hotel-bg.png" mode="widthFix">
|
||||
</image>
|
||||
<view class="hotel-ad">
|
||||
<view class="hotel-search-row">
|
||||
|
|
@ -190,6 +187,7 @@
|
|||
src="/static/image/other/train-tickets/12306-tickets/bottom-bg.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#fff"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
@ -197,6 +195,8 @@
|
|||
|
||||
<script setup>
|
||||
import NavBar from '@/components/nav-bar/nav-bar.vue';
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
|
|
@ -348,7 +348,7 @@ onShow(() => {
|
|||
Object.assign(data.ticketsInfo, uni.getStorageSync('ticketsInfo'))
|
||||
calculateNightCount()
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#ffffff')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_tickets_ctrip" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_tickets_ctrip')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="top-box">
|
||||
|
|
@ -302,6 +302,7 @@
|
|||
<text class="font_22 text_45">是否可以刷身份证进站乘车,需要取票吗</text>
|
||||
</view>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f0f3f8"/>
|
||||
</view>
|
||||
|
||||
<!-- 样式选择弹窗 -->
|
||||
|
|
@ -331,6 +332,7 @@ import NavBar from '@/components/nav-bar/nav-bar.vue';
|
|||
import { reactive, toRefs, ref } from 'vue';
|
||||
import { onShow, onPageScroll } from '@dcloudio/uni-app';
|
||||
import { util } from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const buttonGroup = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<watermark dark="light" source="uni_alipay_other_tickets_fliggy" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_tickets_fliggy')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view>
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
<text class="codefun-shrink-0 font_6 text_31">{{ ticketsInfo.serviceText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="codefun-flex-col section_9">
|
||||
<view class="codefun-flex-col section_9" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="codefun-flex-row codefun-justify-between codefun-items-center">
|
||||
<text class="font_14 text_33">您可能遇到的问题</text>
|
||||
<view class="codefun-flex-row codefun-items-center">
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
<uni-icons type="right" size="12" color="#1A1A1A"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid codefun-mt-14">
|
||||
<view class="grid codefun-mt-14" >
|
||||
<view class="codefun-flex-col codefun-justify-center codefun-items-center grid-item">
|
||||
<text class="font_1 text_36">如何取火车票</text>
|
||||
</view>
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-box">
|
||||
<view class="footer-box" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="codefun-flex-col codefun-justify-start codefun-items-center section_10">
|
||||
<view class="codefun-flex-row codefun-items-center group_14">
|
||||
<image class="codefun-shrink-0 image_12"
|
||||
|
|
@ -244,6 +244,7 @@ import NavBar from '@/components/nav-bar/nav-bar.vue';
|
|||
import { reactive, toRefs } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { util, stringUtil } from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const buttonGroup = [{
|
||||
name: "编辑车票信息",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_tickets_qunar" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_tickets_qunar')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="codefun-flex-col section">
|
||||
|
|
@ -136,6 +136,9 @@
|
|||
</view>
|
||||
</view>
|
||||
<Box />
|
||||
<view class="" style="width: 100%;overflow: hidden;">
|
||||
<ZdySafeBottom bgColor="#f0f3f8" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
|
@ -146,6 +149,7 @@ import Box from './components/box.vue';
|
|||
import { reactive, toRefs } from 'vue';
|
||||
import { onShow, onPageScroll } from '@dcloudio/uni-app';
|
||||
import { util, stringUtil } from '@/utils/common.js';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const buttonGroup = [{
|
||||
name: "编辑机票信息",
|
||||
|
|
@ -256,6 +260,8 @@ const formatDateTime = (timeStr, dateStr) => {
|
|||
|
||||
page {
|
||||
background-color: #F2F5F9;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
|
|
@ -401,7 +407,6 @@ page {
|
|||
padding-bottom: 10rpx;
|
||||
padding-bottom: calc(10rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: calc(10rpx + env(safe-area-inset-bottom));
|
||||
|
||||
.ml-25 {
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_videoChat" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_videoChat')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<!-- 未接通内容 -->
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
<text class="control-label">翻转</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="control-buttons" style="margin-bottom: 0;display: flex;justify-content: space-between;">
|
||||
<view class="control-buttons" style="margin-bottom: 0;display: flex;justify-content: space-between;" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
<!-- 挂断按钮 -->
|
||||
<image class="hangup-btn" style="margin: 0;" @click="hangup"
|
||||
|
|
@ -382,7 +382,7 @@ const autoPlayVideos = () => {
|
|||
}
|
||||
|
||||
const getVideoUrl = (url) => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
if (url && !url.startsWith('http') && !url.startsWith('blob:')) {
|
||||
return plus.io.convertLocalFileSystemURL(url)
|
||||
}
|
||||
|
|
@ -620,7 +620,7 @@ onShow(() => {
|
|||
// 触发自动播放
|
||||
autoPlayVideos()
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
|
||||
// 强制隐藏安卓底部的系统虚拟导航栏(实现全面屏沉浸)
|
||||
|
|
@ -635,7 +635,7 @@ onShow(() => {
|
|||
// #endif
|
||||
})
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// const restoreSystemNavigation = () => {
|
||||
// if (plus.os.name === 'Android') {
|
||||
// try {
|
||||
|
|
@ -768,7 +768,7 @@ const uploadMedia = (type, mediaType) => {
|
|||
compressed: false, // 核心修复:禁止 iOS 强制重新编码,保留原视频竖向元数据(Matrix属性)
|
||||
success: (res) => {
|
||||
let tempPath = res.tempFilePath
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
tempPath = plus.io.convertLocalFileSystemURL(tempPath)
|
||||
// #endif
|
||||
uni.saveFile({
|
||||
|
|
@ -927,7 +927,10 @@ const chooseVideo = () => {
|
|||
camera: 'back',
|
||||
success: async (res) => {
|
||||
console.log('选择视频成功:', res)
|
||||
const videoUrl = plus.io.convertLocalFileSystemURL(res.tempFilePath)
|
||||
let videoUrl = res.tempFilePath
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
videoUrl = plus.io.convertLocalFileSystemURL(res.tempFilePath)
|
||||
// #endif
|
||||
const savedVideoUrl = await new Promise((resolve, reject) => {
|
||||
uni.saveFile({
|
||||
tempFilePath: videoUrl,
|
||||
|
|
@ -1058,7 +1061,7 @@ const removeFile = (filePath) => {
|
|||
|
||||
console.log('🗑️ 准备删除文件:', filePath)
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 尝试使用 plus.io 删除 (支持 file:// 协议和 _downloads 等路径)
|
||||
if (filePath.startsWith('file://') || filePath.includes('_downloads') || filePath.includes('saved_video_')) {
|
||||
plus.io.resolveLocalFileSystemURL(filePath, (entry) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_groupChat" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_other_groupChat')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
<view class="container">
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 挂断按钮 -->
|
||||
<image class="hangup-btn" @click="hangup" src="/static/image/other/video-call/hangup.png"></image>
|
||||
<image class="hangup-btn" @click="hangup" src="/static/image/other/video-call/hangup.png" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}"></image>
|
||||
<!-- <view class="hangup-btn" @click="hangup">
|
||||
|
||||
</view> -->
|
||||
|
|
@ -268,7 +268,10 @@ onLoad(() => {
|
|||
...videoData,
|
||||
iconType: videoData.onMic ? videoData.iconType : 1,
|
||||
videoList: videoData.videoList.map((item) => {
|
||||
item.videoUrl = item.savedVideoUrl
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
item.videoUrl = plus.io.convertLocalFileSystemURL(item.savedVideoUrl)
|
||||
// #endif
|
||||
return item
|
||||
})
|
||||
}
|
||||
|
|
@ -293,7 +296,7 @@ onShow(() => {
|
|||
}
|
||||
startTimer()
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#232323')
|
||||
// 保存定时器引用,以便在页面卸载时清理
|
||||
statusBarTimer = setTimeout(() => {
|
||||
|
|
@ -526,7 +529,10 @@ const chooseVideo = () => {
|
|||
camera: 'back',
|
||||
success: async (res) => {
|
||||
console.log('选择视频成功:', res)
|
||||
const videoUrl = plus.io.convertLocalFileSystemURL(res.tempFilePath)
|
||||
let videoUrl = res.tempFilePath
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
videoUrl = plus.io.convertLocalFileSystemURL(res.tempFilePath)
|
||||
// #endif
|
||||
const savedVideoUrl = await new Promise((resolve, reject) => {
|
||||
uni.saveFile({
|
||||
tempFilePath: videoUrl,
|
||||
|
|
@ -664,7 +670,7 @@ const removeFile = (filePath) => {
|
|||
|
||||
console.log('🗑️ 准备删除文件:', filePath)
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// 尝试使用 plus.io 删除 (支持 file:// 协议和 _downloads 等路径)
|
||||
if (filePath.startsWith('file://') || filePath.includes('_downloads') || filePath.includes('saved_video_')) {
|
||||
plus.io.resolveLocalFileSystemURL(filePath, (entry) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="container">
|
||||
<nav-bar bgColor="transparent" :isBack="false">
|
||||
<template v-slot:center>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<watermark dark="light" source="uni_alipay_other_wx_pay_success" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_wx_pay_success')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@
|
|||
<canvas canvas-id="crop-canvas"
|
||||
style="position: fixed; left: -9999px; width: 750rpx; height: 100vh; pointer-events: none;"></canvas>
|
||||
</view>
|
||||
<ZdySafeBottom bgColor="#f0f3f8"/>
|
||||
|
||||
<!-- 长按操作气泡菜单 -->
|
||||
<view v-if="showActionMenu" class="action-menu-mask" @click="showActionMenu = false">
|
||||
|
|
@ -103,7 +104,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_jingdong" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_jingdong')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -114,6 +115,7 @@ import { onShow, onLoad } from '@dcloudio/uni-app';
|
|||
import ShoppingCard from '@/components/shopping/jingdong/shopping-card.vue';
|
||||
import { util } from '@/utils/common.js';
|
||||
import { shoppingType, waimaiType, defaultDataList } from './json/order.json';
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
|
@ -312,7 +314,7 @@ onLoad(() => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
@ -533,7 +535,9 @@ const confirmImage = () => {
|
|||
screenshotImage.value = saveRes.savedFilePath
|
||||
selectedImage.value = '' // 隐藏编辑模式
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}, 200)
|
||||
// 保存到缓存
|
||||
uni.setStorageSync('jingdong_screenshot', screenshotImage.value)
|
||||
|
|
|
|||
|
|
@ -452,9 +452,11 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="fixed-bottom ">
|
||||
<view class="flex-align-center flex-justify-between w100">
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
<view class="fixed-bottom " >
|
||||
<view class="flex-align-center flex-justify-between w100" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<text>{{ bottomText }}</text>
|
||||
<view class="btn-box">
|
||||
<view v-if="order.status == '等待付款'" class="big-btn ">立即支付<text
|
||||
|
|
@ -475,7 +477,7 @@
|
|||
<watermark dark="light" source="uni_alipay_shopping_jingdong_shoppingDetail" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_jingdong_shoppingDetail')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -637,7 +639,7 @@ onShow(() => {
|
|||
if (cachedImage) {
|
||||
screenshotImage.value = cachedImage;
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
|
|||
|
|
@ -442,21 +442,24 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="w100 flex-center" style="margin-top: 40rpx;margin-bottom: 32rpx;">
|
||||
<view class="w100 flex-center" style="margin-top: 40rpx;margin-bottom: 32rpx;" >
|
||||
<image style="width: 32rpx;height: 20rpx;" src="/static/image/shopping/jingdong/detail/like-left.png">
|
||||
</image>
|
||||
<text style="font-size: 26rpx;color: #1A1A1A;line-height: 26rpx;font-weight: 500;margin: 0 10rpx;">你可能还喜欢</text>
|
||||
<image style="width: 32rpx;height: 20rpx;" src="/static/image/shopping/jingdong/detail/like-right.png">
|
||||
</image>
|
||||
</view>
|
||||
<view class="upload-screenshot-box">
|
||||
<view class="upload-screenshot-box" >
|
||||
<view class="upload-screenshot-content w100">
|
||||
<image class="w100" :src="screenshotImage" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
|
||||
<view v-if="order.status == '等待付款'" class="fixed-bottom">
|
||||
<view class="btn-box">
|
||||
<view class="btn-box" :style="{'margin-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="big-btn wx-font-medium">立即支付¥{{ (Number(order.totalPrice) +
|
||||
Number(order.carriage)) ?
|
||||
(Number(order.totalPrice)
|
||||
|
|
@ -464,14 +467,14 @@
|
|||
0 }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.status == '等待付款'" class="placeholder"></view>
|
||||
<view v-if="order.status == '等待付款'" class="placeholder" ></view>
|
||||
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_jingdong_waimaiDetail" />
|
||||
<liu-drag-button :canDocking="false"
|
||||
@clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_jingdong_waimaiDetail')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -112,12 +112,12 @@
|
|||
<view class="menu-item" @click="handleEdit">编辑</view>
|
||||
<view class="menu-item text-red" @click="handleDelete">删除</view>
|
||||
</view>
|
||||
|
||||
<ZdySafeBottom bgColor="#f0f3f8"/>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_pdd" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_pdd')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -179,6 +179,8 @@ import { defaultDataList } from '@/pages/shopping/pdd/json/order.json';
|
|||
import { util } from '@/utils/common.js';
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const activeTab = ref(0);
|
||||
const scrollIntoId = ref('');
|
||||
|
|
@ -461,7 +463,7 @@ onShow(async () => {
|
|||
tab2List.value = cachedTab2;
|
||||
}
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
@ -587,7 +589,9 @@ const confirmImage = () => {
|
|||
screenshotImage.value = saveRes.savedFilePath
|
||||
selectedImage.value = '' // 隐藏编辑模式
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}, 200)
|
||||
// 保存到缓存
|
||||
uni.setStorageSync('pdd_screenshot', screenshotImage.value)
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 底部固定支付栏 -->
|
||||
<view v-if="order.orderType == 'wait_pay'" class="fixed-bottom-bar flex-justify-between">
|
||||
<view v-if="order.orderType == 'wait_pay'" class="fixed-bottom-bar flex-justify-between" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<!-- 样式 2:先用后付 (activePayIndex === 2) -->
|
||||
<view class="left-info style-2 flex-column" v-if="order.activePayIndex === 2">
|
||||
<view class="line-top flex-align-end">
|
||||
|
|
@ -236,7 +236,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 底部固定支付栏 -->
|
||||
<view v-else class="fixed-bottom-bar flex-justify-between">
|
||||
<view v-else class="fixed-bottom-bar flex-justify-between" :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
|
||||
<view class="flex-align-center buttons">
|
||||
<view class="more">更多</view>
|
||||
<view class="button">再次拼单</view>
|
||||
|
|
@ -251,7 +251,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_pdd_detail" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_pdd_detail')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<ZdySafeBottom bg-color="#f0f3f8"/>
|
||||
</view>
|
||||
|
||||
<!-- 自定义长按上下文菜单 -->
|
||||
<view v-if="menuState.show" class="menu-mask" @click="menuState.show = false" @touchmove.stop.prevent>
|
||||
<view class="menu-content" :style="{ top: menuState.y + 'px', left: menuState.x + 'px' }">
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_taobao" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_taobao')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -186,6 +186,7 @@ import { util } from '@/utils/common.js';
|
|||
import listCard from './components/list-card/list-card.vue';
|
||||
import { defualtData } from './json/order.json'
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const instance = getCurrentInstance();
|
||||
|
|
@ -220,7 +221,7 @@ onLoad(() => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("dark");
|
||||
|
|
@ -460,7 +461,9 @@ const confirmImage = () => {
|
|||
screenshotImage.value = saveRes.savedFilePath
|
||||
selectedImage.value = '' // 隐藏编辑模式
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
// #endif
|
||||
}, 200)
|
||||
// 保存到缓存
|
||||
uni.setStorageSync('taobao_screenshot', screenshotImage.value)
|
||||
|
|
|
|||
|
|
@ -293,13 +293,13 @@
|
|||
<view>
|
||||
<image style="width: 100%;" :src="screenshotImage" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<ZdySafeBottom bg-color="#f0f3f8"/>
|
||||
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_taobao_shangou" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_taobao_shangou')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -311,6 +311,7 @@ import { util } from '@/utils/common.js';
|
|||
import { defualtData } from '../json/order.json';
|
||||
import { imgLocal } from '@/utils/common.js';
|
||||
|
||||
import ZdySafeBottom from '@/components/safeBottom/safeBottom.vue'
|
||||
const isScrolled = ref(false);
|
||||
const screenshotImage = ref('')
|
||||
|
||||
|
|
|
|||
|
|
@ -341,14 +341,16 @@
|
|||
<view class="btn">运费谁承担</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-template">
|
||||
<view class="bottom-template" >
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="order" class="bottom-box flex-justify-between flex-align-center">
|
||||
<view v-if="order" class="bottom-box flex-justify-between flex-align-center" :style="{'padding-bottom':($store.state.safeBottomAz||$store.state.safeBottom)+'px'}">
|
||||
<view class="left-icons flex">
|
||||
<view class="icon-box" v-for="icon in bottomBtnList[order.statusType].icons" :key="icon.name">
|
||||
<image style="width: 40rpx;height: 40rpx;"
|
||||
|
|
@ -386,7 +388,7 @@
|
|||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_shopping_taobao" />
|
||||
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_shopping_taobao')">
|
||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||
<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
|
||||
</liu-drag-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -1133,9 +1135,9 @@ onUnmounted(() => {
|
|||
}
|
||||
|
||||
.bottom-template {
|
||||
height: 108rpx;
|
||||
height: calc(108rpx + env(safe-area-inset-bottom));
|
||||
height: calc(108rpx + constant(safe-area-inset-bottom));
|
||||
min-height: 108rpx;
|
||||
// height: calc(108rpx + env(safe-area-inset-bottom));
|
||||
// height: calc(108rpx + constant(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.bottom-box {
|
||||
|
|
@ -1149,9 +1151,9 @@ onUnmounted(() => {
|
|||
left: 0;
|
||||
right: 0;
|
||||
border-top: 0.5px solid #ECEDEF;
|
||||
height: 108rpx;
|
||||
height: calc(108rpx + env(safe-area-inset-bottom));
|
||||
height: calc(108rpx + constant(safe-area-inset-bottom));
|
||||
min-height: 108rpx;
|
||||
// height: calc(108rpx + env(safe-area-inset-bottom));
|
||||
// height: calc(108rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 732 KiB |
|
After Width: | Height: | Size: 460 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 432 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 679 KiB |
|
|
@ -1,5 +1,5 @@
|
|||
export default function getfile(e,isIosDown=false) {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
let isIOS = plus.os.name==='iOS'
|
||||
let url = plus.io.convertLocalFileSystemURL(e)
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default {
|
|||
default: 2000
|
||||
},
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
// #ifdef H5 || APP-PLUS || APP-HARMONY
|
||||
useCORS: Boolean,
|
||||
hidpi: {
|
||||
type: Boolean,
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export function base64ToPath(base64) {
|
|||
})))
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
|
||||
bitmap.loadBase64Data(base64, () => {
|
||||
if (!format) {
|
||||
|
|
@ -186,6 +186,27 @@ export function base64ToPath(base64) {
|
|||
reject(error)
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-HARMONY
|
||||
if (!format) {
|
||||
reject(new Error('ERROR_BASE64SRC_PARSE'))
|
||||
return
|
||||
}
|
||||
const fs = uni.getFileSystemManager()
|
||||
const filePath = `${uni.env.USER_DATA_PATH}/${Date.now()}.${format}`
|
||||
fs.writeFile({
|
||||
filePath,
|
||||
data: base64.split(',')[1],
|
||||
encoding: 'base64',
|
||||
success() {
|
||||
resolve(filePath)
|
||||
},
|
||||
fail(err) {
|
||||
console.error(err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -230,7 +251,7 @@ export function pathToBase64(path) {
|
|||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), (entry) => {
|
||||
entry.file((file) => {
|
||||
const fileReader = new plus.io.FileReader()
|
||||
|
|
@ -244,6 +265,22 @@ export function pathToBase64(path) {
|
|||
}, reject)
|
||||
}, reject)
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-HARMONY
|
||||
uni.getFileSystemManager().readFile({
|
||||
filePath: path,
|
||||
encoding: 'base64',
|
||||
success: (res) => {
|
||||
const ext = (path.split('.').pop() || 'png').toLowerCase().replace(/\?.*$/, '')
|
||||
const mime = ext === 'jpg' || ext === 'jpeg' ? 'jpeg' : (ext === 'gif' ? 'gif' : 'png')
|
||||
resolve(`data:image/${mime};base64,${res.data}`)
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error({error, path})
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +295,7 @@ export function getImageInfo(path, useCORS) {
|
|||
resolve(cache[path])
|
||||
} else {
|
||||
try {
|
||||
// #ifdef MP || APP-PLUS
|
||||
// #ifdef MP || APP-PLUS || APP-HARMONY
|
||||
if (isBase64(path) && (isCanvas2D ? isPC : true)) {
|
||||
src = await base64ToPath(path)
|
||||
}
|
||||
|
|
@ -313,7 +350,7 @@ export function getImageInfo(path, useCORS) {
|
|||
img.src = src
|
||||
return
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// console.log('getImageInfo', +new Date() - time)
|
||||
// ios 比较严格 可能需要设置跨域
|
||||
if(uni.getSystemInfoSync().osName == 'ios' && useCORS) {
|
||||
|
|
@ -341,7 +378,7 @@ export function getImageInfo(path, useCORS) {
|
|||
}
|
||||
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const getLocalFilePath = (path) => {
|
||||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path
|
||||
.indexOf('_downloads') === 0) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export function arrayBufferToFile(buffer: ArrayBuffer | Blob, name?: string, for
|
|||
resolve(file)
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
|
||||
const base64 = uni.arrayBufferToBase64(buffer)
|
||||
bitmap.loadBase64Data(base64, () => {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export function base64ToPath(base64: string, filename?: string):Promise<string>
|
|||
})))
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
|
||||
bitmap.loadBase64Data(base64, () => {
|
||||
if (!filename && !format) {
|
||||
|
|
@ -71,5 +71,26 @@ export function base64ToPath(base64: string, filename?: string):Promise<string>
|
|||
reject(error)
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-HARMONY
|
||||
if (!filename && !format) {
|
||||
reject(new Error('ERROR_BASE64SRC_PARSE'))
|
||||
return
|
||||
}
|
||||
const name = filename || `${new Date().getTime()}.${format}`
|
||||
const filePath = `${uni.env.USER_DATA_PATH}/${name}`
|
||||
uni.getFileSystemManager().writeFile({
|
||||
filePath,
|
||||
data: base64.split(',')[1],
|
||||
encoding: 'base64',
|
||||
success() {
|
||||
resolve(filePath)
|
||||
},
|
||||
fail(err) {
|
||||
console.error(err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
|
|
@ -4,12 +4,19 @@ export const getLocalFilePath = (path : string) => {
|
|||
if (typeof plus == 'undefined') return path
|
||||
if (/^(_www|_doc|_documents|_downloads|file:\/\/|\/storage\/emulated\/0\/)/.test(path)) return path
|
||||
if (/^\//.test(path)) {
|
||||
let handled = false
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const localFilePath = plus.io.convertAbsoluteFileSystem(path)
|
||||
if (localFilePath !== path) {
|
||||
return localFilePath
|
||||
} else {
|
||||
path = path.slice(1)
|
||||
}
|
||||
handled = true
|
||||
// #endif
|
||||
if (!handled) {
|
||||
path = path.slice(1)
|
||||
}
|
||||
}
|
||||
return '_www/' + path
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// @ts-nocheck
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
import { getLocalFilePath } from '../getLocalFilePath'
|
||||
// #endif
|
||||
function isImage(extension : string) {
|
||||
|
|
@ -102,7 +102,7 @@ export function pathToBase64(path : string) : Promise<string> {
|
|||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), (entry) => {
|
||||
entry.file((file : any) => {
|
||||
const fileReader = new plus.io.FileReader()
|
||||
|
|
@ -117,5 +117,19 @@ export function pathToBase64(path : string) : Promise<string> {
|
|||
}, reject)
|
||||
}, reject)
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-HARMONY
|
||||
uni.getFileSystemManager().readFile({
|
||||
filePath: path,
|
||||
encoding: 'base64',
|
||||
success: (res) => {
|
||||
resolve(`data:${prefix}${extension};base64,${res.data}`)
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error({ error, path })
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
return this.href.startsWith('tel:');
|
||||
},
|
||||
openURL() {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
if (this.isTel()) {
|
||||
this.makePhoneCall(this.href.replace('tel:', ''));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -194,30 +194,27 @@
|
|||
this.searchVal = ""
|
||||
this.show = false
|
||||
this.showSync = false
|
||||
// #ifndef APP-PLUS
|
||||
uni.hideKeyboard()
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.key.hideSoftKeybord()
|
||||
// #else
|
||||
uni.hideKeyboard()
|
||||
// #endif
|
||||
},
|
||||
confirm() {
|
||||
// #ifndef APP-PLUS
|
||||
uni.hideKeyboard();
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.key.hideSoftKeybord()
|
||||
// #else
|
||||
uni.hideKeyboard();
|
||||
// #endif
|
||||
this.$emit("confirm", {
|
||||
value: this.searchVal
|
||||
})
|
||||
},
|
||||
blur() {
|
||||
// #ifndef APP-PLUS
|
||||
uni.hideKeyboard();
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
plus.key.hideSoftKeybord()
|
||||
// #else
|
||||
uni.hideKeyboard();
|
||||
// #endif
|
||||
this.$emit("blur", {
|
||||
value: this.searchVal
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ export const util = {
|
|||
const isAndroid = uni.getSystemInfoSync().platform === 'android';
|
||||
if (isAndroid) {
|
||||
try {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
if (plus.os.name === 'Android') {
|
||||
let color = plus.android.newObject("android.graphics.Color");
|
||||
let activity = plus.android.runtimeMainActivity();
|
||||
|
|
@ -641,16 +641,16 @@ export const imgLocal = {
|
|||
// 2. 命中缓存
|
||||
if (cache[key]) {
|
||||
let resultPath = cache[key];
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
// iOS/Android 编译刷新后沙盒绝对路径的 UUID 会变!必须用相对路径重新计算最新绝对路径
|
||||
resultPath = plus.io.convertLocalFileSystemURL(`_doc/img_cache/${key}.jpg`);
|
||||
// #endif
|
||||
return resolve(resultPath);
|
||||
}
|
||||
const config = uni.getStorageSync('config')
|
||||
let imgConfig = config.config['client.uniapp.img_path']?.alipay || 'http://cdn.u8t.cn/flaunt/uni_mp/img/alipay/static/image/'
|
||||
let imgConfig = config?.config?.['client.uniapp.img_path']?.alipay || 'http://cdn.u8t.cn/flaunt/uni_mp/img/alipay/static/image/'
|
||||
url = imgConfig + url
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
const filename = `_doc/img_cache/${key}.jpg`;
|
||||
|
||||
const task = plus.downloader.createDownload(
|
||||
|
|
@ -672,9 +672,7 @@ export const imgLocal = {
|
|||
);
|
||||
|
||||
task.start();
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
// #else
|
||||
uni.downloadFile({
|
||||
url,
|
||||
success: (res) => {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import pageData from "@/static/json/page.json"
|
|||
import {
|
||||
jsonString
|
||||
} from "../uni_modules/uv-ui-tools/libs/function/test";
|
||||
import '@batiao/batiao-sdk-uniapp-unimp';
|
||||
export default {
|
||||
install(app, options) {
|
||||
|
||||
|
|
@ -156,48 +157,67 @@ export default {
|
|||
};
|
||||
|
||||
// 请求
|
||||
app.config.globalProperties.$requestPromise = async (data, isCode = true) => {
|
||||
//头部header
|
||||
let header = uni.getStorageSync('header')
|
||||
app.config.globalProperties.$requestPromise = async (data,isCode=true) => {
|
||||
let isTest = uni.getStorageSync('isTest')
|
||||
//头部header(浅拷贝,避免改到 storage 缓存对象)
|
||||
let header = { ...(uni.getStorageSync('header') || {}) }
|
||||
//请求地址
|
||||
let host = uni.getStorageSync('host') + data.url
|
||||
let host
|
||||
// #ifdef H5
|
||||
host = data.url
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host = uni.getStorageSync('host') + data.url
|
||||
// #endif
|
||||
// 签名
|
||||
if (isCode) {
|
||||
data = sign(data)
|
||||
} else {
|
||||
host = "http://10.3.0.24:9209/" + data.url
|
||||
header['x-token'] = "bdf87a98-eef0-47df-9faf-41d547b0457e"
|
||||
if(isCode){
|
||||
if(isTest){
|
||||
data = sign(data)
|
||||
}
|
||||
|
||||
}else{
|
||||
host="http://10.3.0.24:9209/"+ data.url
|
||||
header['x-token']="bdf87a98-eef0-47df-9faf-41d547b0457e"
|
||||
}
|
||||
// 排序
|
||||
const sortedKeys = Object.keys(data.data).sort();
|
||||
let str = ''
|
||||
for (const key of sortedKeys) {
|
||||
if (!(data.url == 'api/image/segment/base64' && key == 'file')) {
|
||||
str += '&' + key + '=' + encodeURIComponent(data.data[key]);
|
||||
}
|
||||
str += '&' + key + '=' + encodeURIComponent(
|
||||
data.data[key] == null ? '' : String(data.data[key])
|
||||
);
|
||||
}
|
||||
str = str.replace('&', '?')
|
||||
host = host + str
|
||||
console.log(host)
|
||||
console.log(data)
|
||||
// 拼接URL
|
||||
if(isTest){
|
||||
host = host + str
|
||||
}
|
||||
// 鸿蒙 GET/DELETE 若再传 data 会二次拼进 query,导致参数异常;参数已在 URL 中
|
||||
let requestData = data.data
|
||||
// #ifdef APP-HARMONY
|
||||
const method = (data.method || 'GET').toUpperCase()
|
||||
if (method === 'GET' || method === 'DELETE') {
|
||||
requestData = {}
|
||||
}
|
||||
// #endif
|
||||
// 测试环境用 uni.request,正式环境用宿主 nativeRequest
|
||||
const api = isTest
|
||||
? uni.request
|
||||
: (uni.nativeRequest || uni.request)
|
||||
const response = await new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
api({
|
||||
url: host,
|
||||
method: data.method,
|
||||
data: data.data,
|
||||
data: requestData,
|
||||
params: requestData,
|
||||
header,
|
||||
success: res => {
|
||||
console.log(res)
|
||||
try {
|
||||
if (isCode) {
|
||||
res.data = deCode(res.data.data)
|
||||
console.log(res.data)
|
||||
} else {
|
||||
res.data = res.data.data
|
||||
if(isCode&&isTest){
|
||||
res.data = deCode(res.data.data)
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
||||
}
|
||||
resolve(res.data);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import {
|
|||
} from "../uni_modules/uv-ui-tools/libs/function/index.js";
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
// import pageData from "@/static/json/page.json"
|
||||
import '@batiao/batiao-sdk-uniapp-unimp';
|
||||
import pageData from "@/static/json/page.json";
|
||||
|
||||
async function apiUserEvent(type, adminData, uniData) {
|
||||
let uni_version = uni.getStorageSync("version")
|
||||
|
|
@ -118,62 +119,69 @@ function generateUUID() {
|
|||
|
||||
// 主请求函数
|
||||
const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json") => {
|
||||
let isTest = uni.getStorageSync('isTest')
|
||||
let currentUrl
|
||||
// try {
|
||||
// let pages = getCurrentPages();
|
||||
// let currentPage = pages[pages.length - 2];
|
||||
// currentUrl = currentPage.route;
|
||||
// currentUrl = pageData[currentUrl]
|
||||
// } catch (e) {
|
||||
try {
|
||||
let pages = getCurrentPages();
|
||||
let currentPage = pages[pages.length - 2];
|
||||
currentUrl = currentPage.route;
|
||||
currentUrl = pageData[currentUrl]
|
||||
} catch (e) {
|
||||
|
||||
// }
|
||||
let q = serverUrl
|
||||
}
|
||||
let q=serverUrl
|
||||
// 头部header
|
||||
let header = uni.getStorageSync('header') || {};
|
||||
// 请求地址
|
||||
serverUrl = uni.getStorageSync('host') || serverUrl;
|
||||
if (q == 'test') {
|
||||
serverUrl = "http://10.3.0.24:9209/"
|
||||
header['x-token'] = "bdf87a98-eef0-47df-9faf-41d547b0457e"
|
||||
if(q=='test'){
|
||||
serverUrl="http://10.3.0.24:9209/"
|
||||
header['x-token']="bdf87a98-eef0-47df-9faf-41d547b0457e"
|
||||
}
|
||||
let url = domianUrl(serverUrl, domainUrl);
|
||||
if (q != 'test') {
|
||||
if(q!='test'){
|
||||
params = deepClone(params);
|
||||
}
|
||||
|
||||
var key = uni.getStorageSync('encrypt') || "default_encrypt_key";
|
||||
let data = {};
|
||||
console.log("传参", method === "GET" || method === "DELETE" || q == 'q')
|
||||
if (method === "GET" || method === "DELETE" || q == 'q') {
|
||||
params.timestamp = Math.floor(new Date().getTime() / 1000);
|
||||
params.nonce = generateUUID();
|
||||
let keys = Object.keys(params);
|
||||
keys.sort();
|
||||
for (let i in keys) {
|
||||
keys[i] = keys[i] + "=" + encodeURIComponent(params[keys[i]]);
|
||||
if (method === "GET" || method === "DELETE"||q=='q') {
|
||||
let urls = url
|
||||
if(isTest){
|
||||
params.timestamp = Math.floor(new Date().getTime() / 1000);
|
||||
params.nonce = generateUUID();
|
||||
let keys = Object.keys(params);
|
||||
keys.sort();
|
||||
for (let i in keys) {
|
||||
keys[i] = keys[i] + "=" + encodeURIComponent(params[keys[i]]);
|
||||
}
|
||||
let temp = keys.join("&") + "&" + CryptoJS.MD5(key).toString();
|
||||
params.signature = CryptoJS.MD5(temp).toString();
|
||||
urls = url + "?" + (isTest ? encodeParam(params): encodeParam(params));
|
||||
}
|
||||
let temp = keys.join("&") + "&" + CryptoJS.MD5(key).toString();
|
||||
params.signature = CryptoJS.MD5(temp).toString();
|
||||
data = {
|
||||
url: url + "?" + encodeParam(params),
|
||||
url:urls,
|
||||
method,
|
||||
data: params,
|
||||
header: header // setheader(dataType, header),
|
||||
};
|
||||
} else if (method === "POST" || method === "PUT") {
|
||||
let temp = decodeParam(url);
|
||||
temp.timestamp = Math.floor(new Date().getTime() / 1000);
|
||||
temp.nonce = generateUUID();
|
||||
let keys = Object.keys(temp);
|
||||
keys.sort();
|
||||
for (let i in keys) {
|
||||
keys[i] = keys[i] + "=" + encodeURIComponent(temp[keys[i]]);
|
||||
if(isTest){
|
||||
let temp = decodeParam(url);
|
||||
temp.timestamp = Math.floor(new Date().getTime() / 1000);
|
||||
temp.nonce = generateUUID();
|
||||
let keys = Object.keys(temp);
|
||||
keys.sort();
|
||||
for (let i in keys) {
|
||||
keys[i] = keys[i] + "=" + encodeURIComponent(temp[keys[i]]);
|
||||
}
|
||||
let s = keys.join("&");
|
||||
s += "&" + JSON.stringify(params);
|
||||
s += "&" + CryptoJS.MD5(key).toString();
|
||||
temp.signature = CryptoJS.MD5(s).toString();
|
||||
url = url.split("?")[0] + "?" + temp;
|
||||
url = url.split("?")[0] + "?" + encodeParam(temp);
|
||||
}
|
||||
let s = keys.join("&");
|
||||
s += "&" + JSON.stringify(params);
|
||||
s += "&" + CryptoJS.MD5(key).toString();
|
||||
temp.signature = CryptoJS.MD5(s).toString();
|
||||
url = url.split("?")[0] + "?" + encodeParam(temp);
|
||||
|
||||
|
||||
data = {
|
||||
url,
|
||||
method,
|
||||
|
|
@ -182,20 +190,21 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
};
|
||||
}
|
||||
|
||||
console.log("传参详情", data)
|
||||
console.log("传参详情",data)
|
||||
// 测试环境用 uni.request,正式环境用宿主 nativeRequest
|
||||
const api = isTest
|
||||
? uni.request
|
||||
: (uni.nativeRequest || uni.request)
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request(data).then(res => {
|
||||
console.log(deCode(res.data.data))
|
||||
api(data).then(res => {
|
||||
if (res.statusCode == 200) {
|
||||
if (res.data.encrypt) {
|
||||
if (q != 'test') {
|
||||
if(q!='test'&&isTest){
|
||||
res.data = deCode(res.data.data);
|
||||
} else {
|
||||
res.data = res.data.data
|
||||
}
|
||||
|
||||
console.log(res.data)
|
||||
// res.data = res.data.data
|
||||
}
|
||||
console.log(res.data)
|
||||
if (res.data.code == 1001003 || res.data.code == 1001004 || res.data.code == 1001005) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
|
|
@ -205,7 +214,6 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
return reject(res);
|
||||
} else if (res.data.code != 0) {
|
||||
if (data.method == 'POST' && domainUrl == 'api/order') {
|
||||
|
||||
apiUserEvent('all', {
|
||||
type: "event",
|
||||
key: "order_fail",
|
||||
|
|
@ -227,7 +235,6 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
title: res.data.message
|
||||
})
|
||||
}
|
||||
|
||||
uni.hideLoading();
|
||||
return resolve(res);
|
||||
}
|
||||
|
|
@ -249,11 +256,11 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
}
|
||||
})
|
||||
}
|
||||
console.log(123)
|
||||
|
||||
resolve(res.data);
|
||||
} else {
|
||||
// InnerApp.addRequestLog(url, data, res)
|
||||
reject(res);
|
||||
resolve(res);
|
||||
}
|
||||
}).catch(err => {
|
||||
if (err.errMsg == 'request:fail timeout') {
|
||||
|
|
@ -272,12 +279,26 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
err: JSON.stringify(err)
|
||||
}
|
||||
})
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: JSON.stringify(err),
|
||||
// success: function (res) {
|
||||
// if (res.confirm) {
|
||||
// console.log('用户点击确定');
|
||||
// } else if (res.cancel) {
|
||||
// console.log('用户点击取消');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// uniToast('服务器繁忙');
|
||||
}
|
||||
// InnerApp.addRequestLog(url, data, err)
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 处理请求头
|
||||
* @param dataType 是否json格式
|
||||
|
|
@ -330,16 +351,15 @@ const setheader = (dataType, baseHeader = {}) => {
|
|||
* @param domainUrl 接口路径
|
||||
*/
|
||||
const domianUrl = (serveUrl, domainUrl) => {
|
||||
let finalUrl=''
|
||||
// #ifdef H5
|
||||
// H5环境下使用相对路径,走 vite 代理,避免 CORS 跨域问题
|
||||
const finalUrl = domainUrl.startsWith('/') ? domainUrl : '/' + domainUrl;
|
||||
finalUrl = domainUrl.startsWith('/') ? domainUrl : '/' + domainUrl;
|
||||
console.log('[H5代理] 原始URL:', domainUrl, '→ 代理URL:', finalUrl);
|
||||
return finalUrl;
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
// 非H5环境(APP、小程序等)使用完整URL
|
||||
let finalUrl;
|
||||
if (serveUrl.endsWith('/') && domainUrl.startsWith('/')) {
|
||||
finalUrl = serveUrl + domainUrl.substring(1);
|
||||
} else if (!serveUrl.endsWith('/') && !domainUrl.startsWith('/')) {
|
||||
|
|
@ -348,8 +368,8 @@ const domianUrl = (serveUrl, domainUrl) => {
|
|||
finalUrl = serveUrl + domainUrl;
|
||||
}
|
||||
console.log('[非H5] 完整URL:', finalUrl);
|
||||
return finalUrl;
|
||||
// #endif
|
||||
return finalUrl;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||