喻文俊 il y a 3 ans
Parent
commit
e50232645f
28 fichiers modifiés avec 441 ajouts et 151 suppressions
  1. 41 0
      src/main/resources/static/js/common/serviceapi/pay.service.js
  2. 12 0
      src/main/resources/static/js/common/serviceapi/user.service.js
  3. 4 0
      src/main/resources/static/js/index.js
  4. 59 10
      src/main/resources/static/js/pay/caimei-pay.js
  5. 135 43
      src/main/resources/static/js/pay/caimei-paycash.js
  6. 22 7
      src/main/resources/static/js/pay/caimei-paymobile.js
  7. 23 11
      src/main/resources/static/js/pay/caimei-success.js
  8. 52 18
      src/main/resources/static/js/pay/caimei-wechatpay.js
  9. 4 0
      src/main/resources/static/js/product/detail.js
  10. 5 0
      src/main/resources/static/js/product/instruement.js
  11. 4 0
      src/main/resources/static/js/product/list.js
  12. 5 1
      src/main/resources/static/js/product/produce-list.js
  13. 1 4
      src/main/resources/static/js/user-center/dashboard.js
  14. 22 9
      src/main/resources/static/js/user-center/member/memberPage.js
  15. 7 7
      src/main/resources/static/js/user-center/member/memberRecord.js
  16. 11 9
      src/main/resources/templates/index.html
  17. 3 2
      src/main/resources/templates/pay/caimei-pay.html
  18. 1 1
      src/main/resources/templates/pay/caimei-paycash.html
  19. 6 6
      src/main/resources/templates/pay/caimei-paymobile.html
  20. 3 2
      src/main/resources/templates/pay/caimei-success.html
  21. 2 2
      src/main/resources/templates/product/detail.html
  22. 3 3
      src/main/resources/templates/product/instruelist.html
  23. 2 2
      src/main/resources/templates/product/instrument.html
  24. 2 2
      src/main/resources/templates/product/list.html
  25. 1 1
      src/main/resources/templates/shopping/confirm.html
  26. 1 1
      src/main/resources/templates/user-center/dashboard.html
  27. 1 1
      src/main/resources/templates/user-center/member/member-record.html
  28. 9 9
      src/main/resources/templates/user-center/member/member.html

+ 41 - 0
src/main/resources/static/js/common/serviceapi/pay.service.js

