sunlupeng 7 maanden geleden
bovenliggende
commit
44651c31f5
5 gewijzigde bestanden met toevoegingen van 127 en 57 verwijderingen
  1. 1 0
      package.json
  2. 28 0
      src/api/pay.js
  3. 1 1
      src/permission.js
  4. 92 56
      src/views/Ipay.vue
  5. 5 0
      yarn.lock

+ 1 - 0
package.json

@@ -15,6 +15,7 @@
     "element-ui": "^2.15.12",
     "js-cookie": "2.2.0",
     "node-sass": "6.0.0",
+    "qrcodejs2": "^0.0.2",
     "sass-loader": "11.1.0",
     "vue": "^2.6.14",
     "vue-router": "^3.5.1",

+ 28 - 0
src/api/pay.js

@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+//获取支付选项列表
+export function payList(query) {
+  return request({
+    url: '/news/mall/getNotice',
+    method: 'get',
+    params: query
+  })
+}
+
+//获取微信支付二维码
+export function getWxPayCode(data) {
+    return request({
+      url: '/mall-post/add/comment',
+      method: 'post',
+      data
+    })
+  }
+
+  //查询微信支付状态
+export function queryWxPayStatus(data) {
+    return request({
+      url: '/mall-post/add/comment',
+      method: 'post',
+      data
+    })
+  }

+ 1 - 1
src/permission.js

@@ -4,7 +4,7 @@ import { getToken, setToken } from '@/utils/auth' // getToken from cookie
 import { lockStatus,unlock } from "@/api/allApi";
 //路由跳转之前
 router.beforeEach((to, _from, next) => {
-  setToken('bdda903172a8cc79ae3ee559458bfa5b');
+  setToken('c88523d962456798195268a58907b543');
   const path = to.path;
   const Authorization = to.query.Authorization
   if (path.indexOf('auth') != -1 && Authorization) { 

File diff suppressed because it is too large
+ 92 - 56
src/views/Ipay.vue


+ 5 - 0
yarn.lock

@@ -5728,6 +5728,11 @@ punycode@^2.1.0, punycode@^2.1.1:
   resolved "https://registry.npmmirror.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
   integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
 
+qrcodejs2@^0.0.2:
+  version "0.0.2"
+  resolved "https://registry.yarnpkg.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz#465afe5e39f19facecb932c11f7a186109146ae1"
+  integrity sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA==
+
 qs@6.11.0:
   version "6.11.0"
   resolved "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"