Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
4e25803d
Commit
4e25803d
authored
May 09, 2020
by
刘海龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://132.232.91.252:9999/ice/quxiu
parents
e0fd4684
ee1ce25b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
8 deletions
+41
-8
application/Appapi/Controller/RechangeController.class.php
+10
-6
themes/simplebootx/Appapi/Rechange/index.html
+31
-2
No files found.
application/Appapi/Controller/RechangeController.class.php
View file @
4e25803d
...
...
@@ -23,7 +23,7 @@ class RechangeController extends HomebaseController
{
return
[
'wechat'
=>
[
'appid'
=>
'wx98dd4477b89cb388'
,
// app 开放平台的APPID
//
'appid' => 'wx98dd4477b89cb388', // app 开放平台的APPID
'app_id'
=>
'wx37327dbb9d7b33f3'
,
// 公众号 APPID
'miniapp_id'
=>
''
,
//小程序 APPID
'appSecret'
=>
'7f8291af4e0795ee375f66487a721627'
,
// 公众号 秘钥
...
...
@@ -43,12 +43,16 @@ class RechangeController extends HomebaseController
public
function
wx
()
{
echo
$this
->
getPay
()
->
driver
(
'wechat'
)
->
gateway
(
'wap'
)
->
pay
([
'out_trade_no'
=>
'128047_20200426175416265'
,
// 订单号
'total_fee'
=>
'1'
,
// 订单金额,**单位:分**
'body'
=>
'测试支付'
,
// 订单描述
$data
=
[
'ulr'
=>
$this
->
getPay
()
->
driver
(
'wechat'
)
->
gateway
(
'wap'
)
->
pay
([
'out_trade_no'
=>
time
(),
// 订单号
'total_fee'
=>
'1'
,
// 订单金额,**单位:分**
'body'
=>
'测试支付'
,
// 订单描述
// 'spbill_create_ip' => '', // 支付人的 IP
]);
])
];
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
$data
,
'msg'
=>
''
));
die
;
}
}
...
...
themes/simplebootx/Appapi/Rechange/index.html
View file @
4e25803d
...
...
@@ -7,7 +7,7 @@
<body
style=
"background: #FAFAFA;"
>
<div
class=
"app"
id=
"app"
style=
"padding-top: 0;"
>
<div
class=
"Recharge"
>
<div
class=
"header"
>
<div
class=
"zhanghu"
>
账户ID
</div>
<div
class=
"inputBox"
>
...
...
@@ -79,7 +79,7 @@
</div>
<div
class=
"foot_right"
>
<img
src=
"__PUBLIC__/appapi/pay/img/wx-icon.png"
>
<span>
微信支付
</span>
<span
@
click=
"wx"
>
微信支付
</span>
</div>
</div>
</div>
...
...
@@ -99,6 +99,35 @@
sel_money
(
index
){
this
.
sel_num
=
index
},
wx
()
{
let
_this
=
this
;
$
.
ajax
({
url
:
"/index.php?g=Appapi&m=rechange&a=wx"
,
dataType
:
"json"
,
data
:
{
},
type
:
"POST"
,
success
:
function
(
data
){
console
.
log
(
data
);
if
(
data
.
ret
==
200
){
// let d = data.data;
// if (d.code > 0) {
// layer.msg(d.msg);
// } else {
// let info = d.info[0];
// sessionStorage.setItem("user_info",JSON.stringify(info));
// window.location.href = '/index.php?g=Appapi&m=Profit&a=index&uid='+info.id+'&token=' + info.token;
// }
}
else
{
layer
.
msg
(
data
.
msg
);
}
},
error
:
function
(
e
){
layer
.
msg
(
e
.
msg
);
}
})
}
},
watch
:
{
//数据监测函数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment