mirror of
https://gitee.com/bootx/dax-pay-h5
synced 2026-08-12 07:25:40 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/bootx/dax-pay-business/dax-pay-gateway-ui into dev
This commit is contained in:
201
LICENSE
Normal file
201
LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2022 济南易杯光年软件技术有限公司 Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -27,6 +27,7 @@
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@unocss/reset": "^0.58.9",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"vue-qr": "^4.0.9",
|
||||
"axios": "^1.7.9",
|
||||
"date-fns": "^3.6.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -30,9 +30,9 @@ export const ErrorPageRoute: RouteRecordRaw = {
|
||||
*/
|
||||
export const routeModuleList: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/dashboard',
|
||||
path: '/',
|
||||
name: 'Dashboard',
|
||||
redirect: '/dashboard/index',
|
||||
redirect: '/index',
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: '主控台',
|
||||
|
||||
@@ -205,10 +205,14 @@ function pay() {
|
||||
} as AggregatePayParam
|
||||
aggregatePay(from)
|
||||
.then(({ data }) => {
|
||||
loading.value = false
|
||||
// 拉起jsapi支付
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
// 根据类型拉起对应的支付。 支持跳转和jsapi
|
||||
if (orderAndConfig.value?.aggregateConfig.callType === GatewayCallTypeEnum.jsapi){
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
}
|
||||
if (orderAndConfig.value?.aggregateConfig.callType === GatewayCallTypeEnum.link){
|
||||
location.replace(data.payBody as any)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ async function init() {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.block {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
|
||||
@@ -16,7 +16,7 @@ export function getOrderAndConfig(orderNo) {
|
||||
*/
|
||||
export function payOrder(data: payParam) {
|
||||
return http.request<Result<payConfig>>({
|
||||
url: '/unipay/gateway/pay',
|
||||
url: '/unipay/gateway/cashier/pay',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
@@ -107,7 +107,7 @@ export interface payParam {
|
||||
// 唯一标识
|
||||
openId?: string
|
||||
// 付款码
|
||||
anthCode?: string
|
||||
authCode?: string
|
||||
}
|
||||
/**
|
||||
* 支付配置项参数返回值
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<div class="itemType">
|
||||
<img v-if="item.icon === 'wechat'" src="@/assets/images/wechat.png" alt="">
|
||||
<img v-if="item.icon === 'alipay'" src="@/assets/images/alipay.png" alt="">
|
||||
<img v-if="item.icon === 'aggregate'" src="@/assets/images/aggregate-pay.png" alt="">
|
||||
<img v-if="item.icon === 'aggregate'" src="@/assets/images/aggregate.png" alt="">
|
||||
<!-- <img src="@/assets/images/quick_pay.png" alt=""> -->
|
||||
<p>{{ item.name }}</p>
|
||||
<span v-if="item.recommend"> 推荐</span>
|
||||
@@ -200,7 +200,7 @@ function payClick() {
|
||||
return
|
||||
}
|
||||
loading.value = false
|
||||
location.replace(data.payBody as any)
|
||||
location.replace(data.payBody as string)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
|
||||
@@ -73,7 +73,7 @@ import {
|
||||
getCashierCodeConfig,
|
||||
} from '../CashierCode.api'
|
||||
|
||||
import { AggregateEnum, CashierCodeTypeEnum } from '@/enums/daxpay/DaxPayEnum'
|
||||
import { AggregateEnum, CashierCodeTypeEnum, GatewayCallTypeEnum } from '@/enums/daxpay/DaxPayEnum'
|
||||
import router from '@/router'
|
||||
import { useKeyboard } from '@/hooks/daxpay/useKeyboard'
|
||||
|
||||
@@ -153,9 +153,14 @@ function pay() {
|
||||
cashierPay(from)
|
||||
.then(({ data }) => {
|
||||
loading.value = false
|
||||
// 拉起jsapi支付
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
// 根据类型拉起对应的支付。 支持跳转和jsapi
|
||||
if (cashierInfo.value?.callType === GatewayCallTypeEnum.jsapi) {
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
}
|
||||
if (cashierInfo.value?.callType === GatewayCallTypeEnum.link) {
|
||||
location.replace(data.payBody as any)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export function getOrderAndConfig(orderNo) {
|
||||
*/
|
||||
export function payOrder(data: payParam) {
|
||||
return http.request<Result<payConfig>>({
|
||||
url: '/unipay/gateway/pay',
|
||||
url: '/unipay/gateway/cashier/pay',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
@@ -129,7 +129,7 @@ export interface payParam {
|
||||
// 唯一标识
|
||||
openId?: string
|
||||
// 付款码
|
||||
anthCode?: string
|
||||
authCode?: string
|
||||
}
|
||||
/**
|
||||
* 支付配置项参数返回值
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
:class="{ methodItemClick: payMethObj.payClickItemId === item.id }"
|
||||
@click="payMethObj.payClick(item)"
|
||||
>
|
||||
<img v-if="item.icon === 'aggregate-pay'" :src="getImageUrl(item.icon)" alt="">
|
||||
<img v-else src="@/assets/images/alipay.png" alt="">
|
||||
<img :src="getImageUrl(item.icon)" alt="">
|
||||
<span>{{ item.name }}</span>
|
||||
<div v-if="item.recommend" class="recommon">
|
||||
推荐
|
||||
@@ -98,11 +97,10 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, reactive, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { showConfirmDialog, showDialog, showFailToast } from 'vant'
|
||||
import { result } from 'lodash-es'
|
||||
import { showConfirmDialog } from 'vant'
|
||||
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
|
||||
import { getOrderAndConfig, orderStatus, payOrder } from '@/views/daxpay/pc/cashier/Cashier.api'
|
||||
import type { CashierGroupConfig, OrderAndConfig } from '@/views/daxpay/pc/cashier/Cashier.api'
|
||||
import type { OrderAndConfig } from '@/views/daxpay/pc/cashier/Cashier.api'
|
||||
import { GatewayCallTypeEnum } from '@/enums/daxpay/DaxPayEnum'
|
||||
|
||||
// 实例化路由
|
||||
@@ -117,6 +115,7 @@ const childRenList = ref<any>([])
|
||||
|
||||
// 动态生成图片路径
|
||||
function getImageUrl(icon) {
|
||||
console.log(icon)
|
||||
return new URL(`../../../../assets/images/${icon}.png`, import.meta.url).href
|
||||
}
|
||||
// 控制二维码弹窗
|
||||
@@ -214,7 +213,8 @@ const payMethObj = reactive({
|
||||
}
|
||||
// 如果是跳转支付直接跳转支付页面
|
||||
if (item.callType === GatewayCallTypeEnum.link) {
|
||||
router.replace(data.payBody as string)
|
||||
loading.value = false
|
||||
location.replace(data.payBody as string)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -226,7 +226,7 @@ watch(
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
// 判断是否为聚合支付
|
||||
if (newValue === '111111111111111111') {
|
||||
if (newValue === 'agg') {
|
||||
isAggregateShow.value = true
|
||||
return
|
||||
}
|
||||
@@ -257,10 +257,10 @@ function init() {
|
||||
// 判断是否存在聚合支付
|
||||
if (data.config.aggregateShow) {
|
||||
data.groupConfigs.unshift({
|
||||
id: '111111111111111111',
|
||||
name: '聚合支付',
|
||||
id: 'agg',
|
||||
name: '聚合扫码',
|
||||
recommend: false,
|
||||
icon: 'aggregate-pay',
|
||||
icon: 'aggregate',
|
||||
})
|
||||
}
|
||||
orderObj.value = data
|
||||
|
||||
57
用户授权使用协议.txt
Normal file
57
用户授权使用协议.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
感谢您选择DaxPay支付系统开源版(以下简称DaxPay),DaxPay是一款支付系统,全部源码开放。
|
||||
|
||||
为了使您正确并合法地使用本软件,请您在使用前务必阅读清楚下面的协议条款:
|
||||
|
||||
一、本授权协议适用且仅适用于 DaxPay 开源版,如果不同意该协议,请不要进行使用
|
||||
|
||||
二、 产品介绍和产品模式
|
||||
1. DaxPay支付系统开源版是由济南易杯光年软件技术有限公司研发的支付产品,版权归济南易杯光年软件技术有限公司所有
|
||||
|
||||
2. DaxPay为需要支付交易流的开发者、个体户、公司等用户提供便捷的支付产品
|
||||
|
||||
3. DaxPay只是一个应用软件,用户部署后只负责信息流的传递,不负责资金流,交易资金全部由用户自主选择的支付平台进行清、结算
|
||||
|
||||
4. DaxPay不会自行上传任何数据到您部署的DaxPay副本所关联的数据存储方之外的任何地方,但无法保证系统中所涉及的三方SDK和依赖是否会对外进行数据传输操作
|
||||
|
||||
三、协议许可的权利
|
||||
|
||||
1. 您可以在完全遵守本最终用户授权使用协议的基础上,将本软件应用于商业用途,而不必支付软件版权授权费用
|
||||
|
||||
2. 您可以在协议规定的约束和限制范围内修改 DaxPay 源代码或界面风格以适应您的要求
|
||||
|
||||
3. 您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务
|
||||
|
||||
四、有限担保和免责声明
|
||||
1. 本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。
|
||||
|
||||
2. 用户出于自愿而使用本软件,您必须了解使用本软件的风险,我们不承诺对用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。
|
||||
|
||||
3. 电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并使用DaxPay,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
|
||||
|
||||
4. DaxPay系统由用户自行部署使用,不提供在线服务、服务托管等服务,用户对外提供服务时,请保证已经根据国家相关法律法规获取到相应的许可
|
||||
|
||||
5. 如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。
|
||||
|
||||
6. 客户不得利用DaxPay产品从事非法行为,客户应当合法合规的使用产品,DaxPay不承担客户因非法行为造成的任何法律责任。
|
||||
|
||||
7. 如发现客户在使用产品时有任何的非法行为,有权解除授权停止技术支持,并配合有关机关进行调查或向政府部门举报。
|
||||
|
||||
8. 本软件由济南易杯光年软件技术有限公司进行分发,没有授权分销商,也没有任何分公司、代理商、办事处、经销商等销售和分发本产品
|
||||
|
||||
|
||||
五、禁止接入的内容包括但不限于以下内容
|
||||
|
||||
1. 诈骗、BC、赛车、V盘、X资金盘、贷款、P2P、汇兑、ICO、二清支付严禁接入
|
||||
|
||||
2. 1元购类、高额返利类 、多级分销类、盲盒类、单纯形式抽奖类、发卡平台严禁接入
|
||||
|
||||
3. 恋爱话术类、数字藏品、色情、政治相关、影视小说、电子书、游戏平台严禁接入
|
||||
|
||||
4. 付费入群、帐号销售、刷单、卡盟平台、刷粉、VPN、售卖假货严禁接入
|
||||
|
||||
5. 未取得相关资质的游戏、私服等禁止接入
|
||||
|
||||
6. 微信/支付宝/银联官方要求禁止接入的、其他支付通道禁止接入的、以及所有国家法律法规禁止的一切情景
|
||||
|
||||
协议日期:2023年01月01日
|
||||
济南易杯光年软件技术有限公司
|
||||
Reference in New Issue
Block a user