Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
new-sing
h5-base
Commits
0ac62953
Commit
0ac62953
authored
Jul 01, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Plain Diff
71
parents
ea775fd8
3343613e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
8 deletions
+100
-8
address.vue
src/components/mine/address.vue
+100
-8
No files found.
src/components/mine/address.vue
View file @
0ac62953
...
@@ -19,15 +19,18 @@
...
@@ -19,15 +19,18 @@
<
script
>
<
script
>
import
line
from
"../../assets/activity/img_line@2x.png"
;
import
line
from
"../../assets/activity/img_line@2x.png"
;
import
{
shopSuccess
}
from
"../../util/imgUrl"
;
import
{
shopSuccess
}
from
"../../util/imgUrl"
;
import
{
getUserAdressApi
}
from
"../../service/api"
;
import
{
getNewestAddressListAPi
}
from
"../../service/api"
;
import
{
Toast
}
from
"vant"
;
export
default
{
export
default
{
name
:
"Address"
,
name
:
"Address"
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
line
:
line
,
line
:
line
,
addressInfo
:
{}
addressInfo
:
null
,
noDeliverDetail
:
null
,
//下期收货地址
deliverDetail
:
null
//本期收货地址
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -35,10 +38,45 @@ export default {
...
@@ -35,10 +38,45 @@ export default {
},
},
methods
:
{
methods
:
{
initPage
()
{
initPage
()
{
getUserAdressApi
().
then
(
res
=>
{
getNewestAddressListAPi
()
// this.starNum = res.last_value
.
then
(
res
=>
{
this
.
addressInfo
=
res
;
// this.starNum = res.last_value
// res = {
// code: 505,
// msg: "该用户没有物流信息"
// };
if
(
res
)
{
if
(
res
.
code
==
505
)
{
if
(
res
.
data
)
{
this
.
addressInfo
=
res
.
data
;
}
}
else
{
if
(
res
.
deliver_detail
&&
res
.
deliver_detail
.
length
>
0
)
{
this
.
deliverDetail
=
res
.
deliver_detail
[
0
];
console
.
log
(
this
.
deliverDetail
);
}
if
(
res
.
no_deliver_detail
&&
res
.
no_deliver_detail
.
length
>
0
)
{
this
.
noDeliverDetail
=
res
.
no_deliver_detail
[
0
];
}
}
}
})
.
catch
(
error
=>
{
console
.
log
(
error
);
});
},
goEdit
()
{
this
.
$router
.
push
({
name
:
"addressModify"
,
params
:
{
data
:
JSON
.
stringify
(
this
.
noDeliverDetail
)
}
});
});
},
search
(
index
)
{
let
express_no
=
index
==
1
?
this
.
deliverDetail
.
express_no
:
this
.
noDeliverDetail
.
express_no
;
window
.
location
=
`https://m.baidu.com/from=1013755s/s?word=
${
express_no
}
&sa=tb&ts=2790568&t_kt=0&ie=utf-8&rsv_t=cbe2F%252FT5T3MIzkRl%252Fg8ZUw%252FEPHZmn2wHIrB8cLvgNlEKyyDqUNPrTyDEEDjkAb8&rsv_pq=11793168499026332712&ss=110000000001&tj=1&rqlang=zh&rsv_sug4=4111&inputT=3178&oq=快递单号查询`
;
}
}
}
}
};
};
...
@@ -46,11 +84,44 @@ export default {
...
@@ -46,11 +84,44 @@ export default {
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
@import "../../util/public";
@import "../../util/public";
.address2 {
.address2 {
background: #f5f5f9;
background: #f5f5f9;
.van-button {
margin-left: 20 * @toVw;
}
.head {
i {
display: inline-block;
border-radius: 50%;
width: 11 * @toVw;
height: 11 * @toVw;
}
padding: 13 * @toVw;
background: white;
border-bottom: 1px solid #e2e2e2;
color: #666666;
font-size: 14 * @toVw;
}
.Invalid {
color: #cccccc;
}
.now {
i {
background: #60adf0;
}
}
.item {
margin-top: 10px;
}
.next {
i {
background: #ffd454;
}
}
.content {
.content {
background: white;
background: white;
padding: 1
0 * @toVw 20
* @toVw;
padding: 1
3 * @toVw 0 13 * @toVw 26
* @toVw;
.top {
.top {
line-height: 28 * @toVw;
line-height: 28 * @toVw;
color: #333333;
color: #333333;
...
@@ -62,13 +133,34 @@ export default {
...
@@ -62,13 +133,34 @@ export default {
font-size: 14 * @toVw;
font-size: 14 * @toVw;
line-height: 20 * @toVw;
line-height: 20 * @toVw;
}
}
.timeInfo {
display: flex;
.text {
color: #999999;
font-size: 12 * @toVw;
margin-left: 0;
line-height: 26 * @toVw;
}
.right {
margin-top: 43 * @toVw;
}
.van-button--info {
background: white;
width: 74 * @toVw;
color: #60adf0;
border-color: #60adf0;
}
}
}
}
.linebox{
.linebox
{
background: white;
background: white;
}
}
.line {
.line {
width: 100%;
width: 100%;
display: block;
display: block;
border-bottom: 1px solid #e2e2e2;
margin: 12 * @toVw 0;
-webkit-transform: scale(1, 0.5);
}
}
.tip {
.tip {
padding: 10 * @toVw 20 * @toVw;
padding: 10 * @toVw 20 * @toVw;
...
...
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