소스 검색

bug修复

喻文俊 3 년 전
부모
커밋
fa2f385b31

+ 11 - 11
src/main/resources/config/dev/application-dev.yml

@@ -4,14 +4,14 @@ spring:
   #数据源连接--start
   datasource:
     #本地连接数据库
-    driverClassName: com.mysql.jdbc.Driver
-    url: jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
-    username: developer
-    password: 05bZ/OxTB:X+yd%1
-    #测试连接数据库
-    #url: jdbc:mysql://120.79.25.27:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    #driverClassName: com.mysql.jdbc.Driver
+    #url: jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
     #username: developer
-    #password: J5p3tgOVazNl4ydf
+    #password: 05bZ/OxTB:X+yd%1
+    #测试连接数据库
+    url: jdbc:mysql://120.79.25.27:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    username: developer
+    password: J5p3tgOVazNl4ydf
     #type: com.zaxxer.hikari.HikariDataSource
     hikari:
       minimum-idle: 5
@@ -54,10 +54,10 @@ logging:
 # 服务域名
 caimei:
   siteEnv: 0 #网站环境,(2:正式环境,1:测试环境,0:开发环境)
-  #spiServer: https://spi-b.caimei365.com
-  spiServer: http://192.168.2.68:8008
-  #coreServer: https://core-b.caimei365.com
-  coreServer: http://192.168.2.68:18002
+  spiServer: https://spi-b.caimei365.com
+  #spiServer: http://192.168.2.68:8008
+  coreServer: https://core-b.caimei365.com
+  #coreServer: http://192.168.2.68:18002
   imageDomain: https://img-b.caimei365.com
   wwwDomain: http:localhost:8009
   destPath: D:/_PLAN_WORKSPACE/test/static

+ 1 - 1
src/main/resources/static/css/product/instruement-list.css

