Ver código fonte

Merge remote-tracking branch 'origin/developerD' into developerD

Aslee 3 anos atrás
pai
commit
e0852f7f27

+ 6 - 4
src/main/resources/static/js/pay/caimei-code.js

@@ -7,7 +7,8 @@ var payContainer = new Vue({
         orderInfo:{}
     },
     methods: {
-        authRedirect:function (orderInfo) {
+        authRedirect:function () {
+            var orderInfo = CAIMEI.getUrlParam('orderInfo');
             var wechatPayUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize';
             var appId = 'wx91c4152b60ca91a3';
             var redirect_uri = 'https://www-b.caimei365.com/pay/wechatpay.html';
@@ -15,9 +16,10 @@ var payContainer = new Vue({
             window.location.href = url;
         }
     },
+    created:function () {
+        this.authRedirect()
+    },
     mounted: function () {
-        var _self = this;
-        var orderInfo = CAIMEI.getUrlParam('orderInfo');
-        _self.authRedirect(orderInfo)
+
     }
 });

+ 17 - 6
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -184,9 +184,8 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
-
                     }else{
                         timer = setTimeout(function(){
                             _self.setTimerWechatPay()
@@ -200,7 +199,7 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
                     }else{
                         timer = setTimeout(function(){
@@ -215,7 +214,7 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
 
                     }else{
@@ -235,8 +234,8 @@ var payContainer = new Vue({
                     CAIMEI.dialog('支付成功');
                     clearTimeout(timer); //清理定时任务
                     setTimeout(function(){
-                        window.location.href = '/index.html';
-                    },3000);
+                        _self.windowLocationHref()
+                    },2000);
                 }else{
                     timer = setTimeout(function(){
                         _self.setTimerAliPay()
@@ -244,6 +243,18 @@ var payContainer = new Vue({
                 }
             });
         },
+        windowLocationHref:function(){
+            var _self = this;
+            if( _self.pageType === '1'){
+                window.location.href = '/pay/success.html?pageType=second&type=success&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '2'){
+                window.location.href = '/pay/success.html?pageType=vip&type=success&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '3') {
+                window.location.href = '/pay/success.html?pageType=coupon&type=success&payAmount=' + _self.payAmount;
+            }else{
+                window.location.href = '/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount;
+            }
+        },
         hidePayAlert:function(){//隐藏已支付弹窗
             var _self = this;
             _self.isPayAlert = false;

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

@@ -53,30 +53,40 @@ var payContainer = new Vue({
         },
         hlbWechatPayFn:function () {// 合利宝
             console.log('=========>合利宝')
-            if (this.pageType == 1) {// 二手
-                this.hlb_WxRequestsecondHandPay();
-            } else if (this.pageType == 2) {
-                this.hlb_WxRequestPaymentVipFn();
-            } else if (this.pageType == 3) {
-                this.hlb_WxRequestPaymentCouponFn();
-            } else if (this.pageType === 4){
-                this.hlb_WxRequestPaymentAuthVipFn();
-            } else {
-                this.hlb_WxRequestPaymentFn();
+            switch (this.pageType) {
+                case 1:// 二手
+                    this.hlb_WxRequestsecondHandPay();
+                    break;
+                case 2:// 超级会员
+                    this.hlb_WxRequestPaymentVipFn();
+                    break;
+                case 3:// 优惠券
+                    this.hlb_WxRequestPaymentCouponFn();
+                    break;
+                case 4:// 认证通会员
+                    this.hlb_WxRequestPaymentAuthVipFn();
+                    break;
+                default:// 订单
+                    this.hlb_WxRequestPaymentFn();
             }
         },
         mhWechatPayFn:function () {// 米花
             console.log('=========>米花')
-            if (this.pageType == 1) {
-                this.mh_WxRequestsecondHandPay();
-            } else if (this.pageType == 2) {
-                this.mh_WxRequestPaymentVipFn();
-            } else if (this.pageType == 3) {
-                this.mh_WxRequestPaymentCouponFn();
-            } else if (this.pageType === 4){
-                this.mh_WxRequestPaymentAuthVipFn();
-            } else {
-                this.mh_WxRequestPaymentFn();
+            switch (this.pageType) {
+                case 1:// 二手
+                    this.mh_WxRequestsecondHandPay();
+                    break;
+                case 2:// 超级会员
+                    this.mh_WxRequestPaymentVipFn();
+                    break;
+                case 3:// 优惠券
+                    this.mh_WxRequestPaymentCouponFn();
+                    break;
+                case 4:// 认证通会员
+                    this.mh_WxRequestPaymentAuthVipFn();
+                    break;
+                default:// 订单
+                    this.mh_WxRequestPaymentFn();
             }
         },
         rand:function (min,max) {//随机数

+ 1 - 1
src/main/resources/static/js/pay/mixin/hlb_payMixin.js

@@ -200,7 +200,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				PayApi.PayVipPcMallPay(params, function (response) {
 					if (response.code == 0) {
 						_this.isPayAlert = true;
-						_this.iframe = response.data
+						_this.iframe = response.data;
 						_this.$nextTick(() => {
 							var onlineForm = document.getElementById('onlineForm');
 							onlineForm.setAttribute('target', '_blank')

+ 7 - 6
src/main/resources/static/js/pay/mixin/hlb_wxMixin.js

@@ -5,22 +5,23 @@ var hlbWechatMixin = function () {
 		methods: {
 			hlb_WxRequestPaymentFn:function(){ // 普通订单合利宝公众号支付
 				var _this = this;
+				_this.isSubMitStatus=true;
 				var params={
 					payType:'GZH',
-					payAmount:Math.round(_this.payAmount),
+					payAmount:parseFloat(_this.payAmount),
 					code:_this.wechatcode,
 					state:_this.rand(1000,9999),
 					shopOrderId:_this.shopOrderId,
 					returnUrl:'https://www.caimei365.com/',
 				};
 				console.log('=========>普通订单合利宝公众号支付',params)
-				_this.isSubMitStatus=true;
 				PayApi.PayOrderPcScanWxPay(params,function(response){
 					_this.hlb_handlResponse(response)
 				})
 			},
 			hlb_WxRequestPaymentVipFn: function(){ // 超级会员合利宝公众号支付
 				var _this = this;
+				_this.isSubMitStatus=true;
 				var params = {
 					payType:'GZH',
 					code: _this.wechatcode,
@@ -30,13 +31,13 @@ var hlbWechatMixin = function () {
 					returnUrl: 'https://www.caimei365.com/',
 				};
 				console.log('=========>超级会员合利宝公众号支付',params)
-				_this.isSubMitStatus=true;
 				PayApi.PayVipMiniWxPay(params,function(response){
 					_this.hlb_handlResponse(response)
 				});
 			},
 			hlb_WxRequestPaymentCouponFn: function(){// 优惠券合利宝公众号支付
 				var _this = this;
+				_this.isSubMitStatus=true;
 				var params = {
 					payType:'GZH',
 					code: _this.wechatcode,
@@ -48,13 +49,13 @@ var hlbWechatMixin = function () {
 					source:2 //支付来源 1 小程序 2 WWW
 				};
 				console.log('=========>优惠券合利宝公众号支付',params)
-				_this.isSubMitStatus=true;
 				PayApi.PayCouponMiniWxPay(params,function(response){
 					_this.hlb_handlResponse(response)
 				});
 			},
 			hlb_WxRequestPaymentAuthVipFn: function(){// 认证通会员合利宝公众号支付
 				var _this = this;
+				_this.isSubMitStatus=true;
 				var params = {
 					payType:'GZH',
 					code: _this.wechatcode,
@@ -64,13 +65,14 @@ var hlbWechatMixin = function () {
 					returnUrl: 'https://www.caimei365.com/',
 				};
 				console.log('=========>认证通会员合利宝公众号支付',params)
-				_this.isSubMitStatus=true;
+
 				PayApi.PayAuthVipMiniWxPay(params,function(response){
 					_this.hlb_handlResponse(response)
 				});
 			},
 			hlb_WxRequestsecondHandPay:function(){ // 二手发布合利宝公众号支付
 				var _this = this;
+				_this.isSubMitStatus=true;
 				var params = {
 					payType:'GZH',
 					code: _this.wechatcode,
@@ -79,7 +81,6 @@ var hlbWechatMixin = function () {
 					returnUrl: 'https://www.caimei365.com/',
 				};
 				console.log('=========>二手发布合利宝公众号支付',params)
-				_this.isSubMitStatus=true;
 				PayApi.PayOrdersecondWechat(params,function(response){
 					_this.hlb_handlResponse(response)
 				});

+ 4 - 3
src/main/resources/static/js/shopping/confirm.js

@@ -661,7 +661,7 @@ var shoppingConfirm = new Vue({
             var _self = this;
             if( _self.totalPrice<1000){
                 _self.isModelAlert = true;
-                _self.isModelAlertText = '采购金额过小,将扣除500采美豆。建议您使用微信扫描 以下二维码,进入采美旗下“呵呵商城”小程序购买小额 商品。';
+                _self.isModelAlertText = '采购金额过小,将扣除500采美豆。建议您使用微信扫描 以下二维码,进入采美旗下“颜选美学”小程序购买小额 商品。';
             }else{
                 _self.handleClickOrderSubmitMit()
             }
@@ -765,13 +765,13 @@ var shoppingConfirm = new Vue({
                     _self.isModelAlert = true;
                     _self.isShowConfirm = false;
                     _self.submitLoading = false;
-                    _self.isModelAlertText = '您已有2个采购金额过小的订单,本次不能再进行采购。您可使用微信扫描以下二维码,进入采美旗下“呵呵商城”小程序购买小额商品。';
+                    _self.isModelAlertText = '您已有2个采购金额过小的订单,本次不能再进行采购。您可使用微信扫描以下二维码,进入采美旗下“颜选美学”小程序购买小额商品。';
                     _self.formatConfirmParam();
                 }else if(res.code === -4){
                     _self.isModelAlert = true;
                     _self.isShowConfirm = false;
                     _self.submitLoading = false;
-                    _self.isModelAlertText = '采美豆不足,不能提交订单。您可使用微信扫描以下二维码,进入采美旗下“呵呵商城”小程序购买小额商品。';
+                    _self.isModelAlertText = '采美豆不足,不能提交订单。您可使用微信扫描以下二维码,进入采美旗下“颜选美学”小程序购买小额商品。';
                     _self.formatConfirmParam();
                 }else{
                     CAIMEI.Alert(res.msg,'确定',true, function(){
@@ -809,6 +809,7 @@ var shoppingConfirm = new Vue({
         var urlType = getUrlParam("type") ? getUrlParam("type")*1 : "";
         if(globalUserData){
             _self.userId = _self.productParam.userId = _self.cartParam.userId = _self.postageParam.userId = _self.supportParm.userId =   globalUserData.userId;
+            _self.confirmParam.unionId = globalUserData.unionId ? globalUserData.unionId : '';
             _self.confirmParam.clubId = globalUserData.clubId
             _self.userIdentity = globalUserData.identity;
             _self.userToken = globalUserData.token;

+ 2 - 2
src/main/resources/templates/components/footer.html

@@ -31,8 +31,8 @@
                     <div class="foot-icon hehe">
                         <i class="icon mIcon icon-hehe"></i>
                     </div>
-                    <div class="foot-code"><img src="/img/common/qr_code_yan.jpg" alt="采美商城"></div>
-                    <P>呵呵商城</P>
+                    <div class="foot-code"><img src="/img/common/qr_code_yan.jpg" alt="颜选美学"></div>
+                    <P>颜选美学</P>
                 </div>
                 <div class="item">
                     <div class="foot-icon caimei">

+ 1 - 1
src/main/resources/templates/components/header.html

@@ -79,7 +79,7 @@
                         <select>
                             <option value="0">产品</option>
                             <option value="1">供应商</option>
-                            <option value="2">项目仪器</option>
+<!--                            <option value="2">项目仪器</option>-->
                         </select>
                     </div>
                     <input class="keyword" type="text" placeholder="请输入搜索关键词" maxlength="30"/>

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

@@ -414,7 +414,7 @@
                 <p class="small" v-if="userBeans<0">注:采购金额过小的订单,需要扣除500采美豆</p>
             </div>
             <div class="content-image">
-                <img src="/img/common/qr_code_hehe.jpg" alt="呵呵商城">
+                <img src="/img/common/qr_code_hehe.jpg" alt="颜选美学">
             </div>
             <div class="button" id="payButton">
                 <template v-if="isShowConfirm">

+ 3 - 3
src/main/resources/templates/user-center/order/detail.html

@@ -66,9 +66,9 @@
                                     <p>待付金额:<span class="red">¥{{orderInfo.pendingPayments | NumFormat}}</span> </p>
                                 </div>
                                 <div class="order-item">
-                                    <p v-if="orderInfo.freePostFlag == '0'">运费:<span class="none">包邮</span> </p>
-                                    <p v-if="orderInfo.freePostFlag == '-1'">运费:<span class="none">到付</span> </p>
-                                    <p v-if="orderInfo.freePostFlag == '1'">运费:<span class="none">¥{{orderInfo.freight | NumFormat}}</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '0'">运费:<span class="none">包邮</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '-1'">运费:<span class="none">到付</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '1'">运费:<span class="none">¥{{orderInfo.postage | NumFormat}}</span> </p>
                                     <p v-if="orderInfo.userBeans>0">采美豆抵用运费:<span class="none" >{{orderInfo.userBeans }}</span> </p>
                                     <p v-if="orderInfo.discountFee>0">经理折扣:<span class="none">¥{{orderInfo.discountFee | NumFormat}}</span> </p>
                                     <p v-if="orderInfo.promotionFullReduction>0">促销满减:<span class="red">¥{{orderInfo.promotionFullReduction | NumFormat}}</span> </p>