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
5eecc271
Commit
5eecc271
authored
Feb 06, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a38ab5d0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
662 additions
and
735 deletions
+662
-735
goodsku.vue
components/goods/goodsku.vue
+10
-25
index.vue
components/goods/sign/index.vue
+652
-710
No files found.
components/goods/goodsku.vue
View file @
5eecc271
...
...
@@ -16,8 +16,7 @@
</view>
</view>
</view>
<scroll-view
scroll-y
class=
"sku-box"
:style=
"
{'max-height':x.isdateformat==1?'400px':'300px'}">
<scroll-view
scroll-y
class=
"sku-box"
:style=
"
{'max-height':x.isdateformat==1?'400px':'300px'}">
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
:key=
"i"
v-if=
"x.isdateformat==0"
>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
...
...
@@ -31,7 +30,7 @@
</view>
</view>
</view>
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==1"
>
<!--
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==1"
>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
<view
class=
"sku-chi"
:style=
"
{
...
...
@@ -43,15 +42,12 @@
<text
class=
"val"
>
{{
y
.
attr_name
}}
</text>
</view>
</view>
</view>
</view>
-->
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==1"
>
<!--x.isdateformat=1 改成日历模式 -->
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
<calendar
@
finish=
"chosenDateResult"
:defaultDate=
"x.attr_list[0].attr_name"
:immediately=
"true"
:priceList=
"x.attr_list"
></calendar>
<calendar
@
finish=
"chosenDateResult"
:defaultDate=
"x.attr_list[0].attr_name"
:immediately=
"true"
:priceList=
"x.attr_list"
></calendar>
</view>
</view>
</scroll-view>
...
...
@@ -250,11 +246,10 @@
},
methods
:
{
chosenDateResult
(
result
)
{
console
.
log
(
result
,
'---'
)
for
(
let
index
=
0
;
index
<
this
.
g
.
attr_groups
.
length
;
index
++
){
for
(
let
j
=
0
;
j
<
this
.
g
.
attr_groups
[
index
].
attr_list
.
length
;
j
++
){
if
(
this
.
g
.
attr_groups
[
index
].
attr_list
[
j
].
attr_name
==
result
.
start
){
this
.
clickSkuItemHandler
(
j
,
index
)
for
(
let
index
=
0
;
index
<
this
.
g
.
attr_groups
.
length
;
index
++
)
{
for
(
let
j
=
0
;
j
<
this
.
g
.
attr_groups
[
index
].
attr_list
.
length
;
j
++
)
{
if
(
this
.
g
.
attr_groups
[
index
].
attr_list
[
j
].
attr_name
==
result
.
start
)
{
this
.
clickSkuItemHandler
(
j
,
index
)
}
}
}
...
...
@@ -420,8 +415,6 @@
}
});
}
if
(
unchosen
!=
''
)
{
this
.
sku
=
unchosen
;
this
.
skuObj
=
null
;
...
...
@@ -493,15 +486,13 @@
}
});
}
console
.
log
(
"priceSign"
,
priceSign
);
console
.
log
(
"sign"
,
sign
);
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
g
.
attr_groups
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
isdateformat
==
1
)
{
if
(
x
.
attr_list
&&
x
.
attr_list
.
length
>
0
)
{
x
.
attr_list
.
forEach
((
subItem
,
subIndex
)
=>
{
x
.
attr_list
.
forEach
((
subItem
,
subIndex
)
=>
{
var
newSign
=
(
subIndex
+
1
)
+
":"
+
priceSign
;
console
.
log
(
"subItem"
,
subItem
);
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
this
.
g
.
attr
.
forEach
(
y
=>
{
if
(
y
.
sign_id
==
newSign
)
{
...
...
@@ -512,13 +503,10 @@
}
})
}
console
.
log
(
"x"
,
x
)
}
});
}
console
.
log
(
"this.g.attr_groups"
,
this
.
g
.
attr_groups
)
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
this
.
g
.
attr
.
forEach
(
x
=>
{
if
(
x
.
sign_id
==
sign
)
{
...
...
@@ -526,12 +514,9 @@
}
});
}
if
(
this
.
skuObj
!=
null
)
{
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
gc
)).
toFixed
(
2
);
console
.
log
(
"this.goodprice2"
,
this
.
goodprice
);
this
.
goodamount
=
this
.
skuObj
.
stock
;
}
},
...
...
components/goods/sign/index.vue
View file @
5eecc271
This diff is collapsed.
Click to expand it.
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