支付宝理财页面40%
1
App.vue
|
|
@ -6,6 +6,7 @@ export default {
|
||||||
recentNativeData: 0 // 初始化一个全局变量
|
recentNativeData: 0 // 初始化一个全局变量
|
||||||
},
|
},
|
||||||
onLaunch: function (options) {
|
onLaunch: function (options) {
|
||||||
|
uni.setStorageSync('onNativeEventReceive', "no")
|
||||||
const startTime = Date.now()
|
const startTime = Date.now()
|
||||||
console.log('App Launch', options)
|
console.log('App Launch', options)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,11 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-justify-between {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-align-center {
|
.flex-align-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@
|
||||||
<view class="item" v-for="(item, index) in tabList" :key="item.id"
|
<view class="item" v-for="(item, index) in tabList" :key="item.id"
|
||||||
:class="{ 'active': index === activeIndex }" @click="onTabChange(index)">
|
:class="{ 'active': index === activeIndex }" @click="onTabChange(index)">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="triangle-concave-transparent ">
|
<!-- <view class="triangle-concave-transparent ">
|
||||||
</view>
|
</view> -->
|
||||||
|
<image src="/static/image/recharge/tabLine.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-show="index != activeIndex">
|
<view class="box" v-show="index != activeIndex">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
|
|
@ -17,8 +18,9 @@
|
||||||
<image class="vipImage" v-else src="/static/image/template/close.png" mode=""></image>
|
<image class="vipImage" v-else src="/static/image/template/close.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="triangle-concave-transparent leftBox">
|
<image src="/static/image/recharge/tabLine.png" mode=""></image>
|
||||||
</view>
|
<!-- <view class="triangle-concave-transparent leftBox">
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -492,7 +494,7 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin:0 20px 20px 20px;
|
margin:0 32rpx 32rpx 32rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -508,7 +510,7 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
// background-color: #;
|
// background-color: #;
|
||||||
border-radius: 14px 14px 0 0;
|
border-radius: 12px 12px 0 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 47px;
|
line-height: 47px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -538,22 +540,27 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.left,.right{
|
||||||
|
image{
|
||||||
|
width: 19px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.left {
|
.left {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
top: 12px;
|
||||||
left: -25px;
|
left: -19px;
|
||||||
// transition: all 0.3s ease-in-out;
|
// transition: all 0.3s ease-in-out;
|
||||||
transform-origin: right center;
|
// transform-origin: right center;
|
||||||
// transform: scaleX(0);
|
transform: scaleX(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
top: 12px;
|
||||||
right: -25px;
|
right: -19px;
|
||||||
// transition: all 0.3s ease-in-out;
|
// transition: all 0.3s ease-in-out;
|
||||||
transform-origin: left center;
|
transform-origin: left center;
|
||||||
// transform: scaleX(0);
|
// transform: scaleX(0);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<view style="width: 100%;" :style="{ height: `${data.statusBarHeight + 44}px` }"></view>
|
<view style="width: 100%;" :style="{ height: `${data.statusBarHeight + 44}px` }"></view>
|
||||||
<view class="nav-bar-container" :style="{ backgroundColor: bgColor, zIndex: zIndex }">
|
<view class="nav-bar-container" :style="{ backgroundColor: bgColor, zIndex: zIndex }">
|
||||||
<view class="status-placeholder" :style="{ height: `${data.statusBarHeight}px` }"></view>
|
<view class="status-placeholder" :style="{ height: `${data.statusBarHeight}px` }"></view>
|
||||||
<view style="width: 100%;height: 44px;" @click="openPopup">
|
<view style="width: 100%;height: 88rpx;" @click="openPopup">
|
||||||
<slot>
|
<slot>
|
||||||
<uni-nav-bar backgroundColor="#00000000" class="nav-bar" :border="false" :title="title" v-bind="$attrs"
|
<uni-nav-bar backgroundColor="#00000000" class="nav-bar" :border="false" :title="title" v-bind="$attrs"
|
||||||
v-on="$attrs">
|
v-on="$attrs">
|
||||||
|
|
|
||||||
2
main.js
|
|
@ -27,7 +27,7 @@ export function createApp() {
|
||||||
const systemInfo = uni.getStorageSync('systemInfo') || {}
|
const systemInfo = uni.getStorageSync('systemInfo') || {}
|
||||||
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
||||||
app.config.globalProperties.$systemInfo = systemInfo
|
app.config.globalProperties.$systemInfo = systemInfo
|
||||||
uni.setStorageSync('version', '1.0.0.sp2')
|
uni.setStorageSync('version', '1.0.0.sp3')
|
||||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||||
|
|
||||||
app.use(globalMethods);
|
app.use(globalMethods);
|
||||||
|
|
|
||||||
|
|
@ -262,11 +262,11 @@ const onConsumptionDateChange = (e) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 进入花呗页面埋点
|
// 进入花呗逾期页面埋点
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: 'click',
|
type: 'click',
|
||||||
key: 'huabei',
|
key: 'huabei_overdue',
|
||||||
value: "花呗"
|
value: "花呗逾期"
|
||||||
})
|
})
|
||||||
console.log(option)
|
console.log(option)
|
||||||
// 读取缓存
|
// 读取缓存
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,8 @@ import {
|
||||||
reactive,
|
reactive,
|
||||||
toRefs,
|
toRefs,
|
||||||
ref,
|
ref,
|
||||||
nextTick
|
nextTick,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
|
@ -257,6 +258,9 @@ const {
|
||||||
updateBill
|
updateBill
|
||||||
} = useStore()
|
} = useStore()
|
||||||
|
|
||||||
|
const instance = getCurrentInstance();
|
||||||
|
const { proxy } = instance;
|
||||||
|
|
||||||
const billManagementPopupRef = ref(null)
|
const billManagementPopupRef = ref(null)
|
||||||
|
|
||||||
const buttonGroup = [{
|
const buttonGroup = [{
|
||||||
|
|
@ -326,6 +330,12 @@ onShow(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
|
// 进入账单详情页面埋点
|
||||||
|
proxy.$apiUserEvent('all', {
|
||||||
|
type: 'click',
|
||||||
|
key: 'bill_details',
|
||||||
|
value: "账单详情"
|
||||||
|
})
|
||||||
console.log(option)
|
console.log(option)
|
||||||
if (option.id) {
|
if (option.id) {
|
||||||
data.billId = option.id
|
data.billId = option.id
|
||||||
|
|
|
||||||
|
|
@ -260,13 +260,32 @@
|
||||||
|
|
||||||
|
|
||||||
<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 { postJson } from "@/utils/requests.js"
|
import {
|
||||||
import { ref, reactive, getCurrentInstance, watch, nextTick, toRefs } from "vue";
|
postJson
|
||||||
import { onLoad, onShow, onReady, onPullDownRefresh, onReachBottom, onBackPress, onUnload } from "@dcloudio/uni-app";
|
} from "@/utils/requests.js"
|
||||||
const { appContext, proxy } = getCurrentInstance();
|
import {
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
getCurrentInstance,
|
||||||
|
watch,
|
||||||
|
nextTick,
|
||||||
|
toRefs
|
||||||
|
} from "vue";
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
onReady,
|
||||||
|
onPullDownRefresh,
|
||||||
|
onReachBottom,
|
||||||
|
onBackPress,
|
||||||
|
onUnload
|
||||||
|
} from "@dcloudio/uni-app";
|
||||||
|
const {
|
||||||
|
appContext,
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance();
|
||||||
const popup = ref();
|
const popup = ref();
|
||||||
const coupon = ref();
|
const coupon = ref();
|
||||||
const couponBox = ref();
|
const couponBox = ref();
|
||||||
|
|
@ -416,7 +435,14 @@ const data = reactive({
|
||||||
banner: '/static/image/recharge/banner1.png',
|
banner: '/static/image/recharge/banner1.png',
|
||||||
})
|
})
|
||||||
|
|
||||||
let { buttonText, selected, benefitList, noticeList, commentList, paymentMethod } = toRefs(data)
|
let {
|
||||||
|
buttonText,
|
||||||
|
selected,
|
||||||
|
benefitList,
|
||||||
|
noticeList,
|
||||||
|
commentList,
|
||||||
|
paymentMethod
|
||||||
|
} = toRefs(data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回监听
|
* 返回监听
|
||||||
|
|
@ -498,12 +524,15 @@ onLoad(async () => {
|
||||||
item['isStatus'] = true
|
item['isStatus'] = true
|
||||||
}
|
}
|
||||||
item['expire_times'] = item.expire_time
|
item['expire_times'] = item.expire_time
|
||||||
item.expire_time = item.expire_time.replace('-', '.').replace('-', '.').substring(0, 10)
|
item.expire_time = item.expire_time.replace('-', '.').replace('-', '.').substring(
|
||||||
|
0, 10)
|
||||||
})
|
})
|
||||||
data.myActivity = [
|
data.myActivity = [
|
||||||
...activity.data.items.filter(item => (item.threshold == '' || zsItem.price >= (Number(item
|
...activity.data.items.filter(item => (item.threshold == '' || zsItem.price >= (Number(
|
||||||
|
item
|
||||||
.threshold) / 100)) && item.isStatus),
|
.threshold) / 100)) && item.isStatus),
|
||||||
...activity.data.items.filter(item => (zsItem.price < (Number(item.threshold) / 100) && item
|
...activity.data.items.filter(item => (zsItem.price < (Number(item.threshold) / 100) &&
|
||||||
|
item
|
||||||
.threshold != '') || !item.isStatus)
|
.threshold != '') || !item.isStatus)
|
||||||
]
|
]
|
||||||
data.myActivity = deduplicateKeepLast(data.myActivity)
|
data.myActivity = deduplicateKeepLast(data.myActivity)
|
||||||
|
|
@ -534,6 +563,8 @@ onLoad(async () => {
|
||||||
data.isBack = false
|
data.isBack = false
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
if (uni.getStorageSync('onNativeEventReceive') != 'ok') {
|
||||||
|
uni.setStorageSync('onNativeEventReceive', 'ok')
|
||||||
//监听宿主传递消息
|
//监听宿主传递消息
|
||||||
uni.onNativeEventReceive((event, data) => {
|
uni.onNativeEventReceive((event, data) => {
|
||||||
if (event) {
|
if (event) {
|
||||||
|
|
@ -562,13 +593,15 @@ onLoad(async () => {
|
||||||
console.log('接收到宿主App消息-' + event + ':' + data);
|
console.log('接收到宿主App消息-' + event + ':' + data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
|
|
||||||
})
|
})
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
uni.offNativeEventReceive()
|
// uni.offNativeEventReceive()
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -702,10 +735,12 @@ function setPrice(status) {
|
||||||
origin_price = Number(data.goods.origin_price)
|
origin_price = Number(data.goods.origin_price)
|
||||||
coupon = origin_price - price
|
coupon = origin_price - price
|
||||||
} else {
|
} else {
|
||||||
price = data.goods.price - (data.activeCoupon.coupon_type_name != '折扣券' ? (Number(data.activeCoupon.coupon_value) /
|
price = data.goods.price - (data.activeCoupon.coupon_type_name != '折扣券' ? (Number(data.activeCoupon
|
||||||
|
.coupon_value) /
|
||||||
100) : ((1 - Number(data.activeCoupon.coupon_value)) * data.goods.price))
|
100) : ((1 - Number(data.activeCoupon.coupon_value)) * data.goods.price))
|
||||||
coupon = (Number(data.goods.origin_price) - Number(data.goods.price)) + (Number(data.goods.price) - (data.goods
|
coupon = (Number(data.goods.origin_price) - Number(data.goods.price)) + (Number(data.goods.price) - (data.goods
|
||||||
.price - (data.activeCoupon.coupon_type_name != '折扣券' ? (Number(data.activeCoupon.coupon_value) / 100) : ((
|
.price - (data.activeCoupon.coupon_type_name != '折扣券' ? (Number(data.activeCoupon.coupon_value) /
|
||||||
|
100) : ((
|
||||||
1 - Number(data.activeCoupon.coupon_value)) * data.goods.price))))
|
1 - Number(data.activeCoupon.coupon_value)) * data.goods.price))))
|
||||||
}
|
}
|
||||||
data.coupon = proxy.$toFiexd(coupon, 0)
|
data.coupon = proxy.$toFiexd(coupon, 0)
|
||||||
|
|
@ -786,14 +821,17 @@ async function getActivity() {
|
||||||
item.expire_time = item.expire_time.replace('-', '.').replace('-', '.').substring(0, 10)
|
item.expire_time = item.expire_time.replace('-', '.').replace('-', '.').substring(0, 10)
|
||||||
})
|
})
|
||||||
data.myActivity = [
|
data.myActivity = [
|
||||||
...activity.data.items.filter(item => (item.threshold == '' || data.goods.price >= (Number(item.threshold) /
|
...activity.data.items.filter(item => (item.threshold == '' || data.goods.price >= (Number(item
|
||||||
|
.threshold) /
|
||||||
100) && item.isStatus)),
|
100) && item.isStatus)),
|
||||||
...activity.data.items.filter(item => (data.goods.price < (Number(item.threshold) / 100) && item.threshold !=
|
...activity.data.items.filter(item => (data.goods.price < (Number(item.threshold) / 100) && item
|
||||||
|
.threshold !=
|
||||||
'') || !item.isStatus)
|
'') || !item.isStatus)
|
||||||
]
|
]
|
||||||
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();
|
||||||
|
|
||||||
|
|
@ -883,8 +921,10 @@ async function onSelect(items, index) {
|
||||||
let defaultCoupon = data.myActivity.filter(item => item.activity_id == data.goods.default_activity)
|
let defaultCoupon = data.myActivity.filter(item => item.activity_id == data.goods.default_activity)
|
||||||
if (defaultCoupon.length > 0) {
|
if (defaultCoupon.length > 0) {
|
||||||
defaultCoupon.forEach(item => {
|
defaultCoupon.forEach(item => {
|
||||||
if ((data.goods.price >= (Number(item.threshold) / 100) || item.threshold == '') && item.isStatus) {
|
if ((data.goods.price >= (Number(item.threshold) / 100) || item.threshold == '') && item
|
||||||
item['price2'] = data.goods.price - (item.coupon_type_name != '折扣券' ? (Number(item.coupon_value) /
|
.isStatus) {
|
||||||
|
item['price2'] = data.goods.price - (item.coupon_type_name != '折扣券' ? (Number(item
|
||||||
|
.coupon_value) /
|
||||||
100) : ((1 - Number(item.coupon_value)) * data.goods.price))
|
100) : ((1 - Number(item.coupon_value)) * data.goods.price))
|
||||||
} else {
|
} else {
|
||||||
item['price2'] = 10000000
|
item['price2'] = 10000000
|
||||||
|
|
@ -906,8 +946,10 @@ async function onSelect(items, index) {
|
||||||
if (id == 0 && data.goods.default_activity != '') {
|
if (id == 0 && data.goods.default_activity != '') {
|
||||||
try {
|
try {
|
||||||
data.myActivity.forEach(item => {
|
data.myActivity.forEach(item => {
|
||||||
if ((data.goods.price >= (Number(item.threshold) / 100) || item.threshold == '') && item.isStatus) {
|
if ((data.goods.price >= (Number(item.threshold) / 100) || item.threshold == '') &&
|
||||||
item['price2'] = data.goods.price - (item.coupon_type_name != '折扣券' ? (Number(item.coupon_value) /
|
item.isStatus) {
|
||||||
|
item['price2'] = data.goods.price - (item.coupon_type_name != '折扣券' ? (Number(item
|
||||||
|
.coupon_value) /
|
||||||
100) : ((1 - Number(item.coupon_value)) * data.goods.price))
|
100) : ((1 - Number(item.coupon_value)) * data.goods.price))
|
||||||
} else {
|
} else {
|
||||||
item['price2'] = 10000000
|
item['price2'] = 10000000
|
||||||
|
|
@ -940,7 +982,8 @@ 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' : '/static/image/recharge/alipay.png',
|
image: cell == 'weixin' ? '/static/image/recharge/wxpay.png' :
|
||||||
|
'/static/image/recharge/alipay.png',
|
||||||
name: cell == 'weixin' ? '微信支付' : '支付宝支付',
|
name: cell == 'weixin' ? '微信支付' : '支付宝支付',
|
||||||
type: cell == 'weixin' ? 'wxpay' : 'alipay'
|
type: cell == 'weixin' ? 'wxpay' : 'alipay'
|
||||||
}
|
}
|
||||||
|
|
@ -1403,6 +1446,7 @@ 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)) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<!-- 水印 -->
|
||||||
<view class="main-info-container">
|
<view v-if="$isVip()">
|
||||||
|
<watermark :dark="data.dark" />
|
||||||
|
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark')">
|
||||||
|
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||||
|
</liu-drag-button>
|
||||||
|
</view>
|
||||||
|
<view class="container flex flex-column" @touchstart="handleTouchStart" @touchmove.stop.prevent="handleTouchMove"
|
||||||
|
@touchend="handleTouchEnd">
|
||||||
|
<view class="main-info-container" :class="{ 'open': isOpen }"
|
||||||
|
:style="{ 'padding-bottom': `${cardArrowHeight}px` }">
|
||||||
<!-- 导航栏 placeholder -->
|
<!-- 导航栏 placeholder -->
|
||||||
<NavBar bgColor="transparent">
|
<NavBar bgColor="transparent">
|
||||||
<view class="nav-bar flex-align-center h100">
|
<view class="nav-bar flex-align-center h100">
|
||||||
|
|
@ -36,10 +45,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="total-money flex-align-center" style="margin-top: 10px;">
|
<view class="total-money flex-align-center" style="margin-top: 10px;">
|
||||||
<view class="total-money-value flex-align-center">
|
<view class="total-money-value flex-align-center">
|
||||||
<text>{{ financeInfo.totalMoney }}</text>
|
<text class="alipay-font">{{ numberUtil.formatMoneyWithThousand(totalMoney) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="total-money-value flex-align-center">
|
<view class="total-money-value flex-align-center">
|
||||||
<text>{{ financeInfo.yesterdayIncome }}</text>
|
<text class="alipay-font">{{ yesterdayIncome > 0 ? "+" +
|
||||||
|
numberUtil.formatMoneyWithThousand(yesterdayIncome) :
|
||||||
|
numberUtil.formatMoneyWithThousand(yesterdayIncome)
|
||||||
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -48,14 +60,55 @@
|
||||||
<text>家庭保障</text>
|
<text>家庭保障</text>
|
||||||
</view>
|
</view>
|
||||||
<view class=" flex-align-end" style="margin-top: 10px;">
|
<view class=" flex-align-end" style="margin-top: 10px;">
|
||||||
<text class="value">{{ financeInfo.familyProtection }}</text>
|
<text class="value alipay-font">{{ familyProtection }}</text>
|
||||||
<text class="text">份</text>
|
<text class="text">份</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="data-box">
|
||||||
|
<view v-for="item in myAssets" :key="item.title">
|
||||||
|
<view v-if="item.title" class="title second-color">{{ item.title }}</view>
|
||||||
|
<view class="group-data flex-justify-between">
|
||||||
|
<template v-for="subItem in item.items" :key="subItem.label">
|
||||||
|
<view v-if="financeInfo[item.key][subItem.key].labelSub"
|
||||||
|
class="item flex-align-center flex-justify-between">
|
||||||
|
<view class="flex-align-center">
|
||||||
|
<text class="label primary-color">{{ subItem.label }}</text>
|
||||||
|
<text v-if="financeInfo[item.key][subItem.key].type == 'text'"
|
||||||
|
class="label-sub second-color">
|
||||||
|
{{ formatTextWithNumber(financeInfo[item.key][subItem.key].labelSub) }}
|
||||||
|
</text>
|
||||||
|
<text v-else class="label-sub second-color">
|
||||||
|
{{
|
||||||
|
numberUtil.formatMoneyWithThousand(financeInfo[item.key][subItem.key].labelSub)
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text v-if="financeInfo[item.key][subItem.key].value" class="value primary-color">{{
|
||||||
|
financeInfo[item.key][subItem.key].value > 0 ? "+" +
|
||||||
|
numberUtil.formatMoneyWithThousand(financeInfo[item.key][subItem.key].value) :
|
||||||
|
numberUtil.formatMoneyWithThousand(financeInfo[item.key][subItem.key].value)
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<view v-if="item.groupId == '1'" class="item flex-align-center flex-justify-between">
|
||||||
|
<view class="flex-align-center">
|
||||||
|
<text class="label primary-color">更多资产服务</text>
|
||||||
|
</view>
|
||||||
|
<text class="value primary-color">去看看</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="image-service-box flex-column"
|
||||||
|
:style="{ top: topHeight + 'px', 'min-height': `calc(100vh - ${imageCardBoxtopHeight}px)` }">
|
||||||
|
<view class="card-arrow-box">
|
||||||
<view class="arrow-box">
|
<view class="arrow-box">
|
||||||
<image class="arrow-icon" src="/static/image/finance-management/arrow-down.png"></image>
|
<image @click="data.isOpen = !data.isOpen" class="arrow-icon"
|
||||||
|
:src="`/static/image/finance-management/arrow-${isOpen ? 'up' : 'down'}.png`">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card-box flex-column">
|
<view class="card-box flex-column">
|
||||||
|
|
@ -63,14 +116,18 @@
|
||||||
<view class="wealth-card-box flex">
|
<view class="wealth-card-box flex">
|
||||||
<!-- 占位图片设置为透明 -->
|
<!-- 占位图片设置为透明 -->
|
||||||
<image class="wealth-card-opacity0" src="/static/image/finance-management/v1/bg.png"
|
<image class="wealth-card-opacity0" src="/static/image/finance-management/v1/bg.png"
|
||||||
mode="widthFix" />
|
mode="widthFix" @load="updateTopHeight" />
|
||||||
<!-- 背景图片高度自适应 -->
|
<!-- 背景图片高度自适应 -->
|
||||||
<image class="wealth-card" src="/static/image/finance-management/v1/bg.png" mode="widthFix" />
|
<image class="wealth-card"
|
||||||
|
:src="`/static/image/finance-management/${financeInfo.vipLevel}/bg.png`" mode="widthFix" />
|
||||||
|
|
||||||
<view class="card-info">
|
<view class="card-info">
|
||||||
<image class="logo" src="/static/image/finance-management/v1/logo.png" mode="scaleToFill" />
|
<image class="logo"
|
||||||
|
:src="`/static/image/finance-management/${financeInfo.vipLevel}/logo.png`"
|
||||||
|
mode="scaleToFill" />
|
||||||
<view class="name-box flex-align-center">
|
<view class="name-box flex-align-center">
|
||||||
<image class="card-holder-icon" src="/static/image/finance-management/v1/card-holder.png"
|
<image class="card-holder-icon"
|
||||||
|
:src="`/static/image/finance-management/${financeInfo.vipLevel}/card-holder.png`"
|
||||||
mode="scaleToFill" />
|
mode="scaleToFill" />
|
||||||
<view class="card-holder-name sacramento-font">{{ financeInfo.cardHolderName }}</view>
|
<view class="card-holder-name sacramento-font">{{ financeInfo.cardHolderName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -78,24 +135,54 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="enjoy-benefits flex-align-center">
|
<view class="enjoy-benefits flex-align-center">
|
||||||
<text class="benefits-text">{{ financeInfo.benefitsText }}</text>
|
<text class="benefits-text">{{ financeInfo.benefitsText }}</text>
|
||||||
<image class="arrow-icon" src="/static/image/finance-management/v1/arrow.png"></image>
|
<image class="arrow-icon"
|
||||||
|
:src="`/static/image/finance-management/${financeInfo.vipLevel}/arrow.png`"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content-box">
|
||||||
|
<view class="service-icons">
|
||||||
|
<view class="service-icon" v-for="item in serviceIcons" :key="item.name">
|
||||||
|
<image class="icon"
|
||||||
|
:src="`/static/image/finance-management/service-icon/${item.icon}.png`"
|
||||||
|
mode="scaleToFill" />
|
||||||
|
<text class="name">{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content flex-1 flex-align-center flex-justify-center">
|
||||||
|
<view class="flex-align-center flex-column">
|
||||||
|
<image style="width:92rpx; height: 92rpx;margin-top: 16rpx;"
|
||||||
|
src="/static/image/common/upload-screenshot.png">
|
||||||
|
</image>
|
||||||
|
<text style="font-size: 36rpx;color: #1777FF;">长按替换真实截图</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content-box"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="content">
|
<view class="bottom-box"
|
||||||
|
:class="`navigation-menu-${financeInfo.navigationMenuStyle}`, { 'ios-bottom-box': $system == 'iOS' }">
|
||||||
|
<view class="bottom-item" v-for="item in navigationMenu" :key="item.name">
|
||||||
|
<image
|
||||||
|
:src="`/static/image/finance-management/navigation-menu/${financeInfo.navigationMenuStyle}/${item.icon}.png`">
|
||||||
|
</image>
|
||||||
|
<text>{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import NavBar from '@/components/nav-bar/nav-bar.vue'
|
import NavBar from '@/components/nav-bar/nav-bar.vue'
|
||||||
import { ref, toRefs, reactive, onMounted } from 'vue'
|
import { ref, toRefs, reactive, onMounted, watch, computed } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||||
|
import { serviceIcons, navigationMenu, myAssets } from '@/static/json/fortune.json'
|
||||||
|
import { numberUtil } from '@/utils/common.js'
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 理财页面埋点
|
// 理财页面埋点
|
||||||
|
|
@ -106,18 +193,245 @@ onLoad(() => {
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
|
|
||||||
const data = reactive({
|
onReady(() => {
|
||||||
financeInfo: {
|
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight;
|
||||||
totalMoney: 100000000,
|
uni.createSelectorQuery().select('.total-money-box').boundingClientRect((data) => {
|
||||||
yesterdayIncome: 22222,
|
console.log("total-money-box height: " + (data ? data.height : "null"));
|
||||||
familyProtection: 1,
|
topHeight.value = data ? data.height + 44 + statusBarHeight.value : 44 + statusBarHeight.value;
|
||||||
benefitsText: '尊享礼遇18000元/年',
|
imageCardBoxtopHeight.value = data ? data.height + 44 + statusBarHeight.value : 44 + statusBarHeight.value;
|
||||||
cardHolderName: 'LiXing',
|
}).exec()
|
||||||
vipLevel: 1,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
let { financeInfo } = toRefs(data)
|
const updateTopHeight = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.createSelectorQuery().select('.card-arrow-box').boundingClientRect((data) => {
|
||||||
|
console.log("card-arrow-box height: " + (data ? data.height : "null"));
|
||||||
|
cardArrowHeight.value = data ? data.height - 20 : 0;
|
||||||
|
}).exec()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总资产
|
||||||
|
const totalMoney = computed(() => {
|
||||||
|
let totalMoney = 0;
|
||||||
|
for (const key in financeInfo.value.fortune) {
|
||||||
|
if (!Object.hasOwn(financeInfo.value.fortune, key)) continue;
|
||||||
|
const element = financeInfo.value.fortune[key];
|
||||||
|
totalMoney += Number(element.labelSub)
|
||||||
|
}
|
||||||
|
return totalMoney
|
||||||
|
})
|
||||||
|
|
||||||
|
// 昨日收益
|
||||||
|
const yesterdayIncome = computed(() => {
|
||||||
|
let yesterdayIncome = 0;
|
||||||
|
for (const key in financeInfo.value.fortune) {
|
||||||
|
if (!Object.hasOwn(financeInfo.value.fortune, key)) continue;
|
||||||
|
const element = financeInfo.value.fortune[key];
|
||||||
|
yesterdayIncome += Number(element.value)
|
||||||
|
}
|
||||||
|
return yesterdayIncome
|
||||||
|
})
|
||||||
|
|
||||||
|
// 家庭保障
|
||||||
|
const familyProtection = computed(() => {
|
||||||
|
return parseInt(financeInfo.value.myAssets.baoxian.labelSub)
|
||||||
|
})
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
financeInfo: {
|
||||||
|
benefitsText: '尊享礼遇18000元/年',
|
||||||
|
cardHolderName: 'LiXing',
|
||||||
|
vipLevel: "v3",
|
||||||
|
navigationMenuStyle: "style-1",
|
||||||
|
fortune: {
|
||||||
|
yuebao: {
|
||||||
|
value: 3.53,
|
||||||
|
labelSub: "100000",
|
||||||
|
},
|
||||||
|
dingqi: {
|
||||||
|
value: 50,
|
||||||
|
labelSub: "100000",
|
||||||
|
},
|
||||||
|
jijin: {
|
||||||
|
value: 5000,
|
||||||
|
labelSub: "100000",
|
||||||
|
},
|
||||||
|
huangjin: {
|
||||||
|
value: -300,
|
||||||
|
labelSub: "100000",
|
||||||
|
},
|
||||||
|
yulingbao: {
|
||||||
|
value: 20,
|
||||||
|
labelSub: "100000",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
myAssets: {
|
||||||
|
baoxian: {
|
||||||
|
labelSub: "3份保单保障中",
|
||||||
|
type: "text"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
myQuota: {
|
||||||
|
huabei: {
|
||||||
|
labelSub: "可用100000",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
jubei: {
|
||||||
|
labelSub: "可用100000",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
beizhi: {
|
||||||
|
labelSub: "可用100000",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
wangshangdai: {
|
||||||
|
labelSub: "预计可借100000",
|
||||||
|
type: "text"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
topHeight: 0,
|
||||||
|
statusBarHeight: 0,
|
||||||
|
cardArrowHeight: 0,
|
||||||
|
imageCardBoxtopHeight: 0,
|
||||||
|
isOpen: false
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let { financeInfo, topHeight, statusBarHeight, cardArrowHeight, imageCardBoxtopHeight, isOpen } = toRefs(data)
|
||||||
|
|
||||||
|
|
||||||
|
const formatTextWithNumber = (str) => {
|
||||||
|
if (!str) return '';
|
||||||
|
return str.replace(/(\d+(\.\d+)?)/g, (match) => {
|
||||||
|
return match > 100 ? numberUtil.formatMoneyWithThousand(match) : match;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let startY = 0;
|
||||||
|
let startTop = 0;
|
||||||
|
let minTop = 0;
|
||||||
|
let maxTop = 0;
|
||||||
|
|
||||||
|
// 监听 isOpen 变化来控制 topHeight
|
||||||
|
watch(() => isOpen.value, () => {
|
||||||
|
updateHeightByState();
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleTouchStart = (e) => {
|
||||||
|
startY = e.touches[0].clientY;
|
||||||
|
startTop = topHeight.value;
|
||||||
|
|
||||||
|
// 如果未设置边界(或为了安全起见每次开始时),则计算边界
|
||||||
|
if (!minTop || !maxTop) {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
const statusBar = systemInfo.statusBarHeight;
|
||||||
|
|
||||||
|
// 创建查询以获取当前尺寸
|
||||||
|
const query = uni.createSelectorQuery();
|
||||||
|
query.select('.total-money-box').boundingClientRect();
|
||||||
|
query.select('.main-info-container').boundingClientRect();
|
||||||
|
query.exec(([totalMoneyBox, mainInfoContainer]) => {
|
||||||
|
if (totalMoneyBox) {
|
||||||
|
// 最小高度(关闭状态):total-money-box 高度 + 导航栏 + 状态栏 - 卡片箭头偏移量
|
||||||
|
minTop = totalMoneyBox.height + 44 + statusBar;
|
||||||
|
}
|
||||||
|
if (mainInfoContainer) {
|
||||||
|
// 最大高度(打开状态):main-info-container 高度 - 卡片箭头高度
|
||||||
|
// 注意:isOpen 会切换内边距/布局,因此这可能需要根据当前状态进行调整。
|
||||||
|
// 为简单起见,我们假设我们在初始化/切换期间捕获了正确的值或对其进行了估算。
|
||||||
|
// 更稳健的方法:
|
||||||
|
// 关闭状态顶部:~160px(示例)
|
||||||
|
// 打开状态顶部:~400px(示例)
|
||||||
|
// 我们可以从之前使用的 'isOpen=true' 计算逻辑推断出 maxTop:
|
||||||
|
// data.height (main-info-container 的高度)。
|
||||||
|
// 如果当前已关闭,main-info-container 可能很小。
|
||||||
|
// 但我们知道 'isOpen=true' 会将 topHeight 设置为 main-info-container 的高度(打开时)。
|
||||||
|
|
||||||
|
// 让我们依赖之前记录/使用的值。
|
||||||
|
// 如果当前已关闭:minTop 是当前 topHeight。
|
||||||
|
// 如果当前已打开:maxTop 是当前 topHeight。
|
||||||
|
// 我们需要 *另一个* 值。
|
||||||
|
|
||||||
|
// 让我们在 onReady/updateTopHeight 中动态重新测量以确信,
|
||||||
|
// 但在这里我们可以尝试估算或依赖之前的逻辑。
|
||||||
|
|
||||||
|
// 更好的方法:根据 DOM 预先计算两者或使用固定逻辑。
|
||||||
|
// minTop 大约是 44 + statusBar + totalMoneyBoxHeight
|
||||||
|
// maxTop 是 mainContainerHeight(展开时)
|
||||||
|
}
|
||||||
|
// 目前,让我们使用 handleTouchEnd 中的逻辑来设置这些动态限制
|
||||||
|
// 我们将在 handleTouchEnd 或 init 中更新它们。
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTouchMove = (e) => {
|
||||||
|
let currentY = e.touches[0].clientY;
|
||||||
|
let delta = currentY - startY;
|
||||||
|
let newTop = startTop + delta;
|
||||||
|
|
||||||
|
// 如果为 0,让我们获取它们。
|
||||||
|
if (minTop === 0 && !isOpen.value) minTop = startTop;
|
||||||
|
if (maxTop === 0 && isOpen.value) maxTop = startTop;
|
||||||
|
|
||||||
|
// 如果有值,则进行简单钳位
|
||||||
|
if (minTop && maxTop) {
|
||||||
|
if (newTop < minTop) newTop = minTop;
|
||||||
|
if (newTop > maxTop) newTop = maxTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 应用
|
||||||
|
topHeight.value = newTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateHeightByState = () => {
|
||||||
|
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight;
|
||||||
|
if (isOpen.value) {
|
||||||
|
// 打开状态:计算 main-info-container 高度
|
||||||
|
uni.createSelectorQuery().select('.main-info-container').boundingClientRect((data) => {
|
||||||
|
if (data) {
|
||||||
|
const targetH = data.height - cardArrowHeight.value;
|
||||||
|
topHeight.value = targetH;
|
||||||
|
maxTop = targetH; // 更新 maxTop
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
} else {
|
||||||
|
// 关闭状态:计算 total-money-box 位置
|
||||||
|
uni.createSelectorQuery().select('.total-money-box').boundingClientRect((data) => {
|
||||||
|
if (data) {
|
||||||
|
const targetH = data.height + 44 + statusBarHeight.value;
|
||||||
|
topHeight.value = targetH;
|
||||||
|
minTop = targetH; // 更新 minTop
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTouchEnd = (e) => {
|
||||||
|
let endY = e.changedTouches[0].clientY;
|
||||||
|
let diff = endY - startY;
|
||||||
|
|
||||||
|
let targetState = isOpen.value;
|
||||||
|
|
||||||
|
// 判断滑动意图
|
||||||
|
if (diff > 50) {
|
||||||
|
targetState = true;
|
||||||
|
} else if (diff < -50) {
|
||||||
|
targetState = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果状态改变,watch 会处理动画/高度更新
|
||||||
|
if (targetState !== isOpen.value) {
|
||||||
|
isOpen.value = targetState;
|
||||||
|
} else {
|
||||||
|
// 如果状态未改变,手动恢复高度(吸附回原位)
|
||||||
|
updateHeightByState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -127,13 +441,12 @@ let { financeInfo } = toRefs(data)
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.container {
|
.container {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #f5f5f5;
|
background-color: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-info-container {
|
.main-info-container {
|
||||||
background: linear-gradient(191deg, #0B1028 5.48%, #0B1028 30.26%, #18336C 60.18%, #18336C 100%);
|
background: linear-gradient(348deg, #0B1028 49%, #0B1028 76.26%, #18336C 86.18%, #18336C 100%);
|
||||||
|
|
||||||
|
|
||||||
.nav-bar {
|
.nav-bar {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
@ -192,6 +505,7 @@ let { financeInfo } = toRefs(data)
|
||||||
.total-money-box {
|
.total-money-box {
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
.revenue-box {
|
.revenue-box {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
|
|
@ -234,6 +548,7 @@ let { financeInfo } = toRefs(data)
|
||||||
.family-protection {
|
.family-protection {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
flex-shrink: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
border-left: 1rpx solid #172139;
|
border-left: 1rpx solid #172139;
|
||||||
|
|
@ -256,6 +571,52 @@ let { financeInfo } = toRefs(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.data-box {
|
||||||
|
padding: 0 26rpx 0;
|
||||||
|
font-size: 26rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-data {
|
||||||
|
// margin-top: 8rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: calc(50% - 15rpx);
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
margin-right: 18rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.second-color {
|
||||||
|
color: #787174;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary-color {
|
||||||
|
color: #EAD2B8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.open {
|
||||||
|
// background: #08112E;
|
||||||
|
background: linear-gradient(146deg, #0B1028 49%, #08112E 71.26%, #18336C 83.18%, #18336C 96%)
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-service-box {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
top: 20%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.arrow-box {
|
.arrow-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -291,7 +652,7 @@ let { financeInfo } = toRefs(data)
|
||||||
|
|
||||||
.name-box {
|
.name-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-holder-icon {
|
.card-holder-icon {
|
||||||
|
|
@ -338,8 +699,33 @@ let { financeInfo } = toRefs(data)
|
||||||
|
|
||||||
.content-box {
|
.content-box {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
background-color: #ffffff;
|
background: linear-gradient(180deg, #FFFFFF 56.37%, #F0F4F9 100%);
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.service-icons {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.service-icon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 20%;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 62rpx;
|
||||||
|
height: 62rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #5D5D5D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -347,6 +733,66 @@ let { financeInfo } = toRefs(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
|
background-color: #ffffff;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-box {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
padding: 4rpx 0;
|
||||||
|
|
||||||
|
.bottom-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 56rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
line-height: 25rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ios-bottom-box {
|
||||||
|
padding-bottom: constant(safe-area-inset-bottom); // 兼容 IOS<11.2
|
||||||
|
padding-bottom: env(safe-area-inset-bottom); // 兼容 IOS>11.2
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigation-menu-style-1 {
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
.bottom-item:nth-child(2) {
|
||||||
|
text {
|
||||||
|
color: #A27140;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigation-menu-style-2 {
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
border-top: 1rpx solid #C3CED1;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
|
||||||
|
.bottom-item:nth-child(2) {
|
||||||
|
text {
|
||||||
|
color: #0075FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,6 @@
|
||||||
<text class="vision-text">版本:{{ vision }}</text>
|
<text class="vision-text">版本:{{ vision }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -108,21 +106,51 @@ import {
|
||||||
storage
|
storage
|
||||||
} from '@/utils/storage.js'
|
} from '@/utils/storage.js'
|
||||||
import {
|
import {
|
||||||
get
|
get,
|
||||||
|
postJson
|
||||||
} from '@/utils/requests.js'
|
} from '@/utils/requests.js'
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
toRefs,
|
toRefs
|
||||||
getCurrentInstance
|
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow
|
onShow
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
// 内部埋点方法
|
||||||
const { proxy } = instance;
|
const apiUserEvent = async (type, adminData) => {
|
||||||
|
let uni_version = uni.getStorageSync("version")
|
||||||
|
if (type != 'uni') {
|
||||||
|
await postJson('a', 'api/user/event', {
|
||||||
|
type: adminData.type,
|
||||||
|
key: adminData.type + ".uni.alipay." + adminData.key,
|
||||||
|
value: adminData.value,
|
||||||
|
extra: JSON.stringify({
|
||||||
|
uni_version: uni_version,
|
||||||
|
...adminData.extra
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内部跳转充值页方法
|
||||||
|
const goRechargePage = () => {
|
||||||
|
// 进入页面
|
||||||
|
apiUserEvent('all', {
|
||||||
|
type: "event",
|
||||||
|
key: "payment_onload",
|
||||||
|
value: "进入充值页面",
|
||||||
|
extra: {
|
||||||
|
from: "支付宝模拟器首页"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/common/recharge/index'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 菜单列表
|
// 菜单列表
|
||||||
const menuList = [{
|
const menuList = [{
|
||||||
|
|
@ -141,8 +169,8 @@ const menuList = [{
|
||||||
icon: "licaiheika",
|
icon: "licaiheika",
|
||||||
name: "理财黑卡",
|
name: "理财黑卡",
|
||||||
isHot: true,
|
isHot: true,
|
||||||
// path: "/pages/finance-management/index"
|
path: "/pages/finance-management/index"
|
||||||
path: ""
|
// path: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "huabei",
|
icon: "huabei",
|
||||||
|
|
@ -311,9 +339,10 @@ const clickMenu = (item) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 开通vip
|
||||||
const openVip = () => {
|
const openVip = () => {
|
||||||
console.log('openVip')
|
goRechargePage()
|
||||||
util.goPage('/pages/common/recharge/index')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 759 B |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 718 B |
|
|
@ -0,0 +1,145 @@
|
||||||
|
{
|
||||||
|
"serviceIcons": [
|
||||||
|
{
|
||||||
|
"name": "余额宝",
|
||||||
|
"icon": "yuebao"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "稳健理财",
|
||||||
|
"icon": "wenjianlicai"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "基金",
|
||||||
|
"icon": "jijin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "黄金",
|
||||||
|
"icon": "huangjin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "股票",
|
||||||
|
"icon": "gupiao"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "定期",
|
||||||
|
"icon": "dingqi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "保险",
|
||||||
|
"icon": "baoxian"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "高端理财",
|
||||||
|
"icon": "gaoduanlicai"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "全球投资",
|
||||||
|
"icon": "quanqiutouzi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "更多",
|
||||||
|
"icon": "gengduo"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"navigationMenu": [
|
||||||
|
{
|
||||||
|
"name": "首页",
|
||||||
|
"icon": "shouye"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "理财",
|
||||||
|
"icon": "licai"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "视频",
|
||||||
|
"icon": "shipin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "消息",
|
||||||
|
"icon": "xiaoxi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "我的",
|
||||||
|
"icon": "wode"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"myAssets": [
|
||||||
|
{
|
||||||
|
"groupId": "1",
|
||||||
|
"key": "fortune",
|
||||||
|
"title": "",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"label": "余额宝",
|
||||||
|
"labelSub": "",
|
||||||
|
"value": "",
|
||||||
|
"key": "yuebao"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "定期",
|
||||||
|
"labelSub": "",
|
||||||
|
"value": "",
|
||||||
|
"key": "dingqi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "基金",
|
||||||
|
"labelSub": "",
|
||||||
|
"value": "",
|
||||||
|
"key": "jijin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "黄金",
|
||||||
|
"labelSub": "",
|
||||||
|
"value": "",
|
||||||
|
"key": "huangjin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "余利宝",
|
||||||
|
"labelSub": "",
|
||||||
|
"value": "",
|
||||||
|
"key": "yulingbao"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "2",
|
||||||
|
"title": "我的保障资产",
|
||||||
|
"key": "myAssets",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"label": "保险",
|
||||||
|
"labelSub": "1份保单保障中",
|
||||||
|
"value": "",
|
||||||
|
"key": "baoxian"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "3",
|
||||||
|
"title": "我的额度",
|
||||||
|
"key": "myQuota",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"label": "花呗",
|
||||||
|
"labelSub": "",
|
||||||
|
"key": "huabei"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "借呗",
|
||||||
|
"labelSub": "",
|
||||||
|
"key": "jubei"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "备用金",
|
||||||
|
"labelSub": "",
|
||||||
|
"key": "beizhi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "网商贷",
|
||||||
|
"labelSub": "",
|
||||||
|
"key": "wangshangdai"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -42,6 +42,7 @@ export default {
|
||||||
let currentPage = pages[pages.length - 1];
|
let currentPage = pages[pages.length - 1];
|
||||||
let currentUrl = currentPage.route;
|
let currentUrl = currentPage.route;
|
||||||
currentUrl = pageData[currentUrl]
|
currentUrl = pageData[currentUrl]
|
||||||
|
if (type) {
|
||||||
// 点击水印
|
// 点击水印
|
||||||
app.config.globalProperties.$apiUserEvent('all', {
|
app.config.globalProperties.$apiUserEvent('all', {
|
||||||
type: "click",
|
type: "click",
|
||||||
|
|
@ -56,6 +57,7 @@ export default {
|
||||||
page: currentUrl
|
page: currentUrl
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
// 进入页面
|
// 进入页面
|
||||||
app.config.globalProperties.$apiUserEvent('all', {
|
app.config.globalProperties.$apiUserEvent('all', {
|
||||||
type: "event",
|
type: "event",
|
||||||
|
|
|
||||||