|
@@ -17,6 +17,10 @@ export interface RunH5Param {
|
|
|
|
|
|
|
|
|
|
|
|
|
export class JDBObj {
|
|
export class JDBObj {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 微信登录
|
|
|
|
|
+ * @returns
|
|
|
|
|
+ */
|
|
|
async handleWeChatLogin(): Promise<void> {
|
|
async handleWeChatLogin(): Promise<void> {
|
|
|
try {
|
|
try {
|
|
|
let req = new SendAuthReq();
|
|
let req = new SendAuthReq();
|
|
@@ -31,6 +35,10 @@ export class JDBObj {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 微信支付
|
|
|
|
|
+ * @returns
|
|
|
|
|
+ */
|
|
|
async handleWeChatPay(param: WeChatPayParams) {
|
|
async handleWeChatPay(param: WeChatPayParams) {
|
|
|
let req = new PayReq()
|
|
let req = new PayReq()
|
|
|
req.appId = param.appid
|
|
req.appId = param.appid
|
|
@@ -44,13 +52,18 @@ export class JDBObj {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 支付宝登录
|
|
|
|
|
+ */
|
|
|
handleAlipayAuthorization() {
|
|
handleAlipayAuthorization() {
|
|
|
ALiPayUtil.startAuthorization()
|
|
ALiPayUtil.startAuthorization()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 支付宝支付
|
|
|
|
|
+ * @param orderInfo
|
|
|
|
|
+ */
|
|
|
handleAliPay(orderInfo: string) {
|
|
handleAliPay(orderInfo: string) {
|
|
|
- IBestToast.show({ message: '开始支付:请求参数:' + orderInfo })
|
|
|
|
|
new Pay().pay(orderInfo, false).then((result) => {
|
|
new Pay().pay(orderInfo, false).then((result) => {
|
|
|
let message =
|
|
let message =
|
|
|
`resultStatus: ${result.get('resultStatus')} memo: ${result.get('memo')} result: ${result.get('result')}`;
|
|
`resultStatus: ${result.get('resultStatus')} memo: ${result.get('memo')} result: ${result.get('result')}`;
|
|
@@ -59,7 +72,7 @@ export class JDBObj {
|
|
|
type: 'ali_pay',
|
|
type: 'ali_pay',
|
|
|
data: result.get('resultStatus')
|
|
data: result.get('resultStatus')
|
|
|
})
|
|
})
|
|
|
- IBestToast.show({ message: message })
|
|
|
|
|
|
|
+ // IBestToast.show({ message: message })
|
|
|
}).catch((error: BusinessError) => {
|
|
}).catch((error: BusinessError) => {
|
|
|
console.log(error.message);
|
|
console.log(error.message);
|
|
|
IBestToast.show({
|
|
IBestToast.show({
|