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
7393afe0
Commit
7393afe0
authored
Jun 04, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
70318f23
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
42 deletions
+44
-42
style11.vue
components/cats/style11.vue
+1
-1
list.vue
components/goods/list.vue
+5
-5
style4.vue
components/goods/style4.vue
+4
-6
goods.vue
pages/goods/goods.vue
+18
-16
search.vue
pages/search/search.vue
+16
-14
No files found.
components/cats/style11.vue
View file @
7393afe0
...
...
@@ -126,7 +126,7 @@ export default {
this
.
init
();
},
clickHandler
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
I
d
});
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
i
d
});
},
init
()
{
this
.
CategoryIdsList
=
[];
...
...
components/goods/list.vue
View file @
7393afe0
...
...
@@ -6,16 +6,16 @@
<view
class=
"good-img"
>
<image
mode=
"aspectFill"
:src=
"cx.
CoverImage
"
:src=
"cx.
cover_pic
"
style=
"width: 100%; height: 100%;"
/>
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name=='1'"
>
{{
cx
.
N
ame
}}
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name=='1'"
>
{{
cx
.
n
ame
}}
</view>
<view
class=
"good-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
¥
{{
cx
.
SellingP
rice
}}
</view>
¥
{{
cx
.
p
rice
}}
</view>
<!-- v-if="setting.is_show_sales_num=='1'" -->
<view
class=
"sell"
>
已售
{{
cx
.
SalesNum
}}
</view>
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
v-if=
"setting.is_show_cart=='1'"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
/>
</view>
...
...
@@ -65,7 +65,7 @@ export default {
},
methods
:
{
initConfig
()
{
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
setting
},
clickHandler
(
item
)
{
console
.
log
(
"GoodsId"
,
item
)
...
...
components/goods/style4.vue
View file @
7393afe0
...
...
@@ -11,7 +11,7 @@
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
click=
"openGood(item
.page_url
)"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background:
...
...
@@ -99,14 +99,12 @@ export default {
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
url
)
{
uni
.
navigateTo
({
url
:
url
});
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
},
showSkuHandler
(
g
){
this
.
sku
=
g
this
.
showSku
=
true
this
.
showSku
=
true
},
//格式化价格添加.00
// getPrice(value){
...
...
pages/goods/goods.vue
View file @
7393afe0
...
...
@@ -231,7 +231,9 @@ export default {
isExsitGoods
:
true
,
pageTitle
:
"商品详情"
,
setting
:{},
prevPage
:
""
prevPage
:
""
,
//自定义接手传递
opTionObj
:{}
};
},
components
:
{
...
...
@@ -241,12 +243,14 @@ export default {
auth
,
},
onLoad
(
option
)
{
this
.
id
=
option
.
id
?
option
.
id
:
46942
;
//40887 59512 46942
console
.
log
(
option
,
'optionnnn'
);
this
.
opTionObj
=
option
;
this
.
id
=
option
.
GoodsId
?
option
.
GoodsId
:
46942
;
//40887 59512 46942
this
.
init
();
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
initPage
();
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
setting
},
methods
:
{
initPage
()
{
...
...
@@ -271,17 +275,16 @@ export default {
},
init
()
{
this
.
loading
=
true
;
this
.
request
(
this
.
request
2
(
{
url
:
""
,
url
:
"
/api/AppletGoods/GetAppletGoodsInfo
"
,
data
:
{
r
:
"api/goods/detail"
,
id
:
this
.
id
,
GoodsId
:
this
.
opTionObj
.
GoodsId
},
},
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
0
)
{
console
.
log
(
res
,
'详情'
);
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
pic_url
.
forEach
((
x
)
=>
{
this
.
imgs
.
push
(
x
.
pic_url
);
...
...
@@ -303,6 +306,7 @@ export default {
this
.
detailContent
=
richtext
;
this
.
loading
=
false
;
this
.
initComments
();
this
.
initRecommend
();
}
else
{
this
.
isExsitGoods
=
false
;
}
...
...
@@ -343,22 +347,20 @@ export default {
},
(
res
)
=>
{
this
.
comments
=
res
.
data
;
this
.
initRecommend
();
//
this.initRecommend();
}
);
},
initRecommend
()
{
this
.
request
(
this
.
request
2
(
{
url
:
""
,
url
:
"
/api/AppletGoods/GetAppletGoodsRecommendListForZY
"
,
data
:
{
r
:
"api/goods/new-recommend"
,
goods_id
:
this
.
id
,
type
:
"goods"
,
RecommendType
:
1
,
},
},
(
res
)
=>
{
this
.
recommend
=
res
.
data
.
l
ist
;
this
.
recommend
=
res
.
data
.
L
ist
;
}
);
},
...
...
pages/search/search.vue
View file @
7393afe0
...
...
@@ -166,18 +166,17 @@ export default {
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
//为你推荐
initRecommend
()
{
this
.
request
(
this
.
request
2
(
{
url
:
""
,
url
:
"
/api/AppletGoods/GetAppletGoodsRecommendListForZY
"
,
data
:
{
r
:
"api/goods/new-recommend"
,
goods_id
:
0
,
type
:
"goods"
,
RecommendType
:
1
},
},
(
res
)
=>
{
this
.
recommedGoods
=
res
.
data
.
l
ist
;
this
.
recommedGoods
=
res
.
data
.
L
ist
;
}
);
},
...
...
@@ -249,20 +248,23 @@ export default {
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
this
.
request
(
this
.
request
2
(
{
url
:
""
,
url
:
"
/api/AppletGoods/GetAppletGoodsPageListForZY
"
,
data
:
{
r
:
"api/default/goods-list"
,
page
:
this
.
page
,
keyword
:
this
.
searchKey
,
sign
:
""
,
pageIndex
:
1
,
pageSize
:
20
,
Name
:
this
.
searchKey
,
GoodsType
:
0
,
CategoryIds
:
''
,
OrderBy
:
1
},
},
(
res
)
=>
{
console
.
log
(
res
,
'搜索ress'
);
this
.
showLoading
=
true
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
list
);
this
.
page_count
=
res
.
data
.
pag
ination
.
pag
e_count
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
page_count
;
if
(
this
.
page_count
==
1
)
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
...
...
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