This commit is contained in:
zhangmanman
2021-09-30 13:58:17 +08:00
parent 7ef9ad26ac
commit 341286a42e
2 changed files with 70 additions and 46 deletions

View File

@@ -9,7 +9,7 @@
<view class="canPop-btn" @click="canSubmit">提交</view>
</view>
<swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" circular @change="swiperChange">
<swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" :current="tabsIndex" circular @change="swiperChange">
<swiper-item class="swiper-item" v-for="(item, index) in identitie" :key="index">
<view class="vip-item" :class="tabsIndex == index ? 'color-item-img' : ''">
<image class="vip-back" :src="item.card_cover" mode="scaleToFill"></image>
@@ -124,11 +124,12 @@ export default {
},
created() {
// 获取当前用户信息
this.idenInfo();
this.idenInfo('cre');
},
methods: {
// 当前用户信息
idenInfo() {
idenInfo(type) {
identities().then(res => {
res.identities.map(item => {
item.obj_condition = new Object();
@@ -141,6 +142,9 @@ export default {
return item;
});
this.identitie = res.identities;
if(type === 'cre'){
this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id)
}
this.openCondition = res.identities[this.tabsIndex].obj_condition;
this.rights = res.identities[this.tabsIndex].rights;
this.total = res.identities[this.tabsIndex].price;