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
提交
71f0e77a
提交
71f0e77a
编写于
12月 26, 2019
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
申请逻辑修改
上级
86acc5e7
变更
7
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
285 行增加
和
107 行删除
+285
-107
main.js
src/main.js
+9
-7
fetch.js
src/utils/fetch.js
+2
-1
index.js
src/utils/index.js
+21
-2
mixins.js
src/utils/mixins.js
+1
-1
yqy-bridge.js
src/utils/yqy-bridge.js
+3
-32
credit-detail.vue
src/views/credit-detail.vue
+190
-50
credit-edit.vue
src/views/credit-edit.vue
+59
-14
未找到文件。
src/main.js
浏览文件 @
71f0e77a
...
...
@@ -8,11 +8,16 @@ import '@/utils/rem' // 引入自适应
import
'@/utils/yqy-bridge'
// 移动端服务
// import FastClick from 'fastclick'
import
vueFilters
from
'@/utils/filter'
// import VConsole from 'vconsole/dist/vconsole.min.js'
// if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) {
import
VConsole
from
'vconsole/dist/vconsole.min.js'
import
BuriedPoint
,{
sendBuriedData
}
from
'web-buried-point'
;
import
Vant
from
'vant'
;
import
'vant/lib/index.css'
;
if
(
!
(
process
.
env
.
BUILD_ENV
===
'uat'
||
process
.
env
.
BUILD_ENV
===
'pro'
))
{
// if(!(process.env.BUILD_ENV === 'pro')) {
//
let vConsole = new VConsole() // 初始化
//
}
let
vConsole
=
new
VConsole
()
// 初始化
}
// 可调试
// Vue.config.devtools = true;
...
...
@@ -53,7 +58,6 @@ Vue.mixin({
})
// import './plugins';
import
BuriedPoint
,{
sendBuriedData
}
from
'web-buried-point'
;
// import { buriedURL } from './apiConfig';
let
domain
=
''
;
if
(
process
.
env
.
BUILD_ENV
===
'prod'
)
{
...
...
@@ -74,8 +78,6 @@ Vue.use(BuriedPoint, {
});
Vue
.
prototype
.
$sendBuriedData
=
sendBuriedData
;
import
Vant
from
'vant'
;
import
'vant/lib/index.css'
;
Vue
.
use
(
Vant
);
new
Vue
({
...
...
src/utils/fetch.js
浏览文件 @
71f0e77a
...
...
@@ -17,8 +17,9 @@ service.interceptors.request.use(config => {
if
(
config
.
data
.
token
){
config
.
headers
[
'token'
]
=
config
.
data
.
token
||
'0F32D60C3D7042158BCF1FB574E482BE'
if
(
process
.
env
.
BUILD_ENV
==
"development"
){
// 本地开发环境
config
.
headers
[
'token'
]
=
'
A92C95FD752C413FA3244767177344B7
'
||
'F5CE3BAEC4934864B1022C1C4D39EB40'
;
config
.
headers
[
'token'
]
=
'
C85C482D4E854364815C85485C6277F1
'
||
'F5CE3BAEC4934864B1022C1C4D39EB40'
;
}
delete
config
.
data
.
token
;
}
config
.
headers
[
'deviceInfo'
]
=
JSON
.
stringify
({
"app_channel"
:
""
,
"app_mac"
:
""
,
"app_uuid"
:
""
,
"app_version"
:
""
,
"device_brand"
:
""
,
"device_ip"
:
""
,
"device_model"
:
""
,
"device_net"
:
""
,
"device_ops"
:
""
,
"resolution_wh"
:
""
,
"system_level"
:
""
,
"device_type"
:
'10'
})
...
...
src/utils/index.js
浏览文件 @
71f0e77a
...
...
@@ -25,8 +25,8 @@ function getConfigByEnvType(urlType) {
// 日期与时间解析函数
export
function
parseTime
(
time
,
cFormat
)
{
if
(
arguments
.
length
===
0
)
{
return
null
if
(
arguments
.
length
===
0
||
!
time
)
{
return
''
}
const
format
=
cFormat
||
'{y}-{m}-{d} {h}:{i}:{s}'
let
date
...
...
@@ -117,4 +117,23 @@ export function deepCopy(obj) {
export
function
mergeObjs
(...
ojbs
){
}
export
function
gotoPage
(
context
,
pageUrl
)
{
if
(
__isWeb
)
{
context
.
$router
.
push
(
pageUrl
)
}
else
{
let
paramList
=
[
{
key
:
"pageUrl"
,
value
:
getWebPageUrl
(
pageUrl
),
type
:
4
,
seqNo
:
1
}
];
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M300"
,
jsonString
:
paramList
});
}
}
\ No newline at end of file
src/utils/mixins.js
浏览文件 @
71f0e77a
...
...
@@ -12,7 +12,7 @@ module.exports = {
if
(
this
.
$route
!==
undefined
)
{
query
=
this
.
$route
.
query
}
this
.
token
=
this
.
getUrlKey
(
'token'
)
||
(
query
&&
query
.
token
)
||
'
A92C95FD752C413FA3244767177344B7
'
this
.
token
=
this
.
getUrlKey
(
'token'
)
||
(
query
&&
query
.
token
)
||
'
C85C482D4E854364815C85485C6277F1
'
},
mounted
()
{
...
...
src/utils/yqy-bridge.js
浏览文件 @
71f0e77a
...
...
@@ -4,38 +4,9 @@
e
.
rocNative
=
{
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall
:
function
(
e
,
t
,
n
)
{
// if(t == '__refresh'){
// console.log('!__refresh: ',t,n);
// __refresh(n);
// // return;
// }
if
(
window
[
t
]
){
if
(
window
[
t
])
{
window
[
t
](
n
)
}
// if(t == '__getUserInfo64Comp') {
// __getUserInfo64Comp(n);
// }
// if(t == '__getUserInfo'){
// __getUserInfo(n);
// // return;
// }
// if(t == '__getUserInfo4Comp'){
// __getUserInfo4Comp(n);
// // return;
// }
// if(t == '__getUserInfo4Coop'){
// __getUserInfo4Coop(n);
// // return;
// }
// if (t == '__sendBuriedPoint') {
// __sendBuriedPoint(n);
// // return
// }
// if (t == '__openErrorDebug') {
// __openErrorDebug(n);
// // return
// }
},
__callNative
:
function
(
t
,
a
,
o
)
{
"function"
==
typeof
o
&&
(
n
++
,
i
[
n
]
=
o
);
...
...
@@ -82,7 +53,7 @@
})
}
})
}(
"gotoLogin"
,
"dispatchEventByModuleCode"
,
"gotoAuthentication"
,
"shareWechat"
,
"backPreviousPage"
,
"bindingWechat"
,
"getDeviceInfo"
,
"goBack"
,
"appBuryingPointEntrust"
,
"getAuthPermission"
,
"getAppVersionCode"
,
"getToken"
,
"gotoNewActivity"
,
"gotoNewActivityWithParams"
,
"gotoNewWebActivity"
,
"gotoYidianActivity"
,
"readMessage"
,
"openFiveMintusAudio"
,
"getStatusBarSize"
,
"showNativeDialog"
,
"showNativeToast"
,
"gotoViewTop"
,
"appInit"
,
"checkPermissions"
,
"getStatusBarHeight"
,
"setTabMiniIcon"
,
"getUserInfo"
,
"pauseAudioView"
,
"sendBuriedPoint"
,
"openErrorDebug"
,
"upGradeVersion"
,
"getLocalData"
);
}(
"gotoLogin"
,
"dispatchEventByModuleCode"
,
"gotoAuthentication"
,
"shareWechat"
,
"backPreviousPage"
,
"bindingWechat"
,
"getDeviceInfo"
,
"goBack"
,
"appBuryingPointEntrust"
,
"getAuthPermission"
,
"getAppVersionCode"
,
"getToken"
,
"gotoNewActivity"
,
"gotoNewActivityWithParams"
,
"gotoNewWebActivity"
,
"gotoYidianActivity"
,
"readMessage"
,
"openFiveMintusAudio"
,
"getStatusBarSize"
,
"showNativeDialog"
,
"showNativeToast"
,
"gotoViewTop"
,
"appInit"
,
"checkPermissions"
,
"getStatusBarHeight"
,
"setTabMiniIcon"
,
"getUserInfo"
,
"pauseAudioView"
,
"sendBuriedPoint"
,
"openErrorDebug"
,
"upGradeVersion"
,
"getLocalData"
);
if
(
e
.
__rocAndroid
)
{
e
.
__isAndroid
=
true
e
.
__isIOS
=
false
...
...
@@ -96,7 +67,7 @@
e
.
__isIOS
=
false
e
.
__isWeb
=
true
}
if
(
window
.
__isIOS
)
{
if
(
window
.
__isIOS
)
{
rocNative
.
appInit
()
}
}(
window
);
src/views/credit-detail.vue
浏览文件 @
71f0e77a
此差异已折叠。
点击以展开。
src/views/credit-edit.vue
浏览文件 @
71f0e77a
...
...
@@ -38,14 +38,14 @@ export default {
formData
:
{
creditId
:
""
,
id
:
""
,
name
:
"
测试
"
,
name
:
""
,
idCardNumber
:
""
,
icCardNumber
:
""
,
},
projectId
:
""
,
token
:
"
A92C95FD752C413FA3244767177344B7
"
,
//
projectId: "",
token
:
"
C85C482D4E854364815C85485C6277F1
"
,
buttonStyleType
:
'disabled'
,
from
:
"
outer
"
,
from
:
"
native
"
,
isBlack
:
true
,
bgColor
:
"#fff"
,
navTitle
:
"申请学分"
,
...
...
@@ -72,32 +72,64 @@ export default {
}
},
created
()
{
// 前一页面传projectId,token
this
.
projectId
=
this
.
$route
&&
this
.
$route
.
query
&&
this
.
$route
.
query
.
projectId
||
393
;
this
.
formData
.
id
=
this
.
projectId
;
let
_this
=
this
;
window
.
__getUserInfoInCEdit
=
function
(
param
)
{
_this
.
token
=
param
.
userToken
;
_this
.
getUserInfoByToken
();
_this
.
getLatestApplyRecord
();
};
window
.
__refresh
=
function
()
{
_this
.
getUserInfo
();
};
// 前一页面传creditId
// this.projectId = this.$route && this.$route.query && this.$route.query.projectId || '';
this
.
from
=
this
.
$route
&&
this
.
$route
.
query
&&
this
.
$route
.
query
.
from
||
this
.
from
;
this
.
creditId
=
this
.
$route
&&
this
.
$route
.
query
&&
this
.
$route
.
query
.
creditId
||
393
;
// this.formData.id = this.projectId;
this
.
formData
.
creditId
=
this
.
creditId
;
this
.
token
=
this
.
$route
&&
this
.
$route
.
query
&&
this
.
$route
.
query
.
token
||
this
.
token
||
''
this
.
getUserInfoByToken
();
if
(
__isWeb
)
{
this
.
getUserInfoByToken
();
this
.
getLatestApplyRecord
();
}
else
{
this
.
getUserInfo
()
}
},
methods
:
{
getUserInfo
()
{
rocNative
.
getUserInfo
({
__funcName
:
"__getUserInfoInCEdit"
});
},
// 提交申请
applyCredit
()
{
let
_this
=
this
;
let
param
=
{
...
this
.
formData
,
token
:
this
.
token
,
setEntry
:
true
};
// this.GET("cme/credit/certificate/list", param).then(res => {
this
.
POST
(
"cme/credit/apply"
,
param
).
then
(
res
=>
{
this
.
isShowDialog
=
true
if
(
res
.
code
==
'000000'
)
{
this
.
isShowDialog
=
true
}
})
},
// 最后一次提交信息:获取用户的idCardNumber
getLatestApplyRecord
()
{
let
param
=
{
token
:
this
.
token
,
setEntry
:
true
};
this
.
POST
(
"cme/credit/latestApplyRecord/"
+
this
.
creditId
,
param
).
then
(
res
=>
{
this
.
formData
.
icCardNumber
=
res
.
data
.
icCardNumber
;
})
},
// 根据token获取用户信息
getUserInfoByToken
()
{
let
_this
=
this
;
let
param
=
{
token
:
this
.
token
,
setEntry
:
true
...
...
@@ -105,7 +137,6 @@ export default {
this
.
GET
(
"cme/credit/doctor/info"
,
param
).
then
(
res
=>
{
this
.
formData
.
name
=
res
.
data
.
name
;
this
.
formData
.
idCardNumber
=
res
.
data
.
card
;
this
.
formData
.
icCardNumber
=
res
.
data
.
icCardNumber
;
this
.
isShowDialog
=
true
})
},
...
...
@@ -113,13 +144,19 @@ export default {
// 显示提交成功的提示信息
handlerDialogAction
(
type
)
{
this
.
isShowDialog
=
false
;
// 跳转到前一页面
if
(
window
.
__isWeb
)
{
this
.
$router
.
back
(
-
1
);
}
else
{
rocNative
.
goBack
();
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
@import
"../style/mixin"
;
.credit-edit-wrapper
{
.group
{
...
...
@@ -132,6 +169,14 @@ export default {
line-height
:
px2rem
(
21px
);
color
:
#979899
;
}
.van-cell
{
padding
:
px2rem
(
20px
)
0
!
important
;
font-size
:
px2rem
(
15px
)
!
important
;
color
:
#373839
!
important
;
}
.van-cell__title
span
{
font-weight
:
400
!
important
;
}
}
</
style
>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录