|
@@ -18,8 +18,20 @@
|
|
|
<template v-for="(item,index) in moneyList">
|
|
|
|
|
|
|
|
|
- <view class="tip-box" v-if="index==4">
|
|
|
- 近半年您已花费<span>560元</span>充电,参与充值送折扣卡活动推荐充值<span>500元</span>,预计可省<span>24.8元</span>。
|
|
|
+ <view class="tip-box" v-if="index==4&&userChargingAmountObj.type">
|
|
|
+ <template v-if="userChargingAmountObj.type==1">
|
|
|
+ 新用户参与充值送折扣卡活动推荐充值<span>1000元</span>,预计可省 <span> 133元</span>。
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="userChargingAmountObj.type==2">
|
|
|
+ 按您每月充电花费,半年将超<span>{{userChargingAmountObj.money}}元</span>,参与充值送折扣卡活动推荐充值 <span>500元</span>,预计可省 <span>42.8元</span>。
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ 近半年您已花费<span>{{userChargingAmountObj.money}}元</span>充电,参与充值送折扣卡活动推荐充值 <span> {{userChargingAmountMethod(userChargingAmountObj).num1}}元</span>,预计可省 <span> {{userChargingAmountMethod(userChargingAmountObj).num3}}元</span>。
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view class="recharge-item" :class="{
|
|
@@ -142,6 +154,8 @@
|
|
|
wxPayJs
|
|
|
} from '@/utils/wxpay'
|
|
|
import * as API from '@/apis/finance.js'
|
|
|
+ import * as API_index from '@/apis/index.js'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -182,6 +196,9 @@
|
|
|
checked: true,
|
|
|
projectName:"",
|
|
|
recordId:"",
|
|
|
+ userChargingAmountObj:{
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad(op) {
|
|
@@ -197,6 +214,7 @@
|
|
|
|
|
|
this.init();
|
|
|
this.getBannerInfo("userinfo")
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
clickBanner(index, bl, modout) {
|
|
@@ -342,6 +360,31 @@
|
|
|
title: error
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+ API_index.userChargingAmount().then((res) => {
|
|
|
+ this.userChargingAmountObj = res.data
|
|
|
+ //this.userChargingAmountObj.type=3
|
|
|
+ if(this.userChargingAmountObj.type==1){
|
|
|
+
|
|
|
+
|
|
|
+ for(var i in this.moneyList){
|
|
|
+ var item =this.moneyList[i]
|
|
|
+
|
|
|
+ if(item.rechargeAmount==1000){
|
|
|
+ // this.selectItem = this.moneyList[i];
|
|
|
+ // this.moneyActiveClass = this.moneyList[i].id
|
|
|
+ this.moneyClick(item.id,item)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
init() {
|
|
|
|
|
@@ -720,7 +763,7 @@
|
|
|
|
|
|
.tip-box {
|
|
|
position: relative;
|
|
|
- background-color: #fff;
|
|
|
+ background-color: #FEF8E9;
|
|
|
border: 1px solid #f5a623;
|
|
|
border-radius: 8px;
|
|
|
padding: 10px 15px;
|
|
@@ -745,13 +788,13 @@
|
|
|
}
|
|
|
|
|
|
.tip-box::after {
|
|
|
- border-top: 10px solid white; /* 白色填充 */
|
|
|
+ border-top: 10px solid #FEF8E9; /* 白色填充 */
|
|
|
margin-top: 0;
|
|
|
transform: translateY(-1px);
|
|
|
}
|
|
|
|
|
|
.tip-box span {
|
|
|
- color: #f5a623;
|
|
|
+ color: #ec4530;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|