Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
高东东-金蝶建发
/
jf-yzj-employeeself-develop
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bcc905cb
authored
Nov 21, 2023
by
zhongqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update:我要请假已经接入
parent
7ccd63cf
Pipeline
#23922
failed with stage
in 0 seconds
Changes
10
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
125 additions
and
82 deletions
index.html
jsconfig.json
package.json
src/shared/api.js
src/shared/api/index.js
src/shared/api/user.js
src/shared/app.vue
src/shared/components/homepage/home.vue
src/shared/polyfill/cordova.js
src/shared/store/modules/prove.js
index.html
View file @
bcc905cb
...
...
@@ -6,6 +6,7 @@
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<meta
name=
"viewport"
content=
"initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
>
<script
src=
"miniapp://common/js/qing/qing.js"
></script>
<!-- <script src="https://staging.jffctest.com/public/js/qing/latest/qing.js"></script>-->
</head>
<body>
<div
id=
"app"
></div>
...
...
jsconfig.json
0 → 100644
View file @
bcc905cb
{
"compilerOptions"
:
{
"baseUrl"
:
"./"
,
"paths"
:
{
"@/*"
:
[
"./src/shared/*"
],
"~com/*"
:
[
"./src/shared/components/*"
],
"~lib/*"
:
[
"./src/libraries/*"
],
"~config/*"
:
[
"./src/shared/config/*"
]
,
"~proj/*"
:
[
"./src/projectDynamic/*"
]
}
}
}
package.json
View file @
bcc905cb
...
...
@@ -7,7 +7,7 @@
"scripts"
:
{
"dev"
:
"node build/dev-server.js"
,
"start"
:
"npm run dev"
,
"build"
:
"npm run build:
v
test"
,
"build"
:
"npm run build:test"
,
"build:test"
:
"cross-env PACK_ENV=prod PACK_VENV=vtest node build/build.js"
,
"build:prod"
:
"cross-env PACK_ENV=prod PACK_VENV=vprod node build/build.js"
},
...
...
src/shared/api.js
View file @
bcc905cb
// const testToken = 'T3353641990669312'
const
basePreUrl
=
'hr.hrself.'
;
const
basePreUrl
=
'hr.hrself.'
// export const SetToken = function (val) {
// let env = process.env.NODE_ENV;
...
...
@@ -14,24 +14,25 @@ const basePreUrl = 'hr.hrself.';
// })
// }
// }
//我要请假小程序appid
export
const
LeaveAppId
=
process
.
env
.
PACK_VENV
===
'vprod'
?
'500000125'
:
'500000125'
export
default
{
LoginUrl
:
basePreUrl
+
"loginSelf"
,
AnnRollUrl
:
basePreUrl
+
"annRollListSelf"
,
PayRollUrl
:
basePreUrl
+
"payRollListSelf"
,
PayRolDetailUrl
:
basePreUrl
+
"payRollInfoSelf"
,
InsurelUrl
:
basePreUrl
+
"insRecordInfoSelf"
,
FundUrl
:
basePreUrl
+
"fundRecordInfoSelf"
,
AwardUrl
:
basePreUrl
+
"awardListSelf"
,
RewUrl
:
basePreUrl
+
"rewProvideListSelf"
,
UserInfoUrl
:
basePreUrl
+
"userInfoSelf"
,
UserModifyUrl
:
basePreUrl
+
"modifyUserInfoSelf"
,
AddCodeUrl
:
basePreUrl
+
"getCodeSelf"
,
HomeListUrl
:
basePreUrl
+
"homeListSelf"
,
HomeInfoUrl
:
basePreUrl
+
"homeInfoSelf"
,
HomeModifyUrl
:
basePreUrl
+
"modifyHomeInfoSelf"
,
DiamondUrl
:
basePreUrl
+
"diamondLifeV"
,
UpdatePassword
:
basePreUrl
+
"updatePassword"
,
SendCodeByUserName
:
basePreUrl
+
"sendCodeByUserName"
,
UpdatePasswordByCode
:
basePreUrl
+
"updatePasswordByCode"
LoginUrl
:
basePreUrl
+
'loginSelf'
,
AnnRollUrl
:
basePreUrl
+
'annRollListSelf'
,
PayRollUrl
:
basePreUrl
+
'payRollListSelf'
,
PayRolDetailUrl
:
basePreUrl
+
'payRollInfoSelf'
,
InsurelUrl
:
basePreUrl
+
'insRecordInfoSelf'
,
FundUrl
:
basePreUrl
+
'fundRecordInfoSelf'
,
AwardUrl
:
basePreUrl
+
'awardListSelf'
,
RewUrl
:
basePreUrl
+
'rewProvideListSelf'
,
UserInfoUrl
:
basePreUrl
+
'userInfoSelf'
,
UserModifyUrl
:
basePreUrl
+
'modifyUserInfoSelf'
,
AddCodeUrl
:
basePreUrl
+
'getCodeSelf'
,
HomeListUrl
:
basePreUrl
+
'homeListSelf'
,
HomeInfoUrl
:
basePreUrl
+
'homeInfoSelf'
,
HomeModifyUrl
:
basePreUrl
+
'modifyHomeInfoSelf'
,
DiamondUrl
:
basePreUrl
+
'diamondLifeV'
,
UpdatePassword
:
basePreUrl
+
'updatePassword'
,
SendCodeByUserName
:
basePreUrl
+
'sendCodeByUserName'
,
UpdatePasswordByCode
:
basePreUrl
+
'updatePasswordByCode'
}
src/shared/api/index.js
View file @
bcc905cb
...
...
@@ -17,7 +17,7 @@ const masConfig = process.env.PACK_VENV === 'vprod'
const
mas
=
MAS
.
getInstance
().
config
(
masConfig
)
Vue
.
prototype
.
$mas
=
mas
const
debugToken
=
'
T5005556394836992
'
const
debugToken
=
'
yzj_68ab62e08529511f15d5797337c1298f
'
const
debugUsername
=
'hqhuang@cndrealty.com'
// 调试模式下,为非V+包环境
const
debug
=
process
.
env
.
NODE_ENV
===
'development'
...
...
src/shared/api/user.js
View file @
bcc905cb
src/shared/app.vue
View file @
bcc905cb
...
...
@@ -71,7 +71,7 @@ export default {
// await Api.setToken(this)
// 修改导航条颜色
this
.
$nativeApi
.
system
.
statusBarColor
([
255
,
255
,
255
,
1
])
//
this.$nativeApi.system.statusBarColor([255, 255, 255, 1])
// 监听路由变化
this
.
$router
.
beforeEach
((
to
,
from
,
next
)
=>
{
...
...
src/shared/components/homepage/home.vue
View file @
bcc905cb
<
template
>
<div
class=
"view-content has-header bg"
>
<div
class=
"user_info"
>
<div
class=
'view-content has-header bg'
>
<div
class=
'user_info'
>
<div>
<h2>
{{
userName
}}
</h2>
<p>
您已入职
{{
dayCount
}}
天
</p>
<h2>
{{
userName
}}
</h2>
<p>
您已入职
{{
dayCount
}}
天
</p>
<!--
<p>
新的一天,新开始的开始!
</p>
-->
</div>
<div
class=
"photoWrapper"
>
<img
:src=
"photoUrl"
class=
"round_icon"
/>
<div
class=
'photoWrapper'
>
<img
:src=
'photoUrl'
class=
'round_icon'
/>
</div>
</div>
<!-- 钻石人生-入口 (暂时隐藏)-->
<div
class=
"banner"
@
click=
"onBannerClick"
>
<img
class=
"bannerImg"
src=
"../../assets/images/life_banner@2x.png"
alt=
"life"
>
<div
class=
'banner'
@
click=
'onBannerClick'
>
<img
class=
'bannerImg'
src=
'../../assets/images/life_banner@2x.png'
alt=
'life'
>
</div>
<group
gutter=
"0"
>
<cell
:is-link=
"true"
@
click
.
native=
"clickMyInfo"
class=
"border-top"
>
<p
class=
"cell-title"
slot=
"title"
>
个人信息修改
</p>
<font-icon
slot=
"icon"
class=
"margin-r-8"
type=
"ic_me"
/>
<group
gutter=
'0'
>
<cell
:is-link=
'true'
@
click
.
native=
'clickMyInfo'
class=
'border-top'
>
<p
class=
'cell-title'
slot=
'title'
>
个人信息修改
</p>
<font-icon
slot=
'icon'
class=
'margin-r-8'
type=
'ic_me'
/>
<!--
<span
slot=
"value"
style=
"color:#D23930"
>
完整度
{{
percent
}}
</span>
-->
</cell>
<cell
:is-link=
"true"
@
click
.
native=
"clickLeave"
class=
"border-top"
>
<p
class=
"cell-title"
slot=
"title"
>
请假
</p>
<font-icon
slot=
"icon"
class=
"margin-r-8"
type=
"ic_qingjia"
/>
<cell
:is-link=
'true'
@
click
.
native=
'clickLeave'
class=
'border-top'
>
<p
class=
'cell-title'
slot=
'title'
>
请假
</p>
<font-icon
slot=
'icon'
class=
'margin-r-8'
type=
'ic_qingjia'
/>
</cell>
<cell
:is-link=
"true"
@
click
.
native=
"clickSalary"
class=
"border-top"
>
<p
class=
"cell-title"
slot=
"title"
>
薪资查询
</p>
<font-icon
slot=
"icon"
class=
"margin-r-8"
type=
"ic_xinzi"
/>
<cell
:is-link=
'true'
@
click
.
native=
'clickSalary'
class=
'border-top'
>
<p
class=
'cell-title'
slot=
'title'
>
薪资查询
</p>
<font-icon
slot=
'icon'
class=
'margin-r-8'
type=
'ic_xinzi'
/>
</cell>
<cell
:is-link=
"true"
@
click
.
native=
"clickProve"
class=
"border-top border-bottom"
>
<p
class=
"cell-title"
slot=
"title"
>
开具证明
</p>
<font-icon
slot=
"icon"
class=
"margin-r-8"
type=
"ic_zhengming"
/>
<cell
:is-link=
'true'
@
click
.
native=
'clickProve'
class=
'border-top border-bottom'
>
<p
class=
'cell-title'
slot=
'title'
>
开具证明
</p>
<font-icon
slot=
'icon'
class=
'margin-r-8'
type=
'ic_zhengming'
/>
</cell>
</group>
<img
:src=
"require('../../assets/images/bg_bottom@2x.png')"
class=
"bottom-img"
/>
<login-dialog
ref=
"dialogOA"
v-on:loginSuccess=
"doLogin"
/>
<half-year-dialog
ref=
"halfYearDialog"
@
onButtonClick=
"gotoChange"
/>
<img
:src=
"require('../../assets/images/bg_bottom@2x.png')"
class=
'bottom-img'
/>
<login-dialog
ref=
'dialogOA'
v-on:loginSuccess=
'doLogin'
/>
<half-year-dialog
ref=
'halfYearDialog'
@
onButtonClick=
'gotoChange'
/>
</div>
</
template
>
...
...
@@ -45,6 +45,7 @@ import FontIcon from '@/components/commom/FontIcon'
import
{
mapState
,
mapActions
,
mapMutations
}
from
'vuex'
import
LoginDialog
from
'./login'
import
HalfYearDialog
from
'@/components/commom/halfYearDialog'
import
{
LeaveAppId
}
from
'@/api'
export
default
{
components
:
{
...
...
@@ -55,7 +56,7 @@ export default {
LoginDialog
,
HalfYearDialog
},
activated
()
{
activated
()
{
this
.
init
()
/* 用自定义事件重新document事件
document.addEventListener('backbutton', this.onBackKeyDown)
...
...
@@ -65,7 +66,7 @@ export default {
}
customEvt
.
addEventListener
(
'backbutton'
,
this
.
_onBackKeyDown
)
},
deactivated
()
{
deactivated
()
{
/* 用自定义事件重新document事件
document.removeEventListener('backbutton', this.onBackKeyDown)
*/
...
...
@@ -79,7 +80,7 @@ export default {
}
},
watch
:
{
username
()
{
username
()
{
// V+延时触发
if
(
this
.
username
)
{
this
.
init
()
...
...
@@ -93,16 +94,16 @@ export default {
'username'
,
'userid'
]),
userName
()
{
userName
()
{
return
this
.
userInfo
.
name
},
dayCount
()
{
dayCount
()
{
return
this
.
userInfo
.
enterDay
},
percent
()
{
percent
()
{
return
this
.
userInfo
.
infoPercent
},
photoUrl
()
{
photoUrl
()
{
return
this
.
userInfo
.
personPhoto
?
(
`data:image/jpeg;base64,
${
this
.
userInfo
.
personPhoto
}
`
)
:
require
(
'../../assets/images/avatar.png'
)
}
},
...
...
@@ -118,7 +119,7 @@ export default {
'updateIncumbencyProveInfo'
,
'updateIncomeProveInfo'
]),
init
()
{
init
()
{
// 移动端触发
if
(
this
.
username
)
{
// 未登录,弹出登录对话框
...
...
@@ -129,22 +130,26 @@ export default {
this
.
$mas
.
userName
=
this
.
username
}
},
clickMyInfo
()
{
clickMyInfo
()
{
this
.
$router
.
push
({
name
:
'myInfo'
})
},
clickSalary
()
{
clickSalary
()
{
this
.
$router
.
push
({
name
:
'salaryList'
})
},
clickLeave
()
{
this
.
$nativeApi
.
navigator
.
showWidget
([
'com.cnd.hr.leave'
])
clickLeave
()
{
// this.$nativeApi.navigator.showWidget(['com.cnd.hr.leave'])
qing
.
call
(
'gotoLightApp'
,
{
urlParam
:
'cloudhub://miniapp?appid='
+
LeaveAppId
+
'&path=index.html'
})
},
clickProve
()
{
clickProve
()
{
// 清空缓存的证明数据
this
.
updateIncumbencyProveInfo
({})
this
.
updateIncomeProveInfo
({})
this
.
$router
.
push
({
name
:
'prove'
})
},
onBackKeyDown
(
e
)
{
onBackKeyDown
(
e
)
{
// 安卓点击返回键退出
if
(
this
.
$router
.
currentRoute
.
name
===
'homepage'
)
{
this
.
$nativeApi
.
navigator
.
exit
()
...
...
@@ -167,7 +172,7 @@ export default {
this
.
showHalfYearDialog
()
}
},
isNeedShowHalfYearDialog
()
{
isNeedShowHalfYearDialog
()
{
let
show
=
false
let
isNeedCleanDate
=
false
// 上次确认状态
...
...
@@ -184,8 +189,8 @@ export default {
let
lastMonth
=
last
.
getMonth
()
+
1
let
lastDay
=
last
.
getDate
()
// 如果时间到了指定的日期,则需要再次弹出确认弹窗
if
(
month
===
this
.
alertMonth
&&
day
===
this
.
alertDay
)
{
if
(
lastYear
===
year
&&
lastMonth
===
month
)
{
if
(
month
===
this
.
alertMonth
&&
day
===
this
.
alertDay
)
{
if
(
lastYear
===
year
&&
lastMonth
===
month
)
{
isNeedCleanDate
=
false
// console.log('同年同月,不清除')
}
else
{
...
...
@@ -210,15 +215,15 @@ export default {
}
return
show
},
showHalfYearDialog
()
{
showHalfYearDialog
()
{
// 显示半年提示框(显示员工信息确认提示框)
// window.localStorage.setItem('lastShowDate_' + this.$store.state.shareStore.userid, new Date().getTime())
this
.
$refs
.
halfYearDialog
.
showDialog
()
},
gotoChange
()
{
gotoChange
()
{
this
.
clickMyInfo
()
},
isNeedShowDiamondLife
()
{
isNeedShowDiamondLife
()
{
// 新的一年里,第一次登录,自动打开钻石人生页面
let
show
=
false
let
lastDate
=
window
.
localStorage
.
getItem
(
'newYear_'
+
this
.
$store
.
state
.
shareStore
.
userid
)
...
...
@@ -235,63 +240,69 @@ export default {
}
return
show
},
showDiamondLife
()
{
showDiamondLife
()
{
// 显示钻石人生
window
.
localStorage
.
setItem
(
'newYear_'
+
this
.
$store
.
state
.
shareStore
.
userid
,
new
Date
().
getTime
())
this
.
onBannerClick
()
},
onBannerClick
()
{
onBannerClick
()
{
return
// 钻石人生
this
.
$router
.
push
({
name
:
'diamondLife'
})
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'forgotPsw'
||
from
.
name
===
'resetPsw'
)
{
// 再次显示登录对话框
vm
.
showLogin
()
}
})
;
})
}
}
</
script
>
<!-- 全局样式 -->
<
style
lang=
"less"
>
<
style
lang=
'less'
>
.vux-header
{
background-color
:
#fff
!important
;
background-color
:
#fff
!important
;
.vux-header-left
{
color
:
#333333
!important
;
color
:
#333333
!important
;
.
left-arrow
:
before
{
border-color
:
#333333
!important
;
border-color
:
#333333
!important
;
}
}
}
.bg
{
background-color
:
#ffffff
!important
;
background-color
:
#ffffff
!important
;
}
.weui-cells
:before
,
.weui-cell
:before
{
border-top
:
none
!important
;
border-top
:
none
!important
;
}
.weui-cells
:after
{
border-bottom
:
none
!important
;
border-bottom
:
none
!important
;
}
.margin-r-8
{
margin-right
:
8px
;
}
.border-top
{
border-top
:
1px
solid
#D9D9D9
;
}
.border-bottom
{
border-bottom
:
1px
solid
#D9D9D9
;
}
</
style
>
<
style
lang=
"less"
scoped
>
<
style
lang=
'less'
scoped
>
.user_info
{
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -302,11 +313,13 @@ export default {
font-size
:
24px
;
font-weight
:
bold
;
}
p
{
color
:
#666666
;
font-size
:
14px
;
font-weight
:
400
;
}
.photoWrapper
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -316,21 +329,25 @@ export default {
height
:
72px
;
border-radius
:
50%
;
overflow
:
hidden
;
.round_icon
{
width
:
100%
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
}
}
.cell-title
{
font-size
:
20px
;
}
.weui-cell
{
padding
:
15px
;
}
.banner
{
position
:
relative
;
width
:
100%
;
...
...
@@ -344,6 +361,7 @@ export default {
padding
:
12px
15px
;
}
}
.bottom-img
{
position
:
absolute
;
width
:
100%
;
...
...
src/shared/polyfill/cordova.js
View file @
bcc905cb
This diff is collapsed.
Click to expand it.
src/shared/store/modules/prove.js
View file @
bcc905cb
...
...
@@ -254,9 +254,11 @@ export default {
}
})
.
catch
(
err
=>
{
console
.
log
(
'报错了1>>'
,
err
)
commit
(
'networkError'
,
err
,
{
root
:
true
})
})
}
catch
(
error
)
{
console
.
log
(
'报错了2>>'
,
err
)
commit
(
'networkError'
,
error
,
{
root
:
true
})
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment