Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0ed0adce
authored
May 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
6cfd2826
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
pages/mine/userAddress.vue
router/index.js
pages/mine/userAddress.vue
View file @
0ed0adce
<
template
>
<
template
>
<view
class=
"page-userAddress"
>
<view
class=
"page-userAddress"
>
<navElement
title=
"地址管理"
></navElement>
<template
v-if=
"from"
>
<navElement
title=
"选择收货地址"
></navElement>
</
template
>
<
template
v-else
>
<navElement
title=
"地址管理"
></navElement>
</
template
>
<view
class=
"tip row verCenter"
style=
"margin-bottom: 16rpx;margin-top: 0;"
>
<view
class=
"tip row verCenter"
style=
"margin-bottom: 16rpx;margin-top: 0;"
>
<text
class=
"iconfont icon-ts"
></text>
<text
class=
"iconfont icon-ts"
></text>
<text
class=
"t1"
>
已创建
</text>
<text
class=
"t1"
>
已创建
</text>
...
@@ -17,17 +22,25 @@
...
@@ -17,17 +22,25 @@
</view>
</view>
<view
class=
"p2"
>
{{ item.province_val }}{{ item.city_val }}{{ item.district_val }}{{ item.detail_address }}
</view>
<view
class=
"p2"
>
{{ item.province_val }}{{ item.city_val }}{{ item.district_val }}{{ item.detail_address }}
</view>
<view
class=
"operate row bothSide verCenter"
>
<view
class=
"operate row bothSide verCenter"
>
<template
v-if=
"
item.is_default == 1
"
>
<
template
v-if=
"
from
"
>
<view
class=
"row verCenter
default-curr
"
>
<view
class=
"row verCenter"
>
<view
class=
"default"
></view>
<view
class=
"default"
></view>
<text
class=
"default-text"
>
默认地址
</text>
<text
class=
"default-text"
>
选择
</text>
</view>
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
class=
"row verCenter"
@
click=
"setdefault(item.address_id)"
>
<template
v-if=
"item.is_default == 1"
>
<view
class=
"default"
></view>
<view
class=
"row verCenter default-curr"
>
<text
class=
"default-text"
>
设为默认
</text>
<view
class=
"default"
></view>
</view>
<text
class=
"default-text"
>
默认地址
</text>
</view>
</
template
>
<
template
v-else
>
<view
class=
"row verCenter"
@
click=
"setdefault(item.address_id)"
>
<view
class=
"default"
></view>
<text
class=
"default-text"
>
设为默认
</text>
</view>
</
template
>
</template>
</template>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<navigator
class=
"edit row verCenter"
:url=
"'/user/userAddressEdit?address_id=' + item.address_id"
hover-class=
"none"
>
<navigator
class=
"edit row verCenter"
:url=
"'/user/userAddressEdit?address_id=' + item.address_id"
hover-class=
"none"
>
...
@@ -65,9 +78,13 @@ export default {
...
@@ -65,9 +78,13 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
from
:
''
,
list
:
[]
list
:
[]
};
};
},
},
onLoad
(
options
)
{
this
.
from
=
options
.
from
||
''
;
},
onShow
()
{
onShow
()
{
this
.
getData
();
this
.
getData
();
},
},
...
...
router/index.js
View file @
0ed0adce
...
@@ -310,7 +310,7 @@ const router = new Router({
...
@@ -310,7 +310,7 @@ const router = new Router({
//全局路由前置守卫
//全局路由前置守卫
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
meta
.
auth
)
{
if
(
to
.
meta
&&
to
.
meta
.
auth
)
{
if
(
!
getCookie
(
'Yo4teW_uid'
)
||
getCookie
(
'Yo4teW_uid'
)
==
0
)
{
if
(
!
getCookie
(
'Yo4teW_uid'
)
||
getCookie
(
'Yo4teW_uid'
)
==
0
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/login?referer='
+
to
.
aliasPath
url
:
'/login?referer='
+
to
.
aliasPath
...
...
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