Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-psp-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-psp-show-h5
Commits
d0233b98
提交
d0233b98
authored
5月 18, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复分享设置失败的问题;修复海报分享样式错误的问题;
上级
593eeb13
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
23 行增加
和
24 行删除
+23
-24
Index.vue
src/modules/share/views/Index.vue
+3
-0
wx.js
src/utils/wx.js
+20
-24
没有找到文件。
src/modules/share/views/Index.vue
浏览文件 @
d0233b98
...
...
@@ -438,6 +438,7 @@ function handleRemoveText(data: TypeText) {
}
.share-controls-title-item
{
margin
:
0
15px
;
flex
:
0
0
228px
;
width
:
228px
;
height
:
60px
;
display
:
flex
;
...
...
@@ -452,6 +453,7 @@ function handleRemoveText(data: TypeText) {
.share-controls-text-item
{
position
:
relative
;
margin
:
0
15px
;
flex
:
0
0
228px
;
width
:
228px
;
height
:
60px
;
display
:
flex
;
...
...
@@ -483,6 +485,7 @@ function handleRemoveText(data: TypeText) {
.share-controls-avatar-item
{
position
:
relative
;
margin
:
0
15px
;
flex
:
0
0
60px
;
width
:
60px
;
height
:
60px
;
border
:
3px
solid
#ccc
;
...
...
src/utils/wx.js
浏览文件 @
d0233b98
import
httpRequest
from
'./axios'
export
default
function
useWXShare
()
{
httpRequest
.
post
(
'https://node-server.ezijing.com/share/getsignature'
,
{
data
:
{
appId
:
'wx451c01d40d090d7a'
,
url
:
location
.
href
.
split
(
'#'
).
pop
()
}
httpRequest
.
post
(
'https://node-server.ezijing.com/share/getsignature'
,
{
appId
:
'wx451c01d40d090d7a'
,
url
:
location
.
href
.
split
(
'#'
).
pop
()
}).
then
(
result
=>
{
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId
:
'wx451c01d40d090d7a'
,
// 必填,公众号的唯一标识
timestamp
:
result
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
result
.
noncestr
,
// 必填,生成签名的随机串
signature
:
result
.
token
,
// 必填,签名
jsApiList
:
[
'updateAppMessageShareData'
,
'updateTimelineShareData'
]
// 必填,需要使用的JS接口列表
})
.
then
(
result
=>
{
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId
:
'wx451c01d40d090d7a'
,
// 必填,公众号的唯一标识
timestamp
:
result
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
result
.
noncestr
,
// 必填,生成签名的随机串
signature
:
result
.
token
,
// 必填,签名
jsApiList
:
[
'updateAppMessageShareData'
,
'updateTimelineShareData'
]
// 必填,需要使用的JS接口列表
})
wx
.
ready
(()
=>
{
wx
.
updateAppMessageShareData
({
title
:
'PRP私享星球'
,
// 分享标题
desc
:
'玩转【PRP系统知识 】践行【有品牌的IP】'
,
// 分享描述
link
:
location
.
href
,
imgUrl
:
'https://webapp-pub.ezijing.com/upload/admin/8348532dc17af54ed9d2279ca12b055a.png'
})
wx
.
ready
(()
=>
{
wx
.
updateAppMessageShareData
({
title
:
'PRP私享星球'
,
// 分享标题
desc
:
'玩转【PRP系统知识 】践行【有品牌的IP】'
,
// 分享描述
link
:
location
.
href
,
imgUrl
:
'https://webapp-pub.ezijing.com/upload/admin/8348532dc17af54ed9d2279ca12b055a.png'
})
wx
.
updateTimelineShareData
({
title
:
'PRP私享星球'
,
// 分享标题
link
:
location
.
href
,
imgUrl
:
'https://webapp-pub.ezijing.com/upload/admin/8348532dc17af54ed9d2279ca12b055a.png'
})
wx
.
updateTimelineShareData
({
title
:
'PRP私享星球'
,
// 分享标题
link
:
location
.
href
,
imgUrl
:
'https://webapp-pub.ezijing.com/upload/admin/8348532dc17af54ed9d2279ca12b055a.png'
})
})
})
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论