Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
ff98ef69
Commit
ff98ef69
authored
Feb 12, 2020
by
linxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
9ffd3ff3
Pipeline
#4829
canceled with stages
Changes
14
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
252 additions
and
79 deletions
+252
-79
dev.env.js
config/dev.env.js
+2
-2
uat.env.js
config/uat.env.js
+1
-1
App.vue
src/App.vue
+9
-6
rateInput.vue
src/components/rateInput.vue
+107
-0
confirm-list.vue
src/pages/carConfirm/confirm-list.vue
+1
-1
creat-rent-info.vue
src/pages/contractCreate/creat-rent-info.vue
+27
-9
contract-repayment.vue
src/pages/contractRepayment/contract-repayment.vue
+4
-3
financing-details.vue
src/pages/financingTrial/financing-details.vue
+10
-4
invoice.vue
src/pages/invoice/invoice.vue
+15
-1
my-info.vue
src/pages/myInfo/my-info.vue
+2
-2
tab.vue
src/pages/tab.vue
+38
-36
base-info.vue
src/pages/userBindNew/np/base-info.vue
+13
-13
filter.js
src/scripts/filter.js
+22
-0
index.html
www/index.html
+1
-1
No files found.
config/dev.env.js
View file @
ff98ef69
...
...
@@ -8,9 +8,9 @@ module.exports = merge(prodEnv, {
debug
:
true
,
isMobilePlatform
:
false
,
loginPath
:
'"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" '
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
UAT
&apiName="'
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
DEV
&apiName="'
,
rootPath
:
'"http://180.104.121.66:8088/r/api"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
UAT
&apiName=file_view&"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
DEV
&apiName=file_view&"'
,
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
appId
:
'"com.xcmg.app.dev"'
,
currentVersion
:
'"1.8.4"'
,
...
...
config/uat.env.js
View file @
ff98ef69
...
...
@@ -11,5 +11,5 @@ module.exports = {
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
fileUploadSvcPath
:
'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="'
,
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"1.5.
0
"'
currentVersion
:
'"1.5.
1
"'
}
src/App.vue
View file @
ff98ef69
...
...
@@ -26,18 +26,21 @@ export default {
return
from
.
path
}))
this
.
pathList
.
splice
(
index
,
1
)
this
.
$router
.
isBack
=
true
this
.
$router
.
isBack
=
1
}
else
{
this
.
pathList
.
push
(
to
.
path
)
this
.
$router
.
isBack
=
false
this
.
$router
.
isBack
=
2
}
if
(
to
.
path
===
'/tab/home-page'
)
{
this
.
$router
.
isBack
=
true
if
(
to
.
path
===
'/tab/home-page'
||
to
.
path
===
'/tab/my-info'
||
to
.
path
===
'/tab/message-center'
||
from
.
path
===
'/tab/home-page'
||
from
.
path
===
'/tab/my-info'
||
from
.
path
===
'/tab/message-center'
)
{
this
.
$router
.
isBack
=
3
this
.
transitionName
=
''
this
.
pathList
=
[]
}
// let isBack = this.$router.isBack
if
(
to
.
path
!==
'/tab/home-page'
&&
to
.
path
!==
'/tab/my-info'
&&
to
.
path
!==
'/tab/message-center'
)
{
this
.
transitionName
=
'router-slide-right'
this
.
$router
.
isBack
=
false
this
.
$router
.
isBack
=
2
}
},
},
methods
:
{
...
...
src/components/rateInput.vue
0 → 100644
View file @
ff98ef69
/**
* @Author Sean
* @Date 2019/11/21
*/
<
template
>
<input
:value=
"formatValue"
:readonly=
"disable"
type=
"text"
@
blur=
"onBlur"
@
click=
"keyboradShow();onFocus($event)"
>
</
template
>
<
script
>
export
default
{
name
:
'CurrencyInput'
,
props
:
{
value
:
{
default
:
''
,
},
// disable: {
// type: Boolean,
// default: true,
// },
content
:
{
type
:
String
,
default
:
''
,
},
},
data
()
{
return
{
focused
:
false
,
disable
:
true
,
newVal
:
''
,
}
},
filter
:
{
uncurrency
(
val
)
{
if
(
!
val
)
return
''
return
Number
((
val
).
replace
(
/,|%/gi
,
''
))
},
},
computed
:
{
formatValue
()
{
let
currency
=
this
.
$options
.
filters
[
'rate'
]
if
(
!
this
.
focused
)
{
if
(
this
.
value
!==
''
&&
this
.
value
!==
null
)
{
return
`
${
currency
(
this
.
value
)}
%`
}
}
else
{
return
this
.
value
}
},
},
methods
:
{
keyboradShow
()
{
let
vm
=
this
hlsPopup
.
showNumberKeyborad
({
title
:
'数字键盘'
,
keyDown
:
(
text
)
=>
{
vm
.
onInput
(
text
)
},
keyDelete
:
()
=>
{
vm
.
onDelete
()
},
})
},
onInput
(
value
)
{
// if (this.disable) return
let
uncurrency
=
this
.
$options
.
filter
[
'uncurrency'
]
this
.
newVal
=
uncurrency
(
this
.
value
)
this
.
newVal
+=
(
''
+
value
)
this
.
$emit
(
'input'
,
this
.
newVal
)
},
onDelete
()
{
this
.
newVal
=
''
this
.
$emit
(
'input'
,
this
.
newVal
)
},
// onInput: function (value) {
// if (this.disable) return
// let uncurrency = this.$options.filter['uncurrency']
// this.currencyValue = uncurrency(value)
// this.$emit('input', this.currencyValue)
// },
onFocus
(
event
)
{
// if (this.disable) return
this
.
focused
=
true
let
value
=
(
event
.
target
.
value
).
trim
()
let
uncurrency
=
this
.
$options
.
filter
[
'uncurrency'
]
let
newVal
=
uncurrency
(
value
)
event
.
target
.
value
=
newVal
setTimeout
(
function
()
{
event
.
target
.
type
=
'number'
event
.
target
.
value
=
newVal
// event.target.focus()
},
0
)
},
onBlur
(
event
)
{
// if (this.disable) return
event
.
target
.
type
=
'text'
this
.
focused
=
false
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
src/pages/carConfirm/confirm-list.vue
View file @
ff98ef69
...
...
@@ -56,7 +56,7 @@ export default {
},
data
()
{
return
{
text
:
{
first
:
'待
签约'
,
second
:
'已签约
'
},
text
:
{
first
:
'待
确认'
,
second
:
'已确认
'
},
tabNum
:
0
,
keyWord
:
''
,
status
:
''
,
...
...
src/pages/contractCreate/creat-rent-info.vue
View file @
ff98ef69
...
...
@@ -95,7 +95,10 @@
</item>
<item>
<div
slot=
"name"
class=
"required"
>
首付比例
</div>
<input
slot=
"content"
v-model=
"saveInfo.down_payment_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
>
<RateInput
v-if=
"!isReadOnly"
slot=
"content"
v-model=
"saveInfo.down_payment_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
/>
<span
v-if=
"isReadOnly"
slot=
"content"
>
{{
saveInfo
.
down_payment_ratio_n
}}
%
</span>
</item>
<item
v-if=
"!isReadOnly"
>
<div
slot=
"name"
class=
"required"
>
首付款
</div>
...
...
@@ -109,7 +112,10 @@
</item>
<item>
<div
slot=
"name"
class=
"required"
>
保证金比例
</div>
<input
slot=
"content"
v-model=
"saveInfo.deposit_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
>
<RateInput
v-if=
"!isReadOnly"
slot=
"content"
v-model=
"saveInfo.deposit_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
/>
<span
v-if=
"isReadOnly"
slot=
"content"
>
{{
saveInfo
.
deposit_ratio_n
}}
%
</span>
</item>
<item
v-if=
"!isReadOnly"
>
<div
slot=
"name"
class=
"required"
>
保证金
</div>
...
...
@@ -123,7 +129,10 @@
</item>
<item>
<div
slot=
"name"
class=
"required"
>
手续费比例
</div>
<input
slot=
"content"
v-model=
"saveInfo.lease_charge_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
>
<RateInput
v-if=
"!isReadOnly"
slot=
"content"
v-model=
"saveInfo.lease_charge_ratio_n"
:readonly=
"isReadOnly"
placeholder=
"%"
/>
<span
v-if=
"isReadOnly"
slot=
"content"
>
{{
saveInfo
.
lease_charge_ratio_n
}}
%
</span>
</item>
<item
v-if=
"!isReadOnly"
>
<div
slot=
"name"
class=
"required"
>
手续费
</div>
...
...
@@ -299,10 +308,11 @@
</
template
>
<
script
>
import
CurrencyInput
from
'../../components/currencyInput'
import
RateInput
from
'@/components/rateInput'
export
default
{
components
:
{
CurrencyInput
,
RateInput
,
},
data
()
{
return
{
...
...
@@ -525,6 +535,9 @@ export default {
vm
.
saveInfo
.
product_plan_name
=
res
.
info
.
product_plan_id_n
vm
.
saveInfo
.
division_n
=
res
.
info
.
product_name
vm
.
saveInfo
.
down_payment
=
res
.
info
.
down_payment
vm
.
saveInfo
.
down_payment_ratio_n
=
vm
.
saveInfo
.
down_payment_ratio_n
.
replace
(
'%'
,
''
)
vm
.
saveInfo
.
deposit_ratio_n
=
vm
.
saveInfo
.
deposit_ratio_n
.
replace
(
'%'
,
''
)
vm
.
saveInfo
.
lease_charge_ratio_n
=
vm
.
saveInfo
.
lease_charge_ratio_n
.
replace
(
'%'
,
''
)
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
...
...
@@ -535,15 +548,16 @@ export default {
vm
.
saveInfo
.
product_plan_id
=
e
.
product_plan_id
vm
.
saveInfo
.
product_plan_name
=
e
.
product_plan_name
vm
.
saveInfo
.
down_payment_ratio
=
e
.
down_payment_ratio
vm
.
saveInfo
.
down_payment_ratio_n
=
e
.
down_payment_ratio_n
vm
.
saveInfo
.
down_payment_ratio_n
=
e
.
down_payment_ratio_n
.
replace
(
'%'
,
''
)
vm
.
saveInfo
.
lease_charge_ratio
=
e
.
lease_charge_ratio
vm
.
saveInfo
.
lease_charge_ratio_n
=
e
.
lease_charge_ratio_n
vm
.
saveInfo
.
lease_charge_ratio_n
=
e
.
lease_charge_ratio_n
.
replace
(
'%'
,
''
)
vm
.
saveInfo
.
int_rate
=
e
.
int_rate
vm
.
saveInfo
.
int_rate_n
=
e
.
int_rate_n
vm
.
saveInfo
.
penalty_rate_n
=
e
.
penalty_rate_n
vm
.
saveInfo
.
penalty_rate
=
e
.
penalty_rate
vm
.
saveInfo
.
deposit_ratio
=
e
.
deposit_ratio
vm
.
saveInfo
.
deposit_ratio_n
=
e
.
deposit_ratio_n
vm
.
saveInfo
.
deposit_ratio_n
=
e
.
deposit_ratio_n
.
replace
(
'%'
,
''
)
// vm.saveInfo.lease_times = e.lease_times
vm
.
saveInfo
.
lease_times
=
''
setTimeout
(()
=>
{
...
...
@@ -805,7 +819,7 @@ export default {
let
iToMon
=
signDate
.
getMonth
()
let
iToYear
=
signDate
.
getFullYear
()
let
newDay
=
new
Date
(
iToYear
,
iToMon
,
(
iToDay
+
30
))
this
.
saveInfo
.
lease_start_date
=
`
${
newDay
.
getFullYear
()}
-
${(
newDay
.
getMonth
()).
length
===
2
?
newDay
.
getMonth
()
:
'0'
+
(
newDay
.
getMonth
()
+
1
)}
-
${(
newDay
.
getDate
()
).
length
===
2
?
newDay
.
getDate
()
:
'0'
+
newDay
.
getDate
()}
`
this
.
saveInfo
.
lease_start_date
=
`
${
newDay
.
getFullYear
()}
-
${(
newDay
.
getMonth
()).
toString
().
length
===
2
?
newDay
.
getMonth
()
:
'0'
+
(
newDay
.
getMonth
()
+
1
)}
-
${(
newDay
.
getDate
()).
toString
(
).
length
===
2
?
newDay
.
getDate
()
:
'0'
+
newDay
.
getDate
()}
`
}
},
showTime
(
format
)
{
// 预计付款日
...
...
@@ -819,7 +833,11 @@ export default {
nowDate
:
newDay
.
format
(
'yyyy-MM-dd'
),
format
:
format
,
callback
:
(
date
)
=>
{
if
(
date
>=
(
new
Date
()).
format
(
'yyyy-MM-dd'
))
{
vm
.
saveInfo
.
lease_start_date
=
date
}
else
{
hlsPopup
.
showLongCenter
(
`预计付款日期不能小于
${(
new
Date
()).
format
(
'yyyy-MM-dd'
)}
`
)
}
},
})
},
...
...
src/pages/contractRepayment/contract-repayment.vue
View file @
ff98ef69
...
...
@@ -197,8 +197,9 @@ export default {
position: absolute;
right: 20px;
top: 13px;
width: 57px;
height: 21px;
// width: 57px;
// height: 21px;
padding:2px 5px;
line-height: 19px;
text-align: center;
border-radius: 2px;
...
...
src/pages/financingTrial/financing-details.vue
View file @
ff98ef69
...
...
@@ -30,7 +30,7 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
首付款比例
</div>
<
input
slot=
"content"
v-model=
"info.down_payment_ratio_n"
placeholder=
"请输入首付款比例"
>
<
RateInput
slot=
"content"
v-model=
"info.down_payment_ratio_n"
placeholder=
"请输入首付款比例"
/
>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
首付款
</div>
...
...
@@ -39,7 +39,7 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
保证金比例
</div>
<
input
slot=
"content"
v-model=
"info.deposit_ratio_n"
placeholder=
"请输入保证金比例"
>
<
RateInput
slot=
"content"
v-model=
"info.deposit_ratio_n"
placeholder=
"请输入保证金比例"
/
>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
保证金
</div>
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
手续费比例
</div>
<
input
slot=
"content"
v-model=
"info.lease_charge_ratio_n"
placeholder=
"请输入手续费比例"
>
<
RateInput
slot=
"content"
v-model=
"info.lease_charge_ratio_n"
placeholder=
"请输入手续费比例"
/
>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
手续费
</div>
...
...
@@ -86,7 +86,7 @@
<item>
<div
slot=
"name"
class=
"font-color"
>
年利率
</div>
<!--
<span
slot=
"content"
>
{{
info
.
int_rate_n
}}
</span>
-->
<
input
slot=
"content"
v-model=
"info.int_rate_n"
placeholder=
"请输入年利率"
>
<
RateInput
slot=
"content"
v-model=
"info.int_rate_n"
placeholder=
"请输入年利率"
/
>
</item>
<!--
<item>
<div
slot=
"name"
class=
"font-color"
>
产品数量
</div>
...
...
@@ -116,10 +116,12 @@
<
script
>
import
CurrencyInput
from
'@/components/currencyInput'
import
RateInput
from
'@/components/rateInput'
export
default
{
name
:
'FinancingDetails'
,
components
:
{
CurrencyInput
,
RateInput
,
},
data
()
{
return
{
...
...
@@ -242,6 +244,10 @@ export default {
vm
.
info
=
res
.
info
vm
.
info
.
lease_times
=
''
// 租赁期数置空
vm
.
annual_pay_times
=
res
.
info
.
annual_pay_times
vm
.
info
.
down_payment_ratio_n
=
vm
.
info
.
down_payment_ratio_n
.
replace
(
'%'
,
''
)
vm
.
info
.
deposit_ratio_n
=
vm
.
info
.
deposit_ratio_n
.
replace
(
'%'
,
''
)
vm
.
info
.
lease_charge_ratio_n
=
vm
.
info
.
lease_charge_ratio_n
.
replace
(
'%'
,
''
)
vm
.
info
.
int_rate_n
=
vm
.
info
.
int_rate_n
.
replace
(
'%'
,
''
)
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
...
...
src/pages/invoice/invoice.vue
View file @
ff98ef69
...
...
@@ -10,7 +10,12 @@
<span>
我的发票
</span>
</div>
</h-header>
<scroll
ref=
"scroll"
:updateData=
"[invoiceList]"
:pullUp=
"true"
@
pullingUp=
"loadMore"
>
<div
v-if=
"invoiceList.length===0"
class=
"display"
>
<img
src=
"@/assets/messageCenter/noMsg.png"
alt=
""
>
</div>
<scroll
v-if=
"invoiceList.length!==0"
ref=
"scroll"
:updateData=
"[invoiceList]"
:pullUp=
"true"
@
pullingUp=
"loadMore"
>
<section
class=
"invoice-wrap"
>
<list-item
v-for=
"(list,index) in invoiceList"
:key=
"index"
>
<div
class=
"invoice-number"
>
...
...
@@ -106,6 +111,15 @@ export default {
<
style
lang=
"less"
rel=
"stylesheet"
>
@import "../../styles/mixin";
#invoice {
.display {
position: fixed;
// top: 0;
img {
width: 100%;
height: 100%;
// margin-top: -70px;
}
}
.content {
position: absolute;
top: 0;
...
...
src/pages/myInfo/my-info.vue
View file @
ff98ef69
...
...
@@ -141,11 +141,11 @@
<img
slot=
"left-icon"
src=
"@/assets/myInfo/refresh.png"
class=
"left-icon"
>
<div
slot=
"name"
>
检查更新
</div>
</item>
-->
<item
@
click
.
native=
"openTest"
>
<
!--
<
item
@
click
.
native=
"openTest"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/refresh.png"
class=
"left-icon"
>
<div
slot=
"name"
>
当前版本
</div>
<div
slot=
"content"
>
{{
currentVersion
}}
</div>
</item>
</item>
-->
<item
@
click
.
native=
"logOut"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/exit.png"
class=
"left-icon"
>
<div
slot=
"name"
>
退出登录
</div>
...
...
src/pages/tab.vue
View file @
ff98ef69
...
...
@@ -37,46 +37,48 @@
</
template
>
<
script
>
export
default
{
export
default
{
components
:
{},
data
()
{
data
()
{
return
{
pathList
:
[],
transitionName
:
''
,
}
},
watch
:
{
// 监听路由变化
$route
(
to
,
from
)
{
$route
(
to
,
from
)
{
if
(
this
.
pathList
.
includes
(
to
.
path
))
{
const
index
=
(
this
.
pathList
.
findIndex
(()
=>
{
return
from
.
path
}))
this
.
pathList
.
splice
(
index
,
1
)
this
.
$router
.
isBack
=
true
this
.
$router
.
isBack
=
1
}
else
{
this
.
pathList
.
push
(
to
.
path
)
this
.
$router
.
isBack
=
false
this
.
$router
.
isBack
=
2
}
if
(
to
.
path
===
'/tab/home-page
'
)
{
this
.
$router
.
isBack
=
true
if
(
to
.
path
===
'/tab/home-page'
||
to
.
path
===
'/tab/my-info'
||
to
.
path
===
'/tab/message-center'
||
from
.
path
===
'/tab/home-page'
||
from
.
path
===
'/tab/my-info'
||
from
.
path
===
'/tab/message-center
'
)
{
this
.
$router
.
isBack
=
3
this
.
pathList
=
[]
}
let
isBack
=
this
.
$router
.
isBack
if
(
isBack
)
{
this
.
transitionName
=
'router-slide-right
'
}
else
{
if
(
isBack
===
3
)
{
this
.
transitionName
=
'
'
}
else
if
(
isBack
===
2
)
{
this
.
transitionName
=
'router-slide-left'
}
else
if
(
isBack
===
1
)
{
this
.
transitionName
=
'router-slide-right'
}
this
.
$router
.
isBack
=
false
this
.
$router
.
isBack
=
2
},
},
methods
:
{
tabClick
()
{
tabClick
()
{
// console.log('click');
},
},
}
}
</
script
>
<
style
lang=
"less"
>
...
...
src/pages/userBindNew/np/base-info.vue
View file @
ff98ef69
...
...
@@ -352,7 +352,7 @@ export default {
bp_type_n
:
''
,
bp_type
:
''
,
},
peopleList
:
[],
//
peopleList: [],
cityList
:
[],
provinceList
:
[],
upload_list
:
[],
// 上传图片列表
...
...
@@ -584,17 +584,17 @@ export default {
})
},
methods
:
{
roleCancle
()
{
this
.
inputNum
=
false
},
roleConfirm
(
e
)
{
if
(
this
.
peopleList
.
includes
(
e
))
{
hlsPopup
.
showLongCenter
(
'您已添加了该业务经办'
)
}
else
{
this
.
peopleList
.
push
(
e
)
}
this
.
inputNum
=
false
},
//
roleCancle () {
//
this.inputNum = false
//
},
//
roleConfirm (e) {
//
if (this.peopleList.includes(e)) {
//
hlsPopup.showLongCenter('您已添加了该业务经办')
//
} else {
//
this.peopleList.push(e)
//
}
//
this.inputNum = false
//
},
timeFormat
(
str
)
{
return
`
${
str
.
substring
(
0
,
4
)}
-
${
str
.
substring
(
4
,
6
)}
-
${
str
.
substring
(
6
)}
`
},
...
...
@@ -646,7 +646,7 @@ export default {
vm
.
from
=
true
vm
.
addRows
(
vm
.
baseInfo
.
address_on_resident_booklit
)
vm
.
addRowsLive
(
vm
.
baseInfo
.
living_address
)
vm
.
peopleList
=
res
.
info
.
agent_username
.
split
(
','
)
//
vm.peopleList = res.info.agent_username.split(',')
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
...
...
src/scripts/filter.js
View file @
ff98ef69
...
...
@@ -22,6 +22,28 @@ export default (Vue) => {
return
'¥'
+
intPartFormat
+
floatPart
}
})
Vue
.
filter
(
'rate'
,
function
(
val
)
{
if
(
!
val
)
return
'%'
// var intPart = Number(val).toFixed(0) // 获取整数部分
var
intPart
=
val
.
toString
().
split
(
'.'
)[
0
]
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
value2Array
=
(
val
+
''
).
split
(
'.'
)
// =2表示数据有小数位
if
(
value2Array
.
length
===
2
)
{
floatPart
=
value2Array
[
1
].
toString
()
// 拿到小数部分
if
(
floatPart
.
length
===
1
)
{
// 补0,实际上用不着
return
intPartFormat
+
'.'
+
floatPart
+
'0'
}
else
{
return
intPartFormat
+
'.'
+
floatPart
}
}
else
{
return
intPartFormat
+
floatPart
}
})
// Vue.filter('datetime', timestamp => {
// function format (number) {
// return number.toString().padStart(2, '0')
...
...
www/index.html
View file @
ff98ef69
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.cb4b414f6aa1c0c2cabfa58644824037.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.6a178e8d77c32e3c385d.js
></script><script
type=
text/javascript
src=
./static/js/vendor.8a1ae113e3b5262701ed.js
></script><script
type=
text/javascript
src=
./static/js/app.046abfed6be0c0834c4f.js
></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.707f96ae4ea85f70381b52114df09627.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.6a178e8d77c32e3c385d.js
></script><script
type=
text/javascript
src=
./static/js/vendor.8a1ae113e3b5262701ed.js
></script><script
type=
text/javascript
src=
./static/js/app.14524008c8e0d22e959f.js
></script></body></html>
\ No newline at end of file
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