Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
bea9665b
Commit
bea9665b
authored
Sep 28, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:links
parent
6877dffb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
165 additions
and
17 deletions
+165
-17
avatorSwiper-gx.vue
src/components/avatorSwiper-gx.vue
+98
-0
avatorSwiper.vue
src/components/avatorSwiper.vue
+60
-8
groupShare.vue
src/components/groupShare.vue
+1
-3
smallPic-gx.vue
src/views/goodsDetail/smallPic-gx.vue
+0
-3
smallPic.vue
src/views/goodsDetail/smallPic.vue
+5
-0
index.vue
src/views/goodsList/index.vue
+1
-3
No files found.
src/components/avatorSwiper
_beisir
.vue
→
src/components/avatorSwiper
-gx
.vue
View file @
bea9665b
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
ref=
"mySwiper"
ref=
"mySwiper"
:options=
"swiperOptions"
:options=
"swiperOptions"
class=
"avator-swiper_container"
class=
"avator-swiper_container"
@
slide-change=
"slideChange"
@
set-translate=
"setTranslate"
@
set-translate=
"setTranslate"
>
>
<swiper-slide
v-for=
"(item, index) in avatorData"
:key=
"index"
class=
"avator-swiper_item"
>
<swiper-slide
v-for=
"(item, index) in avatorData"
:key=
"index"
class=
"avator-swiper_item"
>
...
@@ -36,7 +37,6 @@ export default {
...
@@ -36,7 +37,6 @@ export default {
}
}
},
},
data
()
{
data
()
{
const
vm
=
this
;
return
{
return
{
activeIndex
:
0
,
activeIndex
:
0
,
swiperOptions
:
{
swiperOptions
:
{
...
@@ -48,38 +48,10 @@ export default {
...
@@ -48,38 +48,10 @@ export default {
centeredSlides
:
true
,
centeredSlides
:
true
,
watchSlidesProgress
:
true
,
watchSlidesProgress
:
true
,
allowTouchMove
:
false
,
allowTouchMove
:
false
,
autoplay
:
false
,
autoplay
:
{
delay
:
900
,
on
:
{
stopOnLastSlide
:
false
,
init
:
function
()
{
disableOnInteraction
:
false
const
slideLeft
=
this
.
slides
.
eq
(
this
.
activeIndex
);
console
.
log
(
slideLeft
);
// slideLeft.addClass('ani-left');
},
// transitionStart: function() {
// const activeIndex = this.activeIndex;
// const slideLeft = this.slides.eq(activeIndex);
// const slideRight = this.slides.eq(activeIndex + 7);
// vm.avatorItem = vm.getAvatorItem(slideLeft);
// vm.rightImgPath = slideRight.data('src');
// slideLeft.addClass('ani-left');
// slideRight.addClass('ani-right');
// },
transitionEnd
:
function
()
{
console
.
log
(
'
结束
'
);
vm
.
$emit
(
'
customers-end
'
,
vm
.
avatorItem
);
// // for (let i = 0; i
<
this
.
slides
.
length
;
i
++
)
{
// // let slide = this.slides.eq(i);
// // slide.removeClass('ani-left ani-right');
// // }
const
slides
=
this
.
slides
;
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
const
slide
=
slides
.
eq
(
i
);
const
progress
=
slides
[
i
].
progress
;
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
}
}
}
}
}
}
};
};
...
@@ -89,14 +61,10 @@ export default {
...
@@ -89,14 +61,10 @@ export default {
return
this
.
$refs
.
mySwiper
.
swiper
;
return
this
.
$refs
.
mySwiper
.
swiper
;
}
}
},
},
mounted
()
{
// this.onSlidePrevChange();
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
);
// this.onSlidePrevChange();
},
methods
:
{
methods
:
{
slideChange
()
{
this
.
activeIndex
=
this
.
swiper
.
realIndex
;
},
setTranslate
()
{
setTranslate
()
{
const
slides
=
this
.
swiper
.
slides
;
const
slides
=
this
.
swiper
.
slides
;
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
...
@@ -105,28 +73,8 @@ export default {
...
@@ -105,28 +73,8 @@ export default {
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
}
}
},
onSlidePrevChange
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
);
this
.
timer
=
setInterval
(()
=>
{
this
.
$emit
(
'
customers-start
'
);
this
.
swiper
.
slideNext
();
},
5000
);
},
getAvatorItem
(
ele
)
{
return
{
src
:
ele
.
data
(
'
src
'
),
name
:
ele
.
data
(
'
name
'
)
};
}
}
}
}
// methods: {
// slideChange() {
// this.activeIndex = this.swiper.realIndex;
// },
// }
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
src/components/avatorSwiper.vue
View file @
bea9665b
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
ref=
"mySwiper"
ref=
"mySwiper"
:options=
"swiperOptions"
:options=
"swiperOptions"
class=
"avator-swiper_container"
class=
"avator-swiper_container"
@
slide-change=
"slideChange"
@
set-translate=
"setTranslate"
@
set-translate=
"setTranslate"
>
>
<swiper-slide
v-for=
"(item, index) in avatorData"
:key=
"index"
class=
"avator-swiper_item"
>
<swiper-slide
v-for=
"(item, index) in avatorData"
:key=
"index"
class=
"avator-swiper_item"
>
...
@@ -37,6 +36,7 @@ export default {
...
@@ -37,6 +36,7 @@ export default {
}
}
},
},
data
()
{
data
()
{
const
vm
=
this
;
return
{
return
{
activeIndex
:
0
,
activeIndex
:
0
,
swiperOptions
:
{
swiperOptions
:
{
...
@@ -48,10 +48,39 @@ export default {
...
@@ -48,10 +48,39 @@ export default {
centeredSlides
:
true
,
centeredSlides
:
true
,
watchSlidesProgress
:
true
,
watchSlidesProgress
:
true
,
allowTouchMove
:
false
,
allowTouchMove
:
false
,
autoplay
:
{
autoplay
:
false
,
delay
:
900
,
stopOnLastSlide
:
false
,
on
:
{
disableOnInteraction
:
false
init
:
function
()
{
const
slideLeft
=
this
.
slides
.
eq
(
this
.
activeIndex
);
console
.
log
(
slideLeft
);
// slideLeft.addClass('ani-left');
},
transitionStart
:
function
()
{
const
activeIndex
=
this
.
activeIndex
;
// const slideLeft = this.slides.eq(activeIndex);
// const slideRight = this.slides.eq(activeIndex + 7);
// vm.avatorItem = vm.getAvatorItem(slideLeft);
// vm.rightImgPath = slideRight.data('src');
// slideLeft.addClass('ani-left');
// slideRight.addClass('ani-right');
console
.
log
(
activeIndex
);
},
transitionEnd
:
function
()
{
console
.
log
(
'
结束
'
);
vm
.
$emit
(
'
customers-end
'
,
vm
.
avatorItem
);
// // for (let i = 0; i
<
this
.
slides
.
length
;
i
++
)
{
// // let slide = this.slides.eq(i);
// // slide.removeClass('ani-left ani-right');
// // }
const
slides
=
this
.
slides
;
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
const
slide
=
slides
.
eq
(
i
);
const
progress
=
slides
[
i
].
progress
;
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
}
}
}
}
}
}
};
};
...
@@ -61,10 +90,13 @@ export default {
...
@@ -61,10 +90,13 @@ export default {
return
this
.
$refs
.
mySwiper
.
swiper
;
return
this
.
$refs
.
mySwiper
.
swiper
;
}
}
},
},
mounted
()
{
this
.
onSlidePrevChange
();
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
);
},
methods
:
{
methods
:
{
slideChange
()
{
this
.
activeIndex
=
this
.
swiper
.
realIndex
;
},
setTranslate
()
{
setTranslate
()
{
const
slides
=
this
.
swiper
.
slides
;
const
slides
=
this
.
swiper
.
slides
;
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
slides
.
length
;
i
++
)
{
...
@@ -73,8 +105,28 @@ export default {
...
@@ -73,8 +105,28 @@ export default {
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
opacity
'
,
1
-
Math
.
abs
(
progress
)
/
9
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
slide
.
css
(
'
transform
'
,
`scale(
${
1
-
Math
.
abs
(
progress
)
/
17
}
`
);
}
}
},
onSlidePrevChange
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
);
this
.
timer
=
setInterval
(()
=>
{
this
.
$emit
(
'
customers-start
'
);
this
.
swiper
.
slideNext
();
},
5000
);
},
getAvatorItem
(
ele
)
{
return
{
src
:
ele
.
data
(
'
src
'
),
name
:
ele
.
data
(
'
name
'
)
};
}
}
}
}
// methods: {
// slideChange() {
// this.activeIndex = this.swiper.realIndex;
// },
// }
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
src/components/groupShare.vue
View file @
bea9665b
...
@@ -159,9 +159,7 @@ export default {
...
@@ -159,9 +159,7 @@ export default {
return
`/pages/groupbuy/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
))}
`
;
return
`/pages/groupbuy/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
))}
`
;
}
}
if
(
isApp
)
{
if
(
isApp
)
{
const
linkPrve
=
`
${
const
linkPrve
=
`https://mall.q-gp.com/common/launch?wxapp=gh_e1d790d67513&jumpUrl=
${
encodeURIComponent
(
config
.
openLink
}
/common/launch?wxapp=gh_e1d790d67513&jumpUrl=
${
encodeURIComponent
(
'
pages/groupbuy/webview
'
'
pages/groupbuy/webview
'
)}
&terminal=1`
;
)}
&terminal=1`
;
const
linkParams
=
encodeURIComponent
(
JSON
.
stringify
({
url
:
linkPath
}));
const
linkParams
=
encodeURIComponent
(
JSON
.
stringify
({
url
:
linkPath
}));
...
...
src/views/goodsDetail/smallPic
copy
.vue
→
src/views/goodsDetail/smallPic
-gx
.vue
View file @
bea9665b
...
@@ -136,7 +136,6 @@ export default {
...
@@ -136,7 +136,6 @@ export default {
receiverId
:
''
,
receiverId
:
''
,
count
:
1
count
:
1
},
},
customers
:
{},
detailInfo
:
{},
detailInfo
:
{},
imgList
:
[],
imgList
:
[],
detailImgList
:
[],
// 商品详情图像展示
detailImgList
:
[],
// 商品详情图像展示
...
@@ -160,8 +159,6 @@ export default {
...
@@ -160,8 +159,6 @@ export default {
this
.
init
(
this
.
detailParam
);
this
.
init
(
this
.
detailParam
);
},
},
mounted
()
{
mounted
()
{
EventBus
.
$on
(
''
);
// todo 曝光埋点
// todo 曝光埋点
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
showInfo
=
true
;
this
.
showInfo
=
true
;
...
...
src/views/goodsDetail/smallPic.vue
View file @
bea9665b
...
@@ -136,6 +136,7 @@ export default {
...
@@ -136,6 +136,7 @@ export default {
receiverId
:
''
,
receiverId
:
''
,
count
:
1
count
:
1
},
},
customers
:
{},
detailInfo
:
{},
detailInfo
:
{},
imgList
:
[],
imgList
:
[],
detailImgList
:
[],
// 商品详情图像展示
detailImgList
:
[],
// 商品详情图像展示
...
@@ -159,6 +160,10 @@ export default {
...
@@ -159,6 +160,10 @@ export default {
this
.
init
(
this
.
detailParam
);
this
.
init
(
this
.
detailParam
);
},
},
mounted
()
{
mounted
()
{
EventBus
.
$on
(
'
customers-end
'
,
customers
=>
{
console
.
log
(
customers
);
});
// todo 曝光埋点
// todo 曝光埋点
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
showInfo
=
true
;
this
.
showInfo
=
true
;
...
...
src/views/goodsList/index.vue
View file @
bea9665b
...
@@ -26,9 +26,7 @@
...
@@ -26,9 +26,7 @@
/>
/>
</div>
</div>
</div>
</div>
<div
class=
"group-portrait-num"
@
click=
"showSwipe = !showSwipe"
>
<div
class=
"group-portrait-num"
>
已有
{{
goodsTemp
.
groupBuyUserCount
}}
人 参与拼单
</div>
已有
{{
goodsTemp
.
groupBuyUserCount
}}
人 参与拼单
</div>
</div>
</div>
<div
class=
"group-list"
>
<div
class=
"group-list"
>
<div
class=
"list-title"
>
<div
class=
"list-title"
>
...
...
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