Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
5e3dae5d
Commit
5e3dae5d
authored
Jun 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的页面
parent
c612caba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
216 additions
and
73 deletions
+216
-73
pages.json
src/pages.json
+9
-0
mine.vue
src/pages/index/mine.vue
+116
-73
index.vue
src/pages/mine/setting/index.vue
+91
-0
No files found.
src/pages.json
View file @
5e3dae5d
...
@@ -254,6 +254,15 @@
...
@@ -254,6 +254,15 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
"path"
:
"setting/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"设置"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
{
"path"
:
"warehouse/index"
,
"path"
:
"warehouse/index"
,
"style"
:
{
"style"
:
{
...
...
src/pages/index/mine.vue
View file @
5e3dae5d
...
@@ -6,23 +6,31 @@
...
@@ -6,23 +6,31 @@
</u-navbar>
</u-navbar>
<view
class=
"mine-content"
>
<view
class=
"mine-content"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<view
class=
"header-left-view"
>
<view
class=
"head-image"
>
<view
class=
"head-image"
>
<image
:style=
"headImageStyle"
:src=
"headImageUrl"
></image>
<image
:style=
"headImageStyle"
:src=
"headImageUrl"
></image>
</view>
</view>
<view
class=
"header-content"
>
<view
class=
"header-content"
>
<view
class=
"name-view"
@
click=
"handleClickName"
>
{{
name
||
"点击登录"
}}
</view>
<view
class=
"name-view"
@
click=
"handleClickName"
>
{{
name
||
"点击登录"
}}
</view>
<view
:class=
"['tel-view',
{'active': mobile}]" @click="handleClickTel
">
<view
:class=
"['tel-view',
{'active': mobile}]" @click="$u.throttle(handleClickTel, 500)
">
<text>
{{
telTip
}}
</text>
<text>
{{
telTip
}}
</text>
<u-icon
class=
"tel-arrow-icon"
name=
"arrow-up-fill"
></u-icon>
<u-icon
class=
"tel-arrow-icon"
name=
"arrow-up-fill"
></u-icon>
</view>
</view>
</view>
</view>
<view
v-if=
"showSuperButton"
class=
"super-button"
><u-button
@
click=
"handleSuperButton"
>
切换用户
</u-button></view>
<view
v-if=
"showSuperButton"
class=
"super-button"
><u-button
@
click=
"$u.throttle(handleSuperButton, 500)"
>
切换用户
</u-button></view>
</view>
<view
class=
"header-right-view"
@
click=
"$u.throttle(handleClickSetting, 500)"
>
<image
:src=
"shezhiImage"
class=
"right-image-view"
></image>
<text>
设置
</text>
</view>
</view>
</view>
<view
class=
"ware-house-view"
>
<view
class=
"ware-house-view"
>
<view
class=
"ware-house-title"
>
我的仓库
</view>
<view
class=
"ware-house-title"
>
仓配功能
</view>
<view
class=
"ware-house-content"
>
<view
class=
"ware-house-content"
>
<view
v-for=
"(item, index) in warehouseItems"
:key=
"index"
class=
"ware-house-content-item"
@
click=
"handleClick(item.pathName)"
>
<view
v-for=
"(item, index) in warehouseItems"
:key=
"index"
class=
"ware-house-content-item"
@
click=
"handleClick(item.pathName)"
>
<image
:src=
"item.icon"
class=
"ware-house-image"
></image>
<view
class=
"ware-house-image"
>
<image
:src=
"item.icon"
:style=
"item.imageStyle"
></image>
</view>
<view>
{{
item
.
title
}}
</view>
<view>
{{
item
.
title
}}
</view>
</view>
</view>
</view>
</view>
...
@@ -133,25 +141,29 @@
...
@@ -133,25 +141,29 @@
pathName
:
'warehouse/index'
,
pathName
:
'warehouse/index'
,
title
:
'我的配件'
,
title
:
'我的配件'
,
value
:
''
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'cangku.png'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'wodepeijian.png'
,
imageStyle
:
'width:60rpx;height:54rpx'
},
},
{
{
pathName
:
'warehouse/spare'
,
pathName
:
'warehouse/spare'
,
title
:
'我的备件'
,
title
:
'我的备件'
,
value
:
''
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'cangku.png'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'wodebeijian.png'
,
imageStyle
:
'width:60rpx;height:54rpx'
},
},
{
{
pathName
:
'warehouse/return'
,
pathName
:
'warehouse/return'
,
title
:
'返件信息'
,
title
:
'返件信息'
,
value
:
''
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'cangku.png'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'fanjianxinxi.png'
,
imageStyle
:
'width:56rpx;height:54rpx'
},
},
{
{
pathName
:
'warehouse/records'
,
pathName
:
'warehouse/records'
,
title
:
'出入库记录'
,
title
:
'出入库记录'
,
value
:
''
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'cangku.png'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'churuku.png'
,
imageStyle
:
'width:50rpx;height:54rpx'
},
},
]
]
},
},
...
@@ -162,10 +174,13 @@
...
@@ -162,10 +174,13 @@
return
this
.
avatar
||
this
.
placeholderImage
return
this
.
avatar
||
this
.
placeholderImage
},
},
headImageStyle
()
{
headImageStyle
()
{
return
this
.
avatar
?
'width:1
36rpx; height:136rpx;border-radius:68rpx'
:
'width:144rpx; height:144rpx;border-radius:72
rpx'
return
this
.
avatar
?
'width:1
12rpx; height:112rpx;border-radius:56rpx'
:
'width:120rpx; height:120rpx;border-radius:60
rpx'
},
},
headSize
()
{
headSize
()
{
return
this
.
avatar
?
136
:
144
return
this
.
avatar
?
112
:
120
},
shezhiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'shezhi.png'
}
}
},
},
async
onLoad
()
{
async
onLoad
()
{
...
@@ -179,7 +194,7 @@
...
@@ -179,7 +194,7 @@
this
.
getData
()
this
.
getData
()
}
}
}
}
this
.
wodebeijingImage
=
this
.
qnFile
(
'wodebeijing.png'
)
this
.
wodebeijingImage
=
this
.
qnFile
(
'wodebeijing
-jb
.png'
)
this
.
placeholderImage
=
this
.
qnFile
(
'touxiang.png'
)
this
.
placeholderImage
=
this
.
qnFile
(
'touxiang.png'
)
},
},
methods
:
{
methods
:
{
...
@@ -199,6 +214,9 @@
...
@@ -199,6 +214,9 @@
this
.
$u
.
route
({
url
:
"pages/login/index"
})
this
.
$u
.
route
({
url
:
"pages/login/index"
})
}
}
},
},
handleClickSetting
()
{
this
.
$u
.
route
({
url
:
'pages/mine/setting/index'
})
},
handleClickName
()
{
handleClickName
()
{
if
(
this
.
vuex_token
&&
this
.
settled
)
{
if
(
this
.
vuex_token
&&
this
.
settled
)
{
return
false
return
false
...
@@ -252,16 +270,20 @@
...
@@ -252,16 +270,20 @@
.mine-content
{
.mine-content
{
position
:
relative
;
position
:
relative
;
padding
:
3
0rpx
;
padding
:
26rpx
30rpx
30rpx
2
0rpx
;
.header-view
{
.header-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
justify-content
:
space-between
;
margin-bottom
:
60rpx
;
margin-bottom
:
60rpx
;
.header-left-view
{
display
:
flex
;
align-items
:
center
;
.head-image
{
.head-image
{
width
:
144rpx
;
width
:
120rpx
;
height
:
144rpx
;
height
:
120rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
border-radius
:
72rpx
;
border-radius
:
56rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -273,10 +295,10 @@
...
@@ -273,10 +295,10 @@
margin-left
:
24rpx
;
margin-left
:
24rpx
;
.name-view
{
.name-view
{
font-size
:
44rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
14rpx
;
margin-bottom
:
6rpx
;
margin-top
:
6rpx
;
margin-top
:
-4rpx
;
}
}
.tel-view
{
.tel-view
{
...
@@ -306,16 +328,31 @@
...
@@ -306,16 +328,31 @@
margin-left
:
20rpx
;
margin-left
:
20rpx
;
}
}
}
}
.header-right-view
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
color
:
#FFFFFF
;
margin-right
:
4rpx
;
font-size
:
26rpx
;
margin-top
:
-26rpx
;
.right-image-view
{
width
:
34rpx
;
height
:
32rpx
;
margin-right
:
10rpx
;
}
}
}
.ware-house-view
{
.ware-house-view
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
30rpx
;
padding
:
30rpx
30rpx
40rpx
30rpx
;
height
:
240rpx
;
height
:
240rpx
;
.ware-house-title
{
.ware-house-title
{
color
:
#333333
;
color
:
#333333
;
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
32rpx
;
font-size
:
32rpx
;
margin-bottom
:
12
rpx
;
margin-bottom
:
30
rpx
;
}
}
.ware-house-content
{
.ware-house-content
{
display
:
flex
;
display
:
flex
;
...
@@ -324,11 +361,17 @@
...
@@ -324,11 +361,17 @@
.ware-house-content-item
{
.ware-house-content-item
{
color
:
#333333
;
color
:
#333333
;
font-size
:
26rpx
;
font-size
:
26rpx
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
.ware-house-image
{
.ware-house-image
{
width
:
60rpx
;
width
:
60rpx
;
height
:
60rpx
;
height
:
60rpx
;
margin-bottom
:
12rpx
;
margin-bottom
:
14rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
}
}
...
...
src/pages/mine/setting/index.vue
0 → 100644
View file @
5e3dae5d
<
template
>
<!-- 设置 -->
<view
class=
"setting-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"设置"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"list-view"
>
<u-cell-group
:border=
"false"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<u-cell-item
:value=
"item.value"
:border-bottom=
"false"
@
click=
"handleClick(item.pathName)"
>
<image
slot=
"icon"
:src=
"item.icon"
:style=
"item.imageStyle"
></image>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
</u-cell-item>
</view>
</u-cell-group>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
};
},
computed
:
{
items
()
{
return
[
{
pathName
:
'about'
,
title
:
'当前版本'
,
value
:
process
.
uniEnv
.
version
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'version.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
}
]
}
},
onLoad
()
{
getApp
().
trackPage
(
'设置'
)
},
methods
:
{
handleClick
(
path
)
{
if
(
this
.
vuex_token
)
{
if
(
path
===
'about'
)
{
getApp
().
updateApp
(
1
)
return
}
this
.
$u
.
route
({
url
:
'pages/mine/'
+
path
+
'/index'
})
}
else
{
this
.
$u
.
route
({
url
:
"pages/login/index"
})
}
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.setting-view
{
padding-bottom
:
44px
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#F4F5F7
;
.list-view
{
height
:
100%
;
margin-top
:
30rpx
;
.item-title
{
font-size
:
32rpx
;
color
:
#333333
;
margin-left
:
16rpx
;
line-height
:
32rpx
;
}
.item-value
{
font-size
:
26rpx
;
color
:
#999999
;
}
.line-view
{
height
:
2rpx
;
background-color
:
#F4F5F7
;
margin
:
30rpx
;
}
}
}
</
style
>
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