修改:会员卡中心 - 样式修改
This commit is contained in:
parent
c963f899d4
commit
3f1976ac62
10
api/user.js
10
api/user.js
|
|
@ -627,13 +627,9 @@ export function memberCard() {
|
||||||
export function memberCardCreate(id, data) {
|
export function memberCardCreate(id, data) {
|
||||||
return request.post(`svip/pay/${id}`, data)
|
return request.post(`svip/pay/${id}`, data)
|
||||||
}
|
}
|
||||||
/**
|
// 付费会员权益
|
||||||
* 付费会员权益
|
export function memberEquity(data = {}) {
|
||||||
* @param object data
|
return request.get(`svip/user_info`, data, {noAuth: true})
|
||||||
*
|
|
||||||
*/
|
|
||||||
export function memberEquity() {
|
|
||||||
return request.get(`svip/user_info`, {}, {noAuth: true})
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 付费会员优惠券
|
* 付费会员优惠券
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,6 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-if="userInfo.is_svip != 3" @click="scrollToCard" class="renew_btn">立即续费</view>
|
<view v-if="userInfo.is_svip != 3" @click="scrollToCard" class="renew_btn">立即续费</view>
|
||||||
</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -68,11 +57,17 @@
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!--立即续费-->
|
<!--立即续费-->
|
||||||
<view v-if="userInfo.is_svip != 3" class="type-section" id="card" :style="{ 'background-image':`url(../static/renew_bg.png)`}">
|
<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="section-hd">-->
|
||||||
<view class="title">会员续费</view>
|
<!-- <view class="title">会员续费</view>-->
|
||||||
<text class="desc">续费可继续享受优惠价</text>
|
<!-- <text class="desc">续费可继续享受优惠价</text>-->
|
||||||
</view>
|
<!--</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">
|
<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}"
|
<view v-for="(item,index) in memberType" :key="item.group_data_id" class="item" :class="{on: index === type}"
|
||||||
@click="checkType(item,index)">
|
@click="checkType(item,index)">
|
||||||
|
|
@ -81,6 +76,24 @@
|
||||||
<view class="old">¥{{item.value && item.value.cost_price | moneyFormat}}</view>
|
<view class="old">¥{{item.value && item.value.cost_price | moneyFormat}}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-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 class="buy" @click="pay">立即支付</view>
|
||||||
<!--<view v-if="memberExplain" class="agree">-->
|
<!--<view v-if="memberExplain" class="agree">-->
|
||||||
<!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text-->
|
<!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text-->
|
||||||
|
|
@ -214,13 +227,21 @@
|
||||||
//员工邀请开通会员卡
|
//员工邀请开通会员卡
|
||||||
bind_mer_id: 0,
|
bind_mer_id: 0,
|
||||||
bind_staff_id: 0,
|
bind_staff_id: 0,
|
||||||
|
currentType: {},
|
||||||
|
|
||||||
|
title_left: '',
|
||||||
|
title_right: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin','uid']),
|
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) {
|
onLoad(options) {
|
||||||
// 二维码参数接收
|
// 二维码参数接收
|
||||||
if(options.scene){
|
if(options.scene){
|
||||||
|
|
@ -235,18 +256,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getCouponLst();
|
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
|
this.getCouponLst();
|
||||||
this.getMemberCard();
|
this.getMemberCard();
|
||||||
this.memberEquity();
|
|
||||||
this.groomList();
|
this.groomList();
|
||||||
|
// 关系处理
|
||||||
|
if(options.spread) spread(options.spread, this.isLogin)
|
||||||
} else {
|
} else {
|
||||||
this.isAuto = true;
|
this.isAuto = true;
|
||||||
this.isShowAuth = true
|
this.isShowAuth = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关系处理
|
|
||||||
if(options.spread) spread(options.spread, this.isLogin)
|
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
|
|
||||||
|
|
@ -255,18 +274,16 @@
|
||||||
this.groomList();
|
this.groomList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onLunch() {
|
// 授权回调
|
||||||
this.getMemberCard();
|
|
||||||
this.memberEquity();
|
|
||||||
this.getCouponLst();
|
|
||||||
},
|
|
||||||
onLoadFun() {
|
onLoadFun() {
|
||||||
this.isShowAuth = false;
|
if(this.isLogin){
|
||||||
this.getMemberCard();
|
this.isShowAuth = false;
|
||||||
this.memberEquity();
|
this.getMemberCard();
|
||||||
|
this.getCouponLst();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 授权关闭
|
// 授权关闭
|
||||||
authColse: function(e) {
|
authColse(e) {
|
||||||
this.isShowAuth = e
|
this.isShowAuth = e
|
||||||
},
|
},
|
||||||
goUrl(url){
|
goUrl(url){
|
||||||
|
|
@ -300,6 +317,8 @@
|
||||||
this.totalPrice = res.data.def.price.toString();
|
this.totalPrice = res.data.def.price.toString();
|
||||||
this.pay_order_id = res.data.def.group_data_id.toString();
|
this.pay_order_id = res.data.def.group_data_id.toString();
|
||||||
this.svip_type = res.data.def.svip_type;
|
this.svip_type = res.data.def.svip_type;
|
||||||
|
this.currentType = Object.assign({}, this.memberType[0]);
|
||||||
|
this.memberEquity();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err,
|
title: err,
|
||||||
|
|
@ -309,7 +328,11 @@
|
||||||
},
|
},
|
||||||
// 付费会员权益
|
// 付费会员权益
|
||||||
memberEquity() {
|
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.memberRights = res.data.interests;
|
||||||
this.userInfo = res.data.user;
|
this.userInfo = res.data.user;
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
@ -619,6 +642,8 @@
|
||||||
this.svip_type = svip.value.svip_type;
|
this.svip_type = svip.value.svip_type;
|
||||||
this.pay_order_id = svip.group_data_id.toString();
|
this.pay_order_id = svip.group_data_id.toString();
|
||||||
this.totalPrice = svip.value.price.toString();
|
this.totalPrice = svip.value.price.toString();
|
||||||
|
this.currentType = Object.assign({}, svip);
|
||||||
|
this.memberEquity();
|
||||||
},
|
},
|
||||||
goDetail(id) {
|
goDetail(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -690,6 +715,7 @@
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.card_content{
|
.card_content{
|
||||||
background: #F5f5f5;
|
background: #F5f5f5;
|
||||||
|
|
@ -792,20 +818,24 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.save_list{
|
.save_list{
|
||||||
margin-top: 20rpx;
|
width: 100%;
|
||||||
padding: 0 30rpx 0 53rpx;
|
display: inline-flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
.item{
|
justify-content: flex-start;
|
||||||
width: 22%;
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
.interests-item{
|
||||||
|
width: calc(100% / 4) !important;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 12rpx;
|
padding: 30rpx 0;
|
||||||
&:last-child{
|
&:last-child{
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
.pic{
|
.pic{
|
||||||
width: 84rpx;
|
width: 80rpx;
|
||||||
height: 84rpx;
|
height: 80rpx;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
}
|
}
|
||||||
.text{
|
.text{
|
||||||
|
|
@ -827,9 +857,9 @@
|
||||||
.vip_center{
|
.vip_center{
|
||||||
border-radius: 34rpx 34rpx 0 0;
|
border-radius: 34rpx 34rpx 0 0;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
padding: 215rpx 20rpx 0;
|
padding: 60rpx 20rpx 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -260rpx;
|
margin-top: -300rpx;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
.coupon-section {
|
.coupon-section {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|
@ -924,6 +954,7 @@
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
padding-top: 20rpx;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
.title_bd {
|
.title_bd {
|
||||||
padding: 26rpx 40rpx 0 0;
|
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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,15 @@
|
||||||
<text class="num">{{userInfo.wine_available || 0}}</text>
|
<text class="num">{{userInfo.wine_available || 0}}</text>
|
||||||
<view class="txt">坛封酒积分</view>
|
<view class="txt">坛封酒积分</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=4')">
|
<view class="num-item" @click="goMenuPage('/pages/users/shareholders/mer_center')">
|
||||||
<text class="num">{{userInfo.oil_available || 0}}</text>
|
<text class="num">{{ integral_surplus || 0}}</text>
|
||||||
<view class="txt">加油卡积分</view>
|
<view class="txt">餐费积分</view>
|
||||||
</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')">-->
|
<!--<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">-->
|
||||||
<!-- <text class="num">{{userInfo.total_coupon || 0}}</text>-->
|
<!-- <text class="num">{{userInfo.total_coupon || 0}}</text>-->
|
||||||
<!-- <view class="txt">优惠券</view>-->
|
<!-- <view class="txt">优惠券</view>-->
|
||||||
|
|
@ -343,6 +348,7 @@
|
||||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||||
import { getUserExchangeQrcode } from '@/api/exchange.js';
|
import { getUserExchangeQrcode } from '@/api/exchange.js';
|
||||||
import {identityList} from "@/api/agent";
|
import {identityList} from "@/api/agent";
|
||||||
|
import {merShareholdersIntegralStatistics} from "@/api/user";
|
||||||
|
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -458,6 +464,7 @@
|
||||||
},
|
},
|
||||||
identityCurrent:{},
|
identityCurrent:{},
|
||||||
identityCurrentName: '',
|
identityCurrentName: '',
|
||||||
|
integral_surplus: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
@ -483,6 +490,7 @@
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.orderNum();
|
this.orderNum();
|
||||||
this.getIdentityList();
|
this.getIdentityList();
|
||||||
|
this.shareholdersIntegralInfo();
|
||||||
} else {
|
} else {
|
||||||
// this.userInfo = {
|
// this.userInfo = {
|
||||||
// is_svip: 0
|
// is_svip: 0
|
||||||
|
|
@ -627,6 +635,7 @@
|
||||||
this.getMyMenus();
|
this.getMyMenus();
|
||||||
this.orderNum();
|
this.orderNum();
|
||||||
this.getIdentityList();
|
this.getIdentityList();
|
||||||
|
this.shareholdersIntegralInfo();
|
||||||
this.isShowAuth = false;
|
this.isShowAuth = false;
|
||||||
},
|
},
|
||||||
Setting: function() {
|
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(){
|
onPullDownRefresh: function(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue