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
3ca1cc97
Commit
3ca1cc97
authored
Jun 05, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
beb84ae0
7b5f1cf6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
299 additions
and
236 deletions
+299
-236
index.vue
components/auth/index.vue
+62
-34
goodsaction.vue
components/goods/goodsaction.vue
+8
-11
index.vue
components/userbox/index.vue
+2
-2
balance.vue
pages/balance/balance.vue
+3
-3
index.vue
pages/coupon/index/index.vue
+1
-1
favorite.vue
pages/favorite/favorite.vue
+89
-55
index.vue
pages/foot/index/index.vue
+53
-74
goods.vue
pages/goods/goods.vue
+14
-0
index.vue
pages/share/index/index.vue
+4
-3
integral-detail.vue
pages/user-center/integral-detail/integral-detail.vue
+55
-50
user-center.vue
pages/user-center/user-center.vue
+8
-3
No files found.
components/auth/index.vue
View file @
3ca1cc97
...
@@ -19,23 +19,15 @@ export default {
...
@@ -19,23 +19,15 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
pageinfo
=
uni
.
getStorageSync
(
"basedata"
)
this
.
pageinfo
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
auth_page
:
{};
?
uni
.
getStorageSync
(
"basedata"
).
auth_page
:
{};
let
x
=
this
.
pageinfo
.
hotspot
;
let
x
=
this
.
pageinfo
.
hotspot
;
let
y
=
this
.
pageinfo
.
hotspot_cancel
;
let
y
=
this
.
pageinfo
.
hotspot_cancel
;
this
.
sureStyle
=
`height:
${
x
.
height
}
rpx;width:
${
x
.
width
}
rpx;left:
${
x
.
left
}
rpx;top:
${
x
.
top
}
rpx;`
;
this
.
sureStyle
=
`height:
${
x
.
height
}
rpx;width:
${
x
.
width
}
rpx;left:
${
x
.
left
}
rpx;top:
${
x
.
top
}
rpx;`
;
console
.
log
(
this
.
sureStyle
,
'this.sureStyle'
);
this
.
cancelStyle
=
`height:
${
y
.
height
}
rpx;width:
${
y
.
width
}
rpx;left:
${
y
.
left
}
rpx;top:
${
y
.
top
}
rpx;`
;
this
.
cancelStyle
=
`height:
${
y
.
height
}
rpx;width:
${
y
.
width
}
rpx;left:
${
y
.
left
}
rpx;top:
${
y
.
top
}
rpx;`
;
},
},
methods
:
{
methods
:
{
getUserInfo
(
e
)
{
getUserInfo
(
e
)
{
// if(e.mp.detail.userInfo){
var
that
=
this
;
// // TODO 实现用户登录
// uni.setStorageSync("userinfo", e.mp.detail.userInfo);
// this.$emit('changeuserinfo');
// }
var
that
=
this
;
uni
.
getProvider
({
uni
.
getProvider
({
service
:
'oauth'
,
service
:
'oauth'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -43,33 +35,21 @@ export default {
...
@@ -43,33 +35,21 @@ export default {
uni
.
login
({
uni
.
login
({
provider
:
'weixin'
,
provider
:
'weixin'
,
success
:
res
=>
{
success
:
res
=>
{
that
.
authorization
=
res
.
code
;
uni
.
getUserInfo
({
uni
.
getUserInfo
({
provider
:
'weixin'
,
provider
:
'weixin'
,
success
:
info
=>
{
success
:
info
=>
{
//这里请求接口
//这里请求接口
var
OpenId
=
'ow_7I5XC1-RGwwk8QANBmWKYKmOc'
let
obj
=
{
console
.
log
(
res
,
'请求222'
);
Source
:
1
,
console
.
log
(
info
,
'info'
);
OpenId
:
''
,
that
.
request2
(
Name
:
info
.
userInfo
.
nickName
,
{
Photo
:
info
.
userInfo
.
avatarUrl
,
url
:
'/api/AppletLogin/Login'
,
Moblie
:
''
,
data
:
{
SuperiorId
:
0
,
Source
:
1
,
code
:
res
.
code
OpenId
:
OpenId
,
};
Name
:
'^O^ 做个好梦^O^'
,
that
.
getCode
(
obj
);
Photo
:
'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLnsYM6ibJ4QzJqibNy4WudZy1HEhia3oIzXFhaGjUHZicDtNZeavGyxkP02ib2LVicpwDC4U7PZUZH6GuA/132'
,
Moblie
:
''
,
SuperiorId
:
0
}
},
res
=>
{
console
.
log
(
res
,
'登录了'
);
if
(
res
.
resultCode
==
1
){
uni
.
setStorageSync
(
"mall_UserInfo"
,
res
.
data
);
that
.
$emit
(
'changeuserinfo'
);
}
}
);
},
},
fail
:
()
=>
{
fail
:
()
=>
{
uni
.
showToast
({
title
:
'微信登录授权失败'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'微信登录授权失败'
,
icon
:
'none'
});
...
@@ -90,7 +70,55 @@ export default {
...
@@ -90,7 +70,55 @@ export default {
});
});
},
},
close
()
{
close
()
{
this
.
showDialog
=
false
;
this
.
$emit
(
'gbAuth'
);
},
//调用获取code
getCode
(
obj
)
{
var
that
=
this
;
uni
.
getUserInfo
({
provider
:
'weixin'
,
success
:
info
=>
{
//这里请求接口
var
OpenId
=
''
;
that
.
request2
(
{
url
:
'/api/mall/GetWeChatOpenId'
,
data
:
{
Code
:
obj
.
code
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
obj
.
OpenId
=
res
.
data
;
that
.
getLogin
(
obj
);
}
}
);
}
});
},
//登录
getLogin
(
obj
)
{
var
that
=
this
;
that
.
request2
(
{
url
:
'/api/AppletLogin/Login'
,
data
:
{
Source
:
1
,
OpenId
:
obj
.
OpenId
,
Name
:
obj
.
nickName
,
Photo
:
obj
.
avatarUrl
,
Moblie
:
''
,
SuperiorId
:
0
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
setStorageSync
(
'mall_UserInfo'
,
res
.
data
);
that
.
$emit
(
'changeuserinfo'
);
}
}
);
}
}
}
}
};
};
...
...
components/goods/goodsaction.vue
View file @
3ca1cc97
...
@@ -106,17 +106,14 @@ export default {
...
@@ -106,17 +106,14 @@ export default {
},
},
setFavorite
()
{
setFavorite
()
{
let
h
=
this
.
apiheader
()
let
h
=
this
.
apiheader
()
this
.
request
(
this
.
request2
(
{
url
:
""
,
{
data
:
{
url
:
'/api/AppletUser/SetUserCollectionInfo'
,
r
:
this
.
favorStatus
data
:
{
?
"api/user/favorite-remove"
GoodsId
:
this
.
goodId
:
"api/user/favorite-add"
,
}
goods_id
:
this
.
goodId
,
},
},
header
:
h
},
(
res
)
=>
{
(
res
)
=>
{
this
.
favorStatus
=
!
this
.
favorStatus
;
this
.
favorStatus
=
!
this
.
favorStatus
;
}
}
...
...
components/userbox/index.vue
View file @
3ca1cc97
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
nickName
:
"未登录"
,
nickName
:
"未登录"
,
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
},
},
methods
:
{
methods
:
{
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
this
.
showAuth
=
false
this
.
showAuth
=
false
}
}
}
}
...
...
pages/balance/balance.vue
View file @
3ca1cc97
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</view>
</view>
<
!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
--
>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth
>
<view
class=
"loading"
v-if=
"load"
>
<view
class=
"loading"
v-if=
"load"
>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
});
});
},
},
onLoad
(){
onLoad
(){
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
nickName
:
"未登录"
,
nickName
:
"未登录"
,
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
},
},
methods
:
{
methods
:
{
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
this
.
showAuth
=
false
this
.
showAuth
=
false
},
},
balancedata
(){
balancedata
(){
...
...
pages/coupon/index/index.vue
View file @
3ca1cc97
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
data
:
this
.
msg
data
:
this
.
msg
},
},
res
=>
{
res
=>
{
uni
.
hideNavigationBarLoading
();
if
(
res
.
resultCode
==
1
){
if
(
res
.
resultCode
==
1
){
this
.
loading
=
false
;
this
.
loading
=
false
;
...
...
pages/favorite/favorite.vue
View file @
3ca1cc97
<
template
>
<
template
>
<view
class=
"favoriteStyle"
:style=
"
{'height':contentHeight}" v-if="!isloading">
<view
class=
"favoriteStyle"
:style=
"
{'height':contentHeight}" v-if="!isloading">
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
<template>
<template
>
<view
v-show=
"current==
0"
style=
"
<view
v-if=
"current==0 && goodslist.length>
0"
style=
"
height: calc(100vh - 50px);
height: calc(100vh - 50px);
width: calc(100vw - 20px);
width: calc(100vw - 20px);
margin-left: 10px;
margin-left: 10px;
...
@@ -14,26 +14,27 @@
...
@@ -14,26 +14,27 @@
:scroll-y=
"true"
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%; padding-bottom: 0px;"
style=
"height: 100%; padding-bottom: 0px;"
>
>
<view
class=
"u-good-list"
>
<view
class=
"u-good-list"
>
<u-row
gutter=
"20"
>
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in goodslist"
:key=
"ci"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in goodslist"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx
.goods.page_url
)"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
>
<view
class=
"good-img"
>
<image
<image
mode=
"aspectFit"
mode=
"aspectFit"
:src=
"cx.
goods.cover_pic
"
:src=
"cx.
CoverImage
"
style=
"width: 100%; height: 100%;"
style=
"width: 100%; height: 100%;"
/>
/>
</view>
</view>
<view
class=
"good-name"
>
{{
cx
.
goods
.
n
ame
}}
</view>
<view
class=
"good-name"
>
{{
cx
.
N
ame
}}
</view>
<view
class=
"good-info"
>
<view
class=
"good-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
<view
class=
"price"
:style=
"
{ color: mainColor }">
¥
{{
cx
.
goods
.
price_content
cx
.
SellingPrice
}}
</view>
}}
</view>
<view
class=
"sell"
>
{{
cx
.
goods
.
sales
}}
</view>
<view
class=
"sell"
>
已售
{{
cx
.
SalesNum
}}
件
</view>
<view
class=
"cart"
>
<view
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
/>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
/>
</view>
</view>
</view>
</view>
...
@@ -41,6 +42,14 @@
...
@@ -41,6 +42,14 @@
</u-col>
</u-col>
</u-row>
</u-row>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</scroll-view>
<u-empty
v-if=
"current==0&& goodslist.length==0"
text=
"没有任何收藏商品哦~"
mode=
"favor"
></u-empty>
<u-empty
v-if=
"current==0&& goodslist.length==0"
text=
"没有任何收藏商品哦~"
mode=
"favor"
></u-empty>
</view>
</view>
...
@@ -55,12 +64,14 @@
...
@@ -55,12 +64,14 @@
</view>
</view>
</
template
>
</
template
>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<!-- <auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> -->
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
auth
from
"../../components/auth/index.vue"
;
import
auth
from
"../../components/auth/index.vue"
;
import
goodSku
from
'../../components/goods/goodsku.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -73,14 +84,28 @@
...
@@ -73,14 +84,28 @@
{
name
:
'商品'
},
{
name
:
'商品'
},
{
name
:
'专题'
},
{
name
:
'专题'
},
],
],
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
Name
:
''
},
sku
:
{},
showSku
:
false
,
goodslist
:[],
goodslist
:[],
topiclist
:[],
topiclist
:[],
current
:
0
current
:
0
,
page_count
:
1
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多优惠券了"
,
},
}
}
},
},
components
:{
components
:{
auth
,
auth
,
goodSku
,
},
},
created
(){
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
...
@@ -103,7 +128,7 @@
...
@@ -103,7 +128,7 @@
});
});
},
},
onLoad
(){
onLoad
(){
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
nickName
:
"未登录"
,
nickName
:
"未登录"
,
...
@@ -114,66 +139,75 @@
...
@@ -114,66 +139,75 @@
},
},
methods
:
{
methods
:
{
// 购物车
showSkuHandler
(
g
)
{
g
.
id
=
g
.
Id
console
.
log
(
'g'
,
g
);
this
.
sku
=
g
;
this
.
showSku
=
true
;
},
change
(
index
)
{
change
(
index
)
{
this
.
current
=
index
;
this
.
current
=
index
;
if
(
index
==
1
){
if
(
index
==
1
){
// this.gettopic()
}
else
{
this
.
gettopic
()
}
else
if
(
index
==
0
){
this
.
msg
.
pageIndex
=
1
;
this
.
goodslist
=
[];
this
.
init
()
this
.
init
()
}
}
},
},
init
(){
init
(){
this
.
loading
=
false
;
uni
.
showNavigationBarLoading
();
uni
.
showLoading
({
let
h
=
this
.
apiheader
();
title
:
'加载中'
this
.
request
(
});
{
this
.
request2
(
url
:
""
,
{
header
:
h
,
url
:
'/api/AppletUser/GetUserCollectionPageList'
,
data
:
{
data
:
this
.
msg
r
:
"api/user/my-favorite-goods"
,
},
},
res
=>
{
uni
.
hideLoading
();
},
if
(
res
.
resultCode
==
1
){
(
res
)
=>
{
this
.
goodslist
=
this
.
goodslist
.
concat
(
res
.
data
.
pageData
);
uni
.
hideNavigationBarLoading
()
this
.
page_count
=
res
.
data
.
pageCount
;
this
.
isloading
=
false
;
if
(
this
.
page_count
==
1
)
{
this
.
goodslist
=
res
.
data
.
list
this
.
status
=
"nomore"
;
}
}
}
}
);
);
},
},
gettopic
(){
//专题数据
gettopic
(){
//专题数据
this
.
loading
=
false
;
uni
.
showLoading
({
uni
.
showNavigationBarLoading
();
title
:
'加载中'
let
h
=
this
.
apiheader
();
});
setTimeout
(()
=>
{
uni
.
hideLoading
();
},
1000
)
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/user/my-favorite-topic"
,
},
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
()
this
.
isloading
=
false
;
this
.
topiclist
=
res
.
data
.
list
}
);
},
},
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
this
.
showAuth
=
false
this
.
showAuth
=
false
},
},
clickHandler
(
url
)
{
clickHandler
(
cx
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
,
url
:
'/pages/goods/goods?GoodsId='
+
cx
.
Id
,
});
});
},
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
}
}
}
}
</
script
>
</
script
>
...
...
pages/foot/index/index.vue
View file @
3ca1cc97
...
@@ -40,39 +40,42 @@
...
@@ -40,39 +40,42 @@
:enable-flex=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
:style=
"
{ height: '100%' }">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"display: flex;flex-direction: column;align-items: center;
width: 100%;
"
>
<
view
v-for=
"(item, index) in g"
:key=
"index"
style=
"width: 100%;margin-bottom: 10rpx;"
>
<
!--
<view
v-for=
"(cx, ci) in g"
:key=
"ci"
style=
"width: 100%;margin-bottom: 10rpx;"
>
--
>
<Text
style=
'padding-left: 2.5%;margin: 20rpx 0;color: #c8c9cc;'
>
{{
item
.
date
}}
</Text>
<view
class=
"contentBox"
>
<view
class=
"contentBox"
>
<view
class=
"cBox_item"
v-for=
"(cx, ci) in item.goods"
:key=
"ci"
>
<view
class=
"cBox_item"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good-img"
@
click=
"clickHandler(cx.goods_id)"
>
<view
class=
"good-img"
@
click=
"clickHandler(cx.Id)"
>
<image
:src=
"cx.goodsWarehouse.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<image
:src=
"cx.GoodsImgPath"
style=
"width: 100%; height: 100%;"
/>
<image
src=
"../../../static/images/icon/plugins-out.png"
v-if=
"item.goods_num==0"
<!-- 如果此商品售完 -->
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
<!--
<image
src=
"../../../static/images/icon/plugins-out.png"
v-if=
"item.goods_num==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
-->
</view>
</view>
<view
class=
"good-info"
>
<view
class=
"good-info"
>
<Text
class=
'good-name'
@
click=
"clickHandler(cx.
goods_id)"
>
{{
cx
.
goodsWarehouse
.
n
ame
}}
</Text>
<Text
class=
'good-name'
@
click=
"clickHandler(cx.
Id)"
>
{{
cx
.
GoodsN
ame
}}
</Text>
<view
style=
"display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
<Text
:style=
"
{'color':mainColor}">¥
{{
cx
.
p
rice
}}
</Text>
<Text
:style=
"
{'color':mainColor}">¥
{{
cx
.
P
rice
}}
</Text>
<u-icon
name=
"ellipsis"
color=
"#c8c9cc"
size=
"40"
@
click=
'operation(cx,index,ci)'
></u-icon>
<u-icon
name=
"ellipsis"
color=
"#c8c9cc"
size=
"40"
@
click
.
stop
=
'operation(cx,index,ci)'
></u-icon>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<
/view
>
<
!--
</view>
--
>
</view>
</view>
<u-divider
contentPosition=
"center"
<u-loadmore
v-if=
"isover"
:status=
"status"
:margin-top=
"20"
:load-text=
"loadText"
:margin-bottom=
"20"
:font-size=
"24"
bg-color=
'#f3f4f6'
:margin-top=
"20"
>
没有更多足迹了
</u-divider>
:margin-bottom=
"20"
</scroll-view>
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
</view>
<
!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
--
>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth
>
<view
class=
"loading"
v-show=
"loading"
>
<view
class=
"loading"
v-show=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
...
@@ -119,6 +122,7 @@
...
@@ -119,6 +122,7 @@
:show-title=
"false"
:show-title=
"false"
@
confirm=
"confirm"
@
confirm=
"confirm"
></u-modal>
></u-modal>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
...
@@ -160,10 +164,16 @@
...
@@ -160,10 +164,16 @@
u
:{},
u
:{},
msg
:{
msg
:{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
1
5
,
pageSize
:
1
8
,
StartTime
:
''
,
StartTime
:
''
,
EndTime
:
''
,
EndTime
:
''
,
},
},
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多足迹了"
,
},
}
}
},
},
components
:{
components
:{
...
@@ -192,7 +202,7 @@
...
@@ -192,7 +202,7 @@
});
});
},
},
onLoad
(){
onLoad
(){
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
nickName
:
"未登录"
,
nickName
:
"未登录"
,
...
@@ -203,74 +213,43 @@
...
@@ -203,74 +213,43 @@
},
},
methods
:
{
methods
:
{
init
(){
init
(){
this
.
loading
=
true
this
.
isover
=
false
;
uni
.
showLoading
({
this
.
loading2
=
true
;
title
:
'加载中'
let
h
=
this
.
apiheader
()
});
this
.
msg
.
StartTime
=
this
.
start_time
;
this
.
msg
.
StartTime
=
this
.
start_time
;
this
.
msg
.
EndTime
=
this
.
end_time
;
this
.
msg
.
EndTime
=
this
.
end_time
;
console
.
log
(
"this.msg"
,
this
.
msg
)
console
.
log
(
"this.msg"
,
this
.
msg
)
this
.
request2
(
this
.
request2
(
{
{
url
:
'/api/AppletUser/GetUser
ShippingAddress
List'
,
url
:
'/api/AppletUser/GetUser
FootMarkPage
List'
,
data
:
this
.
msg
data
:
this
.
msg
},
},
res
=>
{
res
=>
{
uni
.
hideNavigationBarLoading
();
uni
.
hideLoading
();
console
.
log
(
"res"
,
res
);
if
(
res
.
resultCode
==
1
){
if
(
res
.
resultCode
==
1
){
if
(
res
.
data
.
pageData
.
length
>
0
){
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
this
.
isover
=
true
;
}
}
}
this
.
isloading
=
false
;
this
.
list
=
res
.
data
.
list
;
}
}
}
}
);
);
// this.request(
// {
// url: "",
// header:h,
// data: {
// r: "api/footprint/footprint",
// start_time: this.start_time,
// end_time: this.end_time,
// page: this.page,
// }
// },
// res => {
// if(res.list.length>0){
// this.g = this.g.concat(res.list);
// this.page_count = res.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// }
// this.loading = false;
// this.loading2 = false;
// }
// );
},
},
lower
(
e
)
{
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
if
(
!
this
.
loading2
)
{
this
.
status
=
"loading"
;
this
.
msg
.
pageIndex
++
;
this
.
init
();
this
.
init
();
}
else
{
}
this
.
status
=
"nomore"
;
}
else
{
}
this
.
isover
=
true
;
}
},
},
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
this
.
showAuth
=
false
this
.
showAuth
=
false
},
},
change
(
index
)
{
change
(
index
)
{
...
@@ -337,7 +316,7 @@
...
@@ -337,7 +316,7 @@
},
},
clickHandler
(
id
)
{
clickHandler
(
id
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/goods/goods?
i
d='
+
id
,
url
:
'/pages/goods/goods?
GoodsI
d='
+
id
,
});
});
},
},
Collection
(){
Collection
(){
...
...
pages/goods/goods.vue
View file @
3ca1cc97
...
@@ -307,6 +307,7 @@ export default {
...
@@ -307,6 +307,7 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
initComments
();
this
.
initComments
();
this
.
initRecommend
();
this
.
initRecommend
();
this
.
setFootMarkInfo
(
res
.
data
.
goods
.
id
)
}
else
{
}
else
{
this
.
isExsitGoods
=
false
;
this
.
isExsitGoods
=
false
;
}
}
...
@@ -364,6 +365,19 @@ export default {
...
@@ -364,6 +365,19 @@ export default {
}
}
);
);
},
},
setFootMarkInfo
(
id
){
this
.
request2
(
{
url
:
"/api/AppletUser/SetUserFootMarkInfo"
,
data
:
{
GoodsId
:
id
,
},
},
(
res
)
=>
{
}
);
},
joinCar
()
{
joinCar
()
{
this
.
showSku
=
true
;
this
.
showSku
=
true
;
this
.
ot
=
0
;
this
.
ot
=
0
;
...
...
pages/share/index/index.vue
View file @
3ca1cc97
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
</view>
</view>
<
!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
--
>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth
>
</view>
</view>
</
template
>
</
template
>
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
sharemenus
:{},
sharemenus
:{},
orderdata
:{},
orderdata
:{},
bg_img
:
''
,
bg_img
:
''
,
showAuth
:
false
}
}
},
},
created
(){
created
(){
...
@@ -142,7 +143,7 @@
...
@@ -142,7 +143,7 @@
});
});
},
},
onLoad
(){
onLoad
(){
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
nickName
:
"未登录"
,
nickName
:
"未登录"
,
...
@@ -153,7 +154,7 @@
...
@@ -153,7 +154,7 @@
},
},
methods
:
{
methods
:
{
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"
useri
nfo"
);
this
.
u
=
uni
.
getStorageSync
(
"
mall_UserI
nfo"
);
this
.
showAuth
=
false
this
.
showAuth
=
false
},
},
init
(){
init
(){
...
...
pages/user-center/integral-detail/integral-detail.vue
View file @
3ca1cc97
...
@@ -23,24 +23,24 @@
...
@@ -23,24 +23,24 @@
:scroll-y=
"true"
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }"
:style=
"
{ height: '100%' }"
>
>
<view
class=
"interDList"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"interDList"
v-for=
"(x, i) in g"
:key=
"i"
>
<Text>
{{
x
.
desc
}}
</Text>
<Text>
{{
x
.
Description
}}
</Text>
<view
style=
"display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;"
>
<view
style=
"display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;"
>
<Text
:style=
"
{color:x.
type==1?mainColor:secondary}">
{{
x
.
type
==
1
?
'+'
:
'-'
}}{{
x
.
i
ntegral
}}
积分
</Text>
<Text
:style=
"
{color:x.
Type==1?mainColor:secondary}">
{{
x
.
Type
==
1
?
'+'
:
'-'
}}{{
x
.
I
ntegral
}}
积分
</Text>
<Text
style=
'font-size: 12px; color: #B5B5B5;'
>
时间:
{{
x
.
created_at
}}
</Text>
<Text
style=
'font-size: 12px; color: #B5B5B5;'
>
时间:
{{
x
.
CreateDate
}}
</Text>
</view>
</view>
</view>
</view>
<u-divider
<u-loadmore
contentPosition=
"center
"
:status=
"status
"
v-if=
"isover
"
:load-text=
"loadText
"
:margin-top=
"20
"
:font-size=
"24
"
:margin-bottom
=
"20"
:margin-top
=
"20"
bg-color=
"#f3f4f6
"
:margin-bottom=
"20
"
>
没有更多卡券了
</u-divider
bg-color=
"#f3f4f6"
>
/
>
</scroll-view>
</scroll-view>
</view>
</view>
...
@@ -71,6 +71,12 @@ export default {
...
@@ -71,6 +71,12 @@ export default {
{
name
:
"支出"
},
{
name
:
"支出"
},
],
],
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
Type
:
0
},
mainColor
:
""
,
mainColor
:
""
,
secondary
:
''
,
secondary
:
''
,
contentHeight
:
0
,
contentHeight
:
0
,
...
@@ -79,6 +85,12 @@ export default {
...
@@ -79,6 +85,12 @@ export default {
g
:
[],
g
:
[],
loading
:
false
,
loading
:
false
,
isover
:
false
,
isover
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多优惠券了"
,
},
};
};
},
},
created
()
{
created
()
{
...
@@ -100,57 +112,50 @@ export default {
...
@@ -100,57 +112,50 @@ export default {
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
title
:
this
.
pageTitle
,
});
});
this
.
loading
=
true
;
this
.
init
();
},
},
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
// this.current = option.status;
this
.
loading
=
true
;
this
.
init
();
},
methods
:
{
methods
:
{
change
(
index
)
{
change
(
index
)
{
this
.
current
=
index
;
this
.
current
=
index
;
this
.
page
=
1
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
g
=
[];
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
init
();
this
.
init
();
},
},
init
()
{
init
()
{
this
.
isover
=
false
;
let
h
=
this
.
apiheader
();
this
.
msg
.
Type
=
this
.
current
+
1
this
.
request
(
this
.
request2
(
{
{
url
:
""
,
url
:
'/api/AppletUser/GetMemberIntegralPageList'
,
header
:
h
,
data
:
this
.
msg
data
:
{
},
r
:
"api/integral-log/index"
,
res
=>
{
type
:
this
.
current
+
1
,
if
(
res
.
resultCode
==
1
){
},
this
.
loading
=
false
;
},
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
(
res
)
=>
{
this
.
page_count
=
res
.
data
.
pageCount
;
this
.
loading
=
false
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
if
(
res
.
data
.
list
.
length
>
0
){
}
this
.
g
=
res
.
data
.
list
;
}
}
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
}
}
);
);
},
},
lower
(
e
)
{
lower
(
e
)
{
if
(
this
.
page
<
this
.
page_count
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
page
++
;
this
.
msg
.
pageIndex
++
;
this
.
init
();
this
.
status
=
"loading"
;
}
else
{
this
.
init
();
this
.
isover
=
true
;
}
else
{
}
this
.
status
=
"nomore"
;
}
},
},
},
},
};
};
...
...
pages/user-center/user-center.vue
View file @
3ca1cc97
...
@@ -92,9 +92,7 @@
...
@@ -92,9 +92,7 @@
<Text
style=
"margin-top: 10rpx;"
>
{{
meueData
.
user_center
.
copyright
.
description
}}
</Text>
<Text
style=
"margin-top: 10rpx;"
>
{{
meueData
.
user_center
.
copyright
.
description
}}
</Text>
</view>
</view>
</view>
</view>
<!-- v-if="showAuth" -->
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
<tabbars></tabbars>
<tabbars></tabbars>
</view>
</view>
</
template
>
</
template
>
...
@@ -159,6 +157,9 @@ export default {
...
@@ -159,6 +157,9 @@ export default {
});
});
this
.
userinfo
();
this
.
userinfo
();
},
},
onShow
()
{
this
.
userinfo
();
},
methods
:
{
methods
:
{
goHome
()
{
goHome
()
{
uni
.
redirectTo
({
url
:
'/pages/index/main'
});
uni
.
redirectTo
({
url
:
'/pages/index/main'
});
...
@@ -193,6 +194,10 @@ export default {
...
@@ -193,6 +194,10 @@ export default {
if
((
name
&&
name
.
nickname
==
''
)
||!
name
||
!
name
.
nickname
)
{
if
((
name
&&
name
.
nickname
==
''
)
||!
name
||
!
name
.
nickname
)
{
this
.
showAuth
=
true
;
this
.
showAuth
=
true
;
}
}
},
//关闭登录窗口
gbAuth
(){
this
.
showAuth
=
false
;
}
}
}
}
};
};
...
...
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