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
f1f1d62b
Commit
f1f1d62b
authored
Aug 18, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
9ac306ff
7c808335
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2162 additions
and
731 deletions
+2162
-731
index.vue
components/pingtuan/index.vue
+98
-0
style1.vue
components/pingtuan/style1.vue
+184
-0
style2.vue
components/pingtuan/style2.vue
+202
-0
style3.vue
components/pingtuan/style3.vue
+208
-0
style4.vue
components/pingtuan/style4.vue
+182
-0
style5.vue
components/pingtuan/style5.vue
+196
-0
style6.vue
components/pingtuan/style6.vue
+169
-0
index.vue
components/quicknav/index.vue
+18
-20
index.vue
components/search/index.vue
+0
-1
index.vue
components/tabbar/index.vue
+24
-10
goods.vue
pages/goods/goods.vue
+790
-689
index.vue
pages/index/index.vue
+91
-11
tuangood.vue
pages/pintuan/tuangood.vue
+0
-0
No files found.
components/pingtuan/index.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<view
class=
"goods-box"
>
<view>
<!-- 只是商品 -->
<template>
<!--一行一个-->
<style
1
v-if=
"goods.listStyle == 1"
:goods-info=
"goods"
:good-list=
"currentList"
></style1>
<!--一行两个-->
<style
2
v-if=
"goods.listStyle == 2"
:goods-info=
"goods"
:good-list=
"currentList"
></style2>
<!--一行三个-->
<style
3
v-if=
"goods.listStyle == 3"
:goods-info=
"goods"
:good-list=
"currentList"
></style3>
<!--左右滚动-->
<style
5
v-if=
"goods.listStyle == 0"
:goods-info=
"goods"
:good-list=
"currentList"
></style5>
<!--列表模式-->
<style
6
v-if=
"goods.listStyle == -1"
:goods-info=
"goods"
:good-list=
"currentList"
></style6>
</
template
>
</view>
</view>
</template>
<
script
>
import
style1
from
'./style1'
;
import
style2
from
'./style2'
;
import
style3
from
'./style3'
;
import
style4
from
'./style4'
;
import
style5
from
'./style5'
;
import
style6
from
'./style6'
;
import
sidebar
from
'../sidebar/index'
;
export
default
{
props
:
[
'goods'
],
components
:
{
style1
,
style2
,
style3
,
style4
,
style5
,
style6
,
sidebar
},
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
currentList
:
[]
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
this
.
goods
.
showCat
)
{
this
.
currentList
=
this
.
goods
.
catList
[
0
].
goodsList
;
}
else
{
this
.
currentList
=
this
.
goods
.
list
;
}
},
methods
:
{
tabChangeHandler
(
i
)
{
this
.
currentList
=
this
.
goods
.
catList
[
i
].
goodsList
;
this
.
activeKey
=
i
;
}
}
};
</
script
>
<
style
>
.style4View
{
display
:
inline-block
;
width
:
100%
;
padding-left
:
80px
;
box-sizing
:
border-box
;
}
.goods-box
{
/* margin: 20rpx 0; */
}
.goods-box
.tips
{
z-index
:
50
!important
;
}
.goods-box.flex
{
display
:
flex
;
}
.goods-box.flex
.left-slider
{
width
:
80px
;
position
:
absolute
;
}
.goods-box.flex
.right-slider
{
flex
:
1
;
width
:
1
rpx
;
}
.defaultz
.van-sticky
{
z-index
:
1
!important
;
}
.goods-box
.van-tabs__scroll
{
background
:
none
;
}
.goods-box
._div
{
width
:
100%
;
}
</
style
>
components/pingtuan/style1.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<div
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<div
v-for=
"(item, gli) in goodList"
:key=
"gli"
class=
"good-one"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<div
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
>
<image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%;"
/>
</div>
<image
style=
"width: calc(100vw - 24px); height: 66vw;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
v-if=
"goodsInfo.goodsCoverProportion == '3-2'"
/>
<image
style=
"
width: calc(100vw - 24px);
height: 100vw;
border-radius: 10rpx 10rpx 0 0;
"
v-if=
"goodsInfo.goodsCoverProportion == '1-1'"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<div
class=
"good-price-info"
>
<span
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</span>
<span
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"btnStyle"
:plain=
"goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape=
"goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</span>
</div>
</div>
</div>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</div>
</
template
>
<
script
>
import
goodSku
from
"../goods/goodsku"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
goodSku
,
auth
,
},
props
:
[
"goodList"
,
"goodsInfo"
],
data
()
{
return
{
mainColor
:
""
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{},
btnStyle
:
{},
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
btnStyle
=
{
backgroundColor
:
this
.
goodsInfo
.
buttonColor
??
this
.
mainColor
,
color
:
this
.
goodsInfo
.
buyBtnStyle
==
2
||
this
.
goodsInfo
.
buyBtnStyle
==
4
?
this
.
goodsInfo
.
buttonColor
:
"#FFF"
,
};
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
},
};
</
script
>
<
style
>
.good-one
{
margin
:
12px
;
position
:
relative
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
padding-bottom
:
10
rpx
;
overflow
:
hidden
;
}
.good-one
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-one
.guding
{
position
:
relative
;
}
.good-one
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-one
.good-info
{
padding
:
12
rpx
;
padding-bottom
:
0
;
margin-top
:
-5px
;
}
.good-one
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
13px
;
}
.good-one
.good-info
.good-price-info
{
display
:
flex
;
}
.good-one
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
font-size
:
14px
;
flex
:
1
;
}
.good-one
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
flex
:
1
;
}
</
style
>
components/pingtuan/style2.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<u-row
gutter=
"24"
>
<u-col
span=
"6"
v-for=
"(item, gli) in goodList"
:key=
"gli"
>
<view
class=
"good-two"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
>
<image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width:100%"
/>
</view>
<view
class=
"img-box"
>
<view
class=
"img-show"
>
<image
style=
"
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</view>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"
`backgroundColor:$
{goodsInfo.buttonColor},color:${
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'
}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</view>
</view>
</view>
</view>
</u-col>
</u-row>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
goodSku
from
"../goods/goodsku"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
goodSku
,
auth
,
},
props
:
[
"goodList"
,
"goodsInfo"
],
data
()
{
return
{
mainColor
:
""
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{},
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
},
};
</
script
>
<
style
>
.good-two
{
position
:
relative
;
margin-bottom
:
12px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
10
rpx
;
}
.good-two
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-two
.img-box
{
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
}
.good-two
.img-box
.img-show
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.good-two
.guding
{
position
:
relative
;
}
.good-two
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-two
.good-info
{
padding
:
6
rpx
;
margin-top
:
-5px
;
padding-bottom
:
0
;
}
.good-two
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin
:
3px
0
;
font-size
:
13px
;
height
:
37px
;
}
.good-two
.good-info
.good-price-info
{
display
:
flex
;
}
.good-two
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
}
.good-two
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/pingtuan/style3.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<div
style=
"padding: 12px; padding-bottom: 0;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<u-row
gutter=
"24"
>
<u-col
span=
"4"
v-for=
"(item, gli) in goodList"
:key=
"gli"
>
<div
class=
"good-three"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<div
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
>
<image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width:100%"
/>
</div>
<div
class=
"img-box"
>
<div
class=
"img-show"
>
<image
style=
"
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</div>
</div>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<div
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"
`backgroundColor:$
{goodsInfo.buttonColor},color:${
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'
}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</view>
</div>
</div>
</div>
</u-col>
</u-row>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</div>
</
template
>
<
script
>
import
goodSku
from
"../goods/goodsku"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
goodSku
,
auth
,
},
props
:
[
"goodList"
,
"goodsInfo"
],
data
()
{
return
{
mainColor
:
""
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{},
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
},
};
</
script
>
<
style
>
.good-three
{
position
:
relative
;
margin-bottom
:
12px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
5px
;
}
.good-three
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-three
.img-box
{
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
}
.good-three
.img-box
.img-show
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.good-three
.guding
{
position
:
relative
;
}
.good-three
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-three
.good-info
{
padding
:
6
rpx
;
margin-top
:
-5px
;
padding-bottom
:
0
;
}
.good-three
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin
:
3px
0
;
font-size
:
13px
;
word-break
:
break-all
;
height
:
37px
;
}
.good-three
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
}
.good-three
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-three
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/pingtuan/style4.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;width:100%;min-height:450rpx;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%;"
/></view>
<view
class=
"img-box"
><image
style=
"width: 100%; height: 100%;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/></view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"
`backgroundColor:$
{goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</view>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
goodSku
from
'../goods/goodsku'
;
import
auth
from
'@/components/auth/index.vue'
;
export
default
{
components
:
{
goodSku
,
auth
},
props
:
[
'goodList'
,
'goodsInfo'
],
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{}
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
}
//格式化价格添加.00
// getPrice(value){
// var html,_val;
// value =Number(value).toFixed(2);
// if(value==0){
// value=0;
// return html = "¥0";
// }else if(value.split('.')[1].substring(1)==0){
// value = Number(value).toFixed(2);
// }
// _val = value.split('.');
// return html = '¥'+_val[0]+'.'+_val[1];
// }
}
};
</
script
>
<
style
>
.good-four
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
}
.good-four
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-four
.img-box
{
width
:
100px
;
height
:
100px
;
}
.good-four
.good-info
{
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-four
.good-info
.good-name
{
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.good-four
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-four
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-four
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/pingtuan/style5.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<view
class=
"her-scoller"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class=
"good-five"
@
click=
"openGood(item)"
v-for=
"(item, gli) in goodList"
:key=
"gli"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width:100%"
/></view>
<view
class=
"img-box"
>
<view
class=
"img-show"
>
<image
style=
"width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</view>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"
`backgroundColor:$
{goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</view>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
goodSku
from
'../goods/goodsku'
;
import
auth
from
'@/components/auth/index.vue'
;
export
default
{
components
:
{
goodSku
,
auth
},
props
:
[
'goodList'
,
'goodsInfo'
],
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{}
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
}
}
};
</
script
>
<
style
>
.her-scoller
{
overflow-x
:
auto
!important
;
padding
:
12px
;
display
:
flex
;
white-space
:
nowrap
;
}
/* .her-scoller::after {
clear: both;
content: " ";
display: block;
} */
.her-scoller
.good-five
{
position
:
relative
;
margin-right
:
12px
;
width
:
30%
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
padding-bottom
:
10
rpx
;
/* float: left; */
}
.her-scoller
.good-five
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.her-scoller
.good-five
.img-box
{
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
}
.her-scoller
.good-five
.img-box
.img-show
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
z-index
:
2
;
}
.her-scoller
.good-five
.guding
{
position
:
relative
;
}
.her-scoller
.good-five
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.her-scoller
.good-five
.good-info
{
padding
:
6
rpx
;
padding-bottom
:
0
;
}
.her-scoller
.good-five
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
block
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
4
rpx
;
font-size
:
13px
;
width
:
100%
;
}
.her-scoller
.good-five
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
}
.her-scoller
.good-five
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.her-scoller
.good-five
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/pingtuan/style6.vue
0 → 100644
View file @
f1f1d62b
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;width:100%;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag||goodsInfo.customizeGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%;"
/></view>
<view
class=
"img-box"
><image
style=
"width: 100%; height: 100%;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/></view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<text
style=
"font-size:13px;margin-right:5px"
>
¥
</text>
<text>
{{
item
.
pintuanPrice
}}
</text>
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"
`backgroundColor:$
{goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{
goodsInfo
.
buyBtnText
}}
</u-button>
</view>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
goodSku
from
'../goods/goodsku'
;
import
auth
from
'@/components/auth/index.vue'
;
export
default
{
components
:
{
goodSku
,
auth
},
props
:
[
'goodList'
,
'goodsInfo'
],
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{}
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
}
}
};
</
script
>
<
style
>
.good-four
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
}
.good-four
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-four
.img-box
{
width
:
100px
;
height
:
100px
;
}
.good-four
.good-info
{
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-four
.good-info
.good-name
{
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.good-four
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-four
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-four
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/quicknav/index.vue
View file @
f1f1d62b
<
template
>
<
template
>
<
div
class=
"quicknav"
>
<
view
class=
"quicknav"
>
<
div
class=
"box"
v-if=
"showNavs"
>
<
view
class=
"box"
v-if=
"showNavs"
>
<
div
class=
"nav-item"
v-if=
"navs.home.opened"
@
click=
"goHome"
>
<
view
class=
"nav-item"
v-if=
"navs.home.opened"
@
click=
"goHome"
>
<img
:src=
"navs.home.picUrl"
/>
<img
:src=
"navs.home.picUrl"
/>
</
div
>
</
view
>
<button
<button
class=
"nav-item"
class=
"nav-item"
v-if=
"navs.customerService.opened"
v-if=
"navs.customerService.opened"
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
>
>
<img
:src=
"navs.customerService.picUrl"
/>
<img
:src=
"navs.customerService.picUrl"
/>
</button>
</button>
<
div
class=
"nav-item"
v-if=
"navs.tel.opened"
@
click=
"goPhone(navs.tel.number)"
>
<
view
class=
"nav-item"
v-if=
"navs.tel.opened"
@
click=
"goPhone(navs.tel.number)"
>
<img
:src=
"navs.tel.picUrl"
/>
<img
:src=
"navs.tel.picUrl"
/>
</
div
>
</
view
>
<
div
class=
"nav-item"
v-if=
"navs.web.opened"
@
click=
"goUrl(navs.web.url)"
>
<
view
class=
"nav-item"
v-if=
"navs.web.opened"
@
click=
"goUrl(navs.web.url)"
>
<img
:src=
"navs.web.picUrl"
/>
<img
:src=
"navs.web.picUrl"
/>
</
div
>
</
view
>
<navigator
<navigator
v-if=
"navs.mApp.opened"
v-if=
"navs.mApp.opened"
target=
"miniProgram"
target=
"miniProgram"
...
@@ -30,25 +30,25 @@
...
@@ -30,25 +30,25 @@
>
>
<img
:src=
"navs.mApp.picUrl"
/>
<img
:src=
"navs.mApp.picUrl"
/>
</navigator>
</navigator>
<
div
<
view
class=
"nav-item"
class=
"nav-item"
v-if=
"navs.mapNav.opened"
v-if=
"navs.mapNav.opened"
@
click=
"goLocation(navs.mapNav.location)"
@
click=
"goLocation(navs.mapNav.location)"
>
>
<img
:src=
"navs.mapNav.picUrl"
/>
<img
:src=
"navs.mapNav.picUrl"
/>
</
div
>
</
view
>
<
div
<
view
class=
"nav-item"
class=
"nav-item"
v-if=
"navs.customize.opened"
v-if=
"navs.customize.opened"
@
click=
"goLink(navs.customize.link_url)"
@
click=
"goLink(navs.customize.link_url)"
>
>
<img
:src=
"navs.customize.picUrl"
/>
<img
:src=
"navs.customize.picUrl"
/>
</
div
>
</
view
>
</
div
>
</
view
>
<
div
class=
"nav-item"
v-if=
"showArrow"
@
click=
"changeShow"
>
<
view
class=
"nav-item"
v-if=
"showArrow"
@
click=
"changeShow"
>
<img
:src=
"arrowImg"
/>
<img
:src=
"arrowImg"
/>
</
div
>
</
view
>
</
div
>
</
view
>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -69,7 +69,7 @@ export default {
...
@@ -69,7 +69,7 @@ export default {
this
.
currentParent
=
`/
${
this
.
$parent
.
$mp
.
page
.
route
}
`
;
this
.
currentParent
=
`/
${
this
.
$parent
.
$mp
.
page
.
route
}
`
;
},
},
methods
:
{
methods
:
{
changeShow
(
e
)
{
changeShow
()
{
this
.
showNavs
=
!
this
.
showNavs
;
this
.
showNavs
=
!
this
.
showNavs
;
this
.
arrowImg
=
this
.
showNavs
this
.
arrowImg
=
this
.
showNavs
?
this
.
navs
.
openedPicUrl
?
this
.
navs
.
openedPicUrl
...
@@ -78,9 +78,7 @@ export default {
...
@@ -78,9 +78,7 @@ export default {
goHome
()
{
goHome
()
{
let
t
=
getCurrentPages
();
let
t
=
getCurrentPages
();
let
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
;
let
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
;
if
(
crtPath
!=
"/pages/index/index"
)
{
uni
.
redirectTo
({
url
:
"/pages/index/index"
});
uni
.
redirectTo
({
url
:
"/pages/index/index"
});
}
},
},
goLink
(
url
)
{
goLink
(
url
)
{
if
(
url
&&
url
.
length
>
0
)
{
if
(
url
&&
url
.
length
>
0
)
{
...
...
components/search/index.vue
View file @
f1f1d62b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
:input-align=
"styleStr.textPosition"
:input-align=
"styleStr.textPosition"
:value=
"val"
:value=
"val"
:bg-color=
"styleStr.color"
:bg-color=
"styleStr.color"
:disabled=
"true"
:text-color=
"styleStr.textColor"
:text-color=
"styleStr.textColor"
:radius=
"styleStr.radius"
:radius=
"styleStr.radius"
:show-action=
"false"
:show-action=
"false"
...
...
components/tabbar/index.vue
View file @
f1f1d62b
...
@@ -144,8 +144,11 @@ export default {
...
@@ -144,8 +144,11 @@ export default {
crtPath
:
""
,
crtPath
:
""
,
};
};
},
},
created
()
{},
created
()
{
console
.
log
(
'A join...'
)
},
mounted
()
{
mounted
()
{
console
.
log
(
'B join...'
)
this
.
flagTypeInfo
=
this
.
$uiConfig
.
is_bang
;
this
.
flagTypeInfo
=
this
.
$uiConfig
.
is_bang
;
let
tempSystem
=
uni
.
getSystemInfoSync
();
let
tempSystem
=
uni
.
getSystemInfoSync
();
this
.
platforms
=
tempSystem
.
platform
;
this
.
platforms
=
tempSystem
.
platform
;
...
@@ -158,17 +161,27 @@ export default {
...
@@ -158,17 +161,27 @@ export default {
}
}
// #endif
// #endif
});
});
if
(
uni
.
getStorageSync
(
"navs"
)){
if
(
uni
.
getStorageSync
(
"navs"
)){
this
.
navs
=
uni
.
getStorageSync
(
"navs"
)??[];
this
.
navs
=
uni
.
getStorageSync
(
"navs"
)??[];
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
navs
=
uni
.
getStorageSync
(
"navs"
)??[];
this
.
navs
=
uni
.
getStorageSync
(
"navs"
)??[];
this
.
activeHandler
();
this
.
activeHandler
();
},
3000
)
},
3000
)
}
}
this
.
activeHandler
();
this
.
activeHandler
();
},
},
// activated(){
// if(uni.getStorageSync("navs")){
// this.navs = uni.getStorageSync("navs")??[];
// }else{
// setTimeout(()=>{
// this.navs = uni.getStorageSync("navs")??[];
// this.activeHandler();
// },3000)
// }
// this.activeHandler();
// },
methods
:
{
methods
:
{
activeHandler
()
{
activeHandler
()
{
let
t
=
getCurrentPages
();
let
t
=
getCurrentPages
();
...
@@ -181,6 +194,7 @@ export default {
...
@@ -181,6 +194,7 @@ export default {
queryString
=
"?"
+
queryString
.
substring
(
1
,
queryString
.
length
)
queryString
=
"?"
+
queryString
.
substring
(
1
,
queryString
.
length
)
}
}
this
.
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
+
queryString
;
this
.
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
+
queryString
;
console
.
log
(
this
.
crtPath
)
this
.
navs
.
forEach
((
x
,
i
)
=>
{
this
.
navs
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
url
==
this
.
crtPath
)
{
if
(
x
.
url
==
this
.
crtPath
)
{
this
.
active
=
i
;
this
.
active
=
i
;
...
...
pages/goods/goods.vue
View file @
f1f1d62b
<
template
>
<
template
>
<view
class=
"goods"
>
<view
class=
"goods"
>
<view
class=
"u-skeleton"
v-if=
"isExsitGoods"
>
<view
class=
"u-skeleton"
v-if=
"isExsitGoods"
>
<view
class=
"u-skeleton-rect"
>
<view
class=
"u-skeleton-rect"
>
<u-swiper
:list=
"g.pic_url"
height=
"100"
unit=
"vw"
:interval=
"10000"
name=
"pic_url"
:border-radius=
"0"
@
click=
"previewImage"
></u-swiper>
<u-swiper
<!-- TODO 分销价格未做 is_share_price -->
:list=
"g.pic_url"
<view
class=
"is_share"
v-if=
"g.share > 0"
style=
"top:240px;"
>
height=
"100"
<image
src=
"@/static/images/icon/WechatIMG424.png"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
mode=
"widthFix"
/>
unit=
"vw"
<view
:interval=
"10000"
style=
"
name=
"pic_url"
:border-radius=
"0"
@
click=
"previewImage"
></u-swiper>
<!-- TODO 分销价格未做 is_share_price -->
<view
class=
"is_share"
v-if=
"g.share > 0"
style=
"top:240px;"
>
<image
src=
"@/static/images/icon/WechatIMG424.png"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
mode=
"widthFix"
/>
<view
style=
"
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin-left: 8px;
margin-left: 8px;
...
@@ -15,15 +27,19 @@
...
@@ -15,15 +27,19 @@
color: #fff;
color: #fff;
opacity: 1;
opacity: 1;
"
"
>
>
<Text>
即刻分享赚
</Text>
<Text>
即刻分享赚
</Text>
<Text>
¥
{{
g
.
share
}}
</Text>
<Text>
¥
{{
g
.
share
}}
</Text>
</view>
</view>
</view>
</view>
<view
class=
"is_share"
v-if=
"g.myBuyCommission > 0"
>
<view
class=
"is_share"
v-if=
"g.myBuyCommission > 0"
>
<image
src=
"@/static/images/icon/WechatIMG424.png"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
mode=
"widthFix"
/>
<image
<view
src=
"@/static/images/icon/WechatIMG424.png"
style=
"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
mode=
"widthFix"
/>
<view
style=
"
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin-left: 8px;
margin-left: 8px;
...
@@ -31,771 +47,856 @@
...
@@ -31,771 +47,856 @@
color: #fff;
color: #fff;
opacity: 1;
opacity: 1;
"
"
>
>
<Text>
即刻购买省
</Text>
<Text>
即刻购买省
</Text>
<Text>
¥
{{
g
.
myBuyCommission
}}
</Text>
<Text>
¥
{{
g
.
myBuyCommission
}}
</Text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"g-info"
>
<view
class=
"g-info"
>
<view
class=
"g-name u-skeleton-rect"
>
<view
class=
"g-name u-skeleton-rect"
>
<view
v-if=
"g.marketingLogo.iswords&&g.marketingLogo.iswords==1 && g.marketingLogo.words!=''"
class=
"Logo"
:style=
<view
"
{color: g.marketingLogo.wordsColor,
v-if=
"g.marketingLogo.iswords&&g.marketingLogo.iswords==1 && g.marketingLogo.words!=''"
background:g.marketingLogo.wordsBack ,}">
class=
"Logo"
{{
g
.
marketingLogo
.
words
}}
:style=
"
{color: g.marketingLogo.wordsColor,
</view>
background:g.marketingLogo.wordsBack ,}"
<image
>
{{
g
.
marketingLogo
.
words
}}
</view>
v-if=
"g.marketingLogo.iswords&&g.marketingLogo.iswords==2&& g.marketingLogo.ico!=''"
<image
mode=
"heightFix"
v-if=
"g.marketingLogo.iswords&&g.marketingLogo.iswords==2&& g.marketingLogo.ico!=''"
:src=
"g.marketingLogo.ico"
mode=
"heightFix"
style=
" height: 12px;margin-right: 5px"
:src=
"g.marketingLogo.ico"
/>
style=
" height: 12px;margin-right: 5px"
{{
g
.
name
}}
/>
</view>
{{
g
.
name
}}
<view
class=
"g-price-box"
>
</view>
<view
class=
"left"
>
<view
class=
"g-price-box"
>
<view
class=
"price u-skeleton-rect"
:style=
"
{ color: mc }">
<view
class=
"left"
>
<text
class=
"small"
>
¥
</text>
<view
class=
"price u-skeleton-rect"
:style=
"
{ color: mc }">
<text
class=
"numfont"
>
{{
g
.
price_min
==
g
.
price_max
?
g
.
price_min
:
g
.
price_min
+
'-'
+
g
.
price_max
}}
</text>
<text
class=
"small"
>
¥
</text>
</view>
<text
<!-- TODO is_common_user_member_price 普通用户会员价 -->
class=
"numfont"
<!-- TODO is_member_user_member_price 会员用户会员价 -->
>
{{
g
.
price_min
==
g
.
price_max
?
g
.
price_min
:
g
.
price_min
+
'-'
+
g
.
price_max
}}
</text>
<view
class=
"sell u-skeleton-rect"
>
</view>
<text
class=
"oprice"
v-if=
"setting.is_underline_price == 1"
>
{{
g
.
original_price
}}
</text>
<!-- TODO is_common_user_member_price 普通用户会员价 -->
<text
v-if=
"setting.is_sales == 1"
>
已售出
{{
g
.
sales
}}{{
g
.
unit
}}
</text>
<!-- TODO is_member_user_member_price 会员用户会员价 -->
</view>
<view
class=
"sell u-skeleton-rect"
>
</view>
<text
class=
"oprice"
v-if=
"setting.is_underline_price == 1"
>
{{
g
.
original_price
}}
</text>
<view
class=
"right u-skeleton-rect"
@
click=
"openShare"
v-if=
"isAllowShare == 1"
>
<text
v-if=
"setting.is_sales == 1"
>
已售出
{{
g
.
sales
}}{{
g
.
unit
}}
</text>
<image
src=
"@/static/images/icon/icon-share.png"
class=
"share-icon"
/>
</view>
<text>
分享
</text>
</view>
</view>
<view
class=
"right u-skeleton-rect"
@
click=
"openShare"
v-if=
"isAllowShare == 1"
>
</view>
<image
src=
"@/static/images/icon/icon-share.png"
class=
"share-icon"
/>
</view>
<text>
分享
</text>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
>
</view>
<view
class=
"label"
style=
"margin-top: 5px;"
>
活动
</view>
</view>
<view
class=
"content"
style=
"display: flex;flex-direction: column"
>
</view>
<view
style=
"display: flex;flex-direction: row;align-items: center;margin-bottom: 5px;"
v-if=
"g.goods_marketing_award.integral.title != ''"
>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
>
<u-tag
text=
"送积分"
type=
"error"
/>
<view
class=
"label"
style=
"margin-top: 5px;"
>
活动
</view>
<text
style=
"margin-left: 5px; font-size: 12px;"
>
{{
g
.
goods_marketing_award
.
integral
.
title
}}
</text>
<view
class=
"content"
style=
"display: flex;flex-direction: column"
>
</view>
<view
<view
style=
"display: flex;flex-direction: row;align-items: center"
v-if=
"g.goods_marketing_award.PresentFXGradeMsg != ''"
@
click=
"goVIP"
>
style=
"display: flex;flex-direction: row;align-items: center;margin-bottom: 5px;"
<u-tag
text=
"送会员"
type=
"error"
/>
v-if=
"g.goods_marketing_award.integral.title != ''"
<text
style=
"margin-left: 5px; font-size: 12px;"
>
{{
g
.
goods_marketing_award
.
PresentFXGradeMsg
}}
</text>
>
</view>
<u-tag
text=
"送积分"
type=
"error"
/>
<text
style=
"margin-left: 5px; font-size: 12px;"
>
{{
g
.
goods_marketing_award
.
integral
.
title
}}
</text>
</view>
<view
style=
"display: flex;flex-direction: row;align-items: center"
v-if=
"g.goods_marketing_award.PresentFXGradeMsg != ''"
@
click=
"goVIP"
>
<u-tag
text=
"送会员"
type=
"error"
/>
<text
style=
"margin-left: 5px; font-size: 12px;"
>
{{
g
.
goods_marketing_award
.
PresentFXGradeMsg
}}
</text>
</view>
<view
<view
style=
"display: flex;flex-direction: row;align-items: center;margin-top: 5px;"
style=
"display: flex;flex-direction: row;align-items: center;margin-top: 5px;"
@
click=
"goUrl(g.FreeShippingUrl)"
@
click=
"goUrl(g.FreeShippingUrl)"
v-if=
"g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)"
v-if=
"g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)"
>
>
<view
style=
"color: #fa3534;background: #fef0f0;padding: 12rpx 22rpx; font-size: 22rpx;margin-right: 5px;border: 1px solid #fde2e2;border-radius: 6rpx;"
>
<view
{{
g
.
freeShippingName
!=
null
?
g
.
freeShippingName
:
''
}}
style=
"color: #fa3534;background: #fef0f0;padding: 12rpx 22rpx; font-size: 22rpx;margin-right: 5px;border: 1px solid #fde2e2;border-radius: 6rpx;"
</view>
>
{{
g
.
freeShippingName
!=
null
?
g
.
freeShippingName
:
''
}}
</view>
{{
g
.
fullMoneyPinkage
>
0
&&
g
.
fullNumPinkage
==
0
?
g
.
fullMoneyPinkage
+
'元包邮'
:
''
}}
{{
g
.
fullMoneyPinkage
==
0
&&
g
.
fullNumPinkage
>
0
?
g
.
fullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
g
.
fullMoneyPinkage
>
0
&&
g
.
fullNumPinkage
==
0
?
g
.
fullMoneyPinkage
+
'元包邮'
:
''
}}
<!--
<view
style=
"margin-top: 5px;"
v-if=
"
{{
g
.
fullMoneyPinkage
==
0
&&
g
.
fullNumPinkage
>
0
?
g
.
fullNumPinkage
+
'件包邮'
:
''
}}
</view>
<!--
<view
style=
"margin-top: 5px;"
v-if=
"
g.goods_marketing_award.PresentFXGradeMsg == ''
g.goods_marketing_award.PresentFXGradeMsg == ''
&& g.goods_marketing_award.integral.title == '' &&
&& g.goods_marketing_award.integral.title == '' &&
g.freeShippingName!=null && g.freeShippingName !='' &&(g.fullMoneyPinkage == 0 && g.fullNumPinkage==0)
g.freeShippingName!=null && g.freeShippingName !='' &&(g.fullMoneyPinkage == 0 && g.fullNumPinkage==0)
"
>
"
>
<text>
暂无活动
</text>
<text>
暂无活动
</text>
</view>
-->
</view>
-->
</view>
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
v-if=
"sku.length > 0"
>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
v-if=
"sku.length > 0"
>
<view
class=
"label"
>
选择
</view>
<view
class=
"label"
>
选择
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"sku-chosen"
@
click=
"chosenSku"
>
<view
class=
"sku-chosen"
@
click=
"chosenSku"
>
<view
class=
"sku"
>
{{
currentSku
.
attr_list
.
length
>
0
?
'已'
:
'请'
}}
选择
{{
sku
}}
</view>
<view
class=
"sku"
>
{{
currentSku
.
attr_list
.
length
>
0
?
'已'
:
'请'
}}
选择
{{
sku
}}
</view>
<view
class=
"arrow"
><u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
></u-icon></view>
<view
class=
"arrow"
>
</view>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
></u-icon>
<view
class=
"suk-item"
style=
"flex-wrap: wrap;"
>
</view>
<template
v-if=
"skuimage.length > 0"
>
</view>
<view
v-for=
"(x, i) in skuimage"
class=
"item img"
style=
"margin-bottom: 5px;"
:key=
"i"
><image
:src=
"x"
style=
"width: 100%; height: 100%;"
/></view>
<view
class=
"suk-item"
style=
"flex-wrap: wrap;"
>
<view
class=
"item"
v-if=
"g.attr_groups[0].attr_list.length > 1"
>
<template
v-if=
"skuimage.length > 0"
>
共
{{
g
.
attr_groups
[
0
].
attr_list
.
length
}}
种
{{
g
.
attr_groups
[
0
].
attr_group_name
}}
可选
<view
</view>
v-for=
"(x, i) in skuimage"
</
template
>
class=
"item img"
<
template
v-else
>
style=
"margin-bottom: 5px;"
<template
v-for=
"(x, i) in g.attr_groups[0].attr_list"
>
:key=
"i"
<view
class=
"item"
v-if=
"i
<
5
"
:key=
"i"
style=
"margin-bottom: 5px;"
>
{{
x
.
attr_name
}}
</view>
>
</
template
>
<image
:src=
"x"
style=
"width: 100%; height: 100%;"
/>
</view>
<view
class=
"item"
v-if=
"g.attr_groups[0].attr_list.length > 1"
>
共
{{
g
.
attr_groups
[
0
].
attr_list
.
length
}}
种
{{
g
.
attr_groups
[
0
].
attr_group_name
}}
可选
</view>
</
template
>
<
template
v-else
>
<template
v-for=
"(x, i) in g.attr_groups[0].attr_list"
>
<view
class=
"item"
v-if=
"i
<
5
"
:key=
"i"
style=
"margin-bottom: 5px;"
>
{{
x
.
attr_name
}}
</view>
</
template
>
<view
class=
"item"
v-if=
"g.attr_groups[0].attr_list.length > 1"
>
<view
共{{ g.attr_groups[0].attr_list.length }}种{{ g.attr_groups[0].attr_group_name }}可选
class=
"item"
</view>
v-if=
"g.attr_groups[0].attr_list.length > 1"
</template>
>
共{{ g.attr_groups[0].attr_list.length }}种{{ g.attr_groups[0].attr_group_name }}可选
</view>
</view>
</template>
</view>
</view>
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"setting.is_express == '1'"
>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"setting.is_express == '1'"
>
<view
class=
"label"
>
快递
</view>
<view
class=
"label"
>
快递
</view>
<view
class=
"content"
>
{{ g.express == '' ? '免运费' : '¥' + g.express }}
</view>
<view
class=
"content"
>
{{ g.express == '' ? '免运费' : '¥' + g.express }}
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
style=
"margin-top: -10;"
v-if=
"g.goods_marketing.shipping != ''"
>
<view
<view
class=
"label"
>
包邮
</view>
class=
"sku-box u-skeleton-rect"
<view
class=
"content"
>
{{ g.goods_marketing.shipping }}
</view>
style=
"margin-top: -10;"
</view>
v-if=
"g.goods_marketing.shipping != ''"
<view
class=
"sku-box u-skeleton-rect"
style=
"margin-top: -10;"
v-if=
"g.goods_marketing.limit != ''"
>
>
<view
class=
"label"
>
限购
</view>
<view
class=
"label"
>
包邮
</view>
<view
class=
"content"
>
{{ g.goods_marketing.limit }}
</view>
<view
class=
"content"
>
{{ g.goods_marketing.shipping }}
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
style=
"margin-top: -10;"
v-if=
"g.goods_marketing.limit != ''"
>
<view
class=
"label"
>
限购
</view>
<view
class=
"content"
>
{{ g.goods_marketing.limit }}
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment == 1"
><view
class=
"label"
>
暂无评论信息
</view></view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment == 1"
>
<view
class=
"comment"
v-if=
"comments.length > 0"
>
<view
class=
"label"
>
暂无评论信息
</view>
<view
class=
"chead"
>
</view>
<u-section
<view
class=
"comment"
v-if=
"comments.length > 0"
>
:bold=
"false"
<view
class=
"chead"
>
:sub-color=
"secondary"
<u-section
:show-split=
"false"
:bold=
"false"
:title=
"`商品评价(${comments.length})`"
:sub-color=
"secondary"
sub-title=
"查看更多"
:show-split=
"false"
@
click=
"clickCommentHandler"
:title=
"`商品评价(${comments.length})`"
font-size=
"24"
sub-title=
"查看更多"
></u-section>
@
click=
"clickCommentHandler"
</view>
font-size=
"24"
<view
class=
"content"
>
></u-section>
<view
class=
"u-box"
>
</view>
<view
class=
"user"
>
<view
class=
"content"
>
<u-avatar
:src=
"comments[0].UserPhotoPath"
:size=
"50"
></u-avatar>
<view
class=
"u-box"
>
<text
style=
"margin-left: 10px;"
>
{{ comments[0].UserName }}
</text>
<view
class=
"user"
>
</view>
<u-avatar
:src=
"comments[0].UserPhotoPath"
:size=
"50"
></u-avatar>
<view
class=
"timer"
>
{{ comments[0].CreateDate }}
</view>
<text
style=
"margin-left: 10px;"
>
{{ comments[0].UserName }}
</text>
</view>
</view>
<view
class=
"ucontent"
>
{{ comments[0].Content }}
</view>
<view
class=
"timer"
>
{{ comments[0].CreateDate }}
</view>
</view>
</view>
</view>
<view
class=
"ucontent"
>
{{ comments[0].Content }}
</view>
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
商品详情
</u-divider>
</view>
<view
class=
"details"
>
</view>
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
商品详情
</u-divider>
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
<view
class=
"details"
>
</view>
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
或许你喜欢
</u-divider>
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
<view
style=
"width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
><goodlist
:list=
"recommend"
></goodlist></view>
</view>
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
或许你喜欢
</u-divider>
<view
style=
"width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
>
<goodlist
:list=
"recommend"
></goodlist>
</view>
<u-skeleton
v-if=
"loading"
:loading=
"true"
:animation=
"true"
bgcolor=
"#FFF"
></u-skeleton>
<u-skeleton
v-if=
"loading"
:loading=
"true"
:animation=
"true"
bgcolor=
"#FFF"
></u-skeleton>
<goodsaction
v-if=
"!loading"
:good-name=
"g.name"
:cover-pic=
"g.cover_pic"
:favorite=
"g.favorite"
:good-id=
"id"
:total-stock =
'g.totalStock'
:status=
'g.status'
@
joincar=
"joinCar"
@
buy=
"buy"
></goodsaction>
<goodsaction
<goodsku
v-if=
"!loading"
v-if=
"!loading && showSku"
:good-name=
"g.name"
border-radius=
"10"
:cover-pic=
"g.cover_pic"
v-model=
"showSku"
:favorite=
"g.favorite"
:mask-close-able=
"true"
:good-id=
"id"
:safe-area-inset-bottom=
"true"
:total-stock=
"g.totalStock"
:good=
"g"
:status=
"g.status"
:option-type=
"ot"
@
joincar=
"joinCar"
:skued=
"currentSku"
@
buy=
"buy"
@
close=
"closeSkuChosen"
></goodsaction>
></goodsku>
<goodsku
</view>
v-if=
"!loading && showSku"
<u-empty
text=
"没有找到商品,或商品已下架"
mode=
"favor"
v-if=
"!isExsitGoods"
></u-empty>
border-radius=
"10"
<share
:good-id=
"id"
v-if=
"showShare"
:good-name=
"g.name"
:images=
"g.pic_url"
:advertising=
"g.advertising"
@
close=
"closeShare"
></share>
v-model=
"showSku"
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
:mask-close-able=
"true"
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
:safe-area-inset-bottom=
"true"
</view>
:good=
"g"
:option-type=
"ot"
:skued=
"currentSku"
@
close=
"closeSkuChosen"
></goodsku>
</view>
<u-empty
text=
"没有找到商品,或商品已下架"
mode=
"favor"
v-if=
"!isExsitGoods"
></u-empty>
<share
:good-id=
"id"
v-if=
"showShare"
:good-name=
"g.name"
:images=
"g.pic_url"
:advertising=
"g.advertising"
@
close=
"closeShare"
></share>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
</view>
</template>
</template>
<
script
>
<
script
>
// #ifdef APP-NVUE
// #ifdef APP-NVUE
const
dom
=
weex
.
requireModule
(
'dom'
);
const
dom
=
weex
.
requireModule
(
"dom"
);
// #endif
// #endif
import
goodlist
from
'@/components/goods/list'
;
import
goodlist
from
"@/components/goods/list"
;
import
goodsaction
from
'./components/goodsaction'
;
import
goodsaction
from
"./components/goodsaction"
;
import
goodsku
from
'@/components/goods/goodsku'
;
import
goodsku
from
"@/components/goods/goodsku"
;
import
auth
from
'@/components/auth/index'
;
import
auth
from
"@/components/auth/index"
;
import
coupon
from
'@/components/coupons/coupons'
;
import
coupon
from
"@/components/coupons/coupons"
;
import
share
from
'./components/share/share'
;
import
share
from
"./components/share/share"
;
import
hParse
from
'@/components/u-parse/parse.vue'
;
import
hParse
from
"@/components/u-parse/parse.vue"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
id
:
0
,
id
:
0
,
loading
:
true
,
loading
:
true
,
g
:
{},
g
:
{},
imgs
:
[],
imgs
:
[],
mc
:
''
,
mc
:
""
,
sku
:
''
,
sku
:
""
,
skuimage
:
[],
skuimage
:
[],
comments
:
[],
comments
:
[],
secondary
:
''
,
secondary
:
""
,
detailContent
:
''
,
detailContent
:
""
,
recommend
:
[],
recommend
:
[],
showSku
:
false
,
showSku
:
false
,
ot
:
0
,
ot
:
0
,
currentSku
:
{},
currentSku
:
{},
isExsitGoods
:
true
,
isExsitGoods
:
true
,
pageTitle
:
'商品详情'
,
pageTitle
:
"商品详情"
,
setting
:
{},
setting
:
{},
prevPage
:
''
,
prevPage
:
""
,
//自定义接手传递
//自定义接手传递
opTionObj
:
{},
opTionObj
:
{},
showShare
:
false
,
showShare
:
false
,
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
20
,
pageSize
:
20
,
GoodsId
:
0
,
GoodsId
:
0
,
CommentGrade
:
0
CommentGrade
:
0
,
},
},
showAuth
:
false
,
showAuth
:
false
,
showCoupons
:
false
,
showCoupons
:
false
,
couponMessage
:
''
,
couponMessage
:
""
,
isAllowShare
:
1
,
isAllowShare
:
1
,
u
:
{},
u
:
{},
vipState
:
{}
vipState
:
{},
};
};
},
},
components
:
{
components
:
{
goodlist
,
goodlist
,
goodsaction
,
goodsaction
,
goodsku
,
goodsku
,
auth
,
auth
,
coupon
,
coupon
,
share
,
share
,
hParse
hParse
,
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
opTionObj
=
option
;
this
.
opTionObj
=
option
;
console
.
log
(
option
,
'option'
);
console
.
log
(
option
,
"option"
);
if
(
option
&&
option
.
id
)
{
if
(
option
&&
option
.
id
)
{
this
.
id
=
option
.
id
?
option
.
id
:
29
;
//40887 59512 46942
this
.
id
=
option
.
id
?
option
.
id
:
29
;
//40887 59512 46942
}
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
.
custom_params
)
{
if
(
option
&&
option
.
custom_params
)
{
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
option
.
custom_params
));
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
option
.
custom_params
));
console
.
log
(
custom_params
);
console
.
log
(
custom_params
);
if
(
custom_params
.
user_id
)
{
if
(
custom_params
.
user_id
)
{
uni
.
setStorageSync
(
'pid'
,
{
pid
:
custom_params
.
user_id
});
uni
.
setStorageSync
(
"pid"
,
{
pid
:
custom_params
.
user_id
});
}
}
}
}
if
(
option
&&
option
.
user_id
)
{
if
(
option
&&
option
.
user_id
)
{
uni
.
setStorageSync
(
'pid'
,
{
pid
:
option
.
user_id
});
uni
.
setStorageSync
(
"pid"
,
{
pid
:
option
.
user_id
});
}
}
if
(
uni
.
getStorageSync
(
'AnchorName'
))
{
if
(
uni
.
getStorageSync
(
"AnchorName"
))
{
//如果有主播名称了先清除
//如果有主播名称了先清除
uni
.
removeStorageSync
(
'AnchorName'
);
uni
.
removeStorageSync
(
"AnchorName"
);
}
}
if
(
option
&&
option
.
AnchorName
)
{
if
(
option
&&
option
.
AnchorName
)
{
//当传过来有主播名称的时候 存入缓存
//当传过来有主播名称的时候 存入缓存
uni
.
setStorageSync
(
'AnchorName'
,
{
AnchorName
:
option
.
AnchorName
});
uni
.
setStorageSync
(
"AnchorName"
,
{
AnchorName
:
option
.
AnchorName
});
}
}
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// if (!this.u) {
// if (!this.u) {
// this.u = {
// this.u = {
// nickName: "未登录",
// nickName: "未登录",
// avatarUrl: "",
// avatarUrl: "",
// };
// };
// this.showAuth = true;
// this.showAuth = true;
// } else {
// } else {
// this.init();
// this.init();
// this.initPage();
// this.initPage();
// }
// }
this
.
init
();
this
.
init
();
this
.
initPage
();
this
.
initPage
();
this
.
getVipId
();
this
.
getVipId
();
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
setting
=
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
;
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
;
wx
.
showShareMenu
({
wx
.
showShareMenu
({
withShareTicket
:
true
,
withShareTicket
:
true
,
menus
:
[
'shareAppMessage'
,
'shareTimeline'
]
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
});
},
},
onShareTimeline
()
{
onShareTimeline
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
'分享调用'
);
console
.
log
(
"分享调用"
);
this
.
getReceive
();
this
.
getReceive
();
},
2500
);
},
2500
);
let
uid
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
?
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
:
0
;
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
let
title
=
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
''
?
this
.
g
.
app_share_title
:
this
.
g
.
name
;
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
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
;
:
0
;
let
id
=
this
.
id
;
let
title
=
return
{
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
title
:
title
,
?
this
.
g
.
app_share_title
query
:
'id='
+
this
.
id
+
'&user_id='
+
uid
,
:
this
.
g
.
name
;
imageUrl
:
imageUrl
let
imageUrl
=
};
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
},
?
this
.
g
.
app_share_pic
onShareAppMessage
(
res
)
{
:
this
.
g
.
pic_url
[
0
].
pic_url
;
setTimeout
(()
=>
{
let
id
=
this
.
id
;
console
.
log
(
'分享调用'
);
return
{
this
.
getReceive
();
title
:
title
,
},
2500
);
query
:
"id="
+
this
.
id
+
"&user_id="
+
uid
,
let
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
imageUrl
:
imageUrl
,
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
};
return
{
},
title
:
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
''
?
this
.
g
.
app_share_title
:
this
.
g
.
name
,
onShareAppMessage
(
res
)
{
path
:
'/pages/goods/goods?id='
+
this
.
id
+
'&user_id='
+
uid
,
setTimeout
(()
=>
{
imageUrl
:
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
''
?
this
.
g
.
app_share_pic
:
this
.
g
.
pic_url
[
0
].
pic_url
console
.
log
(
"分享调用"
);
};
this
.
getReceive
();
},
},
2500
);
mounted
()
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
setTimeout
(()
=>
{
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
this
.
initImages
();
return
{
},
3000
);
title
:
},
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
methods
:
{
?
this
.
g
.
app_share_title
clickDescription
(
e
)
{
:
this
.
g
.
name
,
console
.
log
(
e
);
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&user_id="
+
uid
,
},
imageUrl
:
initImages
()
{
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
// let that = this;
?
this
.
g
.
app_share_pic
let
info
=
uni
.
createSelectorQuery
().
in
(
this
);
:
this
.
g
.
pic_url
[
0
].
pic_url
,
info
.
select
(
'.goods'
)
};
.
boundingClientRect
(
data
=>
{
},
console
.
log
(
'得到布局位置信息'
+
JSON
.
stringify
(
data
));
mounted
()
{
})
setTimeout
(()
=>
{
.
exec
();
this
.
initImages
();
// info
},
3000
);
// .boundingClientRect(function (data) {
},
// console.log(data)
methods
:
{
// })
clickDescription
(
e
)
{
// .exec();
console
.
log
(
e
);
},
initImages
()
{
// let that = this;
let
info
=
uni
.
createSelectorQuery
().
in
(
this
);
info
.
select
(
".goods"
)
.
boundingClientRect
((
data
)
=>
{
console
.
log
(
"得到布局位置信息"
+
JSON
.
stringify
(
data
));
})
.
exec
();
// info
// .boundingClientRect(function (data) {
// console.log(data)
// })
// .exec();
// wx.createSelectorQuery()
// wx.createSelectorQuery()
// .selectAll("#goodpic")
// .selectAll("#goodpic")
// .fields({ rect: true })
// .fields({ rect: true })
// .exec(res => {
// .exec(res => {
// console.log(res);
// console.log(res);
// });
// });
},
},
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth = false;
// this.showAuth = false;
this
.
init
();
this
.
init
();
this
.
initPage
();
this
.
initPage
();
},
},
//关闭登录窗口
//关闭登录窗口
gbAuth
()
{
gbAuth
()
{
this
.
showAuth
=
false
;
this
.
showAuth
=
false
;
},
},
initPage
()
{
initPage
()
{
let
currentPages
=
getCurrentPages
();
let
currentPages
=
getCurrentPages
();
let
u
=
'/'
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
bar_title
:
[];
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
pages
.
forEach
(
x
=>
{
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
if
(
x
.
value
==
u
)
{
:
[];
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
pages
.
forEach
((
x
)
=>
{
}
if
(
x
.
value
==
u
)
{
});
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
uni
.
setNavigationBarTitle
({
}
title
:
this
.
pageTitle
});
});
uni
.
setNavigationBarTitle
({
},
title
:
this
.
pageTitle
,
clickCommentHandler
()
{
});
uni
.
navigateTo
({
},
url
:
'/pages/goods/comment-list?id='
+
this
.
id
clickCommentHandler
()
{
});
uni
.
navigateTo
({
},
url
:
"/pages/goods/comment-list?id="
+
this
.
id
,
getVipId
()
{
});
//获取会员ID
},
this
.
request2
(
getVipId
()
{
{
//获取会员ID
url
:
'/api/AppletGoods/GetAppletVipGradeInfo'
,
this
.
request2
(
data
:
{}
{
},
url
:
"/api/AppletGoods/GetAppletVipGradeInfo"
,
res
=>
{
data
:
{},
if
(
res
.
data
)
{
},
this
.
vipState
=
res
.
data
.
VIPModel
;
(
res
)
=>
{
}
if
(
res
.
data
)
{
// this.initRecommend();
this
.
vipState
=
res
.
data
.
VIPModel
;
}
}
);
// this.initRecommend();
},
}
goVIP
()
{
);
//跳转到购买的页面查看
},
let
GradeId
=
this
.
vipState
.
Id
;
goVIP
()
{
uni
.
navigateTo
({
//跳转到购买的页面查看
url
:
'/pages/share/buyInterest/index?showLook=1&GradeId='
+
GradeId
let
GradeId
=
this
.
vipState
.
Id
;
});
uni
.
navigateTo
({
},
url
:
"/pages/share/buyInterest/index?showLook=1&GradeId="
+
GradeId
,
init
()
{
});
this
.
loading
=
true
;
},
this
.
request2
(
init
()
{
{
this
.
loading
=
true
;
url
:
'/api/AppletGoods/GetAppletGoodsInfo'
,
this
.
request2
(
data
:
{
{
GoodsId
:
this
.
id
url
:
"/api/AppletGoods/GetAppletGoodsInfo"
,
}
data
:
{
},
GoodsId
:
this
.
id
,
res
=>
{
},
if
(
res
.
resultCode
==
1
)
{
},
this
.
g
=
res
.
data
.
goods
;
(
res
)
=>
{
this
.
g
.
totalStock
=
0
;
if
(
res
.
resultCode
==
1
)
{
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
totalStock
+=
x
.
stock
this
.
g
.
totalStock
=
0
;
})
this
.
g
.
attr
.
forEach
((
x
)
=>
{
this
.
g
.
marketingLogo
=
JSON
.
parse
(
this
.
g
.
marketingLogo
)
this
.
g
.
totalStock
+=
x
.
stock
;
this
.
isAllowShare
=
res
.
data
.
goods
.
isAllowShare
;
//1为可以分享 2为不能分享
});
if
(
this
.
isAllowShare
==
2
)
{
this
.
g
.
marketingLogo
=
JSON
.
parse
(
this
.
g
.
marketingLogo
);
//隐藏分享的按钮
this
.
isAllowShare
=
res
.
data
.
goods
.
isAllowShare
;
//1为可以分享 2为不能分享
wx
.
hideShareMenu
({
if
(
this
.
isAllowShare
==
2
)
{
menus
:
[
'shareAppMessage'
,
'shareTimeline'
]
//隐藏分享的按钮
});
wx
.
hideShareMenu
({
}
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
this
.
g
.
pic_url
.
forEach
(
x
=>
{
});
this
.
imgs
.
push
(
x
.
pic_url
);
}
});
this
.
g
.
pic_url
.
forEach
((
x
)
=>
{
if
(
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
imgs
.
push
(
x
.
pic_url
);
this
.
g
.
attr_groups
.
forEach
((
x
,
i
)
=>
{
});
if
(
i
>
0
)
{
if
(
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
sku
+=
','
;
this
.
g
.
attr_groups
.
forEach
((
x
,
i
)
=>
{
}
if
(
i
>
0
)
{
this
.
sku
+=
x
.
attr_group_name
;
this
.
sku
+=
","
;
});
}
this
.
g
.
attr_groups
[
0
].
attr_list
.
forEach
(
x
=>
{
this
.
sku
+=
x
.
attr_group_name
;
if
(
x
.
pic_url
)
{
});
this
.
skuimage
.
push
(
x
.
pic_url
);
this
.
g
.
attr_groups
[
0
].
attr_list
.
forEach
((
x
)
=>
{
}
if
(
x
.
pic_url
)
{
});
this
.
skuimage
.
push
(
x
.
pic_url
);
}
}
});
}
var
richtext
=
this
.
g
.
detail
;
var
richtext
=
this
.
g
.
detail
;
// richtext = richtext.replace(
// richtext = richtext.replace(
// /
<
img
/
g
,
// /
<
img
/
g
,
// '
<
img
style
=
"margin-top:-4px;width:100%"
'
// '
<
img
style
=
"margin-top:-4px;width:100%"
'
// );
// );
this.detailContent = richtext;
this.detailContent = richtext;
this.loading = false;
this.loading = false;
//登录在调用评论接口
//登录在调用评论接口
if (this.u) {
if (this.u) {
this.initComments();
this.initComments();
this.setFootMarkInfo(res.data.goods.id);
this.setFootMarkInfo(res.data.goods.id);
}
}
this.initRecommend();
this.initRecommend();
} else {
} else {
this.isExsitGoods = false;
this.isExsitGoods = false;
}
}
}
}
);
);
},
},
previewImage(i) {
previewImage(i) {
uni.previewImage({
uni.previewImage({
urls: this.imgs,
urls: this.imgs,
current: i,
current: i,
longPressActions: {
longPressActions: {
itemList: ['
发送给朋友
', '
保存图片
', '
收藏
'],
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {
success: function (data) {
console.log('
选中了第
' + (data.tapIndex + 1) + '
个按钮
,
第
' + (data.index + 1) + '
张图片
');
console.log(
},
"选中了第" +
fail: function(err) {
(data.tapIndex + 1) +
console.log(err.errMsg);
"个按钮,第" +
}
(data.index + 1) +
}
"张图片"
});
);
},
},
initComments() {
fail: function (err) {
this.msg.GoodsId = this.id;
console.log(err.errMsg);
this.request2(
},
{
},
url: '
/
api
/
AppletOrder
/
GetAppletGoodsCommentPageList
',
});
data: this.msg
},
},
initComments() {
res => {
this.msg.GoodsId = this.id;
this.comments = res.data.pageData;
this.request2(
{
url: "/api/AppletOrder/GetAppletGoodsCommentPageList",
data: this.msg,
},
(res) => {
this.comments = res.data.pageData;
// this.initRecommend();
// this.initRecommend();
},
},
err
=> {
(err)
=> {
this.u = uni.getStorageSync('
mall_UserInfo
'
);
this.u = uni.getStorageSync("mall_UserInfo"
);
this.init();
this.init();
this.initPage();
this.initPage();
}
}
);
);
},
},
initRecommend() {
initRecommend() {
this.request2(
this.request2(
{
{
url: '
/
api
/
AppletGoods
/
GetAppletGoodsRecommendListForZY
'
,
url: "/api/AppletGoods/GetAppletGoodsRecommendListForZY"
,
data: {
data: {
RecommendType: 1
RecommendType: 1,
}
},
},
},
res
=> {
(res)
=> {
this.recommend = res.data.List;
this.recommend = res.data.List;
}
}
);
);
},
},
setFootMarkInfo(id) {
setFootMarkInfo(id) {
this.request2(
this.request2(
{
{
url: '
/
api
/
AppletUser
/
SetUserFootMarkInfo
'
,
url: "/api/AppletUser/SetUserFootMarkInfo"
,
data: {
data: {
GoodsId: id
GoodsId: id,
}
},
},
},
res
=> {}
(res)
=> {}
);
);
},
},
joinCar() {
joinCar() {
console.log('
触发
1
'
);
console.log("触发1"
);
this.showSku = true;
this.showSku = true;
this.ot = 0;
this.ot = 0;
},
},
buy() {
buy() {
this.showSku = true;
this.showSku = true;
this.ot = 1;
this.ot = 1;
},
},
chosenSku() {
chosenSku() {
if (this.u) {
if (this.u) {
this.showSku = true;
this.showSku = true;
this.ot = 2;
this.ot = 2;
} else {
} else {
this.showAuth = true;
this.showAuth = true;
}
}
},
},
closeSkuChosen(obj) {
closeSkuChosen(obj) {
this.sku = ''
;
this.sku = ""
;
if (obj) {
if (obj) {
this.currentSku = obj;
this.currentSku = obj;
obj.attr_list.forEach((x, i) => {
obj.attr_list.forEach((x, i) => {
if (i > 0) {
if (i > 0) {
this.sku += '
,
'
;
this.sku += ","
;
}
}
this.sku += `"${x.attr_name}" `;
this.sku += `"${x.attr_name}" `;
});
});
} else {
} else {
this.g.attr_groups.forEach((x, i) => {
this.g.attr_groups.forEach((x, i) => {
if (i > 0) {
if (i > 0) {
this.sku += '
,
'
;
this.sku += ","
;
}
}
this.sku += x.attr_group_name;
this.sku += x.attr_group_name;
});
});
}
}
},
},
closeShare() {
closeShare() {
this.showShare = false;
this.showShare = false;
},
},
openShare() {
openShare() {
this.showShare = true;
this.showShare = true;
},
},
getReceive() {
getReceive() {
//分享进入调取领券接口
//分享进入调取领券接口
// 1-分享,2-购买并付款
// 1-分享,2-购买并付款
this.request2(
this.request2(
{
{
url: '
/
api
/
AppletUser
/
ShareCoupon
'
,
url: "/api/AppletUser/ShareCoupon"
,
data: {
data: {
TriggerType: 1
TriggerType: 1,
}
},
},
},
res
=> {
(res)
=> {
console.log(res, '
res
'
);
console.log(res, "res"
);
if (res.couponResultCode == 1) {
if (res.couponResultCode == 1) {
this.couponMessage = res.couponMessage;
this.couponMessage = res.couponMessage;
this.showCoupons = true;
this.showCoupons = true;
}
}
}
}
);
);
},
},
goLook() {
goLook() {
this.showCoupons = true;
this.showCoupons = true;
uni.navigateTo({
uni.navigateTo({
url: '
/
pages
/
coupon
/
index
/
index
'
url: "/pages/coupon/index/index",
});
});
},
},
closeBtn() {
closeBtn() {
this.showCoupons = false;
this.showCoupons = false;
},
},
goUrl(url) {
goUrl(url) {
uni.navigateTo({
uni.navigateTo({
url: url
url: url,
});
});
}
},
}
},
};
};
</
script
>
</
script
>
<
style
>
<
style
>
@font-face
{
@font-face
{
font-family
:
'oswald'
;
font-family
:
"oswald"
;
src
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf'
)
;
src
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf"
)
;
}
}
.goods
{
.goods
{
height
:
100%
;
height
:
100%
;
background
:
#f5f5f5
;
background
:
#f5f5f5
;
padding-bottom
:
55px
;
padding-bottom
:
55px
;
}
}
.goods
.g-info
{
.goods
.g-info
{
background
:
#fff
;
background
:
#fff
;
padding
:
10px
;
padding
:
10px
;
}
}
.goods
.g-info
.g-name
{
.goods
.g-info
.g-name
{
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
font-size
:
16px
;
font-size
:
16px
;
height
:
45px
;
height
:
45px
;
}
}
.goods
.g-info
.g-price-box
{
.goods
.g-info
.g-price-box
{
display
:
flex
;
display
:
flex
;
align-items
:
flex-end
;
align-items
:
flex-end
;
}
}
.goods
.g-info
.g-price-box
.left
{
.goods
.g-info
.g-price-box
.left
{
flex
:
1
;
flex
:
1
;
width
:
1px
;
width
:
1px
;
}
}
.goods
.g-info
.g-price-box
.left
.price
{
.goods
.g-info
.g-price-box
.left
.price
{
margin
:
15px
0
;
margin
:
15px
0
;
font-size
:
24px
;
font-size
:
24px
;
font-weight
:
bold
;
font-weight
:
bold
;
height
:
31px
;
height
:
31px
;
}
}
.goods
.g-info
.g-price-box
.left
.price
.small
{
.goods
.g-info
.g-price-box
.left
.price
.small
{
font-size
:
16px
;
font-size
:
16px
;
}
}
.goods
.numfont
{
.goods
.numfont
{
font-family
:
'oswald'
;
font-family
:
"oswald"
;
font-weight
:
unset
;
font-weight
:
unset
;
}
}
.goods
.g-info
.g-price-box
.left
.sell
{
.goods
.g-info
.g-price-box
.left
.sell
{
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
}
}
.goods
.g-info
.g-price-box
.left
.sell
.oprice
{
.goods
.g-info
.g-price-box
.left
.sell
.oprice
{
text-decoration
:
line-through
;
text-decoration
:
line-through
;
margin-right
:
12px
;
margin-right
:
12px
;
}
}
.goods
.g-info
.g-price-box
.right
{
.goods
.g-info
.g-price-box
.right
{
width
:
30px
;
width
:
30px
;
margin-left
:
20px
;
margin-left
:
20px
;
height
:
100%
;
height
:
100%
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#333
;
color
:
#333
;
}
}
.goods
.g-info
.g-price-box
.right
.share-icon
{
.goods
.g-info
.g-price-box
.right
.share-icon
{
width
:
22px
;
width
:
22px
;
height
:
22px
;
height
:
22px
;
margin-bottom
:
12
rpx
;
margin-bottom
:
12
rpx
;
}
}
.goods
.sku-box
{
.goods
.sku-box
{
margin
:
10px
0
;
margin
:
10px
0
;
background
:
#fff
;
background
:
#fff
;
display
:
flex
;
display
:
flex
;
padding
:
15px
10px
;
padding
:
15px
10px
;
align-items
:
center
;
align-items
:
center
;
}
}
.goods
.sku-box
.label
{
.goods
.sku-box
.label
{
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
margin-right
:
15px
;
margin-right
:
15px
;
}
}
.goods
.details
{
.goods
.details
{
padding
:
10px
;
padding
:
10px
;
}
}
.goods
.sku-box
.content
{
.goods
.sku-box
.content
{
width
:
1px
;
width
:
1px
;
flex
:
1
;
flex
:
1
;
color
:
#000
;
color
:
#000
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.goods
.sku-box
.content
.sku-chosen
{
.goods
.sku-box
.content
.sku-chosen
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.goods
.sku-box
.content
.sku-chosen
.arrow
{
.goods
.sku-box
.content
.sku-chosen
.arrow
{
width
:
20px
;
width
:
20px
;
}
}
.goods
.sku-box
.content
.sku-chosen
.sku
{
.goods
.sku-box
.content
.sku-chosen
.sku
{
font-size
:
12px
;
font-size
:
12px
;
width
:
1
rpx
;
width
:
1
rpx
;
flex
:
1
;
flex
:
1
;
}
}
.goods
.sku-box
.content
.suk-item
{
.goods
.sku-box
.content
.suk-item
{
margin-top
:
10px
;
margin-top
:
10px
;
display
:
flex
;
display
:
flex
;
}
}
.goods
.sku-box
.content
.suk-item
.item
{
.goods
.sku-box
.content
.suk-item
.item
{
margin-right
:
5px
;
margin-right
:
5px
;
background
:
#f5f5f5
;
background
:
#f5f5f5
;
height
:
24px
;
height
:
24px
;
line-height
:
24px
;
line-height
:
24px
;
font-size
:
12px
;
font-size
:
12px
;
padding
:
0
5px
;
padding
:
0
5px
;
border-radius
:
3px
;
border-radius
:
3px
;
overflow
:
hidden
;
overflow
:
hidden
;
color
:
#999
;
color
:
#999
;
}
}
.goods
.sku-box
.content
.suk-item
.item.img
{
.goods
.sku-box
.content
.suk-item
.item.img
{
padding
:
0
;
padding
:
0
;
width
:
24px
;
width
:
24px
;
}
}
.goods
.comment
{
.goods
.comment
{
margin
:
10px
0
;
margin
:
10px
0
;
background
:
#fff
;
background
:
#fff
;
padding
:
10px
;
padding
:
10px
;
}
}
.goods
.comment
.chead
{
.goods
.comment
.chead
{
padding-bottom
:
10px
;
padding-bottom
:
10px
;
border-bottom
:
1px
solid
#f1f1f1
;
border-bottom
:
1px
solid
#f1f1f1
;
}
}
.goods
.comment
.content
{
.goods
.comment
.content
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin-top
:
15px
;
margin-top
:
15px
;
}
}
.goods
.comment
.content
.u-box
{
.goods
.comment
.content
.u-box
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
align-items
:
center
;
align-items
:
center
;
}
}
.goods
.comment
.content
.u-box
.user
{
.goods
.comment
.content
.u-box
.user
{
flex
:
1
;
flex
:
1
;
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
align-items
:
center
;
align-items
:
center
;
display
:
flex
;
display
:
flex
;
}
}
.goods
.comment
.content
.u-box
.timer
{
.goods
.comment
.content
.u-box
.timer
{
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
text-align
:
right
;
text-align
:
right
;
flex
:
1
;
flex
:
1
;
}
}
.goods
.comment
.content
.u-box
.ucontent
{
.goods
.comment
.content
.u-box
.ucontent
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#000
;
color
:
#000
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.goods
.detals
{
.goods
.detals
{
padding
:
10px
;
padding
:
10px
;
background
:
#fff
;
background
:
#fff
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.goods
.detals
*
{
.goods
.detals
*
{
max-width
:
100%
;
max-width
:
100%
;
}
}
.goods
.is_share
{
.goods
.is_share
{
width
:
120px
;
width
:
120px
;
height
:
45px
;
height
:
45px
;
border-top-left-radius
:
22.5px
;
border-top-left-radius
:
22.5px
;
border-bottom-left-radius
:
22.5px
;
border-bottom-left-radius
:
22.5px
;
background
:
#111
;
background
:
#111
;
opacity
:
0.8
;
opacity
:
0.8
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
position
:
absolute
;
position
:
absolute
;
top
:
300px
;
top
:
300px
;
right
:
0
;
right
:
0
;
}
}
.goods
.Logo
{
.goods
.Logo
{
padding
:
1px
5px
;
padding
:
1px
5px
;
display
:
inline-block
;
display
:
inline-block
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
border-radius
:
4px
;
}
}
</
style
>
</
style
>
pages/index/index.vue
View file @
f1f1d62b
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<checkform
v-if=
"d.id == 'form'"
:forms=
"d.data"
:key=
"di"
></checkform>
<checkform
v-if=
"d.id == 'form'"
:forms=
"d.data"
:key=
"di"
></checkform>
<addialog
v-if=
"d.id == 'modal' && d.data.opened"
:ads=
"d.data"
:key=
"di"
></addialog>
<addialog
v-if=
"d.id == 'modal' && d.data.opened"
:ads=
"d.data"
:key=
"di"
></addialog>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
<pingtuan
v-if=
"d.id == 'pintuan'"
:goods=
"d.data"
:key=
"di"
></pingtuan>
</
template
>
</
template
>
</view>
</view>
</template>
</template>
...
@@ -99,6 +100,7 @@ import checkform from "@/components/checkform/index";
...
@@ -99,6 +100,7 @@ import checkform from "@/components/checkform/index";
import
addialog
from
"@/components/addialog/index"
;
import
addialog
from
"@/components/addialog/index"
;
import
quicknav
from
"@/components/quicknav/index"
;
import
quicknav
from
"@/components/quicknav/index"
;
import
coupon
from
"@/components/coupons/coupons"
;
import
coupon
from
"@/components/coupons/coupons"
;
import
pingtuan
from
"@/components/pingtuan/index"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -140,6 +142,7 @@ export default {
...
@@ -140,6 +142,7 @@ export default {
addialog
,
addialog
,
quicknav
,
quicknav
,
coupon
,
coupon
,
pingtuan
,
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
,
"option"
);
console
.
log
(
options
,
"option"
);
...
@@ -157,8 +160,27 @@ export default {
...
@@ -157,8 +160,27 @@ export default {
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
if
(
options
&&
options
.
page_id
)
{
if
(
options
&&
options
.
page_id
)
{
this
.
pageId
=
options
.
page_id
;
this
.
pageId
=
options
.
page_id
;
this
.
showtabs
=
false
;
let
queryString
=
""
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
();
for
(
var
k
in
options
)
{
queryString
+=
`&
${
k
}
=
${
options
[
k
]}
`
;
}
if
(
queryString
!=
""
)
{
queryString
=
"/pages/index/index?"
+
queryString
.
substring
(
1
,
queryString
.
length
);
}
let
p
=
0
;
if
(
uni
.
getStorageSync
(
"navs"
))
{
uni
.
getStorageSync
(
"navs"
).
forEach
(
x
=>
{
if
(
x
.
url
==
queryString
)
{
p
=
1
;
}
})
}
if
(
p
==
0
)
{
this
.
showtabs
=
false
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
();
}
}
}
if
(
options
&&
options
.
custom_params
)
{
if
(
options
&&
options
.
custom_params
)
{
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
options
.
custom_params
));
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
options
.
custom_params
));
...
@@ -181,16 +203,16 @@ export default {
...
@@ -181,16 +203,16 @@ export default {
withShareTicket
:
true
,
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
});
if
(
uni
.
getStorageSync
(
'mall_UserInfo'
))
{
if
(
uni
.
getStorageSync
(
"mall_UserInfo"
))
{
let
uid
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
;
wx
.
getUserInfo
({
wx
.
getUserInfo
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
msg
=
{
let
msg
=
{
Id
:
uid
,
Id
:
uid
,
AliasName
:
res
.
userInfo
.
nickName
,
AliasName
:
res
.
userInfo
.
nickName
,
Photo
:
res
.
userInfo
.
avatarUrl
Photo
:
res
.
userInfo
.
avatarUrl
,
}
}
;
that
.
updateuserinfo
(
msg
)
that
.
updateuserinfo
(
msg
)
;
},
},
});
});
}
}
...
@@ -253,7 +275,7 @@ export default {
...
@@ -253,7 +275,7 @@ export default {
},
},
methods
:
{
methods
:
{
updateuserinfo
(
msg
){
updateuserinfo
(
msg
)
{
this
.
request2
(
this
.
request2
(
{
{
url
:
"/api/MemberUser/SetMemberPhoto"
,
url
:
"/api/MemberUser/SetMemberPhoto"
,
...
@@ -413,6 +435,64 @@ export default {
...
@@ -413,6 +435,64 @@ export default {
y
.
templateBg
=
{
titleColor
:
"#000"
};
y
.
templateBg
=
{
titleColor
:
"#000"
};
}
}
});
});
this
.
myPageData
.
home_pages
.
navs
[
0
].
template
.
data
.
push
({
id
:
"pintuan"
,
permission_key
:
"pintuan"
,
data
:
{
buttonColor
:
"#ff4544"
,
list
:
[
{
id
:
179402
,
name
:
"日本POLA宝丽黑BA限定小礼盒(黑ba水20ml +黑ba乳液15ml +黑ba面霜5g +黑ba唇颊膏2g)"
,
picUrl
:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200506/904171cab7db2201f6f35c0ca5bb0a93.png"
,
price
:
"388.00"
,
peopleNum
:
2
,
pintuanPrice
:
"348.00"
,
},
{
id
:
178355
,
name
:
"日本珂润(Curel)润浸保湿 滋养乳霜 40g 敏感肌专用 神经酰胺护理 抵抗外部刺激"
,
picUrl
:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200503/979653726a7bc1df0e24464f94b404bd.jpg"
,
price
:
"180.00"
,
peopleNum
:
2
,
pintuanPrice
:
"180.00"
,
},
{
id
:
178352
,
name
:
"500g 干羊肚菌 干货 煲汤菌 菌中之王 包邮"
,
picUrl
:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200311/358dd9acf5dafd3cab2c05be3354400c.png"
,
price
:
"780.00"
,
peopleNum
:
3
,
pintuanPrice
:
"680.00"
,
},
],
listStyle
:
1
,
textStyle
:
1
,
fill
:
1
,
goodsCoverProportion
:
"1-1"
,
goodsStyle
:
1
,
showGoodsName
:
true
,
showBuyBtn
:
true
,
buyBtnStyle
:
1
,
buyBtnText
:
"去拼团"
,
showGoodsTag
:
false
,
customizeGoodsTag
:
false
,
goodsTagPicUrl
:
""
,
showImg
:
false
,
backgroundColor
:
"#fff"
,
backgroundPicUrl
:
""
,
position
:
5
,
mode
:
1
,
backgroundHeight
:
100
,
backgroundWidth
:
100
,
borderBackground
:
"#ffffff"
,
},
});
},
},
getReceive
()
{
getReceive
()
{
//分享进入调取领券接口
//分享进入调取领券接口
...
...
pages/pintuan/tuangood.vue
0 → 100644
View file @
f1f1d62b
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