Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-web-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-web-master
Commits
cab311ea
Commit
cab311ea
authored
Sep 12, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
复制分享和推荐 功能 See merge request
!11
parents
4bdadadf
1c0ae7a3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
354 additions
and
299 deletions
+354
-299
en.js
src/lang/en.js
+69
-68
zh.js
src/lang/zh.js
+71
-70
IntegralActivity.vue
src/views/jiedao/profile/components/IntegralActivity.vue
+67
-12
IntegralExchange.vue
src/views/jiedao/profile/components/IntegralExchange.vue
+37
-35
exchangeOperate.vue
src/views/jiedao/profile/exchangeOperate.vue
+82
-85
integral.vue
src/views/jiedao/profile/integral.vue
+28
-29
No files found.
src/lang/en.js
View file @
cab311ea
...
...
@@ -570,80 +570,80 @@ export default {
view
:
"
view
"
,
},
orderdetail
:
{
orderNo
:
'
orderNo
'
,
deliveryDate
:
'
deliveryDate
'
,
transport
:
'
transportation
'
,
channel
:
'
Delivery channels
'
,
startTitle
:
'
Original warehouse
'
,
destTitle
:
'
Destination warehouse
'
,
startAddress
:
'
startAddress
'
,
consignorName
:
'
consignorName
'
,
consignorCompany
:
'
consignorCompany
'
,
consignorNameEn
:
'
English consignorName
'
,
consignorCompanyEn
:
'
English consignorCompany
'
,
consignorPhone
:
'
consignorPhone
'
,
consignorEmail
:
'
consignorEmail
'
,
consigneeName
:
'
consigneeName
'
,
consigneeCompany
:
'
consigneeCompany
'
,
consigneeNameEn
:
'
English consigneeName
'
,
consigneeCompanyEn
:
'
English consigneeCompany
'
,
consigneeEmail
:
'
consigneeEmail
'
,
consigneePhone
:
'
consigneePhone
'
,
marks
:
'
marks
'
,
isCargoControl
:
'
Is cargo on hold
'
,
baseInfo
:
'
baseInfo
'
,
transportInfo
:
'
transport
'
,
costVO
:
'
orderInfo
'
,
box
:
'
CTNS
'
,
is
:
'
yes
'
,
no
:
'
no
'
,
warehouseNum
:
'
warehouseNum
'
,
entry
:
'
receipt data
'
,
warehouseType
:
'
warehouseType
'
,
customsType
:
'
Customs declaration
'
,
isCollection
:
'
collection
'
,
activeFirst
:
'
Details of the goods
'
,
activeSecond
:
'
Order status
'
,
activeThree
:
'
Packing list
'
,
prodTitleZh
:
'
Chinese item name
'
,
prodTitleEn
:
'
English item name
'
,
brand
:
'
brand
'
,
num
:
'
num
'
,
sumNum
:
'
sumNum
'
,
unit
:
'
unit
'
,
worth
:
'
worth
'
,
material
:
'
material
'
,
volume
:
'
volume(m3)
'
,
weight
:
'
weight(kg)
'
,
noData
:
'
noData
'
,
notOrderData
:
'
notOrderData
'
,
showWarehouseReceipt
:
'
showWarehouseReceipt
'
,
showLadingBill
:
'
showLadingBill
'
,
hiddenText
:
'
Show
'
,
showText
:
'
Hide
'
,
transInfo
:
'
Transportation information
'
,
orderNo
:
"
orderNo
"
,
deliveryDate
:
"
deliveryDate
"
,
transport
:
"
transportation
"
,
channel
:
"
Delivery channels
"
,
startTitle
:
"
Original warehouse
"
,
destTitle
:
"
Destination warehouse
"
,
startAddress
:
"
startAddress
"
,
consignorName
:
"
consignorName
"
,
consignorCompany
:
"
consignorCompany
"
,
consignorNameEn
:
"
English consignorName
"
,
consignorCompanyEn
:
"
English consignorCompany
"
,
consignorPhone
:
"
consignorPhone
"
,
consignorEmail
:
"
consignorEmail
"
,
consigneeName
:
"
consigneeName
"
,
consigneeCompany
:
"
consigneeCompany
"
,
consigneeNameEn
:
"
English consigneeName
"
,
consigneeCompanyEn
:
"
English consigneeCompany
"
,
consigneeEmail
:
"
consigneeEmail
"
,
consigneePhone
:
"
consigneePhone
"
,
marks
:
"
marks
"
,
isCargoControl
:
"
Is cargo on hold
"
,
baseInfo
:
"
baseInfo
"
,
transportInfo
:
"
transport
"
,
costVO
:
"
orderInfo
"
,
box
:
"
CTNS
"
,
is
:
"
yes
"
,
no
:
"
no
"
,
warehouseNum
:
"
warehouseNum
"
,
entry
:
"
receipt data
"
,
warehouseType
:
"
warehouseType
"
,
customsType
:
"
Customs declaration
"
,
isCollection
:
"
collection
"
,
activeFirst
:
"
Details of the goods
"
,
activeSecond
:
"
Order status
"
,
activeThree
:
"
Packing list
"
,
prodTitleZh
:
"
Chinese item name
"
,
prodTitleEn
:
"
English item name
"
,
brand
:
"
brand
"
,
num
:
"
num
"
,
sumNum
:
"
sumNum
"
,
unit
:
"
unit
"
,
worth
:
"
worth
"
,
material
:
"
material
"
,
volume
:
"
volume(m3)
"
,
weight
:
"
weight(kg)
"
,
noData
:
"
noData
"
,
notOrderData
:
"
notOrderData
"
,
showWarehouseReceipt
:
"
showWarehouseReceipt
"
,
showLadingBill
:
"
showLadingBill
"
,
hiddenText
:
"
Show
"
,
showText
:
"
Hide
"
,
transInfo
:
"
Transportation information
"
,
own
:
"
selp pickup
"
,
toRoom
:
"
to door
"
,
typeName
:
"
value-added services
"
,
typeName
:
"
value-added services
"
,
service
:
"
Gether transpotation
"
,
oversears
:
"
overseas cargo
"
,
consignor
:
"
consignor
"
,
consignee
:
"
consignee
"
,
objectport
:
'
Destination port customs clearance
'
,
ourUndertakes
:
'
Our company undertakes
'
,
customerUndertakes
:
'
Customer Undertaking
'
,
tiedanPrice
:
"
Does the bill of lading display the price
"
,
warehouseName
:
"
Warehouse
"
,
externalWarehouse
:
'
External warehouse
'
,
estLoading
:
"
Loading time
"
,
loadingAddress
:
"
Loading address
"
,
creator
:
'
creator
'
,
customerManage
:
"
Customer Manager
"
,
prodTitle
:
"
item name
"
,
inWarehouseInfo
:
"
Warehouse entry information
"
,
packing
:
"
packing
"
,
tiandanExpressNO
:
"
prefill express tracking number
"
,
feeData
:
'
Fee data
'
objectport
:
"
Destination port customs clearance
"
,
ourUndertakes
:
"
Our company undertakes
"
,
customerUndertakes
:
"
Customer Undertaking
"
,
tiedanPrice
:
"
Does the bill of lading display the price
"
,
warehouseName
:
"
Warehouse
"
,
externalWarehouse
:
"
External warehouse
"
,
estLoading
:
"
Loading time
"
,
loadingAddress
:
"
Loading address
"
,
creator
:
"
creator
"
,
customerManage
:
"
Customer Manager
"
,
prodTitle
:
"
item name
"
,
inWarehouseInfo
:
"
Warehouse entry information
"
,
packing
:
"
packing
"
,
tiandanExpressNO
:
"
prefill express tracking number
"
,
feeData
:
"
Fee data
"
,
},
customer
:
{
none
:
"
none
"
,
...
...
@@ -882,6 +882,7 @@ export default {
createTime
:
"
createTime
"
,
},
integral
:
{
copyBtn
:
"
Copy
"
,
headerTitle
:
"
Distinguished
"
,
spend
:
"
Redeemed points are
"
,
available
:
"
Available credits are
"
,
...
...
src/lang/zh.js
View file @
cab311ea
...
...
@@ -554,80 +554,80 @@ export default {
view
:
"
查看
"
,
},
orderdetail
:
{
orderNo
:
'
订单编号
'
,
deliveryDate
:
'
送货时间
'
,
transport
:
'
运输方式
'
,
channel
:
'
出货渠道
'
,
startTitle
:
'
始发仓
'
,
destTitle
:
'
目的仓
'
,
startAddress
:
'
地址
'
,
consignorName
:
'
发货人
'
,
consignorCompany
:
'
发货人公司名称
'
,
consignorNameEn
:
'
发货人英文名称
'
,
consignorCompanyEn
:
'
发货人公司英文名称
'
,
consignorPhone
:
'
发货人电话
'
,
consignorEmail
:
'
发货人邮箱
'
,
consigneeName
:
'
收货人
'
,
consigneeCompany
:
'
公司名称
'
,
consigneeNameEn
:
'
英文名称
'
,
consigneeCompanyEn
:
'
公司英文名称
'
,
consigneeEmail
:
'
邮箱
'
,
consigneePhone
:
'
电话
'
,
marks
:
'
唛头
'
,
isCargoControl
:
'
是否控货
'
,
baseInfo
:
'
基础
'
,
transportInfo
:
'
运输
'
,
costVO
:
'
填单信息
'
,
box
:
'
箱
'
,
is
:
'
是
'
,
no
:
'
否
'
,
warehouseNum
:
'
仓库实测
'
,
entry
:
'
收款数据
'
,
warehouseType
:
'
入仓类型
'
,
customsType
:
'
单证报关
'
,
isCollection
:
'
代收货款
'
,
activeFirst
:
'
货物详情
'
,
activeSecond
:
'
订单动态
'
,
activeThree
:
'
运单资料/提货单
'
,
prodTitleZh
:
'
中文品名
'
,
prodTitleEn
:
'
英文品名
'
,
brand
:
'
品牌
'
,
num
:
'
填单件数
'
,
sumNum
:
'
入仓件数
'
,
unit
:
'
单位
'
,
worth
:
'
货值
'
,
material
:
'
材质
'
,
volume
:
'
体积(m3)
'
,
weight
:
'
重量(kg)
'
,
noData
:
'
暂无数据
'
,
notOrderData
:
'
暂无订单动态数据
'
,
showWarehouseReceipt
:
'
查看入仓单
'
,
showLadingBill
:
'
查看提货单
'
,
hiddenText
:
'
隐藏
'
,
showText
:
'
展示
'
,
transInfo
:
'
运输信息
'
,
orderNo
:
"
订单编号
"
,
deliveryDate
:
"
送货时间
"
,
transport
:
"
运输方式
"
,
channel
:
"
出货渠道
"
,
startTitle
:
"
始发仓
"
,
destTitle
:
"
目的仓
"
,
startAddress
:
"
地址
"
,
consignorName
:
"
发货人
"
,
consignorCompany
:
"
发货人公司名称
"
,
consignorNameEn
:
"
发货人英文名称
"
,
consignorCompanyEn
:
"
发货人公司英文名称
"
,
consignorPhone
:
"
发货人电话
"
,
consignorEmail
:
"
发货人邮箱
"
,
consigneeName
:
"
收货人
"
,
consigneeCompany
:
"
公司名称
"
,
consigneeNameEn
:
"
英文名称
"
,
consigneeCompanyEn
:
"
公司英文名称
"
,
consigneeEmail
:
"
邮箱
"
,
consigneePhone
:
"
电话
"
,
marks
:
"
唛头
"
,
isCargoControl
:
"
是否控货
"
,
baseInfo
:
"
基础
"
,
transportInfo
:
"
运输
"
,
costVO
:
"
填单信息
"
,
box
:
"
箱
"
,
is
:
"
是
"
,
no
:
"
否
"
,
warehouseNum
:
"
仓库实测
"
,
entry
:
"
收款数据
"
,
warehouseType
:
"
入仓类型
"
,
customsType
:
"
单证报关
"
,
isCollection
:
"
代收货款
"
,
activeFirst
:
"
货物详情
"
,
activeSecond
:
"
订单动态
"
,
activeThree
:
"
运单资料/提货单
"
,
prodTitleZh
:
"
中文品名
"
,
prodTitleEn
:
"
英文品名
"
,
brand
:
"
品牌
"
,
num
:
"
填单件数
"
,
sumNum
:
"
入仓件数
"
,
unit
:
"
单位
"
,
worth
:
"
货值
"
,
material
:
"
材质
"
,
volume
:
"
体积(m3)
"
,
weight
:
"
重量(kg)
"
,
noData
:
"
暂无数据
"
,
notOrderData
:
"
暂无订单动态数据
"
,
showWarehouseReceipt
:
"
查看入仓单
"
,
showLadingBill
:
"
查看提货单
"
,
hiddenText
:
"
隐藏
"
,
showText
:
"
展示
"
,
transInfo
:
"
运输信息
"
,
own
:
"
自提
"
,
toRoom
:
"
送货上门
"
,
typeName
:
"
增值服务
"
,
typeName
:
"
增值服务
"
,
service
:
"
集运
"
,
oversears
:
"
海外仓
"
,
consignor
:
"
发货人
"
,
consignee
:
"
收货人
"
,
objectport
:
'
目的港清关
'
,
ourUndertakes
:
'
我司承接
'
,
customerUndertakes
:
'
客户承接
'
,
tiedanPrice
:
"
提单是否显示价格
"
,
warehouseName
:
"
仓库
"
,
externalWarehouse
:
'
外部仓
'
,
estLoading
:
"
装柜时间
"
,
loadingAddress
:
"
装柜地址
"
,
creator
:
'
创建人
'
,
customerManage
:
"
客户经理
"
,
prodTitle
:
"
品名
"
,
inWarehouseInfo
:
"
入仓信息
"
,
packing
:
"
包装
"
,
tiandanExpressNO
:
"
填单快递单号
"
,
feeData
:
'
收费数据
'
objectport
:
"
目的港清关
"
,
ourUndertakes
:
"
我司承接
"
,
customerUndertakes
:
"
客户承接
"
,
tiedanPrice
:
"
提单是否显示价格
"
,
warehouseName
:
"
仓库
"
,
externalWarehouse
:
"
外部仓
"
,
estLoading
:
"
装柜时间
"
,
loadingAddress
:
"
装柜地址
"
,
creator
:
"
创建人
"
,
customerManage
:
"
客户经理
"
,
prodTitle
:
"
品名
"
,
inWarehouseInfo
:
"
入仓信息
"
,
packing
:
"
包装
"
,
tiandanExpressNO
:
"
填单快递单号
"
,
feeData
:
"
收费数据
"
,
},
customer
:
{
none
:
"
无
"
,
...
...
@@ -1146,6 +1146,7 @@ export default {
prompt
:
"
提示
"
,
},
integral
:
{
copyBtn
:
"
复制
"
,
headerTitle
:
"
尊贵的
"
,
spend
:
"
已兑换积分为
"
,
available
:
"
可用积分为
"
,
...
...
@@ -1153,8 +1154,8 @@ export default {
logExchange
:
"
兑换日志
"
,
redeemGifts
:
"
兑换礼品
"
,
pointsCampaign
:
"
积分活动
"
,
pointsTitle
:
"
选择
兑换网
点
"
,
pointsRemark
:
"
不同
网
点兑换积分不同
"
,
pointsTitle
:
"
选择
提货
点
"
,
pointsRemark
:
"
不同
提货
点兑换积分不同
"
,
outlets
:
"
请选择网点
"
,
remainder
:
`剩余{value}份`
,
orderMail
:
"
确定订单
"
,
...
...
src/views/jiedao/profile/components/IntegralActivity.vue
View file @
cab311ea
...
...
@@ -4,20 +4,30 @@
v-for=
"item in list"
:key=
"item.id"
class=
"int-content"
@
click=
"toDetail(item.id)"
>
<div
class=
"int-content-left"
>
<div
class=
"content-tag"
>
<div
class=
"tag-text"
>
{{
locale
===
'
zh_CN
'
?
item
.
typeZh
:
item
.
typeEn
}}
</div>
<div
class=
"box"
@
click=
"toDetail(item.id)"
>
<div
class=
"int-content-left"
>
<div
class=
"content-tag"
>
<div
class=
"tag-text"
>
{{
locale
===
"
zh_CN
"
?
item
.
typeZh
:
item
.
typeEn
}}
</div>
</div>
<img
class=
"content-image"
:src=
"locale === 'zh_CN' ? item.coverImageZh : item.coverImageEn"
>
</div>
<div
class=
"int-content-right"
>
<div
class=
"content-title"
>
{{
locale
===
"
zh_CN
"
?
item
.
titleZh
:
item
.
titleEn
}}
</div>
<div
class=
"content-text"
>
{{
locale
===
"
zh_CN
"
?
item
.
descZh
:
item
.
descEn
}}
</div>
</div>
<img
class=
"content-image"
:src=
"locale === 'zh_CN' ? item.coverImageZh : item.coverImageEn"
>
</div>
<div
class=
"int-content-right"
>
<div
class=
"content-title"
>
{{
locale
===
'
zh_CN
'
?
item
.
titleZh
:
item
.
titleEn
}}
</div>
<div
class=
"content-text"
>
{{
locale
===
'
zh_CN
'
?
item
.
descZh
:
item
.
descEn
}}
</div>
<div
v-if=
"item.type == 3||item.type == 4"
:class=
"'copyBtn copyBtn'+item.id"
:data-clipboard-text=
"getCopyText(item)"
@
click=
"handleCopyBtn(item, $event)"
>
{{
$t
(
"
integral.copyBtn
"
)
}}
</div>
</div>
</div>
...
...
@@ -25,6 +35,7 @@
<
script
>
import
{
integralActivityList
}
from
'
@/api/integral
'
import
ClipboardJS
from
'
clipboard
'
export
default
{
name
:
'
IntegralActivity
'
,
data
()
{
...
...
@@ -41,10 +52,35 @@ export default {
this
.
getIntegralList
()
},
methods
:
{
getCopyText
(
item
)
{
if
(
item
.
type
==
3
)
{
return
`
${
this
.
locale
===
'
zh_CN
'
?
item
.
extraRecommend
.
shareContentZh
:
item
.
extraRecommend
.
shareContentEn
}
${
item
.
recommendUrl
}
`
}
else
if
(
item
.
type
==
4
)
{
return
`
${
this
.
locale
===
'
zh_CN
'
?
item
.
titleZh
:
item
.
titleEn
}
${
item
.
extraShare
.
activityUrl
}
`
}
},
// 复制按钮
handleCopyBtn
(
item
,
e
)
{
const
clipboard
=
new
ClipboardJS
(
`.copyBtn
${
item
.
id
}
`
)
this
.
$nextTick
(()
=>
{
clipboard
.
on
(
'
success
'
,
()
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
复制成功
'
))
clipboard
.
destroy
()
})
clipboard
.
on
(
'
error
'
,
()
=>
{
this
.
$message
.
error
(
this
.
$t
(
'
复制失败
'
))
clipboard
.
destroy
()
})
})
},
// 获取活动列表
async
getIntegralList
()
{
try
{
const
{
code
,
data
}
=
await
integralActivityList
({
platform
:
3
})
const
{
code
,
data
}
=
await
integralActivityList
({
platform
:
3
,
memberId
:
this
.
$store
.
getters
.
id
})
if
(
code
!==
0
)
return
this
.
list
=
data
}
catch
(
err
)
{
...
...
@@ -65,6 +101,10 @@ export default {
height
:
inherit
;
overflow-y
:
auto
;
}
.box
{
display
:
flex
;
width
:
100%
;
}
.int-content
{
margin-bottom
:
10px
;
width
:
100%
;
...
...
@@ -73,6 +113,17 @@ export default {
padding
:
0
15px
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
#e7e7e7
;
position
:
relative
;
.copyBtn
{
position
:
absolute
;
right
:
0
;
bottom
:
10px
;
border
:
1px
solid
#2c78eb
;
color
:
#2c78eb
;
font-size
:
14px
;
padding
:
4px
20px
;
border-radius
:
100px
;
}
&
:last-child
{
margin-bottom
:
0
;
}
...
...
@@ -86,15 +137,19 @@ export default {
height
:
100px
;
}
}
.int-content-right
{
flex
:
1
;
height
:
inherit
;
padding-left
:
10px
;
box-sizing
:
border-box
;
position
:
relative
;
.content-title
{
font-size
:
14px
;
color
:
#333
;
margin-bottom
:
10px
;
}
.content-text
{
font-size
:
12px
;
...
...
src/views/jiedao/profile/components/IntegralExchange.vue
View file @
cab311ea
...
...
@@ -15,8 +15,8 @@
}"
class="cascader"
:options="nodeList"
@visible-change="changeSelect"
:placeholder="$t('integral.outlets')"
@visible-change="changeSelect"
/>
</div>
<div
class=
"list"
>
...
...
@@ -31,10 +31,10 @@
class=
"imgs"
:src=
"language == 'zh_CN' ? item.imgZh : item.imgEn"
alt=
""
/
>
>
<div
class=
"gift-tag"
>
<div
class=
"tags"
>
<img
class=
"tag-image"
src=
"@/assets/integral/score.png"
/
>
<img
class=
"tag-image"
src=
"@/assets/integral/score.png"
>
<div
class=
"tag-text"
>
{{
item
.
pointsRequire
}}
</div>
</div>
</div>
...
...
@@ -62,9 +62,10 @@
<
/template
>
<
script
>
import
{
integralList
,
getBranchList
}
from
"
@/api/integral
"
;
import
{
integralList
,
getBranchList
}
from
'
@/api/integral
'
export
default
{
name
:
"
IntegralExchange
"
,
name
:
'
IntegralExchange
'
,
data
()
{
return
{
list
:
[],
...
...
@@ -72,72 +73,73 @@ export default {
nodeList
:
[],
selectedNodeId
:
null
,
checkStrictly
:
true
,
cascaderState
:
true
,
}
;
cascaderState
:
true
}
}
,
computed
:
{
language
()
{
this
.
cascaderState
=
false
;
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this
.
cascaderState
=
false
this
.
$nextTick
(()
=>
{
this
.
cascaderState
=
true
;
}
)
;
return
this
.
$store
.
getters
.
language
;
}
,
this
.
cascaderState
=
true
}
)
return
this
.
$store
.
getters
.
language
}
}
,
watch
:
{
selectedNodeId
(
val
)
{
if
(
val
&&
val
.
length
>
2
)
{
this
.
nodeId
=
val
[
val
.
length
-
1
]
;
this
.
getIntegralList
()
;
this
.
nodeId
=
val
[
val
.
length
-
1
]
this
.
getIntegralList
()
}
}
,
}
}
,
created
()
{
this
.
getIntegralList
()
;
this
.
getNodeInfo
()
;
this
.
getIntegralList
()
this
.
getNodeInfo
()
}
,
methods
:
{
changeSelect
()
{
this
.
checkStrictly
=
false
;
this
.
checkStrictly
=
false
}
,
// 获取礼品列表
async
getIntegralList
()
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
;
const
memberId
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
integralList
({
memberId
,
nodeId
:
this
.
nodeId
,
}
)
;
if
(
code
!==
0
)
return
;
this
.
list
=
data
.
list
;
nodeId
:
this
.
nodeId
}
)
if
(
code
!==
0
)
return
this
.
list
=
data
.
list
if
(
!
this
.
nodeId
)
{
if
(
data
.
city
)
{
this
.
selectedNodeId
=
[
data
.
country
,
data
.
city
]
;
this
.
selectedNodeId
=
[
data
.
country
,
data
.
city
]
}
else
{
this
.
selectedNodeId
=
[
data
.
country
]
;
this
.
selectedNodeId
=
[
data
.
country
]
}
}
}
catch
(
err
)
{
console
.
log
(
err
)
;
console
.
log
(
err
)
}
}
,
// 获取网点信息
async
getNodeInfo
()
{
try
{
const
{
code
,
data
}
=
await
getBranchList
()
;
if
(
code
!==
0
)
return
;
this
.
nodeList
=
data
;
console
.
log
(
data
)
;
const
{
code
,
data
}
=
await
getBranchList
()
if
(
code
!==
0
)
return
this
.
nodeList
=
data
console
.
log
(
data
)
}
catch
(
err
)
{
console
.
log
(
err
)
;
console
.
log
(
err
)
}
}
,
// 跳转详情
toDetail
(
id
)
{
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-operate`
,
query
:
{
id
}
}
);
}
,
}
,
}
;
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-operate`
,
query
:
{
id
}
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
...
...
src/views/jiedao/profile/exchangeOperate.vue
View file @
cab311ea
<
template
>
<div
class=
"app-container"
>
<el-tabs
class=
"headerTab"
:stretch=
"true"
v-model=
"paramsInfo.redeemTyp
e"
>
<el-tabs
v-model=
"paramsInfo.redeemType"
class=
"headerTab"
:stretch=
"tru
e"
>
<el-tab-pane
v-for=
"item in rewardDetailsInfo.pickMethodList"
:name=
"item.value"
:key=
"item.value"
:name=
"item.value"
>
<span
slot=
"label"
>
{{
isChinese
?
item
.
labelZh
:
item
.
labelEn
}}
</span>
<div
class=
"card"
>
...
...
@@ -15,16 +15,16 @@
src=
"@/assets/integral/house.png"
alt=
""
srcset=
""
/
>
>
<i
v-else
class=
"el-icon-location-information adress-icon iconColor"
></i
>
/
>
</div>
<div
class=
"addressInfo"
v-if=
"addressInfo.phone && paramsInfo.redeemType != 1"
class=
"addressInfo"
>
<div
class=
"adress_detail"
>
{{
addressInfo
.
address
}}
</div>
<div
class=
"adress_personal"
>
...
...
@@ -33,16 +33,16 @@
</div>
</div>
<i
class=
"el-icon-arrow-right adress-icon"
v-if=
"paramsInfo.redeemType != 1"
></i>
<div
class=
"node-detail"
v-if=
"paramsInfo.redeemType == 1"
>
class=
"el-icon-arrow-right adress-icon"
/>
<div
v-if=
"paramsInfo.redeemType == 1"
class=
"node-detail"
>
{{
isChinese
?
rewardDetailsInfo
.
nodeZh
:
rewardDetailsInfo
.
nodeEn
}}
</div>
</div>
<el-divider
></el-divider
>
<el-divider
/
>
<div
class=
"giftBox"
>
<div
class=
"item-image"
>
<img
...
...
@@ -51,10 +51,10 @@
isChinese ? rewardDetailsInfo.imgZh : rewardDetailsInfo.imgEn
"
alt=
""
/
>
>
<div
class=
"gift-tag"
>
<div
class=
"tags"
>
<img
class=
"tag-image"
src=
"@/assets/integral/score.png"
/
>
<img
class=
"tag-image"
src=
"@/assets/integral/score.png"
>
<div
class=
"tag-text"
>
{{
rewardDetailsInfo
.
pointsRequire
}}
</div>
...
...
@@ -84,47 +84,45 @@
<
/div
>
<
div
class
=
"
activityTime
"
>
<
span
class
=
"
pad-20
"
>
{{
$t
(
"
exchange.activityTime
"
)
}}
<
/span
>
<
span
class
=
"
textLabel
"
>
{{
parseTime
(
rewardDetailsInfo
.
startTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
span
class
=
"
textLabel
"
>
{{
parseTime
(
rewardDetailsInfo
.
startTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
{{
$t
(
"
exchange.to
"
)
}}
{{
parseTime
(
rewardDetailsInfo
.
endTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
/spa
n
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
exchangeNumber
"
>
<
el
-
input
-
number
v
-
model
=
"
paramsInfo.rewardCount
"
@
change
=
"
handleChange
"
size
=
"
mini
"
:
min
=
"
1
"
><
/el-input-number
>
@
change
=
"
handleChange
"
/>
<
/div
>
<
el
-
divider
><
/el-divider
>
<
el
-
divider
/
>
<
div
class
=
"
verificationCode
"
>
<
el
-
input
v
-
model
=
"
paramsInfo.code
"
:
placeholder
=
"
$t('exchange.inputVerificationCode')
"
><
/el-input
>
/
>
<
el
-
button
type
=
"
text
"
:
disabled
=
"
count < 60
"
@
click
.
native
.
prevent
=
"
getValidaCode
"
>
{{
getCode
}}
<
/el-butto
n
>
>
{{
getCode
}}
<
/el-button
>
<
/div
>
<
/div
>
<
div
class
=
"
textDesc
"
>
<
el
-
input
v
-
model
=
"
paramsInfo.remark
"
type
=
"
textarea
"
:
rows
=
"
2
"
maxlength
=
"
100
"
:
placeholder
=
"
$t('exchange.inputPlaceholder')
"
v
-
model
=
"
paramsInfo.remark
"
>
<
/el-input
>
/>
<
div
class
=
"
maxLabel
"
>
{{
$t
(
"
exchange.maxInput
"
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
confirmBox
"
>
...
...
@@ -141,133 +139,132 @@
type
=
"
primary
"
round
@
click
=
"
handleSubmitRedeem
"
>
{{
$t
(
"
exchange.submitOrder
"
)
}}
<
/el-butto
n
>
>
{{
$t
(
"
exchange.submitOrder
"
)
}}
<
/el-button
>
<
/div
>
<
/el-tab-pane
>
<
/el-tabs
>
<
/div
>
<
/template
>
<
script
>
import
{
getDictData
,
getDictDatas
}
from
"
@/utils/dict
"
;
import
{
addresslist
,
addressinfo
}
from
"
@/api/address
"
;
import
{
getDictData
,
getDictDatas
}
from
'
@/utils/dict
'
import
{
addresslist
,
addressinfo
}
from
'
@/api/address
'
import
{
rewardDetails
,
exchangeSMSCode
,
redeemSingleReward
,
}
from
"
@/api/integral
"
;
import
{
parseTime
}
from
"
@/utils/ruoyi
"
;
redeemSingleReward
}
from
'
@/api/integral
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
export
default
{
name
:
"
ExchangeOperate
"
,
name
:
'
ExchangeOperate
'
,
data
()
{
return
{
addressInfo
:
{
}
,
getCode
:
this
.
$t
(
"
login.getCode
"
),
getCode
:
this
.
$t
(
'
login.getCode
'
),
rewardDetailsInfo
:
{
}
,
count
:
60
,
totalIntegral
:
0
,
pickMethodList
:
""
,
pickMethodList
:
''
,
paramsInfo
:
{
memberId
:
this
.
$store
.
getters
.
id
,
rewardId
:
this
.
$route
.
query
.
id
,
redeemType
:
"
1
"
,
redeemType
:
'
1
'
,
rewardCount
:
1
,
entrance
:
"
3
"
,
remark
:
""
,
code
:
""
,
}
,
}
;
entrance
:
'
3
'
,
remark
:
''
,
code
:
''
}
}
}
,
computed
:
{
isChinese
()
{
this
.
getCode
=
this
.
$t
(
"
login.getCode
"
);
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
this
.
getCode
=
this
.
$t
(
'
login.getCode
'
)
return
this
.
$i18n
.
locale
===
'
zh_CN
'
}
}
,
created
()
{
this
.
getAddressList
()
;
this
.
getRewardsDetailsAPI
()
;
this
.
getAddressList
()
this
.
getRewardsDetailsAPI
()
}
,
beforeRouteEnter
(
to
,
from
,
next
)
{
next
((
vm
)
=>
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
from
.
params
,
"
addressId
"
))
{
vm
.
handleSelectAddress
(
from
.
params
.
addressId
)
;
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
from
.
params
,
'
addressId
'
))
{
vm
.
handleSelectAddress
(
from
.
params
.
addressId
)
}
}
)
;
}
)
}
,
methods
:
{
parseTime
,
//兑换
//
兑换
handleSubmitRedeem
()
{
let
params
=
{
...
this
.
paramsInfo
}
;
if
(
params
.
redeemType
!=
"
1
"
)
{
params
.
recipientAddress
=
this
.
addressInfo
.
address
;
params
.
recipientName
=
this
.
addressInfo
.
name
;
params
.
recipientPhoneNum
=
this
.
addressInfo
.
phone
;
const
params
=
{
...
this
.
paramsInfo
}
if
(
params
.
redeemType
!=
'
1
'
)
{
params
.
recipientAddress
=
this
.
addressInfo
.
address
params
.
recipientName
=
this
.
addressInfo
.
name
params
.
recipientPhoneNum
=
this
.
addressInfo
.
phone
}
redeemSingleReward
(
params
).
then
((
res
)
=>
{
this
.
$message
({
message
:
this
.
$t
(
"
exchange.success
"
),
type
:
"
success
"
,
}
)
;
this
.
$router
.
push
({
path
:
"
/jiedao/jd-exchange-log
"
}
);
}
)
;
message
:
this
.
$t
(
'
exchange.success
'
),
type
:
'
success
'
}
)
this
.
$router
.
push
({
path
:
'
/jiedao/jd-exchange-log
'
}
)
}
)
}
,
getValidaCode
()
{
exchangeSMSCode
({
memberId
:
this
.
$store
.
getters
.
id
}
).
then
(()
=>
{
var
countDown
=
window
.
setInterval
(()
=>
{
if
(
this
.
count
<
1
)
{
this
.
count
=
60
;
this
.
getCode
=
this
.
$t
(
"
login.getCode
"
);
window
.
clearInterval
(
countDown
)
;
this
.
count
=
60
this
.
getCode
=
this
.
$t
(
'
login.getCode
'
)
window
.
clearInterval
(
countDown
)
}
else
{
this
.
count
--
;
this
.
getCode
=
this
.
count
+
"
s
"
;
this
.
count
--
this
.
getCode
=
this
.
count
+
'
s
'
}
}
,
1000
)
;
}
)
;
}
,
1000
)
}
)
}
,
handleChange
()
{
this
.
totalIntegral
=
this
.
rewardDetailsInfo
.
pointsRequire
*
this
.
paramsInfo
.
rewardCount
;
this
.
rewardDetailsInfo
.
pointsRequire
*
this
.
paramsInfo
.
rewardCount
}
,
getAddressList
()
{
const
id
=
this
.
$store
.
getters
.
id
;
const
id
=
this
.
$store
.
getters
.
id
addresslist
({
id
}
).
then
((
r
)
=>
{
r
.
data
.
forEach
((
element
)
=>
{
element
.
isDefault
===
0
?
(
this
.
addressInfo
=
element
)
:
""
;
}
)
;
element
.
isDefault
===
0
?
(
this
.
addressInfo
=
element
)
:
''
}
)
if
(
this
.
addressInfo
.
isDefault
!=
0
&&
r
.
data
.
length
>
0
)
{
this
.
addressInfo
=
r
.
data
[
0
]
;
this
.
addressInfo
=
r
.
data
[
0
]
}
}
)
;
}
)
}
,
getRewardsDetailsAPI
()
{
rewardDetails
({
id
:
this
.
$route
.
query
.
id
}
).
then
((
res
)
=>
{
this
.
rewardDetailsInfo
=
res
.
data
;
this
.
rewardDetailsInfo
=
res
.
data
this
.
paramsInfo
.
redeemType
=
this
.
rewardDetailsInfo
.
pickMethodList
[
0
].
value
;
this
.
handleChange
()
;
}
)
;
this
.
rewardDetailsInfo
.
pickMethodList
[
0
].
value
this
.
handleChange
()
}
)
}
,
getPickList
(
label
)
{
return
this
.
rewardDetailsInfo
.
pickMethodList
.
map
((
item
)
=>
item
[
`label${label
}
`
])
.
join
(
"
/
"
);
.
join
(
'
/
'
)
}
,
handleSelectAddress
(
id
)
{
addressinfo
({
id
}
).
then
((
res
)
=>
{
this
.
addressInfo
=
res
.
data
;
}
)
;
this
.
addressInfo
=
res
.
data
}
)
}
,
goAddressManagerPage
()
{
if
(
this
.
paramsInfo
.
redeemType
==
"
1
"
)
{
return
;
if
(
this
.
paramsInfo
.
redeemType
==
'
1
'
)
{
return
}
this
.
$router
.
push
(
"
/jiedao/jd-address-manager
"
);
}
,
}
,
}
;
this
.
$router
.
push
(
'
/jiedao/jd-address-manager
'
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
::
v
-
deep
.
headerTab
.
el
-
tabs__nav
-
scroll
{
...
...
src/views/jiedao/profile/integral.vue
View file @
cab311ea
<
template
>
<div
class=
"integral"
>
<div
class=
"header"
>
<div
/>
<div
class=
"header-content"
>
<div
class=
"content-box"
>
<div
class=
"avatar"
>
<img
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
/
>
<img
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
>
</div>
<div
class=
"content-text"
>
<div
class=
"text-vip"
>
...
...
@@ -18,13 +17,13 @@
</div>
</div>
<div
class=
"content-image"
>
<img
v-if=
"levelIcon"
class=
"imgs"
:src=
"levelIcon"
alt=
""
/
>
<img
v-if=
"levelIcon"
class=
"imgs"
:src=
"levelIcon"
alt=
""
>
<img
v-else
class=
"imgs"
src=
"@/assets/integral/vip_avatar.png"
alt=
""
/
>
>
</div>
</div>
<div
class=
"content-divider"
>
...
...
@@ -65,14 +64,14 @@
</div>
</
template
>
<
script
>
import
IntegralExchange
from
"
./components/IntegralExchange.vue
"
;
import
IntegralActivity
from
"
./components/IntegralActivity.vue
"
;
import
{
getMemberInfo
}
from
"
@/api/integral
"
;
import
IntegralExchange
from
'
./components/IntegralExchange.vue
'
import
IntegralActivity
from
'
./components/IntegralActivity.vue
'
import
{
getMemberInfo
}
from
'
@/api/integral
'
export
default
{
name
:
"
JdIntegral
"
,
name
:
'
JdIntegral
'
,
components
:
{
IntegralExchange
,
IntegralActivity
,
IntegralActivity
},
data
()
{
return
{
...
...
@@ -80,8 +79,8 @@ export default {
// 会员积分信息
integralInfo
:
{},
// 会员图标
levelIcon
:
""
,
}
;
levelIcon
:
''
}
},
computed
:
{
score
()
{
...
...
@@ -91,40 +90,40 @@ export default {
(
this
.
integralInfo
.
totalScore
/
this
.
integralInfo
.
upperCount
)
*
100
),
100
)
;
)
}
return
0
;
}
,
return
0
}
},
created
()
{
this
.
getIntegralInfo
()
;
const
{
loginUser
}
=
this
.
$store
.
state
.
user
;
this
.
getIntegralInfo
()
const
{
loginUser
}
=
this
.
$store
.
state
.
user
if
(
loginUser
)
{
const
userScoreLevelInfo
=
loginUser
.
userScoreLevelInfo
;
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
;
console
.
log
(
this
.
levelIcon
)
;
const
userScoreLevelInfo
=
loginUser
.
userScoreLevelInfo
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
console
.
log
(
this
.
levelIcon
)
}
},
methods
:
{
// 跳转 日志
toJump
(
val
)
{
const
path
=
val
===
1
?
"
/jiedao/jd-integral-log
"
:
"
/jiedao/jd-exchange-log
"
;
this
.
$router
.
push
({
path
})
;
val
===
1
?
'
/jiedao/jd-integral-log
'
:
'
/jiedao/jd-exchange-log
'
this
.
$router
.
push
({
path
})
},
// 获取个人积分信息
async
getIntegralInfo
()
{
try
{
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
getMemberInfo
({
id
})
;
if
(
code
!==
0
)
return
;
this
.
integralInfo
=
data
;
const
id
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
getMemberInfo
({
id
})
if
(
code
!==
0
)
return
this
.
integralInfo
=
data
}
catch
(
err
)
{
console
.
log
(
err
)
;
console
.
log
(
err
)
}
}
,
}
,
}
;
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.integral
{
...
...
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