Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
14c25d3b
Commit
14c25d3b
authored
May 19, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
f2954b96
2190ac56
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
572 additions
and
26 deletions
+572
-26
pages.json
pages.json
+17
-7
cart.vue
pages/cart/cart.vue
+404
-0
index.vue
pages/cart/index.vue
+0
-9
index.vue
pages/ucenter/index.vue
+0
-9
user-center.vue
pages/user-center/user-center.vue
+150
-0
api.js
plugin/api.js
+1
-1
Shopping.png
static/images/icon/Shopping.png
+0
-0
No files found.
pages.json
View file @
14c25d3b
...
...
@@ -2,15 +2,25 @@
"easycom"
:
{
"^u-(.*)"
:
"uview-ui/components/u-$1/u-$1.vue"
},
"pages"
:
[{
"path"
:
"pages/goods/goods"
"pages"
:
[
{
"path"
:
"pages/index/index"
},
{
"path"
:
"pages/user-center/user-center"
},
{
"path"
:
"pages/cart/cart"
},
{
"path"
:
"pages/cats/cats"
},
{
"path"
:
"pages/
index/index
"
"path"
:
"pages/
goods/goods
"
},
{
"path"
:
"pages/webbox/webbox"
},
...
...
pages/cart/cart.vue
0 → 100644
View file @
14c25d3b
This diff is collapsed.
Click to expand it.
pages/cart/index.vue
deleted
100644 → 0
View file @
f2954b96
<
template
>
<view>
购物车
</view>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
pages/ucenter/index.vue
deleted
100644 → 0
View file @
f2954b96
<
template
>
<view>
个人中心
</view>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
pages/user-center/user-center.vue
0 → 100644
View file @
14c25d3b
<
template
>
<view
class=
"userStyle"
v-if=
"!isloading"
>
<view
class=
"userBox"
></view>
<image
:src=
'meueData.user_center.style_bg_pic_url'
class=
"imgbg"
>
<!--
<image
:src=
'user_info.avatar'
class=
"headimg"
></image>
-->
<!--
<view
style=
"width: 140rpx;height: 140rpx;background: #007AFF;"
></view>
-->
</image>
<tabbars></tabbars>
</view>
</
template
>
<
script
>
import
tabbars
from
"@/components/tabbar/index"
;
export
default
{
data
(){
return
{
isloading
:
true
,
pageTitle
:
"用户中心"
,
navHeight
:
0
,
contentHeight
:
0
,
cstyle
:{},
meueData
:{},
//菜单
user_info
:{},
//个人信息
bottommargin
:
0
,
listbottom
:
0
,
}
},
components
:{
tabbars
},
onLoad
()
{
this
.
navHeight
=
this
.
$navHeight
-
2
;
this
.
cstyle
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
cat_style
:
[];
if
(
this
.
cstyle
.
cat_style
==
"4"
)
{
}
},
mounted
(){
let
currentPages
=
getCurrentPages
();
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
this
.
bottommargin
=
(
c
-
2
)
+
'px'
;
this
.
listbottom
=
(
c
-
2
+
50
)
+
'px'
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
console
.
log
(
wx
.
getStorageSync
(
"basedata"
))
console
.
log
(
u
)
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
this
.
userinfo
()
this
.
getmeue
()
},
methods
:{
goHome
()
{
uni
.
redirectTo
({
url
:
"/pages/index/main"
});
},
userinfo
()
{
uni
.
showNavigationBarLoading
();
this
.
request
(
{
url
:
""
,
header
:{
'X-Access-Token'
:
'Tc8G75W5llGY_UPwlHBscYEPs1a32cDJ'
,
'X-App-Platform'
:
'wxapp'
,
'X-App-Version'
:
'4.2.47'
,
'X-Form-Id-List'
:
JSON
.
stringify
([]),
'X-Requested-With'
:
'XMLHttpRequest'
,
'X-User-Id'
:
21269
},
data
:
{
r
:
"api/user/user-info"
,
},
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
()
this
.
isloading
=
false
;
console
.
log
(
res
)
}
);
},
getmeue
(){
uni
.
showNavigationBarLoading
();
this
.
request
(
{
url
:
""
,
header
:{
'X-Access-Token'
:
'Tc8G75W5llGY_UPwlHBscYEPs1a32cDJ'
,
'X-App-Platform'
:
'wxapp'
,
'X-App-Version'
:
'4.2.47'
,
'X-Form-Id-List'
:
JSON
.
stringify
([]),
'X-Requested-With'
:
'XMLHttpRequest'
,
'X-User-Id'
:
21269
},
data
:
{
r
:
"api/user/config"
,
},
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
()
this
.
isloading
=
false
;
console
.
log
(
res
.
data
)
this
.
meueData
=
res
.
data
.
config
;
this
.
user_info
=
res
.
data
.
user_info
;
}
);
}
}
}
</
script
>
<
style
>
.userStyle
.userBox
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.userStyle
.imgbg
{
width
:
100%
;
height
:
330
rpx
;
position
:
relative
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.userStyle
.headimg
{
width
:
140
rpx
;
height
:
140
rpx
;
border-radius
:
50%
;
margin-left
:
60
rpx
;
}
</
style
>
plugin/api.js
View file @
14c25d3b
...
...
@@ -5,7 +5,7 @@ export default {
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host
+
param
.
url
,
url
:
this
.
host
+
"&r="
+
param
.
data
.
r
,
method
:
param
.
method
||
"GET"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
...
...
static/images/icon/Shopping.png
0 → 100644
View file @
14c25d3b
1.94 KB
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