feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
This commit is contained in:
149
pro_v3.5.1/view/uniapp_v2/components/HjfAssetCard.vue
Normal file
149
pro_v3.5.1/view/uniapp_v2/components/HjfAssetCard.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<view class="hjf-asset-card">
|
||||
<view class="card-row">
|
||||
<view class="card-item">
|
||||
<view class="label">推荐佣金(¥)</view>
|
||||
<view class="value">{{ formattedBrokeragePrice }}</view>
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<view class="label">待释放积分</view>
|
||||
<view class="value">{{ formattedFrozenPoints }}</view>
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<view class="label">已释放积分</view>
|
||||
<view class="value">{{ formattedAvailablePoints }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="todayRelease != null" class="card-footer">
|
||||
<view class="footer-text">今日预计释放 {{ formattedTodayRelease }} 积分</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* @file HjfAssetCard.vue
|
||||
* @description 三栏资产展示卡片(推荐佣金 / 待释放积分 / 已释放积分),渐变背景。
|
||||
* nowMoney prop 已重命名为 brokeragePrice,对应接口 brokerage_price 字段。
|
||||
*/
|
||||
export default {
|
||||
name: 'HjfAssetCard',
|
||||
|
||||
props: {
|
||||
/**
|
||||
* 推荐佣金余额(元),对应接口 brokerage_price
|
||||
* @type {string}
|
||||
* @default '0.00'
|
||||
*/
|
||||
brokeragePrice: {
|
||||
type: String,
|
||||
default: '0.00'
|
||||
},
|
||||
/**
|
||||
* 兼容旧 nowMoney prop(已废弃,优先使用 brokeragePrice)
|
||||
* @type {string}
|
||||
* @deprecated
|
||||
*/
|
||||
nowMoney: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
/**
|
||||
* 待释放积分
|
||||
* @type {number}
|
||||
*/
|
||||
frozenPoints: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* 已释放积分
|
||||
* @type {number}
|
||||
*/
|
||||
availablePoints: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* 今日预计释放积分(不传则不显示底部提示)
|
||||
* @type {number|null}
|
||||
*/
|
||||
todayRelease: {
|
||||
type: Number,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
formattedBrokeragePrice() {
|
||||
const src = this.brokeragePrice !== null ? this.brokeragePrice : (this.nowMoney || '0.00');
|
||||
const num = parseFloat(src);
|
||||
return isNaN(num) ? '0.00' : num.toFixed(2);
|
||||
},
|
||||
formattedFrozenPoints() {
|
||||
return Number(this.frozenPoints).toLocaleString();
|
||||
},
|
||||
formattedAvailablePoints() {
|
||||
return Number(this.availablePoints).toLocaleString();
|
||||
},
|
||||
formattedTodayRelease() {
|
||||
if (this.todayRelease == null) return '';
|
||||
return Number(this.todayRelease).toLocaleString();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hjf-asset-card {
|
||||
width: 710rpx;
|
||||
margin: 0 auto;
|
||||
background: linear-gradient(90deg, var(--view-theme, #e93323) 0%, var(--view-gradient, #f76b1c) 100%);
|
||||
border-radius: 32rpx;
|
||||
box-sizing: border-box;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
font-size: 24rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.card-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 36rpx 32rpx 32rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
text-align: center;
|
||||
padding: 0 8rpx;
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
font-family: 'SemiBold', sans-serif;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
width: 100%;
|
||||
padding: 20rpx 32rpx 24rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
text-align: center;
|
||||
|
||||
.footer-text {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user