Compare commits
No commits in common. "dab4d15c241b28dd00aa5c2299302bffc8ff3815" and "033a3bd9ba66d66d3767c681465ce2cedbcd5c19" have entirely different histories.
dab4d15c24
...
033a3bd9ba
|
|
@ -222,11 +222,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.header_xiaomi{
|
||||
.search{
|
||||
.left{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
{{ getAvatarText(item.name) }}
|
||||
</view>
|
||||
<!-- 显示图片头像 -->
|
||||
<image class="iosAvatar" v-else-if="type == 'ios' && item.avatar" :src="item.avatar" mode="aspectFill"></image>
|
||||
<image class="iosAvatar" v-else-if="type == 'ios' && item.avatar" :src="item.avatar" mode=""></image>
|
||||
<!-- 默认头像 -->
|
||||
<image v-else-if="type == 'ios'" src="/static/image/call/iosAvatar.png" mode=""></image>
|
||||
<!-- 其他类型的状态图标 -->
|
||||
|
|
@ -900,11 +900,12 @@
|
|||
addForm.yys = '';
|
||||
addForm.kj = '1';
|
||||
addForm.address = '';
|
||||
addForm.time = `${currentYear}-${currentMonth + 1}-${currentDay} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`;
|
||||
addForm.time =
|
||||
`${currentYear}-${currentMonth + 1}-${currentDay} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`;
|
||||
addForm.status = 0;
|
||||
addForm.notes = '';
|
||||
showAddModal.value = true;
|
||||
console.log(addForm)
|
||||
console.log(showAddModal.value)
|
||||
};
|
||||
|
||||
const closeAddModal = () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="footer" :class="['footer_'+type]" :style="data.style">
|
||||
<view class="footer" :class="['footer_'+type]">
|
||||
<view class="item" v-for="(item,index) in list" :key="index">
|
||||
<image :src="`/static/image/call/${type}TabbarImg${index+1}.png`" mode=""></image>
|
||||
<text>{{item}}</text>
|
||||
|
|
@ -38,16 +38,11 @@
|
|||
type: String,
|
||||
default: 'ios'
|
||||
},
|
||||
type2: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
})
|
||||
|
||||
const data = reactive({
|
||||
statusBarHeight: 0,
|
||||
showTipLayer: true,
|
||||
style:{},
|
||||
list: [
|
||||
"个人收藏",
|
||||
"最近通话",
|
||||
|
|
@ -84,10 +79,6 @@
|
|||
"收藏"
|
||||
]
|
||||
}
|
||||
if(props.type2=='ios'){
|
||||
data.style={'background-color':props.bgColor}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
2
main.js
2
main.js
|
|
@ -29,7 +29,7 @@ export function createApp() {
|
|||
app.config.globalProperties.$system = plus.os.name;
|
||||
// #endif
|
||||
app.config.globalProperties.$systemInfo = systemInfo
|
||||
uni.setStorageSync('version', '1.0.5.sp20')
|
||||
uni.setStorageSync('version', '1.0.5.sp16')
|
||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||
app.use(globalMethods);
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<template v-for="(item,index) in data.list" :key="index">
|
||||
<text class="text_8"> {{formatTime(item.start_time)[1]}}
|
||||
{{['去电','去电','去电','未接来电','来电','来电'][item.status]}} </text>
|
||||
<text class="text_9" v-if="item.start_number"> {{item.start_number}}秒钟 </text>
|
||||
<text class="text_9"> {{item.start_number}}秒钟 </text>
|
||||
</template>
|
||||
<br />
|
||||
</view>
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
<view style="height: 100rpx;">
|
||||
|
||||
</view>
|
||||
<tabbar type2='ios'/>
|
||||
<tabbar />
|
||||
</view>
|
||||
<view class="xiaomi" v-else-if="data.type=='xiaomi'">
|
||||
<view class="container" >
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
<!-- 通话记录 -->
|
||||
<view class="group_48093" @click="openEditModal()">
|
||||
<view class="rectangle_23161">
|
||||
<view class="call-item " v-for="(item,index) in data.list" :key="index" :class="{'no-border':data.list.length-1==index}">
|
||||
<view class="call-item no-border" v-for="(item,index) in data.list" :key="index">
|
||||
<view class="call-top">
|
||||
<image class="small-icon"
|
||||
:src="`/static/image/call/detail/oppo${['WJ','BC','GD','LD','LD','LD'][item.status]}.png`" />
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
<view class="call-bottom">
|
||||
<image class="status-icon" :src="`/static/image/call/detail/oppo${['K1','K2'][item.kj]}.png`" />
|
||||
<text class="call-desc">{{formatString(data.info.phone)}}
|
||||
{{['未接','挂断 响铃','挂断','未接 响铃','挂断 响铃','来电'][item.status]}} {{item.start_number||0}} 秒</text>
|
||||
{{['未接','播出','挂断','来电','来电','来电'][item.status]}} {{item.start_number||0}} 秒</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
|
|
@ -361,7 +361,7 @@
|
|||
</view>
|
||||
<view class="popup-box-item">
|
||||
响铃秒数:<!-- 响铃秒数 -->
|
||||
<input v-model="tempList[index].start_number" type="number" placeholder="响铃秒数(ios为0不显示)" />
|
||||
<input v-model="tempList[index].start_number" type="number" placeholder="响铃秒数" />
|
||||
</view>
|
||||
<view class="popup-box-item">
|
||||
开始时间:<!-- 开始时间 -->
|
||||
|
|
@ -1375,7 +1375,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
font-size: 76rpx;
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(180deg, #A1A8B8 0%, #878B94 100%);
|
||||
margin: 52rpx auto 0;
|
||||
|
|
@ -1772,8 +1772,8 @@
|
|||
margin-top: 14rpx;
|
||||
margin-bottom: -4rpx;
|
||||
width: max-content;
|
||||
margin-left: 60rpx;
|
||||
// margin-right: auto;
|
||||
margin-left: calc(50% - 24rpx);
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2266,9 +2266,7 @@
|
|||
}
|
||||
|
||||
.call-item {
|
||||
position: relative;
|
||||
padding: 32rpx 28rpx ;
|
||||
// padding-bottom: 32rpx;
|
||||
padding: 32rpx 28rpx 0;
|
||||
}
|
||||
|
||||
.call-top {
|
||||
|
|
@ -2314,15 +2312,14 @@
|
|||
}
|
||||
|
||||
.line {
|
||||
width: calc(100% - 104rpx);
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #dfdfdf;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right:32rpx;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
padding-bottom: 32rpx;
|
||||
|
||||
.line {
|
||||
display: none;
|
||||
|
|
@ -2460,7 +2457,7 @@
|
|||
font-family: OPPOSans;
|
||||
font-weight: 400;
|
||||
line-height: 42rpx;
|
||||
color: #767676;
|
||||
color: var(--, #767676);
|
||||
white-space: pre;
|
||||
height: 42rpx;
|
||||
margin-top: -7rpx;
|
||||
|
|
@ -2578,7 +2575,7 @@
|
|||
font-family: OPPOSans;
|
||||
font-weight: 400;
|
||||
line-height: 42rpx;
|
||||
color: #767676;
|
||||
color: var(--, #767676);
|
||||
white-space: pre;
|
||||
height: 42rpx;
|
||||
margin-top: 4rpx;
|
||||
|
|
|
|||
|
|
@ -114,12 +114,11 @@
|
|||
<view class="group-box">
|
||||
<image class="title-img" src="/static/image/index/qita.png"></image>
|
||||
<view class="video-help-box">
|
||||
<template v-for="item in otherList" :key="item.id">
|
||||
<view class="video-help-item" :style="{ width: (windowWidth - 32) / 4 + 'px' }" @click="clickMenu(item)" v-if="isShowBankIdCard(item)">
|
||||
<view class="video-help-item" :style="{ width: (windowWidth - 32) / 4 + 'px' }"
|
||||
v-for="item in otherList" :key="item.id" @click="clickMenu(item)">
|
||||
<image class="video-help-img" :src="item.icon"></image>
|
||||
<text class="video-help-title">{{ item.name }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -317,9 +316,7 @@ const data = reactive({
|
|||
noticeInfo: {},
|
||||
vision: "",
|
||||
platform: '', // 添加平台信息,
|
||||
qqgroup: {},
|
||||
idcard:false,
|
||||
bank:false
|
||||
qqgroup: {}
|
||||
})
|
||||
|
||||
const {
|
||||
|
|
@ -392,23 +389,7 @@ onShow(() => {
|
|||
}, 800);
|
||||
// #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
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取用户数据(从服务器)
|
||||
*/
|
||||
|
|
@ -432,17 +413,11 @@ const fetchUserData = async () => {
|
|||
|
||||
// 处理用户配置结果
|
||||
if (configResult.status === 'fulfilled') {
|
||||
console.log('用户配置获取成功',configResult)
|
||||
console.log('用户配置获取成功')
|
||||
} else {
|
||||
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()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,47 +1,44 @@
|
|||
<template>
|
||||
<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="rectangle_23284">
|
||||
<!-- <BarsStatusBarsIPhoneLight class="bars_status_bars_iphone_light" /> -->
|
||||
|
||||
<view class="flexcontainer">
|
||||
<view class="group_8">
|
||||
<image class="frame" src="/static/logo.png" />
|
||||
<!-- <image class="frame" src="/容器.png" /> -->
|
||||
</view>
|
||||
|
||||
<view class="group_7">
|
||||
<view class="rectangle_18503"></view>
|
||||
<text class="text_1">账户详情</text>
|
||||
</view>
|
||||
|
||||
<view class="group_9">
|
||||
<image class="group_13980" src="/static/logo.png" />
|
||||
<image class="group_13979" src="/static/logo.png" />
|
||||
<!-- <image class="group_13980" src="/蒙版组 13980.png" /> -->
|
||||
<!-- <image class="group_13979" src="/蒙版组 13979.png" /> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height: 88rpx;">
|
||||
|
||||
<!-- <image class="div_1" src="/直线.png" /> -->
|
||||
</view>
|
||||
|
||||
<view class="group_48164">
|
||||
<view class="rectangle_23292">
|
||||
<image class="group_48163" src="/static/logo.png" />
|
||||
<!-- <image class="group_48163" src="/组 48163.png" /> -->
|
||||
|
||||
<view class="flexcontainer_1">
|
||||
<view class="rectangle_23290">
|
||||
<image class="f0763869907c4a2a56d1061936006358" src="/static/logo.png" />
|
||||
</view>
|
||||
<view class="flexcontainer_2">
|
||||
<text class="text_2">重庆 借记卡(I 类)</text>
|
||||
<text class="text_3">6222****9304</text>
|
||||
</view>
|
||||
|
||||
<image class="group_48162" src="/static/logo.png" />
|
||||
<!-- <image class="group_48162" src="/组 48162.png" /> -->
|
||||
|
||||
<view class="rectangle_23290">
|
||||
<!-- <image class="f0763869907c4a2a56d1061936006358" src="/f0763869907c4a2a56d1061936006358.png" /> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<text class="text_4">柜面注册</text>
|
||||
|
|
@ -169,13 +166,8 @@
|
|||
<Home class="home" />
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
page{
|
||||
background: #F8F8F8;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
|
@ -183,6 +175,7 @@
|
|||
.gsyh {
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
height: 2756rpx;
|
||||
overflow: hidden;
|
||||
background-color: #f8f8f8;
|
||||
display: flex;
|
||||
|
|
@ -193,21 +186,21 @@
|
|||
|
||||
/* ===== header ===== */
|
||||
.group_45764 {
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
height: 188rpx;
|
||||
}
|
||||
|
||||
.rectangle_23284 {
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
height: 188rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.flexcontainer {
|
||||
display: flex;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
height: 96rpx;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
|
@ -226,29 +219,26 @@
|
|||
|
||||
.group_7 {
|
||||
width: 240rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
height: 96rpx;
|
||||
}
|
||||
|
||||
.rectangle_18503 {
|
||||
width: 240rpx;
|
||||
height: 88rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
|
||||
.text_1 {
|
||||
font-size: 36rpx;
|
||||
color: #617280;
|
||||
text-align: center;
|
||||
line-height: 96rpx;
|
||||
}
|
||||
|
||||
.group_9 {
|
||||
width: 240rpx;
|
||||
height: 88rpx;
|
||||
height: 96rpx;
|
||||
display: flex;
|
||||
flex-direction: row; justify-content: flex-end;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.group_13980,
|
||||
|
|
@ -256,7 +246,6 @@
|
|||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-top: 32rpx;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
|
||||
.div_1 {
|
||||
|
|
@ -278,10 +267,6 @@
|
|||
border-radius: 20rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
|
||||
padding: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.group_48163 {
|
||||
|
|
@ -299,7 +284,7 @@
|
|||
.flexcontainer_2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 22rpx;
|
||||
margin-left: 130rpx;
|
||||
}
|
||||
|
||||
.text_2 {
|
||||
|
|
@ -337,9 +322,9 @@
|
|||
|
||||
/* ===== balance ===== */
|
||||
.group_48161 {
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
height: 108rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.rectangle_23285 {
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@
|
|||
}
|
||||
proxy.$apiUserEvent('all', {
|
||||
type: 'event',
|
||||
key: 'bank',
|
||||
key: data.type == 'message' ? 'message' : 'call-log',
|
||||
prefix: '.uni.other.',
|
||||
value:'银行卡首页'
|
||||
value: data.type == 'message' ? '短信' : "通话"
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,8 @@
|
|||
<template>
|
||||
<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="bg_header">
|
||||
<view class="group_45764" v-if="!selectedImage">
|
||||
<view class="group_45764">
|
||||
<view class="flexcontainer_3"
|
||||
:style="{'background-color': data.navbar.bgColor ,height:$systemInfo.statusBarHeight+96+'rpx'}">
|
||||
<view class="group_8" @click="back">
|
||||
|
|
@ -32,13 +26,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<NavBar v-else title="拼图" bgColor="#EFEFEF" noBack @back="closeImage" isRightButton @right-click="confirmImage">
|
||||
</NavBar>
|
||||
<view class="flexcontainer_5">
|
||||
<view class="flexcontainer_6">
|
||||
<view class="flexcontainer_7" @click="openEditDialog">
|
||||
<text class="text_7">¥ {{Number(data.form.balance).toFixed(2)}}</text>
|
||||
<text class="text_7">¥ {{data.form.balance}}</text>
|
||||
<view class="group_48142">
|
||||
<image class="path" src="/static/image/other/bank/zsyh/icon1.png" mode="aspectFit" />
|
||||
</view>
|
||||
|
|
@ -47,8 +38,7 @@
|
|||
<view class="group_48141" @click="data.isShow=true">
|
||||
<text class="text_8">查看卡号</text>
|
||||
</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>
|
||||
<text class="text_10">可用余额</text>
|
||||
<text class="text_11" @click="openEditDialog">{{data.form.cardType}}</text>
|
||||
|
|
@ -114,8 +104,8 @@
|
|||
<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]}}
|
||||
</view>
|
||||
<view class="echartBox" @click.stop="">
|
||||
<qiun-data-charts class="no-touch-chart" @click.stop="" canvas2d type="column" :opts="data.opts" :chartData="data.form.chartData" />
|
||||
<view class="echartBox">
|
||||
<qiun-data-charts type="column" :opts="data.opts" :chartData="data.form.chartData" />
|
||||
</view>
|
||||
<view class="bBox" v-show="data.form.chartData?.categories.length>0">
|
||||
<view class="">
|
||||
|
|
@ -139,37 +129,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="record">
|
||||
<view class="record">
|
||||
<view class="title">
|
||||
银行卡管理
|
||||
</view>
|
||||
<view @touchstart="handleTouchStart" @touchend="handleTouchEnd">
|
||||
<image class="yhkgl" :src="selectedImage||'/static/image/other/bank/zsyh/yhkgl.png'" mode="widthFix"></image>
|
||||
</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 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 v-if="editDialog.show" class="editDialog">
|
||||
<view class="editDialog_bg">
|
||||
|
|
@ -180,7 +147,7 @@
|
|||
<view class="editDialog_body">
|
||||
<view class="formItem">
|
||||
<text>余额</text>
|
||||
<input v-model="editDialog.data.balance" type="digit" />
|
||||
<input v-model.number="editDialog.data.balance" type="number" />
|
||||
</view>
|
||||
<view class="formItem">
|
||||
<text>户名</text>
|
||||
|
|
@ -246,11 +213,6 @@
|
|||
</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>
|
||||
</template>
|
||||
|
||||
|
|
@ -276,9 +238,6 @@
|
|||
appContext,
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
const instance = getCurrentInstance();
|
||||
import NavBar from '@/components/nav-bar/nav-bar'
|
||||
|
||||
const editDialog = reactive({
|
||||
show: false,
|
||||
data: {
|
||||
|
|
@ -293,11 +252,6 @@
|
|||
});
|
||||
let selectedImage=ref('')
|
||||
const data = reactive({
|
||||
huabeiInfo:{
|
||||
image: ''
|
||||
},
|
||||
huabeiInfoStorageKey: 'bank_zsyh_info_storage',
|
||||
showMask: false,
|
||||
isShow:false,
|
||||
month : new Date().getMonth() + 1,
|
||||
navbar: {
|
||||
|
|
@ -335,100 +289,18 @@
|
|||
disabled: true,
|
||||
},
|
||||
extra: {
|
||||
tooltip: {
|
||||
show: false,
|
||||
},
|
||||
column: {
|
||||
type: "group",
|
||||
width: 1,
|
||||
disableGrid: true,
|
||||
activeBgColor: "#000000",
|
||||
activeBgOpacity: 0.08,
|
||||
gridType: "none",
|
||||
linearType: "none",
|
||||
|
||||
gridType: "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
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
|
||||
})
|
||||
onLoad((option) => {})
|
||||
onReady(() => {
|
||||
initData()
|
||||
})
|
||||
|
|
@ -542,10 +414,6 @@
|
|||
editDialog.data = JSON.parse(JSON.stringify(data.form))
|
||||
editDialog.show = true
|
||||
}
|
||||
const scrollTop = ref(0)
|
||||
const onImageScroll = (e) => {
|
||||
scrollTop.value = e.detail.scrollTop
|
||||
}
|
||||
// 长按事件定时器
|
||||
let longPressTimer = null
|
||||
const handleTouchStart = (e) => {
|
||||
|
|
@ -580,136 +448,20 @@
|
|||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
selectedImage.value = res.tempFilePaths[0]
|
||||
uni.setStorageSync('zsyhselectedImage', res.tempFilePaths[0])
|
||||
data.showMask = true
|
||||
|
||||
// data.showMask = true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function addSpaceEveryFourChars(str) {
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.text_7{
|
||||
font-family:"zsyhFt";
|
||||
}
|
||||
|
||||
.zsyh {
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
|
|
@ -717,7 +469,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 30px;
|
||||
|
||||
|
||||
.panel_card_info {
|
||||
width: 690rpx;
|
||||
|
|
@ -772,7 +524,6 @@
|
|||
margin-top: 40rpx;
|
||||
z-index: 9 !important;
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dec {
|
||||
|
|
@ -829,7 +580,7 @@
|
|||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
color: #111111;
|
||||
line-height: 21px;
|
||||
|
|
@ -856,7 +607,6 @@
|
|||
.record {
|
||||
margin-left: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 690rpx;
|
||||
padding: 34rpx 28rpx;
|
||||
border-radius: 16rpx;
|
||||
|
|
@ -891,7 +641,6 @@
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.yhkgl{
|
||||
width: 100%;
|
||||
margin-top: 48rpx;
|
||||
|
|
@ -952,7 +701,6 @@
|
|||
top: 0;
|
||||
font-size: 30rpx;
|
||||
line-height: 42rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
|
|
@ -1367,7 +1115,6 @@
|
|||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dask{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
|
@ -1379,14 +1126,12 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.info{
|
||||
width: calc(100vw - 30px);
|
||||
background: #FFFFFF;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
image{
|
||||
margin-top: 15px;
|
||||
margin-right: 17px;
|
||||
|
|
@ -1394,7 +1139,6 @@
|
|||
height: 13px;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.title{
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
|
|
@ -1403,7 +1147,6 @@
|
|||
margin-top: 7px;
|
||||
margin-bottom:6px;
|
||||
}
|
||||
|
||||
.dec{
|
||||
font-weight: 400;
|
||||
font-size: 17px;
|
||||
|
|
@ -1411,14 +1154,12 @@
|
|||
margin-left: 20px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.btnbox{
|
||||
margin-top: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top: 1rpx solid #F2F2F2;
|
||||
|
||||
.btn{
|
||||
width: calc(50% - 1rpx);
|
||||
height: 54px;
|
||||
|
|
@ -1428,7 +1169,6 @@
|
|||
color: #5A5A5A;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btns{
|
||||
border-left: 1rpx solid #F2F2F2;
|
||||
color:#5795E6;
|
||||
|
|
@ -1436,67 +1176,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.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>
|
||||
|
|
@ -41,6 +41,14 @@
|
|||
bgColor: ''
|
||||
}
|
||||
})
|
||||
onLoad(()=>{
|
||||
proxy.$apiUserEvent('all', {
|
||||
type: 'event',
|
||||
key: 'certificate',
|
||||
prefix: '.uni.other.',
|
||||
value:'证书首页'
|
||||
})
|
||||
})
|
||||
const cardList = ref([
|
||||
{
|
||||
title: '身份证',
|
||||
|
|
@ -67,22 +75,6 @@
|
|||
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){
|
||||
if(index){
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue