喻文俊 3 سال پیش
والد
کامیت
8be20707fd

+ 5 - 0
src/main/resources/static/js/account/register-club.js

@@ -82,6 +82,11 @@ var registerPage = new Vue({
 
     },
     methods: {
+        handleChangeType: function(type){
+            if(type === parseInt(this.clubUpgradeUser.firstClubType)) return;
+            this.userMainPros = [];
+            this.clubUpgradeUser.secondClubType = (type === 1 ? 1 : 5);
+        },
         clubRegister: function(){ //机构注册提交
             var _self = this;
             var pass = verifyForm();

+ 20 - 15
src/main/resources/static/js/pay/caimei-pay.js

@@ -47,8 +47,9 @@ var payContainer = new Vue({
         orderNo:'',      //订单号
         orderTotalFee:'',
         unpaidAmount:'',  //真正的付款金额
-        vipId: null, //会员套餐id
-        comboInfo: [] // 会员套餐
+        comboInfo: [], // 会员套餐
+        type: 1,
+        vipMonth: 0,
     },
     filters: {
         NumFormat :function(value) {
@@ -83,12 +84,15 @@ 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;
+                    _self.type = _data.type;
+                    _self.userName = _data.userName;
+                    _self.vipMonth = _data.orderPayLink.vipMonth;
                     if(_data.code == 0){
                         setTimeout(function () {  //支付倒计时
                             _self.countTime(_self.payInfo.payTime)
                         }, 1000);
                         if(_self.payInfo.payOrderId !== null){
+
                             _self.infoPayOrderCheckoutCounter();
                         }else{
                             console.log('本次支付链接是支付超级会员');
@@ -162,18 +166,7 @@ var payContainer = new Vue({
                 CAIMEI.dialog('请选择银行!');
                 return;
             }
-            // 普通订单
-            if (_self.vipId === null){
-                var params = {
-                    payWay: 'UNIONPAY',
-                    payAmount: _self.payInfo.payUnpaidAmount * 100,
-                    bankCode: _self.payInfo.payBankNum,
-                    returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
-                    orderId: _self.payInfo.payOrderId,
-                    userType: _self.payInfo.payUserType
-                };
-                _self.PayOrderPcMallPay(params);
-            }else {
+            if (_self.type === 2){
                 // 支付超级会员
                 console.log('支付超级会员');
                 var params = {
@@ -183,6 +176,18 @@ var payContainer = new Vue({
                     vipRecordId: _self.vipRecordId,
                 };
                 _self.PayVipPcMallPay(params);
+            }else {
+                // 普通订单
+                console.log('支付普通订单');
+                var params = {
+                    payWay: 'UNIONPAY',
+                    payAmount: _self.payInfo.payUnpaidAmount * 100,
+                    bankCode: _self.payInfo.payBankNum,
+                    returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
+                    orderId: _self.payInfo.payOrderId,
+                    userType: _self.payInfo.payUserType
+                };
+                _self.PayOrderPcMallPay(params);
             }
         },
         // 网银支付超级会员

+ 12 - 7
src/main/resources/static/js/user-center/setting/information.js

@@ -92,8 +92,16 @@ var informationPage = new Vue({
     },
     computed: {
 
+    },
+    watch: {
+
     },
     methods: {
+        handleChangeType: function(type){
+            if(type === parseInt(this.clubUpgradeUser.firstClubType)) return;
+            this.userMainPros = [];
+            this.clubUpgradeUser.secondClubType = (type === 1 ? 1 : 5);
+        },
         infoInformationData:function(){
             var _self = this;
             UserApi.GetApplicationData({userId:_self.userId},function (response) {
@@ -117,7 +125,7 @@ var informationPage = new Vue({
                     _self.clubUpgradeUser.firstClubType = data.club.firstClubType ? data.club.firstClubType : null;
                     _self.clubUpgradeUser.secondClubType = data.club.secondClubType ? data.club.secondClubType :null;
                     _self.clubUpgradeUser.address = data.club.address ? data.club.address : null;
-                    console.log('1111111111111111111');
+                    _self.firstClubType = _self.clubUpgradeUser.firstClubType;
                     if( _self.clubUpgradeUser.firstClubType == 1){
                         if(data.club.mainProduct){
                             _self.userMainPros = _self.setNewMainpro(data.club.mainProduct);
@@ -149,20 +157,20 @@ var informationPage = new Vue({
             var _self = this;
             var params ={};
             var pass = verifyForm();
-             if (!pass) {return false;}
+            if (!pass) {return false;}
             if(_self.userIdentity === 2) {
                 if (_self.clubUpgradeUser.townId == 0 || _self.clubUpgradeUser.address == '') {
                     _self.flagshow = true;
                     setTimeout(function () {
                         _self.flagshow = false;
-                    }, 2000)
+                    }, 2000);
                     return;
                 }
                 if (_self.clubUpgradeUser.businessLicense == '' || _self.clubUpgradeUser.businessLicense == null) {
                     _self.businessflag = true;
                     setTimeout(function () {
                         _self.businessflag = false;
-                    }, 2000)
+                    }, 2000);
                     return;
                 }
                 if (_self.clubUpgradeUser.firstClubType == '' || _self.clubUpgradeUser.firstClubType == null) {
@@ -433,9 +441,6 @@ var informationPage = new Vue({
         showViewerImageFn2:function(){//预览资质图片
             var viewer = new Viewer(document.getElementById('medicalPracticeLicenseImg'));
         },
-    },
-    created: function () {
-
     },
     mounted: function () {
         var _self = this;

+ 5 - 0
src/main/resources/static/js/user-center/setting/upgrade.js

@@ -70,6 +70,11 @@ var upgradePage = new Vue({
 
     },
     methods: {
+        handleChangeType: function(type){
+            if(type === parseInt(this.clubUpgradeUser.firstClubType)) return;
+            this.userMainPros = [];
+            this.clubUpgradeUser.secondClubType = (type === 1 ? 1 : 5);
+        },
         infoInformationData:function(){//机构资料初始化
             var _self = this;
             UserApi.GetApplicationData({userId:_self.clubUpgradeUser.userId},function (response) {

+ 2 - 2
src/main/resources/templates/account/register-club.html

@@ -144,8 +144,8 @@
                 </div>
                 <div class="formLine">
                     <p id="firstClubType"><em>*</em>机构类型:</p>
-                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1"  @change="ChangeFirstClubType"><i class="icon mIcon">医美</i></label>
-                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked  @change="ChangeFirstClubType"><i class="icon mIcon">生美</i></label>
+                    <label class="diyBox" @click="handleChangeType(1)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1"  @change="ChangeFirstClubType"><i class="icon mIcon">医美</i></label>
+                    <label class="diyBox" @click="handleChangeType(2)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked  @change="ChangeFirstClubType"><i class="icon mIcon">生美</i></label>
                     <span class="errTips icon mIcon" tips="请选择公司类型"></span>
                 </div>
                 <!-- 医美 -->

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

@@ -19,7 +19,7 @@
     <div class="container" v-if="!isErrorShow">
         <div class="pay-content clear">
             <div class="pay-title">
-                <div class="title-left"><p><span id="userName">{{userName}}</span></p></div>
+                <div class="title-left"><p><span id="userName">{{ userName }}</span></p></div>
                 <div class="title-right">
                     <div class="time">
                         <span id="downHour">{{downHour}}</span>
@@ -77,7 +77,7 @@
                 </div>
             </template>
             <!--购买会员-->
-            <template v-else-if="vipId !== null">
+            <template v-else-if="type === 2">
                 <div class="pay-svip">
                     <div class="pay-svip-title">购买超级会员</div>
                     <div class="content">
@@ -85,7 +85,7 @@
                             <div class="tit">支付金额</div>
                             <div class="pay-amount"><span>¥</span>{{ unpaidAmount | NumFormat }}</div>
                         </div>
-                        <div class="svip-indent">套餐12个月</div>
+                        <div class="svip-indent">套餐{{ vipMonth }}个月</div>
                     </div>
                 </div>
             </template>

+ 2 - 2
src/main/resources/templates/user-center/setting/information.html

@@ -115,8 +115,8 @@
                             </div>
                             <div class="formLine">
                                 <p id="firstClubType"><em>*</em>机构类型:</p>
-                                <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1"><i class="icon mIcon">医美</i></label>
-                                <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked><i class="icon mIcon">生美</i></label>
+                                <label class="diyBox" @click="handleChangeType(1)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1"><i class="icon mIcon">医美</i></label>
+                                <label class="diyBox" @click="handleChangeType(2)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked><i class="icon mIcon">生美</i></label>
                                 <span class="errTips icon mIcon" tips="" :class="typeflag?'show':''">请选择公司类型</span>
                             </div>
                             <!-- 医美 -->

+ 2 - 2
src/main/resources/templates/user-center/setting/upgrade.html

@@ -108,8 +108,8 @@
                             </div>
                             <div class="formLine">
                                 <p><em>*</em>机构类型:</p>
-                                <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1" ><i class="icon mIcon">医美</i></label>
-                                <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked><i class="icon mIcon">生美</i></label>
+                                <label class="diyBox" @click="handleChangeType(1)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1" ><i class="icon mIcon">医美</i></label>
+                                <label class="diyBox" @click="handleChangeType(2)"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="2" checked><i class="icon mIcon">生美</i></label>
                                 <span class="errTips icon mIcon" tips="" :class="typeflag?'show':''">请选择公司类型</span>
                             </div>
                             <!-- 医美 -->