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
c6874dc8
Commit
c6874dc8
authored
Mar 08, 2022
by
zhuang_cong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ad6d858d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
222 additions
and
33 deletions
+222
-33
assets.js
src/enums/assets.js
+44
-24
index.js
src/router/index.js
+10
-0
index.vue
src/views/user-center/assets/assets/detail/index.vue
+1
-0
scroll-details.vue
...views/user-center/assets/assets/detail/scroll-details.vue
+64
-7
index.vue
src/views/user-center/assets/record-detail/index.vue
+101
-0
vue.config.js
vue.config.js
+2
-2
No files found.
src/enums/assets.js
View file @
c6874dc8
export
const
Ass
te
sRecordType
=
{
export
const
Ass
et
sRecordType
=
{
ALIPAY_IN
:
1
,
ALIPAY_IN
:
1
,
ALIPAY_OUT
:
2
,
ALIPAY_OUT
:
2
,
WX_IN
:
3
,
WX_IN
:
3
,
...
@@ -25,95 +25,95 @@ export const AsstesRecordType = {
...
@@ -25,95 +25,95 @@ export const AsstesRecordType = {
}
}
export
const
AssetsRecordTypeObj
=
{
export
const
AssetsRecordTypeObj
=
{
[
Ass
te
sRecordType
.
ALIPAY_IN
]:
{
[
Ass
et
sRecordType
.
ALIPAY_IN
]:
{
label
:
"支付宝"
,
label
:
"支付宝"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
ALIPAY_OUT
]:
{
[
Ass
et
sRecordType
.
ALIPAY_OUT
]:
{
label
:
"支付宝"
,
label
:
"支付宝"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
WX_IN
]:
{
[
Ass
et
sRecordType
.
WX_IN
]:
{
label
:
"微信支付"
,
label
:
"微信支付"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
WX_OUT
]:
{
[
Ass
et
sRecordType
.
WX_OUT
]:
{
label
:
"微信支付"
,
label
:
"微信支付"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
COIN_IN
]:
{
[
Ass
et
sRecordType
.
COIN_IN
]:
{
label
:
"数字资产转入"
,
label
:
"数字资产转入"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
COIN_OUT
]:
{
[
Ass
et
sRecordType
.
COIN_OUT
]:
{
label
:
"数字资产转出"
,
label
:
"数字资产转出"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
RECHARGE
]:
{
[
Ass
et
sRecordType
.
RECHARGE
]:
{
label
:
"充值"
,
label
:
"充值"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
WITHDRAW_CASH
]:
{
[
Ass
et
sRecordType
.
WITHDRAW_CASH
]:
{
label
:
"提现"
,
label
:
"提现"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
PAY
]:
{
[
Ass
et
sRecordType
.
PAY
]:
{
label
:
"支付"
,
label
:
"支付"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
REFUND
]:
{
[
Ass
et
sRecordType
.
REFUND
]:
{
label
:
"退款"
,
label
:
"退款"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
SALE
]:
{
[
Ass
et
sRecordType
.
SALE
]:
{
label
:
"销售"
,
label
:
"销售"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
RELEASE
]:
{
[
Ass
et
sRecordType
.
RELEASE
]:
{
label
:
"发行"
,
label
:
"发行"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
ADD_RELEASE
]:
{
[
Ass
et
sRecordType
.
ADD_RELEASE
]:
{
label
:
"增发"
,
label
:
"增发"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
RECOVERY
]:
{
[
Ass
et
sRecordType
.
RECOVERY
]:
{
label
:
"回收"
,
label
:
"回收"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
REDUCE_RELEASE
]:
{
[
Ass
et
sRecordType
.
REDUCE_RELEASE
]:
{
label
:
"减发"
,
label
:
"减发"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
WITHDRAW_COIN
]:
{
[
Ass
et
sRecordType
.
WITHDRAW_COIN
]:
{
label
:
"提币"
,
label
:
"提币"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
DEDUCTION
]:
{
[
Ass
et
sRecordType
.
DEDUCTION
]:
{
label
:
"扣除"
,
label
:
"扣除"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
WITHDRAW_GOODS
]:
{
[
Ass
et
sRecordType
.
WITHDRAW_GOODS
]:
{
label
:
"提货"
,
label
:
"提货"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
COMMENT_REWARD
]:
{
[
Ass
et
sRecordType
.
COMMENT_REWARD
]:
{
label
:
"评论奖励"
,
label
:
"评论奖励"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
TRANSFER_GIFT_IN
]:
{
[
Ass
et
sRecordType
.
TRANSFER_GIFT_IN
]:
{
label
:
"转赠"
,
label
:
"转赠"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
TRANSFER_GIFT_OUT
]:
{
[
Ass
et
sRecordType
.
TRANSFER_GIFT_OUT
]:
{
label
:
"转赠"
,
label
:
"转赠"
,
symbol
:
"-"
symbol
:
"-"
},
},
[
Ass
te
sRecordType
.
INVITE_REGISTER_REWARD
]:
{
[
Ass
et
sRecordType
.
INVITE_REGISTER_REWARD
]:
{
label
:
"邀请注册奖励"
,
label
:
"邀请注册奖励"
,
symbol
:
"+"
symbol
:
"+"
},
},
[
Ass
te
sRecordType
.
REGISTER_REWARD
]:
{
[
Ass
et
sRecordType
.
REGISTER_REWARD
]:
{
label
:
"注册奖励"
,
label
:
"注册奖励"
,
symbol
:
"+"
symbol
:
"+"
},
},
...
@@ -122,4 +122,23 @@ export const AssetsRecordTypeObj = {
...
@@ -122,4 +122,23 @@ export const AssetsRecordTypeObj = {
export
const
TransferType
=
{
export
const
TransferType
=
{
SINGLE
:
1
,
SINGLE
:
1
,
PACKAGE
:
2
PACKAGE
:
2
}
export
const
AssetsRecordStatus
=
{
FAIL
:
1
,
SUCCESS
:
2
,
CONFIRM
:
3
}
export
const
AssetsRecordStatusObj
=
{
[
AssetsRecordStatus
.
FAIL
]:
{
label
:
"失败"
,
},
[
AssetsRecordStatus
.
SUCCESS
]:
{
label
:
"成功"
,
},
[
AssetsRecordStatus
.
CONFIRM
]:
{
label
:
"确认中"
,
},
}
}
\ No newline at end of file
src/router/index.js
View file @
c6874dc8
...
@@ -97,6 +97,7 @@ const ViewsCom = {
...
@@ -97,6 +97,7 @@ const ViewsCom = {
IntegralDetail
:
()
=>
import
(
"@/views/user-center/assets/integral/detail"
),
IntegralDetail
:
()
=>
import
(
"@/views/user-center/assets/integral/detail"
),
IntegralTransfer
:
()
=>
import
(
"@/views/user-center/assets/integral/transfer"
),
IntegralTransfer
:
()
=>
import
(
"@/views/user-center/assets/integral/transfer"
),
IntegralCollection
:
()
=>
import
(
"@/views/user-center/assets/integral/collection"
),
IntegralCollection
:
()
=>
import
(
"@/views/user-center/assets/integral/collection"
),
AssetsRecordDetail
:
()
=>
import
(
"@/views/user-center/assets/record-detail"
),
// 优惠券
// 优惠券
CouponList
:
()
=>
import
(
"@/views/user-center/coupon/index"
),
CouponList
:
()
=>
import
(
"@/views/user-center/coupon/index"
),
...
@@ -658,6 +659,15 @@ const routes = [
...
@@ -658,6 +659,15 @@ const routes = [
name
:
'integral-collection'
,
name
:
'integral-collection'
,
component
:
ViewsCom
.
IntegralCollection
,
component
:
ViewsCom
.
IntegralCollection
,
},
},
{
path
:
'/user-center/assets/record-detail'
,
name
:
'assets-record-detail'
,
component
:
ViewsCom
.
AssetsRecordDetail
,
meta
:
{
showNavBar
:
true
,
title
:
"交易记录详情"
},
},
// 优惠券
// 优惠券
{
{
path
:
'/user-center/coupon/list'
,
path
:
'/user-center/coupon/list'
,
...
...
src/views/user-center/assets/assets/detail/index.vue
View file @
c6874dc8
...
@@ -94,6 +94,7 @@
...
@@ -94,6 +94,7 @@
:
skuId
=
"skuId"
:
skuId
=
"skuId"
:
tab
=
"item"
:
tab
=
"item"
:
index
=
"tabIndex"
:
index
=
"tabIndex"
:
assets
=
"userAssets"
/>
/>
<
/van-swipe-item
>
<
/van-swipe-item
>
<
/van-swipe
>
<
/van-swipe
>
...
...
src/views/user-center/assets/assets/detail/scroll-details.vue
View file @
c6874dc8
...
@@ -6,13 +6,18 @@
...
@@ -6,13 +6,18 @@
:up=
"upOptions"
:up=
"upOptions"
>
>
<div
class=
"list-wrap"
>
<div
class=
"list-wrap"
>
<div
class=
"list-item"
v-for=
"item of ListData"
:key=
"item.id"
>
<div
class=
"list-item"
v-for=
"item of ListData"
:key=
"item.id"
@
click=
"goRecordDetail(item)"
>
<div
class=
"item-top flex-default"
>
<div
class=
"item-top flex-default"
>
<div
class=
"number"
:class=
"
{ reduce: item.type
=== 18
}">
<div
class=
"number"
:class=
"
{ reduce: item.type
Obj.symbol == '-'
}">
{{
AssetsRecordTypeObj
[
item
.
type
].
symbol
}}{{
item
.
amount
}}
{{
AssetsRecordTypeObj
[
item
.
type
].
symbol
}}{{
item
.
amount
}}
</div>
</div>
<div
class=
"status"
:class=
"
{ fail: item.status ==
= 1
}">
<div
class=
"status"
:class=
"
{ fail: item.status ==
AssetsRecordStatus.FAIL
}">
{{
item
.
status
===
1
?
"失败"
:
"成功"
}}
{{
AssetsRecordStatusObj
[
item
.
status
].
label
}}
</div>
</div>
</div>
</div>
<div
class=
"item-footer flex-default"
>
<div
class=
"item-footer flex-default"
>
...
@@ -32,19 +37,27 @@
...
@@ -32,19 +37,27 @@
<
script
>
<
script
>
import
{
MescrollMixin
,
MescrollMoreItemMixin
}
from
"@/mixins"
;
import
{
MescrollMixin
,
MescrollMoreItemMixin
}
from
"@/mixins"
;
import
{
formatTime
}
from
"@/utils/common"
;
import
{
formatTime
}
from
"@/utils/common"
;
import
{
AssetsRecordType
,
AssetsRecordTypeObj
}
from
"@/enums"
;
import
{
AssetsRecordType
,
AssetsRecordTypeObj
,
AssetsRecordStatus
,
AssetsRecordStatusObj
,
}
from
"@/enums"
;
export
default
{
export
default
{
mixins
:
[
MescrollMixin
,
MescrollMoreItemMixin
],
mixins
:
[
MescrollMixin
,
MescrollMoreItemMixin
],
props
:
{
props
:
{
coin
:
String
,
coin
:
String
,
tab
:
Object
,
tab
:
Object
,
index
:
Number
,
index
:
Number
,
skuId
:
String
skuId
:
String
,
assets
:
Object
,
},
},
data
()
{
data
()
{
return
{
return
{
AssetsRecordType
,
AssetsRecordType
,
AssetsRecordTypeObj
,
AssetsRecordTypeObj
,
AssetsRecordStatus
,
AssetsRecordStatusObj
,
downOptions
:
{
downOptions
:
{
autoShowLoading
:
false
,
autoShowLoading
:
false
,
auto
:
false
,
auto
:
false
,
...
@@ -80,9 +93,15 @@ export default {
...
@@ -80,9 +93,15 @@ export default {
payment
:
this
.
tab
.
payment
,
payment
:
this
.
tab
.
payment
,
page
:
page
.
num
,
page
:
page
.
num
,
size
:
page
.
size
,
size
:
page
.
size
,
skuId
:
this
.
skuId
skuId
:
this
.
skuId
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
data
)
{
res
.
data
.
forEach
((
item
)
=>
{
item
.
typeObj
=
{
...
AssetsRecordTypeObj
[
item
.
type
]
}
||
{};
});
}
if
(
page
.
num
==
1
)
{
if
(
page
.
num
==
1
)
{
this
.
ListData
=
res
.
data
;
this
.
ListData
=
res
.
data
;
}
else
{
}
else
{
...
@@ -104,6 +123,44 @@ export default {
...
@@ -104,6 +123,44 @@ export default {
upCallback
(
page
)
{
upCallback
(
page
)
{
this
.
requestData
(
page
);
this
.
requestData
(
page
);
},
},
goRecordDetail
(
item
)
{
let
data
=
{
title
:
this
.
assets
.
skuVo
.
name
,
num
:
(
item
.
typeObj
.
symbol
||
""
)
+
item
.
amount
,
status
:
AssetsRecordStatusObj
[
item
.
status
].
label
,
infoList
:
[
{
label
:
"交易类型"
,
val
:
item
.
typeObj
.
label
},
{
label
:
"TokenID"
,
val
:
this
.
assets
.
coin
},
{
label
:
"交易时间"
,
val
:
formatTime
(
item
.
createTime
)
},
],
};
if
(
item
.
status
==
AssetsRecordStatus
.
SUCCESS
&&
item
.
hash
)
{
data
.
infoList
.
push
({
label
:
"交易哈希"
,
val
:
item
.
hash
,
hash
:
true
});
}
if
(
!
item
.
note
)
{
item
.
note
=
"--"
;
}
switch
(
+
item
.
type
)
{
case
AssetsRecordType
.
TRANSFER_GIFT_IN
:
data
.
infoList
=
data
.
infoList
.
concat
([
{
label
:
"转赠人地址"
,
val
:
item
.
otherSide
},
{
label
:
"受赠人地址"
,
val
:
this
.
assets
.
address
},
{
label
:
"备注"
,
val
:
item
.
note
},
]);
break
;
case
AssetsRecordType
.
TRANSFER_GIFT_OUT
:
data
.
infoList
=
data
.
infoList
.
concat
([
{
label
:
"转赠人地址"
,
val
:
this
.
assets
.
address
},
{
label
:
"受赠人地址"
,
val
:
item
.
otherSide
},
{
label
:
"备注"
,
val
:
item
.
note
},
]);
break
;
default
:
break
;
}
this
.
$router
.
push
({
name
:
"assets-record-detail"
,
query
:
data
});
},
},
},
};
};
</
script
>
</
script
>
...
...
src/views/user-center/assets/record-detail/index.vue
0 → 100644
View file @
c6874dc8
<
template
>
<div
class=
"assets-record-detail-con bg-grey"
>
<div
class=
"detail-con"
>
<p
class=
"name"
>
{{
data
.
title
}}
</p>
<p
class=
"num"
>
{{
data
.
num
}}
</p>
<p
class=
"status"
>
{{
data
.
status
}}
</p>
<div
class=
"info-con"
>
<div
class=
"info-item"
v-for=
"(item, index) of data.infoList"
:key=
"`info-item-$
{index}`"
>
<div
class=
"label"
>
{{
item
.
label
}}
</div>
<div
class=
"val"
:class=
"
{ 'hash-link': item.hash
&&
!!item.val }"
@click="handleClick(item)"
>
{{
item
.
val
||
"--"
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
data
:
{
infoList
:
[],
},
};
},
methods
:
{
handleClick
(
item
)
{
// if (item.hash && item.val) {
// this.goChainExploreTxDetail(item.val);
// }
},
},
mounted
()
{
this
.
data
=
this
.
$route
.
query
;
},
};
</
script
>
<
style
lang=
"less"
>
.assets-record-detail-con {
padding: 0 16px;
> .detail-con {
margin-top: 50px;
padding: 30px 20px;
background: #ffffff;
border-radius: 6px;
> .name {
text-align: center;
font-weight: bold;
font-size: 14px;
margin-bottom: 15px;
}
> .num {
text-align: center;
font-size: 30px;
margin-bottom: 12px;
font-family: DINAlternate-Bold;
}
> .status {
text-align: center;
color: #999999;
font-size: 14px;
margin-bottom: 20px;
}
> .info-con {
padding-top: 20px;
border-top: 1px solid #f1f1f1;
.info-item {
display: flex;
align-items: flex-start;
margin-bottom: 12px;
}
.info-item .label {
width: 70px;
margin-right: 20px;
color: #666666;
font-size: 14px;
}
.info-item .val {
flex: 1;
word-break: break-all;
font-size: 14px;
// &.hash-link {
// color: #4a9bf7;
// }
}
}
}
}
</
style
>
\ No newline at end of file
vue.config.js
View file @
c6874dc8
...
@@ -64,8 +64,8 @@ module.exports = {
...
@@ -64,8 +64,8 @@ module.exports = {
// target: 'http://172.22.20.64:8100/root'
// target: 'http://172.22.20.64:8100/root'
// target: 'http://172.22.17.176:12008'
// target: 'http://172.22.17.176:12008'
// target: 'http://172.22.17.108:12008'
// target: 'http://172.22.17.108:12008'
target
:
'https://mall.inmvo.com/root'
//
target: 'https://mall.inmvo.com/root'
//
target: 'https://testym.8n.cn/root'
target
:
'https://testym.8n.cn/root'
},
},
'/chat'
:
{
'/chat'
:
{
pathRewrite
:
{
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