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
3fe59d51
Commit
3fe59d51
authored
May 10, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
7acf5dd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
13 deletions
+53
-13
application/Appapi/Controller/ProfitController.class.php
+21
-0
themes/simplebootx/Appapi/Profit/index.html
+32
-13
No files found.
application/Appapi/Controller/ProfitController.class.php
View file @
3fe59d51
...
...
@@ -51,6 +51,27 @@ class ProfitController extends HomebaseController
}
$this
->
display
();
}
public
function
info
()
{
$uid
=
I
(
"uid"
);
$token
=
I
(
"token"
);
if
(
!
$uid
||
!
$token
||
checkToken
(
$uid
,
$token
)
==
700
){
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'您的登陆状态失效,请重新登陆!'
));
exit
;
}
$data
=
[
'a'
=>
1
,
'b'
=>
1
,
];
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
$data
,
'msg'
=>
''
));
die
;
}
}
themes/simplebootx/Appapi/Profit/index.html
View file @
3fe59d51
...
...
@@ -13,13 +13,6 @@
</div>
<div></div>
<div
class=
"menuBox"
>
<!-- <div>
<img src="__PUBLIC__/appapi/img/diamond_32@2x.png" width="16px">
<span style="color: #fff">剩余钻石:</span>
<span @click="rechange">点击去充值页面</span>
<br/>
<span style="color: #fff">1000</span>
</div> -->
<div
class=
"menuItem"
>
<div
class=
"menuHd"
>
<img
src=
"__PUBLIC__/appapi/pay/img/zhib.png"
>
...
...
@@ -77,16 +70,23 @@
subMit
()
{
},
rechange
()
{
info
()
{
let
userInfo
=
sessionStorage
.
getItem
(
"user_info"
);
let
info
=
JSON
.
parse
(
userInfo
);
window
.
location
.
href
=
'/index.php?g=Appapi&m=Profit&a=rechange&uid='
+
info
.
id
+
'&token='
+
info
.
token
;
if
(
!
userInfo
)
{
window
.
location
.
href
=
'/index.php?g=Appapi&m=Login&a=index'
;
}
return
JSON
.
parse
(
userInfo
);
},
url
(
url
)
{
let
info
=
this
.
info
();
return
url
+
'&uid='
+
info
.
id
+
'&token='
+
info
.
token
;
},
rechange
()
{
window
.
location
.
href
=
this
.
url
(
'/index.php?g=Appapi&m=Profit&a=rechange'
);
},
withdraw
(
type
)
{
let
userInfo
=
sessionStorage
.
getItem
(
"user_info"
);
let
info
=
JSON
.
parse
(
userInfo
);
let
url
=
type
?
'/index.php?g=Appapi&m=Profit&a=auth'
:
'/index.php?g=Appapi&m=Profit&a=withdraw'
;
window
.
location
.
href
=
url
+
'&uid='
+
info
.
id
+
'&token='
+
info
.
token
;
window
.
location
.
href
=
this
.
url
(
url
)
;
}
},
watch
:
{
...
...
@@ -94,6 +94,25 @@
},
created
:
function
()
{
//加载触发函数
let
_this
=
this
;
let
url
=
_this
.
url
(
'/index.php?g=Appapi&m=Profit&a=info'
)
$
.
ajax
({
url
:
url
,
dataType
:
"json"
,
type
:
"POST"
,
success
:
function
(
data
){
console
.
log
(
data
)
if
(
data
.
ret
==
200
){
}
else
{
layer
.
msg
(
data
.
msg
);
}
},
error
:
function
(
e
){
layer
.
msg
(
e
.
msg
);
}
})
}
});
</script>
...
...
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