Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-learning-report
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-learning-report
提交
1df7fb21
提交
1df7fb21
编写于
1月 06, 2022
作者:
张磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add page-model
上级
ae447a48
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
102 行删除
+21
-102
common-header-new.vue
src/components/common/common-header-new.vue
+3
-80
vue-inject.js
src/plugins/vue-inject.js
+1
-2
jsbridge.js
src/utils/jsbridge.js
+7
-5
prolist.vue
src/views/prolist.vue
+10
-15
未找到文件。
src/components/common/common-header-new.vue
浏览文件 @
1df7fb21
<!-- 通用Navbar -->
<
template
>
<section
:class=
"isFixNavbar ? 'nav-top-new fixed' : 'nav-top-new'
"
class=
"nav-top-new
"
:style=
"'height:' + navHeight"
>
<div
class=
"nav-part-new"
:style=
"
'background:' +
bgColor +
';' +
'padding-top:' +
paddingTop +
';border-bottom:' +
borderStyle
"
>
<div
class=
"nav-part-new"
>
<div
class=
"nav-title-new"
>
<span
class=
"nav-back"
@
click=
"goBack"
>
<img
v-show=
"isBlack"
src=
"../../assets/images/left-arrow-black.png"
alt=
""
>
<img
v-show=
"!isBlack"
src=
"../../assets/images/left-arrow-black.png"
alt=
""
>
</span>
<span
v-show=
"bgColor !== 'none'"
class=
"nav-title-new-title"
>
{{
title
}}
</span>
<span
v-show=
"isShowShare"
class=
"nav-share"
@
click=
"goShare"
>
<img
src=
"https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
>
</span>
<span
v-show=
"isShowKf && !isWeb"
class=
"nav-share"
...
...
@@ -66,43 +34,14 @@ import { goKfFn } from '@/utils/kf';
export
default
{
name
:
'CommonNavbarNew'
,
props
:
{
bgColor
:
{
type
:
String
,
default
:
''
,
},
title
:
{
type
:
String
,
default
:
'暂无数据'
,
},
// 是否fix定位
isFixNavbar
:
{
type
:
Boolean
,
default
:
true
,
},
burialPoint
:
{
default
:
''
,
type
:
String
,
},
backMethod
:
{
type
:
String
,
default
:
'native'
,
// inner native
},
isShowShare
:
{
type
:
Boolean
,
default
:
false
,
},
isShowKf
:
{
type
:
Boolean
,
default
:
false
,
},
borderStyle
:
{
type
:
String
,
default
:
'0px solid #e7e7e7'
,
},
isBlack
:
{
type
:
Boolean
,
default
:
true
,
},
},
data
()
{
return
{
...
...
@@ -117,11 +56,7 @@ export default {
},
computed
:
{
navHeight
()
{
if
(
this
.
isFixNavbar
)
{
return
'54px'
;
}
else
{
return
(
this
.
navbarHeight
+
this
.
contentHeight
)
/
this
.
fontSize
+
'rem'
;
}
return
(
this
.
navbarHeight
+
this
.
contentHeight
)
/
this
.
fontSize
+
'rem'
;
},
paddingTop
()
{
return
this
.
navbarHeight
/
this
.
fontSize
+
'rem'
;
...
...
@@ -145,18 +80,6 @@ export default {
this
.
$rocNative
.
goBack
();
}
},
// 分享
goShare
()
{
this
.
$rocNative
.
shareWechat
({
type
:
6
,
shareId
:
0
,
shareUrl
:
'shareUrl'
,
title1
:
'this.shareTitle1'
,
title2
:
'this.shareTitle2'
,
shareImageUrl
:
'https://file.yunqueyi.com/logo.png?version='
+
new
Date
().
getTime
(),
});
},
goKf
()
{
goKfFn
({
code
:
'0002'
,
...
...
src/plugins/vue-inject.js
浏览文件 @
1df7fb21
import
Vue
from
'vue'
;
import
rocNative
from
'@/utils/jsbridge'
;
// import echarts from 'echarts';
import
{
Toast
}
from
'vant'
;
const
echarts
=
window
.
echarts
;
console
.
log
(
'--rocNative'
,
rocNative
);
Vue
.
use
(
Toast
);
Vue
.
prototype
.
$echarts
=
echarts
;
Vue
.
prototype
.
$rocNative
=
new
rocNative
();
src/utils/jsbridge.js
浏览文件 @
1df7fb21
...
...
@@ -16,7 +16,12 @@ export const JsBridgeOptions = {
GLOBAL_NAME
:
'rocNative'
,
NATIVE_IOS_NAME
:
'rociOS'
,
NATIVE_ANDROID_NAME
:
'__rocAndroid'
,
initMethodsWithCallBack
:
[
'getToken'
,
'getUserInfo'
,
'getLocalData'
],
// value is string
initMethodsWithCallBack
:
[
'getToken'
,
'getUserInfo'
,
'getLocalData'
,
'getAppVersionCode'
,
],
// value is string
initMethodsWithoutCallBack
:
[
'gotoLogin'
,
'appInit'
,
...
...
@@ -51,7 +56,6 @@ export default class PicaJsBridge {
this
.
isIOS
=
this
.
_isIos
();
this
.
isAndroid
=
this
.
_isAndroid
();
this
.
isWeb
=
this
.
_isWeb
();
if
(
_toString
.
call
(
initMethodsWithCallBack
)
===
ARRAY_CLASS
&&
initMethodsWithCallBack
.
length
!==
0
...
...
@@ -90,7 +94,7 @@ export default class PicaJsBridge {
// register method width callback in window
_registerMethod
(
method
)
{
const
_this
=
this
;
console
.
log
(
'-method'
,
method
,
_this
);
_this
[
method
]
=
(
param
)
=>
{
return
new
Promise
((
response
,
reject
)
=>
{
_this
.
_callNative
(
method
,
param
,
function
(
result
)
{
...
...
@@ -135,7 +139,6 @@ export default class PicaJsBridge {
window
[
this
.
_NATIVE_ANDROID_NAME
].
postMessage
(
pm
);
return
true
;
}
if
(
this
.
isIOS
)
{
window
.
webkit
.
messageHandlers
[
this
.
_NATIVE_IOS_NAME
].
postMessage
(
pm
);
return
true
;
...
...
@@ -166,7 +169,6 @@ export default class PicaJsBridge {
throw
Error
(
'widthCallback flag not defined, registerMethods should take second param value(true/false) for is not has callback.'
);
if
(
this
.
isWeb
)
return
;
// Add By Anndy Yang
methods
.
forEach
((
m
)
=>
{
widthCallback
===
true
...
...
src/views/prolist.vue
浏览文件 @
1df7fb21
...
...
@@ -2,46 +2,40 @@
<!-- 专项合作首页: 我参与的,其它项目 -->
<div
class=
"pro-list-container"
>
<!--
<CommonHeader
:title=
"title"
></CommonHeader>
-->
<CommonHeaderNew
border-style=
"1px solid #e7e7e7"
:title=
"title"
:is-show-kf=
"isShowKf"
/>
<PageModel
:header-info=
"headerInfo"
/>
<CoopListItem
style=
"margin: 10px 0"
:data-list=
"projectList"
/>
<!--
<Loading
v-if=
"showLoading"
/>
-->
</div>
</
template
>
<
script
>
import
CommonHeaderNew
from
'@/components/common/common-header-new'
;
// import CommonHeaderNew from '@/components/common/common-header-new';
import
PageModel
from
'@pica-kit/page-model'
;
import
CoopListItem
from
'@/components/bussiness/coop-list-item'
;
// import Loading from '@/components/common/common-loading';
import
{
getProjectList
}
from
'@/service'
;
import
{
BASE_URL
}
from
'@/utils/enumerate'
;
const
{
VUE_APP_ENV
}
=
process
.
env
;
const
cookies
=
require
(
'cookie-universal'
)();
console
.
log
(
'--BASE_URL'
,
BASE_URL
);
console
.
log
(
'--VUE_APP_ENV'
,
VUE_APP_ENV
);
export
default
{
components
:
{
CommonHeaderNew
,
//
CommonHeaderNew,
CoopListItem
,
// Loading
,
PageModel
,
},
data
()
{
return
{
token
:
'8C124410C0904B69B06D0E65039984B9'
,
title
:
'学情报告'
,
headerInfo
:
{
title
:
'学情报告'
,
},
token
:
'C98719AA9D544876A92277955A692C8D'
,
projectList
:
[],
isShowKf
:
true
,
};
},
created
()
{
const
_this
=
this
;
console
.
log
(
'--this.$rocNative.isWeb'
,
this
.
$rocNative
.
isWeb
);
if
(
this
.
$rocNative
.
isWeb
)
{
cookies
.
set
(
'conslToken'
,
_this
.
token
);
_this
.
getProjectList
();
...
...
@@ -50,6 +44,7 @@ export default {
}
},
mounted
()
{
console
.
log
(
'---prolist--'
,
this
.
$rocNative
.
getAppVersionCode
);
this
.
$sendBuriedData
&&
this
.
$sendBuriedData
({
action
:
'ACTION_WEB_ENTER'
,
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录