Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
test_h5
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
章建武
test_h5
Commits
fbb6f1c8
Commit
fbb6f1c8
authored
Dec 26, 2019
by
章建武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dep
parent
18640d47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
11 deletions
+45
-11
IndexController.class.php
Application/Frontend/Controller/IndexController.class.php
+8
-7
get_pic.html
Application/Frontend/View/Index/get_pic.html
+36
-3
index.html
Application/Frontend/View/Index/index.html
+1
-1
No files found.
Application/Frontend/Controller/IndexController.class.php
View file @
fbb6f1c8
...
@@ -12,13 +12,6 @@ class IndexController extends Controller
...
@@ -12,13 +12,6 @@ class IndexController extends Controller
}
}
public
function
index
()
public
function
index
()
{
{
$this
->
display
(
'index'
);
}
//生成图片
public
function
get_pic
(){
session_start
();
session_start
();
if
(
!
$_SESSION
[
"headimgurl"
])
{
if
(
!
$_SESSION
[
"headimgurl"
])
{
redirect
(
'http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize'
);
redirect
(
'http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize'
);
...
@@ -64,6 +57,14 @@ class IndexController extends Controller
...
@@ -64,6 +57,14 @@ class IndexController extends Controller
$string
=
"jsapi_ticket="
.
$argu
[
'jsapi_ticket'
]
.
"&noncestr="
.
$argu
[
'nonceStr'
]
.
"×tamp="
.
$argu
[
'timestamp'
]
.
"&url="
.
$argu
[
'url'
];
$string
=
"jsapi_ticket="
.
$argu
[
'jsapi_ticket'
]
.
"&noncestr="
.
$argu
[
'nonceStr'
]
.
"×tamp="
.
$argu
[
'timestamp'
]
.
"&url="
.
$argu
[
'url'
];
$argu
[
'signature'
]
=
sha1
(
trim
(
$string
));
$argu
[
'signature'
]
=
sha1
(
trim
(
$string
));
$this
->
assign
(
$argu
);
$this
->
assign
(
$argu
);
$this
->
display
(
'index'
);
}
//生成图片
public
function
get_pic
(){
session_start
();
$num
=
$_SESSION
[
'num'
]
+=
1
;
$num
=
$_SESSION
[
'num'
]
+=
1
;
$link
=
C
(
'DOMAIN'
)
.
STATIC_COMEON_ASSETS
.
'/images/zhutu.jpg'
;
$link
=
C
(
'DOMAIN'
)
.
STATIC_COMEON_ASSETS
.
'/images/zhutu.jpg'
;
//主图
//主图
...
...
Application/Frontend/View/Index/get_pic.html
View file @
fbb6f1c8
...
@@ -44,9 +44,7 @@
...
@@ -44,9 +44,7 @@
<script
type=
"text/javascript"
src=
"__JS__/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"__JS__/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script
type=
"text/javascript"
src=
"http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
type
=
1
,
pimg
=
''
,
mo
=
1
,
mtxt
=
2
,
user
=
"{$wx_name}"
,
gun
=
false
,
sign_pic
=
'{$signature}'
;
var
on
=
'__IMGAGES__/music_on.jpg'
;
var
off
=
'__IMGAGES__/music_off.jpg'
;
wx
.
config
({
wx
.
config
({
debug
:
false
,
debug
:
false
,
appId
:
'{$appId}'
,
appId
:
'{$appId}'
,
...
@@ -62,6 +60,41 @@ wx.config({
...
@@ -62,6 +60,41 @@ wx.config({
'getLocalImgData'
'getLocalImgData'
]
]
});
});
wx
.
ready
(
function
()
{
wx
.
onMenuShareTimeline
({
title
:
'时尚匠心 榜样力量'
,
// 分享标题
desc
:
'2019中国创业者大会 在时代创变的前夜,等你!'
,
// 分享描述
link
:
'{$link}'
,
// 分享链接
imgUrl
:
'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/s_logo.png'
,
// 分享图标
success
:
function
()
{
},
cancel
:
function
()
{
}
});
wx
.
onMenuShareAppMessage
({
title
:
'时尚匠心 榜样力量'
,
// 分享标题
desc
:
'2019中国创业者大会 在时代创变的前夜,等你!'
,
// 分享描述
link
:
'{$link}'
,
// 分享链接
imgUrl
:
'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/s_logo.png'
,
// 分享图标
success
:
function
()
{
},
cancel
:
function
()
{
}
});
});
wx
.
checkJsApi
({
jsApiList
:
[
'chooseImage'
,
'downloadImage'
,
'uploadImage'
],
success
:
function
(){
console
.
log
(
"wx.checkJsApi success"
);
},
fail
:
function
(
res
){
console
.
log
(
"wx.checkJsApi error"
);
console
.
log
(
res
);
}
});
</script>
</script>
</body>
</body>
...
...
Application/Frontend/View/Index/index.html
View file @
fbb6f1c8
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<div
class=
"logo"
>
<div
class=
"logo"
>
<img
src=
'__IMGAGES__/s_logo.png'
>
<img
src=
'__IMGAGES__/s_logo.png'
>
</div>
</div>
<a
class=
"tesx"
href=
"http://
www.test_h5.net
/index.php/Index/get_pic.html"
>
<a
class=
"tesx"
href=
"http://
mallapp.guoguodz.com/test_h5/appwww
/index.php/Index/get_pic.html"
>
<img
src=
"__IMGAGES__/test.jpg"
/>
<img
src=
"__IMGAGES__/test.jpg"
/>
</a>
</a>
</div>
</div>
...
...
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