From a27ffc0a7f9a40c5042c80a76eac6b2306110b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Tue, 11 Jan 2022 11:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=A8=A1=E5=9D=97=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E5=85=BC=E5=AE=B9H5=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/pay.js | 33 +++++++++++++++++++ manifest.json | 37 ++++++++++++++------- pages/pay/pay.vue | 75 +++++++++++++++++++++++++++++++++++++++--- pages/store/buy.vue | 8 +++-- pages/store/goods.vue | 1 - public/userAuth.js | 5 +++ 6 files changed, 139 insertions(+), 20 deletions(-) create mode 100644 apis/interfaces/pay.js diff --git a/apis/interfaces/pay.js b/apis/interfaces/pay.js new file mode 100644 index 0000000..fded39d --- /dev/null +++ b/apis/interfaces/pay.js @@ -0,0 +1,33 @@ +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * moduleName: 支付 + */ + +import { request } from '../index' + +const wxPAY = (orderNo) => { + console.log(orderNo) + return request({ + url: 'mall/pay/' + orderNo + '/wechat', + data: { + type: 'app' + } + }) +} + +const alPAY = (orderNo) => { + console.log(orderNo) + return request({ + url: 'mall/pay/' + orderNo + '/alipay', + data: { + type: 'app' + } + }) +} + +export { + wxPAY, + alPAY +} diff --git a/manifest.json b/manifest.json index fbfbb3f..de3afc5 100644 --- a/manifest.json +++ b/manifest.json @@ -18,27 +18,30 @@ }, /* 模块配置 */ "modules" : { - "OAuth" : {} + "OAuth" : {}, + "Payment" : {}, + "Share" : {} }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ "android" : { "permissions" : [ - "", - "", - "", - "", - "", + "", "", "", + "", "", - "", - "", + "", "", - "", "", - "", + "", + "", + "", + "", + "", + "", + "", "" ] }, @@ -48,7 +51,19 @@ "sdkConfigs" : { "oauth" : { "univerify" : {} - } + }, + "payment" : { + "weixin" : { + "__platform__" : [ "android" ], + "appid" : "wxb7e3c263a2a37ab9", + "UniversalLinks" : "" + }, + "alipay" : { + "__platform__" : [ "android" ] + } + }, + "share" : {}, + "ad" : {} } } }, diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 75ecad9..ca6cec3 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -1,26 +1,91 @@