пре 4 година
родитељ
комит
da84b78423

+ 12 - 8
pages/Pay/css/pay.css

@@ -235,16 +235,18 @@ page {
 .container .pop-up .top .close {
   position: relative;
   width: 120rpx;
-  height: 90rpx;
+  height: 80rpx;
   background: #e7eef5;
 }
 
-.container .pop-up .top .close image {
+.container .pop-up .top .close .image {
   position: absolute;
   top: 40%;
   left: 50%;
-  max-width: 18rpx;
-  max-height: 18rpx;
+  width: 18rpx;
+  height: 18rpx;
+  background-image: url(../../static/images/close.png);
+  background-size: 100%;
 }
 
 .container .pop-up .name,
@@ -354,16 +356,18 @@ page {
 .container .leaveMess .top .close {
   position: relative;
   width: 120rpx;
-  height: 90rpx;
+  height: 80rpx;
   background: #e7eef5;
 }
 
-.container .leaveMess .top .close image {
+.container .leaveMess .top .close .image {
   position: absolute;
   top: 40%;
   left: 50%;
-  max-width: 18rpx;
-  max-height: 18rpx;
+  width: 18rpx;
+  height: 18rpx;
+  background-image: url(../../static/images/close.png);
+  background-size: 100%;
 }
 
 .container .leaveMess .name,

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
pages/Pay/css/pay.min.css


+ 12 - 8
pages/Pay/css/pay.scss

@@ -216,14 +216,16 @@ page {
             .close {
                 position: relative;
                 width: 120rpx;
-                height: 90rpx;
+                height: 80rpx;
                 background: #e7eef5;
-                image {
+                .image {
                     position: absolute;
                     top: 40%;
                     left: 50%;
-                    max-width: 18rpx;
-                    max-height: 18rpx;
+                    width: 18rpx;
+                    height: 18rpx;
+                    background-image: url(../../static/images/close.png);
+                    background-size: 100%;
                 }
             }
         }
@@ -321,14 +323,16 @@ page {
             .close {
                 position: relative;
                 width: 120rpx;
-                height: 90rpx;
+                height: 80rpx;
                 background: #e7eef5;
-                image {
+                .image {
                     position: absolute;
                     top: 40%;
                     left: 50%;
-                    max-width: 18rpx;
-                    max-height: 18rpx;
+                    width: 18rpx;
+                    height: 18rpx;
+                    background-image: url(../../static/images/close.png);
+                    background-size: 100%;
                 }
             }
         }

+ 96 - 24
pages/Pay/pay.vue

@@ -4,7 +4,16 @@
       <!-- 这里是状态栏 -->
     </view>
     <view class="order">订单号:{{ orderNo }}</view>
-    <view class="mark" v-show="showSearch || showLeaveMess"></view>
+    <view
+      class="mark"
+      v-show="showSearch || showLeaveMess"
+      @click="
+        () => {
+          this.showLeaveMess = false;
+          this.showSearch = false;
+        }
+      "
+    ></view>
     <view class="messageBg1"></view>
     <view class="messageBg2"></view>
     <view class="messageCard">
@@ -72,11 +81,7 @@
       <view class="top">
         <text>代缴人信息</text>
         <view class="close" @click="close1">
-          <image
-            src="../../static/images/close.png"
-            mode="scaleToFill"
-            @click="close1"
-          />
+          <view class="image"></view>
         </view>
       </view>
       <view class="name">
@@ -111,11 +116,7 @@
       <view class="top">
         <text>信息反馈</text>
         <view class="close" @click="close2">
-          <image
-            src="../../static/images/close.png"
-            mode="scaleToFill"
-            @click="close2"
-          />
+          <view class="image"></view>
         </view>
       </view>
       <view class="name">
@@ -166,6 +167,8 @@ export default {
       payStatu1: true,
       payStatu2: false,
       homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi",
+      notifyUrl:
+        "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/pay/jxnxs/notify/",
       openId: "",
       orderNo: "", //订单号
       cardNumber: "",
@@ -203,20 +206,21 @@ export default {
     //获取cardNumber
     loginFilter() {
       let cardNumber = localStorage.getItem("cardNumber");
+
       if (!cardNumber) {
         let cardNumber = this.getQueryString("cardNumber");
         let error = this.getQueryString("error");
-        let homeWeb =
-          "https://open.wecard.qq.com/connect/oauth/authorize?app_key=2DDC9DBF32F28845&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/weixiao/auth/&connect=curLogin&state=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/weixiao/auth/";
-        if (!cardNumber) {
-          window.location.href = homeWeb;
-        } else if (error) {
+        let errorMsg = this.getQueryString("errorMsg");
+        let homeWeb = `https://open.wecard.qq.com/connect/oauth/authorize?app_key=2DDC9DBF32F28845&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=${this.homeUrl}/wechat/weixiao/auth/&connect=curLogin&state=${this.homeUrl}/wechat/weixiao/auth/`;
+        if (error) {
           uni.showToast({
-            title: "cardNumber获取失败",
+            title: errorMsg,
             icon: "error",
             mask: true,
             duration: 1000,
           });
+        } else if (!cardNumber) {
+          window.location.href = homeWeb;
         } else {
           localStorage.setItem("cardNumber", cardNumber);
           this.getDetailMess();
@@ -229,8 +233,11 @@ export default {
     //换取详情信息
     getDetailMess() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let url = that.homeUrl + "/tuitionpayment/payableinfo/payableInfo";
+
       uni.request({
         url: url,
         data: {},
@@ -272,6 +279,7 @@ export default {
     getPayDetail(len) {
       //获取明细款项名称数组
       var arr = len.match(/[^\\u4e00-\\u9fa5]+/g);
+      //过滤
       var itemIdArr = arr.filter(function (value) {
         return value !== ".";
       });
@@ -295,17 +303,17 @@ export default {
       if (!openId) {
         let openId = this.getQueryString("openId");
         let error = this.getQueryString("error");
-        let homeWeb =
-          "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd87cbe1db0437303&redirect_uri=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/pub/auth&response_type=code&scope=snsapi_base&state=pages/Pay/pay#wechat_redire";
-        if (!openId) {
-          window.location.href = homeWeb;
-        } else if (error) {
+        let errorMsg = this.getQueryString("errorMsg");
+        let homeWeb = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd87cbe1db0437303&redirect_uri=${this.homeUrl}/wechat/pub/auth&response_type=code&scope=snsapi_base&state=pages/Pay/pay#wechat_redire`;
+        if (error) {
           uni.showToast({
-            title: "openId获取失败",
+            title: errorMsg,
             icon: "error",
             mask: true,
             duration: 1000,
           });
+        } else if (!openId) {
+          window.location.href = homeWeb;
         } else {
           localStorage.setItem("openId", openId);
         }
@@ -326,9 +334,12 @@ export default {
     //获取订单号
     getOrderNo() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let url =
         that.homeUrl + `/tuitionpayment/payorder/${that.studentNo}/create`;
+
       uni.request({
         url: url,
         data: {},
@@ -351,7 +362,42 @@ export default {
               duration: 2000,
             });
           } else {
-            that.getwxParam(); //拿微信支付参数
+            that.getPayMethod();
+          }
+        },
+        fail: (error) => {},
+      });
+    },
+
+    //获取支付方式
+    getPayMethod() {
+      let url = this.homeUrl + "/payMethodSetting/currentPay";
+
+      uni.request({
+        url: url,
+        data: {},
+        header: {
+          Accept: "application/json",
+          "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
+          "X-Requested-With": "XMLHttpRequest",
+        },
+        method: "GET",
+        sslVerify: true,
+        success: ({ data, statusCode, header }) => {
+          let res = data.data;
+          if (data.success) {
+            if (res.currentPayMethod === "1") {
+              this.getwxParam();
+            } else {
+              this.nsPay();
+            }
+          } else {
+            uni.showToast({
+              title: data.message,
+              icon: "error",
+              mask: true,
+              duration: 1000,
+            });
           }
         },
         fail: (error) => {},
@@ -361,9 +407,13 @@ export default {
     //获取微信支付参数
     getwxParam() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let openId = localStorage.getItem("openId");
+
       let url = that.homeUrl + "/pay/ccb/getJsApiParam";
+
       uni.request({
         url: url,
         data: {
@@ -404,6 +454,7 @@ export default {
     //吊起微信支付
     wxPay() {
       let that = this;
+
       function onBridgeReady() {
         WeixinJSBridge.invoke(
           "getBrandWCPayRequest",
@@ -439,11 +490,29 @@ export default {
       }
     },
 
+    //拉起农商行支付
+    nsPay() {
+      let O = "5494ec3310685daa218382619dd20e27";
+
+      let out_no = this.orderNo;
+
+      let amount = this.realPayAmount;
+
+      let appoint_notify = this.notifyUrl;
+
+      let mainUrl = `https://q.jxnxs.com/newpay?O=${O}&out_no=${out_no}&amount=${amount}&appoint_notify=${appoint_notify}`;
+
+      window.location.href = mainUrl;
+    },
+
     //获取当前URL指定参数
     getQueryString(name) {
       let url = window.location.href; // 获取URL
+
       let pattern = new RegExp("[\?\&]" + name + "=([^\&]+)", "i"); // 正则匹配URL
+
       let matcher = pattern.exec(url);
+
       if (matcher == null || matcher.length < 1) {
         return false;
       }
@@ -516,8 +585,11 @@ export default {
     //提交反馈信息
     putMess() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let url = that.homeUrl + "/tuitionpayment/feedbackmsg/save";
+
       uni.request({
         url: url,
         data: {

+ 6 - 4
pages/parentPay/css/parentPay.css

@@ -132,16 +132,18 @@ page {
 .content1 .pop-up .top .close {
   position: relative;
   width: 120rpx;
-  height: 90rpx;
+  height: 80rpx;
   background: #e7eef5;
 }
 
-.content1 .pop-up .top .close image {
+.content1 .pop-up .top .close .image {
   position: absolute;
   top: 40%;
   left: 50%;
-  max-width: 18rpx;
-  max-height: 18rpx;
+  width: 18rpx;
+  height: 18rpx;
+  background-image: url(../../static/images/close.png);
+  background-size: 100%;
 }
 
 .content1 .pop-up .name,

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
pages/parentPay/css/parentPay.min.css


+ 6 - 4
pages/parentPay/css/parentPay.scss

@@ -117,14 +117,16 @@ page {
             .close {
                 position: relative;
                 width: 120rpx;
-                height: 90rpx;
+                height: 80rpx;
                 background: #e7eef5;
-                image {
+                .image {
                     position: absolute;
                     top: 40%;
                     left: 50%;
-                    max-width: 18rpx;
-                    max-height: 18rpx;
+                    width: 18rpx;
+                    height: 18rpx;
+                    background-image: url(../../static/images/close.png);
+                    background-size: 100%;
                 }
             }
         }

+ 73 - 13
pages/parentPay/parentPay.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="container">
     <view class="content1" v-if="content1">
-      <view class="mark" v-show="showSearch"></view>
+      <view class="mark" v-show="showSearch" @click="close1"></view>
       <view class="messageBg1"></view>
       <view class="messageBg2"></view>
       <view class="messageCard">
@@ -13,11 +13,7 @@
         <view class="top">
           <text>代缴人信息</text>
           <view class="close" @click="close1">
-            <image
-              src="../../static/images/close.png"
-              mode="scaleToFill"
-              @click="close1"
-            />
+            <view class="image"></view>
           </view>
         </view>
         <view class="name">
@@ -121,6 +117,8 @@ export default {
       payStatu1: true,
       payStatu2: false,
       homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi",
+      notifyUrl:
+        "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/pay/jxnxs/notify/",
       openId: "",
       cardNumber: "",
       orderNo: "", //订单号
@@ -151,20 +149,21 @@ export default {
     //获取openId
     getOpenId() {
       let openId = localStorage.getItem("openId");
+
       if (!openId) {
         let openId = this.getQueryString("openId");
         let error = this.getQueryString("error");
-        let homeWeb =
-          "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd87cbe1db0437303&redirect_uri=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/pub/auth&response_type=code&scope=snsapi_base&state=pages/parentPay/parentPay#wechat_redire";
-        if (!openId) {
-          window.location.href = homeWeb;
-        } else if (error) {
+        let errorMsg = this.getQueryString("errorMsg");
+        let homeWeb = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd87cbe1db0437303&redirect_uri=${this.homeUrl}/wechat/pub/auth&response_type=code&scope=snsapi_base&state=pages/parentPay/parentPay#wechat_redire`;
+        if (error) {
           uni.showToast({
-            title: "openId获取失败",
+            title: errorMsg,
             icon: "error",
             mask: true,
             duration: 1000,
           });
+        } else if (!openId) {
+          window.location.href = homeWeb;
         } else {
           localStorage.setItem("openId", openId);
         }
@@ -270,9 +269,12 @@ export default {
     //获取订单号
     getOrderNo() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let url =
         that.homeUrl + `/tuitionpayment/payorder/${that.studentNo}/create`;
+
       uni.request({
         url: url,
         data: {},
@@ -295,19 +297,73 @@ export default {
               duration: 2000,
             });
           } else {
-            that.getwxParam(); //拿微信支付参数
+            that.getPayMethod();
+          }
+        },
+        fail: (error) => {},
+      });
+    },
+
+    //获取支付方式
+    getPayMethod() {
+      let url = this.homeUrl + "/payMethodSetting/currentPay";
+
+      uni.request({
+        url: url,
+        data: {},
+        header: {
+          Accept: "application/json",
+          "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
+          "X-Requested-With": "XMLHttpRequest",
+        },
+        method: "GET",
+        sslVerify: true,
+        success: ({ data, statusCode, header }) => {
+          let res = data.data;
+          if (data.success) {
+            if (res.currentPayMethod === "1") {
+              this.getwxParam();
+            } else {
+              this.nsPay();
+            }
+          } else {
+            uni.showToast({
+              title: data.message,
+              icon: "error",
+              mask: true,
+              duration: 1000,
+            });
           }
         },
         fail: (error) => {},
       });
     },
 
+    //拉起农商行支付
+    nsPay() {
+      let O = "5494ec3310685daa218382619dd20e27";
+
+      let out_no = this.orderNo;
+
+      let amount = this.realPayAmount;
+
+      let appoint_notify = this.notifyUrl;
+
+      let mainUrl = `https://q.jxnxs.com/newpay?O=${O}&out_no=${out_no}&amount=${amount}&appoint_notify=${appoint_notify}`;
+
+      window.location.href = mainUrl;
+    },
+
     //获取微信支付参数
     getwxParam() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let openId = localStorage.getItem("openId");
+
       let url = that.homeUrl + "/pay/ccb/getJsApiParam";
+
       uni.request({
         url: url,
         data: {
@@ -348,6 +404,7 @@ export default {
     //吊起微信支付
     wxPay() {
       let that = this;
+
       function onBridgeReady() {
         WeixinJSBridge.invoke(
           "getBrandWCPayRequest",
@@ -386,8 +443,11 @@ export default {
     //获取当前URL指定参数
     getQueryString(name) {
       let url = window.location.href; // 获取URL
+
       let pattern = new RegExp("[\?\&]" + name + "=([^\&]+)", "i"); // 正则匹配URL
+
       let matcher = pattern.exec(url);
+
       if (matcher == null || matcher.length < 1) {
         return false;
       }

+ 6 - 3
pages/paySuccess/css/paySuccess.css

@@ -28,7 +28,8 @@
   color: #33cc33;
 }
 
-.content .item {
+.content .item,
+.content .item-show {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
@@ -42,12 +43,14 @@
   text-align: center;
 }
 
-.content .item text:nth-child(1) {
+.content .item text:nth-child(1),
+.content .item-show text:nth-child(1) {
   font-size: 24rpx;
   color: rgba(104, 100, 100, 0.8);
 }
 
-.content .item text:nth-child(2) {
+.content .item text:nth-child(2),
+.content .item-show text:nth-child(2) {
   font-size: 100rpx;
   font-weight: 700;
   color: #000;

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
pages/paySuccess/css/paySuccess.min.css


+ 2 - 1
pages/paySuccess/css/paySuccess.scss

@@ -28,7 +28,8 @@
         color: #33cc33;
     }
 
-    .item {
+    .item,
+    .item-show {
         display: flex;
         flex-direction: column;
         justify-content: space-between;

+ 9 - 25
pages/paySuccess/paySuccess.vue

@@ -19,38 +19,19 @@ export default {
       realPayAmount: "",
       isShow1: false,
       isShow2: true,
+      homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi",
     };
   },
-  onLoad(options) {
-    // this.loginFilter();
-  },
+  onLoad(options) {},
   methods: {
-    //获取cardNumber
-    loginFilter() {
-      let cardNumber = this.getQueryString("cardNumber");
-      let error = this.getQueryString("error");
-      let homeWeb =
-        "https://open.wecard.qq.com/connect/oauth/authorize?app_key=2DDC9DBF32F28845&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/weixiao/auth/&connect=curLogin&state=https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/wechat/weixiao/auth/";
-      if (!cardNumber) {
-        window.location.href = homeWeb;
-      } else if (error) {
-        uni.showToast({
-          title: "cardNumber获取失败",
-          icon: "error",
-          mask: true,
-          duration: 2000,
-        });
-      } else {
-        localStorage.setItem("cardNumber", cardNumber);
-        this.getDetailMess();
-      }
-    },
-
     //换取详情信息
     getDetailMess() {
       let that = this;
+
       let cardNumber = localStorage.getItem("cardNumber");
+
       let url = that.homeUrl + "/tuitionpayment/payableinfo/payableInfo";
+
       uni.request({
         url: url,
         data: {},
@@ -65,7 +46,7 @@ export default {
         success: ({ data, statusCode, header }) => {
           if (!data.success) {
             uni.showToast({
-              title: "获取信息失败",
+              title: data.message,
               icon: " error",
               mask: true,
               duration: 2000,
@@ -87,8 +68,11 @@ export default {
     //获取当前URL指定参数
     getQueryString(name) {
       let url = window.location.href; // 获取URL
+
       let pattern = new RegExp("[\?\&]" + name + "=([^\&]+)", "i"); // 正则匹配URL
+
       let matcher = pattern.exec(url);
+
       if (matcher == null || matcher.length < 1) {
         return false;
       }

BIN
unpackage/dist/build/h5.zip


Разлика између датотеке није приказан због своје велике величине
+ 2 - 0
unpackage/dist/build/h5/index.html


BIN
unpackage/dist/build/h5/static/images/bg.png


BIN
unpackage/dist/build/h5/static/images/close.png


BIN
unpackage/dist/build/h5/static/images/null.png


BIN
unpackage/dist/build/h5/static/images/pay.png


BIN
unpackage/dist/build/h5/static/img/bg.aeaa23a7.png


BIN
unpackage/dist/build/h5/static/img/null.44dd28f5.png


BIN
unpackage/dist/build/h5/static/img/pay.6c5e94fe.png


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
unpackage/dist/build/h5/static/index.d0f128df.css


Разлика између датотеке није приказан због своје велике величине
+ 7 - 0
unpackage/dist/build/h5/static/js/chunk-vendors.f3c8f711.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
unpackage/dist/build/h5/static/js/index.2dfb9828.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-Pay-pay.288243e0.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-parentPay-parentPay.607f67c8.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-paySuccess-paySuccess.0287eb78.js