Merge branch 'Branch_1' of https://git.u8t.cn/tangxinyue/alipay-emulator into Branch_1
# Conflicts: # main.js
2
main.js
|
|
@ -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.6.sp4')
|
uni.setStorageSync('version', '1.0.6.sp5')
|
||||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||||
app.use(globalMethods);
|
app.use(globalMethods);
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="rectangle_22292" style="position: fixed;left:0;top:0;overflow: hidden;"
|
<view class="rectangle_22292" style="position: fixed;left:0;top:0;overflow: hidden;"
|
||||||
:style="{background:(data.info.avatar?`rgba(0,0,0,0)`:'linear-gradient(180deg, #bdbec3 0%, #a0a2af 100%)')
|
:style="{background:(data.info.avatar&&data.headerHeight!='206'?`rgba(0,0,0,0)`:'linear-gradient(180deg, #bdbec3 0%, #a0a2af 100%)')
|
||||||
, height:data.headerHeight+'px'}">
|
, height:data.headerHeight+'px'}">
|
||||||
<view v-if="data.info.avatar" style="height:400rpx;"></view>
|
<view v-if="data.info.avatar" style="height:400rpx;"></view>
|
||||||
<image v-if="data.info.avatar" :src="data.info.avatar" mode="aspectFill"
|
<image v-if="data.info.avatar&&data.headerHeight!='206'" :src="data.info.avatar" mode="aspectFill"
|
||||||
style="width:100%;position: absolute;bottom: 0;left: 0;z-index:0;" :style="{height:data.headerHeight+'rpx'}"></image>
|
style="width:100%;position: absolute;bottom: 0;left: 0;z-index:0;" :style="{height:data.headerHeight+'px'}"></image>
|
||||||
<view class="status" :style="{height:$systemInfo.statusBarHeight+'px'}"> </view>
|
<view class="status" :style="{height:$systemInfo.statusBarHeight+'px'}"> </view>
|
||||||
<view class="flexcontainer" @click="openEditModalDetail()">
|
<view class="flexcontainer" @click="openEditModalDetail()">
|
||||||
<image @click.stop="back()" class="group_48089" src="/static/image/call/detail/iosBack.png" :style="{position: 'fixed',
|
<image @click.stop="back()" class="group_48089" src="/static/image/call/detail/iosBack.png" :style="{position: 'fixed',
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
{{data.info.name.substring(0,1)}}
|
{{data.info.name.substring(0,1)}}
|
||||||
</view>
|
</view>
|
||||||
<image v-else class="group_47577" :src="data.info.avatar||'/static/image/call/iosAvatar.png'"
|
<image v-else class="group_47577" :src="data.info.avatar||'/static/image/call/iosAvatar.png'"
|
||||||
:style="{opacity:data.info.avatar?0:1,transform: `scale(${data.avatarScale}) translateY(${data.avatarY}px)`}" />
|
:style="{opacity:data.info.avatar?(data.headerHeight=='206'?1:0):1,transform: `scale(${data.avatarScale}) translateY(${data.avatarY}px)`}" />
|
||||||
</view>
|
</view>
|
||||||
<text class="text_1" v-if="!data.info.avatar" :style="{opacity:data.scale}"> {{data.info.address}} </text>
|
<text class="text_1" v-if="!data.info.avatar" :style="{opacity:data.scale}"> {{data.info.address}} </text>
|
||||||
<text class="text_2" :style="{transform: `scale(${data.textScale}) translateY(${data.text2Y}px)`}">{{data.info.name||formatString(data.info.phone)}} </text>
|
<text class="text_2" :style="{transform: `scale(${data.textScale}) translateY(${data.text2Y}px)`}">{{data.info.name||formatString(data.info.phone)}} </text>
|
||||||
|
|
@ -583,8 +583,6 @@
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
watch,
|
|
||||||
nextTick,
|
|
||||||
getCurrentInstance
|
getCurrentInstance
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import {
|
import {
|
||||||
|
|
@ -595,16 +593,8 @@
|
||||||
onReachBottom
|
onReachBottom
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
const {
|
const {
|
||||||
appContext,
|
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
import {
|
|
||||||
useStore
|
|
||||||
} from '@/store/index.js'
|
|
||||||
const {
|
|
||||||
getCallDetail,
|
|
||||||
setCallDetail
|
|
||||||
} = useStore()
|
|
||||||
let recordPopup = ref()
|
let recordPopup = ref()
|
||||||
let timePickerPopup = ref()
|
let timePickerPopup = ref()
|
||||||
let editTimePopup = ref()
|
let editTimePopup = ref()
|
||||||
|
|
@ -768,6 +758,7 @@
|
||||||
data.index = Number(option.index)
|
data.index = Number(option.index)
|
||||||
let listArr = uni.getStorageSync('callLog')
|
let listArr = uni.getStorageSync('callLog')
|
||||||
data.info = listArr[data.index]
|
data.info = listArr[data.index]
|
||||||
|
// data.info.avatar='/static/logo.png'
|
||||||
data.list = data.info.list || data.list
|
data.list = data.info.list || data.list
|
||||||
console.log(data.info)
|
console.log(data.info)
|
||||||
data.headerHeight=data.info.avatar?519:325
|
data.headerHeight=data.info.avatar?519:325
|
||||||
|
|
@ -779,21 +770,21 @@
|
||||||
|
|
||||||
})
|
})
|
||||||
onPageScroll((e) => {
|
onPageScroll((e) => {
|
||||||
if(data.type=='ios'){
|
if (data.type == 'ios') {
|
||||||
const y = e.scrollTop;
|
const y = e.scrollTop;
|
||||||
const max = 200;
|
const max = 200;
|
||||||
let p = Math.min(y / max, 1);
|
let p = Math.min(y / max, 1);
|
||||||
data.contentY = -p * 90;
|
data.contentY = -p * (data.info.avatar ? 65 : 90);
|
||||||
data.avatarY = -p * 0;
|
data.avatarY = -p * 0;
|
||||||
data.text2Y = -p * 130;
|
data.text2Y = -p * (data.info.avatar ? 75 : 130);
|
||||||
data.avatarScale = 1 - p * 0.55; // 1 → 0.6 textScale
|
data.avatarScale = 1 - p * 0.55; // 1 → 0.6 textScale
|
||||||
data.textScale = 1 - p * 0.5; // 1 → 0.6
|
data.textScale = 1 - p * 0.5; // 1 → 0.6
|
||||||
|
|
||||||
data.scale = 1 - p * 1; // 1 → 0.6
|
data.scale = 1 - p * 1; // 1 → 0.6
|
||||||
console.log(data.avatarScale )
|
data.headerHeight = Math.max(206, (data.info.avatar ? 519 : 325) - y);
|
||||||
data.headerHeight=Math.max(206,(data.info.avatar?519:325) - y);
|
console.log(data.headerHeight)
|
||||||
}else{
|
} else {
|
||||||
|
// 其他类型的处理
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="vipList">
|
<view class="vipList">
|
||||||
<template v-for="(item, index) in data.benefitList" :key="index">
|
<template v-for="(item, index) in data.benefitList" :key="index">
|
||||||
<view class="item"
|
<view class="item" v-if="data.goods.features == 'common' || (data.goods.features != 'common' && index < 10)">
|
||||||
v-if="data.goods.features == 'common' || (data.goods.features != 'common' && index < 10)">
|
|
||||||
<image :src="item.url"></image>
|
<image :src="item.url"></image>
|
||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -113,8 +112,8 @@
|
||||||
|
|
||||||
<view class="footer-container">
|
<view class="footer-container">
|
||||||
<view class="payment-method-box">
|
<view class="payment-method-box">
|
||||||
<view class="wx-pay payment-method" v-for="(item, index) in data.payList"
|
<view class="wx-pay payment-method" v-for="(item, index) in data.payList" @click="onSelectPayment(item.type)"
|
||||||
@click="onSelectPayment(item.type)" :key="index">
|
:key="index">
|
||||||
<image class="img-select"
|
<image class="img-select"
|
||||||
:src="paymentMethod == item.type ? '/static/image/recharge/selected.png' : '/static/image/recharge/unselected.png'">
|
:src="paymentMethod == item.type ? '/static/image/recharge/selected.png' : '/static/image/recharge/unselected.png'">
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -131,8 +130,7 @@
|
||||||
<view class="text">
|
<view class="text">
|
||||||
合计
|
合计
|
||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
<countUp :num="$toFiexd(data.price, 2)" height="24" style="margin-top: -6px;" color="red"
|
<countUp :num="$toFiexd(data.price, 2)" height="24" style="margin-top: -6px;" color="red" fontSize='24'>
|
||||||
fontSize='24'>
|
|
||||||
</countUp>
|
</countUp>
|
||||||
已优惠¥{{ $toFiexd(data.coupon, 0) }}
|
已优惠¥{{ $toFiexd(data.coupon, 0) }}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -183,8 +181,7 @@
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="couponButton" @click="submitActivity">
|
<view class="couponButton" @click="submitActivity">
|
||||||
<c-lottie ref="cLottieRef" src='/static/lottie/couponButton.json' width="305px"
|
<c-lottie ref="cLottieRef" src='/static/lottie/couponButton.json' width="305px" height='86px'></c-lottie>
|
||||||
height='86px'></c-lottie>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
@ -235,8 +232,7 @@
|
||||||
<view>
|
<view>
|
||||||
<view class="item" v-for="(item, index) in data.myActivity" :key="index"
|
<view class="item" v-for="(item, index) in data.myActivity" :key="index"
|
||||||
@click="(data.goods.price < (Number(item.threshold) / 100) && item.threshold != '') || !item.isStatus ? '' : setActiveId(item)">
|
@click="(data.goods.price < (Number(item.threshold) / 100) && item.threshold != '') || !item.isStatus ? '' : setActiveId(item)">
|
||||||
<view class="left"
|
<view class="left" :class="{ left2: data.goods.price < (Number(item.threshold) / 100) || !item.isStatus }">
|
||||||
:class="{ left2: data.goods.price < (Number(item.threshold) / 100) || !item.isStatus }">
|
|
||||||
<view class="money">
|
<view class="money">
|
||||||
<text v-if="item.coupon_type_name != '折扣券'">¥</text>
|
<text v-if="item.coupon_type_name != '折扣券'">¥</text>
|
||||||
<text class="moneys">{{ item.coupon_type_name != '折扣券' ? (Number(item.coupon_value) /
|
<text class="moneys">{{ item.coupon_type_name != '折扣券' ? (Number(item.coupon_value) /
|
||||||
|
|
@ -254,8 +250,8 @@
|
||||||
<image
|
<image
|
||||||
v-if="(data.goods.price < (Number(item.threshold) / 100) && item.threshold != '') || !item.isStatus"
|
v-if="(data.goods.price < (Number(item.threshold) / 100) && item.threshold != '') || !item.isStatus"
|
||||||
class="checkedImg" src="/static/image/recharge/checked1.png" mode=""></image>
|
class="checkedImg" src="/static/image/recharge/checked1.png" mode=""></image>
|
||||||
<image v-else-if="data.active_ids == item.id" class="checkedImg"
|
<image v-else-if="data.active_ids == item.id" class="checkedImg" src="/static/image/recharge/checked3.png"
|
||||||
src="/static/image/recharge/checked3.png" mode=""></image>
|
mode=""></image>
|
||||||
<image v-else class="checkedImg" src="/static/image/recharge/checked2.png" mode=""></image>
|
<image v-else class="checkedImg" src="/static/image/recharge/checked2.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="jjdq" v-if="isToday(item.expire_times)">
|
<view class="jjdq" v-if="isToday(item.expire_times)">
|
||||||
|
|
@ -278,20 +274,20 @@
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import customTab from "@/components/custom-tab/custom-tab.vue"
|
import customTab from "@/components/custom-tab/custom-tab.vue"
|
||||||
import countUp from "@/components/countUp/countUp.vue"
|
import countUp from "@/components/countUp/countUp.vue"
|
||||||
import {
|
import {
|
||||||
postJson
|
postJson
|
||||||
} from "@/utils/requests.js"
|
} from "@/utils/requests.js"
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
watch,
|
watch,
|
||||||
nextTick,
|
nextTick,
|
||||||
toRefs
|
toRefs
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow,
|
onShow,
|
||||||
onReady,
|
onReady,
|
||||||
|
|
@ -299,55 +295,55 @@ import {
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onBackPress,
|
onBackPress,
|
||||||
onUnload
|
onUnload
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
const {
|
const {
|
||||||
appContext,
|
appContext,
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
const popup = ref();
|
const popup = ref();
|
||||||
const coupon = ref();
|
const coupon = ref();
|
||||||
const couponBox = ref();
|
const couponBox = ref();
|
||||||
const myCoupon = ref();
|
const myCoupon = ref();
|
||||||
const dialogVipBenefits = [{
|
const dialogVipBenefits = [{
|
||||||
name: "模拟微信",
|
name: "模拟微信",
|
||||||
url: "/static/image/recharge/moniweixinDialog.png"
|
url: "/static/image/recharge/moniweixinDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "无广告",
|
name: "无广告",
|
||||||
url: "/static/image/recharge/wuguanggaoDialog.png"
|
url: "/static/image/recharge/wuguanggaoDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "无水印",
|
name: "无水印",
|
||||||
url: "/static/image/recharge/wushuiyinDialog.png"
|
url: "/static/image/recharge/wushuiyinDialog.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "专属客服",
|
name: "专属客服",
|
||||||
url: "/static/image/recharge/zhuanshukefuDialog.png"
|
url: "/static/image/recharge/zhuanshukefuDialog.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// 套餐列表
|
// 套餐列表
|
||||||
const packageList = [{
|
const packageList = [{
|
||||||
name: "连续包月",
|
name: "连续包月",
|
||||||
delPrice: "89",
|
delPrice: "89",
|
||||||
price: "29",
|
price: "29",
|
||||||
lifespan: "一月"
|
lifespan: "一月"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "连续包季",
|
name: "连续包季",
|
||||||
delPrice: "189",
|
delPrice: "189",
|
||||||
price: "98",
|
price: "98",
|
||||||
lifespan: "一季"
|
lifespan: "一季"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "连续包年",
|
name: "连续包年",
|
||||||
delPrice: "365",
|
delPrice: "365",
|
||||||
price: "198",
|
price: "198",
|
||||||
lifespan: "一年"
|
lifespan: "一年"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
active_id: 0,
|
active_id: 0,
|
||||||
active_ids: 0,
|
active_ids: 0,
|
||||||
|
|
@ -465,9 +461,9 @@ const data = reactive({
|
||||||
isCombo: false,
|
isCombo: false,
|
||||||
source: "uni_alipay_other",
|
source: "uni_alipay_other",
|
||||||
tradeCoupon: false
|
tradeCoupon: false
|
||||||
})
|
})
|
||||||
|
|
||||||
let {
|
let {
|
||||||
buttonText,
|
buttonText,
|
||||||
selected,
|
selected,
|
||||||
benefitList,
|
benefitList,
|
||||||
|
|
@ -475,20 +471,20 @@ let {
|
||||||
commentList,
|
commentList,
|
||||||
paymentMethod,
|
paymentMethod,
|
||||||
source
|
source
|
||||||
} = toRefs(data)
|
} = toRefs(data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回监听
|
* 返回监听
|
||||||
*/
|
*/
|
||||||
onBackPress((e) => {
|
onBackPress((e) => {
|
||||||
if (e.from == 'backbutton' && data.appUser.vip == 1) {
|
if (e.from == 'backbutton' && data.appUser.vip == 1) {
|
||||||
open()
|
open()
|
||||||
return true; //阻止返回
|
return true; //阻止返回
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
onLoad(async (option) => {
|
onLoad(async (option) => {
|
||||||
if (option.source) {
|
if (option.source) {
|
||||||
data.source = option.source
|
data.source = option.source
|
||||||
}
|
}
|
||||||
|
|
@ -527,6 +523,12 @@ onLoad(async (option) => {
|
||||||
item.url = item.url.replace('/static/image/recharge/',
|
item.url = item.url.replace('/static/image/recharge/',
|
||||||
'/static/image/recharge/51/')
|
'/static/image/recharge/51/')
|
||||||
})
|
})
|
||||||
|
} else if (themeConfig?.theme == '0606') {
|
||||||
|
data.banner = '/static/image/recharge/66/bannar.png'
|
||||||
|
// data.benefitList.forEach(item => {
|
||||||
|
// item.url = item.url.replace('/static/image/recharge/',
|
||||||
|
// '/static/image/recharge/66/')
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let pages = getCurrentPages();
|
let pages = getCurrentPages();
|
||||||
|
|
@ -661,16 +663,16 @@ onLoad(async (option) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
if (data.isCombo) {
|
if (data.isCombo) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '是否支付成功?',
|
content: '是否支付成功?',
|
||||||
cancelText: '未支付',
|
cancelText: '未支付',
|
||||||
confirmText: "已支付",
|
confirmText: "已支付",
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
console.log('用户点击确定');
|
console.log('用户点击确定');
|
||||||
paymentResult(uni.getStorageSync('orderId'), paymentMethod.value)
|
paymentResult(uni.getStorageSync('orderId'), paymentMethod.value)
|
||||||
|
|
@ -681,11 +683,11 @@ onShow(() => {
|
||||||
});
|
});
|
||||||
data.isCombo = false
|
data.isCombo = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
// uni.offNativeEventReceive()
|
// uni.offNativeEventReceive()
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
try {
|
try {
|
||||||
if (plus.os.name === 'Android') {
|
if (plus.os.name === 'Android') {
|
||||||
let color = plus.android.newObject("android.graphics.Color");
|
let color = plus.android.newObject("android.graphics.Color");
|
||||||
|
|
@ -700,7 +702,7 @@ onReady(() => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log("状态栏设置完毕!");
|
console.log("状态栏设置完毕!");
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
animation: { // 动画效果
|
animation: { // 动画效果
|
||||||
|
|
@ -709,18 +711,18 @@ onReady(() => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 200);
|
}, 200);
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
plus.navigator.setStatusBarStyle("light");
|
plus.navigator.setStatusBarStyle("light");
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//TODO handle the exception
|
//TODO handle the exception
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function isToday(inputTime) {
|
function isToday(inputTime) {
|
||||||
// 获取当前日期的时间戳(去掉时分秒)
|
// 获取当前日期的时间戳(去掉时分秒)
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setHours(0, 0, 0, 0);
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
@ -733,9 +735,9 @@ function isToday(inputTime) {
|
||||||
|
|
||||||
// 比较时间戳
|
// 比较时间戳
|
||||||
return inputTimestamp === todayTimestamp;
|
return inputTimestamp === todayTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateTimeRemaining(targetTime) {
|
function calculateTimeRemaining(targetTime) {
|
||||||
// 获取目标时间和当前时间的时间戳
|
// 获取目标时间和当前时间的时间戳
|
||||||
const target = new Date(targetTime).getTime();
|
const target = new Date(targetTime).getTime();
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
|
|
@ -770,9 +772,9 @@ function calculateTimeRemaining(targetTime) {
|
||||||
minutes: minutes,
|
minutes: minutes,
|
||||||
seconds: seconds
|
seconds: seconds
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function activeClick(status) {
|
function activeClick(status) {
|
||||||
myCoupon.value.close()
|
myCoupon.value.close()
|
||||||
if (status && data.active_ids > 0) {
|
if (status && data.active_ids > 0) {
|
||||||
let item = data.activeitems
|
let item = data.activeitems
|
||||||
|
|
@ -789,14 +791,14 @@ function activeClick(status) {
|
||||||
setPrice(true)
|
setPrice(true)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setActiveId(item) {
|
function setActiveId(item) {
|
||||||
data.active_ids = item.id
|
data.active_ids = item.id
|
||||||
data.activeitems = item
|
data.activeitems = item
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPrice(status) {
|
function setPrice(status) {
|
||||||
console.log("setPrice")
|
console.log("setPrice")
|
||||||
if (data.incrementTimer) {
|
if (data.incrementTimer) {
|
||||||
clearInterval(data.incrementTimer);
|
clearInterval(data.incrementTimer);
|
||||||
|
|
@ -878,9 +880,9 @@ function setPrice(status) {
|
||||||
console.log("最后", data.price)
|
console.log("最后", data.price)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 获取我的优惠券 */
|
/* 获取我的优惠券 */
|
||||||
async function getActivity() {
|
async function getActivity() {
|
||||||
let activity = await proxy.$requestPromise({
|
let activity = await proxy.$requestPromise({
|
||||||
url: 'api/activity/coupon',
|
url: 'api/activity/coupon',
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
@ -912,9 +914,9 @@ async function getActivity() {
|
||||||
]
|
]
|
||||||
data.myActivity = deduplicateKeepLast(data.myActivity)
|
data.myActivity = deduplicateKeepLast(data.myActivity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deduplicateKeepLast(arr, idKey = 'id') {
|
function deduplicateKeepLast(arr, idKey = 'id') {
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
|
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
|
|
@ -923,10 +925,10 @@ function deduplicateKeepLast(arr, idKey = 'id') {
|
||||||
});
|
});
|
||||||
|
|
||||||
return Array.from(map.values());
|
return Array.from(map.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 领取优惠券 */
|
/* 领取优惠券 */
|
||||||
async function submitActivity() {
|
async function submitActivity() {
|
||||||
console.log("activity_id");
|
console.log("activity_id");
|
||||||
let activity_id = ''
|
let activity_id = ''
|
||||||
data.activity.forEach(item => {
|
data.activity.forEach(item => {
|
||||||
|
|
@ -961,24 +963,24 @@ async function submitActivity() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
* @param {Object} index
|
* @param {Object} index
|
||||||
* 选择购买套餐
|
* 选择购买套餐
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
防抖
|
防抖
|
||||||
*/
|
*/
|
||||||
const debouncedOnSelect = debounce((items, index) => {
|
const debouncedOnSelect = debounce((items, index) => {
|
||||||
onSelect(items, index);
|
onSelect(items, index);
|
||||||
}, 200, false);
|
}, 200, false);
|
||||||
|
|
||||||
function debounce(func, wait, immediate = true) {
|
function debounce(func, wait, immediate = true) {
|
||||||
let timeout;
|
let timeout;
|
||||||
return function (...args) {
|
return function(...args) {
|
||||||
const later = () => {
|
const later = () => {
|
||||||
timeout = null;
|
timeout = null;
|
||||||
if (!immediate) func(...args);
|
if (!immediate) func(...args);
|
||||||
|
|
@ -990,8 +992,8 @@ function debounce(func, wait, immediate = true) {
|
||||||
|
|
||||||
if (callNow) func(...args);
|
if (callNow) func(...args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
async function onSelect(items, index) {
|
async function onSelect(items, index) {
|
||||||
data.active_id = 0
|
data.active_id = 0
|
||||||
data.activeCoupon = {}
|
data.activeCoupon = {}
|
||||||
data.active_ids = 0
|
data.active_ids = 0
|
||||||
|
|
@ -1064,8 +1066,7 @@ async function onSelect(items, index) {
|
||||||
if (list.length != 0) {
|
if (list.length != 0) {
|
||||||
let listData = list.map(cell => {
|
let listData = list.map(cell => {
|
||||||
return {
|
return {
|
||||||
image: cell == 'weixin' ? '/static/image/recharge/wxpay.png' :
|
image: cell == 'weixin' ? '/static/image/recharge/wxpay.png' : '/static/image/recharge/alipay.png',
|
||||||
'/static/image/recharge/alipay.png',
|
|
||||||
name: cell == 'weixin' ? '微信支付' : '支付宝支付',
|
name: cell == 'weixin' ? '微信支付' : '支付宝支付',
|
||||||
type: cell == 'weixin' ? 'wxpay' : 'alipay'
|
type: cell == 'weixin' ? 'wxpay' : 'alipay'
|
||||||
}
|
}
|
||||||
|
|
@ -1098,22 +1099,22 @@ async function onSelect(items, index) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
paymentMethod.value = data.payList[0].type
|
paymentMethod.value = data.payList[0].type
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
data.countdown = true
|
data.countdown = true
|
||||||
}, 100);
|
}, 100);
|
||||||
await setPrice(true)
|
await setPrice(true)
|
||||||
await getActivity()
|
await getActivity()
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param {Object} value
|
* @param {Object} value
|
||||||
* 选择支付方式
|
* 选择支付方式
|
||||||
*/
|
*/
|
||||||
function onSelectPayment(value) {
|
function onSelectPayment(value) {
|
||||||
paymentMethod.value = value
|
paymentMethod.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
|
|
||||||
uni.setStorageSync('back_number', data.back_number + 1);
|
uni.setStorageSync('back_number', data.back_number + 1);
|
||||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||||
|
|
@ -1143,12 +1144,12 @@ function open() {
|
||||||
coupon.value.open()
|
coupon.value.open()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成通知列表
|
* 随机生成通知列表
|
||||||
*/
|
*/
|
||||||
function generateNoticeList() {
|
function generateNoticeList() {
|
||||||
noticeList.value = []
|
noticeList.value = []
|
||||||
for (let i = 0; i <= 10; i++) {
|
for (let i = 0; i <= 10; i++) {
|
||||||
noticeList.value.push({
|
noticeList.value.push({
|
||||||
|
|
@ -1157,11 +1158,11 @@ function generateNoticeList() {
|
||||||
package: getRandomItem()
|
package: getRandomItem()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 下单拉取支付
|
* 下单拉取支付
|
||||||
*/
|
*/
|
||||||
async function activateVip(type = '') {
|
async function activateVip(type = '') {
|
||||||
if (type == 'back') {
|
if (type == 'back') {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "click",
|
type: "click",
|
||||||
|
|
@ -1253,13 +1254,13 @@ async function activateVip(type = '') {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: paymentMethod.value,
|
provider: paymentMethod.value,
|
||||||
orderInfo: payData, //支付宝订单数据
|
orderInfo: payData, //支付宝订单数据
|
||||||
success: function (resss) {
|
success: function(resss) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 30000);
|
}, 30000);
|
||||||
paymentResult(paymentRes.data.orderId, paymentMethod.value)
|
paymentResult(paymentRes.data.orderId, paymentMethod.value)
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function(err) {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "event",
|
type: "event",
|
||||||
key: "pay_fail",
|
key: "pay_fail",
|
||||||
|
|
@ -1300,11 +1301,11 @@ async function activateVip(type = '') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 支付状态轮询函数
|
// 支付状态轮询函数
|
||||||
async function paymentResult(orderId, paytype) {
|
async function paymentResult(orderId, paytype) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '会员发放排队中,正在实时向服务器索要,请耐心等待。',
|
title: '会员发放排队中,正在实时向服务器索要,请耐心等待。',
|
||||||
|
|
@ -1410,19 +1411,19 @@ async function paymentResult(orderId, paytype) {
|
||||||
|
|
||||||
// 开始轮询
|
// 开始轮询
|
||||||
poll();
|
poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 随机抽取一个元素
|
// 随机抽取一个元素
|
||||||
function getRandomItem() {
|
function getRandomItem() {
|
||||||
const list = ['月度会员', '季度会员', '年度会员'];
|
const list = ['月度会员', '季度会员', '年度会员'];
|
||||||
const randomIndex = Math.floor(Math.random() * list.length);
|
const randomIndex = Math.floor(Math.random() * list.length);
|
||||||
return list[randomIndex];
|
return list[randomIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成时间提示语
|
* 随机生成时间提示语
|
||||||
*/
|
*/
|
||||||
function generateNaturalTimeAgo() {
|
function generateNaturalTimeAgo() {
|
||||||
const weights = [{
|
const weights = [{
|
||||||
range: [1, 30],
|
range: [1, 30],
|
||||||
weight: 30,
|
weight: 30,
|
||||||
|
|
@ -1489,12 +1490,12 @@ function generateNaturalTimeAgo() {
|
||||||
const amount = Math.floor(Math.random() * (max - min + 1)) + min;
|
const amount = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||||
|
|
||||||
return `${amount}${selected.unit}前`;
|
return `${amount}${selected.unit}前`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机生成电话号码
|
* 随机生成电话号码
|
||||||
*/
|
*/
|
||||||
function generateMaskedPhoneNumber() {
|
function generateMaskedPhoneNumber() {
|
||||||
// 常见手机号段
|
// 常见手机号段
|
||||||
const prefixes = [
|
const prefixes = [
|
||||||
'130', '131', '132', '133', '134', '135', '136', '137', '138', '139',
|
'130', '131', '132', '133', '134', '135', '136', '137', '138', '139',
|
||||||
|
|
@ -1517,13 +1518,13 @@ function generateMaskedPhoneNumber() {
|
||||||
|
|
||||||
// 对中间4位进行掩码处理:前3位 + **** + 后4位
|
// 对中间4位进行掩码处理:前3位 + **** + 后4位
|
||||||
return fullNumber.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3');
|
return fullNumber.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回
|
* 返回
|
||||||
*/
|
*/
|
||||||
function back() {
|
function back() {
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: "click",
|
type: "click",
|
||||||
key: "recharge_dialog_cancel",
|
key: "recharge_dialog_cancel",
|
||||||
|
|
@ -1539,14 +1540,14 @@ function back() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Complete() {
|
function Complete() {
|
||||||
data.coupon = false
|
data.coupon = false
|
||||||
console.log("播放完成");
|
console.log("播放完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldBeTrue(obj) {
|
function shouldBeTrue(obj) {
|
||||||
// 情况1: 没有 features 字段 → 返回 true
|
// 情况1: 没有 features 字段 → 返回 true
|
||||||
if (!('features' in obj)) {
|
if (!('features' in obj)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1564,17 +1565,17 @@ function shouldBeTrue(obj) {
|
||||||
|
|
||||||
// 情况4: 有 features 字段且不包含 alipay → 返回 false
|
// 情况4: 有 features 字段且不包含 alipay → 返回 false
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@import "@/common/main.css";
|
@import "@/common/main.css";
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
* {
|
* {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.couponBox {
|
.couponBox {
|
||||||
width: 375px;
|
width: 375px;
|
||||||
height: 450px;
|
height: 450px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -1685,18 +1686,18 @@ function shouldBeTrue(obj) {
|
||||||
top: -145px;
|
top: -145px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.couponButton {
|
.couponButton {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 37px;
|
margin-top: 37px;
|
||||||
width: 305px;
|
width: 305px;
|
||||||
height: 86px;
|
height: 86px;
|
||||||
margin-left: calc(50% - 152.5px);
|
margin-left: calc(50% - 152.5px);
|
||||||
z-index: 4 !important;
|
z-index: 4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container {
|
.page-container {
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
padding-bottom: 240rpx;
|
padding-bottom: 240rpx;
|
||||||
padding-bottom: calc(240rpx + constant(safe-area-inset-bottom)) !important;
|
padding-bottom: calc(240rpx + constant(safe-area-inset-bottom)) !important;
|
||||||
|
|
@ -1863,9 +1864,9 @@ function shouldBeTrue(obj) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes vertical-scroll {
|
@keyframes vertical-scroll {
|
||||||
from {
|
from {
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
}
|
}
|
||||||
|
|
@ -1873,9 +1874,9 @@ function shouldBeTrue(obj) {
|
||||||
to {
|
to {
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-container {
|
.footer-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
@ -1979,9 +1980,9 @@ function shouldBeTrue(obj) {
|
||||||
width: 32%;
|
width: 32%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-container {
|
.dialog-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
|
|
@ -2106,16 +2107,16 @@ function shouldBeTrue(obj) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 100rpx;
|
top: 100rpx;
|
||||||
left: 36rpx;
|
left: 36rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-margin-wrap::after {
|
.uni-margin-wrap::after {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// content: '';
|
// content: '';
|
||||||
// left: 0;
|
// left: 0;
|
||||||
|
|
@ -2124,9 +2125,9 @@ function shouldBeTrue(obj) {
|
||||||
// height: 18px;
|
// height: 18px;
|
||||||
// background-color: #f7f7f7;
|
// background-color: #f7f7f7;
|
||||||
// border-radius: 16px 16px 0px 0px;
|
// border-radius: 16px 16px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-margin-wrap {
|
.uni-margin-wrap {
|
||||||
// position: relative;
|
// position: relative;
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -2180,11 +2181,11 @@ function shouldBeTrue(obj) {
|
||||||
padding: 0 100rpx;
|
padding: 0 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.placeholder {
|
.placeholder {
|
||||||
// display: none;
|
// display: none;
|
||||||
// position: relative;
|
// position: relative;
|
||||||
// background-color: #f7f7f7;
|
// background-color: #f7f7f7;
|
||||||
|
|
@ -2192,20 +2193,20 @@ function shouldBeTrue(obj) {
|
||||||
// border-radius: 1rem 1rem 0 0;
|
// border-radius: 1rem 1rem 0 0;
|
||||||
// left: 0;
|
// left: 0;
|
||||||
// bottom: 30rpx;
|
// bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 由小到大缩放动画 */
|
/* 由小到大缩放动画 */
|
||||||
.animated-box {
|
.animated-box {
|
||||||
animation: scaleIn 1s ease-out forwards;
|
animation: scaleIn 1s ease-out forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 延迟动画 */
|
/* 延迟动画 */
|
||||||
.scale-in-delay {
|
.scale-in-delay {
|
||||||
animation: scaleIn 0.5s ease-out 0.2s forwards;
|
animation: scaleIn 0.5s ease-out 0.2s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 动画关键帧定义 */
|
/* 动画关键帧定义 */
|
||||||
@keyframes scaleIn {
|
@keyframes scaleIn {
|
||||||
0% {
|
0% {
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
@ -2219,17 +2220,17 @@ function shouldBeTrue(obj) {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.iosQuestion {
|
.iosQuestion {
|
||||||
.titleBox {
|
.titleBox {
|
||||||
.image {
|
.image {
|
||||||
margin-top: 3px !important;
|
margin-top: 3px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.question {
|
.question {
|
||||||
margin: 20rpx 32rpx;
|
margin: 20rpx 32rpx;
|
||||||
padding: 17px 13px;
|
padding: 17px 13px;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
|
|
@ -2266,9 +2267,9 @@ function shouldBeTrue(obj) {
|
||||||
color: #AAAAAA;
|
color: #AAAAAA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.myCouponList {
|
.myCouponList {
|
||||||
margin: 20rpx 32rpx;
|
margin: 20rpx 32rpx;
|
||||||
padding: 17px 13px;
|
padding: 17px 13px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
|
|
@ -2335,9 +2336,9 @@ function shouldBeTrue(obj) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.myCouponContainer {
|
.myCouponContainer {
|
||||||
width: calc(100% - 52px);
|
width: calc(100% - 52px);
|
||||||
height: 400px;
|
height: 400px;
|
||||||
background-image: url('/static/image/recharge/myCouponContainerBg.png');
|
background-image: url('/static/image/recharge/myCouponContainerBg.png');
|
||||||
|
|
@ -2475,16 +2476,16 @@ function shouldBeTrue(obj) {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.white-flow {
|
.white-flow {
|
||||||
background: linear-gradient(-45deg, transparent, transparent, transparent, transparent, transparent, transparent, transparent, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2), transparent, transparent, transparent, transparent, transparent, transparent, transparent);
|
background: linear-gradient(-45deg, transparent, transparent, transparent, transparent, transparent, transparent, transparent, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2), transparent, transparent, transparent, transparent, transparent, transparent, transparent);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 60% 100%;
|
background-size: 60% 100%;
|
||||||
animation: flow 2s infinite linear;
|
animation: flow 2s infinite linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flow {
|
@keyframes flow {
|
||||||
0% {
|
0% {
|
||||||
background-position: -100% 0;
|
background-position: -100% 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2492,29 +2493,29 @@ function shouldBeTrue(obj) {
|
||||||
100% {
|
100% {
|
||||||
background-position: 200% 0;
|
background-position: 200% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-countdown-day {
|
::v-deep .uni-countdown-day {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
color: #2A2617 !important;
|
color: #2A2617 !important;
|
||||||
/* 例如,将文字颜色改为红色 */
|
/* 例如,将文字颜色改为红色 */
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
padding-right: 0 !important;
|
padding-right: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-countdown-splitor-day {
|
::v-deep .uni-countdown-splitor-day {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yanhua {
|
.yanhua {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 170px;
|
top: 170px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vipContent {
|
.vipContent {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
width: calc(100% - 32px);
|
width: calc(100% - 32px);
|
||||||
|
|
@ -2554,14 +2555,14 @@ function shouldBeTrue(obj) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'AlipayNumber'; //字体名称
|
font-family: 'AlipayNumber'; //字体名称
|
||||||
src: url('/static/font/AlipayNumber.ttf');
|
src: url('/static/font/AlipayNumber.ttf');
|
||||||
}
|
}
|
||||||
|
|
||||||
.wx-font-regular {
|
.wx-font-regular {
|
||||||
font-family: 'AlipayNumber' !important;
|
font-family: 'AlipayNumber' !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<view class="group_45764" v-if="!selectedImage" :style="{'padding-top':$systemInfo.statusBarHeight+'px'}">
|
<view class="group_45764" v-if="!selectedImage" :style="{'padding-top':$systemInfo.statusBarHeight+'px'}">
|
||||||
<view class="rectangle_23284">
|
<view class="rectangle_23284">
|
||||||
<view class="flexcontainer">
|
<view class="flexcontainer">
|
||||||
<view class="group_8">
|
<view class="group_8" @click="back">
|
||||||
<image class="frame" src="/static/image/other/bank/gsyh/back.png" />
|
<image class="frame" src="/static/image/other/bank/gsyh/back.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="group_7">
|
<view class="group_7">
|
||||||
|
|
@ -40,7 +40,8 @@
|
||||||
<text class="text_2">{{data.form.cardType}}</text>
|
<text class="text_2">{{data.form.cardType}}</text>
|
||||||
<view class="text_3">
|
<view class="text_3">
|
||||||
{{maskCardNumber(data.form.cardNumber)}}
|
{{maskCardNumber(data.form.cardNumber)}}
|
||||||
<text style="color:#3E82BD;margin-left: 52rpx;" @click="data.isShow=true">查看</text>
|
<view
|
||||||
|
style="color:#3E82BD;margin-left: 52rpx;text-align: center;font-size: 22rpx; width: 52rpx;height: 32rpx;background: #F3F6FB;border-radius: 2px 2px 2px 2px;" @click="data.isShow=true">查看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -381,7 +382,9 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
});
|
});
|
||||||
|
function back(){
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
function loadCache() {
|
function loadCache() {
|
||||||
const cache = uni.getStorageSync(CACHE_KEY);
|
const cache = uni.getStorageSync(CACHE_KEY);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
|
|
@ -758,6 +761,7 @@ function onNumberInput(field, value) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 22rpx;
|
margin-left: 22rpx;
|
||||||
|
width: calc(100% - 130rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_2 {
|
.text_2 {
|
||||||
|
|
@ -768,6 +772,8 @@ function onNumberInput(field, value) {
|
||||||
.text_3 {
|
.text_3 {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group_48162 {
|
.group_48162 {
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,13 @@
|
||||||
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||||
</liu-drag-button>
|
</liu-drag-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="group_45764" >
|
<view class="group_45764">
|
||||||
<view class="flexcontainer_1" :style="{'padding-top':$systemInfo.statusBarHeight+'px','backgroundColor':data.navbar.bgColor}">
|
<!-- ,'backgroundColor':data.navbar.bgColor -->
|
||||||
|
<view class="flexcontainer_box" v-if="!selectedImage">
|
||||||
|
<view :style="{'height':$systemInfo.statusBarHeight+'px','width':'100%'}"></view>
|
||||||
|
<view class="flexcontainer_1">
|
||||||
<view class="group_8">
|
<view class="group_8">
|
||||||
<view class="rectangle_18503">
|
<view class="rectangle_18503" @click="back">
|
||||||
<image class="frame" src="/static/image/other/bank/jsyh/back.png" />
|
<image class="frame" src="/static/image/other/bank/jsyh/back.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -21,6 +24,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="" :style="{height:$systemInfo.statusBarHeight*2+96+'rpx'}">
|
<view class="" :style="{height:$systemInfo.statusBarHeight*2+96+'rpx'}">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -33,25 +37,34 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flexcontainer_3">
|
<view class="flexcontainer_3">
|
||||||
<text class="text_2"> {{data.form.bankName}}({{data.form.cardNumber.substring(data.form.cardNumber.length-4)}}) </text>
|
<text class="text_2">
|
||||||
|
{{data.form.bankName}}({{data.form.cardNumber.substring(data.form.cardNumber.length-4)}}) </text>
|
||||||
<view class="flexcontainer_4">
|
<view class="flexcontainer_4">
|
||||||
<image class="group_13982" src="/static/image/other/bank/jsyh/editor.png" />
|
<image class="group_13982" src="/static/image/other/bank/jsyh/editor.png" />
|
||||||
<image class="group_48197" src="/static/image/other/bank/jsyh/zc.png" /><text class="text_3"> 修改别名 </text>
|
<!-- <image class="group_48197" src="/static/image/other/bank/jsyh/zc.png" /> -->
|
||||||
|
<view class="group_48197">
|
||||||
|
正常
|
||||||
|
</view>
|
||||||
|
<text class="text_3"> 修改别名
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="text_4" @click.stop="data.isShow=true"> 查看卡号 </text>
|
<text class="text_4" @click.stop="data.isShow=true"> 查看卡号 </text>
|
||||||
</view>
|
</view>
|
||||||
<text class="text_5"> 卡片类型:{{data.form.cardType}} </text><text class="text_6"> 账户类别:{{data.form.accountType}} </text>
|
<text class="text_5"> 卡片类型:{{data.form.cardType}} </text><text class="text_6"> 账户类别:{{data.form.accountType}}
|
||||||
|
</text>
|
||||||
<view class="flexcontainer_5">
|
<view class="flexcontainer_5">
|
||||||
<view class="flexcontainer_6"><text class="text_7"> 到期日期:{{data.form.expiryDate}} </text><text class="text_8"> 开户网点:{{data.form.branchName}} </text></view>
|
<view class="flexcontainer_6"><text class="text_7"> 到期日期:{{data.form.expiryDate}} </text><text
|
||||||
|
class="text_8"> 开户网点:{{data.form.branchName}} </text></view>
|
||||||
<image class="group_48196" src="/static/image/other/bank/jsyh/code.png" />
|
<image class="group_48196" src="/static/image/other/bank/jsyh/code.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<NavBar v-if="selectedImage" title="拼图" bgColor="#EFEFEF" noBack @back="closeImageEdit" isRightButton @right-click="confirmImage">
|
<NavBar v-if="selectedImage" title="拼图" bgColor="#EFEFEF" noBack @back="closeImageEdit" isRightButton
|
||||||
|
@right-click="confirmImage">
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<view class="group_48190" >
|
<view class="group_48190">
|
||||||
<view class="rectangle_23318">
|
<view class="rectangle_23318">
|
||||||
<image class="group_13999" src="/static/image/other/bank/jsyh/rightIcon.png" />
|
<image class="group_13999" src="/static/image/other/bank/jsyh/rightIcon.png" />
|
||||||
<image class="frame_1" src="/static/image/other/bank/jsyh/wx.png" />
|
<image class="frame_1" src="/static/image/other/bank/jsyh/wx.png" />
|
||||||
|
|
@ -59,7 +72,7 @@
|
||||||
<text class="text_9"> 快捷支付 </text>
|
<text class="text_9"> 快捷支付 </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group_48191" @click="openEditDialog" >
|
<view class="group_48191" @click="openEditDialog">
|
||||||
<view class="rectangle_23317">
|
<view class="rectangle_23317">
|
||||||
<view class="rectangle_23316">
|
<view class="rectangle_23316">
|
||||||
<text class="text_10"> {{data.form.accountCategory}} </text>
|
<text class="text_10"> {{data.form.accountCategory}} </text>
|
||||||
|
|
@ -75,25 +88,25 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group_48192" @click="openEditDialog" >
|
<view class="group_48192" @click="openEditDialog">
|
||||||
<view class="rectangle_23319">
|
<view class="rectangle_23319">
|
||||||
<text class="text_14"> 出入金剩余额度 </text>
|
<text class="text_14"> 出入金剩余额度 </text>
|
||||||
<view class="flexcontainer_8">
|
<view class="flexcontainer_8">
|
||||||
<image
|
<image class="group_48193" src="/static/image/other/bank/jsyh/gth.png" /><text class="text_15">
|
||||||
class="group_48193"
|
(含非绑定账户转账、现金存取、消费缴费) </text>
|
||||||
src="/static/image/other/bank/jsyh/gth.png" /><text class="text_15"> (含非绑定账户转账、现金存取、消费缴费) </text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flexcontainer_9">
|
<view class="flexcontainer_9">
|
||||||
<text class="text_16"> 日出金: </text><text class="text_17"> 日入金: </text><text class="text_18"> ¥ {{data.form.dayOut}} </text><text class="text_19"> ¥ {{data.form.dayIn}} </text>
|
<text class="text_16"> 日出金: </text><text class="text_17"> 日入金: </text><text class="text_18"> ¥
|
||||||
|
{{data.form.dayOut}} </text><text class="text_19"> ¥ {{data.form.dayIn}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flexcontainer_10">
|
<view class="flexcontainer_10">
|
||||||
<text class="text_20"> 年出金: </text><text class="text_21"> 年入金: </text><text class="text_22"> ¥ {{data.form.yearOut}} </text><text class="text_23"> ¥ {{data.form.yearIn}} </text>
|
<text class="text_20"> 年出金: </text><text class="text_21"> 年入金: </text><text class="text_22"> ¥
|
||||||
|
{{data.form.yearOut}} </text><text class="text_23"> ¥ {{data.form.yearIn}} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!selectedImage" class="image-box" @touchstart="handleTouchStart" @touchend="handleTouchEnd">
|
<view v-if="!selectedImage" class="image-box" @touchstart="handleTouchStart" @touchend="handleTouchEnd">
|
||||||
<image
|
<image class="div_8a4931ca0f8a124896aa57f966f7f1cf"
|
||||||
class="div_8a4931ca0f8a124896aa57f966f7f1cf"
|
|
||||||
:src="data.footerImage || '/static/image/other/bank/jsyh/footerImg.png'" mode="aspectFill" />
|
:src="data.footerImage || '/static/image/other/bank/jsyh/footerImg.png'" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="scroll-image-box flex-1">
|
<view v-else class="scroll-image-box flex-1">
|
||||||
|
|
@ -174,23 +187,28 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>可用余额</text>
|
<text>可用余额</text>
|
||||||
<input :value="editDialog.data.balance" @input="(e) => onNumberInput('balance', e.detail.value)" placeholder="如: 2.71" />
|
<input :value="editDialog.data.balance" @input="(e) => onNumberInput('balance', e.detail.value)"
|
||||||
|
placeholder="如: 2.71" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>日出金额度</text>
|
<text>日出金额度</text>
|
||||||
<input :value="editDialog.data.dayOut" @input="(e) => onNumberInput('dayOut', e.detail.value)" placeholder="如: 50,000.00" />
|
<input :value="editDialog.data.dayOut" @input="(e) => onNumberInput('dayOut', e.detail.value)"
|
||||||
|
placeholder="如: 50,000.00" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>日入金额度</text>
|
<text>日入金额度</text>
|
||||||
<input :value="editDialog.data.dayIn" @input="(e) => onNumberInput('dayIn', e.detail.value)" placeholder="如: 50,000.00" />
|
<input :value="editDialog.data.dayIn" @input="(e) => onNumberInput('dayIn', e.detail.value)"
|
||||||
|
placeholder="如: 50,000.00" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>年出金额度</text>
|
<text>年出金额度</text>
|
||||||
<input :value="editDialog.data.yearOut" @input="(e) => onNumberInput('yearOut', e.detail.value)" placeholder="如: 200,000.00" />
|
<input :value="editDialog.data.yearOut" @input="(e) => onNumberInput('yearOut', e.detail.value)"
|
||||||
|
placeholder="如: 200,000.00" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>年入金额度</text>
|
<text>年入金额度</text>
|
||||||
<input :value="editDialog.data.yearIn" @input="(e) => onNumberInput('yearIn', e.detail.value)" placeholder="如: 200,000.00" />
|
<input :value="editDialog.data.yearIn" @input="(e) => onNumberInput('yearIn', e.detail.value)"
|
||||||
|
placeholder="如: 200,000.00" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="popup-footer">
|
<view class="popup-footer">
|
||||||
|
|
@ -202,7 +220,12 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, onMounted, ref, getCurrentInstance } from 'vue';
|
import {
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
ref,
|
||||||
|
getCurrentInstance
|
||||||
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow,
|
onShow,
|
||||||
|
|
@ -210,14 +233,14 @@ import { reactive, onMounted, ref, getCurrentInstance } from 'vue';
|
||||||
|
|
||||||
onPageScroll
|
onPageScroll
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
const CACHE_KEY = 'jsyh_account_info';
|
const CACHE_KEY = 'jsyh_account_info';
|
||||||
const FOOTER_IMAGE_KEY = 'jsyh_footer_image';
|
const FOOTER_IMAGE_KEY = 'jsyh_footer_image';
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
navbar:{
|
navbar: {
|
||||||
bgColor : 'rgba(0,0,0,0)'
|
bgColor: 'rgba(0,0,0,0)'
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
bankName: '建设银行',
|
bankName: '建设银行',
|
||||||
|
|
@ -237,16 +260,16 @@ const data = reactive({
|
||||||
footerImage: '',
|
footerImage: '',
|
||||||
showMask: false,
|
showMask: false,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectedImage = ref('');
|
const selectedImage = ref('');
|
||||||
const scrollTop = ref(0);
|
const scrollTop = ref(0);
|
||||||
let longPressTimer = null;
|
let longPressTimer = null;
|
||||||
|
|
||||||
const editDialog = reactive({
|
const editDialog = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
data: {}
|
data: {}
|
||||||
});
|
});
|
||||||
onPageScroll((e) => {
|
onPageScroll((e) => {
|
||||||
if (e.scrollTop > 45) {
|
if (e.scrollTop > 45) {
|
||||||
data.navbar.bgColor = '#2d60d5'
|
data.navbar.bgColor = '#2d60d5'
|
||||||
|
|
@ -255,43 +278,49 @@ const editDialog = reactive({
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadCache();
|
loadCache();
|
||||||
// 加载保存的footer图片
|
// 加载保存的footer图片
|
||||||
const savedFooter = uni.getStorageSync(FOOTER_IMAGE_KEY);
|
const savedFooter = uni.getStorageSync(FOOTER_IMAGE_KEY);
|
||||||
if (savedFooter) {
|
if (savedFooter) {
|
||||||
data.footerImage = savedFooter;
|
data.footerImage = savedFooter;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function loadCache() {
|
function loadCache() {
|
||||||
const cache = uni.getStorageSync(CACHE_KEY);
|
const cache = uni.getStorageSync(CACHE_KEY);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
data.form = { ...data.form, ...cache };
|
data.form = {
|
||||||
|
...data.form,
|
||||||
|
...cache
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function saveCache() {
|
function saveCache() {
|
||||||
uni.setStorageSync(CACHE_KEY, data.form);
|
uni.setStorageSync(CACHE_KEY, data.form);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEditDialog() {
|
function openEditDialog() {
|
||||||
editDialog.data = JSON.parse(JSON.stringify(data.form));
|
editDialog.data = JSON.parse(JSON.stringify(data.form));
|
||||||
editDialog.show = true;
|
editDialog.show = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveEdit() {
|
function saveEdit() {
|
||||||
data.form = { ...data.form, ...editDialog.data };
|
data.form = {
|
||||||
|
...data.form,
|
||||||
|
...editDialog.data
|
||||||
|
};
|
||||||
saveCache();
|
saveCache();
|
||||||
editDialog.show = false;
|
editDialog.show = false;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '保存成功',
|
title: '保存成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 长按事件处理
|
// 长按事件处理
|
||||||
const handleTouchStart = (e) => {
|
const handleTouchStart = (e) => {
|
||||||
// 兼容iOS上滑HOME条
|
// 兼容iOS上滑HOME条
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
if (systemInfo.platform === 'ios' && systemInfo.safeAreaInsets?.bottom) {
|
if (systemInfo.platform === 'ios' && systemInfo.safeAreaInsets?.bottom) {
|
||||||
|
|
@ -306,17 +335,17 @@ const handleTouchStart = (e) => {
|
||||||
uni.vibrateShort();
|
uni.vibrateShort();
|
||||||
chooseImage();
|
chooseImage();
|
||||||
}, 1200);
|
}, 1200);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleTouchEnd = () => {
|
const handleTouchEnd = () => {
|
||||||
if (longPressTimer) {
|
if (longPressTimer) {
|
||||||
clearTimeout(longPressTimer);
|
clearTimeout(longPressTimer);
|
||||||
longPressTimer = null;
|
longPressTimer = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择图片
|
// 选择图片
|
||||||
const chooseImage = () => {
|
const chooseImage = () => {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
|
|
@ -325,20 +354,20 @@ const chooseImage = () => {
|
||||||
data.showMask = true;
|
data.showMask = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 关闭蒙层
|
// 关闭蒙层
|
||||||
const closeMask = () => {
|
const closeMask = () => {
|
||||||
data.showMask = false;
|
data.showMask = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 图片滚动监听
|
// 图片滚动监听
|
||||||
const onImageScroll = (e) => {
|
const onImageScroll = (e) => {
|
||||||
scrollTop.value = e.detail.scrollTop;
|
scrollTop.value = e.detail.scrollTop;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 确认裁剪
|
// 确认裁剪
|
||||||
const confirmImage = () => {
|
const confirmImage = () => {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '处理中...'
|
title: '处理中...'
|
||||||
});
|
});
|
||||||
|
|
@ -434,15 +463,15 @@ const confirmImage = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 关闭图片编辑
|
// 关闭图片编辑
|
||||||
const closeImageEdit = () => {
|
const closeImageEdit = () => {
|
||||||
selectedImage.value = '';
|
selectedImage.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 格式化数字,保留两位小数并添加千分位逗号
|
// 格式化数字,保留两位小数并添加千分位逗号
|
||||||
function formatNumber(num) {
|
function formatNumber(num) {
|
||||||
if (!num && num !== 0) return '';
|
if (!num && num !== 0) return '';
|
||||||
let cleanNum = String(num).replace(/[^\d.]/g, '');
|
let cleanNum = String(num).replace(/[^\d.]/g, '');
|
||||||
const parts = cleanNum.split('.');
|
const parts = cleanNum.split('.');
|
||||||
|
|
@ -456,20 +485,20 @@ function formatNumber(num) {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2
|
maximumFractionDigits: 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理输入事件
|
// 处理输入事件
|
||||||
function onNumberInput(field, value) {
|
function onNumberInput(field, value) {
|
||||||
editDialog.data[field] = formatNumber(value);
|
editDialog.data[field] = formatNumber(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 每四位添加空格
|
// 每四位添加空格
|
||||||
function addSpaceEveryFourChars(str) {
|
function addSpaceEveryFourChars(str) {
|
||||||
return str.replace(/(.{4})/g, '$1 ').trim();
|
return str.replace(/(.{4})/g, '$1 ').trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制卡号
|
// 复制卡号
|
||||||
function copyCardNumber() {
|
function copyCardNumber() {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: data.form.cardNumber,
|
data: data.form.cardNumber,
|
||||||
success: () => {
|
success: () => {
|
||||||
|
|
@ -480,65 +509,69 @@ function copyCardNumber() {
|
||||||
data.isShow = false;
|
data.isShow = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function back() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-row {
|
.flex-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-col {
|
.flex-col {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-start {
|
.justify-start {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-center {
|
.justify-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-end {
|
.justify-end {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-between {
|
.justify-between {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-start {
|
.items-start {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-end {
|
.items-end {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-center {
|
.items-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-shrink {
|
.no-shrink {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 建设银行 */
|
/* 建设银行 */
|
||||||
.div {
|
.div {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
min-height: 1862rpx;
|
min-height: 1862rpx;
|
||||||
|
|
@ -563,29 +596,28 @@ function copyCardNumber() {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
margin-top: 46rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 图片编辑样式 */
|
/* 图片编辑样式 */
|
||||||
.image-box {
|
.image-box {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 460rpx;
|
height: 460rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-image-box {
|
.scroll-image-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.crop-image-target {
|
.crop-image-target {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashed-line-box {
|
.dashed-line-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -609,9 +641,9 @@ function copyCardNumber() {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mask {
|
.mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -628,10 +660,10 @@ function copyCardNumber() {
|
||||||
width: 360rpx;
|
width: 360rpx;
|
||||||
height: 360rpx;
|
height: 360rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 组 45764 */
|
/* 组 45764 */
|
||||||
.group_45764 {
|
.group_45764 {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
// height: 658rpx;
|
// height: 658rpx;
|
||||||
padding-bottom: 70rpx;
|
padding-bottom: 70rpx;
|
||||||
|
|
@ -642,9 +674,10 @@ function copyCardNumber() {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
background-image: url(/static/image/other/bank/jsyh/headerBg.png);
|
background-image: url(/static/image/other/bank/jsyh/headerBg.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
.rectangle_23313 {
|
.rectangle_23313 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
|
@ -709,18 +742,25 @@ background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.flexcontainer_1 {
|
.flexcontainer_box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
width: 750rpx;
|
||||||
|
background-image: url(/static/image/other/bank/jsyh/headerBg.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
z-index: 999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flexcontainer_1 {
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
margin-left: 0;
|
|
||||||
z-index: 999 !important;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.group_8 {
|
.group_8 {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -789,6 +829,7 @@ background-repeat: no-repeat;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
-webkit-mask-image: linear-gradient(0, #d8d8d8, #d8d8d8);
|
-webkit-mask-image: linear-gradient(0, #d8d8d8, #d8d8d8);
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.group_13980 {
|
.group_13980 {
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
|
|
@ -934,6 +975,12 @@ background-repeat: no-repeat;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 152rpx;
|
margin-left: 152rpx;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
background: #D6DEF1;
|
||||||
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 34rpx;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #5D7ED7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_3 {
|
.text_3 {
|
||||||
|
|
@ -1089,10 +1136,10 @@ background-repeat: no-repeat;
|
||||||
margin-top: 42rpx;
|
margin-top: 42rpx;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 组 48190 */
|
/* 组 48190 */
|
||||||
.group_48190 {
|
.group_48190 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -1105,6 +1152,7 @@ background-repeat: no-repeat;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
|
||||||
.rectangle_23318 {
|
.rectangle_23318 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
|
|
@ -1158,7 +1206,7 @@ background-repeat: no-repeat;
|
||||||
left: 0;
|
left: 0;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
|
@ -1169,10 +1217,10 @@ background-repeat: no-repeat;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 组 48191 */
|
/* 组 48191 */
|
||||||
.group_48191 {
|
.group_48191 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
height: 206rpx;
|
height: 206rpx;
|
||||||
|
|
@ -1207,7 +1255,8 @@ background-repeat: no-repeat;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
|
|
||||||
|
|
@ -1219,9 +1268,6 @@ background-repeat: no-repeat;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
color: #2066c1;
|
color: #2066c1;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
height: 40rpx;
|
|
||||||
margin-top: 14rpx;
|
|
||||||
margin-bottom: -6rpx;
|
|
||||||
width: max-content;
|
width: max-content;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
@ -1252,6 +1298,7 @@ background-repeat: no-repeat;
|
||||||
margin-top: 34rpx;
|
margin-top: 34rpx;
|
||||||
margin-left: 22rpx;
|
margin-left: 22rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.group_14000 {
|
.group_14000 {
|
||||||
width: 20rpx;
|
width: 20rpx;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
|
|
@ -1263,7 +1310,7 @@ background-repeat: no-repeat;
|
||||||
.text_11 {
|
.text_11 {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
|
@ -1306,10 +1353,10 @@ background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 组 48192 */
|
/* 组 48192 */
|
||||||
.group_48192 {
|
.group_48192 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
height: 264rpx;
|
height: 264rpx;
|
||||||
|
|
@ -1320,6 +1367,8 @@ background-repeat: no-repeat;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
margin-left: 26rpx;
|
margin-left: 26rpx;
|
||||||
|
|
||||||
|
margin-bottom: 46rpx;
|
||||||
|
|
||||||
.rectangle_23319 {
|
.rectangle_23319 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
|
|
@ -1547,10 +1596,10 @@ background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 编辑弹窗样式 */
|
/* 编辑弹窗样式 */
|
||||||
.editDialog {
|
.editDialog {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -1561,9 +1610,9 @@ background-repeat: no-repeat;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_bg {
|
.editDialog_bg {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
@ -1571,9 +1620,9 @@ background-repeat: no-repeat;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_header {
|
.editDialog_header {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
border-bottom: 1rpx solid #eee;
|
border-bottom: 1rpx solid #eee;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -1583,15 +1632,15 @@ background-repeat: no-repeat;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_body {
|
.editDialog_body {
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItem {
|
.formItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
|
|
@ -1610,9 +1659,9 @@ background-repeat: no-repeat;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-footer {
|
.popup-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
border-top: 1rpx solid #eee;
|
border-top: 1rpx solid #eee;
|
||||||
|
|
@ -1634,13 +1683,13 @@ background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-save {
|
.btn-save {
|
||||||
background-color: #187AFF ;
|
background-color: #187AFF;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 卡号弹窗样式 */
|
/* 卡号弹窗样式 */
|
||||||
.dask {
|
.dask {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
|
@ -1699,6 +1748,5 @@ background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,20 @@
|
||||||
</liu-drag-button>
|
</liu-drag-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="flexcontainer">
|
<view class="flexcontainer">
|
||||||
|
|
||||||
<view class="group_48184" @click="openEditDialog">
|
<view class="group_48184" @click="openEditDialog">
|
||||||
<view :style="{height:$systemInfo.statusBarHeight*2+96+'rpx'}" style="position: relative;width: 100%;">
|
<view :style="{height:$systemInfo.statusBarHeight*2+96+'rpx'}" style="position: relative;width: 100%;">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="header">
|
<view class="headerBox">
|
||||||
<image src="/static/image/nav-bar/back-black.png" mode=""></image>
|
<view :style="{height:$systemInfo.statusBarHeight*2+'rpx'}" style="position: relative;width: 100%;">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="header" >
|
||||||
|
<image @click="back" src="/static/image/nav-bar/back-black.png" mode=""></image>
|
||||||
<text class="text_1">借记卡详情</text>
|
<text class="text_1">借记卡详情</text>
|
||||||
<text class="imgXl"></text>
|
<text class="imgXl"></text>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="rectangle_23309">
|
<view class="rectangle_23309">
|
||||||
<view class="flexcontainer_1">
|
<view class="flexcontainer_1">
|
||||||
<image class="group_13998" src="/static/image/other/bank/nyyh/eyes.png" />
|
<image class="group_13998" src="/static/image/other/bank/nyyh/eyes.png" />
|
||||||
|
|
@ -141,11 +144,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>可用余额</text>
|
<text>可用余额</text>
|
||||||
<input :value="editDialog.data.availableBalance" @input="(e) => onNumberInput('availableBalance', e.detail.value)" placeholder="如: 0.00" />
|
<input :value="editDialog.data.availableBalance"
|
||||||
|
@input="(e) => onNumberInput('availableBalance', e.detail.value)" placeholder="如: 0.00" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>账户余额</text>
|
<text>账户余额</text>
|
||||||
<input :value="editDialog.data.accountBalance" @input="(e) => onNumberInput('accountBalance', e.detail.value)" placeholder="如: 0.00" />
|
<input :value="editDialog.data.accountBalance"
|
||||||
|
@input="(e) => onNumberInput('accountBalance', e.detail.value)" placeholder="如: 0.00" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>钞汇标志</text>
|
<text>钞汇标志</text>
|
||||||
|
|
@ -170,11 +175,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, onMounted } from 'vue';
|
import {
|
||||||
|
reactive,
|
||||||
|
onMounted
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
const CACHE_KEY = 'nyyh_account_info';
|
const CACHE_KEY = 'nyyh_account_info';
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
cardNumberPrefix: '6216',
|
cardNumberPrefix: '6216',
|
||||||
cardNumberSuffix: '2173',
|
cardNumberSuffix: '2173',
|
||||||
|
|
@ -191,45 +199,51 @@ const data = reactive({
|
||||||
interestRate: '0.05000%',
|
interestRate: '0.05000%',
|
||||||
openDate: '2026/12/02',
|
openDate: '2026/12/02',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const editDialog = reactive({
|
const editDialog = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
data: {}
|
data: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadCache();
|
loadCache();
|
||||||
});
|
});
|
||||||
|
|
||||||
function loadCache() {
|
function loadCache() {
|
||||||
const cache = uni.getStorageSync(CACHE_KEY);
|
const cache = uni.getStorageSync(CACHE_KEY);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
data.form = { ...data.form, ...cache };
|
data.form = {
|
||||||
|
...data.form,
|
||||||
|
...cache
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function saveCache() {
|
function saveCache() {
|
||||||
uni.setStorageSync(CACHE_KEY, data.form);
|
uni.setStorageSync(CACHE_KEY, data.form);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEditDialog() {
|
function openEditDialog() {
|
||||||
editDialog.data = JSON.parse(JSON.stringify(data.form));
|
editDialog.data = JSON.parse(JSON.stringify(data.form));
|
||||||
editDialog.show = true;
|
editDialog.show = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveEdit() {
|
function saveEdit() {
|
||||||
data.form = { ...data.form, ...editDialog.data };
|
data.form = {
|
||||||
|
...data.form,
|
||||||
|
...editDialog.data
|
||||||
|
};
|
||||||
saveCache();
|
saveCache();
|
||||||
editDialog.show = false;
|
editDialog.show = false;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '保存成功',
|
title: '保存成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 格式化数字,保留两位小数并添加千分位逗号
|
// 格式化数字,保留两位小数并添加千分位逗号
|
||||||
function formatNumber(num) {
|
function formatNumber(num) {
|
||||||
if (!num && num !== 0) return '';
|
if (!num && num !== 0) return '';
|
||||||
let cleanNum = String(num).replace(/[^\d.]/g, '');
|
let cleanNum = String(num).replace(/[^\d.]/g, '');
|
||||||
const parts = cleanNum.split('.');
|
const parts = cleanNum.split('.');
|
||||||
|
|
@ -243,75 +257,79 @@ function formatNumber(num) {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2
|
maximumFractionDigits: 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理输入事件
|
// 处理输入事件
|
||||||
function onNumberInput(field, value) {
|
function onNumberInput(field, value) {
|
||||||
editDialog.data[field] = formatNumber(value);
|
editDialog.data[field] = formatNumber(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function back() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$color-text-primary: #1a1a1a;
|
$color-text-primary: #1a1a1a;
|
||||||
$color-text-secondary: #767676;
|
$color-text-secondary: #767676;
|
||||||
$color-text-muted: #999999;
|
$color-text-muted: #999999;
|
||||||
$color-text-btn: #6a6a6a;
|
$color-text-btn: #6a6a6a;
|
||||||
$color-accent: #08c1a2;
|
$color-accent: #08c1a2;
|
||||||
$color-gold: #dda94f;
|
$color-gold: #dda94f;
|
||||||
$color-bg: #f7f7f7;
|
$color-bg: #f7f7f7;
|
||||||
$color-white: #ffffff;
|
$color-white: #ffffff;
|
||||||
$color-border: #e6e6e6;
|
$color-border: #e6e6e6;
|
||||||
|
|
||||||
.flex-row {
|
.flex-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-col {
|
.flex-col {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-start {
|
.justify-start {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-center {
|
.justify-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-end {
|
.justify-end {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.justify-between {
|
.justify-between {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-start {
|
.items-start {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-end {
|
.items-end {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-center {
|
.items-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-shrink {
|
.no-shrink {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div {
|
.div {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
min-height: 1624rpx;
|
min-height: 1624rpx;
|
||||||
|
|
@ -362,7 +380,8 @@ $color-border: #e6e6e6;
|
||||||
.rectangle_23309 {
|
.rectangle_23309 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 484rpx;
|
// height: 484rpx;
|
||||||
|
padding-bottom: 28rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.2);
|
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.2);
|
||||||
|
|
@ -443,7 +462,7 @@ $color-border: #e6e6e6;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
color: $color-text-primary;
|
color: $color-text-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,7 +470,7 @@ $color-border: #e6e6e6;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
color: $color-text-primary;
|
color: $color-text-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -472,7 +491,7 @@ $color-border: #e6e6e6;
|
||||||
.flexcontainer_2 {
|
.flexcontainer_2 {
|
||||||
width: 222rpx;
|
width: 222rpx;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
margin-top: 47rpx;
|
margin-top: 26rpx;
|
||||||
|
|
||||||
.text_6 {
|
.text_6 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -606,7 +625,7 @@ $color-border: #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flexcontainer_5 {
|
.flexcontainer_5 {
|
||||||
margin-top: 28rpx;
|
margin-top: 26rpx;
|
||||||
|
|
||||||
.text_12 {
|
.text_12 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -717,6 +736,7 @@ $color-border: #e6e6e6;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|
@ -1068,10 +1088,10 @@ $color-border: #e6e6e6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 编辑弹窗样式 */
|
/* 编辑弹窗样式 */
|
||||||
.editDialog {
|
.editDialog {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -1082,9 +1102,9 @@ $color-border: #e6e6e6;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_bg {
|
.editDialog_bg {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
@ -1092,9 +1112,9 @@ $color-border: #e6e6e6;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_header {
|
.editDialog_header {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
border-bottom: 1rpx solid #eee;
|
border-bottom: 1rpx solid #eee;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -1104,15 +1124,15 @@ $color-border: #e6e6e6;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.editDialog_body {
|
.editDialog_body {
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItem {
|
.formItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
|
|
@ -1131,9 +1151,9 @@ $color-border: #e6e6e6;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-footer {
|
.popup-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
border-top: 1rpx solid #eee;
|
border-top: 1rpx solid #eee;
|
||||||
|
|
@ -1158,24 +1178,29 @@ $color-border: #e6e6e6;
|
||||||
background-color: #187AFF;
|
background-color: #187AFF;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.headerBox{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 750rpx;
|
||||||
}
|
}
|
||||||
.header{
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
image {
|
||||||
top: 0;
|
|
||||||
image{
|
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
margin-left: 18rpx;
|
margin-left: 18rpx;
|
||||||
}
|
}
|
||||||
.imgXl{
|
|
||||||
|
.imgXl {
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
margin-right: 18rpx;
|
margin-right: 18rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<image class="group_13980" src="/static/image/other/bank/zsyh/kf.png" mode="aspectFit" />
|
<image class="group_13980" src="/static/image/other/bank/zsyh/kf.png" mode="aspectFit" />
|
||||||
<view class="flexcontainer_4">
|
<view class="flexcontainer_4">
|
||||||
<view class="group_48144">
|
<view class="group_48144">
|
||||||
<text class="text_6">20</text>
|
20
|
||||||
</view>
|
</view>
|
||||||
<image class="group_13979" src="/static/image/other/bank/zsyh/more.png" mode="aspectFit" />
|
<image class="group_13979" src="/static/image/other/bank/zsyh/more.png" mode="aspectFit" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -1091,7 +1091,7 @@
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
margin-left: 44rpx;
|
margin-left: 44rpx;
|
||||||
margin-top: 32rpx;
|
margin-top: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group_48144 {
|
.group_48144 {
|
||||||
|
|
@ -1100,14 +1100,20 @@
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
background: #ff5d5f;
|
background: #ff5d5f;
|
||||||
|
margin-bottom: -2px;
|
||||||
|
margin-top: 4px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_6 {
|
.text_6 {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 30rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.group_13979 {
|
.group_13979 {
|
||||||
|
|
@ -1148,7 +1154,7 @@
|
||||||
.group_48142 {
|
.group_48142 {
|
||||||
width: 20rpx;
|
width: 20rpx;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
margin-top: 8rpx;
|
margin-top: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.path {
|
.path {
|
||||||
|
|
@ -1195,6 +1201,7 @@
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_10 {
|
.text_10 {
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 776 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 6.1 KiB |