Compare commits

...

2 Commits

Author SHA1 Message Date
小李 dab4d15c24 Merge branch 'Branch_1' of https://git.u8t.cn/tangxinyue/alipay-emulator into Branch_1 2026-05-30 14:52:57 +08:00
小李 88ebca65e7 通话优化,银行卡优化 2026-05-30 14:52:51 +08:00
10 changed files with 887 additions and 498 deletions

View File

@ -222,4 +222,11 @@
} }
} }
} }
.header_xiaomi{
.search{
.left{
margin-left: 20rpx;
}
}
}
</style> </style>

View File

@ -10,7 +10,7 @@
{{ getAvatarText(item.name) }} {{ getAvatarText(item.name) }}
</view> </view>
<!-- 显示图片头像 --> <!-- 显示图片头像 -->
<image class="iosAvatar" v-else-if="type == 'ios' && item.avatar" :src="item.avatar" mode=""></image> <image class="iosAvatar" v-else-if="type == 'ios' && item.avatar" :src="item.avatar" mode="aspectFill"></image>
<!-- 默认头像 --> <!-- 默认头像 -->
<image v-else-if="type == 'ios'" src="/static/image/call/iosAvatar.png" mode=""></image> <image v-else-if="type == 'ios'" src="/static/image/call/iosAvatar.png" mode=""></image>
<!-- 其他类型的状态图标 --> <!-- 其他类型的状态图标 -->
@ -900,12 +900,11 @@
addForm.yys = ''; addForm.yys = '';
addForm.kj = '1'; addForm.kj = '1';
addForm.address = ''; addForm.address = '';
addForm.time = addForm.time = `${currentYear}-${currentMonth + 1}-${currentDay} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`;
`${currentYear}-${currentMonth + 1}-${currentDay} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`;
addForm.status = 0; addForm.status = 0;
addForm.notes = ''; addForm.notes = '';
showAddModal.value = true; showAddModal.value = true;
console.log(showAddModal.value) console.log(addForm)
}; };
const closeAddModal = () => { const closeAddModal = () => {

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="footer" :class="['footer_'+type]"> <view class="footer" :class="['footer_'+type]" :style="data.style">
<view class="item" v-for="(item,index) in list" :key="index"> <view class="item" v-for="(item,index) in list" :key="index">
<image :src="`/static/image/call/${type}TabbarImg${index+1}.png`" mode=""></image> <image :src="`/static/image/call/${type}TabbarImg${index+1}.png`" mode=""></image>
<text>{{item}}</text> <text>{{item}}</text>
@ -38,11 +38,16 @@
type: String, type: String,
default: 'ios' default: 'ios'
}, },
type2: {
type: String,
default: ''
},
}) })
const data = reactive({ const data = reactive({
statusBarHeight: 0, statusBarHeight: 0,
showTipLayer: true, showTipLayer: true,
style:{},
list: [ list: [
"个人收藏", "个人收藏",
"最近通话", "最近通话",
@ -79,6 +84,10 @@
"收藏" "收藏"
] ]
} }
if(props.type2=='ios'){
data.style={'background-color':props.bgColor}
}
}) })
</script> </script>

View File

@ -29,7 +29,7 @@ export function createApp() {
app.config.globalProperties.$system = plus.os.name; app.config.globalProperties.$system = plus.os.name;
// #endif // #endif
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.5.sp16') uni.setStorageSync('version', '1.0.5.sp20')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);
return { return {

View File

@ -52,7 +52,7 @@
<template v-for="(item,index) in data.list" :key="index"> <template v-for="(item,index) in data.list" :key="index">
<text class="text_8"> {{formatTime(item.start_time)[1]}} <text class="text_8"> {{formatTime(item.start_time)[1]}}
{{['去电','去电','去电','未接来电','来电','来电'][item.status]}} </text> {{['去电','去电','去电','未接来电','来电','来电'][item.status]}} </text>
<text class="text_9"> {{item.start_number}}秒钟 </text> <text class="text_9" v-if="item.start_number"> {{item.start_number}}秒钟 </text>
</template> </template>
<br /> <br />
</view> </view>
@ -97,7 +97,7 @@
<view style="height: 100rpx;"> <view style="height: 100rpx;">
</view> </view>
<tabbar /> <tabbar type2='ios'/>
</view> </view>
<view class="xiaomi" v-else-if="data.type=='xiaomi'"> <view class="xiaomi" v-else-if="data.type=='xiaomi'">
<view class="container" > <view class="container" >
@ -198,7 +198,7 @@
<!-- 通话记录 --> <!-- 通话记录 -->
<view class="group_48093" @click="openEditModal()"> <view class="group_48093" @click="openEditModal()">
<view class="rectangle_23161"> <view class="rectangle_23161">
<view class="call-item no-border" v-for="(item,index) in data.list" :key="index"> <view class="call-item " v-for="(item,index) in data.list" :key="index" :class="{'no-border':data.list.length-1==index}">
<view class="call-top"> <view class="call-top">
<image class="small-icon" <image class="small-icon"
:src="`/static/image/call/detail/oppo${['WJ','BC','GD','LD','LD','LD'][item.status]}.png`" /> :src="`/static/image/call/detail/oppo${['WJ','BC','GD','LD','LD','LD'][item.status]}.png`" />
@ -207,7 +207,7 @@
<view class="call-bottom"> <view class="call-bottom">
<image class="status-icon" :src="`/static/image/call/detail/oppo${['K1','K2'][item.kj]}.png`" /> <image class="status-icon" :src="`/static/image/call/detail/oppo${['K1','K2'][item.kj]}.png`" />
<text class="call-desc">{{formatString(data.info.phone)}} <text class="call-desc">{{formatString(data.info.phone)}}
{{['未接','播出','挂断','来电','来电','来电'][item.status]}} {{item.start_number||0}} </text> {{['未接','挂断 响铃','挂断','未接 响铃','挂断 响铃','来电'][item.status]}} {{item.start_number||0}} </text>
</view> </view>
<view class="line"></view> <view class="line"></view>
</view> </view>
@ -361,7 +361,7 @@
</view> </view>
<view class="popup-box-item"> <view class="popup-box-item">
响铃秒数<!-- 响铃秒数 --> 响铃秒数<!-- 响铃秒数 -->
<input v-model="tempList[index].start_number" type="number" placeholder="响铃秒数" /> <input v-model="tempList[index].start_number" type="number" placeholder="响铃秒数(ios为0不显示)" />
</view> </view>
<view class="popup-box-item"> <view class="popup-box-item">
开始时间<!-- 开始时间 --> 开始时间<!-- 开始时间 -->
@ -1375,7 +1375,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: white; color: white;
font-size: 48rpx; font-size: 76rpx;
font-weight: bold; font-weight: bold;
background: linear-gradient(180deg, #A1A8B8 0%, #878B94 100%); background: linear-gradient(180deg, #A1A8B8 0%, #878B94 100%);
margin: 52rpx auto 0; margin: 52rpx auto 0;
@ -1772,8 +1772,8 @@
margin-top: 14rpx; margin-top: 14rpx;
margin-bottom: -4rpx; margin-bottom: -4rpx;
width: max-content; width: max-content;
margin-left: calc(50% - 24rpx); margin-left: 60rpx;
margin-right: auto; // margin-right: auto;
} }
} }
} }
@ -2266,7 +2266,9 @@
} }
.call-item { .call-item {
padding: 32rpx 28rpx 0; position: relative;
padding: 32rpx 28rpx ;
// padding-bottom: 32rpx;
} }
.call-top { .call-top {
@ -2312,14 +2314,15 @@
} }
.line { .line {
width: 100%; width: calc(100% - 104rpx);
height: 1rpx; height: 1rpx;
background: #dfdfdf; background: #dfdfdf;
margin-top: 36rpx; position: absolute;
bottom: 0;
right:32rpx;
} }
.no-border { .no-border {
padding-bottom: 32rpx;
.line { .line {
display: none; display: none;
@ -2457,7 +2460,7 @@
font-family: OPPOSans; font-family: OPPOSans;
font-weight: 400; font-weight: 400;
line-height: 42rpx; line-height: 42rpx;
color: var(--, #767676); color: #767676;
white-space: pre; white-space: pre;
height: 42rpx; height: 42rpx;
margin-top: -7rpx; margin-top: -7rpx;
@ -2575,7 +2578,7 @@
font-family: OPPOSans; font-family: OPPOSans;
font-weight: 400; font-weight: 400;
line-height: 42rpx; line-height: 42rpx;
color: var(--, #767676); color: #767676;
white-space: pre; white-space: pre;
height: 42rpx; height: 42rpx;
margin-top: 4rpx; margin-top: 4rpx;

View File

@ -114,11 +114,12 @@
<view class="group-box"> <view class="group-box">
<image class="title-img" src="/static/image/index/qita.png"></image> <image class="title-img" src="/static/image/index/qita.png"></image>
<view class="video-help-box"> <view class="video-help-box">
<view class="video-help-item" :style="{ width: (windowWidth - 32) / 4 + 'px' }" <template v-for="item in otherList" :key="item.id">
v-for="item in otherList" :key="item.id" @click="clickMenu(item)"> <view class="video-help-item" :style="{ width: (windowWidth - 32) / 4 + 'px' }" @click="clickMenu(item)" v-if="isShowBankIdCard(item)">
<image class="video-help-img" :src="item.icon"></image> <image class="video-help-img" :src="item.icon"></image>
<text class="video-help-title">{{ item.name }}</text> <text class="video-help-title">{{ item.name }}</text>
</view> </view>
</template>
</view> </view>
</view> </view>
</view> </view>
@ -316,7 +317,9 @@ const data = reactive({
noticeInfo: {}, noticeInfo: {},
vision: "", vision: "",
platform: '', // 添加平台信息, platform: '', // 添加平台信息,
qqgroup: {} qqgroup: {},
idcard:false,
bank:false
}) })
const { const {
@ -389,7 +392,23 @@ onShow(() => {
}, 800); }, 800);
// #endif // #endif
}) })
function isShowBankIdCard(item){
if(item.name=='银行卡'||item.name=='身份证'){
console.log(item.name!='银行卡'||item.name!='身份证')
console.log(item.name=='银行卡'&&data.bank)
console.log(item.name=='银行卡'&&data.bank)
}
if(item.name!='银行卡'&&item.name!='身份证'){
return true
}else if(item.name=='银行卡'&&data.bank){
return true
}else if(item.name=='身份证'&&data.idcard){
return true
}else{
return false
}
}
/** /**
* 获取用户数据(从服务器) * 获取用户数据(从服务器)
*/ */
@ -413,11 +432,17 @@ const fetchUserData = async () => {
// 处理用户配置结果 // 处理用户配置结果
if (configResult.status === 'fulfilled') { if (configResult.status === 'fulfilled') {
console.log('用户配置获取成功') console.log('用户配置获取成功',configResult)
} else { } else {
console.error('获取用户配置失败:', configResult.reason) console.error('获取用户配置失败:', configResult.reason)
} }
if(configResult.value.config['client.uniapp.bank']||false){
data.bank=true
}
if(configResult.value.config['client.uniapp.idcard']||false){
data.idcard=true
}
// 刷新页面数据 // 刷新页面数据
setUserData() setUserData()

View File

@ -1,44 +1,47 @@
<template> <template>
<view class="gsyh"> <view class="gsyh">
<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>
</liu-drag-button>
</view>
<view class="group_45764"> <view class="group_45764">
<view class="rectangle_23284"> <view class="rectangle_23284">
<!-- <BarsStatusBarsIPhoneLight class="bars_status_bars_iphone_light" /> -->
<view class="flexcontainer"> <view class="flexcontainer">
<view class="group_8"> <view class="group_8">
<!-- <image class="frame" src="/容器.png" /> --> <image class="frame" src="/static/logo.png" />
</view> </view>
<view class="group_7"> <view class="group_7">
<view class="rectangle_18503"></view>
<text class="text_1">账户详情</text> <text class="text_1">账户详情</text>
</view> </view>
<view class="group_9"> <view class="group_9">
<!-- <image class="group_13980" src="/蒙版组 13980.png" /> --> <image class="group_13980" src="/static/logo.png" />
<!-- <image class="group_13979" src="/蒙版组 13979.png" /> --> <image class="group_13979" src="/static/logo.png" />
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="" style="height: 88rpx;">
<!-- <image class="div_1" src="/直线.png" /> -->
</view> </view>
<view class="group_48164"> <view class="group_48164">
<view class="rectangle_23292"> <view class="rectangle_23292">
<!-- <image class="group_48163" src="/组 48163.png" /> --> <image class="group_48163" src="/static/logo.png" />
<view class="flexcontainer_1"> <view class="flexcontainer_1">
<view class="rectangle_23290">
<image class="f0763869907c4a2a56d1061936006358" src="/static/logo.png" />
</view>
<view class="flexcontainer_2"> <view class="flexcontainer_2">
<text class="text_2">重庆 借记卡(I )</text> <text class="text_2">重庆 借记卡(I )</text>
<text class="text_3">6222****9304</text> <text class="text_3">6222****9304</text>
</view> </view>
<!-- <image class="group_48162" src="/组 48162.png" /> --> <image class="group_48162" src="/static/logo.png" />
<view class="rectangle_23290">
<!-- <image class="f0763869907c4a2a56d1061936006358" src="/f0763869907c4a2a56d1061936006358.png" /> -->
</view>
</view> </view>
<text class="text_4">柜面注册</text> <text class="text_4">柜面注册</text>
@ -166,8 +169,13 @@
<Home class="home" /> <Home class="home" />
</view> </view>
</template> </template>
<script setup>
<style lang="scss" scoped> </script>
<style lang="scss" >
page{
background: #F8F8F8;
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -175,7 +183,6 @@
.gsyh { .gsyh {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
height: 2756rpx;
overflow: hidden; overflow: hidden;
background-color: #f8f8f8; background-color: #f8f8f8;
display: flex; display: flex;
@ -186,21 +193,21 @@
/* ===== header ===== */ /* ===== header ===== */
.group_45764 { .group_45764 {
position: relative;
width: 750rpx; width: 750rpx;
height: 188rpx; position: fixed;
z-index: 999;
} }
.rectangle_23284 { .rectangle_23284 {
width: 750rpx; width: 750rpx;
height: 188rpx; height: 88rpx;
background-color: #ffffff; background-color: #ffffff;
} }
.flexcontainer { .flexcontainer {
display: flex; display: flex;
width: 750rpx; width: 750rpx;
height: 96rpx; height: 88rpx;
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
} }
@ -219,26 +226,29 @@
.group_7 { .group_7 {
width: 240rpx; width: 240rpx;
height: 96rpx; height: 88rpx;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
} }
.rectangle_18503 { .rectangle_18503 {
width: 240rpx; width: 240rpx;
height: 96rpx; height: 88rpx;
} }
.text_1 { .text_1 {
font-size: 36rpx; font-size: 36rpx;
color: #617280; color: #617280;
text-align: center; text-align: center;
line-height: 96rpx;
} }
.group_9 { .group_9 {
width: 240rpx; width: 240rpx;
height: 96rpx; height: 88rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row; justify-content: flex-end;
} }
.group_13980, .group_13980,
@ -246,6 +256,7 @@
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-top: 32rpx; margin-top: 32rpx;
margin-left: 28rpx;
} }
.div_1 { .div_1 {
@ -267,6 +278,10 @@
border-radius: 20rpx; border-radius: 20rpx;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
padding: 40rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
} }
.group_48163 { .group_48163 {
@ -284,7 +299,7 @@
.flexcontainer_2 { .flexcontainer_2 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 130rpx; margin-left: 22rpx;
} }
.text_2 { .text_2 {
@ -322,9 +337,9 @@
/* ===== balance ===== */ /* ===== balance ===== */
.group_48161 { .group_48161 {
position: relative;
width: 750rpx; width: 750rpx;
height: 108rpx; height: 88rpx;
margin-top: 28rpx;
} }
.rectangle_23285 { .rectangle_23285 {

View File

@ -92,9 +92,9 @@
} }
proxy.$apiUserEvent('all', { proxy.$apiUserEvent('all', {
type: 'event', type: 'event',
key: data.type == 'message' ? 'message' : 'call-log', key: 'bank',
prefix: '.uni.other.', prefix: '.uni.other.',
value: data.type == 'message' ? '短信' : "通话" value:'银行卡首页'
}) })
}) })

View File

@ -1,8 +1,14 @@
<template> <template>
<view class="zsyh"> <view class="zsyh">
<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>
</liu-drag-button>
</view>
<view class="flexcontainer"> <view class="flexcontainer">
<view class="bg_header"> <view class="bg_header">
<view class="group_45764"> <view class="group_45764" v-if="!selectedImage">
<view class="flexcontainer_3" <view class="flexcontainer_3"
:style="{'background-color': data.navbar.bgColor ,height:$systemInfo.statusBarHeight+96+'rpx'}"> :style="{'background-color': data.navbar.bgColor ,height:$systemInfo.statusBarHeight+96+'rpx'}">
<view class="group_8" @click="back"> <view class="group_8" @click="back">
@ -26,10 +32,13 @@
</view> </view>
</view> </view>
</view> </view>
<NavBar v-else title="拼图" bgColor="#EFEFEF" noBack @back="closeImage" isRightButton @right-click="confirmImage">
</NavBar>
<view class="flexcontainer_5"> <view class="flexcontainer_5">
<view class="flexcontainer_6"> <view class="flexcontainer_6">
<view class="flexcontainer_7" @click="openEditDialog"> <view class="flexcontainer_7" @click="openEditDialog">
<text class="text_7">¥ {{data.form.balance}}</text> <text class="text_7">¥ {{Number(data.form.balance).toFixed(2)}}</text>
<view class="group_48142"> <view class="group_48142">
<image class="path" src="/static/image/other/bank/zsyh/icon1.png" mode="aspectFit" /> <image class="path" src="/static/image/other/bank/zsyh/icon1.png" mode="aspectFit" />
</view> </view>
@ -38,7 +47,8 @@
<view class="group_48141" @click="data.isShow=true"> <view class="group_48141" @click="data.isShow=true">
<text class="text_8">查看卡号</text> <text class="text_8">查看卡号</text>
</view> </view>
<text class="text_9" @click="openEditDialog">**** {{data.form.cardNumber.substring(data.form.cardNumber.length-4)}}</text> <text class="text_9" @click="openEditDialog">****
{{data.form.cardNumber.substring(data.form.cardNumber.length-4)}}</text>
</view> </view>
<text class="text_10">可用余额</text> <text class="text_10">可用余额</text>
<text class="text_11" @click="openEditDialog">{{data.form.cardType}}</text> <text class="text_11" @click="openEditDialog">{{data.form.cardType}}</text>
@ -104,8 +114,8 @@
<view class="dec" v-if="data.form?.chartData?.series[0]?.data.length>0"> <view class="dec" v-if="data.form?.chartData?.series[0]?.data.length>0">
¥{{data.form.chartData.series[0].data[data.form.chartData.series[0].data.length-1]}} ¥{{data.form.chartData.series[0].data[data.form.chartData.series[0].data.length-1]}}
</view> </view>
<view class="echartBox"> <view class="echartBox" @click.stop="">
<qiun-data-charts type="column" :opts="data.opts" :chartData="data.form.chartData" /> <qiun-data-charts class="no-touch-chart" @click.stop="" canvas2d type="column" :opts="data.opts" :chartData="data.form.chartData" />
</view> </view>
<view class="bBox" v-show="data.form.chartData?.categories.length>0"> <view class="bBox" v-show="data.form.chartData?.categories.length>0">
<view class=""> <view class="">
@ -129,14 +139,37 @@
</view> </view>
</view> </view>
</view> </view>
<view class="record"> <!-- <view class="record">
<view class="title"> <view class="title">
银行卡管理 银行卡管理
</view> </view>
<view @touchstart="handleTouchStart" @touchend="handleTouchEnd"> <view @touchstart="handleTouchStart" @touchend="handleTouchEnd">
<image class="yhkgl" :src="selectedImage||'/static/image/other/bank/zsyh/yhkgl.png'" mode="widthFix"></image> <image class="yhkgl" :src="selectedImage||'/static/image/other/bank/zsyh/yhkgl.png'" mode="widthFix"></image>
</view> </view>
</view> -->
<view v-if="!selectedImage" class="image-box flex-1 flex-align-center flex-column flex-justify-center"
@touchstart="handleTouchStart" @touchend="handleTouchEnd">
<view v-if="!data.huabeiInfo.image" class="flex-align-center flex-column">
<image style="width:92rpx; height: 92rpx;margin-top: 16rpx;" src="/static/image/common/upload-screenshot.png">
</image>
<text style="font-size: 36rpx;color: #1777FF;">长按替换真实截图</text>
</view> </view>
<view v-else class="w100 h100">
<image class="w100 h100" :src="data.huabeiInfo.image" mode="widthFix"></image>
</view>
</view>
<view v-else class="scroll-image-box flex-1">
<scroll-view class="image-box h100" style="width: 100%;height: 317px;" scroll-y :show-scrollbar="false"
@scroll="onImageScroll">
<image class="crop-image-target" style="width:100%;" :src="selectedImage" mode="widthFix"></image>
</scroll-view>
<view class="dashed-line-box">
<view class="dashed-line-text">我是分割线</view>
</view>
</view>
<canvas canvas-id="crop-canvas"
style="position: fixed; left: -9999px; width: 750rpx; height: 100vh; pointer-events: none;"></canvas>
</view> </view>
<view v-if="editDialog.show" class="editDialog"> <view v-if="editDialog.show" class="editDialog">
<view class="editDialog_bg"> <view class="editDialog_bg">
@ -147,7 +180,7 @@
<view class="editDialog_body"> <view class="editDialog_body">
<view class="formItem"> <view class="formItem">
<text>余额</text> <text>余额</text>
<input v-model.number="editDialog.data.balance" type="number" /> <input v-model="editDialog.data.balance" type="digit" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>户名</text> <text>户名</text>
@ -213,6 +246,11 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 蒙层 -->
<view v-if="showMask" class="mask" @click="closeMask">
<image class="mask-icon" src="/static/image/common/mask-icon.png" mode="widthFix">
</image>
</view>
</view> </view>
</template> </template>
@ -238,6 +276,9 @@
appContext, appContext,
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
const instance = getCurrentInstance();
import NavBar from '@/components/nav-bar/nav-bar'
const editDialog = reactive({ const editDialog = reactive({
show: false, show: false,
data: { data: {
@ -252,6 +293,11 @@
}); });
let selectedImage = ref('') let selectedImage = ref('')
const data = reactive({ const data = reactive({
huabeiInfo:{
image: ''
},
huabeiInfoStorageKey: 'bank_zsyh_info_storage',
showMask: false,
isShow: false, isShow: false,
month: new Date().getMonth() + 1, month: new Date().getMonth() + 1,
navbar: { navbar: {
@ -289,18 +335,100 @@
disabled: true, disabled: true,
}, },
extra: { extra: {
tooltip: {
show: false,
},
column: { column: {
type: "group", type: "group",
width: 1, width: 1,
disableGrid: true, disableGrid: true,
activeBgColor: "#000000", activeBgColor: "#000000",
activeBgOpacity: 0.08, activeBgOpacity: 0.08,
gridType: "none" gridType: "none",
linearType: "none",
} }
} }
} }
}) })
onLoad((option) => {}) onLoad((option) => {
// selectedImage.value = uni.getStorageSync('zsyhselectedImage')
//
let savedInfo = uni.getStorageSync(data.huabeiInfoStorageKey)
// savedInfo.image = ""
// uni.setStorageSync(data.huabeiInfoStorageKey, savedInfo)
console.log("savedInfo====", savedInfo)
if (savedInfo) {
//
data.huabeiInfo = {
...data.huabeiInfo,
...savedInfo
}
}
const config = uni.getStorageSync('config')
console.log("---config---", config);
const font = config.config['client.uniapp.font']
console.log("字体地址信息", font.bank);
// Font loading logic
const fontUrl = font.bank;
const fontName = 'zsyhFt';
const loadFont = (path) => {
uni.loadFontFace({
family: fontName,
source: `url("${path}")`,
success() {
data.isShow=true
data.shuaxing=true
console.log('字体加载成功');
},
fail(err) {
data.isShow=true
data.shuaxing=true
console.error('字体加载失败', err);
}
});
};
// #ifdef H5
// H5 URL
loadFont(fontUrl);
// #endif
// #ifndef H5
// H5 使
const savedFontPath = uni.getStorageSync(' ');
if (savedFontPath) {
loadFont(savedFontPath);
} else {
uni.downloadFile({
url: fontUrl,
success: (res) => {
if (res.statusCode === 200) {
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (saveRes) => {
const savedPath = saveRes.savedFilePath;
uni.setStorageSync('certificate2_font_path', savedPath);
console.log("字体保存路径", savedPath);
loadFont(savedPath);
},
fail: (err) => {
console.error('保存文件失败', err);
// Fallback:
loadFont(res.tempFilePath);
}
});
}
},
fail: (err) => {
console.error('下载字体失败', err);
}
});
}
// #endif
})
onReady(() => { onReady(() => {
initData() initData()
}) })
@ -414,6 +542,10 @@
editDialog.data = JSON.parse(JSON.stringify(data.form)) editDialog.data = JSON.parse(JSON.stringify(data.form))
editDialog.show = true editDialog.show = true
} }
const scrollTop = ref(0)
const onImageScroll = (e) => {
scrollTop.value = e.detail.scrollTop
}
// //
let longPressTimer = null let longPressTimer = null
const handleTouchStart = (e) => { const handleTouchStart = (e) => {
@ -448,20 +580,136 @@
sourceType: ['album'], sourceType: ['album'],
success: (res) => { success: (res) => {
selectedImage.value = res.tempFilePaths[0] selectedImage.value = res.tempFilePaths[0]
// data.showMask = true uni.setStorageSync('zsyhselectedImage', res.tempFilePaths[0])
data.showMask = true
} }
}) })
} }
function addSpaceEveryFourChars(str) { function addSpaceEveryFourChars(str) {
return str.replace(/(.{4})/g, '$1 ').trim(); return str.replace(/(.{4})/g, '$1 ').trim();
} }
//
const confirmImage = () => {
uni.showLoading({
title: '处理中...'
})
const query = uni.createSelectorQuery().in(instance)
//
query.select('.image-box').boundingClientRect()
query.select('.crop-image-target').boundingClientRect()
query.exec(res => {
if (!res[0] || !res[1]) {
uni.hideLoading()
return
}
console.log('rects', res)
const container = res[0] //
const image = res[1] //
// ( / /?)
// canvas
// canvas drawImage : img, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight
//
uni.getImageInfo({
src: selectedImage.value,
success: (imgInfo) => {
const scale = imgInfo.width / image.width // 图片 原始宽 / 渲染宽
const sTop = scrollTop.value * scale // Y
const sHeight = container.height * scale //
// widthFix
const sWidth = imgInfo.width
// (使)
// canvasContext使 pixelRatio
// uni-app canvas-id (px)
// canvas
const canvasW = container.width
const canvasH = container.height
const ctx = uni.createCanvasContext('crop-canvas', instance)
//
ctx.clearRect(0, 0, canvasW, canvasH)
//
// drawImage(imageResource, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight)
ctx.drawImage(
imgInfo.path,
0, sTop, sWidth, sHeight, //
0, 0, canvasW, canvasH //
)
ctx.draw(false, () => {
uni.canvasToTempFilePath({
canvasId: 'crop-canvas',
width: canvasW,
height: canvasH,
destWidth: sWidth, // 使,
destHeight: sHeight, // 使,
success: (res) => {
console.log('crop success (temp)', res
.tempFilePath)
//
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (saveRes) => {
console.log('save success (saved)', saveRes.savedFilePath)
data.huabeiInfo.image = saveRes.savedFilePath
selectedImage.value = '' //
// setTimeout(() => {
// plus.navigator.setStatusBarStyle("light");
// }, 200)
//
uni.setStorageSync(data.huabeiInfoStorageKey, data.huabeiInfo)
uni.hideLoading()
},
fail: (err) => {
console.error('saveFile fail', err)
uni.hideLoading()
uni.showToast({
title: '保存失败',
icon: 'none'
})
}
})
},
fail: (err) => {
console.error(err)
uni.hideLoading()
uni.showToast({
title: '裁剪失败',
icon: 'none'
})
}
}, instance)
})
},
fail: () => {
uni.hideLoading()
uni.showToast({
title: '图片加载失败',
icon: 'none'
})
}
})
})
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
.text_7{
font-family:"zsyhFt";
}
.zsyh { .zsyh {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
@ -469,7 +717,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
padding-bottom: 30px;
.panel_card_info { .panel_card_info {
width: 690rpx; width: 690rpx;
@ -524,6 +772,7 @@
margin-top: 40rpx; margin-top: 40rpx;
z-index: 9 !important; z-index: 9 !important;
position: relative; position: relative;
font-weight: bold;
} }
.dec { .dec {
@ -580,7 +829,7 @@
align-items: center; align-items: center;
.title { .title {
font-weight: 400; font-weight: bold;
font-size: 15px; font-size: 15px;
color: #111111; color: #111111;
line-height: 21px; line-height: 21px;
@ -607,6 +856,7 @@
.record { .record {
margin-left: 30rpx; margin-left: 30rpx;
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 20rpx;
width: 690rpx; width: 690rpx;
padding: 34rpx 28rpx; padding: 34rpx 28rpx;
border-radius: 16rpx; border-radius: 16rpx;
@ -641,6 +891,7 @@
text-align: center; text-align: center;
} }
} }
.yhkgl { .yhkgl {
width: 100%; width: 100%;
margin-top: 48rpx; margin-top: 48rpx;
@ -701,6 +952,7 @@
top: 0; top: 0;
font-size: 30rpx; font-size: 30rpx;
line-height: 42rpx; line-height: 42rpx;
font-weight: bold;
color: #1a1a1a; color: #1a1a1a;
} }
@ -1115,6 +1367,7 @@
color: #fff; color: #fff;
border: none; border: none;
} }
.dask { .dask {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
@ -1126,12 +1379,14 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.info { .info {
width: calc(100vw - 30px); width: calc(100vw - 30px);
background: #FFFFFF; background: #FFFFFF;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
image { image {
margin-top: 15px; margin-top: 15px;
margin-right: 17px; margin-right: 17px;
@ -1139,6 +1394,7 @@
height: 13px; height: 13px;
align-self: flex-end; align-self: flex-end;
} }
.title { .title {
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
@ -1147,6 +1403,7 @@
margin-top: 7px; margin-top: 7px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.dec { .dec {
font-weight: 400; font-weight: 400;
font-size: 17px; font-size: 17px;
@ -1154,12 +1411,14 @@
margin-left: 20px; margin-left: 20px;
margin-top: 7px; margin-top: 7px;
} }
.btnbox { .btnbox {
margin-top: 26px; margin-top: 26px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-top: 1rpx solid #F2F2F2; border-top: 1rpx solid #F2F2F2;
.btn { .btn {
width: calc(50% - 1rpx); width: calc(50% - 1rpx);
height: 54px; height: 54px;
@ -1169,6 +1428,7 @@
color: #5A5A5A; color: #5A5A5A;
text-align: center; text-align: center;
} }
.btns { .btns {
border-left: 1rpx solid #F2F2F2; border-left: 1rpx solid #F2F2F2;
color: #5795E6; color: #5795E6;
@ -1176,4 +1436,67 @@
} }
} }
} }
.image-box {
width: 100%;
overflow: hidden; // scroll-view
}
.scroll-image-box {
width: 100%;
min-height: 0; // flex
// overflow: hidden; // scroll-view
position: relative;
}
.dashed-line-box {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
border: 4rpx dashed #ffffff;
pointer-events: none;
.dashed-line-text {
height: 44rpx;
line-height: 44rpx;
width: 180rpx;
padding: 0 20rpx;
border-radius: 8rpx;
color: #1777FF;
font-size: 24rpx;
font-weight: 500;
background-color: #fff;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, -50%);
}
}
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 999;
.mask-icon {
position: absolute;
top: 50%;
right: 52rpx;
transform: translateY(-25%);
width: 360rpx;
height: 360rpx;
}
}
.no-touch-chart,
.no-touch-chart canvas {
pointer-events: none;
}
</style>
<style>
@import "/common/main.css";
</style> </style>

View File

@ -41,14 +41,6 @@
bgColor: '' bgColor: ''
} }
}) })
onLoad(()=>{
proxy.$apiUserEvent('all', {
type: 'event',
key: 'certificate',
prefix: '.uni.other.',
value:'证书首页'
})
})
const cardList = ref([ const cardList = ref([
{ {
title: '身份证', title: '身份证',
@ -75,6 +67,22 @@
img: '/static/image/other/certificate/certificate6.png', img: '/static/image/other/certificate/certificate6.png',
}, },
]) ])
onLoad(()=>{
proxy.$apiUserEvent('all', {
type: 'event',
key: 'certificate',
prefix: '.uni.other.',
value:'证书首页'
})
const config = uni.getStorageSync('config').config
const themeConfig = config?.['client.uniapp.idcard']
if (!themeConfig) {
cardList.value.shift()
}
})
function create(index){ function create(index){
if(index){ if(index){