Browse Source

对接H5支付

master
梁欣 1 year ago
parent
commit
3ed2757101
  1. 1
      .gitignore
  2. 4
      .hbuilderx/launch.json
  3. 2
      core/payment/alipay.js
  4. 2
      manifest.json
  5. 2
      pages/checkout/cashier/index.vue
  6. 2793
      pages/user/settled/index.vue

1
.gitignore

@ -1,3 +1,4 @@
/unpackage /unpackage
/utils/request-1.js /utils/request-1.js
/node_modules/ /node_modules/
manifest.json

4
.hbuilderx/launch.json

@ -2,6 +2,10 @@
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"version": "0.0", "version": "0.0",
"configurations": [{ "configurations": [{
"app-plus" :
{
"launchtype" : "remote"
},
"default" : "default" :
{ {
"launchtype" : "remote" "launchtype" : "remote"

2
core/payment/alipay.js

@ -10,7 +10,7 @@ const paymentAsH5 = option => {
const options = { formHtml: '', ...option } const options = { formHtml: '', ...option }
// 跳转到支付宝支付页 // 跳转到支付宝支付页
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// console.log(options.formHtml)
console.log(options.formHtml)
if (options.formHtml) { if (options.formHtml) {
const div = document.createElement('div') const div = document.createElement('div')
div.innerHTML = options.formHtml div.innerHTML = options.formHtml

2
manifest.json

@ -1,6 +1,6 @@
{ {
"name" : "吉媒婚恋网互动平台", "name" : "吉媒婚恋网互动平台",
"appid" : "__UNI__EBF37B7",
"appid" : "__UNI__600B9D4",
"description" : "吉媒婚恋网互动平台", "description" : "吉媒婚恋网互动平台",
"versionName" : "2.0.6", "versionName" : "2.0.6",
"versionCode" : 206, "versionCode" : 206,

2
pages/checkout/cashier/index.vue

@ -258,7 +258,7 @@
} }
// //
if (method === PayMethodEnum.ALIPAY.value) { if (method === PayMethodEnum.ALIPAY.value) {
console.log('paymentData', paymentData)
console.log('paymentData', JSON.stringify(paymentData))
Alipay.payment(paymentData) Alipay.payment(paymentData)
.then(res => app.onPaySuccess(res)) .then(res => app.onPaySuccess(res))
.catch(err => app.onPayFail(err)) .catch(err => app.onPayFail(err))

2793
pages/user/settled/index.vue

File diff suppressed because it is too large
Loading…
Cancel
Save