|
@@ -2,50 +2,67 @@
|
|
|
<view class="center">
|
|
|
<view class="box">
|
|
|
<view class="discounts">
|
|
|
- <view class="title">{{$t('hea.yz')}}:</view>
|
|
|
+ <view class="title">{{ $t('hea.yz') }}:</view>
|
|
|
<view class="money">
|
|
|
¥
|
|
|
- <text>{{ item.money * 2 || 0}}</text>
|
|
|
+ <text>{{ item.money * 2 || 0 }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="main-box">
|
|
|
<view class="main-title">
|
|
|
<view class="main-title-image"><image class="image" src="../../static/icon/title.png" mode=""></image></view>
|
|
|
- <view class="main-title-font">{{item.name}}</view>
|
|
|
+ <view class="main-title-font" v-if="item.v2_layer == 0">{{ item.name }}</view>
|
|
|
+ <view class="main-title-font" v-else-if="(status == '1' && item.income * 1 >= item.v2_limit * 1 && item.v2_layer != 0) || status == '2'">黑钻VIP义工受益</view>
|
|
|
+ <view class="main-title-font" v-else>VIP义工受益</view>
|
|
|
</view>
|
|
|
<view class="main">
|
|
|
- <view class="main-item" v-for="(ls, index) in revenueList">
|
|
|
+ <view class="main-item" v-for="(ls, index) in revenueList">
|
|
|
<view class="main-image"><image :src="image[index]" mode=""></image></view>
|
|
|
<view class="main-font">
|
|
|
- <view class="textDetail-title">{{ index < 2 ? index + 1 + $t('hea.dsy') : index + 1 + $t('hea.dsy') + '(' + $t('hea.vipzs')+ ')' }}</view>
|
|
|
+ <view class="textDetail-title">{{ index < 2 ? index + 1 + $t('hea.dsy') : index + 1 + $t('hea.dsy') + '(' + $t('hea.vipzs') + ')' }}</view>
|
|
|
<view class="textDetail-content">{{ ls }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <view class="earnings-box">
|
|
|
- <image src="../../static/img/index/vip.png" mode="" class="earnings"></image>
|
|
|
- <view class="text-box">
|
|
|
- <view class="textDetail" v-for="(ls, index) in revenueList">
|
|
|
- <view class="textDetail-title">{{ index < 2 ? index + 1 + '度受益' : index + 1 + '度收益(黑钻VIP义工专属)' }}</view>
|
|
|
- <view class="textDetail-content">{{ ls }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <!-- <view class="zhushi">
|
|
|
- <text v-if="status == '1'">说明:当前等级援助者,升级成援助组长需要援助{{ item.v2_limit * 1 }},当前援助金额{{ item.income }}</text>
|
|
|
- <text v-if="status == '2'">说明:当前等级援助组长已是最高收益</text>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
|
|
|
- <view class="baodan" @click="baodan(id)" v-if="status == '0'">{{$t('hea.wyyz')}}</view>
|
|
|
- <view class="baodan1" @click="baodan(id)" v-if="status == '1'&&item.income*1<item.v2_limit*1 && item.v2_layer != 0" >{{$t('hea.lksj')}}</view>
|
|
|
- <view class="baodan" @click="baodan(id)" v-if="status == '1'&&item.income*1>=item.v2_limit*1 && item.v2_layer != 0">{{$t('hea.ljsj')}}</view>
|
|
|
- <view class="baodan" v-if="status == '2'||(status == '1' && item.v2_layer == 0)" style="background: #020202;">{{$t('hea.ywc')}}</view>
|
|
|
+ <view class="baodan" @click="baodan(id)" v-if="status == '0'">{{ $t('hea.wyyz') }}</view>
|
|
|
+ <view class="baodan1" @click="baodan(id)" v-if="status == '1' && item.income * 1 < item.v2_limit * 1 && item.v2_layer != 0">{{ $t('hea.lksj') }}</view>
|
|
|
+ <view class="baodan" @click="baodan(id)" v-if="status == '1' && item.income * 1 >= item.v2_limit * 1 && item.v2_layer != 0">{{ $t('hea.ljsj') }}</view>
|
|
|
+ <view class="baodan" v-if="status == '2' || (status == '1' && item.v2_layer == 0)" style="background: #020202;">{{ $t('hea.ywc') }}</view>
|
|
|
+ <uni-popup ref="popup" type="center">
|
|
|
+ <view class="popup-box">
|
|
|
+ <view class="img"><image src="../../static/img/tishi.png" mode=""></image></view>
|
|
|
+ <view class="mian">
|
|
|
+ <view class="font" v-if="item.v2_layer == 0">
|
|
|
+ {{ $t('hea.nsfsjqrndbfcj') }}
|
|
|
+ <br />
|
|
|
+ {{ $t('hea.rndbfytrmycj') }}
|
|
|
+ <br />
|
|
|
+ {{ $t('hea.dndkzcqrjh') }}
|
|
|
+ <br />
|
|
|
+ </view>
|
|
|
+ <view class="font" v-else>
|
|
|
+ {{ $t('hea.nsfsjqrndbf') }}
|
|
|
+ <br />
|
|
|
+ {{ $t('hea.rndbfytrmy') }}
|
|
|
+ <br />
|
|
|
+ {{ $t('hea.dndkzcqrjh') }}
|
|
|
+ <br />
|
|
|
+ </view>
|
|
|
+ <view class="comfirm-box">
|
|
|
+ <view class="cancel" @click="cancel">{{ $t('foo.qx') }}</view>
|
|
|
+ <view class="comfirm" @click="confirm">{{ countDown == 0 ? $t('hea.zcqd') : countDown }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
|
import { mapState, mapMutations } from 'vuex';
|
|
|
import { activitys } from '@/api/active.js';
|
|
|
export default {
|
|
@@ -55,16 +72,38 @@ export default {
|
|
|
revenueList: [],
|
|
|
item: '',
|
|
|
status: '',
|
|
|
- image:['../../static/icon/1.png','../../static/icon/2.png','../../static/icon/3.png','../../static/icon/4.png','../../static/icon/5.png','../../static/icon/6.png','../../static/icon/7.png']
|
|
|
+ show1: false,
|
|
|
+ time: '', //保存倒计时对象
|
|
|
+ countDown: 0, //倒计时
|
|
|
+ image: [
|
|
|
+ '../../static/icon/1.png',
|
|
|
+ '../../static/icon/2.png',
|
|
|
+ '../../static/icon/3.png',
|
|
|
+ '../../static/icon/4.png',
|
|
|
+ '../../static/icon/5.png',
|
|
|
+ '../../static/icon/6.png',
|
|
|
+ '../../static/icon/7.png'
|
|
|
+ ] //七层的图片
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ // 监听倒计时
|
|
|
+ countDown(i) {
|
|
|
+ if (i == 0) {
|
|
|
+ clearInterval(this.time);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ uniPopup
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title:this.$t('foo.xq')
|
|
|
- })
|
|
|
+ title: this.$t('foo.xq')
|
|
|
+ });
|
|
|
this.id = option.id;
|
|
|
this.loadData();
|
|
|
},
|
|
@@ -81,23 +120,22 @@ export default {
|
|
|
obj.status = '0';
|
|
|
obj.isU = false;
|
|
|
}
|
|
|
- let i = e.data.v1_layer + e.data.v2_layer
|
|
|
- if (e.data.v2_layer&&(obj.status == '0'||(obj.status == '1'&&e.data.income*1<e.data.v2_limit*1))){
|
|
|
- i = e.data.v1_layer
|
|
|
+ let i = e.data.v1_layer + e.data.v2_layer;
|
|
|
+ if (e.data.v2_layer && (obj.status == '0' || (obj.status == '1' && e.data.income * 1 < e.data.v2_limit * 1))) {
|
|
|
+ i = e.data.v1_layer;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
let money = e.data.money * 1;
|
|
|
let money1 = e.data.money * 1;
|
|
|
- let people = 1
|
|
|
- for (let j=0;j < i; j++){
|
|
|
+ let people = 1;
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
people = people * 5;
|
|
|
money = money * 1 * 5;
|
|
|
- obj.revenueList[j] = people +'人x' + money1 + '元=' + this.unit(money);
|
|
|
-
|
|
|
+ obj.revenueList[j] = people + '人x' + money1 + '元=' + this.unit(money);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //换算单位
|
|
|
unit(num) {
|
|
|
let i = 0;
|
|
|
if (num / 10000 >= 1) {
|
|
@@ -110,12 +148,29 @@ export default {
|
|
|
}
|
|
|
return i;
|
|
|
},
|
|
|
+ // 弹窗 - 取消
|
|
|
+ cancel() {
|
|
|
+ this.countDown = 0;
|
|
|
+ this.$refs.popup.close();
|
|
|
+ },
|
|
|
+ confirm() {
|
|
|
+ if (this.countDown != 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$refs.popup.close();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/index/info?id=' + this.id
|
|
|
+ });
|
|
|
+ },
|
|
|
baodan(id) {
|
|
|
- console.log(this.userInfo, '11111');
|
|
|
- if (!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit && this.userInfo.bank_card_no == '' && this.userInfo.bank_of_deposit == '') {
|
|
|
+ const obj = this;
|
|
|
+ console.log(this.userInfo.nickname, '11111');
|
|
|
+ let a =/[0-9]{3}[*]{4}[0-9]{4}/;
|
|
|
+
|
|
|
+ if (a.test(this.userInfo.nickname)){
|
|
|
uni.showModal({
|
|
|
title: this.$t('foo.ts'),
|
|
|
- content: this.$t('foo.ndqwtxskxx'),
|
|
|
+ content: this.$t('foo.ndqwtxzsxm'),
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
uni.navigateTo({
|
|
@@ -126,14 +181,47 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- if (this.status == '1' && this.item.income < this.item.v2_limit * 1) {
|
|
|
- this.$api.msg('当前援助额度不足以升级黑钻VIP义工');
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/index/info?id=' + id
|
|
|
- });
|
|
|
+ }else {
|
|
|
+ if (!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit && this.userInfo.bank_card_no == '' && this.userInfo.bank_of_deposit == '') {
|
|
|
+ uni.showModal({
|
|
|
+ title: this.$t('foo.ts'),
|
|
|
+ content: this.$t('foo.ndqwtxskxx'),
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/set/userinfo'
|
|
|
+ });
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (this.status == '1' && this.item.income < this.item.v2_limit * 1) {
|
|
|
+ this.$api.msg('当前援助额度不足以升级黑钻VIP义工');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.status == '0') {
|
|
|
+ // 判断是否在倒计时
|
|
|
+ if (obj.countDown > 0) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ obj.countDown = 15;
|
|
|
+ obj.time = setInterval(() => {
|
|
|
+ obj.countDown--;
|
|
|
+ }, 1000);
|
|
|
+ //调用验证码接口
|
|
|
+ this.$refs.popup.open();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/index/info?id=' + id
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/index/info?id=' + id
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -175,7 +263,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
.zhushi {
|
|
|
color: #e6c3a1;
|
|
|
padding: 20rpx 40rpx;
|
|
@@ -230,7 +317,7 @@ export default {
|
|
|
|
|
|
.main-title-font {
|
|
|
position: relative;
|
|
|
- z-index: 100;
|
|
|
+ z-index: 10;
|
|
|
text-align: center;
|
|
|
line-height: 80rpx;
|
|
|
font-size: 46rpx;
|
|
@@ -265,4 +352,75 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.popup-box {
|
|
|
+ width: 650rpx;
|
|
|
+ padding-bottom: 40rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ position: relative;
|
|
|
+ .img {
|
|
|
+ position: relative;
|
|
|
+ top: -56rpx;
|
|
|
+ left: 0;
|
|
|
+ width: 650rpx;
|
|
|
+ height: 132rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ image {
|
|
|
+ border-radius: 20rpx 20rpx 0 0;
|
|
|
+ width: 450rpx;
|
|
|
+ height: 132rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .mian {
|
|
|
+ margin-top: -44rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ // padding: 32rpx 32rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 0 0 20rpx 20rpx;
|
|
|
+ text-align: center;
|
|
|
+ padding: 30rpx;
|
|
|
+ .font {
|
|
|
+ text-align: left;
|
|
|
+ line-height: 54rpx;
|
|
|
+ color: #7e7457;
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm-box {
|
|
|
+ margin-top: 52rpx;
|
|
|
+ display: flex;
|
|
|
+ // margin-bottom: 32rpx;
|
|
|
+
|
|
|
+ // justify-content: space-around;
|
|
|
+ .cancel {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 250rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ border: 1px solid #dcc786;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #605128;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm {
|
|
|
+ margin-left: 50rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 250rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
|
|
|
+ border-radius: 10rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #605128;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|