@@ -55,7 +55,7 @@
     .productItem .price .price_text_tag .svip-tag{width:100%;height:22px;letter-spacing:0}
     .productItem .price .price_text_tag .svip-tag .svip-icon{position:relative;z-index:9;display:inline-block;width:30px;height:22px;text-align:center;line-height:22px;font-size:12px;font-weight:400;color:#F0CB72;opacity:1;background:#333333}
     .productItem .price .price_text_tag .svip-tag .svip-icon.btr{border-radius:2px 8px 0px 2px}
-    .productItem .price .price_text_tag .svip-tag .svip-price{z-index:1;position:relative;display:inline-block;padding-left:22px;padding-right:4px;margin-left:-27px;line-height:22px;background:#F0CB72;opacity:1;border-radius:2px;font-size:12px}
+    .productItem .price .price_text_tag .svip-tag .svip-price{z-index:1;position:relative;display:inline-block;padding-left:24px;padding-right:2px;margin-left:-27px;line-height:22px;background:#F0CB72;opacity:1;border-radius:2px;font-size:12px}
     .productItem .price .price_text_tag .svip-tag .svip-price span{color: #333}
 
 }

+ 1 - 1
src/main/resources/static/css/product/list.css

@@ -56,7 +56,7 @@ li{list-style:none}
     .productItem .price .svip-tag{width:100%;height:22px;letter-spacing:0}
     .productItem .price .svip-tag .svip-icon{position:relative;z-index:9;display:inline-block;width:30px;height:22px;text-align:center;line-height:22px;font-size:12px;font-weight:400;color:#F0CB72;opacity:1;background:#333333}
     .productItem .price .svip-tag .svip-icon.btr{border-radius:2px 8px 0px 2px}
-    .productItem .price .svip-tag .svip-price{z-index:1;position:relative;display:inline-block;padding-left:22px;padding-right:4px;margin-left:-27px;line-height:22px;background:#F0CB72;opacity:1;border-radius:2px;font-size:12px}
+    .productItem .price .svip-tag .svip-price{z-index:1;position:relative;display:inline-block;padding-left:24px;padding-right:2px;margin-left:-27px;line-height:22px;background:#F0CB72;opacity:1;border-radius:2px;font-size:12px}
     .productItem .price .svip-tag .svip-price span{color: #333}
 }
 /**

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

@@ -650,6 +650,10 @@ function setProductPrice(productList, productIds, userId, callback){
                         product.actStatus =item.actStatus;
                         product.couponsLogo =item.couponsLogo;
                         product.promotions =item.promotions;
+
+                        product.svipPriceTag =item.svipPriceTag;
+                        product.svipPriceType =item.svipPriceType;
+                        product.svipProductFlag =item.svipProductFlag;
                     }
                 });
             });

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

@@ -112,6 +112,10 @@ var payContainer = new Vue({
                 if(response.code == 0){
                     if(response.data === 0){
                         _self.isPaySwitch = true;
+                        if (_self.pageType === '2') {
+                            CAIMEI.dialog('支付系统遇到点小问题,请稍后重试', false);
+                            return;
+                        }
                         CAIMEI.Alert('线上支付功能正在维护中,请前往订单详情页面查看线下转账方式后进行付款','确定',true,function(){
                             window.location.href='/user/order/detail.html?orderId='+_self.payInfo.payOrderId;
                         });
@@ -123,6 +127,9 @@ var payContainer = new Vue({
         },
         PayMobileSubmitFn:function(){//点击移动支付方式
             var _self = this;
+            if(_self.pageType === '2'){
+                return _self.PayOrderOnLineSwitch();
+            }
             if(_self.invoiceStatus){
                 _self.layerConfirm();
             }else{
@@ -579,6 +586,7 @@ var payContainer = new Vue({
             PayApi.PayVipAliPay(params, function(response){
                 console.log(response);
                 if (response.code === 0) {
+                    _self.isPayAlert = true;
                     _self.mbOrderId = response.data.data.mbOrderId;
                     _self.payInfo.payMobileUrl = response.data.data.payUrl;
                     _self.payInfo.payData = {
@@ -601,16 +609,27 @@ var payContainer = new Vue({
         },
         // 微信支付会员
         payVipMiniWxPay: function(){
-            this.payInfo.payData = {//二手
-                type: this.payInfo.payBankNum,
-                vipId: this.comboInfo.id,
-                vipRecordId: this.vipRecordId,
-                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;
+            if (!isPC) {
+                var orderInfo = {//普通订单微信二维码参数
+                    pageType: 2,
+                    vipId: this.comboInfo.id,
+                    vipRecordId: this.vipRecordId,
+                    payAmount: this.payAmount
+                };
+                this.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";
+                location.href = this.payInfo.payMobileUrl;
+            } else {
+                this.payInfo.payData = {
+                    type: this.payInfo.payBankNum,
+                    vipId: this.comboInfo.id,
+                    vipRecordId: this.vipRecordId,
+                    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 () {
@@ -624,6 +643,7 @@ var payContainer = new Vue({
             _self.isRequest = true;
             _self.payStatusText = '';
         } else if (_self.pageType === '2') { // 支付会员
+            this.PayOrderOnLineSwitch();
             // 从本地获取选中的svip套餐信息后删除本地信息
             this.comboInfo = JSON.parse(CAIMEI.Storage.getItem('comboInfo'));
             // CAIMEI.Storage.removeItem('comboInfo');

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

@@ -46,7 +46,7 @@ var productList = new Vue({
                if( res.code==0){
                      _self.listData=[];
                      var result = JSON.parse(res.data);
-                     console.log(result)
+                     console.log(result);
                       _self.listRecord = result.total;
                        var resultData = setSearchProductList(result.items, _self.userId, function(){
                             _self.$forceUpdate();
@@ -55,6 +55,7 @@ var productList = new Vue({
                                 $("img[data-original]").lazyload();
                             },500);
                         });
+                        console.log(resultData);
                         if(isPC){
                             _self.listData = resultData;
                         }else{

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

@@ -117,6 +117,7 @@ var shoppingConfirm = new Vue({
         checkedIndex:null,
         couponList:[], // 可用优惠券列表
         isCouponShow:false,
+        svipReducedPrice: 0, //超级会员优惠金额
     },
     computed: {
 
@@ -169,6 +170,7 @@ var shoppingConfirm = new Vue({
                     _self.balance.userMoney = data.userMoney;
                     _self.balance.originUserMoney = data.userMoney;
                     _self.hanldShouldPayFee = data.totalPrice;
+                    _self.svipReducedPrice = data.svipReducedPrice;
                     _self.postageParam.productIds =  _self.getProductIds(data.list); // 获取订单商品id列表 以 , 隔开
                     console.log('邮费接口数据',  _self.postageParam)
                     _self.getAddressList(_self.userId,20);
@@ -206,6 +208,7 @@ var shoppingConfirm = new Vue({
                     _self.balance.userMoney = data.userMoney;
                     _self.balance.originUserMoney = data.userMoney;
                     _self.hanldShouldPayFee = data.totalPrice;
+                    _self.svipReducedPrice = data.svipReducedPrice;
                     _self.postageParam.productIds =  _self.getProductIds(data.list); // 获取订单商品id列表 以 , 隔开
                     _self.getAddressList(_self.userId,20);
                     console.log('邮费接口数据',  _self.postageParam)

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

@@ -87,7 +87,7 @@
                 </div>
                 <div class="method-content">
                     <div class="payment" id="mobilePayment" v-if="tabIndex === 0">
-                        <div class="payment-title">{{payStatusText}}</div>
+                        <div class="payment-title" v-if="pageType !== '2'">{{payStatusText}}</div>
                         <div class="pay-bank">
                             <div class="bank-list" id="mobileContent">
                                 <a v-if="!is_Wechat_bowcr" href="javascript:void(0);" class="bank-a mIcon" @click="checkMobilePay(0,'ALIPAY')" :class="{ active: mobileTabIndex === 0 }">

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

@@ -72,7 +72,7 @@
                             <em v-if="priceObj.priceFlag==1" v-text="'¥价格未公开'"></em>
                             <!--SVIP时的划线价格-->
                             <!--满足条件:只有开通会员才显示划线价格-->
-                            <em v-else-if="GLOBAL_VIP_FLAG === 1 && priceObj.svipPriceTag === 1">
+                            <em v-else-if="GLOBAL_VIP_FLAG === 1 && priceObj.svipProductFlag === 1">
                                 <del v-text="'¥'+parseFloat(priceObj.originalPrice).toFixed(2)"></del>
                             </em>
                             <!--可见价格 -->

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

@@ -95,7 +95,7 @@
                     </div>
                     <div class="c4">
                         <div class="price">
-                            <template v-if="GLOBAL_VIP_FLAG === 1 || (cart.actStatus==1 && cart.promotions && cart.promotions.type==1 && cart.promotions.mode==1)">
+                            <template v-if="(GLOBAL_VIP_FLAG === 1 && cart.svipProductFlag === 1)|| (cart.actStatus==1 && cart.promotions && cart.promotions.type==1 && cart.promotions.mode==1)">
                                 <del v-text="'¥'+toFloat(cart.originalPrice)"></del>
                             </template>
                             <template v-else>

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

@@ -337,6 +337,7 @@
                 <span v-if="hanldPostageFlag == 0">包邮</span>
                 <span v-if="hanldPostageFlag == 1"><em>¥{{ hanldPostage | NumFormat }}</em></span>
             </p>
+            <p v-if="svipReducedPrice>0 && GLOBAL_VIP_FLAG === 1">超级会员优惠: <span><em>- ¥{{svipReducedPrice | NumFormat}}</em></span></p>
             <p v-if="reducedPrice>0">促销满减: <span><em>- ¥{{reducedPrice | NumFormat}}</em></span></p>
             <p>优惠券: <span><em>- ¥{{couponAmount | NumFormat}}</em></span></p>
             <p v-if="balance.deductMoney>0">抵扣账户余额: <span><em>- ¥{{balance.deductMoney | NumFormat}}</em></span></p>

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

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

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

@@ -41,7 +41,7 @@
                         <template v-if="comboInfo.length > 0">
                             <div>
                                 <template v-for="(item, index) in comboInfo">
-                                    <div class="combo" :class="{active: index === currentIndex,recommend: item.recommend}"
+                                    <div class="combo" :class="{active: index === currentIndex,recommend: index === 0}"
                                          :key="index" @click="chooseCombo(index)">
                                         <div class="how-mounts">{{ item.duration }}个月</div>
                                         <div class="price"><i>¥</i>{{ item.price }}</div>
@@ -150,7 +150,7 @@
             <template v-if="comboInfo.length > 0">
                 <div>
                     <template v-for="(item, index) in comboInfo">
-                        <div class="combo" :class="{active: index === currentIndex,recommend: item.recommend}"
+                        <div class="combo" :class="{active: index === currentIndex,recommend: index === 0}"
                              :key="index" @click="chooseCombo(index)">
                             <div class="how-mounts">{{ item.duration }}个月</div>
                             <div class="price"><i>¥</i>{{ item.price }}</div>