切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
jinglong
6 years ago
提交
7d69b2fd80c571f99955b0f5bdcad010a10d4f53
1 个父辈
b55f35cd
1 个管道 的构建
通过
耗费 0 秒
调式分享
变更
3
构建
1
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
6 行增加
和
30 行删除
app/portal/controller/LoginController.php
public/themes/simpleboot3_mobile/portal/login/wx_share.html
public/themes/simpleboot3_mobile/public/share.html
app/portal/controller/LoginController.php
查看文件 @
7d69b2f
...
...
@@ -541,7 +541,8 @@ class LoginController extends HomeBaseController
"signature"
=>
$signature
,
"rawString"
=>
$string
];
$this
->
apiResponse
(
1
,
'分享成功!'
,
$data
);
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
(
'./public/share'
);
}
//获取微信分享签名随机字符串
...
...
public/themes/simpleboot3_mobile/portal/login/wx_share.html
已删除
100644 → 0
查看文件 @
b55f35c
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
Document
</title>
</head>
<body>
<h1>
分享主题
</h1>
</body>
</html>
public/themes/simpleboot3_mobile/public/share.html
查看文件 @
7d69b2f
...
...
@@ -4,20 +4,12 @@
$
(
function
()
{
var
url
=
window
.
location
.
href
;
var
title_title
=
$
(
document
).
attr
(
'title'
);
$
.
ajax
({
type
:
'POST'
,
url
:
"/portal/login/wxShare"
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
alert
(
JSON
.
stringify
(
data
));
wx
.
config
({
debug
:
true
,
appId
:
data
.
appId
,
timestamp
:
data
.
timestamp
,
nonceStr
:
data
.
nonceStr
,
signature
:
data
.
signature
,
appId
:
'{$data.appId}'
,
timestamp
:
'{$data.timestamp}'
,
nonceStr
:
'{$data.nonceStr}'
,
signature
:
'{$data.signature}'
,
jsApiList
:
[
'updateAppMessageShareData'
,
'updateTimelineShareData'
,
...
...
@@ -45,9 +37,6 @@
wx
.
error
(
function
(
res
)
{
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
});
}
});
});
</script>
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论