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
a52407a0
Commit
a52407a0
authored
Jun 28, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5a4e35a1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
217 additions
and
66 deletions
+217
-66
pages.json
pages.json
+14
-14
list.vue
pages/coupon/list/list.vue
+11
-1
draw.vue
pages/goods/draw.vue
+1
-1
goods.vue
pages/goods/goods.vue
+2
-2
index.vue
pages/index/index.vue
+48
-12
index.vue
pages/live/index.vue
+140
-35
share-qrcode.vue
pages/share-qrcode/share-qrcode.vue
+1
-1
No files found.
pages.json
View file @
a52407a0
...
@@ -74,20 +74,20 @@
...
@@ -74,20 +74,20 @@
}
}
]
]
},
},
{
//
{
"root"
:
"pages/live"
,
//
"root"
:
"pages/live"
,
"plugins"
:
{
//
"plugins"
:
{
"live-player-plugin"
:
{
//
"live-player-plugin"
:
{
"version"
:
"1.0.18"
,
//
"version"
:
"1.0.18"
,
"provider"
:
"wx2b03c6e691cd7370"
//
"provider"
:
"wx2b03c6e691cd7370"
}
//
}
},
//
},
"pages"
:
[
//
"pages"
:
[
{
//
{
"path"
:
"index"
//
"path"
:
"index"
}
//
}
]
//
]
},
//
},
{
{
"root"
:
"pages/user-center"
,
"root"
:
"pages/user-center"
,
"pages"
:
[{
"pages"
:
[{
...
...
pages/coupon/list/list.vue
View file @
a52407a0
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
: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=
"couponlist"
>
<view
class=
"couponlist"
>
...
@@ -139,6 +139,16 @@ export default {
...
@@ -139,6 +139,16 @@ export default {
}
}
);
);
},
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
goUrl
(
item
){
goUrl
(
item
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/coupon/details/details?item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&type=2'
url
:
"/pages/coupon/details/details?item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&type=2'
...
...
pages/goods/draw.vue
View file @
a52407a0
...
@@ -302,7 +302,7 @@ export default {
...
@@ -302,7 +302,7 @@ export default {
url
:
"/api/Mall/GetGoosPoster"
,
url
:
"/api/Mall/GetGoosPoster"
,
data
:
{
data
:
{
goodsId
:
this
.
id
,
goodsId
:
this
.
id
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&
p
id="
+
u
.
UserId
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&
user_
id="
+
u
.
UserId
,
},
},
},
},
(
res
)
=>
{
(
res
)
=>
{
...
...
pages/goods/goods.vue
View file @
a52407a0
...
@@ -292,8 +292,8 @@ export default {
...
@@ -292,8 +292,8 @@ export default {
}
else
{
}
else
{
this
.
id
=
option
.
GoodsId
?
option
.
GoodsId
:
29
;
//40887 59512 46942
this
.
id
=
option
.
GoodsId
?
option
.
GoodsId
:
29
;
//40887 59512 46942
}
}
if
(
option
&&
option
.
p
id
){
if
(
option
&&
option
.
user_
id
){
uni
.
setStorageSync
(
"pid"
,
{
pid
:
option
.
p
id
});
uni
.
setStorageSync
(
"pid"
,
{
pid
:
option
.
user_
id
});
}
}
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
...
...
pages/index/index.vue
View file @
a52407a0
...
@@ -66,7 +66,10 @@
...
@@ -66,7 +66,10 @@
</
template
>
</
template
>
</view>
</view>
</template>
</template>
<tabbar></tabbar>
<view
v-if=
"showtabs==true"
>
<tabbar></tabbar>
</view>
<view
class=
"tips_t"
v-if=
"add_show==1&& JSON.stringify(setting) != '{}' "
:style=
"{
<view
class=
"tips_t"
v-if=
"add_show==1&& JSON.stringify(setting) != '{}' "
:style=
"{
'border-radius':setting.add_app_bg_radius+'rpx',
'border-radius':setting.add_app_bg_radius+'rpx',
'opacity':setting.add_app_bg_transparency/100
'opacity':setting.add_app_bg_transparency/100
...
@@ -110,6 +113,7 @@ export default {
...
@@ -110,6 +113,7 @@ export default {
pageId
:
0
,
pageId
:
0
,
setting
:{},
setting
:{},
add_show
:
1
,
add_show
:
1
,
showtabs
:
true
,
};
};
},
},
components
:
{
components
:
{
...
@@ -133,19 +137,35 @@ export default {
...
@@ -133,19 +137,35 @@ export default {
quicknav
quicknav
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
// let options= {//测试
// scene:'share',
// user_id:19992,
// params:{"id":106118,"path":"/pages/goods/goods","user_id":19992}
// }
console
.
log
(
options
,
'option'
);
console
.
log
(
options
,
'option'
);
if
(
options
&&
options
.
page_id
){
let
c
=
this
.
$uiConfig
.
is_bang
?
78
:
50
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
if
(
options
&&
options
.
page_id
){
this
.
pageId
=
options
.
page_id
this
.
pageId
=
options
.
page_id
this
.
showtabs
=
false
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
();
}
}
if
(
options
&&
options
.
user_id
){
uni
.
setStorageSync
(
"pid"
,
{
pid
:
options
.
user_id
});
}
if
(
options
&&
options
.
pid
){
if
(
options
&&
options
.
scene
){
//兼容之前小程序的调转
uni
.
setStorageSync
(
"pid"
,
{
pid
:
options
.
pid
});
if
(
options
.
scene
==
'share'
&&
options
.
params
){
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
options
.
params
.
path
+
'?id='
+
options
.
params
.
id
,
});
},
500
)
}
}
}
let
c
=
this
.
$uiConfig
.
is_bang
?
78
:
50
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
this
.
init
();
this
.
init
();
let
set
=
uni
.
getStorageSync
(
"basedata"
)?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:{};
let
set
=
uni
.
getStorageSync
(
"basedata"
)?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:{};
if
(
!
uni
.
getStorageSync
(
"add_top_app"
)){
if
(
!
uni
.
getStorageSync
(
"add_top_app"
)){
...
@@ -157,12 +177,21 @@ export default {
...
@@ -157,12 +177,21 @@ export default {
console
.
log
(
uni
.
getStorageSync
(
"basedata"
))
console
.
log
(
uni
.
getStorageSync
(
"basedata"
))
uni
.
showNavigationBarLoading
();
uni
.
showNavigationBarLoading
();
},
},
onShareAppMessage
(
res
)
{
return
{
title
:
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
path
:
"/pages/index/index?user_id="
+
uni
.
getStorageSync
(
'mall_UserInfo'
)
?
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
:
''
,
imageUrl
:
this
.
setting
.
share_pic
?
this
.
setting
.
share_pic
:
''
,
};
},
onShow
()
{
onShow
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
hideNavigationBarLoading
();
uni
.
hideNavigationBarLoading
();
},
500
);
},
500
);
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
init
()
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
request2
(
this
.
request2
(
...
@@ -177,9 +206,16 @@ export default {
...
@@ -177,9 +206,16 @@ export default {
this
.
myPageData
=
res
.
data
;
this
.
myPageData
=
res
.
data
;
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
if
(
res
.
data
.
home_pages
.
title
!=
""
)
{
if
(
res
.
data
.
home_pages
.
title
!=
""
)
{
uni
.
setNavigationBarTitle
({
if
(
this
.
pageId
==
0
){
title
:
res
.
data
.
home_pages
.
title
,
uni
.
setNavigationBarTitle
({
});
title
:
res
.
data
.
home_pages
.
title
,
});
}
else
{
uni
.
setNavigationBarTitle
({
title
:
res
.
data
.
home_pages
.
navs
[
0
].
name
,
});
}
uni
.
setNavigationBarColor
({
uni
.
setNavigationBarColor
({
//字体颜色
//字体颜色
frontColor
:
res
.
data
.
navbar
.
top_text_color
,
frontColor
:
res
.
data
.
navbar
.
top_text_color
,
...
...
pages/live/index.vue
View file @
a52407a0
<
template
>
<
template
>
<scroll-view
<view
class=
"liveStyle"
:style=
"
{ height: contentHeight }">
:scroll-y=
"true"
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关直播列表"
mode=
"coupon"
></u-empty>
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
<template
:enable-flex=
"true"
v-if=
"g.length > 0"
style=
"height: 100%; padding: 10px; padding-bottom: 0px;"
style=
"
>
height: calc(100vh -50px);
width: calc(100vw -20px);
</scroll-view>
overflow: hidden;
margin-left: 10px;
padding-top: 10px;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' ,}"
>
<view
class=
"u-good-list"
>
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_img"
style=
"width: 100%; height: 100%;"
/>
</view>
<view
class=
"good-name"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-info"
>
<u-avatar
:src=
"cx.anchor_img"
size=
"80"
></u-avatar>
<Text
style=
"font-size: 12px;"
>
{{
cx
.
anchor_name
}}
</Text>
</view>
</view>
</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>
</
template
>
<tabbars></tabbars>
</view>
</template>
</template>
<
script
>
<
script
>
import
tabbars
from
'@/components/tabbar/index'
;
export
default
{
export
default
{
components
:
{
tabbars
},
data
()
{
data
()
{
return
{
return
{
mc
:
""
,
mc
:
""
,
secondary
:
""
,
secondary
:
""
,
pageTitle
:
"直播列表"
,
pageTitle
:
"直播列表"
,
page
:
1
,
contentHeight
:
0
,
list
:
[],
g
:[],
pageCount
:
1
,
msg
:{
loading
:
true
,
pageIndex
:
1
,
pageSize
:
10
,
},
page_count
:
1
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
uni
.
showNavigationBarLoading
();
this
.
init
();
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
-
40
)
+
"px"
;
this
.
initPage
();
this
.
initPage
();
this
.
init
();
uni
.
showNavigationBarLoading
();
this
.
init
();
},
},
methods
:
{
methods
:
{
initPage
()
{
initPage
()
{
...
@@ -48,27 +107,73 @@ export default {
...
@@ -48,27 +107,73 @@ export default {
});
});
},
},
init
()
{
init
()
{
let
h
=
this
.
apiheader
();
uni
.
showLoading
({
if
(
page
<
pageCount
)
{
title
:
'加载中'
this
.
request
(
});
{
this
.
request2
(
url
:
""
,
{
header
:
h
,
url
:
'/api/AppletUser/GetLiveHouseList'
,
data
:
{
data
:
this
.
msg
r
:
"api/live/index"
,
},
page
:
this
.
page
,
res
=>
{
},
uni
.
hideLoading
();
},
uni
.
hideNavigationBarLoading
();
(
res
)
=>
{
if
(
res
.
resultCode
==
1
){
this
.
list
=
res
.
data
.
list
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
pageCount
=
1
;
this
.
page_count
=
res
.
data
.
pageCount
;
uni
.
hideNavigationBarLoading
();
if
(
this
.
page_count
==
1
)
{
}
this
.
status
=
"nomore"
;
);
}
}
}
}
);
},
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
},
},
};
};
</
script
>
</
script
>
<
style
></
style
>
<
style
>
.liveStyle
{
background
:
#f3f4f6
;
}
.liveStyle
.u-good-list
.good
{
background
:
#fff
;
border-radius
:
10px
;
overflow
:
hidden
;
margin-bottom
:
10px
;
}
.liveStyle
.u-good-list
.good
.good-img
{
width
:
calc
(
50vw
);
height
:
calc
(
50vw
);
display
:
block
;
}
.liveStyle
.u-good-list
.good
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
3px
;
font-size
:
13px
;
margin
:
7px
10px
;
height
:
36px
;
}
.liveStyle
.u-good-list
.good
.good-info
{
display
:
flex
;
margin
:
7px
10px
;
margin-top
:
0
;
align-items
:
flex-end
;
padding-bottom
:
5px
;
}
</
style
>
pages/share-qrcode/share-qrcode.vue
View file @
a52407a0
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
{
{
url
:
'/api/AppletUser/GetWeiXinQRCodeForApplet'
,
url
:
'/api/AppletUser/GetWeiXinQRCodeForApplet'
,
data
:
{
data
:
{
Path
:
'pages/index/index?
p
id='
+
that
.
UserInfo
.
UserId
,
Path
:
'pages/index/index?
user_
id='
+
that
.
UserInfo
.
UserId
,
With
:
that
.
qrcode
.
QrCodeSize
,
With
:
that
.
qrcode
.
QrCodeSize
,
}
}
},
},
...
...
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