Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cooperation-cme
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-cooperation-cme
提交
06b1ea57
提交
06b1ea57
编写于
8月 20, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分享的项目详情页面
上级
2162343b
变更
6
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
1241 行增加
和
4 行删除
+1241
-4
common-navbar.vue
src/components/common/common-navbar.vue
+9
-4
router.js
src/router/router.js
+5
-0
env-config.js
src/utils/env-config.js
+5
-0
index.js
src/utils/index.js
+5
-0
wxShare.js
src/utils/wxShare.js
+112
-0
share-merge-detail.vue
src/views/share-merge-detail.vue
+1105
-0
未找到文件。
src/components/common/common-navbar.vue
浏览文件 @
06b1ea57
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
+ 'padding-top:' + paddingTop + ';border-bottom:' + borderStyle"
+ 'padding-top:' + paddingTop + ';border-bottom:' + borderStyle"
>
>
<div
class=
"nav-title"
>
<div
class=
"nav-title"
>
<span
class=
"nav-back"
@
click=
"goBack"
>
<span
v-if=
"isShowShare"
class=
"nav-back"
@
click=
"goBack"
>
<img
v-show=
"isBlack"
src=
"../../images/left-array-black.png"
alt=
""
>
<img
v-show=
"isBlack"
src=
"../../images/left-array-black.png"
alt=
""
>
<img
v-show=
"!isBlack"
src=
"../../images/left-array-whiter.png"
alt=
""
>
<img
v-show=
"!isBlack"
src=
"../../images/left-array-whiter.png"
alt=
""
>
</span>
</span>
...
@@ -76,6 +76,10 @@ export default {
...
@@ -76,6 +76,10 @@ export default {
shareTitleInfo
:
{
shareTitleInfo
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
},
shareUrl
:
{
type
:
String
,
default
:
""
}
}
},
},
computed
:
{
computed
:
{
...
@@ -103,12 +107,13 @@ export default {
...
@@ -103,12 +107,13 @@ export default {
},
},
//分享
//分享
goShare
()
{
goShare
()
{
let
url
=
location
.
href
,
// 这里要改造
_this
=
this
;
// let url = location.href,
let
_this
=
this
;
rocNative
.
shareWechat
({
rocNative
.
shareWechat
({
type
:
6
,
type
:
6
,
shareId
:
0
,
shareId
:
0
,
shareUrl
:
u
rl
,
shareUrl
:
_this
.
shareU
rl
,
title1
:
_this
.
shareTitle
,
title1
:
_this
.
shareTitle
,
title2
:
_this
.
shareTitleInfo
,
title2
:
_this
.
shareTitleInfo
,
shareImageUrl
:
"https://file.yunqueyi.com/logo.png?version="
+
new
Date
().
getTime
()
shareImageUrl
:
"https://file.yunqueyi.com/logo.png?version="
+
new
Date
().
getTime
()
...
...
src/router/router.js
浏览文件 @
06b1ea57
...
@@ -5,6 +5,7 @@ const complist = r => require.ensure([], () => r(require('../views/component-det
...
@@ -5,6 +5,7 @@ const complist = r => require.ensure([], () => r(require('../views/component-det
const
cooplist
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/cooperation-details'
)),
'cooplist'
)
const
cooplist
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/cooperation-details'
)),
'cooplist'
)
const
parent
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/parent-page'
)),
'parent'
)
const
parent
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/parent-page'
)),
'parent'
)
const
merge
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/merge-detail'
)),
'merge'
)
const
merge
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/merge-detail'
)),
'merge'
)
const
shareMerge
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/share-merge-detail'
)),
'share-merge'
)
const
test
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/test-components'
)),
'test-components'
)
const
test
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/test-components'
)),
'test-components'
)
const
creditedit
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/credit-edit'
)),
'credit-edit'
)
const
creditedit
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/credit-edit'
)),
'credit-edit'
)
const
creditdetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/credit-detail'
)),
'credit-detail'
)
const
creditdetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/credit-detail'
)),
'credit-detail'
)
...
@@ -42,6 +43,10 @@ export default [{
...
@@ -42,6 +43,10 @@ export default [{
{
{
path
:
'/coop'
,
path
:
'/coop'
,
component
:
merge
component
:
merge
},
{
path
:
'/sharecoop'
,
component
:
shareMerge
},
},
{
{
path
:
'/test'
,
path
:
'/test'
,
...
...
src/utils/env-config.js
浏览文件 @
06b1ea57
...
@@ -12,6 +12,7 @@ export const envConfig = {
...
@@ -12,6 +12,7 @@ export const envConfig = {
webPageUrl
:
'https://dev-phome.yunqueyi.com/'
,
webPageUrl
:
'https://dev-phome.yunqueyi.com/'
,
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
hactiveUrl
:
'https://dev-hactive.yunqueyi.com'
,
hactiveUrl
:
'https://dev-hactive.yunqueyi.com'
,
appId
:
'wxf4e66242d31c81c2'
,
// 用于微信授权登录
// http://dev-hactive.yunqueyi.com/message_push/#/study-card
// http://dev-hactive.yunqueyi.com/message_push/#/study-card
// baseUrl: 'https://test1-sc.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
...
@@ -35,23 +36,27 @@ export const envConfig = {
...
@@ -35,23 +36,27 @@ export const envConfig = {
apiUrl
:
'https://dev-api.yunqueyi.com/'
,
apiUrl
:
'https://dev-api.yunqueyi.com/'
,
webPageUrl
:
'https://dev-phome.yunqueyi.com/'
,
webPageUrl
:
'https://dev-phome.yunqueyi.com/'
,
hactiveUrl
:
'https://dev-hactive.yunqueyi.com'
,
hactiveUrl
:
'https://dev-hactive.yunqueyi.com'
,
appId
:
'wxf4e66242d31c81c2'
,
// 用于微信授权登录
},
},
test
:
{
test
:
{
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
apiUrl
:
'https://test1-api.yunqueyi.com/'
,
apiUrl
:
'https://test1-api.yunqueyi.com/'
,
webPageUrl
:
'https://test1-phome.yunqueyi.com/'
,
webPageUrl
:
'https://test1-phome.yunqueyi.com/'
,
hactiveUrl
:
'https://test1-hactive.yunqueyi.com'
,
hactiveUrl
:
'https://test1-hactive.yunqueyi.com'
,
appId
:
'wxcaad75b7fff5659c'
,
// 用于微信授权登录
},
},
uat
:
{
uat
:
{
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
hactiveUrl
:
'https://uat-hactive.yunqueyi.com'
,
hactiveUrl
:
'https://uat-hactive.yunqueyi.com'
,
appId
:
'wx342ef0e5afee54a7'
,
// 用于微信授权登录
},
},
pro
:
{
pro
:
{
baseUrl
:
'https://sc.yunqueyi.com/'
,
baseUrl
:
'https://sc.yunqueyi.com/'
,
apiUrl
:
'https://api.yunqueyi.com/'
,
apiUrl
:
'https://api.yunqueyi.com/'
,
webPageUrl
:
'https://phome.yunqueyi.com/'
,
webPageUrl
:
'https://phome.yunqueyi.com/'
,
hactiveUrl
:
'https://hactive.yunqueyi.com'
,
hactiveUrl
:
'https://hactive.yunqueyi.com'
,
appId
:
'wx2c577552a2d28550'
,
// 用于微信授权登录
}
}
}
}
src/utils/index.js
浏览文件 @
06b1ea57
...
@@ -23,6 +23,11 @@ export function getHactiveUrl(url) {
...
@@ -23,6 +23,11 @@ export function getHactiveUrl(url) {
return
getConfigByEnvType
(
'hactiveUrl'
)
+
(
url
||
''
)
return
getConfigByEnvType
(
'hactiveUrl'
)
+
(
url
||
''
)
}
}
// 获取微信APPID
export
function
getAPPID
()
{
return
getConfigByEnvType
(
'appId'
)
}
// 根据不同环境,生成URL
// 根据不同环境,生成URL
function
getConfigByEnvType
(
urlType
)
{
function
getConfigByEnvType
(
urlType
)
{
return
envConfig
[
process
.
env
.
BUILD_ENV
][
urlType
]
return
envConfig
[
process
.
env
.
BUILD_ENV
][
urlType
]
...
...
src/utils/wxShare.js
0 → 100644
浏览文件 @
06b1ea57
/* eslint-disable */
import
Vue
from
'vue'
import
request
from
'@/service/api'
;
import
wx
from
'weixin-js-sdk'
import
{
getBaseUrl
}
from
"@/utils/index"
;
/** 注入配置信息 */
export
const
wxConfig
=
(
link
)
=>
{
// const params = { resetURI: true, url: encodeURIComponent(location.href) };
// 上线前是需要把域名改为线上的sc
let
baseUrl
=
getBaseUrl
();
// request({ url: `https://sc.yunqueyi.com/wechats/signs?url=${encodeURIComponent(link)}` }).then(res => {
request
({
url
:
`
${
baseUrl
}
/wechats/signs?url=
${
encodeURIComponent
(
link
)}
`
}).
then
(
res
=>
{
let
configs
=
res
.
data
.
signMap
;
wx
.
config
({
debug
:
false
,
appId
:
configs
.
appId
,
nonceStr
:
configs
.
nonceStr
,
timestamp
:
configs
.
timestamp
,
signature
:
configs
.
signature
,
jsApiList
:
[
'hideMenuItems'
,
'previewImage'
,
'checkJsApi'
,
'chooseWXPay'
,
'onMenuShareTimeline'
,
'onMenuShareAppMessage'
,
'onMenuShareQQ'
,
'onMenuShareWeibo'
,
'onMenuShareQZone'
,
'getLocation'
,
'openLocation'
,
'translateVoice'
]
});
});;
};
/**
* wxShare 分享
* @param option
*/
export
const
wxShare
=
(
option
=
{},
successCB
=
()
=>
{})
=>
{
wx
.
ready
(()
=>
{
// 分享给朋友
wx
.
onMenuShareAppMessage
({
title
:
option
.
title
,
desc
:
option
.
desc
,
link
:
option
.
link
,
imgUrl
:
option
.
imgUrl
,
success
:
function
(
res
)
{
// 用户确认分享后执行的回调函数
successCB
(
res
);
},
cancel
:
function
()
{
// 用户取消分享后执行的回调函数
}
});
// 分享到朋友圈
wx
.
onMenuShareTimeline
({
title
:
option
.
friendtitle
||
option
.
title
,
// 标题
desc
:
option
.
desc
,
link
:
option
.
link
,
// 链接
imgUrl
:
option
.
imgUrl
,
// 分享图标
success
:
function
(
res
)
{
successCB
(
res
);
},
cancel
:
function
()
{
// 用户取消分享后执行的回调函数
}
});
});
};
export
const
wxDisabledShare
=
()
=>
{
wx
.
ready
(()
=>
{
wx
.
hideMenuItems
({
menuList
:
[
'menuItem:share:appMessage'
,
'menuItem:share:timeline'
,
'menuItem:share:qq'
,
'menuItem:share:weiboApp'
,
'menuItem:share:QZone'
]
});
});
};
/**
*
* @param source
* @param option
*/
export
const
wechatShare
=
async
(
option
=
{},
successCB
=
()
=>
{})
=>
{
const
shareOption
=
{
link
:
location
.
href
,
title
:
`云鹊医!`
,
friendtitle
:
`讨论进行中,速来围观!`
,
desc
:
'参与讨论,一起畅谈医学那些事!快来看看吧~'
,
imgUrl
:
'https://file.yunqueyi.com/logo.png'
,
...
option
};
wxConfig
(
link
);
wxShare
(
shareOption
,
successCB
);
};
Vue
.
prototype
.
wechatShare
=
wechatShare
src/views/share-merge-detail.vue
0 → 100644
浏览文件 @
06b1ea57
此差异已折叠。
点击以展开。
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录