Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yimu
h5-front
Commits
00e983a4
Commit
00e983a4
authored
Mar 07, 2022
by
verestrasz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8ecbd060
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
10 deletions
+78
-10
MFetch.js
src/api/MFetch.js
+9
-3
order.js
src/api/apiconfig/order.js
+3
-0
order.js
src/mixins/order.js
+35
-2
blind-detail.vue
src/views/blind-box/blind-detail.vue
+28
-2
vue.config.js
vue.config.js
+3
-3
No files found.
src/api/MFetch.js
View file @
00e983a4
...
...
@@ -18,7 +18,6 @@ class MFetch {
console
.
info
(
'better alert better experience~'
)
alertServerErrMsg
=
window
.
alert
}
this
.
apiConfig
=
apiConfig
this
.
verify
=
verify
this
.
alertServerErrMsg
=
alertServerErrMsg
...
...
@@ -41,7 +40,12 @@ class MFetch {
let
error
=
new
Error
(
'clearAdminInfo'
)
throw
error
}
else
{
let
error
=
new
Error
(
response
.
statusText
)
let
error
if
(
response
.
data
.
message
===
"repetitive_operation_fail"
){
error
=
new
Error
(
"请勿重复操作!"
)
}
else
{
error
=
new
Error
(
response
.
statusText
)
}
error
.
response
=
response
throw
error
}
...
...
@@ -67,6 +71,7 @@ class MFetch {
requireAuth
=
true
,
isUpload
=
false
,
onUploadProgress
,
header
=
{}
}
=
config
if
(
!
type
||
!
this
.
httpMap
[
type
])
{
...
...
@@ -87,7 +92,8 @@ class MFetch {
'ip'
:
'0.0.0.0'
,
'version'
:
'1.0.0'
,
'platform'
:
'chrome'
,
'type'
:
2
'type'
:
2
,
...
header
}
if
(
isUpload
)
{
headers
[
'Content-Type'
]
=
'multipart/form-data'
...
...
src/api/apiconfig/order.js
View file @
00e983a4
...
...
@@ -241,3 +241,6 @@ export const getTransferOrderList = {
export
const
getTransferOrderDetail
=
{
}
export
const
getCreatApiToken
=
{
url
:
"/apiToken/creatApiToken"
}
src/mixins/order.js
View file @
00e983a4
...
...
@@ -92,10 +92,14 @@ export const OrderMixin = {
// return this.commBtn ? [this.commBtn].concat(arr) : arr
return
arr
},
handleCancelOrder
()
{
this
.
$showLoading
();
async
handleCancelOrder
()
{
let
apiToken
=
await
this
.
getApiToken
()
if
(
apiToken
){
this
.
$api
({
apiName
:
"cancelOrder"
,
header
:{
"apiToken"
:
apiToken
},
postData
:
this
.
data
.
payId
,
success
:
()
=>
{
this
.
data
.
orderState
=
OrderStatus
.
CLOSE
;
...
...
@@ -104,6 +108,35 @@ export const OrderMixin = {
this
.
$hideLoading
();
},
});
this
.
$api
({
apiName
:
"cancelOrder"
,
header
:{
"apiToken"
:
apiToken
},
postData
:
this
.
data
.
payId
,
success
:
()
=>
{
this
.
data
.
orderState
=
OrderStatus
.
CLOSE
;
},
complete
:
()
=>
{
this
.
$hideLoading
();
},
});
}
else
{
this
.
$hideLoading
();
}
},
getApiToken
(){
this
.
$showLoading
();
return
new
Promise
(
reslove
=>
{
this
.
$api
({
apiName
:
"getCreatApiToken"
,
success
:(
res
)
=>
{
reslove
(
res
)
}
})
})
},
handleCancelRefund
()
{
this
.
$showLoading
();
...
...
src/views/blind-box/blind-detail.vue
View file @
00e983a4
...
...
@@ -33,12 +33,12 @@
<div
class=
"header"
>
商品详情
</div>
<div
class=
"detail"
v-html=
"data &&
data.detail"
style=
"padding:0 10px"
></div>
<div
class=
"detail"
v-html=
"data &&
getHtml(data.detail)"
v-finishHtml
></div>
</div>
<van-popup
v-model=
"showPopup"
position=
"bottom"
round
closeable
>
<div
class=
"blind-rule"
>
<div
class=
"title"
>
规则说明
</div>
<div
class=
"content"
v-html=
"data &&
data.blindBoxRule"
style=
"padding:0 10px
"
></div>
<div
class=
"content"
v-html=
"data &&
getHtml(data.blindBoxRule)
"
></div>
</div>
</van-popup>
</div>
...
...
@@ -46,6 +46,18 @@
<
script
>
export
default
{
directives
:{
finishHtml
:{
update
(
el
)
{
let
children
=
el
.
childNodes
for
(
let
item
of
children
){
if
(
item
.
style
.
paddingLeft
!==
'10px'
){
item
.
style
.
padding
=
"0 10px"
}
}
}
},
},
props
:
{
data
:
{
type
:
Object
,
...
...
@@ -62,6 +74,16 @@ export default {
methods
:
{
handleRule
()
{
this
.
showPopup
=
true
},
getHtml
(
data
){
if
(
data
){
var
regex1
=
new
RegExp
(
"(i?)(
\
<p)(?!(.*?style=['
\"
](.*)['
\"
])[^
\
>]+
\
>)"
,
'g'
)
data
=
data
.
replace
(
regex1
,
'$2 style="padding:0 10px"$3'
)
return
data
}
else
{
return
""
}
}
},
};
...
...
@@ -146,5 +168,8 @@ export default {
font-size: 14px;
}
}
.getHtml{
padding: 0 10px;
}
}
</
style
>
\ No newline at end of file
vue.config.js
View file @
00e983a4
...
...
@@ -63,9 +63,9 @@ module.exports = {
// target: 'http://146.56.197.42:12009'
// target: 'http://172.22.20.64:8100/root'
// target: 'http://172.22.17.176:12008'
// target: 'http://172.22.17.108:
12008
'
target
:
'https://mall.inmvo.com/root'
// target: 'https://testym.8n.cn/root'
// target: 'http://172.22.17.108:
9089
'
//
target: 'https://mall.inmvo.com/root'
target
:
'https://testym.8n.cn/root'
},
'/chat'
:
{
pathRewrite
:
{
...
...
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