Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-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-app-customer-new-master
Commits
9aa24dd2
Commit
9aa24dd2
authored
Aug 27, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inital commit
parent
72c3329a
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1986 additions
and
1766 deletions
+1986
-1766
activity_detail.vue
src/pages/activity_detail/activity_detail.vue
+33
-11
address_add.vue
src/pages/address_add/address_add.vue
+72
-43
address_edit.vue
src/pages/address_edit/address_edit.vue
+56
-31
exchange_detail.vue
src/pages/exchange_detail/exchange_detail.vue
+54
-35
gift.vue
src/pages/integral/components/gift.vue
+17
-0
integral.vue
src/pages/integral/integral.vue
+49
-33
exchange.vue
src/pages/log/exchange.vue
+41
-29
integral.vue
src/pages/log/integral.vue
+50
-40
order_mail.vue
src/pages/order_mail/order_mail.vue
+156
-110
house.png
src/static/img/house.png
+0
-0
en.js
src/static/lang/en.js
+713
-702
zh.js
src/static/lang/zh.js
+745
-732
No files found.
src/pages/activity_detail/activity_detail.vue
View file @
9aa24dd2
...
...
@@ -12,21 +12,44 @@
<view
class=
"activity-title"
>
{{
locale
===
'
zh
'
?
detailInfo
.
titleZh
:
detailInfo
.
titleEn
}}
</view>
<view
class=
"activity-remark"
v-if=
"detailInfo.
extraRecommend"
>
{{
locale
===
'
zh
'
?
detailInfo
.
extraRecommend
.
shareContentZh
:
detailInfo
.
extraRecommend
.
shareContentEn
}}
<view
class=
"activity-remark"
v-if=
"detailInfo.
type == 4"
v-html=
"
locale === 'zh_CN'
? detailInfo.extraShare.activityDescZh
: detailInfo.extraShare.activityDescEn
"
>
</view>
<view
class=
"activity-cell"
>
<view
class=
"cell-label"
>
{{
detail
.
illustrate
}}
</view>
<view
class=
"cell-content"
>
<image
class=
"cell-image"
src=
"../../static/img/score_b.png"
></image>
<view
class=
"cell-text"
>
{{
detailInfo
.
getScoreOnce
}}
</view>
<span
v-if=
"detailInfo.type == 4"
>
{{
detail
.
shareLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<span
v-if=
"detailInfo.type == 3"
>
{{
detail
.
referralCodeLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<view
class=
"cell-text"
v-if=
"detailInfo.type == '2'"
>
{{
detail
.
registerLabel
(
detailInfo
.
getScoreOnce
)
}}
</view>
<view
v-if=
"detailInfo.type == 1"
>
<view
class=
"rule"
v-for=
"ruleItem in detailInfo.extraOrderV.orderVRule"
:key=
"ruleItem.low"
>
{{
detail
.
orderRuleLabel
(
{
low
:
ruleItem
.
low
,
high
:
ruleItem
.
high
,
score
:
ruleItem
.
score
,
unit
:
detailInfo
.
extraOrderVtransportType
==
1
?
"
m³
"
:
"
kg
"
,
}
)
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<view
class=
"activity-cell"
>
<
view
class
=
"
activity-cell
"
v
-
if
=
"
detailInfo.type!=2
"
>
<
view
class
=
"
cell-label
"
>
{{
detail
.
maxIntegral
}}
<
/view
>
<
view
class
=
"
cell-content
"
>
<
image
class
=
"
cell-image
"
src
=
"
../../static/img/score_b.png
"
><
/image
>
...
...
@@ -96,9 +119,9 @@ export default {
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
'
0
'
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
'
0
'
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
'
0
'
)
return
`
${
year
}
:
${
month
}
:
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
return
`${year
}
:${month
}
:${day
}
`
}
return
`
${
formatDate
(
start
)}
至
${
formatDate
(
end
)}
`
return
`${formatDate(start)
}
${this.detail.to
}
${formatDate(end)
}
`
}
}
}
...
...
@@ -156,7 +179,6 @@ page {
color
:
#
7
f7f7f
;
}
.
cell
-
content
{
max-width
:
60%
;
display
:
flex
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
...
...
src/pages/address_add/address_add.vue
View file @
9aa24dd2
...
...
@@ -3,7 +3,11 @@
<dHeader
:title=
"$lang.lang.addressInfo.addInfo"
></dHeader>
<view
class=
"container"
>
<uni-forms
ref=
"form"
:model=
"form"
:label-width=
"80"
:rules=
"rules"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.consignee"
required
name=
"name"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.consignee"
required
name=
"name"
>
<uni-easyinput
class=
"input"
:trim=
"true"
...
...
@@ -12,7 +16,11 @@
:placeholder=
"$lang.lang.notices.consignee"
/>
</uni-forms-item>
<uni-forms-item
:label=
"$lang.lang.addressInfo.phone"
required
name=
"phone"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.phone"
required
name=
"phone"
>
<view
class=
"phone-box"
>
<picker
:value=
"areaIndex"
:range=
"areaName"
@
change=
"areaChange"
>
<view
class=
"phone-code"
>
...
...
@@ -47,60 +55,73 @@
:placeholder=
"$lang.lang.notices.fullAddress"
>
</uni-easyinput>
<view
class=
"placeholder"
>
{{
$lang
.
lang
.
notices
.
fullAddressLength
}}
</view>
<view
class=
"placeholder"
>
{{
$lang
.
lang
.
notices
.
fullAddressLength
}}
</view>
</view>
</uni-forms-item>
<view
class=
"btn"
@
click=
"saveAddress"
>
报存地址
</view>
<view
class=
"btn"
@
click=
"saveAddress"
>
{{
$lang
.
lang
.
notices
.
saveAddress
}}
</view>
</uni-forms>
</view>
</view>
</
template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
export
default
{
components
:
{
dHeader
dHeader
,
},
data
()
{
return
{
form
:
{
name
:
''
,
phone
:
''
,
address
:
''
name
:
""
,
phone
:
""
,
address
:
""
,
},
areaCode
:
this
.
$store
.
getters
.
areaCode
,
areaIndex
:
0
,
areaName
:
[]
}
areaName
:
[]
,
}
;
},
computed
:
{
rules
()
{
return
{
name
:
{
rules
:
[{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
consignee
}]
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
consignee
},
],
},
phone
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
phone
},
{
validateFunction
:
(
rule
,
value
)
=>
/^
\d
+$/
.
test
(
value
),
errorMessage
:
this
.
$lang
.
lang
.
notices
.
nophone
}
]
errorMessage
:
this
.
$lang
.
lang
.
notices
.
nophone
,
}
,
]
,
},
address
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddress
},
{
maxLength
:
100
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddressLength
}
]
}
}
}
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddress
,
},
{
maxLength
:
100
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddressLength
,
},
],
},
};
},
},
created
()
{
this
.
getCountry
()
this
.
getCountry
()
;
},
methods
:
{
saveAddress
()
{
this
.
$refs
.
form
.
validate
().
then
(
async
(
valid
)
=>
{
...
...
@@ -109,47 +130,55 @@ export default {
const
params
=
{
...
this
.
form
,
areaCode
:
this
.
areaCode
,
memberId
:
this
.
$store
.
getters
.
id
}
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/member/user-address/create
'
,
memberId
:
this
.
$store
.
getters
.
id
,
}
;
const
{
code
,
data
,
msg
}
=
await
this
.
$request
.
post
(
"
/app-api/member/user-address/create
"
,
params
)
)
;
if
(
code
==
0
)
{
this
.
$router
.
back
()
uni
.
$emit
(
"
refreshPreviousPage
"
,
"
show
"
);
uni
.
navigateBack
();
}
else
{
uni
.
showToast
({
title
:
msg
,
duration
:
2000
,
});
}
}
catch
(
error
)
{}
}
})
})
;
},
// 获取国家区号
async
getCountry
()
{
try
{
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
)
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
"
/app-api/ecw/country/list-all
"
);
if
(
code
==
0
&&
data
.
length
>
0
)
{
// 查询用户区号下标
const
i
=
data
.
findIndex
((
item
)
=>
{
return
item
.
tel
==
this
.
areaCode
})
if
(
i
>=
0
)
this
.
areaIndex
=
i
return
item
.
tel
==
this
.
areaCode
;
})
;
if
(
i
>=
0
)
this
.
areaIndex
=
i
;
data
.
forEach
((
item
)
=>
{
const
str
=
item
.
tel
+
'
'
+
item
.
nameZh
if
(
this
.
$lang
.
locale
==
'
zh
'
)
{
this
.
areaName
.
push
(
str
)
const
str
=
item
.
tel
+
"
"
+
item
.
nameZh
;
if
(
this
.
$lang
.
locale
==
"
zh
"
)
{
this
.
areaName
.
push
(
str
)
;
}
else
{
this
.
areaName
.
push
(
str
)
this
.
areaName
.
push
(
str
)
;
}
})
})
;
}
}
catch
(
error
)
{}
},
// 区号选择切换
areaChange
(
e
)
{
this
.
areaIndex
=
e
.
detail
.
value
this
.
areaCode
=
this
.
areaName
[
this
.
areaIndex
].
split
(
'
'
)[
0
]
}
}
}
this
.
areaIndex
=
e
.
detail
.
value
;
this
.
areaCode
=
this
.
areaName
[
this
.
areaIndex
].
split
(
"
"
)[
0
];
}
,
}
,
}
;
</
script
>
<
style
>
...
...
src/pages/address_edit/address_edit.vue
View file @
9aa24dd2
...
...
@@ -3,7 +3,11 @@
<dHeader
:title=
"$lang.lang.addressInfo.editInfo"
></dHeader>
<view
class=
"container"
>
<uni-forms
ref=
"form"
:model=
"form"
:label-width=
"80"
:rules=
"rules"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.consignee"
required
name=
"name"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.consignee"
required
name=
"name"
>
<uni-easyinput
class=
"input"
:trim=
"true"
...
...
@@ -12,7 +16,11 @@
:placeholder=
"$lang.lang.notices.consignee"
/>
</uni-forms-item>
<uni-forms-item
:label=
"$lang.lang.addressInfo.phone"
required
name=
"phone"
>
<uni-forms-item
:label=
"$lang.lang.addressInfo.phone"
required
name=
"phone"
>
<view
class=
"phone-box"
>
<view
class=
"phone-code"
>
+86
</view>
<uni-easyinput
...
...
@@ -42,56 +50,68 @@
:placeholder=
"$lang.lang.notices.fullAddress"
>
</uni-easyinput>
<view
class=
"placeholder"
>
{{
$lang
.
lang
.
notices
.
fullAddressLength
}}
</view>
<view
class=
"placeholder"
>
{{
$lang
.
lang
.
notices
.
fullAddressLength
}}
</view>
</view>
</uni-forms-item>
<view
class=
"btn"
@
click=
"saveAddress"
>
报存地址
</view>
<view
class=
"btn"
@
click=
"saveAddress"
>
{{
$lang
.
lang
.
notices
.
saveAddress
}}
</view>
</uni-forms>
</view>
</view>
</
template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
export
default
{
components
:
{
dHeader
dHeader
,
},
data
()
{
return
{
form
:
{
name
:
''
,
phone
:
''
,
address
:
''
}
}
name
:
""
,
phone
:
""
,
address
:
""
,
}
,
}
;
},
onLoad
(
route
)
{
this
.
getAddress
(
route
.
id
)
this
.
getAddress
(
route
.
id
)
;
},
computed
:
{
rules
()
{
return
{
name
:
{
rules
:
[{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
consignee
}]
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
consignee
},
],
},
phone
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
phone
},
{
validateFunction
:
(
rule
,
value
)
=>
/^
\d
+$/
.
test
(
value
),
errorMessage
:
this
.
$lang
.
lang
.
notices
.
nophone
}
]
errorMessage
:
this
.
$lang
.
lang
.
notices
.
nophone
,
}
,
]
,
},
address
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddress
},
{
maxLength
:
100
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddressLength
}
]
}
}
}
{
required
:
true
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddress
,
},
{
maxLength
:
100
,
errorMessage
:
this
.
$lang
.
lang
.
notices
.
fullAddressLength
,
},
],
},
};
},
},
methods
:
{
saveAddress
()
{
...
...
@@ -100,27 +120,32 @@ export default {
if
(
res
)
{
try
{
const
{
code
}
=
await
this
.
$request
.
post
(
'
/app-api/member/user-address/update
'
,
"
/app-api/member/user-address/update
"
,
this
.
form
)
)
;
if
(
code
==
0
)
{
this
.
$router
.
back
()
this
.
$route
.
params
.
addressId
=
"
00000
"
;
uni
.
$emit
(
"
refreshPreviousPage
"
,
"
show
"
);
uni
.
navigateBack
();
}
}
catch
(
err
)
{}
}
})
})
;
},
// 获取地址信息 回显
async
getAddress
(
id
)
{
try
{
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
'
/app-api/member/user-address/get
'
,
{
id
})
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
"
/app-api/member/user-address/get
"
,
{
id
}
);
if
(
code
==
0
&&
data
)
{
this
.
form
=
data
this
.
form
=
data
;
}
}
catch
(
err
)
{}
}
}
}
}
,
}
,
}
;
</
script
>
<
style
>
...
...
src/pages/exchange_detail/exchange_detail.vue
View file @
9aa24dd2
...
...
@@ -8,7 +8,7 @@
</div>
<div
class=
"header-content"
>
<div
class=
"header-content-title"
>
{{
locale
===
'
zh
'
?
detailInfo
.
statusZh
:
detailInfo
.
statusEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
statusZh
:
detailInfo
.
statusEn
}}
</div>
<div
class=
"header-content-text"
>
<view
class=
"header-content-small"
>
{{
detail
.
total
}}
</view
...
...
@@ -18,11 +18,18 @@
</div>
<div
class=
"nav"
>
<div
class=
"nav-image"
>
<image
class=
"img"
:src=
"locale === 'zh' ? detailInfo.imgZh : detailInfo.imgEn"
></image>
<image
class=
"img"
:src=
"locale === 'zh' ? detailInfo.imgZh : detailInfo.imgEn"
></image>
</div>
<div
class=
"nav-content"
>
<div
class=
"nav-content-text"
>
{{
locale
===
'
zh
'
?
detailInfo
.
rewardTitleZh
:
detailInfo
.
rewardTitleEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
rewardTitleZh
:
detailInfo
.
rewardTitleEn
}}
</div>
<div
class=
"nav-content-tag"
>
<div
class=
"tag-image"
>
...
...
@@ -45,20 +52,28 @@
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
exchangeOutlets
}}
</div>
<div
class=
"cell-content"
>
{{
locale
===
'
zh
'
?
detailInfo
.
nodeTitleZh
:
detailInfo
.
nodeTitleEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
nodeTitleZh
:
detailInfo
.
nodeTitleEn
}}
</div>
</div>
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
exchangeType
}}
</div>
<div
class=
"cell-content"
>
{{
locale
===
'
zh
'
?
detailInfo
.
redeemTypeZh
:
detailInfo
.
redeemTypeEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
redeemTypeZh
:
detailInfo
.
redeemTypeEn
}}
</div>
</div>
<template
v-if=
"detailInfo.redeemType != 1"
>
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
address
}}
</div>
<div
class=
"cell-content"
>
{{
detailInfo
.
recipientName
}}
 
+
{{
detailInfo
.
recipientPhoneNum
}}
,
{{
detailInfo
.
recipientName
}}
 
+
{{
detailInfo
.
recipientPhoneNum
}}
,
{{
detailInfo
.
recipientAddress
}}
<view
class=
"red"
>
{{
detail
.
errorMsg
}}
</view>
</div>
...
...
@@ -73,7 +88,9 @@
</div>
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
courierTime
}}
</div>
<div
class=
"cell-content"
>
{{
formatDate
(
detailInfo
.
expressDate
)
}}
</div>
<div
class=
"cell-content"
>
{{
formatDate
(
detailInfo
.
expressDate
)
}}
</div>
</div>
</
template
>
<div
class=
"main-cell"
>
...
...
@@ -86,64 +103,66 @@
</template>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
export
default
{
components
:
{
dHeader
dHeader
,
},
data
()
{
return
{
id
:
null
,
detailInfo
:
{}
}
detailInfo
:
{}
,
}
;
},
onLoad
(
route
)
{
console
.
log
(
route
)
this
.
id
=
route
.
id
this
.
getDetail
()
console
.
log
(
route
)
;
this
.
id
=
route
.
id
;
this
.
getDetail
()
;
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
return
this
.
$lang
.
locale
;
},
detail
()
{
return
this
.
$lang
.
lang
.
detail
}
return
this
.
$lang
.
lang
.
detail
;
}
,
},
methods
:
{
// 获取详情
getDetail
()
{
this
.
$request
.
post
(
'
/app-api/reward/redeem/record/detail
'
,
{
redeemId
:
this
.
id
.
post
(
"
/app-api/reward/redeem/record/detail
"
,
{
redeemId
:
this
.
id
,
})
.
then
(({
code
,
data
})
=>
{
if
(
code
==
0
&&
data
)
{
this
.
detailInfo
=
data
this
.
detailInfo
=
data
;
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
})
console
.
log
(
error
)
;
})
;
},
// 时间范围返回
getTimeRange
(
start
,
end
)
{
return
`
${
this
.
formatDate
(
start
)}
至
${
this
.
formatDate
(
end
)}
`
return
`
${
this
.
formatDate
(
start
)}${
this
.
detail
.
to
}${
this
.
formatDate
(
end
)}
`
;
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
timestamp
)
{
if
(
!
timestamp
)
return
''
const
date
=
new
Date
(
timestamp
)
const
year
=
date
.
getFullYear
()
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'
0
'
)
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
'
0
'
)
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
'
0
'
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
'
0
'
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
'
0
'
)
return
`
${
year
}
:
${
month
}
:
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
}
}
}
if
(
!
timestamp
)
return
""
;
const
date
=
new
Date
(
timestamp
)
;
const
year
=
date
.
getFullYear
()
;
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
"
0
"
);
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
);
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
);
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
);
return
`
${
year
}
:
${
month
}
:
${
day
}
`
;
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
>
...
...
src/pages/integral/components/gift.vue
View file @
9aa24dd2
...
...
@@ -132,7 +132,23 @@ export default {
);
if
(
code
===
0
)
{
this
.
giftList
=
data
.
list
;
if
(
!
this
.
nodeId
)
{
if
(
data
.
city
)
{
this
.
netList
=
this
.
$lang
.
locale
===
"
zh
"
?
[
this
.
userInfo
.
countryTitleZh
,
this
.
userInfo
.
cityTitleZh
]
:
[
this
.
userInfo
.
countryTitleEn
,
this
.
userInfo
.
cityTitleEn
];
}
else
if
(
data
.
country
==
"
130
"
)
{
this
.
netList
=
this
.
$lang
.
locale
===
"
zh
"
?
[
"
中国
"
]
:
[
"
china
"
];
}
else
{
this
.
netList
=
this
.
$lang
.
locale
===
"
zh
"
?
[
this
.
userInfo
.
countryTitleZh
]
:
[
this
.
userInfo
.
countryTitleEn
];
}
}
}
console
.
log
(
"
giftList
"
,
this
.
giftList
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
...
...
@@ -195,6 +211,7 @@ export default {
}
this
.
pickerData
=
data
.
pickerData
;
this
.
pickerValue
=
data
.
pickerValue
;
this
.
$forceUpdate
();
},
// 选择数据显示
getPickerValue
(
val
)
{
...
...
src/pages/integral/integral.vue
View file @
9aa24dd2
...
...
@@ -8,11 +8,17 @@
</view>
<view
class=
"content"
>
<view
class=
"content-title"
>
{{
$lang
.
lang
.
integral
.
headerTitle
}}{{
levelInfo
.
levelName
}}
</view
>
{{
$lang
.
lang
.
integral
.
headerTitle
}}{{
levelInfo
.
levelName
}}
</view
>
<view
class=
"content-text"
>
<view
class=
"text"
>
{{
$lang
.
lang
.
integral
.
spend
}}
{{
levelInfo
.
holdScore
}}
</view>
<view
class=
"text"
>
{{
$lang
.
lang
.
integral
.
available
}}
{{
levelInfo
.
usedScore
}}
</view>
<view
class=
"text"
>
{{
$lang
.
lang
.
integral
.
spend
}}
{{
levelInfo
.
usedScore
}}
</view
>
<view
class=
"text"
>
{{
$lang
.
lang
.
integral
.
available
}}
{{
levelInfo
.
holdScore
}}
</view
>
</view>
<view
class=
"divider"
>
<view
class=
"divider-active"
:style=
"
{ width: `${score}%` }">
</view>
...
...
@@ -34,12 +40,18 @@
</view>
<view
class=
"main"
>
<view
class=
"main-nav"
>
<view
class=
"nav-item"
:class=
"
{ 'nav-active1': navIndex === 0 }" @click="navIndex = 0">
{{
$lang
.
lang
.
integral
.
redeemGifts
}}
</view>
<view
class=
"nav-item"
:class=
"
{ 'nav-active2': navIndex === 1 }" @click="navIndex = 1">
{{
$lang
.
lang
.
integral
.
pointsCampaign
}}
</view>
<view
class=
"nav-item"
:class=
"
{ 'nav-active1': navIndex === 0 }"
@click="navIndex = 0"
>
{{
$lang
.
lang
.
integral
.
redeemGifts
}}
</view
>
<view
class=
"nav-item"
:class=
"
{ 'nav-active2': navIndex === 1 }"
@click="navIndex = 1"
>
{{
$lang
.
lang
.
integral
.
pointsCampaign
}}
</view
>
</view>
<view
class=
"main-content"
>
<gift
v-show=
"navIndex === 0"
:userInfo=
"userInfo"
></gift>
...
...
@@ -51,14 +63,14 @@
</
template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
points
from
'
./components/points.vue
'
import
gift
from
'
./components/gift.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
import
points
from
"
./components/points.vue
"
;
import
gift
from
"
./components/gift.vue
"
;
export
default
{
components
:
{
dHeader
,
gift
,
points
points
,
},
data
()
{
return
{
...
...
@@ -66,38 +78,42 @@ export default {
// 会员信息
levelInfo
:
{},
// 会员图标
levelIcon
:
''
,
userInfo
:
{}
}
levelIcon
:
""
,
userInfo
:
{}
,
}
;
},
computed
:
{
score
()
{
if
(
this
.
levelInfo
.
totalScore
)
{
return
Math
.
min
(
Math
.
floor
((
this
.
levelInfo
.
totalScore
/
this
.
levelInfo
.
upperCount
)
*
100
),
Math
.
floor
(
(
this
.
levelInfo
.
totalScore
/
this
.
levelInfo
.
upperCount
)
*
100
),
100
)
)
;
}
return
0
}
return
0
;
}
,
},
created
()
{
this
.
getUserInfo
()
this
.
getUserInfo
()
;
},
methods
:
{
toLog
(
val
)
{
const
url
=
val
===
1
?
'
/pages/log/exchange
'
:
'
/pages/log/integral
'
uni
.
navigateTo
({
url
})
const
url
=
val
===
1
?
"
/pages/log/exchange
"
:
"
/pages/log/integral
"
;
uni
.
navigateTo
({
url
})
;
},
// 获取个人信息
async
getUserInfo
()
{
try
{
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
'
/app-api/member/user/get
'
)
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
"
/app-api/member/user/get
"
);
if
(
code
===
0
&&
data
)
{
const
{
userScoreLevelInfo
,
...
args
}
=
data
this
.
userInfo
=
args
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
this
.
getMemberScore
(
this
.
$store
.
getters
.
id
)
const
{
userScoreLevelInfo
,
...
args
}
=
data
;
this
.
userInfo
=
args
;
this
.
levelIcon
=
userScoreLevelInfo
.
levelIcon
;
this
.
getMemberScore
(
this
.
$store
.
getters
.
id
)
;
}
}
catch
(
err
)
{}
},
...
...
@@ -107,14 +123,14 @@ export default {
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
`/app-api/member/user-score/info?id=
${
id
}
`
,
{
id
}
)
)
;
if
(
code
===
0
&&
data
)
{
this
.
levelInfo
=
data
this
.
levelInfo
=
data
;
}
}
catch
(
err
)
{}
}
}
}
}
,
}
,
}
;
</
script
>
<
style
>
...
...
src/pages/log/exchange.vue
View file @
9aa24dd2
<
template
>
<view>
<dHeader
:title=
"$lang.lang.log.log
Points
"
></dHeader>
<dHeader
:title=
"$lang.lang.log.log
Exchange
"
></dHeader>
<view
class=
"container"
>
<view
class=
"item"
v-for=
"item in list"
:key=
"item.id"
@
click=
"toDetail(item.id)"
>
<view
class=
"item"
v-for=
"item in list"
:key=
"item.id"
@
click=
"toDetail(item.id)"
>
<div
class=
"item-title"
>
{{
$lang
.
lang
.
log
.
redeemGifts
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
...
...
@@ -13,7 +18,7 @@
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
===
'
zh
'
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
{{
locale
===
"
zh
"
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
...
...
@@ -28,57 +33,63 @@
</
template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
export
default
{
components
:
{
dHeader
dHeader
,
},
data
()
{
return
{
list
:
[]
}
list
:
[]
,
}
;
},
created
()
{
this
.
getList
()
this
.
getList
()
;
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
}
return
this
.
$lang
.
locale
;
}
,
},
methods
:
{
toDetail
(
id
)
{
uni
.
navigateTo
({
url
:
'
/pages/exchange_detail/exchange_detail?id=
'
+
id
})
url
:
"
/pages/exchange_detail/exchange_detail?id=
"
+
id
,
})
;
},
// 获取礼品列表
async
getList
()
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/reward/redeem/record/list
'
,
{
memberId
})
const
memberId
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
"
/app-api/reward/redeem/record/list
"
,
{
memberId
,
}
);
if
(
code
==
0
&&
data
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
;
}
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
Y
=
date
.
getFullYear
()
+
'
-
'
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
const
D
=
date
.
getDate
()
+
'
'
const
h
=
date
.
getHours
()
+
'
:
'
const
m
=
date
.
getMinutes
()
+
'
:
'
const
s
=
date
.
getSeconds
()
return
Y
+
M
+
D
+
h
+
m
+
s
}
}
}
const
date
=
new
Date
(
time
);
const
Y
=
date
.
getFullYear
()
+
"
-
"
;
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
const
D
=
date
.
getDate
()
+
"
"
;
const
h
=
date
.
getHours
()
+
"
:
"
;
const
m
=
date
.
getMinutes
()
+
"
:
"
;
const
s
=
date
.
getSeconds
();
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
},
};
</
script
>
<
style
lang=
"scss"
>
...
...
@@ -102,6 +113,7 @@ page {
width
:
100%
;
box-sizing
:
border-box
;
border-radius
:
16upx
;
background
:
#ffffff
;
box-shadow
:
0
2upx
12upx
0
rgba
(
0
,
0
,
0
,
0
.1
);
}
}
...
...
src/pages/log/integral.vue
View file @
9aa24dd2
<
template
>
<view>
<dHeader
:title=
"$lang.lang.log.log
Exchange
"
></dHeader>
<dHeader
:title=
"$lang.lang.log.log
Points
"
></dHeader>
<view
class=
"container"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"item-title"
>
{{
locale
==
'
zh
'
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
</div>
<div
class=
"item-title"
>
{{
locale
==
"
zh
"
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
<image
class=
"imgs"
:src=
"imgArr[item.sourceType]"
></image>
<image
class=
"imgs"
:src=
"imgArr[item.sourceType]"
></image>
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
==
'
zh
'
?
item
.
descZh
:
item
.
descEn
}}
{{
locale
==
"
zh
"
?
item
.
descZh
:
item
.
descEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
<div
class=
"box-right"
>
<view
class=
"box-right-num"
v-if=
"item.rewardCount"
>
X
{{
item
.
rewardCount
}}
</view>
<view
class=
"box-right-num"
v-if=
"item.rewardCount"
>
X
{{
item
.
rewardCount
}}
</view
>
<view
class=
"box-right-img"
v-if=
"item.expired"
>
<image
src=
"../../static/img/overdue.png"
></image>
</view>
<view
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</view>
<view
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</view
>
</div>
</div>
</view>
...
...
@@ -31,62 +34,68 @@
</
template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
export
default
{
components
:
{
dHeader
dHeader
,
},
data
()
{
return
{
list
:
[]
}
list
:
[]
,
}
;
},
created
()
{
this
.
getList
()
this
.
getList
()
;
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
return
this
.
$lang
.
locale
;
},
// 图片数组
imgArr
()
{
return
{
'
1
'
:
'
../../static/img/log_type1.png
'
,
'
2
'
:
'
../../static/img/log_type2.png
'
,
'
4
'
:
'
../../static/img/log_type4.png
'
,
'
5
'
:
'
../../static/img/log_type5.png
'
,
'
6
'
:
'
../../static/img/log_type6.png
'
,
'
7
'
:
'
../../static/img/log_type7.png
'
,
'
8
'
:
'
../../static/img/log_type8.png
'
,
}
}
1
:
"
../../static/img/log_type1.png
"
,
2
:
"
../../static/img/log_type2.png
"
,
4
:
"
../../static/img/log_type4.png
"
,
5
:
"
../../static/img/log_type5.png
"
,
6
:
"
../../static/img/log_type6.png
"
,
7
:
"
../../static/img/log_type7.png
"
,
8
:
"
../../static/img/log_type8.png
"
,
}
;
}
,
},
methods
:
{
// 获取列表
async
getList
()
{
try
{
const
id
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/member/user-score/log
'
,
{
id
})
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
"
/app-api/member/user-score/log
"
,
{
id
,
}
);
if
(
code
==
0
&&
data
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
catch
(
err
)
{}
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
Y
=
date
.
getFullYear
()
+
'
-
'
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
const
D
=
date
.
getDate
()
+
'
'
const
h
=
date
.
getHours
()
+
'
:
'
const
m
=
date
.
getMinutes
()
+
'
:
'
const
s
=
date
.
getSeconds
()
return
Y
+
M
+
D
+
h
+
m
+
s
}
}
}
const
date
=
new
Date
(
time
);
const
Y
=
date
.
getFullYear
()
+
"
-
"
;
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
const
D
=
date
.
getDate
()
+
"
"
;
const
h
=
date
.
getHours
()
+
"
:
"
;
const
m
=
date
.
getMinutes
()
+
"
:
"
;
const
s
=
date
.
getSeconds
();
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
},
};
</
script
>
<
style
lang=
"scss"
>
...
...
@@ -110,6 +119,7 @@ page {
width
:
100%
;
box-sizing
:
border-box
;
border-radius
:
16upx
;
background
:
#ffffff
;
box-shadow
:
0
2upx
12upx
0
rgba
(
0
,
0
,
0
,
0
.1
);
}
}
...
...
src/pages/order_mail/order_mail.vue
View file @
9aa24dd2
This diff is collapsed.
Click to expand it.
src/static/img/house.png
0 → 100644
View file @
9aa24dd2
3.68 KB
src/static/lang/en.js
View file @
9aa24dd2
This diff is collapsed.
Click to expand it.
src/static/lang/zh.js
View file @
9aa24dd2
This diff is collapsed.
Click to expand it.
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