Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
ec1385e9
Commit
ec1385e9
authored
Nov 03, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据类型问题
parent
8a8ea5fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
48 deletions
+53
-48
src/components/shop-cloud/shop-cloud.vue
src/components/shop-cloud/shop-cloud.vue
+42
-36
src/components/shopping-cart/shopping-cart-com.vue
src/components/shopping-cart/shopping-cart-com.vue
+2
-2
src/pages/user/questions-answers/community.vue
src/pages/user/questions-answers/community.vue
+9
-10
No files found.
src/components/shop-cloud/shop-cloud.vue
View file @
ec1385e9
...
@@ -651,11 +651,15 @@
...
@@ -651,11 +651,15 @@
<span
@
click=
"dialogFymx = true"
class=
"ckfymx_a"
>
<span
@
click=
"dialogFymx = true"
class=
"ckfymx_a"
>
查看费用明细
查看费用明细
</span>
</span>
<span
class=
"ckfymx_qian"
>
账户余额:
{{
userInfo
.
account_balance
}}
金币
</span>
<span
class=
"ckfymx_qian"
>
账户余额:
{{
userInfo
.
account_balance
}}
金币
</span
>
</p>
</p>
</div>
</div>
<el-button
<el-button
:class=
"getSumCoin
<
=
userInfo
.
account_balance
?
'
submit
'
:
'
nosubmit
'"
:class=
"
getSumCoin
<
=
userInfo
.
account_balance
?
'
submit
'
:
'
nosubmit
'
"
:disabled=
"getSumCoin > userInfo.account_balance"
:disabled=
"getSumCoin > userInfo.account_balance"
@
click=
"submitApp"
@
click=
"submitApp"
>
>
...
@@ -964,7 +968,9 @@
...
@@ -964,7 +968,9 @@
<
/p
>
<
/p
>
<
/div
>
<
/div
>
<
p
class
=
"
fyzj_2
"
>
<
p
class
=
"
fyzj_2
"
>
账户余额:
<
span
class
=
"
fyzj_2_num
"
>
{{
userInfo
.
account_balance
}}
金币
<
/span
>
账户余额:
<
span
class
=
"
fyzj_2_num
"
>
{{
userInfo
.
account_balance
}}
金币
<
/spa
n
>
<
/p
>
<
/p
>
<
/div
>
<
/div
>
<
div
class
=
"
clear_xxx
"
><
/div
>
<
div
class
=
"
clear_xxx
"
><
/div
>
...
@@ -1053,27 +1059,27 @@ export default {
...
@@ -1053,27 +1059,27 @@ export default {
a_deductions
=
this
.
deductions
;
a_deductions
=
this
.
deductions
;
if
(
this
.
formNew
.
cpu
==
"
8
"
)
{
if
(
this
.
formNew
.
cpu
==
"
8
"
)
{
if
(
this
.
formNew
.
memory
==
"
16
"
)
{
if
(
this
.
formNew
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
else
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
}
else
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
}
}
else
if
(
this
.
formNew
.
cpu
==
"
16
"
)
{
}
else
if
(
this
.
formNew
.
cpu
==
"
16
"
)
{
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
else
if
(
this
.
formNew
.
memory
==
"
64
"
)
{
}
else
if
(
this
.
formNew
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
}
}
}
if
(
if
(
...
@@ -1082,10 +1088,10 @@ export default {
...
@@ -1082,10 +1088,10 @@ export default {
this
.
formNew
.
appDuration
>=
1
this
.
formNew
.
appDuration
>=
1
)
{
)
{
sumDisk
+=
sumDisk
+=
this
.
formNew
.
dataDisk
*
Number
(
this
.
formNew
.
dataDisk
)
*
this
.
formNew
.
perDataDisk
*
Number
(
this
.
formNew
.
perDataDisk
)
*
this
.
formNew
.
appDuration
*
Number
(
this
.
formNew
.
appDuration
)
*
this
.
hard_disk
[
0
].
price
;
Number
(
this
.
hard_disk
[
0
].
price
)
;
this
.
jifeiList1
[
2
]
=
{
this
.
jifeiList1
[
2
]
=
{
name
:
"
数据盘
"
,
name
:
"
数据盘
"
,
num
:
`${this.formNew.dataDisk
}
个数据盘,每个数据盘${this.formNew.perDataDisk
}
GB`
,
num
:
`${this.formNew.dataDisk
}
个数据盘,每个数据盘${this.formNew.perDataDisk
}
GB`
,
...
@@ -1112,27 +1118,27 @@ export default {
...
@@ -1112,27 +1118,27 @@ export default {
a_deductions
=
this
.
deductions
;
a_deductions
=
this
.
deductions
;
if
(
this
.
formOld
.
cpu
==
"
8
"
)
{
if
(
this
.
formOld
.
cpu
==
"
8
"
)
{
if
(
this
.
formOld
.
memory
==
"
16
"
)
{
if
(
this
.
formOld
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
else
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
}
else
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
}
}
else
if
(
this
.
formOld
.
cpu
==
"
16
"
)
{
}
else
if
(
this
.
formOld
.
cpu
==
"
16
"
)
{
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
else
if
(
this
.
formOld
.
memory
==
"
64
"
)
{
}
else
if
(
this
.
formOld
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
(
item
=>
{
let
priceObj
=
this
.
cpu_memory
.
find
(
(
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
)
}
)
;
sumCM
+=
priceObj
.
price
;
sumCM
+=
Number
(
priceObj
.
price
)
;
}
}
}
}
if
(
if
(
...
@@ -1141,10 +1147,10 @@ export default {
...
@@ -1141,10 +1147,10 @@ export default {
this
.
formOld
.
appDuration
>=
1
this
.
formOld
.
appDuration
>=
1
)
{
)
{
sumDisk
+=
sumDisk
+=
this
.
formOld
.
dataDisk
*
Number
(
this
.
formOld
.
dataDisk
)
*
this
.
formOld
.
perDataDisk
*
Number
(
this
.
formOld
.
perDataDisk
)
*
this
.
formOld
.
appDuration
*
Number
(
this
.
formOld
.
appDuration
)
*
this
.
hard_disk
[
0
].
price
;
Number
(
this
.
hard_disk
[
0
].
price
)
;
this
.
jifeiList1
[
2
]
=
{
this
.
jifeiList1
[
2
]
=
{
name
:
"
数据盘
"
,
name
:
"
数据盘
"
,
num
:
`${this.formOld.dataDisk
}
个数据盘,每个数据盘${this.formOld.perDataDisk
}
GB`
,
num
:
`${this.formOld.dataDisk
}
个数据盘,每个数据盘${this.formOld.perDataDisk
}
GB`
,
...
@@ -1168,7 +1174,7 @@ export default {
...
@@ -1168,7 +1174,7 @@ export default {
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}
个月`
;
}
个月`
;
}
}
this
.
amounts_payable
=
(
sumCM
+
sumDisk
).
toFixed
(
2
);
this
.
amounts_payable
=
Number
((
Number
(
sumCM
)
+
Number
(
sumDisk
)).
toFixed
(
2
)
);
// this.total_money = sumCM + sumDisk - a_deductions;
// this.total_money = sumCM + sumDisk - a_deductions;
return
this
.
amounts_payable
;
return
this
.
amounts_payable
;
}
,
}
,
...
...
src/components/shopping-cart/shopping-cart-com.vue
View file @
ec1385e9
...
@@ -132,9 +132,9 @@ export default {
...
@@ -132,9 +132,9 @@ export default {
this
.
checkList
.
forEach
((
item
,
index
)
=>
{
this
.
checkList
.
forEach
((
item
,
index
)
=>
{
if
(
item
)
{
if
(
item
)
{
if
(
this
.
list
[
index
].
service_id
!=
0
)
{
if
(
this
.
list
[
index
].
service_id
!=
0
)
{
sum
+=
(
this
.
list
[
index
].
service
.
spcs_info
.
money
*
this
.
list
[
index
].
duration
).
toFixed
(
2
);
sum
+=
Number
((
this
.
list
[
index
].
service
.
spcs_info
.
money
*
this
.
list
[
index
].
duration
).
toFixed
(
2
)
);
}
else
{
}
else
{
sum
+=
(
this
.
list
[
index
].
application
.
price
*
this
.
list
[
index
].
duration
).
toFixed
(
2
);
sum
+=
Number
((
this
.
list
[
index
].
application
.
price
*
this
.
list
[
index
].
duration
).
toFixed
(
2
)
);
}
}
}
}
});
});
...
...
src/pages/user/questions-answers/community.vue
View file @
ec1385e9
...
@@ -202,16 +202,15 @@ export default {
...
@@ -202,16 +202,15 @@ export default {
},
},
submitDel
()
{
submitDel
()
{
this
.
$refs
.
form1
.
validate
((
valid
)
=>
{
this
.
$refs
.
form1
.
validate
((
valid
)
=>
{
console
.
log
(
valid
)
if
(
valid
)
{
// if (valid) {
this
.
diaDel
=
false
;
// this.diaDel = false;
if
(
this
.
now_state
==
"
/qa/questions
"
)
{
// if (this.now_state == "/qa/questions") {
this
.
delQ
();
// this.delQ();
}
else
if
(
this
.
now_state
==
"
/qa/answers
"
)
{
// } else if (this.now_state == "/qa/answers") {
this
.
delA
();
// this.delA();
}
// }
}
else
{
// } else {
}
// }
});
});
},
},
del_q
(
val
)
{
del_q
(
val
)
{
...
...
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