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