修改:会员卡中心 - 样式修改

This commit is contained in:
wuhui_zzw 2024-06-21 17:41:53 +08:00
parent c963f899d4
commit 3f1976ac62
3 changed files with 116 additions and 51 deletions

View File

@ -627,13 +627,9 @@ export function memberCard() {
export function memberCardCreate(id, data) {
return request.post(`svip/pay/${id}`, data)
}
/**
* 付费会员权益
* @param object data
*
*/
export function memberEquity() {
return request.get(`svip/user_info`, {}, {noAuth: true})
// 付费会员权益
export function memberEquity(data = {}) {
return request.get(`svip/user_info`, data, {noAuth: true})
}
/**
* 付费会员优惠券

View File

@ -27,17 +27,6 @@
</view>
<view v-if="userInfo.is_svip != 3" @click="scrollToCard" class="renew_btn">立即续费</view>
</view>
<view class="save_list acea-row">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
<view v-for="(item,index) in memberRights" :key="index" class='item' @click="goUrl(item.link)">
<image class="pic" :src="item.on_pic"></image>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="info line1">{{item.info}}</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
@ -68,11 +57,17 @@
</scroll-view>
</view> -->
<!--立即续费-->
<view v-if="userInfo.is_svip != 3" class="type-section" id="card" :style="{ 'background-image':`url(../static/renew_bg.png)`}">
<view class="section-hd">
<view class="title">会员续费</view>
<text class="desc">续费可继续享受优惠价</text>
<view v-if="userInfo.is_svip != 3" class="type-section" id="card"><!--:style="{ 'background-image':`url(../static/renew_bg.png)`}"-->
<!--<view class="section-hd">-->
<!-- <view class="title">会员续费</view>-->
<!-- <text class="desc">续费可继续享受优惠价</text>-->
<!--</view>-->
<view class="block-title">
<image class="title-image" :src="title_left" mode="heightFix"></image>
<view class="title-text">会员等级</view>
<image class="title-image" :src="title_right" mode="heightFix"></image>
</view>
<scroll-view class="scroll" scroll-x="true">
<view v-for="(item,index) in memberType" :key="item.group_data_id" class="item" :class="{on: index === type}"
@click="checkType(item,index)">
@ -81,6 +76,24 @@
<view class="old">{{item.value && item.value.cost_price | moneyFormat}}</view>
</view>
</scroll-view>
<!--会员权益-->
<view class="block-title" v-if="Object.values(memberRights).length > 0">
<image class="title-image" :src="title_left" mode="heightFix"></image>
<view class="title-text">会员权益</view>
<image class="title-image" :src="title_right" mode="heightFix"></image>
</view>
<view class="save_list acea-row" v-if="Object.values(memberRights).length > 0">
<!--<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">-->
<view v-for="(item,index) in memberRights" :key="index" class='interests-item' @click="goUrl(item.link)">
<image class="pic" :src="item.on_pic"></image>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="info line1">{{item.info}}</view>
</view>
</view>
<!--</scroll-view>-->
</view>
<view class="buy" @click="pay">立即支付</view>
<!--<view v-if="memberExplain" class="agree">-->
<!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text-->
@ -214,13 +227,21 @@
//
bind_mer_id: 0,
bind_staff_id: 0,
currentType: {},
title_left: '',
title_right: '',
}
},
watch: {
},
computed: mapGetters(['isLogin','uid']),
onReady() {
this.title_left = `${HTTP_REQUEST_URL}/static/images/icon/title_left.png`;
this.title_right = `${HTTP_REQUEST_URL}/static/images/icon/title_right.png`;
},
onLoad(options) {
//
if(options.scene){
@ -235,18 +256,16 @@
}
}
this.getCouponLst();
if (this.isLogin) {
this.getCouponLst();
this.getMemberCard();
this.memberEquity();
this.groomList();
//
if(options.spread) spread(options.spread, this.isLogin)
} else {
this.isAuto = true;
this.isShowAuth = true
}
//
if(options.spread) spread(options.spread, this.isLogin)
},
onShow(){
@ -255,18 +274,16 @@
this.groomList();
},
methods: {
onLunch() {
this.getMemberCard();
this.memberEquity();
this.getCouponLst();
},
//
onLoadFun() {
if(this.isLogin){
this.isShowAuth = false;
this.getMemberCard();
this.memberEquity();
this.getCouponLst();
}
},
//
authColse: function(e) {
authColse(e) {
this.isShowAuth = e
},
goUrl(url){
@ -300,6 +317,8 @@
this.totalPrice = res.data.def.price.toString();
this.pay_order_id = res.data.def.group_data_id.toString();
this.svip_type = res.data.def.svip_type;
this.currentType = Object.assign({}, this.memberType[0]);
this.memberEquity();
}).catch(err => {
uni.showToast({
title: err,
@ -309,7 +328,11 @@
},
//
memberEquity() {
memberEquity().then(res => {
let memberType = Object.assign({}, this.currentType);
let interests = memberType.value.interests || {};
let interestsId = Object.values(interests).toString();
memberEquity({ interests_id: interestsId,is_appoint: 1 }).then(res => {
this.memberRights = res.data.interests;
this.userInfo = res.data.user;
}).catch(err => {
@ -619,6 +642,8 @@
this.svip_type = svip.value.svip_type;
this.pay_order_id = svip.group_data_id.toString();
this.totalPrice = svip.value.price.toString();
this.currentType = Object.assign({}, svip);
this.memberEquity();
},
goDetail(id) {
uni.navigateTo({
@ -690,6 +715,7 @@
// #endif
}
</script>
<style lang="scss" scoped>
.card_content{
background: #F5f5f5;
@ -792,20 +818,24 @@
}
}
.save_list{
margin-top: 20rpx;
padding: 0 30rpx 0 53rpx;
display: flex;
.item{
width: 22%;
width: 100%;
display: inline-flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
align-content: flex-start;
.interests-item{
width: calc(100% / 4) !important;
display: inline-block;
text-align: center;
margin-right: 12rpx;
padding: 30rpx 0;
&:last-child{
margin-right: 0;
}
.pic{
width: 84rpx;
height: 84rpx;
width: 80rpx;
height: 80rpx;
border-radius: 100%;
}
.text{
@ -827,9 +857,9 @@
.vip_center{
border-radius: 34rpx 34rpx 0 0;
background: #F5F5F5;
padding: 215rpx 20rpx 0;
padding: 60rpx 20rpx 0;
position: relative;
margin-top: -260rpx;
margin-top: -300rpx;
z-index: 5;
.coupon-section {
margin-top: 20rpx;
@ -924,6 +954,7 @@
background-color: #FFFFFF;
padding-bottom: 30rpx;
background-size: 100%;
padding-top: 20rpx;
background-repeat: no-repeat;
.title_bd {
padding: 26rpx 40rpx 0 0;
@ -1107,4 +1138,22 @@
}
}
}
.block-title{
width: 100%;
display: inline-flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
height: 100rpx;
.title-image{
height: 20rpx!important;
}
.title-text{
padding: 0 30rpx;
font-size: 30rpx;
font-weight: bold;
}
}
</style>

View File

@ -89,10 +89,15 @@
<text class="num">{{userInfo.wine_available || 0}}</text>
<view class="txt">坛封酒积分</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=4')">
<text class="num">{{userInfo.oil_available || 0}}</text>
<view class="txt">加油卡积分</view>
<view class="num-item" @click="goMenuPage('/pages/users/shareholders/mer_center')">
<text class="num">{{ integral_surplus || 0}}</text>
<view class="txt">餐费积分</view>
</view>
<!--<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=4')">-->
<!-- <text class="num">{{userInfo.oil_available || 0}}</text>-->
<!-- <view class="txt">加油卡积分</view>-->
<!--</view>-->
<!--<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">-->
<!-- <text class="num">{{userInfo.total_coupon || 0}}</text>-->
<!-- <view class="txt">优惠券</view>-->
@ -343,6 +348,7 @@
import { HTTP_REQUEST_URL } from '@/config/app';
import { getUserExchangeQrcode } from '@/api/exchange.js';
import {identityList} from "@/api/agent";
import {merShareholdersIntegralStatistics} from "@/api/user";
const app = getApp();
export default {
@ -458,6 +464,7 @@
},
identityCurrent:{},
identityCurrentName: '',
integral_surplus: '',
}
},
onLoad(options) {
@ -483,6 +490,7 @@
this.getUserInfo();
this.orderNum();
this.getIdentityList();
this.shareholdersIntegralInfo();
} else {
// this.userInfo = {
// is_svip: 0
@ -627,6 +635,7 @@
this.getMyMenus();
this.orderNum();
this.getIdentityList();
this.shareholdersIntegralInfo();
this.isShowAuth = false;
},
Setting: function() {
@ -927,6 +936,17 @@
},
})
},
// -
shareholdersIntegralInfo(){
let _this = this;
merShareholdersIntegralStatistics({}).then(res => {
_this.integral_surplus = res.data.sum_used_surplus || 0;
}).catch(err => {
this.$util.Tips({title: err});
});
},
},
onPullDownRefresh: function(){