Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
sso-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 642ee55e
authored
Dec 08, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
处理测试环境售后详情image不显示问题
1 parent
f9082d39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
src/utils/util.js
src/views/sale/detail.vue
src/utils/util.js
View file @
642ee55
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* 日期格式化
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss')
* let time = new Date().format('yyyy-MM-dd hh:mm:ss')
*/
*/
Date
.
prototype
.
format
=
function
(
fmt
)
{
Date
.
prototype
.
format
=
function
(
fmt
)
{
let
o
=
{
let
o
=
{
'M+'
:
this
.
getMonth
()
+
1
,
//月份
'M+'
:
this
.
getMonth
()
+
1
,
//月份
'd+'
:
this
.
getDate
(),
//日
'd+'
:
this
.
getDate
(),
//日
...
@@ -35,16 +35,35 @@ const getParams = (str = window.location.href) => {
...
@@ -35,16 +35,35 @@ const getParams = (str = window.location.href) => {
obj
[
key
]
=
value
obj
[
key
]
=
value
}
}
return
obj
return
obj
}
}
/**num:要转换的数值,fixed:精确几位小数 */
/**num:要转换的数值,fixed:精确几位小数 */
const
decimal
=
(
num
,
fixed
)
=>
{
const
decimal
=
(
num
,
fixed
)
=>
{
let
pow
=
Math
.
pow
(
10
,
fixed
)
let
pow
=
Math
.
pow
(
10
,
fixed
)
return
Math
.
round
(
num
*
pow
)
/
pow
return
Math
.
round
(
num
*
pow
)
/
pow
}
}
const
getHttpsImgUrl
=
(
url
)
=>
{
if
(
!
url
)
{
return
''
}
var
flag
=
url
.
startsWith
(
"http:"
)
if
(
flag
)
{
var
newurl
=
url
.
replace
(
"http:"
,
"https:"
)
//去掉http自动带的端口 :7060,https不能有
var
startPos
=
newurl
.
lastIndexOf
(
":"
)
var
endPos
=
newurl
.
indexOf
(
"/"
,
startPos
)
var
preStr
=
newurl
.
substring
(
0
,
startPos
)
var
afterStr
=
newurl
.
substring
(
endPos
)
var
finalStr
=
preStr
+
afterStr
return
finalStr
}
return
url
}
import
Vue
from
'vue'
import
Vue
from
'vue'
const
utils
=
{
const
utils
=
{
getParams
,
getParams
,
decimal
decimal
,
getHttpsImgUrl
}
}
Object
.
keys
(
utils
).
map
(
key
=>
{
Object
.
keys
(
utils
).
map
(
key
=>
{
Vue
.
prototype
[
key
]
=
utils
[
key
]
Vue
.
prototype
[
key
]
=
utils
[
key
]
...
...
src/views/sale/detail.vue
View file @
642ee55
...
@@ -164,6 +164,8 @@ export default {
...
@@ -164,6 +164,8 @@ export default {
this
.
$apis
.
orderApi
.
getRefundDetail
(
params
).
then
(({
code
,
data
})
=>
{
this
.
$apis
.
orderApi
.
getRefundDetail
(
params
).
then
(({
code
,
data
})
=>
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
console
.
log
(
data
,
'77777777777'
)
console
.
log
(
data
,
'77777777777'
)
data
.
list
[
0
].
img
=
this
.
getHttpsImgUrl
(
data
.
list
[
0
].
img
)
data
.
list
[
0
].
goodImg
=
this
.
getHttpsImgUrl
(
data
.
list
[
0
].
goodImg
)
this
.
detailInfo
=
data
.
list
[
0
]
this
.
detailInfo
=
data
.
list
[
0
]
}
}
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment