切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
0a7e75fb2db3a7069b0fb321fc259f86712b6a61
1 个父辈
06e3c3dc
1 个管道 的构建
通过
耗费 1 秒
1
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
119 行增加
和
8 行删除
app/portal/controller/PrizeController.php
public/themes/simpleboot3/portal/prize/getScore.html
public/themes/simpleboot3/portal/prize/successupload.html
app/portal/controller/PrizeController.php
查看文件 @
0a7e75f
...
...
@@ -137,6 +137,7 @@ class PrizeController extends WeChatBaseController
}
public
function
getScore
(){
$this
->
checkUser
();
$app
=
new
Application
(
$this
->
options
);
$js
=
$app
->
js
;
$jss
=
$js
->
config
([
'chooseImage'
,
'uploadImage'
,
'previewImage'
],
$debug
=
true
,
$beta
=
false
,
$json
=
true
);
...
...
@@ -146,16 +147,14 @@ class PrizeController extends WeChatBaseController
//上传小票提交
public
function
uploadPost
(){
$re
=
$this
->
checkUser
();
$param
=
$this
->
request
->
param
();
$options
=
[
'app_id'
=>
config
(
'wechat_config.app_id'
),
'secret'
=>
config
(
'wechat_config.secret'
),
'payment'
=>
config
(
'wechat_config.payment'
),
];
$app
=
new
Application
(
$options
);
$app
=
new
Application
(
$this
->
options
);
// 获取 access token 实例
$access_token
=
$app
->
access_token
;
return
$this
->
getmedia
(
$access_token
,
$param
[
'media'
],
date
(
'Ymd'
));
$save_name
=
$this
->
getmedia
(
$access_token
,
$param
[
'media'
],
date
(
'Ymd'
));
Db
::
name
(
'users_score_log'
)
->
insert
([
'users_id'
=>
$re
[
'id'
],
'create_time'
=>
time
(),
'thumbnail'
=>
$save_name
]);
return
1
;
}
private
function
getmedia
(
$access_token
,
$media_id
,
$foldername
)
{
...
...
@@ -176,6 +175,17 @@ class PrizeController extends WeChatBaseController
return
$saveName
;
}
public
function
uploadSuccess
(){
return
$this
->
fetch
(
'successupload'
);
}
//兑奖记录
public
function
prizeRecord
(){
$status
=
$this
->
request
->
param
(
'status'
);
...
...
public/themes/simpleboot3/portal/prize/getScore.html
查看文件 @
0a7e75f
...
...
@@ -160,7 +160,22 @@ wx.ready(function () {
});
//确定上传小票
$
(
".footer"
).
click
(
function
(){
window
.
location
.
href
=
'successupload.html'
$
.
ajax
({
url
:
"{:url('portal/prize/uploadPost')}"
,
type
:
"post"
,
data
:
{
'media'
:
serverIds
,
},
success
:
function
(
data
)
{
if
(
data
==
1
)
{
mui
.
toast
(
'保存成功'
)
window
.
location
.
href
=
"{:url('portal/prize/uploadSuccess')}"
}
else
{
mui
.
alert
(
'保存失败'
);
return
false
}
}
})
})
</script>
</body>
...
...
public/themes/simpleboot3/portal/prize/successupload.html
0 → 100644
查看文件 @
0a7e75f
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/base.css"
>
<script
type=
"text/javascript"
src=
"__TMPL__/public/assets/js/base.js"
></script>
<title>
上传成功
</title>
<style>
.container
{
padding-top
:
3.8rem
;
}
.success
{
width
:
1.04rem
;
height
:
1.04rem
;
margin
:
0
auto
;
font-size
:
0
;
}
.success
img
{
width
:
100%
;
height
:
100%
;
}
.successword
{
text-align
:
center
;
color
:
#CA277B
;
font-size
:
0.36rem
;
margin-top
:
0.2rem
;
}
.upsuccess
{
width
:
3.65rem
;
margin
:
0
auto
;
color
:
#252729
;
font-size
:
0.26rem
;
}
.increase
{
width
:
3.62rem
;
margin
:
0
auto
;
text-align
:
center
;
color
:
#252729
;
font-size
:
0.26rem
;
margin-top
:
0.2rem
;
}
.word
{
margin-top
:
0.68rem
;
}
.footer
{
width
:
6.86rem
;
text-align
:
center
;
height
:
0.88rem
;
line-height
:
0.88rem
;
position
:
fixed
;
bottom
:
0.55rem
;
left
:
0
;
right
:
0
;
margin
:
0
auto
;
background
:
#CA277B
;
border-radius
:
0.44rem
;
color
:
#fff
;
font-size
:
0.32rem
;
}
</style>
</head>
<body>
<div
class=
"container"
>
<div
class=
"success"
>
<img
src=
"__TMPL__/public/assets/images/img/successupload.png"
alt=
""
>
</div>
<p
class=
"successword"
>
上传成功
</p>
</div>
<div
class=
"word"
>
<p
class=
"upsuccess"
>
上传成功,等待后台审核通过后
</p>
<P
class=
"increase"
>
增加相应积分
</P>
</div>
<div
class=
"footer"
>
返回
</div>
<script
type=
"text/javascript"
src=
"__TMPL__/public/assets/js/jquery.min.js"
></script>
<script>
$
(
".footer"
).
click
(
function
(){
window
.
location
.
href
=
'uploadticket.html'
})
</script>
</body>
</html>
...
...
请
注册
或
登录
后发表评论