Commit fbb6f1c8 authored by 章建武's avatar 章建武

dep

parent 18640d47
...@@ -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']."&timestamp=".$argu['timestamp']."&url=".$argu['url']; $string = "jsapi_ticket=".$argu['jsapi_ticket']."&noncestr=".$argu['nonceStr']."&timestamp=".$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';
//主图 //主图
......
...@@ -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>
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment