Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-annual-summary
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-annual-summary
提交
59a01c3f
提交
59a01c3f
编写于
8月 20, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
课程分享页面
上级
5773e3f6
变更
8
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
2378 行增加
和
38 行删除
+2378
-38
common-navbar.vue
src/components/common/common-navbar.vue
+7
-27
router.js
src/router/router.js
+15
-10
env-config.js
src/utils/env-config.js
+5
-0
index.js
src/utils/index.js
+5
-0
wxShare.js
src/utils/wxShare.js
+111
-0
merge-detail.vue
src/views/merge-detail.vue
+1
-1
share-merge-detail copy.vue
src/views/share-merge-detail copy.vue
+1253
-0
share-merge-detail.vue
src/views/share-merge-detail.vue
+981
-0
未找到文件。
src/components/common/common-navbar.vue
浏览文件 @
59a01c3f
<
template
>
<
template
>
<section
:class=
"isFixNavbar ? 'nav-top fixed' : 'nav-top'"
:style=
"'height:' + navHeight"
>
<section
:class=
"isFixNavbar ? 'nav-top fixed' : 'nav-top'"
:style=
"'height:' + navHeight"
>
<!--
<section
v-if=
"isWeb"
:class=
"isFixNavbar ? 'nav-top fixed' : 'nav-top'"
>
-->
<div
<div
class=
"nav-part"
class=
"nav-part"
:style=
"'background:' + bgColor + ';'
:style=
"'background:' + bgColor + ';'
...
@@ -10,8 +9,6 @@
...
@@ -10,8 +9,6 @@
<span
class=
"nav-back"
@
click=
"goBack"
>
<span
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=
""
>
<!--
<img
src=
"https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png"
>
-->
<!--
<img
class=
"nav-back"
src=
"../../images//grey-throw.png"
/>
-->
</span>
</span>
<span
class=
"nav-title-title"
v-show=
"bgColor!=='none'"
>
{{
title
}}
</span>
<span
class=
"nav-title-title"
v-show=
"bgColor!=='none'"
>
{{
title
}}
</span>
<span
v-if=
"isShowShare"
class=
"nav-share"
@
click=
"goShare"
>
<span
v-if=
"isShowShare"
class=
"nav-share"
@
click=
"goShare"
>
...
@@ -79,15 +76,13 @@ export default {
...
@@ -79,15 +76,13 @@ export default {
shareTitleInfo
:
{
shareTitleInfo
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
},
shareUrl
:
{
type
:
String
,
default
:
""
}
}
},
},
computed
:
{
computed
:
{
// bgColor2() {
// return this.bgColor
// },
// borderStyle() {
// return this.bgColor === 'no{ne' ? '0px solid #e7e7e7' : '1px solid #e7e7e7'
// },
navHeight
()
{
navHeight
()
{
if
(
this
.
isFixNavbar
)
{
if
(
this
.
isFixNavbar
)
{
return
0
;
return
0
;
...
@@ -108,28 +103,16 @@ export default {
...
@@ -108,28 +103,16 @@ export default {
methods
:
{
methods
:
{
//返回
//返回
goBack
()
{
goBack
()
{
// if (this.burialPoint == "activity") {
// this.pageBurialPoin(this.objPoint);
// }
// if (this.backMethod === "inner" || window.__isWeb) {
// this.$router.back(-1);
// } else {
// rocNative.goBack();
// }
rocNative
.
goBack
();
rocNative
.
goBack
();
},
},
//分享
//分享
goShare
()
{
goShare
()
{
let
url
=
location
.
href
,
//
let url = location.href,
_this
=
this
;
let
_this
=
this
;
rocNative
.
shareWechat
({
rocNative
.
shareWechat
({
// url: url,
// title: '_this.title',
// content: '_this.content',
// shareImageUrl: '_this.shareImageUrl'
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
()
...
@@ -168,9 +151,6 @@ export default {
...
@@ -168,9 +151,6 @@ export default {
width
:
px2rem
(
55px
);
width
:
px2rem
(
55px
);
padding-left
:
px2rem
(
15px
);
padding-left
:
px2rem
(
15px
);
padding-right
:
px2rem
(
15px
);
padding-right
:
px2rem
(
15px
);
// -ms-transform: translate(180deg);
// -webkit-transform: (180deg);
// transform: rotate(180deg);
}
}
img
{
img
{
display
:
block
;
display
:
block
;
...
...
src/router/router.js
浏览文件 @
59a01c3f
...
@@ -2,6 +2,7 @@ import App from '../App'
...
@@ -2,6 +2,7 @@ import App from '../App'
const
index
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/index'
)),
'index'
)
const
index
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/index'
)),
'index'
)
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
courseDetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/course-detail'
)),
'course-detail'
)
const
courseDetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/course-detail'
)),
'course-detail'
)
...
@@ -10,24 +11,28 @@ export default [{
...
@@ -10,24 +11,28 @@ export default [{
component
:
App
,
component
:
App
,
children
:
[
children
:
[
{
{
path
:
''
,
path
:
''
,
redirect
:
'/index'
redirect
:
'/index'
},
},
{
{
path
:
'/index'
,
path
:
'/index'
,
component
:
index
component
:
index
},
},
{
{
path
:
'/home'
,
path
:
'/home'
,
component
:
index
component
:
index
},
},
{
{
path
:
'/coop'
,
path
:
'/coop'
,
component
:
merge
component
:
merge
},
},
{
{
path
:
'/test'
,
path
:
'/sharecoop'
,
component
:
test
component
:
shareMerge
},
{
path
:
'/test'
,
component
:
test
},
},
{
{
path
:
'/course-detail'
,
path
:
'/course-detail'
,
...
...
src/utils/env-config.js
浏览文件 @
59a01c3f
...
@@ -23,6 +23,7 @@ export const envConfig = {
...
@@ -23,6 +23,7 @@ export const envConfig = {
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
:
'wxf4e66242d31c81c2'
,
// 用于微信授权登录
// baseUrl: 'https://sc.yunqueyi.com/',
// baseUrl: 'https://sc.yunqueyi.com/',
// apiUrl: 'https://api.yunqueyi.com/',
// apiUrl: 'https://api.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
浏览文件 @
59a01c3f
...
@@ -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
浏览文件 @
59a01c3f
/* 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
(
shareOption
.
link
);
wxShare
(
shareOption
,
successCB
);
};
Vue
.
prototype
.
wechatShare
=
wechatShare
src/views/merge-detail.vue
浏览文件 @
59a01c3f
...
@@ -184,7 +184,7 @@ export default {
...
@@ -184,7 +184,7 @@ export default {
textContent
:
""
,
textContent
:
""
,
leaderText
:
""
,
leaderText
:
""
,
pageTitle
:
""
,
pageTitle
:
""
,
isShowShare
:
fals
e
,
isShowShare
:
tru
e
,
tabFlag
:
true
,
// 显示目录还是简介
tabFlag
:
true
,
// 显示目录还是简介
fixedFlag
:
false
,
// 目录和简介是否固定
fixedFlag
:
false
,
// 目录和简介是否固定
project
:
{
project
:
{
...
...
src/views/share-merge-detail copy.vue
0 → 100644
浏览文件 @
59a01c3f
此差异已折叠。
点击以展开。
src/views/share-merge-detail.vue
0 → 100644
浏览文件 @
59a01c3f
此差异已折叠。
点击以展开。
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录