|
@@ -110,7 +110,7 @@
|
|
|
<image class="coupon-bg" src="/static/topUp/coupon.png" mode="scaleToFill"></image>
|
|
<image class="coupon-bg" src="/static/topUp/coupon.png" mode="scaleToFill"></image>
|
|
|
<view class="coupon-body">
|
|
<view class="coupon-body">
|
|
|
<view class="coupon-top">
|
|
<view class="coupon-top">
|
|
|
- <text class="c-name">{{ c.name }}</text>
|
|
|
|
|
|
|
+ <text class="c-name">{{ formatCouponName(c.name) }}</text>
|
|
|
<text class="c-value">{{ c.display }}</text>
|
|
<text class="c-value">{{ c.display }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="coupon-bottom">
|
|
<view class="coupon-bottom">
|
|
@@ -170,6 +170,10 @@
|
|
|
const n = Number(val) || 0;
|
|
const n = Number(val) || 0;
|
|
|
return Number.isInteger(n) ? String(n) : n.toFixed(2);
|
|
return Number.isInteger(n) ? String(n) : n.toFixed(2);
|
|
|
},
|
|
},
|
|
|
|
|
+ formatCouponName(name) {
|
|
|
|
|
+ const s = String(name || '');
|
|
|
|
|
+ return s.length > 6 ? `${s.slice(0, 6)}...` : s;
|
|
|
|
|
+ },
|
|
|
loadDetail() {
|
|
loadDetail() {
|
|
|
if (!this.recordId) {
|
|
if (!this.recordId) {
|
|
|
uni.showToast({ title: '缺少明细ID', icon: 'none' });
|
|
uni.showToast({ title: '缺少明细ID', icon: 'none' });
|