@@ -147,5 +147,46 @@ var PayApi = {
             .then(function(res){
                 callback(res);
             });
+        },
+
+
+        /*---------------------支付vip接口---------------------------*/
+
+        PayVipPcMallPay: function(params, callback){ // vip网银支付
+            Http.AjaxService({
+                url:'/order/pay/vip/union',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+
+        PayVipAliPay: function(params, callback){ // vip支付宝支付
+            Http.AjaxService({
+                url:'/order/pay/vip/alipay',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        PayVipMiniWxPay: function(params, callback){ // 微信支付宝支付
+            Http.AjaxService({
+                url:'/order/pay/vip/wechat',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
         }
 };

+ 12 - 0
src/main/resources/static/js/common/serviceapi/user.service.js

@@ -340,4 +340,16 @@ var UserApi = {
                 callback(res);
             });
         },
+        // user/super/package
+        FetchSuperPackage: function (params, callback) {//会员开通记录
+            Http.AjaxService({
+                url: '/user/super/package',
+                type:'get',
+                data:params,
+                json:false,
+                isHost:true
+            }).then(function (res) {
+                callback(res);
+            });
+        },
 };

+ 4 - 0
src/main/resources/static/js/index.js

@@ -18,6 +18,10 @@ var homeData = new Vue({
         },
     },
     methods: {
+        // 是否显示vip标签价格
+        showVipPriceTag: function(product){
+            return (product.priceFlag !== 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
+        },
         popupPage:function(){  // 弹窗点击跳转链接
             var _self = this;
             this.popupFlag=false;

+ 59 - 10
src/main/resources/static/js/pay/caimei-pay.js

@@ -46,7 +46,9 @@ var payContainer = new Vue({
         organizeId:'',  //组织机构id
         orderNo:'',      //订单号
         orderTotalFee:'',
-        unpaidAmount:''  //真正的付款金额
+        unpaidAmount:'',  //真正的付款金额
+        vipId: null, //会员套餐id
+        comboInfo: [] // 会员套餐
     },
     filters: {
         NumFormat :function(value) {
@@ -81,11 +83,17 @@ var payContainer = new Vue({
                     _self.payInfo.payLinkTypeText =  _self.payInfo.payLinkType == 1 ? '企业网银' : '个人网银';
                     _self.payInfo.payUserType =  _self.payInfo.payLinkType == 1 ? 'ENTERPRISE' : 'USER';
                     _self.unpaidAmount = _data.orderPayLink.unpaidAmount;
+                    _self.vipId = _data.orderPayLink.vipId;
                     if(_data.code == 0){
                         setTimeout(function () {  //支付倒计时
                             _self.countTime(_self.payInfo.payTime)
                         }, 1000);
-                        _self.infoPayOrderCheckoutCounter();
+                        if(_self.payInfo.payOrderId !== null){
+                            _self.infoPayOrderCheckoutCounter();
+                        }else{
+                            console.log('本次支付链接是支付超级会员');
+                            _self.fetchSuperPackage(); // 获取套餐
+                        }
                     }else{
                         _self.isErrorShow = true;
                         _self.isRequest = true;
@@ -154,15 +162,56 @@ var payContainer = new Vue({
                 CAIMEI.dialog('请选择银行!');
                 return;
             }
-            var params = {
-                    payWay:'UNIONPAY',
-                    payAmount: _self.payInfo.payUnpaidAmount*100,
-                    bankCode:_self.payInfo.payBankNum,
-                    returnUrl:'https://www.caimei365.com/',
-                    orderId:_self.payInfo.payOrderId,
-                    userType:_self.payInfo.payUserType
+            // 普通订单
+            if (_self.vipId === null){
+                var params = {
+                    payWay: 'UNIONPAY',
+                    payAmount: _self.payInfo.payUnpaidAmount * 100,
+                    bankCode: _self.payInfo.payBankNum,
+                    returnUrl: 'https://www.caimei365.com/',
+                    orderId: _self.payInfo.payOrderId,
+                    userType: _self.payInfo.payUserType
+                };
+                _self.PayOrderPcMallPay(params);
+            }else {
+                // 支付超级会员
+                console.log('支付超级会员');
+                var params = {
+                    bankCode: this.payInfo.payBankNum,
+                    returnUrl: 'https://www.caimei365.com/',
+                    userId: GLOBAL_USER_ID,
+                    userType: _self.payInfo.payUserType,
+                    vipId: _self.vipId
                 };
-            _self.PayOrderPcMallPay(params);
+                _self.PayVipPcMallPay(params);
+            }
+        },
+        // 网银支付超级会员
+        PayVipPcMallPay: function(params){
+            var _self = this;
+            _self.isSubMitStatus=true;
+            PayApi.PayVipPcMallPay(params, function(response){
+                if (response.code == 0) {
+                    _self.isPayAlert = true;
+                    _self.mbOrderId = response.data.data.mbOrderId;
+                    window.open(response.data.data.payUrl);
+                    _self.isSubMitStatus = false;
+                } else {
+                    CAIMEI.Alert(response.msg, '确定', false);
+                    _self.isSubMitStatus = false;
+                }
+            });
+        },
+        // 获取套餐
+        fetchSuperPackage: function(){
+            var _self = this;
+            UserApi.FetchSuperPackage({}, function(response){
+                console.log(response);
+                if(response.code === 0){
+                    _self.comboInfo = response.data;
+                    _self.isRequest = true;
+                }
+            })
         },
         PayOrderPcMallPay:function(params){//订单网银支付请求
             var _self = this;

+ 135 - 43
src/main/resources/static/js/pay/caimei-paycash.js

@@ -73,21 +73,6 @@ var payContainer = new Vue({
         }
     },
     methods: {
-        // 会员支付信息初始化
-        initVipPayAction: function(){
-            console.log('会员支付拦截器');
-            var isVipPay = getUrlParam('payname') === 'svip';
-            if (!isVipPay) return false; // 如果不是支付会员的话,直接返回false
-            console.log('当前支付行为:购买svip');
-            // 从本地获取选中的svip套餐信息后删除本地信息
-            const comboInfo = window.localStorage.getItem('comboInfo');
-            this.comboInfo = JSON.parse(comboInfo);
-            // window.localStorage.removeItem('comboInfo');
-            // 设置支付金额
-            this.payAmount = this.comboInfo.price.toFixed(2);
-            this.pageType = '2';
-            return true // 如果是支付会员的话,租后返回true
-        },
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
             PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
@@ -189,6 +174,8 @@ var payContainer = new Vue({
                             window.open("/pay/caimei-paymobile.html?pageType=1");
                             _self.isPayAlert = true;
                         }
+                    }else if(_self.pageType === '2'){ // 微信支付会员
+                        _self.payVipMiniWxPay();
                     }else{
                         if(!isPC){
                             var orderInfo = {//普通订单微信二维码参数
@@ -217,12 +204,14 @@ var payContainer = new Vue({
                                 productId:_self.productID,
                             };
                         _self.PayOrdersecondAliPay(params);
+                    }else if(_self.pageType === '2'){ // 支付宝支付会员
+                        _self.payVipAliPay();
                     }else{
                         var params = {//正常订单
-                                payAmount:parseInt(_self.payAmount*100),
-                                returnUrl:'https://www.caimei365.com/',
-                                orderId:_self.payInfo.payOrderId
-                            };
+                            payAmount: parseInt(_self.payAmount * 100),
+                            returnUrl: 'https://www.caimei365.com/',
+                            orderId: _self.payInfo.payOrderId
+                        };
                         _self.PayOrderPcMallAlipay(params);
                     }
                 }else{// 网银支付
@@ -233,6 +222,8 @@ var payContainer = new Vue({
                             productId:_self.productID,
                         };
                         _self.PayOrdersecondUnion(params,_self.payInfo.payBankNum);
+                    }else if(_self.pageType === '2'){ // 网银支付会员
+                        console.log('网银支付会员');
                     }else{
                         var params = {//正常订单
                             payWay:_self.payInfo.payBankNum,
@@ -266,7 +257,9 @@ var payContainer = new Vue({
                             userType:_self.payInfo.payUserType,
                     };
                     _self.PayOrdersecondUnion(params);
-                }else{
+                } else if (_self.pageType === '2') { // 支付宝支付会员
+                    _self.payVipPcMallPay();
+                } else {
                     var params = {//正常订单
                             payAmount: parseInt(_self.payAmount*100),
                             bankCode:_self.payInfo.payBankNum,
@@ -434,13 +427,23 @@ var payContainer = new Vue({
                     CAIMEI.dialog('企业网银支付的金额必须大于¥10.00');
                     return;
                 }
-                PayApi.PayOrderPayLink(
-                    {
+
+                var params = {};
+
+                if(_self.pageType == 2){
+                    params = {
+                        unpaidAmount:_self.payAmount,
+                        vipId:_self.comboInfo.id,
+                        payType:_self.payInfo.payType
+                    }
+                }else{
+                    params = {
                         unpaidAmount:_self.payAmount,
                         orderId:_self.payInfo.payOrderId,
                         payType:_self.payInfo.payType
-                    },
-                    function(response){
+                    }
+                }
+                PayApi.PayOrderPayLink(params,function(response){
                         _self.bankPayLink_url = response.data;
                         var oInput = document.createElement("textarea");
                         oInput.value = _self.bankPayLink_url;
@@ -469,6 +472,19 @@ var payContainer = new Vue({
         },
         RefreshBody:function(){//刷新页面
             var _self = this;
+            // 验证支付(支付会员)
+            if(_self.pageType == 2){
+                PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
+                    _self.isPayAlert = false;
+                    var data = response.data.data;
+                    if(data.status === '1'){
+                        _self.windowLocationHref('success');
+                    }else{
+                        _self.windowLocationHref('error');
+                    }
+                });
+                return;
+            }
             if(_self.payInfo.payBankNum == 'WEIXIN'){
                 PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.payOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
                     _self.isPayAlert = false;
@@ -494,6 +510,8 @@ var payContainer = new Vue({
             var _self = this;
             if( _self.pageType === '1'){
                 window.location.href = '/pay/success.html?pageType=second&type='+state+'&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '2'){
+                window.location.href = '/pay/success.html?pageType=vip&type='+state+'&payAmount='+_self.payAmount;
             }else{
                 window.location.href = '/pay/success.html?pageType=www&type='+state+'&payAmount='+_self.payAmount;
             }
@@ -523,30 +541,104 @@ var payContainer = new Vue({
                 _self.payStatusText = '使用微信和企业网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。';
                 _self.isReceiptStatus = true;
             });
-        }
+        },
+        // 网银支付会员
+        payVipPcMallPay: function(){
+            console.log('网银支付会员');
+            var _self = this;
+            var params = {
+                bankCode: this.payInfo.payBankNum,
+                returnUrl: 'https://www.caimei365.com/',
+                userId: GLOBAL_USER_ID,
+                userType: _self.payInfo.payUserType,
+                vipId: _self.comboInfo.id
+            };
+            PayApi.PayVipPcMallPay(params, function (response) {
+                if (response.code == 0) {
+                    _self.isPayAlert = true;
+                    _self.isSubMitStatus = false;
+                    _self.mbOrderId = response.data.data.mbOrderId;
+                    window.open(response.data.data.payUrl);
+                } else {
+                    _self.isSubMitStatus = false;
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            });
+        },
+        // 支付宝支付会员
+        payVipAliPay: function(){
+            console.log('支付宝支付会员');
+            var _self = this;
+            var params = {
+                bankCode: _self.payInfo.payBankNum,
+                returnUrl: 'https://www.caimei365.com/',
+                userId: GLOBAL_USER_ID,
+                userType: _self.payInfo.payUserType,
+                vipId: _self.comboInfo.id
+            };
+            console.log(params);
+            PayApi.PayVipAliPay(params, function(response){
+                console.log(response);
+                if (response.code === 0) {
+                    _self.mbOrderId = response.data.data.mbOrderId;
+                    _self.payInfo.payMobileUrl = response.data.data.payUrl;
+                    _self.payInfo.payData = {
+                        mbOrderId: _self.mbOrderId,
+                        type: _self.payInfo.payBankNum,
+                        amount: _self.payAmount,
+                        url: _self.payInfo.payMobileUrl
+                    };
+                    CAIMEI.Storage.setItem('payData', JSON.stringify(_self.payInfo.payData));
+                    if (!isPC) {
+                        location.href = _self.payInfo.payMobileUrl;
+                    } else {
+                        window.open("/pay/caimei-paymobile.html?pageType=2&duration=" + _self.comboInfo.duration);
+                    }
+                } else {
+                    CAIMEI.Alert(response.msg, '确定', false);
+                    _self.isSubMitStatus = false;
+                }
+            });
+        },
+        // 微信支付会员
+        payVipMiniWxPay: function(){
+            this.payInfo.payData = {//二手
+                type: this.payInfo.payBankNum,
+                vipId: this.comboInfo.id,
+                amount: this.payAmount,
+                duration: this.comboInfo.duration,
+            };
+            CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
+            window.open("/pay/caimei-paymobile.html?pageType=2");
+            this.isPayAlert = true;
+        },
     },
     mounted: function () {
         var _self = this;
         // 判断当前支付是订单支付
-        if(!this.initVipPayAction()){
-            _self.pageType = CAIMEI.getUrlParam('pageType');
-            if( _self.pageType === '1'){//二手
-                _self.productID = CAIMEI.getUrlParam('productID');
-                _self.payAmount = _self.toFixedFn(100);
-                _self.isRequest = true;
-                _self.payStatusText = '';
-            }else{
-                var HrefType = CAIMEI.getUrlParam('type');
-                if(HrefType == 'payfirm'){
-                    _self.payInfo.payOrderId =  CAIMEI.getUrlParam('orderId');
-                    _self.orderIdentificationId = '#'+_self.payInfo.payOrderId+'#';
-                }else{
-                    var data =JSON.parse(localStorage.getItem("confirmOrderInfo"));
-                    _self.payInfo.payOrderId = data.data.orderId;
-                    _self.orderIdentificationId = '#'+_self.payInfo.payOrderId+'#';
-                }
-                _self.infoPayOrderCheckoutCounter();//正常订单初始化
+        _self.pageType = CAIMEI.getUrlParam('pageType');
+        if (_self.pageType === '1') {//二手
+            _self.productID = CAIMEI.getUrlParam('productID');
+            _self.payAmount = _self.toFixedFn(100);
+            _self.isRequest = true;
+            _self.payStatusText = '';
+        } else if (_self.pageType === '2') { // 支付会员
+            // 从本地获取选中的svip套餐信息后删除本地信息
+            this.comboInfo = JSON.parse(CAIMEI.Storage.getItem('comboInfo'));
+            // CAIMEI.Storage.removeItem('comboInfo');
+            // 设置支付金额
+            this.payAmount = _self.toFixedFn(this.comboInfo.price);
+        } else {
+            var HrefType = CAIMEI.getUrlParam('type');
+            if (HrefType == 'payfirm') {
+                _self.payInfo.payOrderId = CAIMEI.getUrlParam('orderId');
+                _self.orderIdentificationId = '#' + _self.payInfo.payOrderId + '#';
+            } else {
+                var data = JSON.parse(localStorage.getItem("confirmOrderInfo"));
+                _self.payInfo.payOrderId = data.data.orderId;
+                _self.orderIdentificationId = '#' + _self.payInfo.payOrderId + '#';
             }
+            _self.infoPayOrderCheckoutCounter();//正常订单初始化
         }
         var viewer = window.navigator.userAgent.toLowerCase();
         if(viewer.match(/MicroMessenger/i) == 'micromessenger'){

+ 22 - 7
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -26,7 +26,9 @@ var payContainer = new Vue({
         isRefresh:false,
         maxtime:300,
         pageType:'',//页面跳转类型
-        productID:''//商品ID
+        productID:'',//商品ID
+        duration: 0, // 购买的会员期限
+        vipId: null, // vip套餐id
     },
     filters: {
         NumFormat:function(value) {
@@ -50,7 +52,7 @@ var payContainer = new Vue({
     methods: {
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
-            if( _self.pageType === '1'){
+            if( _self.pageType === '1' || _self.pageType === '2'){
                 setTimeout(function(){
                     switch (_self.payInfo.payType) {
                         case 'WEIXIN':
@@ -60,8 +62,8 @@ var payContainer = new Vue({
                             _self.getAliPayQrcodeInfo();
                             break;
                     }
-                },2000);
-            }else{
+                }, 2000);
+            } else {
                 PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
                     if(response.code == 0){
                         // console.log(response);
@@ -115,7 +117,14 @@ var payContainer = new Vue({
                     productId:_self.productID,
                     payAmount:_self.payAmount
                 };
-            }else{
+            } else if (_self.pageType === '2') { // 微信支付会员
+                console.log('微信支付会员');
+                orderInfo = {//二手微信二维码参数
+                    pageType: 2,
+                    payAmount: _self.payAmount,
+                    vipId: _self.vipId,
+                };
+            } else {
                 orderInfo = {//普通订单微信二维码参数
                     pageType:0,
                     orderID:_self.payInfo.payOrderId,
@@ -123,6 +132,7 @@ var payContainer = new Vue({
                 };
             }
             _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
+            console.log(_self.payInfo.payMobileUrl);
             var qrcode = new QRCode(document.getElementById("wx_pay_container"), {
                 render: "canvas", //也可以替换为table
                 text: _self.payInfo.payMobileUrl,
@@ -192,8 +202,7 @@ var payContainer = new Vue({
         var _self = this;
         var payData = JSON.parse(CAIMEI.Storage.getItem('payData'));
         _self.pageType = CAIMEI.getUrlParam('pageType');
-        console.log(payData);
-        console.log(_self.pageType);
+        _self.duration = CAIMEI.getUrlParam('duration');
         if( _self.pageType === '1'){
             console.log('二手商品');
             _self.payInfo.payType = payData.type;
@@ -201,6 +210,12 @@ var payContainer = new Vue({
             _self.payInfo.payMobileUrl = payData.url;
             _self.mbOrderId = payData.mbOrderId;
             _self.payAmount = _self.payableAmount = payData.amount;
+        }else if(_self.pageType === '2'){
+            _self.payInfo.payType = payData.type;
+            _self.payAmount = _self.payableAmount = payData.amount;
+            _self.payInfo.payMobileUrl = payData.url;
+            _self.vipId = payData.vipId;
+            _self.duration = payData.duration;
         }else{
             console.log('订单支付');
             _self.payInfo.payType = payData.type;

+ 23 - 11
src/main/resources/static/js/pay/caimei-success.js

@@ -13,7 +13,8 @@ var payContainer = new Vue({
         maxtime:10,
         linkText:'立即跳转',
         openLink:'/myaccount/orderlist--1-1.html',
-        isSuccessText:''
+        isSuccessText:'',
+        refreshType: false,
     },
     filters: {
         NumFormat:function(value) {
@@ -49,21 +50,29 @@ var payContainer = new Vue({
                         _self.openLink = '/flea-market/form.html';
                     }
                     break;
+                case 'vip':
+                    _self.linkText = '会员中心';
+                    _self.openLink = '/user/member.html';
+                    break;
                 default:
                     _self.linkText = '采美商城首页';
                     _self.openLink = '/index.html';
             }
             _self.isRequest = true;
-            //自动跳转
-            // var timeClock = setInterval(function(){
-            //     _self.maxtime--;
-            //     if (_self.maxtime == 0) {
-            //         window.location.href = _self.openLink;
-            //         clearInterval(timeClock);
-            //         _self.maxtime = 10;
-            //         _self.isRefresh = true;
-            //     }
-            // },1000);
+
+            if(_self.pageType === 'vip'){
+                //自动跳转
+                var timeClock = setInterval(function () {
+                    _self.maxtime--;
+                    if (_self.maxtime == 1) {
+                        window.location.href = _self.openLink;
+                        clearInterval(timeClock);
+                        _self.maxtime = 10;
+                        _self.isRefresh = true;
+                        _self.refreshType = false;
+                    }
+                }, 1000);
+            }
         },
         toFixedFn:function(text){//处理小数点后两位数
             return Number(text).toFixed(2);
@@ -74,6 +83,9 @@ var payContainer = new Vue({
         _self.pageType = CAIMEI.getUrlParam('pageType');
         _self.type = CAIMEI.getUrlParam('type');
         _self.payAmount = CAIMEI.getUrlParam('payAmount');
+        if(_self.pageType === 'vip'){
+            _self.refreshType = true;
+        }
         _self.infoRequestBody();
     }
 });

+ 52 - 18
src/main/resources/static/js/pay/caimei-wechatpay.js

@@ -11,6 +11,7 @@ var payContainer = new Vue({
         state:0,//随机数
         isRequest:false,
         productId:'',//二手商品ID
+        vipId: null // vip套餐id
     },
     computed: {
 
@@ -25,26 +26,59 @@ var payContainer = new Vue({
             _this.isRequest = true;
             if( _this.pageType == 1){
                 _this.productId = _this.state.productId;
+            }else if(_this.pageType == 2){
+                _this.vipId = _this.state.vipId;
             }else{
                 _this.orderID = _this.state.orderID;
             }
         },
         WxPaySubmit:function(){
-            var _this = this;
-            if(_this.pageType == 1){
-                _this.WxRequestsecondHandPay();
-            }else{
-                _this.WxRequestPaymentFn();
+            if (this.pageType == 1) {
+                this.WxRequestsecondHandPay();
+            } else if (this.pageType == 2) {
+                this.WxRequestPaymentVipFn();
+            } else {
+                this.WxRequestPaymentFn();
             }
         },
-        WxRequestsecondHandPay:function(){
+        // 会员支付
+        WxRequestPaymentVipFn: function(){
             var _this = this;
             var params = {
-                    code:_this.wechatcode,
-                    state:_this.rand(1000,9999),
-                    productId:_this.productId,
-                    returnUrl:'https://www.caimei365.com/',
-                };
+                code: _this.wechatcode,
+                state: _this.rand(1000, 9999),
+                vipId: _this.vipId,
+                returnUrl: 'https://www.caimei365.com/',
+            };
+            PayApi.PayVipMiniWxPay(params,function(response){
+                if(response.code == 0){
+                    var PayInfo = JSON.parse(response.data.data.payInfo);
+                    if (typeof WeixinJSBridge == "undefined"){
+                        if( document.addEventListener ){
+                            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
+                        }else if (document.attachEvent){
+                            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
+                            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
+                        }
+                    }else{
+                        _this.onBridgeReady(PayInfo);
+                    }
+                }else{
+                     CAIMEI.dialog("支付链接已失效,请重新扫码支付");
+                    setTimeout(function(){
+                        WeixinJSBridge.call('closeWindow');
+                    },3000);
+                }
+            });
+        },
+        WxRequestsecondHandPay:function(){ // 二手商品支付
+            var _this = this;
+            var params = {
+                code: _this.wechatcode,
+                state: _this.rand(1000, 9999),
+                productId: _this.productId,
+                returnUrl: 'https://www.caimei365.com/',
+            };
             PayApi.PayOrdersecondWechat(params,function(response){
                 if(response.code == 0){
                     var PayInfo = JSON.parse(response.data.data.payInfo);
@@ -66,14 +100,14 @@ var payContainer = new Vue({
                 }
             });
         },
-        WxRequestPaymentFn:function(){
+        WxRequestPaymentFn:function(){ // 普通订单支付
             var _this = this;
-            var params={
-                    payAmount:_this.payAmount*100,
-                    code:_this.wechatcode,
-                    state:_this.rand(1000,9999),
-                    orderId:_this.orderID,
-                    returnUrl:'https://www.caimei365.com/',
+            var params = {
+                payAmount: _this.payAmount * 100,
+                code: _this.wechatcode,
+                state: _this.rand(1000, 9999),
+                orderId: _this.orderID,
+                returnUrl: 'https://www.caimei365.com/',
             };
             PayApi.PayOrderMiniWxPay(params,function(response){
                 if(response.code == 0){

+ 4 - 0
src/main/resources/static/js/product/detail.js

@@ -467,6 +467,10 @@ var productDetail = new Vue({
                     _self.initPreviewImage()
                 })
             }
+        },
+        // 是否显示vip标签价格
+        showVipPriceTag(product){
+            return product.priceFlag !== 1 && product.userIdentity === 4 || product.userIdentity === 2
         }
     },
     created: function () {

+ 5 - 0
src/main/resources/static/js/product/instruement.js

@@ -22,6 +22,11 @@
          }
      },
      methods:{
+        // 是否显示vip标签价格
+        showVipPriceTag: function(product){
+            return (product.priceFlag !== 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
+        },
+
         closeup:function(){
             this.showflag = false;
             document.body.style.overflow='';

+ 4 - 0
src/main/resources/static/js/product/list.js

@@ -54,6 +54,10 @@ var productList = new Vue({
         }
     },
     methods: {
+        // 是否显示vip标签价格
+        showVipPriceTag: function(product){
+            return (product.priceFlag !== 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
+        },
         toPagination: function (pageNum) {
             if (pageNum <= this.pageTotal) {
                 var params = {pageNum: pageNum};

+ 5 - 1
src/main/resources/static/js/product/produce-list.js

@@ -36,7 +36,11 @@ var productList = new Vue({
         },
     },
     methods:{
-       getproductList:function(){//商品列表
+        // 是否显示vip标签价格
+        showVipPriceTag: function(product){
+            return (product.priceFlag !== 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
+        },
+        getproductList:function(){//商品列表
            var _self=this;
            ProductApi.GetSearchProduct(_self.params,function (res) {
                if( res.code==0){

+ 1 - 4
src/main/resources/static/js/user-center/dashboard.js

@@ -45,10 +45,7 @@ var helpSuggestion = new Vue({
                 3: '供应商',
                 4: '个人机构'
             };
-            var type = '';
-            if (userIdentity === 2){
-                type = 'vip';
-            }
+            var type = 'vip';
             if (vipFlag === 1) {
                 type = 'svip';
             }

+ 22 - 9
src/main/resources/static/js/user-center/member/memberPage.js

@@ -36,17 +36,17 @@ var serviceList = [
 var comboInfo = [
     {
         id: 1,
-        durationTime: 12,
+        duration: 12,
         price: 4800,
         recommend: false,
     }, {
         id: 2,
-        durationTime: 3,
+        duration: 3,
         price: 1500,
         recommend: true,
     }, {
         id: 3,
-        durationTime: 1,
+        duration: 1,
         price: 600,
         recommend: false,
     }
@@ -116,6 +116,7 @@ var memberPage = new Vue({
         },
     },
     mounted: function () {
+        this.fetchSuperPackage();
         this.initCenter();
         this.getSvipProductList();
     },
@@ -155,15 +156,18 @@ var memberPage = new Vue({
         payByRMB: function (packageId) {
             console.log('RMB支付');
             //本地保存一下选中的会员套餐信息
-            window.localStorage.setItem('comboInfo', JSON.stringify(comboInfo[this.currentIndex]));
-            window.open('/pay/caimei-paycash.html?payname=svip')
+            window.localStorage.setItem('comboInfo', JSON.stringify(this.comboInfo[this.currentIndex]));
+            window.open('/pay/caimei-paycash.html?pageType=2');
+            this.showRenewPopup = false;
+            this.showMask = false;
+            // this.showConfirmPopup = true;
         },
         // 采美豆支付
         payByBeans: function (packageId) {
             var _self = this;
-            var currentPackage = comboInfo[this.currentIndex];
+            var currentPackage = _self.comboInfo[this.currentIndex];
             var popupParams = {
-                content:'确认使用' + (currentPackage.price * 100) + '采美豆开通' + (currentPackage.durationTime) + '个月会员?' ,
+                content:'确认使用' + (currentPackage.price * currentPackage.proportion) + '采美豆开通' + (currentPackage.duration) + '个月会员?' ,
                 confitmBtnText: '确认开通',
                 cancelBtnText: '取消',
             };
@@ -188,8 +192,19 @@ var memberPage = new Vue({
                 })
             });
         },
+        // 获取套餐
+        fetchSuperPackage: function(){
+            var _self = this;
+            UserApi.FetchSuperPackage({}, function(response){
+                console.log(response);
+                if(response.code === 0){
+                    _self.comboInfo = response.data;
+                }
+            })
+        },
         // 续费弹窗
         handleShowRenewPopup: function(){
+            this.fetchSuperPackage();
             this.currentIndex = 1;
             this.showMask = true;
             this.showRenewPopup = true;
@@ -233,8 +248,6 @@ var memberPage = new Vue({
             var svipProductFlag = product.svipProductFlag; // SVIP标识 1 是 2 不是
             var isSvip = true;
 
-            console.log(svipProductFlag);
-
             if (product.productCategory === '1') {
                 // 登录后查看
                 if (!GLOBAL_USER_ID) {

+ 7 - 7
src/main/resources/static/js/user-center/member/memberRecord.js

@@ -2,17 +2,17 @@
 var comboInfo = [
     {
         id: 1,
-        durationTime: 12,
+        duration: 12,
         price: 4800,
         recommend: false,
     }, {
         id: 2,
-        durationTime: 3,
+        duration: 3,
         price: 1500,
         recommend: true,
     }, {
         id: 3,
-        durationTime: 1,
+        duration: 1,
         price: 600,
         recommend: false,
     }
@@ -92,14 +92,14 @@ var memberRecord = new Vue({
                 }
             })
         },
-        durationTime: function(id){
-            var durationTime = 0;
+        duration: function(id){
+            var duration = 0;
             comboInfo.forEach(function(item){
                 if(id === item.id){
-                    return durationTime = item.durationTime;
+                    return duration = item.duration;
                 }
             });
-            return durationTime;
+            return duration;
         },
         //h5查看更多
         showMore: function() {

+ 11 - 9
src/main/resources/templates/index.html

@@ -169,9 +169,9 @@
                                                         <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                                         <template v-if="pros.product.svipProductFlag === 1">
                                                             <div class="svip-tag">
-                                                                <div class="svip-icon" :class="{ btr: pros.product.priceFlag != 1 && pros.product.userIdentity === 2 }">SVIP</div>
+                                                                <div class="svip-icon" :class="{ btr: showVipPriceTag(pros.product) }">SVIP</div>
                                                                 <!-- 公开价格 && (个人机构 || 资质机构) && 开通SVIP 可查看价格-->
-                                                                <template v-if="pros.product.priceFlag != 1 && (pros.product.userIdentity === 4 && GLOBAL_VIP_FLAG === 1) || pros.product.userIdentity === 2">
+                                                                <template v-if="showVipPriceTag(pros.product)">
                                                                     <div class="svip-price">
                                                                         <span v-html="pros.product.svipPriceTag"></span>
                                                                     </div>
@@ -200,12 +200,15 @@
                                                                     ¥<span class="price_o_num">{{ pros.product.originalPrice | NumFormat }}</span>
                                                                 </div>
                                                             </template>
-                                                            <template v-else-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                                <!--机构价-->
-                                                                <!--机构价划线:有sivp优惠价格 && 开通SVIP && 价格可见-->
-                                                                <div class="main_price_show" :class="{none:pros.product.svipProductFlag == 1 && true}">¥<span class="price_num">{{ pros.product.price | NumFormat }}</span></div>
+                                                            <!-- 资质机构 || (价格全部机构可见 && 用户为普通机构) || (用户为供应商 && 商品为供应商下的商品) -->
+                                                            <template v-else-if="GLOBAL_USER_IDENTITY === 2 || (pros.product.priceFlag === 2 && pros.product.userIdentity === 4) || (pros.product.userIdentity === 3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                                <!--机构价划线:商品有超级会员优惠价格 && 用户开通了超级会员-->
+                                                                <div class="main_price_show" :class="{none:pros.product.svipProductFlag == 1 && GLOBAL_VIP_FLAG === 1}">
+                                                                    ¥<span class="price_num">{{ pros.product.price | NumFormat }}</span>
+                                                                </div>
                                                             </template>
-                                                            <template v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4">
+                                                            <!--机构价仅会员可见 && 用户是普通机构-->
+                                                            <template v-else-if="pros.product.priceFlag==2 && GLOBAL_USER_IDENTITY !== 2">
                                                                 <em class="price_grade_club">
                                                                     <span>¥</span>会员可见
                                                                 </em>
@@ -218,7 +221,6 @@
                                                             </template>
                                                         </template>
                                                     </div>
-
                                                 </template>
                                                 <!-- 二手商品 -->
                                                 <template v-else>
@@ -309,7 +311,7 @@
                                                                     <p class="couponTag" th:if="*{couponsLogo}">优惠券</p>
                                                                     <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                                                     <div class="svip-tag" th:if="*{svipProductFlag}==1">
-                                                                        <div class="svip-icon btr">SVIP</div>
+                                                                        <div class="svip-icon">SVIP</div>
                                                                     </div>
                                                                     <p class="listTag" th:if="*{actStatus}==1 and ${pros.get('product').get('promotions')}!=null">
                                                                         <template th:text="*{promotions.name}"></template>

+ 3 - 2
src/main/resources/templates/pay/caimei-pay.html

@@ -77,13 +77,13 @@
                 </div>
             </template>
             <!--购买会员-->
-            <template v-else-if="false">
+            <template v-else-if="vipId !== null">
                 <div class="pay-svip">
                     <div class="pay-svip-title">购买超级会员</div>
                     <div class="content">
                         <div class="pay-svip-detail">
                             <div class="tit">支付金额</div>
-                            <div class="pay-amount"><span>¥</span>6000.00</div>
+                            <div class="pay-amount"><span>¥</span>{{ unpaidAmount | NumFormat }}</div>
                         </div>
                         <div class="svip-indent">套餐12个月</div>
                     </div>
@@ -197,6 +197,7 @@
 <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/pay.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/lib/qrcode.min.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-bank.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-pay.js(v=${version})}"></script>
 </body>

+ 1 - 1
src/main/resources/templates/pay/caimei-paycash.html

@@ -40,7 +40,7 @@
                             <div class="tit">支付金额</div>
                             <div class="pay-amount"><span>¥</span>{{ comboInfo.price | NumFormat }}</div>
                         </div>
-                        <div class="svip-indent">套餐{{ comboInfo.durationTime }}个月</div>
+                        <div class="svip-indent">套餐{{ comboInfo.duration }}个月</div>
                     </div>
                 </div>
             </template>

+ 6 - 6
src/main/resources/templates/pay/caimei-paymobile.html

@@ -16,15 +16,15 @@
     </div>
 </div>
 <div class="pay-container weixin clear" id="payContainer" >
-<!--    <div v-if="loginLoading" class="loading" :style="{opacity: loginLoading ? '1' :'0'}">-->
-<!--        <img src="/img/base/loading.gif">-->
-<!--    </div>-->
-    <div class="container" :class="isRequest ? 'active' : ''">
+    <div v-if="loginLoading" class="loading" :style="{opacity: loginLoading ? '1' :'0'}">
+        <img src="/img/base/loading.gif">
+    </div>
+    <div class="container" :class="{active: isRequest}" v-show="isRequest">
         <div class="pay-content weixin clearfix" v-if="payInfo.payType === 'WEIXIN'">
             <div class="pay-codecontent">
                 <div class="pay-amount">
                     <div class="pay-amount-text">
-                        <p v-if="pageType == '2'">超级会员套餐:12个月 </p>
+                        <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
                         <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
                         <p v-if="pageType!='1' && pageType!='2'">订单号: <span>{{orderNo}}</span> </p>
@@ -52,7 +52,7 @@
             <div class="pay-codecontent">
                 <div class="pay-amount">
                     <div class="pay-amount-text">
-                        <p v-if="pageType == '2'">超级会员套餐:12个月 </p>
+                        <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
                         <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
                         <p v-if="pageType!='1' && pageType!='2'">订单号: <span>{{orderNo}}</span> </p>

+ 3 - 2
src/main/resources/templates/pay/caimei-success.html

@@ -24,8 +24,9 @@
             </div>
             <div class="success-text"><p class="tx1">{{isSuccessText}}</p></div>
             <div class="success-text"><p class="tx2">付款金额: <span>¥{{payAmount | NumFormat}}</span> </p></div>
-            <!-- <div class="success-text"><p class="tx2"><span>{{maxtime}}s</span>后自动跳转到{{linkText}}<a :href="openLink">立即跳转</a></p></div>-->
-            <div class="success-text"><p class="tx2">点击<a :href="openLink">立即跳转</a>到{{linkText}}</p></div>
+<!--            <div class="success-text"><p class="tx2"><span>{{maxtime}}s</span>后自动跳转到{{linkText}}<a :href="openLink">立即跳转</a></p></div>-->
+            <div class="success-text" v-if="refreshType"><p class="tx2">点击<a :href="openLink">立即跳转</a>到{{linkText}}<span style="margin-left: 25px;">{{maxtime}}s后自动跳转</span></p></div>
+            <div class="success-text" v-else><p class="tx2">点击<a :href="openLink">立即跳转</a>到{{linkText}}</p></div>
     </div>
 </div>
 <!-- 引入底部 -->

+ 2 - 2
src/main/resources/templates/product/detail.html

@@ -88,9 +88,9 @@
                             <em v-else>¥<i th:attr="class=${'icon mIcon i'+product.priceGrade}"></i></em>
                             <!--SVIP会员标签-->
                             <div class="svip-tag" v-if="priceObj.svipProductFlag == 1">
-                                <div class="svip-icon">SVIP</div>
+                                <div class="svip-icon" :class="{ btr:showVipPriceTag(priceObj) }">SVIP</div>
                                 <!-- !价格未公开 && ((个人机构 + SVIP) || 资质机构 ) 可查看价格 -->
-                                <div class="svip-price" v-if="priceObj.priceFlag != 1 && (priceObj.userIdentity === 4 && GLOBAL_VIP_FLAG === 1) || priceObj.userIdentity === 2">
+                                <div class="svip-price" v-if="showVipPriceTag(priceObj)">
                                     <span v-html="priceObj.svipPriceTag"></span>
                                 </div>
                             </div>

+ 3 - 3
src/main/resources/templates/product/instruelist.html

@@ -133,9 +133,9 @@
                                                 <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                                 <template v-if="p.svipProductFlag === 1">
                                                     <div class="svip-tag">
-                                                        <div class="svip-icon" :class="{ btr: p.priceFlag != 1 && p.userIdentity === 2 }">SVIP</div>
+                                                        <div class="svip-icon" :class="{ btr: showVipPriceTag(p) }">SVIP</div>
                                                         <!-- !价格未公开 && ((个人机构 + SVIP) || 资质机构 ) 可查看价格 -->
-                                                        <template v-if="p.priceFlag != 1 && (p.userIdentity === 4 && GLOBAL_VIP_FLAG === 1) || p.userIdentity === 2">
+                                                        <template v-if="showVipPriceTag(p)">
                                                             <div class="svip-price">
                                                                 <span v-html="p.svipPriceTag"></span>
                                                             </div>
@@ -192,7 +192,7 @@
                                          <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                          <template v-if="p.svipProductFlag === 1">
                                              <div class="svip-tag">
-                                                 <div class="svip-icon btr">SVIP</div>
+                                                 <div class="svip-icon">SVIP</div>
                                              </div>
                                          </template>
                                          <template v-else>

+ 2 - 2
src/main/resources/templates/product/instrument.html

@@ -122,9 +122,9 @@
                                                     <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                                     <template v-if="pros.product.svipProductFlag === 1">
                                                         <div class="svip-tag">
-                                                            <div class="svip-icon" :class="{ btr: pros.priceFlag != 1 && pros.userIdentity === 2 }">SVIP</div>
+                                                            <div class="svip-icon" :class="{ btr: showVipPriceTag(pros) }">SVIP</div>
                                                             <!-- !价格未公开 && ((个人机构 + SVIP) || 资质机构 ) 可查看价格 -->
-                                                            <template v-if="pros.priceFlag != 1 && (pros.userIdentity === 4 && GLOBAL_VIP_FLAG === 1) || pros.userIdentity === 2">
+                                                            <template v-if="showVipPriceTag(pros)">
                                                                 <div class="svip-price">
                                                                     <span v-html="pros.product.svipPriceTag"></span>
                                                                 </div>

+ 2 - 2
src/main/resources/templates/product/list.html

@@ -138,9 +138,9 @@
                                         <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
                                         <template v-if="p.svipProductFlag === 1">
                                             <div class="svip-tag">
-                                                <div class="svip-icon" :class="{ btr: p.priceFlag != 1 && p.userIdentity === 2 }">SVIP</div>
+                                                <div class="svip-icon" :class="{ btr: showVipPriceTag(p) }">SVIP</div>
                                                 <!-- !价格未公开 && ((个人机构 + SVIP) || 资质机构 ) 可查看价格 -->
-                                                <template v-if="(p.userIdentity === 4 && GLOBAL_VIP_FLAG === 1) || p.userIdentity === 2">
+                                                <template v-if="showVipPriceTag(p)">
                                                     <div class="svip-price">
                                                         <span v-html="p.svipPriceTag"></span>
                                                     </div>

+ 1 - 1
src/main/resources/templates/shopping/confirm.html

@@ -149,7 +149,7 @@
                             <template v-if="cart.svipProductFlag == 1">
                                 <del v-text="'¥'+toFloat(cart.originalPrice)" v-if="GLOBAL_VIP_FLAG === 1"></del>
                                 <span v-text="'¥'+toFloat(cart.originalPrice)" v-else></span>
-                                <div class="priceTag">
+                                <div class="priceTag" v-if="cart.svipProductFlag == 1 && GLOBAL_VIP_FLAG === 1">
                                     <!--超级会员价格标签-->
                                     <div class="svip-tag">
                                         <div class="svip-icon btr">SVIP</div>

+ 1 - 1
src/main/resources/templates/user-center/dashboard.html

@@ -38,7 +38,7 @@
                                 <span class="username">{{userInfo.name}}</span>
                                 <!-- 机构类型 -->
                                 <span class="agency" :class="[userIdentityTag.type]" v-html="userIdentityTag.name"></span>
-                                <span class="vip-icon" :class="[userIdentityTag.type]" v-html="userIdentityTag.type.toUpperCase()"></span>
+                                <span class="vip-icon" v-if="GLOBAL_USER_IDENTITY === 2" :class="[userIdentityTag.type]" v-html="userIdentityTag.type.toUpperCase()"></span>
                                 <!-- 升级 -->
                                 <a class="update" href="/user/setting/upgrade.html" v-if="userInfo.userIdentity === 4" onclick="_czc.push(['_trackEvent','个人中心','升级入口','点击','','Um_Event_ClubUpgrade'])">
                                     去升级资质机构

+ 1 - 1
src/main/resources/templates/user-center/member/member-record.html

@@ -39,7 +39,7 @@
                 <div class="record-list">
                     <div class="record" v-for="(item, index) in recordList" :key="index">
                         <div class="desc">
-                            <span>超级会员-{{ durationTime(item.packageId) }}个月</span>
+                            <span>超级会员-{{ duration(item.packageId) }}个月</span>
                             <span>{{ moment(item.payTime).format('yyyy-MM-DD hh:mm:ss') }}</span>
                         </div>
                         <div class="amount">

+ 9 - 9
src/main/resources/templates/user-center/member/member.html

@@ -35,16 +35,16 @@
                     </div>
                 </div>
                 <!--套餐价格 仅未开通和到期显示-->
-                <div class="section" v-if="vipInfo.vipFlag === 0">
+                <div class="section" v-if="vipInfo.vipFlag !== 1">
                     <div class="section-title">超级会员套餐</div>
                     <div class="content combo-list">
                         <div>
                             <template v-for="(item, index) in comboInfo">
                                 <div class="combo" :class="{active: index === currentIndex,recommend: item.recommend}"
                                      :key="index" @click="chooseCombo(index)">
-                                    <div class="how-mounts">{{ item.durationTime }}个月</div>
+                                    <div class="how-mounts">{{ item.duration }}个月</div>
                                     <div class="price"><i>¥</i>{{ item.price }}</div>
-                                    <div class="average">{{ item.price / item.durationTime }}元/月</div>
+                                    <div class="average">{{ item.price / item.duration }}元/月</div>
                                 </div>
                             </template>
                         </div>
@@ -56,7 +56,7 @@
                             </div>
                             <div class="pay-btn plain">
                                 <a href="javascript:void(0);" @click="payAction(2)">
-                                    抵扣{{ comboInfo[currentIndex].price * 100 }}个采美豆开通
+                                    抵扣{{ comboInfo[currentIndex].price * comboInfo[currentIndex].proportion }}个采美豆开通
                                 </a>
                             </div>
                         </div>
@@ -121,7 +121,7 @@
         </div>
     </div>
     <!--底部支付按钮 仅未开通和到期显示-->
-    <div class="pay-amount-bottom" v-if="GLOBAL_VIP_FLAG === 0">
+    <div class="pay-amount-bottom" v-if="vipInfo.vipFlag !== 1">
         <div>
             <div class="pay-btn plain">
                 <a href="javascript:void(0);" @click="payAction(1)">
@@ -139,15 +139,15 @@
     <div class="mask" v-if="showMask"></div>
     <!--续费弹窗-->
     <div class="renew-popup" v-if="showRenewPopup">
-        <div class="popup-title">超级会员套餐<span class="close" @click="handleCloseRenewPopup">&times;</span></div>
+        <div class="popup-title">续费超级会员套餐<span class="close" @click="handleCloseRenewPopup">&times;</span></div>
         <div class="content combo-list">
             <div>
                 <template v-for="(item, index) in comboInfo">
                     <div class="combo" :class="{active: index === currentIndex,recommend: item.recommend}"
                          :key="index" @click="chooseCombo(index)">
-                        <div class="how-mounts">{{ item.durationTime }}个月</div>
+                        <div class="how-mounts">{{ item.duration }}个月</div>
                         <div class="price"><i>¥</i>{{ item.price }}</div>
-                        <div class="average">{{ item.price / item.durationTime }}元/月</div>
+                        <div class="average">{{ item.price / item.duration }}元/月</div>
                     </div>
                 </template>
             </div>
@@ -159,7 +159,7 @@
                 </div>
                 <div class="pay-btn plain">
                     <a href="javascript:void(0);" @click="payAction(2)">
-                        抵扣{{ comboInfo[currentIndex].price * 100 }}个采美豆开通
+                        抵扣{{ comboInfo[currentIndex].price * comboInfo[currentIndex].proportion }}个采美豆开通
                     </a>
                 </div>
             </div>