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
b545d4b8
Commit
b545d4b8
authored
Mar 01, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
93854d59
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
519 additions
and
24 deletions
+519
-24
list.vue
components/goods/list.vue
+12
-1
kotragoodsaction.vue
pages/goods/components/kotragoodsaction.vue
+304
-0
goods.vue
pages/goods/goods.vue
+202
-22
list.vue
pages/goods/list.vue
+1
-1
No files found.
components/goods/list.vue
View file @
b545d4b8
...
@@ -23,7 +23,10 @@
...
@@ -23,7 +23,10 @@
</view>
</view>
{{
cx
.
name
}}
{{
cx
.
name
}}
</view>
</view>
<view
class=
"good-info"
v-if=
"this.setting&&this.setting.is_show_korea!=1"
>
<view
class=
"goodsSubName"
>
{{
cx
.
subName
}}
</view>
<view
class=
"good-info"
v-if=
"setting&&setting.is_show_korea==0"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">¥
{{
cx
.
price
}}
</view>
<view
class=
"price"
:style=
"
{ color: mainColor }">¥
{{
cx
.
price
}}
</view>
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
v-if=
"setting.is_show_cart==1"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<view
v-if=
"setting.is_show_cart==1"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
...
@@ -196,4 +199,12 @@
...
@@ -196,4 +199,12 @@
margin-right
:
5
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
border-radius
:
4px
;
}
}
.u-good-list
.goodsSubName
{
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
font-size
:
13px
;
margin
:
-7px
10px
10px
10px
;
height
:
17px
;
}
</
style
>
</
style
>
pages/goods/components/kotragoodsaction.vue
0 → 100644
View file @
b545d4b8
<
template
>
<view
class=
"actionsheet"
:style=
"
{ 'padding-bottom': bian ? '28px' : '0px' }">
<view
class=
"item"
style=
"width:36px;"
@
click=
"goIndex"
>
<view
style=
"width: 22px; margin: auto;"
><u-icon
name=
"wap-home-o"
size=
"44"
></u-icon></view>
<text
class=
"text"
>
首页
</text>
</view>
<view
class=
"item"
@
click=
"openShare"
>
<view
style=
"width: 22px; margin: auto;"
><u-icon
name=
"share-o"
size=
"44"
color=
"#333"
></u-icon></view>
<text
class=
"text"
>
分享
</text>
</view>
<view
class=
"item"
@
click=
"setFavorite"
>
<view
style=
"width: 22px; margin: auto;"
><u-icon
:name=
"favorStatus ? 'like' : 'like-o'"
size=
"44"
:color=
"favorStatus ? mc : '#333'"
></u-icon></view>
<text
class=
"text"
>
收藏
</text>
</view>
<view
class=
"item2"
style=
"padding:0;position: relative;"
>
<view
style=
"flex: 1;"
>
<button
open-type=
"contact"
class=
"KoraBtnList"
>
联系我们
</button>
</view>
<view
class=
"KoraLine"
></view>
<view
style=
"flex: 1;"
>
<button
open-type=
"contact"
class=
"KoraBtnList"
>
在线客服
</button>
</view>
</view>
<view
class=
"item2"
v-if=
"totalStock>0 && status==1 && formid==1"
@
click=
'buy'
>
<view
style=
"flex: 1;"
><u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn4"
>
立即报名
</u-button></view>
</view>
<view
class=
"item2"
v-if=
"totalStock==0 "
>
<view
style=
"flex: 1;"
><u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn3"
>
售馨
</u-button></view>
</view>
<view
class=
"item2"
v-if=
" status==2"
>
<view
style=
"flex: 1;"
><u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn3"
>
已下架
</u-button></view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<share
:good-id=
"shareObj.goodId"
v-if=
"showShare"
:good-name=
"shareObj.goodName"
:images=
"shareObj.coverPic"
:advertising=
"shareObj.advertising"
@
close=
"closeShare"
></share>
</view>
</
template
>
<
script
>
import
auth
from
"@/components/auth/index"
;
import
share
from
"../components/share/share"
;
export
default
{
props
:
[
'coverPic'
,
'goodName'
,
'favorite'
,
'goodId'
,
'totalStock'
,
'status'
,
'formid'
],
data
()
{
return
{
mc
:
''
,
fu
:
''
,
bian
:
false
,
btn1
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'40px 0 0 40px'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
},
btn2
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'0 40px 40px 0'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
},
btn4
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'40px'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
},
btn3
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'40px'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
,
background
:
'#ababab'
},
path
:
''
,
favorStatus
:
false
,
//是否显示登陆
showAuth
:
false
,
u
:
{},
showShare
:
false
,
shareObj
:{}
};
},
components
:
{
auth
,
share
},
mounted
()
{
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
fu
=
this
.
$uiConfig
.
secondary
;
this
.
bian
=
this
.
$utils
.
is_biang
;
this
.
btn1
.
background
=
this
.
fu
;
this
.
btn2
.
background
=
this
.
mc
;
this
.
btn4
.
background
=
this
.
mc
;
this
.
getfu
()
let
t
=
getCurrentPages
();
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
this
.
path
=
'/pages/index/index?id='
+
this
.
goodId
+
"&user_id="
+
uid
+
"&Up="
+
Up
+
'&JumpType=1'
;
//console.log(t[t.length - 1]);
this
.
favorStatus
=
this
.
favorite
;
this
.
shareObj
.
goodId
=
this
.
goodId
;
this
.
shareObj
.
goodName
=
this
.
goodName
;
this
.
shareObj
.
coverPic
=
this
.
coverPic
;
this
.
shareObj
.
advertising
=
''
;
},
methods
:
{
getfu
(){
let
fucolor
=
this
.
colorRgb
(
this
.
fu
)
;
var
RgbValue
=
fucolor
.
replace
(
"rgb("
,
""
).
replace
(
")"
,
""
);
var
RgbValueArry
=
RgbValue
.
split
(
","
);
var
grayLevel
=
RgbValueArry
[
0
]
*
0.299
+
RgbValueArry
[
1
]
*
0.587
+
RgbValueArry
[
2
]
*
0.114
;
console
.
log
(
grayLevel
)
if
(
grayLevel
>=
192
){
this
.
btn1
.
color
=
this
.
mc
;
}
else
{
this
.
btn1
.
color
=
'#FFF'
;
}
},
colorRgb
(
color
)
{
var
sColor
=
color
.
toLowerCase
();
//十六进制颜色值的正则表达式
var
reg
=
/^#
([
0-9a-fA-f
]{3}
|
[
0-9a-fA-f
]{6})
$/
;
// 如果是16进制颜色
if
(
sColor
&&
reg
.
test
(
sColor
))
{
if
(
sColor
.
length
===
4
)
{
var
sColorNew
=
"#"
;
for
(
var
i
=
1
;
i
<
4
;
i
+=
1
)
{
sColorNew
+=
sColor
.
slice
(
i
,
i
+
1
).
concat
(
sColor
.
slice
(
i
,
i
+
1
));
}
sColor
=
sColorNew
;
}
//处理六位的颜色值
var
sColorChange
=
[];
for
(
var
i
=
1
;
i
<
7
;
i
+=
2
)
{
sColorChange
.
push
(
parseInt
(
"0x"
+
sColor
.
slice
(
i
,
i
+
2
)));
}
return
sColorChange
.
join
(
","
);
}
return
sColor
;
},
goIndex
()
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
});
},
setFavorite
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
request2
(
{
url
:
'/api/AppletUser/SetUserCollectionInfo'
,
data
:
{
GoodsId
:
this
.
goodId
}
},
res
=>
{
this
.
favorStatus
=
!
this
.
favorStatus
;
}
);
}
},
joinCar
()
{
console
.
log
(
'操作'
)
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
console
.
log
(
'传入父组件'
)
this
.
$emit
(
'joincar'
);
}
},
buy
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
$emit
(
'buy'
);
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
(){
this
.
showAuth
=
false
;
},
openShare
()
{
if
(
this
.
u
)
{
this
.
showShare
=
true
;
}
else
{
this
.
showAuth
=
true
;
}
},
closeShare
()
{
this
.
showShare
=
false
;
},
}
};
</
script
>
<
style
>
.actionsheet
{
display
:
flex
;
background
:
#fff
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
z-index
:
3
;
height
:
50px
;
align-items
:
center
;
}
.actionsheet
.item
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
margin
:
0
10px
;
color
:
#333
;
font-size
:
12px
;
padding
:
3px
0
;
width
:
30px
;
position
:
relative
;
}
.actionsheet
.item
.text
{
margin-top
:
2px
;
text-align
:
center
;
}
.actionsheet
.item2
{
flex
:
1
;
width
:
1px
;
padding
:
5px
;
box-sizing
:
border-box
;
margin-left
:
10px
;
height
:
100%
;
display
:
flex
;
}
.actionsheet
.item
button
{
width
:
100%
;
height
:
100%
;
opacity
:
0
;
left
:
0
;
top
:
0
;
position
:
absolute
;
}
.KoraBtnList
{
width
:
100%
;
height
:
100%
;
background-color
:
#0b0052
;
color
:
#fff
;
font-size
:
16px
;
text-align
:
center
;
line-height
:
50px
;
border-radius
:
0
;
}
.KoraLine
{
width
:
1px
;
height
:
20px
;
background-color
:
#fff
;
position
:
absolute
;
left
:
124px
;
top
:
15px
;
z-index
:
99
;
}
</
style
>
pages/goods/goods.vue
View file @
b545d4b8
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</block>
</block>
</swiper>
</swiper>
<!-- TODO 分销价格未做 is_share_price -->
<!-- TODO 分销价格未做 is_share_price -->
<view
class=
"is_share"
v-if=
"g.share > 0 && hideshare == false"
style=
"top:240px;"
>
<view
class=
"is_share"
v-if=
"g.share > 0 && hideshare == false
&&setting.is_show_korea==0
"
style=
"top:240px;"
>
<image
<image
src=
"@/static/images/icon/WechatIMG424.png"
src=
"@/static/images/icon/WechatIMG424.png"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
</view>
</view>
<u-icon
name=
"close"
style=
'position: absolute;right: 4px;top: 12.5px;'
color=
"#fff"
size=
"40"
@
click=
'hideshare=true'
></u-icon>
<u-icon
name=
"close"
style=
'position: absolute;right: 4px;top: 12.5px;'
color=
"#fff"
size=
"40"
@
click=
'hideshare=true'
></u-icon>
</view>
</view>
<view
class=
"is_share"
v-if=
"g.myBuyCommission > 0 && hideshare == false"
>
<view
class=
"is_share"
v-if=
"g.myBuyCommission > 0 && hideshare == false
&&setting.is_show_korea==0
"
>
<image
<image
src=
"@/static/images/icon/WechatIMG424.png"
src=
"@/static/images/icon/WechatIMG424.png"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
style=
"width: 20px; margin-left: 12px; opacity: 1;height: auto;"
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
/>
/>
{{
g
.
name
}}
{{
g
.
name
}}
</view>
</view>
<view
class=
"g-price-box"
>
<view
class=
"g-price-box"
v-if=
"setting.is_show_korea==0"
>
<view
class=
"left"
>
<view
class=
"left"
>
<view
class=
"price u-skeleton-rect"
:style=
"
{ color: mc }">
<view
class=
"price u-skeleton-rect"
:style=
"
{ color: mc }">
<u-tag
v-if=
'g.price_min!=g.original_price'
text=
"心动价"
mode=
"light"
size=
'mini'
type=
"error"
style=
'font-size: 12px;font-family: aa;margin-right: 10px;'
/>
<u-tag
v-if=
'g.price_min!=g.original_price'
text=
"心动价"
mode=
"light"
size=
'mini'
type=
"error"
style=
'font-size: 12px;font-family: aa;margin-right: 10px;'
/>
...
@@ -113,8 +113,31 @@
...
@@ -113,8 +113,31 @@
<text>
分享
</text>
<text>
分享
</text>
</view>
</view>
</view>
</view>
<template
v-if=
"setting.is_show_korea==1"
>
<view
style=
"height:50px;margin:20px 10px 0 0;"
>
<view
style=
"float:right;"
@
click=
"openShare"
v-if=
"isAllowShare == 1"
>
<image
src=
"@/static/images/icon/icon-share.png"
style=
"width:20px;height:20px;"
class=
"share-icon"
/>
</view>
</view>
<view
class=
"koarea_Country"
>
<view
style=
"flex: 1;text-align: center;border-right:1px solid #F2F3F6;"
>
<text
v-if=
"g.goods_country"
>
{{
g
.
goods_country
}}
</text>
</view>
<view
style=
"flex: 1;text-align: center;border-right:1px solid #F2F3F6;"
>
无
</view>
<view
style=
"flex: 1;text-align: center;"
v-if=
"g.cats&&g.cats.length>0"
>
{{
g
.
cats
[
0
].
CategoryName
}}
</view>
</view>
<view
style=
"text-align: left;border-bottom:1px solid #F2F3F6;padding:15px 0"
>
卖点:
<text
v-if=
"g.subname"
>
{{
g
.
subname
}}
</text>
</view>
<view
style=
"text-align: left;border-bottom:1px solid #F2F3F6;padding:15px 0"
>
海关代码/关税率:
<text
v-if=
"g.fatcode"
>
{{
g
.
fatcode
}}
</text>
</view>
<view
style=
"text-align: left;padding:15px 0 5px 0"
>
官网:
<text
v-if=
"g.goodsurl"
>
{{
g
.
goodsurl
}}
</text>
</view>
</
template
>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
style=
"margin: 0;padding: 10px;"
v-if=
"g.friendUrl!=null && g.friendUrl!=''"
@
click=
"goCoiling(g.friendUrl)"
>
<view
class=
"sku-box u-skeleton-rect"
style=
"margin: 0;padding: 10px;"
v-if=
"g.friendUrl!=null && g.friendUrl!=''
&&setting.is_show_korea==0
"
@
click=
"goCoiling(g.friendUrl)"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/goodsCoiling.png"
style=
"width: 100%;height: 68px;"
/>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/goodsCoiling.png"
style=
"width: 100%;height: 68px;"
/>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
v-if=
"(g.goods_marketing_award.integral.title != '')|| (g.goods_marketing_award.PresentFXGradeMsg != '')|| g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)"
>
<view
class=
"sku-box u-skeleton-rect"
style=
"align-items: flex-start;"
v-if=
"(g.goods_marketing_award.integral.title != '')|| (g.goods_marketing_award.PresentFXGradeMsg != '')|| g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)"
>
...
@@ -161,7 +184,7 @@
...
@@ -161,7 +184,7 @@
</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
&&setting.is_show_korea==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"
>
...
@@ -207,7 +230,7 @@
...
@@ -207,7 +230,7 @@
<view
class=
"label"
>
发货地
</view>
<view
class=
"label"
>
发货地
</view>
<view
class=
"content"
>
{{g.sendArea }}
</view>
<view
class=
"content"
>
{{g.sendArea }}
</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'
&&setting.is_show_korea==0
"
>
<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>
...
@@ -223,13 +246,13 @@
...
@@ -223,13 +246,13 @@
<view
<view
class=
"sku-box u-skeleton-rect"
class=
"sku-box u-skeleton-rect"
style=
"margin-top: -10;"
style=
"margin-top: -10;"
v-if=
"g.goods_marketing.limit != ''"
v-if=
"g.goods_marketing.limit != ''
&&setting.is_show_korea==0
"
>
>
<view
class=
"label"
>
限购
</view>
<view
class=
"label"
>
限购
</view>
<view
class=
"content"
>
{{ g.goods_marketing.limit }}
</view>
<view
class=
"content"
>
{{ g.goods_marketing.limit }}
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment == 1"
>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment == 1
&&setting.is_show_korea==0
"
>
<view
class=
"label"
>
暂无评论信息
</view>
<view
class=
"label"
>
暂无评论信息
</view>
</view>
</view>
<view
class=
"comment"
v-if=
"comments.length > 0"
>
<view
class=
"comment"
v-if=
"comments.length > 0"
>
...
@@ -269,24 +292,65 @@
...
@@ -269,24 +292,65 @@
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
</view>
</view>
<
template
v-if=
"setting.is_show_korea==1"
>
<view
style=
"width:100%;height:1px;border-top:1px solid #FFFFFF;margin:20px 0;"
></view>
<view
class=
"commontList"
v-for=
"(item,index) in compentList"
:key=
"index"
>
<view>
<img
:src=
"item.UserPhoto"
style=
"width:30px;height:30px;border-radius: 50%;"
alt=
""
>
</view>
<view
style=
"width:100%;margin-left:10px;"
>
<view
style=
"color:#000000;font-size:14px;margin-bottom:5px;"
>
{{
item
.
UserName
}}
</view>
<view
style=
"color:#909399;font-size:13px;"
>
{{
item
.
Content
}}
</view>
</view>
<view
@
click=
"delCompent(item)"
v-if=
"item.UserId==u.UserId"
>
<u-icon
name=
"delete"
color=
"red"
size=
"40"
></u-icon>
</view>
</view>
<view
v-if=
"compentTotal>1"
style=
"display: flex;justify-content: end;float:right;margin-bottom:20px;"
>
<view
class=
"fenyeBtn"
v-if=
"comListMsg.pageIndex>1"
@
click=
"goBefore"
>
上一页
</view>
<view
class=
"fenyeBtn"
v-if=
"comListMsg.pageIndex
<compentTotal
"
@
click=
"goAfter"
>
下一页
</view>
</view>
<view
style=
"padding:10px;margin-top:30px;"
>
<view
style=
"margin:10px 0;"
>
留言(至少填写10个文字)
</view>
<view>
<textarea
placeholder=
"请输入评论信息"
style=
"width: 94.5%;height: 100px;border:1px solid #d1d1d1;
padding:10px;background-color: #fff;"
confirm-type=
'done'
v-model=
"comentMsg.Content"
>
</textarea>
</view>
<view
class=
"goodComentBtn"
@
click=
"submitCommit"
>
提交留言
</view>
</view>
</
template
>
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
或许你喜欢
</u-divider>
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
或许你喜欢
</u-divider>
<view
style=
"width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
>
<view
style=
"width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
>
<goodlist
:list=
"recommend"
></goodlist>
<goodlist
:list=
"recommend"
></goodlist>
</view>
</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
<
template
v-if=
"setting&&setting.is_show_korea==0"
>
v-if=
"!loading"
<goodsaction
:good-name=
"g.name"
v-if=
"!loading"
:cover-pic=
"g.cover_pic"
:good-name=
"g.name"
:favorite=
"g.favorite"
:cover-pic=
"g.cover_pic"
:good-id=
"id"
:favorite=
"g.favorite"
:total-stock=
"g.totalStock"
:good-id=
"id"
:status=
"g.status"
:total-stock=
"g.totalStock"
:formid=
'g.form_id'
:status=
"g.status"
@
joincar=
"joinCar"
:formid=
'g.form_id'
@
buy=
"buy"
@
joincar=
"joinCar"
></goodsaction>
@
buy=
"buy"
></goodsaction>
</
template
>
<
template
v-if=
"setting&&setting.is_show_korea==1"
>
<kotragoodsaction
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"
@
buy=
"buy"
>
</kotragoodsaction>
</
template
>
<goodsku
<goodsku
v-if=
"!loading && showSku"
v-if=
"!loading && showSku"
border-radius=
"10"
border-radius=
"10"
...
@@ -324,6 +388,7 @@ const dom = weex.requireModule("dom");
...
@@ -324,6 +388,7 @@ 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
kotragoodsaction
from
"./components/kotragoodsaction"
;
//韩国馆项目引用
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"
;
...
@@ -367,16 +432,29 @@ export default {
...
@@ -367,16 +432,29 @@ export default {
vipState
:
{},
vipState
:
{},
Up
:
0
,
Up
:
0
,
hideshare
:
false
,
hideshare
:
false
,
comentMsg
:{
GoodsId
:
0
,
Content
:
''
},
comListMsg
:{
pageIndex
:
1
,
pageSize
:
2
,
GoodsId
:
0
},
compentList
:[]
,
//评论列表
compentTotal
:
0
,
curren
:
1
};
};
},
},
components
:
{
components
:
{
goodlist
,
goodlist
,
goodsaction
,
goodsaction
,
kotragoodsaction
,
goodsku
,
goodsku
,
auth
,
auth
,
coupon
,
coupon
,
share
,
share
,
hParse
,
hParse
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
opTionObj
=
option
;
this
.
opTionObj
=
option
;
...
@@ -439,6 +517,8 @@ export default {
...
@@ -439,6 +517,8 @@ export default {
withShareTicket
:
true
,
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
});
this
.
comListMsg
.
GoodsId
=
this
.
id
;
this
.
getCommitList
();
},
},
onShareTimeline
()
{
onShareTimeline
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -798,6 +878,78 @@ export default {
...
@@ -798,6 +878,78 @@ export default {
},
},
goCoiling(url){//跳转发圈页面
goCoiling(url){//跳转发圈页面
uni.navigateTo({ url: url })
uni.navigateTo({ url: url })
},
//提交留言
submitCommit(){
this.comentMsg.GoodsId = this.id;
if(this.comentMsg.Content==''){
uni.showToast({
title: "请输入评价内容",
icon:'
none
'
});
return;
}
this.request2(
{
url: "/api/AppletGoods/SetGoodsLeavemessage",
data: this.comentMsg,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "评价成功"
});
this.getCommitList();
}
}
);
},
//获取评论信息
getCommitList(){
this.request2(
{
url: "/api/AppletGoods/GetGoodsLeaveMessagePage",
data: this.comListMsg,
},
(res) => {
if (res.resultCode == 1) {
this.compentTotal = res.data.pageCount;
this.compentList =res.data.pageData;
}
}
);
},
//上一页
goBefore(){
this.comListMsg.pageIndex--;
if(this.comListMsg.pageIndex<1){
this.comListMsg.pageIndex=1
}
this.getCommitList();
},
//下一页
goAfter(){
if(this.comListMsg.pageIndex<this.compentTotal){
this.comListMsg.pageIndex++;
}
this.getCommitList();
},
//删除评论
delCompent(item){
this.request2(
{
url: "/api/AppletGoods/RemoveGoodsLeavemessage",
data: {Id:item.Id},
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "删除成功"
});
this.getCommitList();
}
}
);
}
}
},
},
};
};
...
@@ -997,4 +1149,32 @@ export default {
...
@@ -997,4 +1149,32 @@ export default {
margin
:
0
;
margin
:
0
;
pointer-events
:
none
;
pointer-events
:
none
;
}
}
.koarea_Country
{
display
:
flex
;
justify-content
:
space-between
;
padding-bottom
:
10px
;
border-bottom
:
1px
solid
#F2F3F6
;
}
.commontList
{
display
:
flex
;
padding
:
0
10px
;
margin-bottom
:
10px
;
}
.goodComentBtn
{
width
:
100%
;
height
:
40px
;
text-align
:
center
;
line-height
:
40px
;
background-color
:
#0b0052
;
color
:
#fff
;
margin-top
:
10px
;
font-size
:
16px
;
}
.fenyeBtn
{
padding
:
3px
6px
;
background-color
:
#00BFFF
;
color
:
#fff
;
font-size
:
12px
;
margin
:
0
10px
20px
0
;
}
</
style
>
</
style
>
pages/goods/list.vue
View file @
b545d4b8
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
StoreId
:
0
,
StoreId
:
0
,
},
},
newsortType
:
1
,
newsortType
:
1
,
isShowKorea
:
0
,
//是否显示韩国的 0
显示 1不显示
isShowKorea
:
0
,
//是否显示韩国的 0
不显示 1显示韩国的
};
};
},
},
components
:
{
components
:
{
...
...
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