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
c147fbe4
Commit
c147fbe4
authored
Aug 07, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
92922049
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
22 deletions
+50
-22
list.vue
components/goods/list.vue
+12
-6
cart.vue
pages/cart/cart.vue
+9
-2
goods.vue
pages/goods/goods.vue
+19
-13
index.vue
pages/index/index.vue
+10
-1
No files found.
components/goods/list.vue
View file @
c147fbe4
...
...
@@ -9,13 +9,19 @@
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<view
class=
"shipping"
v-if=
" (cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0)"
>
{{
cx
.
freeShippingName
!=
null
&&
cx
.
freeShippingName
!=
''
?
cx
.
freeShippingName
+
':'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
'满'
+
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
'满'
+
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name==1"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name==1"
>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</view>
<view
class=
"good-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
¥
{{
cx
.
price
}}
</view>
...
...
pages/cart/cart.vue
View file @
c147fbe4
...
...
@@ -39,7 +39,7 @@
<u-checkbox
v-model=
"c.checked"
shape=
"circle"
:active-color=
"mc"
>
{{
c
.
MallName
}}
</u-checkbox>
</u-checkbox-group>
</view>
<view
class=
"cartList_item"
v-for=
"(item, index) in c.GoodsList"
:key=
"index"
:name=
"item.GoodsName"
>
<view
class=
"cartList_item"
v-for=
"(item, index) in c.GoodsList"
:key=
"index"
:name=
"item.GoodsName"
@
click=
"goshoopDatiles(item)"
>
<view
style=
"width: 40px;text-align: center;"
v-if=
"item.GoodsStatus == 1 || editType == true"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
...
...
@@ -110,7 +110,7 @@
text-overflow: ellipsis;
margin-top: 2px;
"
@
click=
"goUrl(item.FreeShippingUrl)"
@
click
.
native
.
stop
=
"goUrl(item.FreeShippingUrl)"
v-if=
"item.FreeShippingName !=null && (item.FreeShippingFullMoneyPinkage>0 || item.FreeShippingFullNumPinkage>0)"
>
...
...
@@ -657,10 +657,17 @@ export default {
});
},
goUrl
(
url
)
{
console
.
log
(
url
)
uni
.
navigateTo
({
url
:
url
});
},
goshoopDatiles
(
item
){
//跳转商品详情
console
.
log
(
item
)
uni
.
navigateTo
({
url
:
"/pages/goods/goods?id="
+
item
.
GoodsId
,
});
}
}
};
</
script
>
...
...
pages/goods/goods.vue
View file @
c147fbe4
...
...
@@ -92,7 +92,7 @@
style=
"align-items: flex-start;"
>
<view
class=
"label"
>
活动
</view>
<view
class=
"label"
style=
"margin-top: 5px;"
>
活动
</view>
<view
class=
"content"
style=
"display: flex;flex-direction: column"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;margin-bottom: 5px;"
v-if=
"g.goods_marketing_award.integral.title != ''"
>
<u-tag
text=
"送积分"
type=
"error"
/>
...
...
@@ -106,22 +106,20 @@
g
.
goods_marketing_award
.
PresentFXGradeMsg
}}
</text>
</view>
<view
style=
"display: flex;flex-direction: row;align-items: center"
v-if=
" g.freeShippingName!=null && g.freeShippingName !='' &&(g.fullMoneyPinkage > 0 || g.fullNumPinkage>0)"
@
click=
"goUrl(g.FreeShippingUrl)"
>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;"
>
<Text
style=
"
font-size: 20rpx;
margin-right: 5rpx;
"
>
{{
g
.
freeShippingName
!=
null
?
g
.
freeShippingName
:
''
}}
<view
style=
"color: #FF4048;padding: 0 5px;; font-size: 24rpx;margin-top: 5px;"
@
click=
"goUrl(g.FreeShippingUrl)"
v-if=
" g.freeShippingName!=null && g.freeShippingName !='' &&(g.fullMoneyPinkage > 0 || g.fullNumPinkage>0)"
>
{{
g
.
freeShippingName
!=
null
?
g
.
freeShippingName
+
':'
:
''
}}
{{
g
.
fullMoneyPinkage
>
0
&&
g
.
fullNumPinkage
==
0
?
g
.
fullMoneyPinkage
+
'元包邮'
:
''
}}
{{
g
.
fullMoneyPinkage
==
0
&&
g
.
fullNumPinkage
>
0
?
g
.
fullNumPinkage
+
'件包邮'
:
''
}}
</Text>
</view>
<!--
<view
class=
"label"
style=
"color: #FF4048;"
>
{{
g
.
freeShippingName
}}
</view>
-->
<!--
<view
class=
"content"
v-if=
"g.fullMoneyPinkage==0 && g.fullNumPinkage>0"
>
{{
g
.
fullNumPinkage
}}
件包邮
</view>
<view
class=
"content"
v-if=
"g.fullMoneyPinkage>0 && g.fullNumPinkage==0"
>
满
{{
g
.
fullMoneyPinkage
}}
元包邮
</view>
-->
</view>
<!--
<view
style=
"margin-top: 5px;"
v-if=
"
g.goods_marketing_award.PresentFXGradeMsg == ''
&& g.goods_marketing_award.integral.title == '' &&
...
...
@@ -389,7 +387,7 @@ export default {
}
if
(
option
&&
option
.
user_id
)
{
uni
.
setStorageSync
(
"pid"
,
{
pid
:
option
.
user_id
});
this
.
getReceive
()
}
if
(
uni
.
getStorageSync
(
"AnchorName"
)){
//如果有主播名称了先清除
uni
.
removeStorageSync
(
'AnchorName'
);
...
...
@@ -422,6 +420,10 @@ export default {
})
},
onShareTimeline
(){
setTimeout
(()
=>
{
console
.
log
(
'分享调用'
)
this
.
getReceive
()
},
2500
)
let
uid
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
?
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
:
0
;
let
title
=
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
?
this
.
g
.
app_share_title
:
this
.
g
.
name
;
let
imageUrl
=
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
?
this
.
g
.
app_share_pic
:
this
.
g
.
pic_url
[
0
].
pic_url
;
...
...
@@ -433,6 +435,10 @@ export default {
}
},
onShareAppMessage
(
res
)
{
setTimeout
(()
=>
{
console
.
log
(
'分享调用'
)
this
.
getReceive
()
},
2500
)
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
return
{
...
...
pages/index/index.vue
View file @
c147fbe4
...
...
@@ -164,7 +164,7 @@ export default {
}
if
(
options
&&
options
.
user_id
){
uni
.
setStorageSync
(
"pid"
,
{
pid
:
options
.
user_id
});
this
.
getReceive
()
}
if
(
options
&&
options
.
scene
){
//兼容之前小程序的调转
...
...
@@ -189,6 +189,10 @@ export default {
uni
.
showNavigationBarLoading
();
},
onShareTimeline
(){
setTimeout
(()
=>
{
console
.
log
(
'分享调用'
)
this
.
getReceive
()
},
2500
)
let
uid
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
?
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
:
0
;
console
.
log
(
uid
)
return
{
...
...
@@ -198,12 +202,17 @@ export default {
}
},
onShareAppMessage
(
res
)
{
setTimeout
(()
=>
{
console
.
log
(
'分享调用'
)
this
.
getReceive
()
},
2500
)
let
uid
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
?
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
:
0
return
{
title
:
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
path
:
"/pages/index/index?user_id="
+
uid
,
imageUrl
:
this
.
setting
.
share_pic
?
this
.
setting
.
share_pic
:
''
,
};
},
onShow
()
{
setTimeout
(()
=>
{
...
...
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