Explorar el Código

超级会员版本联调

zhengjinyi hace 3 años
padre
commit
8a443137c6

+ 10 - 10
components/cm-module/productDetails/cm-acttags.vue

@@ -84,16 +84,7 @@ export default {
 		this.initData(this.product)
 	},
 	computed: {
-		...mapState(['hasLogin', 'isWxAuthorize']),
-		isShowVipFlag(pros){
-			if(pros.priceFlag!=1){
-				if(this.userIdentity == 4 && this.vipFlag == 1){
-					return true
-				}else if(this.userIdentity == 2){
-					return true
-				}
-			}
-		}
+		...mapState(['hasLogin', 'isWxAuthorize'])
 	},
 	watch: {
 		pageData: {
@@ -113,6 +104,15 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.goods = data
 		},
+		isShowVipFlag(pros){
+			if(pros.priceFlag!=1){
+				if(this.userIdentity == 4 && this.vipFlag == 1){
+					return true
+				}else if(this.userIdentity == 2){
+					return true
+				}
+			}
+		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			if (promo != null) {

+ 16 - 16
pages/tabBar/user/user.vue

@@ -58,23 +58,21 @@
 							<view class="main-member-none-btn">立即开通</view>
 						</view>
 						<template v-else>
-							<view class="main-member-svip" v-if="isSvip" @click="navigator('/pages/user/member/member')">
-								<template v-if="isSvipType == 1">
-									<view class="main-member-svip-h1">已开通采美·超级会员</view>
-									<view class="main-member-svip-p">有效期至:2021-10-01</view>
-									<view class="main-member-svip-icon">
-										<text class="iconfont icon-xiayibu"></text>
-									</view>
-								</template>
-								<template v-else>
-									<view class="main-member-svip-h1 red">采美·超级会员已过期</view>
-									<view class="main-member-svip-p">有效期至:2021-10-01</view>
-									<view class="main-member-svip-icon">
-										<text class="iconfont icon-xiayibu"></text>
-									</view>
-								</template>
+							<view class="main-member-svip"  v-if="userVip.vipFlag == 1" @click="navigator('/pages/user/member/member')">
+								<view class="main-member-svip-h1">已开通采美·超级会员</view>
+								<view class="main-member-svip-p">有效期至:{{ userVip.endTime }}</view>
+								<view class="main-member-svip-icon">
+									<text class="iconfont icon-xiayibu"></text>
+								</view>
+							</view>
+							<view class="main-member-svip" v-if="userVip.vipFlag == -1" @click="navigator('/pages/user/member/member')">
+								<view class="main-member-svip-h1 red">采美·超级会员已过期</view>
+								<view class="main-member-svip-p">有效期至:2021-10-01</view>
+								<view class="main-member-svip-icon">
+									<text class="iconfont icon-xiayibu"></text>
+								</view>
 							</view>
-							<view class="main-member-none" v-else @click="navigator('/pages/user/member/member')">
+							<view class="main-member-none" v-if="userVip.vipFlag == 0" @click="navigator('/pages/user/member/member')">
 								<view class="main-member-none-text">开通采美·超级会员,享专属特权</view>
 								<view class="main-member-none-btn">立即开通</view>
 							</view>
@@ -394,6 +392,7 @@ export default {
 			name: '',
 			userType: '',
 			headpic: '',
+			userVip:{},// 超级会员信息
 			userBeans: 0,
 			userMoney: '0.00',
 			couponNum: 0,
@@ -455,6 +454,7 @@ export default {
 						this.name = data.user.userName //个人机构名称
 						this.userType = '个人机构'
 					}
+					this.userVip = data.vip // 超级会员信息
 					this.userBeans = data.user.userBeans // 采美豆数量
 					this.headpic = data.user.image // 会所头像
 					this.bindMobile = data.user.bindMobile // 登录手机号

+ 439 - 477
pages/user/member/member-pay.vue

@@ -5,66 +5,59 @@
 				<view class="pay-content">
 					<view class="pay-p"><text>待付金额</text></view>
 					<view class="pay-money">
-						<text class="pay-sm">¥</text>
-						<text class="pay-bg">{{payableAmount | NumFormat}}</text>
+						<text class="pay-sm">¥</text> <text class="pay-bg">{{ handelPayMsg.money | NumFormat }}</text>
 					</view>
-					<view class="pay-mouth">套餐:{{ payableMouth  }}</view>
+					<view class="pay-mouth">套餐:{{ handelPayMsg.month }}</view>
 				</view>
 				<view class="pay-check">
 					<view class="check-title"><view class="text">选择支付方式</view></view>
 					<view class="pay-checked">
-						<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" >
+						<view class="pay-item" :class="{ current: tabCurrentIndex === 0 }" @click="tabClick(0)">
 							<view class="item-l">
 								<view class="item-icon"><text class="iconfont icon-weixinzhifu"></text></view>
 								<view class="item-texts"><text>微信支付</text></view>
 							</view>
-							<view class="item-r">
-								<text class="iconfont icon-duigou"></text>
-							</view>
+							<view class="item-r"> <text class="iconfont icon-duigou"></text> </view>
 						</view>
-						<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 1}"   @click="tabClick(1)" >
+						<view class="pay-item" :class="{ current: tabCurrentIndex === 1 }" @click="tabClick(1)">
 							<view class="item-l">
 								<view class="item-icon"><text class="iconfont icon-qiyewangyinzhifu"></text></view>
 								<view class="item-text">
-									<view class="txt-p">企业网银支付</view>
-									<view class="txt-t">需要在电脑端汇款</view>
+									<view class="txt-p">企业网银支付</view> <view class="txt-t">需要在电脑端汇款</view>
 								</view>
 							</view>
-							<view class="item-r">
-								<text class="iconfont icon-duigou"></text>
-							</view>
+							<view class="item-r"> <text class="iconfont icon-duigou"></text> </view>
 						</view>
-						<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 2}"   @click="tabClick(2)" >
+						<view class="pay-item" :class="{ current: tabCurrentIndex === 2 }" @click="tabClick(2)">
 							<view class="item-l">
 								<view class="item-icon"><text class="iconfont icon-gerenwangyinzhifu"></text></view>
 								<view class="item-text">
-									<view class="txt-p">个人网银支付</view>
-									<view class="txt-t">需要在电脑端汇款</view>
+									<view class="txt-p">个人网银支付</view> <view class="txt-t">需要在电脑端汇款</view>
 								</view>
 							</view>
-							<view class="item-r">
-								<text class="iconfont icon-duigou"></text>
-							</view>
+							<view class="item-r"> <text class="iconfont icon-duigou"></text> </view>
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="pay-button">
-				<view class="btn" @click.stop="goOrderCash" :style="{'background':btnColor}">{{buttonText}}</view>
+				<view class="btn" @click.stop="payConfirmClick" :style="{ background: btnColor }">{{
+					buttonText
+				}}</view>
 			</view>
 		</view>
 		<view class="alert spec" :class="specClass" v-if="isShowTip">
 			<!-- 选择支付弹窗说明 -->
-			<view class="payun-alert"  @tap="hideTips">
+			<view class="payun-alert" @tap="hideTips">
 				<view class="content">
 					<view class="title">
-						<text>支付链接</text>
-						<text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
+						<text>支付链接</text> <text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
 					</view>
 					<view class="text-content">
-						<view class="text">请复制以下链接,并发送至电脑端,在浏览器访问该链接并选择银行尽快完成支付</view>
-						<view class="text-p">{{payHttpUrl}}</view>
-						<view class="text-b">链接有效期为72小时</view>
+						<view class="text"
+							>请复制以下链接,并发送至电脑端,在浏览器访问该链接并选择银行尽快完成支付</view
+						>
+						<view class="text-p">{{ payHttpUrl }}</view> <view class="text-b">链接有效期为72小时</view>
 					</view>
 					<view class="text-button" @click.stop="clipboard(payHttpUrl)">复制链接</view>
 				</view>
@@ -74,512 +67,481 @@
 </template>
 
 <script>
-	const thorui = require("@/components/clipboard/clipboard.thorui.js")
-	export default{
-		data(){
-			return{
-				orderId:'',
-				payableAmount:4800,
-				emptyWrapperH: '',
-				payorderId:'',
-				isIphoneX:this.$store.state.isIphoneX,
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				tabCurrentIndex:0,
-				isShowTip:false,
-				isReceiptStatus:false,
-				buttonText:'使用微信支付',
-				btnColor:'#09BB07',
-				receiptStatus:'',
-				invoiceStatus:false,
-				optionType:'',
-				onlinePayFlag:'',
-				pageType:'',
-				payableMouth:'12个月',
-				payHttpUrl:'https://www.so.com/link?'
-			}
-		},
-		onLoad(option) {
-			this.initData(option)
-		},
-		filters: {
-			NumFormat(value) {
-				if(!value) return '0.00';
-				/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
-				/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
-				var intPart = Number(value) - Number(value)%1; //获取整数部分(这里是windy93的方法)
-				var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
-				var floatPart = ".00"; //预定义小数部分
-				var value2Array = value.toString().split(".");
-				//=2表示数据有小数位
-				if(value2Array.length == 2) {
-					floatPart = value2Array[1].toString(); //拿到小数部分
+import authorize from '@/common/config/authorize.js'
+const thorui = require('@/components/clipboard/clipboard.thorui.js')
+export default {
+	data() {
+		return {
+			isIphoneX: this.$store.state.isIphoneX,
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			tabCurrentIndex: 0,
+			isShowTip: false,
+			buttonText: '使用微信支付',
+			btnColor: '#09BB07',
+			handelPayMsg: {},
+			payParams: {
+				vipId: 0,
+				code: 0,
+				userId: 0
+			},
+			payHttpUrl: 'https://www.caimei365.com'
+		}
+	},
+	onLoad(option) {
+		this.initGetStotage(option)
+	},
+	filters: {
+		NumFormat(value) {
+			if (!value) return '0.00'
+			/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
+			/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
+			var intPart = Number(value) - (Number(value) % 1) //获取整数部分(这里是windy93的方法)
+			var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
+			var floatPart = '.00' //预定义小数部分
+			var value2Array = value.toString().split('.')
+			//=2表示数据有小数位
+			if (value2Array.length == 2) {
+				floatPart = value2Array[1].toString() //拿到小数部分
 
-					if(floatPart.length == 1) { //补0,实际上用不着
-						return intPartFormat + "." + floatPart + '0';
-					} else {
-						return intPartFormat + "." + floatPart;
-					}
+				if (floatPart.length == 1) {
+					//补0,实际上用不着
+					return intPartFormat + '.' + floatPart + '0'
 				} else {
-					return intPartFormat + floatPart;
+					return intPartFormat + '.' + floatPart
 				}
+			} else {
+				return intPartFormat + floatPart
 			}
+		}
+	},
+	methods: {
+		async initGetStotage(option) {
+			let data = JSON.parse(option.data)
+			const userInfo = await this.$api.getStorage()
+			this.payParams.code = await authorize.getCode('weixin')
+			this.payParams.vipId = data.packageId
+			this.payParams.userId = userInfo.userId ? userInfo.userId : 0
+			this.handelPayMsg = data
+			console.log(this.payParams.code)
 		},
-		methods:{
-			initData(e){
-				console.log(e)
-				this.orderId = e.orderId;
-				this.payOrderId ='#'+e.orderId+'#';
-				this.optionType = e.type;
-				this.PayOrderCheckoutCounter(this.orderId)
-			},
-			PayOrderCheckoutCounter(orderId){
-				this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
-					let data = response.data.order
-					this.payableAmount = data.payableAmount - data.receiptAmount  //待付金额
-					this.receiptStatus =  data.receiptStatus
-					this.onlinePayFlag = data.onlinePayFlag					
-					//判断线上线下显示
-					if(this.optionType == 'onlinePay'){
-						this.invoiceStatus = true
-					}else{
-						this.invoiceStatus = data.invoiceStatus
-					}
-					if(data.receiptAmount>0){
-						this.isReceiptStatus = false
-					}else{
-						this.isReceiptStatus = true
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+		payConfirmClick() {
+			// // 友盟埋点收集选择支付方式
+			// if(process.env.NODE_ENV != 'development'){
+			// 	this.$uma.trackEvent('Um_Event_ChooseWechatPay', {
+			// 		Um_Key_PageName: '线上支付',
+			// 		Um_Key_SourcePage: '选择支付',
+			// 		Um_Key_PayName:`${this.buttonText}`,
+			// 		Um_Key_PayOrderID:`${this.orderId}`
+			// 	})
+			// }
+			switch (this.tabCurrentIndex) {
+				case 0:
+					this.MiniWxPayFor()
+					break
+				case 1:
+					this.BuildCatenate()
+					break
+				case 2:
+					this.BuildCatenate()
+					break
+			}
+		},
+		MiniWxPayFor() {
+			// 使用微信支付
+			this.PayService.PayOrderVipWechat(this.payParams)
+				.then(response => {
+					let PayInfo = JSON.parse(response.data.data.payInfo)
+					this.WxRequestPayment(PayInfo)
 				})
-			},
-			goOrderCash(){
-				// // 友盟埋点收集选择支付方式
-				// if(process.env.NODE_ENV != 'development'){
-				// 	this.$uma.trackEvent('Um_Event_ChooseWechatPay', {
-				// 		Um_Key_PageName: '线上支付',
-				// 		Um_Key_SourcePage: '选择支付',
-				// 		Um_Key_PayName:`${this.buttonText}`,
-				// 		Um_Key_PayOrderID:`${this.orderId}`
-				// 	})
-				// }
-				switch(this.tabCurrentIndex){
-					case 0:
-						this.MiniWxPayFor();					
-						break;
-					case 1:
-						this.BuildCatenate();	
-						break;
-					case 2:
-						this.BuildCatenate();	
-						break;
-				}
-			},
-			async MiniWxPayFor(){// 使用微信支付
-				const WechatCode = authorize.getCode('weixin')
-				this.PayService.WeChatMiniWxPay(
-					{
-						payAmount:this.accMul(this.payAmount,100),
-						payWay:"WEIXIN",
-						code:wechatcode,
-						orderId:this.orderId
-					}
-				).then(response =>{
-					// // 友盟埋点收集微信支付
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		WxRequestPayment(data) {
+			// 微信支付Api
+			let self = this
+			wx.requestPayment({
+				timeStamp: data.timeStamp,
+				nonceStr: data.nonceStr,
+				package: data.package,
+				signType: data.signType,
+				paySign: data.paySign,
+				success: function(res) {
+					wx.reLaunch({ url: '/pages/tabBar/user/user' })
+				},
+				fail: function(res) {
+					self.$util.msg('用户取消支付~')
+				},
+				complete: function(res) {}
+			})
+		},
+		BuildCatenate() {
+			// 生成网银支付链接
+			this.isShowTip = true
+			// this.PayService.PayOrderPayLink(
+			// 	{
+			// 		unpaidAmount:this.payAmount,
+			// 		orderId:this.orderId,
+			// 		payType:this.payType,
+			// 	}
+			// ).then(response =>{
+			// 	this.payHttpUrl = response.data
+			// 	this.isShowTip = true
+			// }).catch(error =>{
+			// 	this.$util.msg(error.msg,2000)
+			// })
+		},
+		tabClick(index) {
+			//tab切换
+			this.tabCurrentIndex = index
+			switch (index) {
+				case 0:
+					this.btnColor = '#09BB07'
+					this.buttonText = '使用微信支付'
+					break
+				case 1:
+					this.btnColor = '#034582'
+					this.buttonText = '生成企业网银链接'
+					break
+				case 2:
+					this.btnColor = '#034582'
+					this.buttonText = '生成个人网银链接'
+					break
+			}
+		},
+		hideTips() {
+			//隐藏弹窗
+			this.isShowTip = false
+		},
+		clipboard(data) {
+			thorui.getClipboardData(data, res => {
+				if (res) {
+					this.isShowTip = false
+					this.$util.msg('复制成功', 2000, true, 'success')
+					// // 友盟埋点收集复制网银链接
 					// if(process.env.NODE_ENV != 'development'){
-					// 	this.$uma.trackEvent('Um_Event_ConfirmWechatPay', {
-					// 		Um_Key_PageName: '微信支付',
+					// 	this.$uma.trackEvent('Um_Event_CopyUnionPay', {
+					// 		Um_Key_PageName: '网银支付',
 					// 		Um_Key_SourcePage: '线上支付',
 					// 		Um_Key_PayName:`${this.buttonText}`,
 					// 		Um_Key_PayOrderID:`${this.orderId}`
 					// 	})
 					// }
-					let PayInfo = JSON.parse(response.data.data.payInfo);
-					this.WxRequestPayment(PayInfo)
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			WxRequestPayment(data){// 微信支付Api
-				let self = this
-				wx.requestPayment({
-					'timeStamp': data.timeStamp,
-					'nonceStr': data.nonceStr,
-					'package': data.package,
-					'signType': data.signType,
-					'paySign': data.paySign,
-					'success':function(res){
-						wx.reLaunch({url: '/pages/tabBar/user/user'});
-					},
-					'fail':function(res){
-						self.$util.msg('用户取消支付~')
-					},
-					'complete':function(res){
-			
-					}
-				})
-			},
-			BuildCatenate(){// 生成网银支付链接
-				this.isShowTip = true
-				// this.PayService.PayOrderPayLink(
-				// 	{
-				// 		unpaidAmount:this.payAmount,
-				// 		orderId:this.orderId,
-				// 		payType:this.payType,
-				// 	}
-				// ).then(response =>{
-				// 	this.payHttpUrl = response.data
-				// 	this.isShowTip = true
-				// }).catch(error =>{
-				// 	this.$util.msg(error.msg,2000)
-				// })
-			},
-			tabClick(index) {//tab切换
-				this.tabCurrentIndex = index;
-				switch(index){
-					case 0:
-						this.btnColor="#09BB07"
-						this.buttonText='使用微信支付';
-						break;
-					case 1:
-						this.btnColor="#034582"
-						this.buttonText='生成企业网银链接';
-						break;
-					case 2:
-						this.btnColor="#034582"
-						this.buttonText='生成个人网银链接';
-						break;
+				} else {
+					this.$util.msg('复制失败', 2000, true, 'none')
 				}
-			},
-			hideTips(){//隐藏弹窗
-				this.isShowTip = false
-			},
-			clipboard(data) {
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.isShowTip = false;
-						this.$util.msg("复制成功",2000,true,'success');
-						// // 友盟埋点收集复制网银链接
-						// if(process.env.NODE_ENV != 'development'){
-						// 	this.$uma.trackEvent('Um_Event_CopyUnionPay', {
-						// 		Um_Key_PageName: '网银支付',
-						// 		Um_Key_SourcePage: '线上支付',
-						// 		Um_Key_PayName:`${this.buttonText}`,
-						// 		Um_Key_PayOrderID:`${this.orderId}`
-						// 	})
-						// }
-					} else {
-						this.$util.msg("复制失败",2000,true,'none');
-					}
-				})
-			},
-		},
-		onShow() {
-
+			})
 		}
-	}
+	},
+	onShow() {}
+}
 </script>
 
 <style lang="scss">
-	page{
-		height: auto !important;
-		background-color: #FFFFFF;
-	}
-	.container-cash{
+page {
+	height: auto !important;
+	background-color: #ffffff;
+}
+.container-cash {
+	width: 100%;
+	margin-top: 40rpx;
+	.container-wrapper {
 		width: 100%;
-		margin-top: 40rpx;
-		.container-wrapper{
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.pay-content {
 			width: 100%;
+			height: 254rpx;
+			padding: 92rpx 40rpx 16rpx 40rpx;
 			box-sizing: border-box;
-			padding: 0 24rpx;
-			.pay-content{
-				width: 100%;
-				height: 254rpx;
-				padding: 92rpx 40rpx 16rpx 40rpx;
-				box-sizing: border-box;
-				background: url(https://static.caimei365.com/app/img/icon/icon-member-pay@2x.png) no-repeat;
-				background-size: cover;
-				float: left;
-				position: relative;
-				.pay-p{
+			background: url(https://static.caimei365.com/app/img/icon/icon-member-pay@2x.png) no-repeat;
+			background-size: cover;
+			float: left;
+			position: relative;
+			.pay-p {
+				font-size: $font-size-26;
+				color: #4e4539;
+				line-height: 36rpx;
+			}
+			.pay-money {
+				color: #4e4539;
+				line-height: 84rpx;
+				font-weight: bold;
+				.pay-sm {
 					font-size: $font-size-26;
-					color: #4E4539;
-					line-height: 36rpx;
 				}
-				.pay-money{
-					color: #4E4539;
-					line-height: 84rpx;
-					font-weight: bold;
-					.pay-sm{
-						font-size: $font-size-26;
-					}
-					.pay-bg{
-						font-size: 50rpx;
-					}
-				}
-				.pay-mouth{
-					position: absolute;
-					right: 40rpx;
-					bottom: 16rpx;
-					line-height: 36rpx;
-					font-size: $font-size-26;
-					color: #4E4539;
+				.pay-bg {
+					font-size: 50rpx;
 				}
 			}
-			.pay-check{
-				width: 100%;
-				height: auto;
-				float: left;
-				.check-title{
-					width: 622rpx;
+			.pay-mouth {
+				position: absolute;
+				right: 40rpx;
+				bottom: 16rpx;
+				line-height: 36rpx;
+				font-size: $font-size-26;
+				color: #4e4539;
+			}
+		}
+		.pay-check {
+			width: 100%;
+			height: auto;
+			float: left;
+			.check-title {
+				width: 622rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				padding: 0 20rpx;
+				margin-top: 24rpx;
+				.text {
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: left;
+					float: left;
+				}
+				.icon {
+					width: 40rpx;
 					height: 40rpx;
+					border-radius: 50%;
 					line-height: 40rpx;
-					padding: 0 20rpx;
-					margin-top: 24rpx;
-					.text{
-						font-size: $font-size-28;
-						color: $text-color;
-						text-align: left;
-						float: left;
-					}
-					.icon{
-						width: 40rpx;
-						height: 40rpx;
-						border-radius: 50%;
-						line-height: 40rpx;
-						text-align: center;
-						color: #FFFFFF;
-						font-size: $font-size-24;
-						background: radial-gradient(circle,rgba(225,86,22,1) 0%,rgba(255,170,0,1) 67%,rgba(249,185,156,1) 100%);
-						float: right;
-					}
+					text-align: center;
+					color: #ffffff;
+					font-size: $font-size-24;
+					background: radial-gradient(
+						circle,
+						rgba(225, 86, 22, 1) 0%,
+						rgba(255, 170, 0, 1) 67%,
+						rgba(249, 185, 156, 1) 100%
+					);
+					float: right;
 				}
-				.pay-checked{
+			}
+			.pay-checked {
+				width: 100%;
+				height: auto;
+				.pay-item {
 					width: 100%;
-					height: auto;
-					.pay-item{
-						width: 100%;
-						height: 120rpx;
-						box-sizing: border-box;
-						border: 1px solid #E1E1E1;
-						border-radius: 8rpx;
-						padding: 20rpx;
-						margin: 24rpx 0;
-						display: flex;
-						background-color: #FFFFFF;
-						&.current{
-							border-color:#E4AA43;
-							.item-r{
-								.icon-duigou{
-									color: #E4AA43;
-								}
+					height: 120rpx;
+					box-sizing: border-box;
+					border: 1px solid #e1e1e1;
+					border-radius: 8rpx;
+					padding: 20rpx;
+					margin: 24rpx 0;
+					display: flex;
+					background-color: #ffffff;
+					&.current {
+						border-color: #e4aa43;
+						.item-r {
+							.icon-duigou {
+								color: #e4aa43;
 							}
 						}
-						.item-l{
-							flex: 8;
-							.item-icon{
-								width: 72rpx;
-								height: 72rpx;
-								float: left;
-								text-align: center;
-								line-height: 72rpx;
-								margin-right: 20rpx;
-								.iconfont{
-									font-size:78rpx;
-								}
-								.icon-weixinzhifu{
-									color: #09BB07;
-								}
-								.icon-gerenwangyinzhifu{
-									color: #034582;
-								}
-								.icon-qiyewangyinzhifu{
-									color: #004889;
-								}
+					}
+					.item-l {
+						flex: 8;
+						.item-icon {
+							width: 72rpx;
+							height: 72rpx;
+							float: left;
+							text-align: center;
+							line-height: 72rpx;
+							margin-right: 20rpx;
+							.iconfont {
+								font-size: 78rpx;
 							}
-							.item-texts{
-								line-height: 66rpx;
-								font-size:$font-size-26;
-								color: $text-color;
+							.icon-weixinzhifu {
+								color: #09bb07;
+							}
+							.icon-gerenwangyinzhifu {
+								color: #034582;
 							}
-							.item-text{
-								line-height: 36rpx;
-								font-size:$font-size-26;
-								.txt-p{
-									color: $text-color;
-								}
-								.txt-t{
-									color: #999999;
-								}
+							.icon-qiyewangyinzhifu {
+								color: #004889;
 							}
 						}
-						.item-r{
-							flex: 2;
-							text-align: center;
-							line-height: 72rpx;
-							.icon-duigou{
-								font-size: 54rpx;
-								color: #FFFFFF;
+						.item-texts {
+							line-height: 66rpx;
+							font-size: $font-size-26;
+							color: $text-color;
+						}
+						.item-text {
+							line-height: 36rpx;
+							font-size: $font-size-26;
+							.txt-p {
+								color: $text-color;
+							}
+							.txt-t {
+								color: #999999;
 							}
 						}
 					}
-				}
-			}
-		}
-		.pay-button{
-			width: 100%;
-			float: left;
-			margin-top:30rpx;
-			.btn{
-				width: 662rpx;
-				height: 88rpx;
-				border-radius: 44rpx;
-				font-size: $font-size-28;
-				line-height: 88rpx;
-				color: #FFFFFF;
-				margin: 0 auto;
-				text-align: center;
-				background:$btn-confirm;
-			}
-		}
-		.pay-bring-wrapper{
-			width: 100%;
-			padding: 24rpx 0;
-			background-color: #FFFFFF;
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-			.pay-bring-content{
-				width: 654rpx;
-				height: auto;
-				padding: 0 24rpx;
-				.text{
-					font-size: $font-size-24;
-					color: #666;
-					line-height: 44rpx;
-					text-align: center;
-					&.bg-color{
-						color: $color-system;
-						line-height: 88rpx;
-					}
-				}
-				.text-v{
-					font-size: $font-size-28;
-					color: #999;
-					line-height: 70rpx;
-					text-align: left;
-					&.title{
-						font-size: $font-size-28;
-						color: #666666;
-					}
-					&.bg-color{
-						line-height: 44rpx;
-						color: $color-system;
-					}
-					.clipboard{
-						width: 84rpx;
-						height: 36rpx;
-						background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
+					.item-r {
+						flex: 2;
 						text-align: center;
-						font-size: $font-size-24;
-						color: #FFFFFF;
-						border-radius: 4rpx;
-						line-height: 36rpx;
-						display: inline-block;
-						margin-left: 10rpx;
+						line-height: 72rpx;
+						.icon-duigou {
+							font-size: 54rpx;
+							color: #ffffff;
+						}
 					}
 				}
 			}
 		}
 	}
-	.payun-alert{
+	.pay-button {
 		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;
+		float: left;
+		margin-top: 30rpx;
+		.btn {
+			width: 662rpx;
+			height: 88rpx;
+			border-radius: 44rpx;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			color: #ffffff;
+			margin: 0 auto;
+			text-align: center;
+			background: $btn-confirm;
 		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 422rpx;
-			height:434rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 32rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
+	}
+	.pay-bring-wrapper {
+		width: 100%;
+		padding: 24rpx 0;
+		background-color: #ffffff;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		.pay-bring-content {
+			width: 654rpx;
+			height: auto;
+			padding: 0 24rpx;
+			.text {
+				font-size: $font-size-24;
+				color: #666;
+				line-height: 44rpx;
 				text-align: center;
-				position: relative;
-				.icon-iconfontguanbi{
-					width: 68rpx;
-					height: 68rpx;
-					text-align: center;
-					line-height: 68rpx;
-					position: absolute;
-					right: 0;
-					top: 0;
-					font-size: $font-size-36;
-					color: #999999;
+				&.bg-color {
+					color: $color-system;
+					line-height: 88rpx;
 				}
 			}
-			.text-content{
-				width: 100%;
-				height: auto;
-				.text{
-					padding: 20rpx 0 0 0;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:#666666;
-					text-align: justify;
+			.text-v {
+				font-size: $font-size-28;
+				color: #999;
+				line-height: 70rpx;
+				text-align: left;
+				&.title {
+					font-size: $font-size-28;
+					color: #666666;
 				}
-				.text-p{
-					width: 100%;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:$color-system;
-					text-align: left;
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 1;
-					overflow: hidden;
-				} 
-				.text-b{
+				&.bg-color {
 					line-height: 44rpx;
+					color: $color-system;
+				}
+				.clipboard {
+					width: 84rpx;
+					height: 36rpx;
+					background: linear-gradient(34deg, rgba(255, 41, 41, 1) 0%, rgba(255, 109, 27, 1) 100%);
+					text-align: center;
 					font-size: $font-size-24;
-					color:#999999;
-					text-align: left;
+					color: #ffffff;
+					border-radius: 4rpx;
+					line-height: 36rpx;
+					display: inline-block;
+					margin-left: 10rpx;
 				}
 			}
-			.text-button{
-				width: 100%;
-				height: 88rpx;
-				line-height: 88rpx;
-				background: $btn-confirm;
-				font-size: $font-size-28;
-				border-radius: 44rpx;
-				color:#FFFFFF;
+		}
+	}
+}
+.payun-alert {
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 0, 0, 0.5);
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 8888;
+	transition: all 0.4s;
+	&.none {
+		display: none;
+	}
+	&.show {
+		display: block;
+	}
+	.content {
+		width: 422rpx;
+		height: 434rpx;
+		position: absolute;
+		background: $bg-color;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		top: 0;
+		margin: auto;
+		padding: 20rpx 32rpx;
+		border-radius: 12rpx;
+		.title {
+			width: 100%;
+			height: 68rpx;
+			line-height: 68rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			text-align: center;
+			position: relative;
+			.icon-iconfontguanbi {
+				width: 68rpx;
+				height: 68rpx;
 				text-align: center;
-				margin-top: 20rpx;
+				line-height: 68rpx;
+				position: absolute;
+				right: 0;
+				top: 0;
+				font-size: $font-size-36;
+				color: #999999;
 			}
 		}
+		.text-content {
+			width: 100%;
+			height: auto;
+			.text {
+				padding: 20rpx 0 0 0;
+				line-height: 44rpx;
+				font-size: $font-size-26;
+				color: #666666;
+				text-align: justify;
+			}
+			.text-p {
+				width: 100%;
+				line-height: 44rpx;
+				font-size: $font-size-26;
+				color: $color-system;
+				text-align: left;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 1;
+				overflow: hidden;
+			}
+			.text-b {
+				line-height: 44rpx;
+				font-size: $font-size-24;
+				color: #999999;
+				text-align: left;
+			}
+		}
+		.text-button {
+			width: 100%;
+			height: 88rpx;
+			line-height: 88rpx;
+			background: $btn-confirm;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
+			color: #ffffff;
+			text-align: center;
+			margin-top: 20rpx;
+		}
 	}
+}
 </style>

+ 338 - 193
pages/user/member/member-renew.vue

@@ -4,10 +4,13 @@
 			<view class="cm-member-head">
 				<view class="cm-member-text">
 					<view class="cm-member-h1">
-						<text>采美·超级会员</text>
+						<text v-if="userVip.vipFlag == 0">采美·超级会员</text>
+						<text v-if="userVip.vipFlag == 1">已开通采美·超级会员</text>
+						<text v-if="userVip.vipFlag == -1">采美·超级会员已过期</text>
 					</view>
 					<view class="cm-member-p">
-						<text>享专属特权</text>
+						<text v-if="userVip.vipFlag == 0">享专属特权</text>
+						<text v-else>有效期至:{{ userVip.endTime }}</text>
 					</view>
 				</view>
 			</view>
@@ -15,242 +18,384 @@
 		<view class="cm-member-main">
 			<view class="title">超级会员套餐</view>
 			<view class="cm-member-pay">
-				<view class="pay-item" 
-					  v-for="(pay,index) in payList" 
-					  :key="index" 
-					  :class="{current: tabCurrent === index}" 
-					  @click="handleCheckedPay(index,pay)"
+				<view
+					class="pay-item"
+					v-for="(pay, index) in payList"
+					:key="index"
+					:class="{ current: tabCurrent === index }"
+					@click="handleCheckedPay(index, pay)"
 				>
-					<view class="hot" v-if="index == 0">推荐</view>
-					<view class="text-1">{{ pay.month }}</view>
+					<view class="hot" v-if="index == 0">推荐</view> <view class="text-1">{{ pay.month }}</view>
 					<view class="text-2"> <text>¥</text>{{ pay.money }}</view>
 					<view class="text-3">{{ pay.text }}</view>
 				</view>
 			</view>
 			<view class="cm-member-button">
-				<view class="pay-btn pay" @click="hanldPayUrl('/pages/user/member/member-pay')">立即支付{{ payAmount }}元开通</view>
-				<view class="pay-btn none">抵扣{{ payBeans }}个采美豆开通</view>
+				<view class="pay-btn pay" @click="hanldWechatPay">立即支付{{ handelPayMsg.money }}元开通</view>
+				<view class="pay-btn none" @click="hanldeShowBeans">抵扣{{ handelPayMsg.beans }}个采美豆开通</view>
 			</view>
 		</view>
+		<!-- 弹窗 -->
+		<template>
+			<view class="cm-model-alert" v-if="isShowBeansModal">
+				<view class="content">
+					<view class="title">
+						<text>购买超级会员</text>
+						<text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
+					</view>
+					<view class="text-content">
+						<view class="text"
+							>确定使用<text class="text-p">{{ handelPayMsg.beans }}</text
+							>个采美豆抵扣{{ handelPayMsg.month }}的采美超级会员吗?</view
+						>
+					</view>
+					<view class="text-button">
+						<view class="btn btn-cancel" @click="handelCanelBeans">取消</view>
+						<view class="btn btn-confirm" @click="handelConfirmBeans">确定</view>
+					</view>
+				</view>
+			</view>
+		</template>
 	</view>
 </template>
 
 <script>
-	import { mapState,mapMutations} from 'vuex';
-	export default {
-		components:{
-			
-		},
-		data() {
-			return {
-				StaticUrl:this.$Static,
-				memberType:0,
-				tabCurrent:0,
-				params:{
-					userId:0,
-					redemptionCode:'',
-					source:2,
-				},
-				payList:[
-					{month:'12个月',money:4800,type:1,text:'400元/月',beans:480000},
-					{month:'3个月',money:1500,type:2,text:'500元/月',beans:150000},
-					{month:'1个月',money:600,type:3,text:'',beans:60000},
-				],
-				payAmount:4800,
-				payBeans:480000,
+import { mapState, mapMutations } from 'vuex'
+export default {
+	components: {},
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			isShowBeansModal:false,
+			payList: [
+				{ month: '12个月', money: 4800, packageId: 1, text: '400元/月', beans: 480000 },
+				{ month: '3个月', money: 1500, packageId: 2, text: '500元/月', beans: 150000 },
+				{ month: '1个月', money: 600, packageId: 3, text: '', beans: 60000 }
+			],
+			userVip: {},
+			handelPayMsg: {
+				beans: 480000,
+				money: 4800,
+				month: '12个月',
+				packageId: 1
+			},
+			payParam: {
+				userId: 0,
+				packageId: 1
+			},
+			tabCurrent: 0,
+		}
+	},
+	onLoad() {},
+	filters: {
+		TypeFormat: function(value) {
+			switch (value) {
+				case 0:
+					return '活动券'
+					break
+				case 1:
+					return '品类券'
+					break
+				case 2:
+					return '用户专享券'
+					break
+				case 3:
+					return '店铺券'
+					break
+				case 4:
+					return '新用户券'
+					break
 			}
+		}
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity', 'isActivity'])
+	},
+	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.payParam.userId = userInfo.userId ? userInfo.userId : 0
+			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.getUserSuperCenter()
 		},
-		onLoad() {
-			
+		getUserSuperCenter() {
+			// 获取会员中心数据
+			this.UserService.getUserSuperCenter({ userId: this.payParam.userId })
+				.then(response => {
+					let data = response.data
+					this.userVip = data.vip
+					console.log(this.userVip)
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
 		},
-		filters: {
-			TypeFormat:function(value) {
-				switch (value) {
-					case 0:
-						return  '活动券';
-						break;
-					case 1:
-						return  '品类券';
-						break;
-					case 2:
-						return  '用户专享券';
-						break;
-					case 3:
-						return  '店铺券';
-						break;
-					case 4:
-						return  '新用户券';
-						break;
-				}
-			}
+		hanldeShowBeans() {
+			// 显示采美豆抵扣开通超级会员弹窗
+			this.isShowBeansModal = true
 		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity','isActivity'])
+		handelCanelBeans() {
+			// 取消采美豆抵扣超级会员
+			this.isShowBeansModal = false
 		},
-		methods: {
-			hanldPayUrl(url){
-				this.$api.navigateTo(url)
-			},
-			handleCheckedPay(index,pay){// 选择会员
-				this.tabCurrent = index
-				this.payAmount = pay.money
-				this.payBeans = pay.beans
-			}
+		handelConfirmBeans() {
+			// 确认采美豆抵扣开通超级会员
+			this.PayService.getUserRegisterSuperBeans(this.payParam)
+				.then(response => {
+					this.isShowBeansModal = false
+					this.$util.msg('开通成功', 2000, true, 'success')
+					this.getUserSuperCenter()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hanldWechatPay() {
+			// 跳转微信只开通超级会员
+			this.$api.navigateTo(`/pages/user/member/member-pay?data=${JSON.stringify(this.handelPayMsg)}`)
 		},
-		onShow(){
-			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.params.userId = resolve.userId ? resolve.userId : 0;
-			}).catch(error =>{
-				console.log('暂无用户信息~')
-			})
+		handleCheckedPay(index, pay) {
+			// 选择会员
+			this.tabCurrent = index
+			this.payParam.packageId = pay.packageId
+			this.handelPayMsg = pay
 		}
+	},
+	onShow() {
+		this.initGetStotage()
 	}
+}
 </script>
 
 <style lang="scss">
-	.container{
-		width: 100%;
-		height: auto;
-	}
-	.cm-member-top{
-		width: 100%;
-		height: 242rpx;
+.container {
+	width: 100%;
+	height: auto;
+}
+.cm-member-top {
+	width: 100%;
+	height: 242rpx;
+	box-sizing: border-box;
+	padding: 0 24rpx;
+	background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
+	background-size: cover;
+	position: relative;
+	.cm-member-head {
+		width: 702rpx;
+		height: 132rpx;
 		box-sizing: border-box;
-		padding: 0 24rpx;
-		background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
+		padding: 30rpx 32rpx 0 109rpx;
+		background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
 		background-size: cover;
-		position: relative;
-		.cm-member-head{
-			width: 702rpx;
-			height: 132rpx;
+		position: absolute;
+		bottom: 0;
+		left: 24rpx;
+		border-radius: 16rpx 16rpx 0 0;
+		.cm-member-text {
+			float: left;
+			.cm-member-h1 {
+				line-height: 42rpx;
+				font-size: $font-size-30;
+				color: #55331d;
+				text-align: left;
+				margin-bottom: 12rpx;
+				font-weight: bold;
+			}
+			.cm-member-p {
+				line-height: 30rpx;
+				font-size: $font-size-22;
+				color: #55331d;
+				text-align: left;
+			}
+		}
+	}
+}
+.cm-member-main {
+	width: 100%;
+	box-sizing: border-box;
+	padding: 40rpx 24rpx;
+	background-color: #ffffff;
+	margin-bottom: 20rpx;
+	.title {
+		font-size: $font-size-32;
+		line-height: 45rpx;
+		text-align: left;
+		color: #55331d;
+		font-weight: bold;
+		.small {
+			font-size: $font-size-24;
+			color: #e4aa43;
+			font-weight: normal;
+			margin-left: 15rpx;
+		}
+	}
+	.cm-member-pay {
+		width: 100%;
+		height: 236rpx;
+		margin: 40rpx 0;
+		.pay-item {
+			width: 218rpx;
+			height: 100%;
+			float: left;
+			margin-right: 24rpx;
+			border: 1px solid #f0f0f0;
+			border-radius: 16rpx;
 			box-sizing: border-box;
-			padding: 30rpx 32rpx 0 109rpx;
-			background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
-			background-size: cover;
-			position: absolute;
-			bottom: 0;
-			left: 24rpx;
-			border-radius: 16rpx 16rpx 0 0;
-			.cm-member-text{
-				float: left;
-				.cm-member-h1{
-					line-height: 42rpx;
-					font-size: $font-size-30;
-					color: #55331D;
-					text-align: left;
-					margin-bottom: 12rpx;
-					font-weight: bold;
-				}
-				.cm-member-p{
-					line-height: 30rpx;
-					font-size: $font-size-22;
-					color: #55331D;
-					text-align: left;
+			text-align: center;
+			padding: 40rpx 0;
+			position: relative;
+			.hot {
+				width: 80rpx;
+				height: 36rpx;
+				text-align: center;
+				line-height: 36rpx;
+				font-size: $font-size-24;
+				color: #ffffff;
+				background-color: #ff2a2a;
+				border-radius: 0 8rpx 8rpx 8rpx;
+				position: absolute;
+				left: 0;
+				top: -10rpx;
+			}
+			&.current {
+				background-color: #fdf8ee;
+				border: 1px solid #f0cc8c;
+			}
+			&:last-child {
+				margin-right: 0;
+			}
+			.text-1 {
+				line-height: 40rpx;
+				font-size: $font-size-28;
+				margin-bottom: 10rpx;
+				color: #55331d;
+			}
+			.text-2 {
+				line-height: 59rpx;
+				font-size: $font-size-40;
+				margin-bottom: 10rpx;
+				color: #ff2a2a;
+				font-weight: bold;
+				text {
+					font-size: $font-size-26;
 				}
 			}
+			.text-3 {
+				line-height: 33rpx;
+				font-size: $font-size-24;
+				color: #666666;
+			}
 		}
 	}
-	.cm-member-main{
+	.cm-member-button {
 		width: 100%;
 		box-sizing: border-box;
-		padding: 40rpx 24rpx;
-		background-color: #FFFFFF;
-		margin-bottom: 20rpx;
-		.title{
-			font-size: $font-size-32;
-			line-height: 45rpx;
-			text-align: left;
-			color:#55331D;
-			font-weight: bold;
-			.small{
-				font-size: $font-size-24;
-				color: #E4AA43;
-				font-weight: normal;
-				margin-left: 15rpx;
+		padding: 0 51rpx;
+		.pay-btn {
+			width: 100%;
+			height: 90rpx;
+			line-height: 90rpx;
+			border-radius: 50rpx;
+			text-align: center;
+			font-size: $font-size-30;
+			color: #55331d;
+			box-sizing: border-box;
+			margin-bottom: $font-size-24;
+			&.pay {
+				background: linear-gradient(90deg, #fee9ba 0%, #f0cb72 100%);
+				font-weight: bold;
+			}
+			&.none {
+				border: 1px solid #f0cb72;
+				margin-bottom: 0;
 			}
 		}
-		.cm-member-pay{
+	}
+}
+.cm-model-alert {
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 0, 0, 0.5);
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 8888;
+	transition: all 0.4s;
+	.content {
+		width: 580rpx;
+		height: 390rpx;
+		position: absolute;
+		background: $bg-color;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		top: 0;
+		margin: auto;
+		padding: 20rpx 32rpx;
+		border-radius: 12rpx;
+		.title {
 			width: 100%;
-			height:236rpx;
-			margin: 40rpx 0;
-			.pay-item{
-				width: 218rpx;
-				height: 100%;
-				float: left;
-				margin-right: 24rpx;
-				border: 1px solid #F0F0F0;
-				border-radius: 16rpx;
-				box-sizing: border-box;
+			height: 68rpx;
+			line-height: 68rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			text-align: center;
+			position: relative;
+			.icon-iconfontguanbi {
+				width: 68rpx;
+				height: 68rpx;
 				text-align: center;
-				padding: 40rpx 0;
-				position: relative;
-				.hot{
-					width: 80rpx;
-					height: 36rpx;
-					text-align: center;
-					line-height: 36rpx;
-					font-size: $font-size-24;
-					color: #FFFFFF;
-					background-color: #FF2A2A;
-					border-radius: 0 8rpx 8rpx 8rpx;
-					position: absolute;
-					left: 0;
-					top: -10rpx;
-				}
-				&.current{
-					background-color: #FDF8EE;
-					border: 1px solid #F0CC8C;
-				}
-				&:last-child{
-					margin-right: 0;
-				}
-				.text-1{
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					margin-bottom: 10rpx;
-					color: #55331D;
-				}
-				.text-2{
-					line-height: 59rpx;
-					font-size: $font-size-40;
-					margin-bottom: 10rpx;
-					color: #FF2A2A;
-					font-weight: bold;
-					text{
-						font-size: $font-size-26;
-					}
-				}
-				.text-3{
-					line-height: 33rpx;
-					font-size: $font-size-24;
-					color: #666666;
+				line-height: 68rpx;
+				position: absolute;
+				right: 0;
+				top: 0;
+				font-size: $font-size-36;
+				color: #999999;
+			}
+		}
+		.text-content {
+			width: 100%;
+			height: auto;
+			margin-top: 20px;
+			.text {
+				padding: 20rpx 0 0 0;
+				line-height: 44rpx;
+				font-size: $font-size-26;
+				color: #666666;
+				text-align: justify;
+				.text-p {
+					color: #e15616;
 				}
-				
 			}
 		}
-		.cm-member-button{
+		.text-button {
 			width: 100%;
+			height: 72rpx;
+			display: flex;
 			box-sizing: border-box;
-			padding: 0 51rpx;
-			.pay-btn{
-				width: 100%;
-				height: 90rpx;
-				line-height: 90rpx;
-				border-radius: 50rpx;
-				text-align: center;
-				font-size: $font-size-30;
-				color: #55331D;
+			padding: 0 50rpx;
+			margin-top: 30px;
+			.btn {
+				width: 200rpx;
+				height: 72rpx;
+				line-height: 72rpx;
+				color: #fff;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: $font-size-26;
+				border-radius: 44rpx;
 				box-sizing: border-box;
-				margin-bottom: $font-size-24;
-				&.pay{
-					background: linear-gradient(90deg, #FEE9BA 0%, #F0CB72 100%);
-					font-weight: bold;
+				&.btn-confirm {
+					background: $btn-confirm;
+					margin-left: 78rpx;
 				}
-				&.none{
-					border: 1px solid #F0CB72;
-					margin-bottom: 0;
+				&.btn-cancel {
+					border: 1px solid #b2b2b2;
+					color: #333333;
 				}
 			}
 		}
 	}
+}
 </style>

+ 932 - 770
pages/user/member/member.vue

@@ -1,770 +1,932 @@
-<template>
-	<view class="container clearfix">
-		<view class="cm-member-top">
-			<view class="cm-member-cel" @click="hanldPayUrl('/pages/user/member/member-record')">购买记录</view>
-			<view class="cm-member-head">
-				<view class="cm-member-text">
-					<view class="cm-member-h1">
-						<text v-if="memberType == 0">采美·超级会员</text>
-						<text v-if="memberType == 1">已开通采美·超级会员</text>
-						<text v-if="memberType == 2">采美·超级会员已过期</text>
-					</view>
-					<view class="cm-member-p">
-						<text v-if="memberType == 0">享专属特权</text>
-						<text v-else>有效期至:2021-10-01</text>
-					</view>
-				</view>
-				<view class="cm-member-btn">
-					<view class="btn" @click="hanldPayUrl('/pages/user/member/member-renew')">续费</view>
-				</view>
-			</view>
-		</view>
-		<view class="cm-member-main">
-			<view class="title">超级会员套餐</view>
-			<view class="cm-member-pay">
-				<view class="pay-item" 
-					  v-for="(pay,index) in payList" 
-					  :key="index" 
-					  :class="{current: tabCurrent === index}" 
-					  @click="handleCheckedPay(index,pay)"
-				>
-					<view class="hot" v-if="index == 0">推荐</view>
-					<view class="text-1">{{ pay.month }}</view>
-					<view class="text-2"> <text>¥</text>{{ pay.money }}</view>
-					<view class="text-3">{{ pay.text }}</view>
-				</view>
-			</view>
-			<view class="cm-member-button">
-				<view class="pay-btn pay" @click="hanldPayUrl('/pages/user/member/member-pay')">立即支付{{ payAmount }}元开通</view>
-				<view class="pay-btn none">抵扣{{ payBeans }}个采美豆开通</view>
-			</view>
-		</view>
-		<view class="cm-member-main">
-			<view class="title">专属特权</view>
-			<view class="cm-member-privilege clearfix">
-				<view class="privilege-item" v-for="(priv,index) in privilegeList" :key="index">
-					<image class="image" :src="priv.icon" mode=""></image>
-					<view class="text-2">{{ priv.privText }}</view>
-					<view class="text-3">{{ priv.privName }}</view>
-				</view>
-			</view>
-		</view>
-		<view class="cm-member-main">
-			<view class="title">专属优惠券<text class="small">每月可领4个</text></view>
-			<view class="cm-member-coupon clearfix">
-				<view 	v-for="(coupon,index) in productCouponList"
-						:key="index" 
-						:id="coupon.couponId" 
-						class="coupon-list" 
-						:class="coupon.useStatus == 1 ? 'none' : ''"
-				>
-					<view class="list-cell-tags">{{ coupon.couponType | TypeFormat }}</view>
-					<view class="list-cell-le">
-						<view class="coupon-maxMoney"><text class="small">¥</text>{{ coupon.couponAmount }}</view>
-						<view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
-						<view class="coupon-texts">
-							<text v-if="coupon.couponType == 0">
-								{{ coupon.productType && coupon.productType == 1 ? '全商城商品通用' : '仅可购买指定商品'  }}
-							</text>
-							<text v-if="coupon.couponType == 1">
-								{{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
-							</text>
-							<text v-if="coupon.couponType == 3">仅限购买店铺【{{ coupon.shopName }}】的商品</text>
-							<text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
-						</view>
-					</view>
-					<view class="list-cell-ri">
-						<view class="icon-used-btn receive" v-if="coupon.useStatus == 0" @click="receiveCoupon(coupon)">立即领取</view>
-						<view class="icon-used-btn make" v-if="coupon.useStatus == 1">已领取</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="cm-member-main none">
-			<view class="title">
-				优惠商品
-				<view class="more" @click="hanldPayUrl('/pages/user/member/member-product')">更多<text class="iconfont icon-xiayibu"></text></view>
-			</view>
-			<view class="cm-member-product clearfix">
-				<view 	v-for="(pro,index) in productList"
-						:key="index" 
-						:id="pro.productId" 
-						class="product-list" 
-						@click="productDetail(pro.productId)"
-				>
-					<view class="product-image">
-						<image :src="pro.image" mode=""></image>
-					</view>
-					<view class="product-mains">
-						<view class="product-name">
-							{{ pro.name }}
-						</view>
-						<view class="product-tags">
-							<view class="floor-item-act">
-								<view class="coupon-tags">优惠券</view>
-								<template  v-if="pro.actStatus== 1">
-									<view class="floor-tags" v-if="PromotionsFormat(pro.promotions)">
-										{{pro.promotions.name}}
-										<text v-if="pro.priceFlag != 1">:¥{{ pro.price | NumFormat }}</text>
-									</view>
-									<view class="floor-tags" v-else>{{pro.promotions.name}}</view>	
-								</template>
-								<template v-else>
-									<view class="svip-tags" v-if='pro.proType == 0'>
-										<view class="tags none">SVIP</view>
-									</view>
-									<view class="svip-tags" v-if='pro.proType == 1'>
-										<view class="tags">SVIP</view>
-										<view class="price">{{ pro.discount }}</view>
-									</view>
-									<view class="svip-tags" v-if='pro.proType == 2'>
-										<view class="tags">SVIP</view>
-										<view class="price">¥{{ pro.discountPrice | NumFormat }}</view>
-									</view>
-								</template>
-								
-							</view>
-						</view>
-						<view class="product-price">
-							<view class="list-none" v-if="pro.priceFlag == 1">¥未公开价格</view>
-							<view class="list-none" v-else-if="pro.priceFlag == 2">¥价格仅会员可见</view>
-							<view class="list-none-price" v-else>¥{{ pro.price | NumFormat }}</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 透明模态层 -->
-		<modal-layer v-if='isModallayer'></modal-layer>
-	</view>
-</template>
-
-<script>
-	import { mapState,mapMutations} from 'vuex'
-	import modalLayer from '@/components/modal-layer'
-	export default {
-		components:{
-			modalLayer
-		},
-		data() {
-			return {
-				StaticUrl:this.$Static,
-				isModallayer:false,
-				memberType:0,
-				tabCurrent:0,
-				params:{
-					userId:0,
-					redemptionCode:'',
-					source:2,
-				},
-				payList:[
-					{month:'12个月',money:4800,type:1,text:'400元/月',beans:480000},
-					{month:'3个月',money:1500,type:2,text:'500元/月',beans:150000},
-					{month:'1个月',money:600,type:3,text:'',beans:60000},
-				],
-				payAmount:4800,
-				payBeans:480000,
-				privilegeList:[
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer1@2x.png',
-						privText:'优惠商品',
-						privName:'超级会员专享'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer2@2x.png',
-						privText:'专属优惠券',
-						privName:'超级会员专享'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer3@2x.png',
-						privText:'采美豆翻倍',
-						privName:'下单返采美豆'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer4@2x.png',
-						privText:'专属客服',
-						privName:'一对一'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer5@2x.png',
-						privText:'专属销售顾问',
-						privName:'一对一'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer6@2x.png',
-						privText:'快速发货',
-						privName:'会员加速'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer7@2x.png',
-						privText:'售后服务',
-						privName:'会员加速'
-					},
-					{
-						icon:'https://static.caimei365.com/app/img/icon/icon-member-prer8@2x.png',
-						privText:'敬请期待',
-						privName:'更多特权'
-					}
-				],
-				productCouponList:[
-					{
-						couponAmount:5000,
-						touchPrice:2000,
-						couponType:0,
-						productType:1,
-						categoryType:1,
-						shopName:null,
-						useStatus:0,
-					},
-					{
-						couponAmount:5000,
-						touchPrice:2000,
-						couponType:1,
-						productType:1,
-						categoryType:1,
-						shopName:null,
-						useStatus:0,
-					},
-					{
-						couponAmount:5000,
-						touchPrice:2000,
-						couponType:2,
-						productType:1,
-						categoryType:1,
-						shopName:null,
-						useStatus:1,
-					},
-					{
-						couponAmount:5000,
-						touchPrice:2000,
-						couponType:3,
-						productType:1,
-						categoryType:1,
-						shopName:null,
-						useStatus:1,
-					},
-				],
-				productList:[
-					{
-						image:'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-						name:'ET-SPACE全身热疗系统生物热能太空舱',
-						unit:'台',
-						ladderPriceFlag:0,
-						priceFlag:1,
-						originalPrice:100,
-						price:500,
-						actStatus:1,
-						promotions:null,
-						isChecked:false,
-						productIds:1000,
-						proType:1,
-						discount:'8.8折'
-					},
-					{
-						image:'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-						name:'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
-						unit:'台',
-						ladderPriceFlag:1,
-						priceFlag:2,
-						originalPrice:100,
-						price:500,
-						actStatus:1,
-						promotions:{
-							type:1,
-							mode:1,
-							name:'优惠价'
-						},
-						isChecked:false,
-						productIds:1001,
-						proType:2,
-						discountPrice:5000000,
-					},
-					{
-						image:'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-						name:'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
-						unit:'台',
-						ladderPriceFlag:1,
-						priceFlag:0,
-						originalPrice:100,
-						price:5000000,
-						actStatus:1,
-						promotions:{
-							type:0,
-							mode:0,
-							name:'单品满减'
-						},
-						isChecked:false,
-						productIds:1002,
-						proType:0,
-						discountPrice:5000000,
-					},
-					{
-						image:'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-						name:'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
-						unit:'台',
-						ladderPriceFlag:1,
-						priceFlag:0,
-						originalPrice:100,
-						price:50000000,
-						actStatus:1,
-						promotions:null,
-						isChecked:false,
-						productIds:1003,
-						proType:0,
-						discountPrice:50000,
-					}
-				]
-			}
-		},
-		onLoad() {
-			
-		},
-		filters: {
-			TypeFormat:function(value) {
-				switch (value) {
-					case 0:
-						return  '活动券'
-						break
-					case 1:
-						return  '品类券'
-						break
-					case 2:
-						return  '用户专享券'
-						break
-					case 3:
-						return  '店铺券'
-						break
-					case 4:
-						return  '新用户券'
-						break
-				}
-			},
-			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2)
-			}
-		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity','isActivity'])
-		},
-		methods: {
-			hanldPayUrl(url){
-				this.$api.navigateTo(url)
-			},
-			handleCheckedPay(index,pay){// 选择会员
-				this.tabCurrent = index
-				this.payAmount = pay.money
-				this.payBeans = pay.beans
-			},
-			PromotionsFormat(promo){//促销活动类型数据处理
-				if(promo!=null){
-					if(promo.type == 1 && promo.mode == 1){
-						return true
-					}else{
-						return false
-					}
-				}
-				return false
-			},
-			productDetail(productId) {
-				this.isModallayer = true
-				this.$api.navigateTo(`/pages/goods/product?id=${productId}`)
-				this.isModallayer = false
-			},
-		},
-		onPullDownRefresh() {
-			setTimeout(() => {
-				uni.stopPullDownRefresh()
-			}, 200)
-		},
-		onShow(){
-			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.params.userId = resolve.userId ? resolve.userId : 0
-			}).catch(error =>{
-				console.log('暂无用户信息~')
-			})
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background-color: #F7F7F7;
-	}
-	.container{
-		width: 100%;
-		height: auto;
-	}
-	.cm-member-top{
-		width: 100%;
-		height: 242rpx;
-		box-sizing: border-box;
-		padding: 0 24rpx;
-		background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
-		background-size: cover;
-		position: relative;
-		.cm-member-cel{
-			float: right;
-			line-height: 40rpx;
-			font-size: $font-size-26;
-			margin-top: 40rpx;
-			color: #F0CB72;
-			text-align: right;
-		}
-		.cm-member-head{
-			width: 702rpx;
-			height: 132rpx;
-			box-sizing: border-box;
-			padding: 30rpx 32rpx 0 109rpx;
-			background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
-			background-size: cover;
-			position: absolute;
-			bottom: 0;
-			left: 24rpx;
-			border-radius: 16rpx 16rpx 0 0;
-			.cm-member-text{
-				float: left;
-				.cm-member-h1{
-					line-height: 42rpx;
-					font-size: $font-size-30;
-					color: #55331D;
-					text-align: left;
-					margin-bottom: 12rpx;
-					font-weight: bold;
-				}
-				.cm-member-p{
-					line-height: 30rpx;
-					font-size: $font-size-22;
-					color: #55331D;
-					text-align: left;
-				}
-			}
-			.cm-member-btn{
-				float: right;
-				padding-top: 12rpx;
-				.btn{
-					width: 118rpx;
-					height: 48rpx;
-					background: linear-gradient(270deg, #585658 0%, #323031 100%);
-					border-radius: 24rpx;
-					line-height: 48rpx;
-					text-align: center;
-					font-size: $font-size-24;
-					color: #F0CB72;
-				}
-			}
-		}
-	}
-	.cm-member-main{
-		width: 100%;
-		box-sizing: border-box;
-		padding: 40rpx 24rpx;
-		background-color: #FFFFFF;
-		margin-bottom: 20rpx;
-		&.none{
-			background-color: #F7F7F7;
-			padding: 20rpx 24rpx 0 24rpx;
-		}
-		.title{
-			font-size: $font-size-32;
-			line-height: 45rpx;
-			text-align: left;
-			color:#55331D;
-			font-weight: bold;
-			.small{
-				font-size: $font-size-24;
-				color: #E4AA43;
-				font-weight: normal;
-				margin-left: 15rpx;
-			}
-			.more{
-				float: right;
-				font-weight: normal;
-				line-height: 45rpx;
-				font-size: $font-size-26;
-				color: #999999;
-				.iconfont{
-					margin-left: 10rpx;
-				}
-			}
-		}
-		.cm-member-pay{
-			width: 100%;
-			height:236rpx;
-			margin: 40rpx 0;
-			.pay-item{
-				width: 218rpx;
-				height: 100%;
-				float: left;
-				margin-right: 24rpx;
-				border: 1px solid #F0F0F0;
-				border-radius: 16rpx;
-				box-sizing: border-box;
-				text-align: center;
-				padding: 40rpx 0;
-				position: relative;
-				.hot{
-					width: 80rpx;
-					height: 36rpx;
-					text-align: center;
-					line-height: 36rpx;
-					font-size: $font-size-24;
-					color: #FFFFFF;
-					background-color: #FF2A2A;
-					border-radius: 0 8rpx 8rpx 8rpx;
-					position: absolute;
-					left: 0;
-					top: -10rpx;
-				}
-				&.current{
-					background-color: #FDF8EE;
-					border: 1px solid #F0CC8C;
-				}
-				&:last-child{
-					margin-right: 0;
-				}
-				.text-1{
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					margin-bottom: 10rpx;
-					color: #55331D;
-				}
-				.text-2{
-					line-height: 59rpx;
-					font-size: $font-size-40;
-					margin-bottom: 10rpx;
-					color: #FF2A2A;
-					font-weight: bold;
-					text{
-						font-size: $font-size-26;
-					}
-				}
-				.text-3{
-					line-height: 33rpx;
-					font-size: $font-size-24;
-					color: #666666;
-				}
-				
-			}
-		}
-		.cm-member-button{
-			width: 100%;
-			box-sizing: border-box;
-			padding: 0 51rpx;
-			.pay-btn{
-				width: 100%;
-				height: 90rpx;
-				line-height: 90rpx;
-				border-radius: 50rpx;
-				text-align: center;
-				font-size: $font-size-30;
-				color: #55331D;
-				box-sizing: border-box;
-				margin-bottom: $font-size-24;
-				&.pay{
-					background: linear-gradient(90deg, #FEE9BA 0%, #F0CB72 100%);
-					font-weight: bold;
-				}
-				&.none{
-					border: 1px solid #F0CB72;
-					margin-bottom: 0;
-				}
-			}
-		}
-		.cm-member-privilege{
-			width: 100%;
-			margin: 24rpx 0 16rpx 0;
-			background-color: #FFFFFF;
-			.privilege-item{
-				width: 25%;
-				height: 196rpx;
-				margin: 16rpx 0;
-				float: left;
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				.image{
-					width: 90rpx;
-					height: 90rpx;
-					display: block;
-				}
-				.text-2{
-					font-size: $font-size-26;
-					color: #333333;
-					line-height: 36rpx;
-					margin-top: 12rpx;
-				}
-				.text-3{
-					font-size: $font-size-22;
-					color: #999999;
-					line-height: 30rpx;
-					margin-top: 6rpx;
-				}
-			}
-		}
-		.cm-member-coupon{
-			width: 100%;
			margin: 24rpx 0 0 0;
-			.coupon-list{
-				width: 338rpx;
-				height: 148rpx;
-				border-radius: 8rpx;
-				margin-bottom: 24rpx;
-				box-sizing: border-box;
-				background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon@2x.png);
-				background-size: cover;
-				margin-right: 24rpx;
-				float: left;
-				position: relative;
-				&:nth-child(2n){
-					margin-right: 0;
-				}
-				&.none{
-					background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon-none@2x.png);
-					background-size: cover;
-				}
-				.list-cell-tags{
-					display: inline-block;
-					padding: 0 10rpx;
-					height: 27rpx;
-					line-height: 27rpx;
-					background-color: #E4AA43;
-					color: #55331D;
-					font-size: $font-size-20;
-					border-radius: 8rpx 0 8rpx 0;
-					text-align: center;
-					position: absolute;
-					top: 0;
-					left: 0;
-				}
-				.list-cell-le{
-					width: 258rpx;
-					height: 100%;
-					box-sizing: border-box;
-					padding: 27rpx 24rpx 0 26rpx;
-					float: left;
-					.coupon-maxMoney{
-						width: 100%;
-						height: 50rpx;
-						line-height: 50rpx;
-						font-size: 40rpx;
-						color: #55331D;
-						text-align: left;
-						.small{
-							font-size: $font-size-24;
-						}
-					}
-					.coupon-minMoney{
-						width: 100%;
-						height: 30rpx;
-						line-height: 30rpx;
-						font-size: $font-size-24;
-						color: #55331D;
-						text-align: left;
-					}
-					.coupon-texts{
-						width: 100%;
-						height: 30rpx;
-						line-height: 30rpx;
-						font-size: $font-size-24;
-						color: #55331D;
-						text-align: left;
-						-o-text-overflow: ellipsis;
-						text-overflow: ellipsis;
-						display: -webkit-box;
-						word-break: break-all;
-						-webkit-box-orient: vertical;
-						-webkit-line-clamp: 1;
-						overflow: hidden;
-					}
-				}
-				.list-cell-ri{
-					width: 80rpx;
-					height: 100%;
-					float: right;
-					.icon-used-btn{
-						width: 100%;
-						height: 100%;
-						box-sizing: border-box;
-						font-size: $font-size-22;
-						text-align: center;
-						&.receive{
-							color: #55331D;
-							padding: 15rpx 28rpx;
-						}
-						&.make{
-							padding: 30rpx 28rpx;
-							color: #FFFFFF;
-						}
-					}
-				}
-			}
-		}
-		.cm-member-product{
-			width: 100%;
-			margin-top: 16rpx;
-			.product-list{
-				width: 339rpx;
-				height: 516rpx;
-				border-radius: 16rpx;
-				float: left;
-				margin-right: 24rpx;
-				margin-bottom: 24rpx;
-				background-color: #FFFFFF;
-				&:nth-child(2n){
-					margin-right: 0;
-				}
-				.product-image{
-					width: 339rpx;
-					height: 339rpx;
-					image{
-						width: 339rpx;
-						height: 339rpx;
-						display: block;
-						border-radius: 16rpx 16rpx 0 0;
-					}
-				}
-				.product-mains{
-					width: 100%;
-					height: auto;
-					box-sizing: border-box;
-					padding: 0 24rpx;
-					margin-top: 8rpx;
-					.product-name{
-						line-height: 36rpx;
-						text-overflow: ellipsis;
-						overflow: hidden;
-						display: -webkit-box;
-						-webkit-line-clamp: 2;
-						line-clamp: 2;
-						-webkit-box-orient: vertical;
-						font-size: $font-size-26;
-						color: #333333;
-						text-align: justify;
-					}
-					.product-tags{
-						width: 100%;
-						height: 32rpx;
-						margin-top: 6rpx;
-						.floor-item-act{
-							width: 100%;
-							height: 32rpx;
-							text-align: center;
-							box-sizing: border-box;
-							float: left;
-						}
-					}
-					.product-price{
-						width: 100%;
-						line-height: 37rpx;
-						font-size: $font-size-26;
-						color: #F94B4B;
-						margin-top: 8rpx;
-						.list-none-price{
-							text-decoration: line-through;
-							color: #999999;
-						}
-					}
-				}
-			}
-		}
-	}
-</style>
+<template>
+	<view class="container clearfix">
+		<view class="cm-member-top">
+			<view
+				class="cm-member-cel"
+				v-if="userVip.vipFlag == 1 || userVip.vipFlag == -1"
+				@click="hanldPayUrl('/pages/user/member/member-record')"
+				>购买记录</view
+			>
+			<view class="cm-member-head">
+				<view class="cm-member-text" v-if="isRequest">
+					<view class="cm-member-h1">
+						<text v-if="userVip.vipFlag == 0">采美·超级会员</text>
+						<text v-if="userVip.vipFlag == 1">已开通采美·超级会员</text>
+						<text v-if="userVip.vipFlag == -1">采美·超级会员已过期</text>
+					</view>
+					<view class="cm-member-p">
+						<text v-if="userVip.vipFlag == 0">享专属特权</text>
+						<text v-else>有效期至:{{ userVip.endTime }}</text>
+					</view>
+				</view>
+				<view class="cm-member-btn" v-if="userVip.vipFlag == 1 || userVip.vipFlag == -1">
+					<view class="btn" @click="hanldPayUrl('/pages/user/member/member-renew')">续费</view>
+				</view>
+			</view>
+		</view>
+		<view class="cm-member-main" v-if="userVip.vipFlag == 0 || userVip.vipFlag == -1">
+			<view class="title">超级会员套餐</view>
+			<view class="cm-member-pay">
+				<view
+					class="pay-item"
+					v-for="(pay, index) in payList"
+					:key="index"
+					:class="{ current: tabCurrent === index }"
+					@click="handleCheckedPay(index, pay)"
+				>
+					<view class="hot" v-if="index == 0">推荐</view> <view class="text-1">{{ pay.month }}</view>
+					<view class="text-2"> <text>¥</text>{{ pay.money }}</view>
+					<view class="text-3">{{ pay.text }}</view>
+				</view>
+			</view>
+			<view class="cm-member-button">
+				<view class="pay-btn pay" @click="hanldWechatPay">立即支付{{ handelPayMsg.money }}元开通</view>
+				<view class="pay-btn none" @click="hanldeShowBeans">抵扣{{ handelPayMsg.beans }}个采美豆开通</view>
+			</view>
+		</view>
+		<view class="cm-member-main">
+			<view class="title">专属特权</view>
+			<view class="cm-member-privilege clearfix">
+				<view class="privilege-item" v-for="(priv, index) in privilegeList" :key="index">
+					<image class="image" :src="priv.icon" mode=""></image>
+					<view class="text-2">{{ priv.privText }}</view> <view class="text-3">{{ priv.privName }}</view>
+				</view>
+			</view>
+		</view>
+		<view class="cm-member-main">
+			<view class="title">专属优惠券<text class="small">每月可领4个</text></view>
+			<view class="cm-member-coupon clearfix">
+				<view
+					v-for="(coupon, index) in productCouponList"
+					:key="index"
+					:id="coupon.couponId"
+					class="coupon-list"
+					:class="coupon.useStatus == 1 ? 'none' : ''"
+				>
+					<view class="list-cell-tags">{{ coupon.couponType | TypeFormat }}</view>
+					<view class="list-cell-le">
+						<view class="coupon-maxMoney"><text class="small">¥</text>{{ coupon.couponAmount }}</view>
+						<view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
+						<view class="coupon-texts">
+							<text v-if="coupon.couponType == 0">
+								{{
+									coupon.productType && coupon.productType == 1
+										? '全商城商品通用'
+										: '仅可购买指定商品'
+								}}
+							</text>
+							<text v-if="coupon.couponType == 1">
+								{{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
+							</text>
+							<text v-if="coupon.couponType == 3">仅限购买店铺【{{ coupon.shopName }}】的商品</text>
+							<text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
+						</view>
+					</view>
+					<view class="list-cell-ri">
+						<view class="icon-used-btn receive" v-if="coupon.useStatus == 0" @click="receiveCoupon(coupon)"
+							>立即领取</view
+						>
+						<view class="icon-used-btn make" v-if="coupon.useStatus == 1">已领取</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="cm-member-main none">
+			<view class="title">
+				优惠商品
+				<view class="more" @click="hanldPayUrl('/pages/user/member/member-product')"
+					>更多<text class="iconfont icon-xiayibu"></text
+				></view>
+			</view>
+			<view class="cm-member-product clearfix">
+				<view
+					v-for="(pro, index) in productList"
+					:key="index"
+					:id="pro.productId"
+					class="product-list"
+					@click="productDetail(pro.productId)"
+				>
+					<view class="product-image"> <image :src="pro.image" mode=""></image> </view>
+					<view class="product-mains">
+						<view class="product-name"> {{ pro.name }} </view>
+						<view class="product-tags">
+							<view class="floor-item-act">
+								<view class="coupon-tags">优惠券</view>
+								<template v-if="pro.actStatus == 1">
+									<view class="floor-tags" v-if="PromotionsFormat(pro.promotions)">
+										{{ pro.promotions.name }}
+										<text v-if="pro.priceFlag != 1">:¥{{ pro.price | NumFormat }}</text>
+									</view>
+									<view class="floor-tags" v-else>{{ pro.promotions.name }}</view>
+								</template>
+								<template v-else>
+									<view class="svip-tags" v-if="pro.proType == 0">
+										<view class="tags none">SVIP</view>
+									</view>
+									<view class="svip-tags" v-if="pro.proType == 1">
+										<view class="tags">SVIP</view> <view class="price">{{ pro.discount }}</view>
+									</view>
+									<view class="svip-tags" v-if="pro.proType == 2">
+										<view class="tags">SVIP</view>
+										<view class="price">¥{{ pro.discountPrice | NumFormat }}</view>
+									</view>
+								</template>
+							</view>
+						</view>
+						<view class="product-price">
+							<view class="list-none" v-if="pro.priceFlag == 1">¥未公开价格</view>
+							<view class="list-none" v-else-if="pro.priceFlag == 2">¥价格仅会员可见</view>
+							<view class="list-none-price" v-else>¥{{ pro.price | NumFormat }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 透明模态层 -->
+		<modal-layer v-if="isModallayer"></modal-layer>
+		<!-- 弹窗 -->
+		<template>
+			<view class="cm-model-alert" v-if="isShowBeansModal">
+				<view class="content">
+					<view class="title">
+						<text>购买超级会员</text>
+						<text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
+					</view>
+					<view class="text-content">
+						<view class="text"
+							>确定使用<text class="text-p">{{ handelPayMsg.beans }}</text
+							>个采美豆抵扣{{ handelPayMsg.month }}的采美超级会员吗?</view
+						>
+					</view>
+					<view class="text-button">
+						<view class="btn btn-cancel" @click="handelCanelBeans">取消</view>
+						<view class="btn btn-confirm" @click="handelConfirmBeans">确定</view>
+					</view>
+				</view>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+import modalLayer from '@/components/modal-layer'
+export default {
+	components: {
+		modalLayer
+	},
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			isRequest:false,
+			isModallayer: false,
+			isShowBeansModal: false,
+			memberType: 0,
+			tabCurrent: 0,
+			userVip: {},
+			handelPayMsg: {
+				beans: 480000,
+				money: 4800,
+				month: '12个月',
+				packageId: 1
+			},
+			userIdentity: 0,
+			payParam: {
+				userId: 0,
+				packageId: 1
+			},
+			payList: [
+				{ month: '12个月', money: 4800, packageId: 1, text: '400元/月', beans: 480000 },
+				{ month: '3个月', money: 1500, packageId: 2, text: '500元/月', beans: 150000 },
+				{ month: '1个月', money: 600, packageId: 3, text: '', beans: 60000 }
+			],
+			privilegeList: [
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer1@2x.png',
+					privText: '优惠商品',
+					privName: '超级会员专享'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer2@2x.png',
+					privText: '专属优惠券',
+					privName: '超级会员专享'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer3@2x.png',
+					privText: '采美豆翻倍',
+					privName: '下单返采美豆'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer4@2x.png',
+					privText: '专属客服',
+					privName: '一对一'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer5@2x.png',
+					privText: '专属销售顾问',
+					privName: '一对一'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer6@2x.png',
+					privText: '快速发货',
+					privName: '会员加速'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer7@2x.png',
+					privText: '售后服务',
+					privName: '会员加速'
+				},
+				{
+					icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer8@2x.png',
+					privText: '敬请期待',
+					privName: '更多特权'
+				}
+			],
+			productCouponList: [
+				{
+					couponAmount: 5000,
+					touchPrice: 2000,
+					couponType: 0,
+					productType: 1,
+					categoryType: 1,
+					shopName: null,
+					useStatus: 0
+				},
+				{
+					couponAmount: 5000,
+					touchPrice: 2000,
+					couponType: 1,
+					productType: 1,
+					categoryType: 1,
+					shopName: null,
+					useStatus: 0
+				},
+				{
+					couponAmount: 5000,
+					touchPrice: 2000,
+					couponType: 2,
+					productType: 1,
+					categoryType: 1,
+					shopName: null,
+					useStatus: 1
+				},
+				{
+					couponAmount: 5000,
+					touchPrice: 2000,
+					couponType: 3,
+					productType: 1,
+					categoryType: 1,
+					shopName: null,
+					useStatus: 1
+				}
+			],
+			productList: [
+				{
+					image: 'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
+					name: 'ET-SPACE全身热疗系统生物热能太空舱',
+					unit: '台',
+					ladderPriceFlag: 0,
+					priceFlag: 1,
+					originalPrice: 100,
+					price: 500,
+					actStatus: 1,
+					promotions: null,
+					isChecked: false,
+					productIds: 1000,
+					proType: 1,
+					discount: '8.8折'
+				},
+				{
+					image: 'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
+					name: 'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
+					unit: '台',
+					ladderPriceFlag: 1,
+					priceFlag: 2,
+					originalPrice: 100,
+					price: 500,
+					actStatus: 1,
+					promotions: {
+						type: 1,
+						mode: 1,
+						name: '优惠价'
+					},
+					isChecked: false,
+					productIds: 1001,
+					proType: 2,
+					discountPrice: 5000000
+				},
+				{
+					image: 'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
+					name: 'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
+					unit: '台',
+					ladderPriceFlag: 1,
+					priceFlag: 0,
+					originalPrice: 100,
+					price: 5000000,
+					actStatus: 1,
+					promotions: {
+						type: 0,
+						mode: 0,
+						name: '单品满减'
+					},
+					isChecked: false,
+					productIds: 1002,
+					proType: 0,
+					discountPrice: 5000000
+				},
+				{
+					image: 'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
+					name: 'ET-SPACE全身热疗系统全身热疗系统生物热能太空舱',
+					unit: '台',
+					ladderPriceFlag: 1,
+					priceFlag: 0,
+					originalPrice: 100,
+					price: 50000000,
+					actStatus: 1,
+					promotions: null,
+					isChecked: false,
+					productIds: 1003,
+					proType: 0,
+					discountPrice: 50000
+				}
+			]
+		}
+	},
+	onLoad() {},
+	filters: {
+		TypeFormat: function(value) {
+			switch (value) {
+				case 0:
+					return '活动券'
+					break
+				case 1:
+					return '品类券'
+					break
+				case 2:
+					return '用户专享券'
+					break
+				case 3:
+					return '店铺券'
+					break
+				case 4:
+					return '新用户券'
+					break
+			}
+		},
+		NumFormat: function(text) {
+			//处理金额
+			return Number(text).toFixed(2)
+		}
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity', 'isActivity'])
+	},
+	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.payParam.userId = userInfo.userId ? userInfo.userId : 0
+			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.getUserSuperCenter()
+		},
+		getUserSuperCenter() {
+			// 获取会员中心数据
+			this.UserService.getUserSuperCenter({ userId: this.payParam.userId })
+				.then(response => {
+					let data = response.data
+					this.userVip = data.vip
+					this.isRequest = true
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hanldeShowBeans() {
+			// 显示采美豆抵扣开通超级会员弹窗
+			this.isShowBeansModal = true
+		},
+		handelCanelBeans() {
+			// 取消采美豆抵扣超级会员
+			this.isShowBeansModal = false
+		},
+		handelConfirmBeans() {
+			// 确认采美豆抵扣开通超级会员
+			this.PayService.getUserRegisterSuperBeans(this.payParam)
+				.then(response => {
+					this.isShowBeansModal = false
+					this.$util.msg('开通成功', 2000, true, 'success')
+					this.getUserSuperCenter()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hanldWechatPay() {
+			// 跳转微信只开通超级会员
+			this.$api.navigateTo(`/pages/user/member/member-pay?data=${JSON.stringify(this.handelPayMsg)}`)
+		},
+		handleCheckedPay(index, pay) {
+			// 选择会员
+			this.tabCurrent = index
+			this.payParam.packageId = pay.packageId
+			this.handelPayMsg = pay
+		},
+		hanldPayUrl(url) {
+			// 跳转
+			this.$api.navigateTo(url)
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
+				}
+			}
+			return false
+		},
+		productDetail(productId) {
+			this.isModallayer = true
+			this.$api.navigateTo(`/pages/goods/product?id=${productId}`)
+			this.isModallayer = false
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShow() {
+		this.initGetStotage()
+	}
+}
+</script>
+
+<style lang="scss">
+page {
+	background-color: #f7f7f7;
+}
+.container {
+	width: 100%;
+	height: auto;
+}
+.cm-member-top {
+	width: 100%;
+	height: 242rpx;
+	box-sizing: border-box;
+	padding: 0 24rpx;
+	background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
+	background-size: cover;
+	position: relative;
+	.cm-member-cel {
+		float: right;
+		line-height: 40rpx;
+		font-size: $font-size-26;
+		margin-top: 40rpx;
+		color: #f0cb72;
+		text-align: right;
+	}
+	.cm-member-head {
+		width: 702rpx;
+		height: 132rpx;
+		box-sizing: border-box;
+		padding: 30rpx 32rpx 0 109rpx;
+		background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
+		background-size: cover;
+		position: absolute;
+		bottom: 0;
+		left: 24rpx;
+		border-radius: 16rpx 16rpx 0 0;
+		.cm-member-text {
+			float: left;
+			.cm-member-h1 {
+				line-height: 42rpx;
+				font-size: $font-size-30;
+				color: #55331d;
+				text-align: left;
+				margin-bottom: 12rpx;
+				font-weight: bold;
+			}
+			.cm-member-p {
+				line-height: 30rpx;
+				font-size: $font-size-22;
+				color: #55331d;
+				text-align: left;
+			}
+		}
+		.cm-member-btn {
+			float: right;
+			padding-top: 12rpx;
+			.btn {
+				width: 118rpx;
+				height: 48rpx;
+				background: linear-gradient(270deg, #585658 0%, #323031 100%);
+				border-radius: 24rpx;
+				line-height: 48rpx;
+				text-align: center;
+				font-size: $font-size-24;
+				color: #f0cb72;
+			}
+		}
+	}
+}
+.cm-member-main {
+	width: 100%;
+	box-sizing: border-box;
+	padding: 40rpx 24rpx;
+	background-color: #ffffff;
+	margin-bottom: 20rpx;
+	&.none {
+		background-color: #f7f7f7;
+		padding: 20rpx 24rpx 0 24rpx;
+	}
+	.title {
+		font-size: $font-size-32;
+		line-height: 45rpx;
+		text-align: left;
+		color: #55331d;
+		font-weight: bold;
+		.small {
+			font-size: $font-size-24;
+			color: #e4aa43;
+			font-weight: normal;
+			margin-left: 15rpx;
+		}
+		.more {
+			float: right;
+			font-weight: normal;
+			line-height: 45rpx;
+			font-size: $font-size-26;
+			color: #999999;
+			.iconfont {
+				margin-left: 10rpx;
+			}
+		}
+	}
+	.cm-member-pay {
+		width: 100%;
+		height: 236rpx;
+		margin: 40rpx 0;
+		.pay-item {
+			width: 218rpx;
+			height: 100%;
+			float: left;
+			margin-right: 24rpx;
+			border: 1px solid #f0f0f0;
+			border-radius: 16rpx;
+			box-sizing: border-box;
+			text-align: center;
+			padding: 40rpx 0;
+			position: relative;
+			.hot {
+				width: 80rpx;
+				height: 36rpx;
+				text-align: center;
+				line-height: 36rpx;
+				font-size: $font-size-24;
+				color: #ffffff;
+				background-color: #ff2a2a;
+				border-radius: 0 8rpx 8rpx 8rpx;
+				position: absolute;
+				left: 0;
+				top: -10rpx;
+			}
+			&.current {
+				background-color: #fdf8ee;
+				border: 1px solid #f0cc8c;
+			}
+			&:last-child {
+				margin-right: 0;
+			}
+			.text-1 {
+				line-height: 40rpx;
+				font-size: $font-size-28;
+				margin-bottom: 10rpx;
+				color: #55331d;
+			}
+			.text-2 {
+				line-height: 59rpx;
+				font-size: $font-size-40;
+				margin-bottom: 10rpx;
+				color: #ff2a2a;
+				font-weight: bold;
+				text {
+					font-size: $font-size-26;
+				}
+			}
+			.text-3 {
+				line-height: 33rpx;
+				font-size: $font-size-24;
+				color: #666666;
+			}
+		}
+	}
+	.cm-member-button {
+		width: 100%;
+		box-sizing: border-box;
+		padding: 0 51rpx;
+		.pay-btn {
+			width: 100%;
+			height: 90rpx;
+			line-height: 90rpx;
+			border-radius: 50rpx;
+			text-align: center;
+			font-size: $font-size-30;
+			color: #55331d;
+			box-sizing: border-box;
+			margin-bottom: $font-size-24;
+			&.pay {
+				background: linear-gradient(90deg, #fee9ba 0%, #f0cb72 100%);
+				font-weight: bold;
+			}
+			&.none {
+				border: 1px solid #f0cb72;
+				margin-bottom: 0;
+			}
+		}
+	}
+	.cm-member-privilege {
+		width: 100%;
+		margin: 24rpx 0 16rpx 0;
+		background-color: #ffffff;
+		.privilege-item {
+			width: 25%;
+			height: 196rpx;
+			margin: 16rpx 0;
+			float: left;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			.image {
+				width: 90rpx;
+				height: 90rpx;
+				display: block;
+			}
+			.text-2 {
+				font-size: $font-size-26;
+				color: #333333;
+				line-height: 36rpx;
+				margin-top: 12rpx;
+			}
+			.text-3 {
+				font-size: $font-size-22;
+				color: #999999;
+				line-height: 30rpx;
+				margin-top: 6rpx;
+			}
+		}
+	}
+	.cm-member-coupon {
+		width: 100%;
+		margin: 24rpx 0 0 0;
+		.coupon-list {
+			width: 338rpx;
+			height: 148rpx;
+			border-radius: 8rpx;
+			margin-bottom: 24rpx;
+			box-sizing: border-box;
+			background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon@2x.png);
+			background-size: cover;
+			margin-right: 24rpx;
+			float: left;
+			position: relative;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			&.none {
+				background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon-none@2x.png);
+				background-size: cover;
+			}
+			.list-cell-tags {
+				display: inline-block;
+				padding: 0 10rpx;
+				height: 27rpx;
+				line-height: 27rpx;
+				background-color: #e4aa43;
+				color: #55331d;
+				font-size: $font-size-20;
+				border-radius: 8rpx 0 8rpx 0;
+				text-align: center;
+				position: absolute;
+				top: 0;
+				left: 0;
+			}
+			.list-cell-le {
+				width: 258rpx;
+				height: 100%;
+				box-sizing: border-box;
+				padding: 27rpx 24rpx 0 26rpx;
+				float: left;
+				.coupon-maxMoney {
+					width: 100%;
+					height: 50rpx;
+					line-height: 50rpx;
+					font-size: 40rpx;
+					color: #55331d;
+					text-align: left;
+					.small {
+						font-size: $font-size-24;
+					}
+				}
+				.coupon-minMoney {
+					width: 100%;
+					height: 30rpx;
+					line-height: 30rpx;
+					font-size: $font-size-24;
+					color: #55331d;
+					text-align: left;
+				}
+				.coupon-texts {
+					width: 100%;
+					height: 30rpx;
+					line-height: 30rpx;
+					font-size: $font-size-24;
+					color: #55331d;
+					text-align: left;
+					-o-text-overflow: ellipsis;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 1;
+					overflow: hidden;
+				}
+			}
+			.list-cell-ri {
+				width: 80rpx;
+				height: 100%;
+				float: right;
+				.icon-used-btn {
+					width: 100%;
+					height: 100%;
+					box-sizing: border-box;
+					font-size: $font-size-22;
+					text-align: center;
+					&.receive {
+						color: #55331d;
+						padding: 15rpx 28rpx;
+					}
+					&.make {
+						padding: 30rpx 28rpx;
+						color: #ffffff;
+					}
+				}
+			}
+		}
+	}
+	.cm-member-product {
+		width: 100%;
+		margin-top: 16rpx;
+		.product-list {
+			width: 339rpx;
+			height: 516rpx;
+			border-radius: 16rpx;
+			float: left;
+			margin-right: 24rpx;
+			margin-bottom: 24rpx;
+			background-color: #ffffff;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.product-image {
+				width: 339rpx;
+				height: 339rpx;
+				image {
+					width: 339rpx;
+					height: 339rpx;
+					display: block;
+					border-radius: 16rpx 16rpx 0 0;
+				}
+			}
+			.product-mains {
+				width: 100%;
+				height: auto;
+				box-sizing: border-box;
+				padding: 0 24rpx;
+				margin-top: 8rpx;
+				.product-name {
+					line-height: 36rpx;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					line-clamp: 2;
+					-webkit-box-orient: vertical;
+					font-size: $font-size-26;
+					color: #333333;
+					text-align: justify;
+				}
+				.product-tags {
+					width: 100%;
+					height: 32rpx;
+					margin-top: 6rpx;
+					.floor-item-act {
+						width: 100%;
+						height: 32rpx;
+						text-align: center;
+						box-sizing: border-box;
+						float: left;
+					}
+				}
+				.product-price {
+					width: 100%;
+					line-height: 37rpx;
+					font-size: $font-size-26;
+					color: #f94b4b;
+					margin-top: 8rpx;
+					.list-none-price {
+						text-decoration: line-through;
+						color: #999999;
+					}
+				}
+			}
+		}
+	}
+}
+.cm-model-alert {
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 0, 0, 0.5);
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 8888;
+	transition: all 0.4s;
+	.content {
+		width: 580rpx;
+		height: 390rpx;
+		position: absolute;
+		background: $bg-color;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		top: 0;
+		margin: auto;
+		padding: 20rpx 32rpx;
+		border-radius: 12rpx;
+		.title {
+			width: 100%;
+			height: 68rpx;
+			line-height: 68rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			text-align: center;
+			position: relative;
+			.icon-iconfontguanbi {
+				width: 68rpx;
+				height: 68rpx;
+				text-align: center;
+				line-height: 68rpx;
+				position: absolute;
+				right: 0;
+				top: 0;
+				font-size: $font-size-36;
+				color: #999999;
+			}
+		}
+		.text-content {
+			width: 100%;
+			height: auto;
+			margin-top: 20px;
+			.text {
+				padding: 20rpx 0 0 0;
+				line-height: 44rpx;
+				font-size: $font-size-26;
+				color: #666666;
+				text-align: justify;
+				.text-p {
+					color: #e15616;
+				}
+			}
+		}
+		.text-button {
+			width: 100%;
+			height: 72rpx;
+			display: flex;
+			box-sizing: border-box;
+			padding: 0 50rpx;
+			margin-top: 30px;
+			.btn {
+				width: 200rpx;
+				height: 72rpx;
+				line-height: 72rpx;
+				color: #fff;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: $font-size-26;
+				border-radius: 44rpx;
+				box-sizing: border-box;
+				&.btn-confirm {
+					background: $btn-confirm;
+					margin-left: 78rpx;
+				}
+				&.btn-cancel {
+					border: 1px solid #b2b2b2;
+					color: #333333;
+				}
+			}
+		}
+	}
+}
+</style>

+ 74 - 48
services/pay.service.js

@@ -2,29 +2,29 @@
  * 这是支付相关的业务逻辑的服务
  */
 export default class PayService {
-	constructor(AjaxService) {
-		Object.assign(this, { AjaxService })
-		this.name = 'PayService'
-	}
-	/* 小程序支付-查询线上支付开关状态 */
-	PayOrderOnLineSwitch (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/pay/online/switch', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/* 小程序支付-初始化收银台 */
-	PayOrderCheckoutCounter (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/pay/checkout/counter', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    constructor(AjaxService) {
+        Object.assign(this, { AjaxService })
+        this.name = 'PayService'
+    }
+    /* 小程序支付-查询线上支付开关状态 */
+    PayOrderOnLineSwitch (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/pay/online/switch', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /* 小程序支付-初始化收银台 */
+    PayOrderCheckoutCounter (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/pay/checkout/counter', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *小程序支付-微信支付
 	 *@param  amount支付金额,单位分,必须大于2
 	 *@param  payWay银联:UNIONPAY,微信:WEIXIN,支付宝:ALIPAY
@@ -32,36 +32,62 @@ export default class PayService {
 	 *@param  code  微信小程序code,微信小程序支付使用
 	 *@param  orderId  主订单ID
 	 */
-	WeChatMiniWxPay (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/pay/wechat', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    WeChatMiniWxPay (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/pay/wechat', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *生成支付链接
 	 *@param  unpaidAmount 本次待付款金额
 	 *@param  orderId  主订单ID
 	 */
-	PayOrderPayLink (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/pay/link', 
-			data, isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    PayOrderPayLink (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/pay/link', 
+            data, isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *@param 二手发布支付
 	 *@param  orderId  主订单ID
 	 */
-	SecondHandPay (data = {}) {
-		return this.AjaxService.post({
-			url:'/order/pay/second/wechat', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	} 
+    SecondHandPay (data = {}) {
+        return this.AjaxService.post({
+            url:'/order/pay/second/wechat', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    } 
+    /**
+	 *@param 采美豆抵扣开通超级会员
+	 *@param  orderId  主订单ID
+	 */
+    getUserRegisterSuperBeans (data = {}) {
+        return this.AjaxService.get({
+            url:'/user/register/super/beans', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    } 
+    /**
+	 *@param 微信支付开通超级会员
+	 *@param  vipId  套餐ID
+	 *@param  userId 用户D
+	 *@param  code  wechatCode
+	 */
+    PayOrderVipWechat (data = {}) {
+        return this.AjaxService.post({
+            url:'/order/pay/vip/wechat', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    } 
 }

+ 12 - 0
services/user.service.js

@@ -397,5 +397,17 @@ export default class UserService {
             isHost:true
         })
     }
+    /**
+	 *@会员中心
+	 *@param userId	用户Id
+	 */
+    getUserSuperCenter (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/user/super/center', 
+            data, 
+            isLoading: true,
+            isHost:true
+        })
+    }
 	
 }