切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王晓刚
6 years ago
提交
0eeb4e3b92c6b3a258e405070ab5a2beffb15f03
1 个父辈
a1d30b3f
1 个管道 的构建
通过
耗费 35 秒
分享bug
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
61 行增加
和
1 行删除
app/portal/controller/IndexController.php
public/logo.jpg
public/themes/simpleboot3/portal/index/index.html
app/portal/controller/IndexController.php
查看文件 @
0eeb4e3
...
...
@@ -9,6 +9,7 @@
namespace
app\portal\controller
;
use
cmf\controller\WeChatBaseController
;
use
EasyWeChat\Foundation\Application
;
use
think\Db
;
class
IndexController
extends
WeChatBaseController
...
...
@@ -204,6 +205,25 @@ class IndexController extends WeChatBaseController
}
else
{
$data_goods_recommend_new
=
null
;
}
//分享
$options
=
config
(
'wechat_config'
);
$app
=
new
Application
(
$options
);
$js
=
$app
->
js
;
$jssdk
=
$js
->
config
(
array
(
'onMenuShareAppMessage'
,
'onMenuShareTimeline'
),
false
,
false
,
true
);
$this
->
assign
(
'jssdk'
,
$jssdk
);
$arr
=
[];
if
(
$data_my_user
[
'status'
]
==
3
){
$arr
[
'status_id'
]
=
2
;
$arr
[
'my_user_id'
]
=
$data_my_user
[
'id'
];
}
else
if
(
$data_my_user
[
'status'
]
=
4
)
{
$arr
[
'status'
]
=
3
;
$arr
[
'my_user_id'
]
=
$data_my_user
[
'id'
];
}
else
{
$arr
[
'status'
]
=
''
;
$arr
[
'my_user_id'
]
=
''
;
}
$url
=
cmf_url
(
'portal/index'
,
$arr
,
false
,
true
);
$this
->
assign
(
'url'
,
$url
);
$this
->
assign
(
'data_goods_recommend_new'
,
$data_goods_recommend_new
);
$this
->
assign
(
'data_goods_hot'
,
$data_goods_hot
);
return
$this
->
fetch
();
...
...
@@ -354,7 +374,6 @@ class IndexController extends WeChatBaseController
}
}
return
json_encode
(
$data_salesman_goods
);
}
/**
...
...
public/logo.jpg
0 → 100644
查看文件 @
0eeb4e3
48.1 KB
public/themes/simpleboot3/portal/index/index.html
查看文件 @
0eeb4e3
...
...
@@ -210,6 +210,44 @@
<script
src=
"__TMPL__/public/assets/js/base.js"
></script>
<script
src=
"__TMPL__/public/assets/js/swiper.min.js"
></script>
<script
src=
"__TMPL__/public/assets/js/jquery.js"
></script>
<script
src=
"https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
<script>
wx
.
config
({
$jssdk
});
wx
.
ready
(
function
()
{
wx
.
onMenuShareAppMessage
({
title
:
'学考无忧'
,
desc
:
"{$data.book_name}"
,
link
:
'{$url}'
,
imgUrl
:
"{:cmf_url('','',false,true)}/logo.jpg"
,
// 分享图标
type
:
'link'
,
// 分享类型,music、video或link,不填默认为link
dataUrl
:
''
,
// 如果type是music或video,则要提供数据链接,默认为空
success
:
function
(
res
)
{
alert
(
'分享成功'
);
//分享成功返回信息
},
fail
:
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
));
}
});
wx
.
onMenuShareTimeline
({
title
:
'学考无忧'
,
desc
:
"学考无忧"
,
link
:
'{$url}'
,
imgUrl
:
"{:cmf_url('','',false,true)}/logo.jpg"
,
// 分享图标
type
:
'link'
,
// 分享类型,music、video或link,不填默认为link
dataUrl
:
''
,
// 如果type是music或video,则要提供数据链接,默认为空
success
:
function
(
res
)
{
alert
(
'分享成功'
);
//分享成功返回信息
},
fail
:
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
));
}
});
});
</script>
<script>
/**
*点击搜索
...
...
@@ -228,6 +266,9 @@
autoplayDisableOnInteraction
:
false
});
</script>
<script>
</script>
</body>
</html>
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论