Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 33e06e5b
authored
Nov 22, 2021
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
8cebad94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
57 deletions
src/components/Poster.vue
src/components/Share.vue
src/components/VipDialog.vue
src/views/merchant/goods.vue
src/views/merchant/index.vue
src/components/Poster.vue
View file @
33e06e5
<
template
>
<
template
>
<van-overlay
<van-overlay
:show=
"show"
>
:show=
"show"
<!-- z-index="9999999" -->
z-index=
"9999999"
>
<div
<div
class=
"wrapper"
class=
"wrapper"
@
click
.
stop
@
click
.
stop
...
@@ -43,40 +41,41 @@
...
@@ -43,40 +41,41 @@
export
default
{
export
default
{
name
:
'Poster'
,
name
:
'Poster'
,
props
:
[
'value'
,
'apiName'
,
'currentItem'
,
'activityData'
],
props
:
[
'value'
,
'apiName'
,
'currentItem'
,
'activityData'
],
data
()
{
data
()
{
return
{
return
{
show
:
false
,
show
:
false
,
img
:
null
img
:
null
}
}
},
},
mounted
()
{
mounted
()
{},
},
watch
:
{
watch
:
{
'value'
(
n
)
{
value
(
n
)
{
this
.
show
=
n
this
.
show
=
n
}
,
}
},
},
methods
:
{
methods
:
{
close
()
{
close
()
{
this
.
show
=
false
this
.
show
=
false
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
save
()
{
save
()
{
this
.
showToast
(
'请长按海报保存'
)
this
.
showToast
(
'请长按海报保存'
)
},
},
share
()
{
share
()
{
let
{
currentItem
,
apiName
,
activityData
}
=
this
let
{
currentItem
,
apiName
,
activityData
}
=
this
let
flag
=
apiName
!=
'shopmallApi'
let
flag
=
apiName
!=
'shopmallApi'
// if (currentItem.userId) {
// if (currentItem.userId) {
// } else {
// } else {
window
.
$wx
.
shareAppMessage
({
window
.
$wx
imgUrl
:
flag
?
currentItem
.
shareImgUrl
:
currentItem
.
goodsImage
,
.
shareAppMessage
({
title
:
flag
?
currentItem
.
name
:
currentItem
.
goodsName
,
imgUrl
:
flag
?
currentItem
.
shareImgUrl
:
currentItem
.
goodsImage
,
link
:
flag
?
activityData
.
pagePath
:
activityData
.
url
,
title
:
flag
?
currentItem
.
name
:
currentItem
.
goodsName
,
}).
then
(
res
=>
{
link
:
flag
?
activityData
.
pagePath
:
activityData
.
url
this
.
showToast
(
'发送成功'
)
})
})
.
then
(
res
=>
{
this
.
showToast
(
'发送成功'
)
})
// }
// }
}
}
}
}
...
@@ -84,6 +83,9 @@ export default {
...
@@ -84,6 +83,9 @@ export default {
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
'scss'
>
.van-overlay
{
position
:
absolute
;
}
.wrapper
{
.wrapper
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/components/Share.vue
View file @
33e06e5
<
template
>
<
template
>
<div
class=
"share"
>
<div
<van-share-sheet
class=
"share-box"
v-model=
"showShare"
v-show=
"showShare"
title=
"立即分享给好友"
>
:options=
"options"
<div
class=
"sheet"
>
@
select=
"onSelect"
<van-share-sheet
@
cancel=
"cancel"
v-model=
"showShare"
@
click-overlay=
"cancel"
title=
"立即分享给好友"
/>
:options=
"options"
@
select=
"onSelect"
@
cancel=
"cancel"
@
click-overlay=
"cancel"
/>
</div>
<poster
<poster
:value=
"showPoster"
:value=
"showPoster"
@
close=
"showPoster = false"
@
close=
"showPoster = false"
...
@@ -78,6 +83,7 @@ export default {
...
@@ -78,6 +83,7 @@ export default {
return
return
}
}
if
(
apiName
==
'shopmallApi'
)
{
if
(
apiName
==
'shopmallApi'
)
{
this
.
showLoading
()
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
console
.
log
(
'商品链接'
,
data
)
console
.
log
(
'商品链接'
,
data
)
shopmallApi
.
getGoodsPoster
({
id
}).
then
(
res
=>
{
shopmallApi
.
getGoodsPoster
({
id
}).
then
(
res
=>
{
...
@@ -87,6 +93,7 @@ export default {
...
@@ -87,6 +93,7 @@ export default {
url
:
data
url
:
data
}
}
this
.
showShare
=
true
this
.
showShare
=
true
this
.
hideLoading
()
})
})
})
})
}
}
...
@@ -241,4 +248,16 @@ export default {
...
@@ -241,4 +248,16 @@ export default {
.van-share-sheet__option.disabled
{
.van-share-sheet__option.disabled
{
opacity
:
0.5
;
opacity
:
0.5
;
}
}
.sheet
{
position
:
relative
;
z-index
:
1
;
}
.share-box
{
position
:
fixed
;
width
:
100%
;
height
:
100vh
;
top
:
0
;
left
:
0
;
z-index
:
100
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/components/VipDialog.vue
View file @
33e06e5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
>
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"title flex"
>
<div
class=
"title flex"
>
{{
data
.
packageName
}}
<div
class=
"name text-hide"
>
{{
data
.
packageName
}}
</div>
<div
class=
"subtitle"
>
内含
{{
data
.
couponsDetailList
&&
data
.
couponsDetailList
.
length
}}
项权益项目
</div>
<div
class=
"subtitle"
>
内含
{{
data
.
couponsDetailList
&&
data
.
couponsDetailList
.
length
}}
项权益项目
</div>
</div>
</div>
<div
class=
"items"
>
<div
class=
"items"
>
...
@@ -113,6 +113,9 @@ export default {
...
@@ -113,6 +113,9 @@ export default {
top
:
0
;
top
:
0
;
background-color
:
#fff
;
background-color
:
#fff
;
z-index
:
2
;
z-index
:
2
;
.name{
max-width
:
70%
;
}
.subtitle
{
.subtitle
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#3a3a3a
;
color
:
#3a3a3a
;
...
...
src/views/merchant/goods.vue
View file @
33e06e5
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<div
<div
:key=
"index"
:key=
"index"
class=
"item"
class=
"item"
@
click=
"choose(i)"
>
>
<div
class=
"icon"
>
<div
class=
"icon"
>
<img
:src=
"i.goodsImage || ''"
>
<img
:src=
"i.goodsImage || ''"
>
...
@@ -24,7 +25,6 @@
...
@@ -24,7 +25,6 @@
</div>
</div>
<div
<div
class=
"sprite-icon icon-share"
class=
"sprite-icon icon-share"
@
click=
"choose(i)"
></div>
></div>
</div>
</div>
</template>
</template>
...
@@ -48,12 +48,11 @@ export default {
...
@@ -48,12 +48,11 @@ export default {
list
:
[],
list
:
[],
flag
:
false
,
flag
:
false
,
total
:
0
,
total
:
0
,
WX
:
wxConfig
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
getList
()
this
.
WX
.
init
([
'shareAppMessage'
])
wxConfig
.
init
([
'shareAppMessage'
])
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
...
@@ -68,8 +67,8 @@ export default {
...
@@ -68,8 +67,8 @@ export default {
choose
(
e
)
{
choose
(
e
)
{
let
{
id
,
goodsName
,
goodsImage
}
=
e
let
{
id
,
goodsName
,
goodsImage
}
=
e
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
console
.
log
(
data
)
console
.
log
(
'链接_________'
,
data
)
this
.
WX
.
shareAppMessage
({
wxConfig
.
shareAppMessage
({
title
:
goodsName
,
title
:
goodsName
,
desc
:
''
,
desc
:
''
,
link
:
data
,
link
:
data
,
...
...
src/views/merchant/index.vue
View file @
33e06e5
...
@@ -41,19 +41,18 @@
...
@@ -41,19 +41,18 @@
>
分享给客户
</div>
>
分享给客户
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
class=
"icon"
>
<div
@
click=
"showShareModel(i)"
>
<img
:src=
"i.goodsImage || ''"
>
<div
class=
"icon"
>
</div>
<img
:src=
"i.goodsImage || ''"
>
<div
class=
"info"
>
</div>
<div
class=
"name text-two-line"
>
{{
i
.
goodsName
}}
</div>
<div
class=
"info"
>
<template
v-if=
"i.price"
>
<div
class=
"name text-two-line"
>
{{
i
.
goodsName
}}
</div>
<div
class=
"price"
>
¥
{{
i
.
price
.
toFixed
(
2
)
}}
</div>
<template
v-if=
"i.price"
>
</
template
>
<div
class=
"price"
>
¥
{{
i
.
price
.
toFixed
(
2
)
}}
</div>
</
template
>
</div>
<div
class=
"sprite-icon icon-share"
></div>
</div>
</div>
<div
class=
"sprite-icon icon-share"
@
click=
"showShareModel(i)"
></div>
</template>
</template>
</div>
</div>
</template>
</template>
...
@@ -88,20 +87,17 @@ import { shopmallApi, equityApi } from '@/api'
...
@@ -88,20 +87,17 @@ import { shopmallApi, equityApi } from '@/api'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
mixins
:
[
shareMixin
,
pageMixin
],
mixins
:
[
shareMixin
,
pageMixin
],
data
()
{
data
()
{
return
{
return
{
showVip
:
false
,
showVip
:
false
,
equity_id
:
null
equity_id
:
null
}
}
},
},
mounted
()
{
mounted
()
{},
},
activated
()
{},
activated
()
{
deactivated
()
{},
},
deactivated
()
{
},
methods
:
{
methods
:
{
getList_0
(
pageNum
)
{
getList_0
(
pageNum
)
{
let
{
list
}
=
this
let
{
list
}
=
this
equityApi
.
getEquityList
({
pageNum
}).
then
(
res
=>
{
equityApi
.
getEquityList
({
pageNum
}).
then
(
res
=>
{
this
.
flag
=
true
this
.
flag
=
true
...
@@ -110,7 +106,7 @@ export default {
...
@@ -110,7 +106,7 @@ export default {
this
.
hideLoading
()
this
.
hideLoading
()
})
})
},
},
getList_1
(
pageNum
)
{
getList_1
(
pageNum
)
{
let
{
list
}
=
this
let
{
list
}
=
this
shopmallApi
.
getGoodsList
({
currentPage
:
pageNum
}).
then
(
res
=>
{
shopmallApi
.
getGoodsList
({
currentPage
:
pageNum
}).
then
(
res
=>
{
this
.
flag
=
true
this
.
flag
=
true
...
@@ -119,7 +115,7 @@ export default {
...
@@ -119,7 +115,7 @@ export default {
this
.
hideLoading
()
this
.
hideLoading
()
})
})
},
},
showVipDialog
(
i
)
{
showVipDialog
(
i
)
{
this
.
showVip
=
true
this
.
showVip
=
true
this
.
equity_id
=
i
.
id
this
.
equity_id
=
i
.
id
}
}
...
@@ -154,7 +150,7 @@ export default {
...
@@ -154,7 +150,7 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
flex-direction
:
column
;
flex-direction
:
column
;
max-width
:
70%
;
max-width
:
70%
;
.title
{
.title
{
font-weight
:
500
;
font-weight
:
500
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -162,6 +158,7 @@ export default {
...
@@ -162,6 +158,7 @@ export default {
}
}
.decoration
{
.decoration
{
color
:
#b9babb
;
color
:
#b9babb
;
width
:
160px
;
}
}
.btn
{
.btn
{
color
:
#b1b1b3
;
color
:
#b1b1b3
;
...
@@ -178,6 +175,7 @@ export default {
...
@@ -178,6 +175,7 @@ export default {
}
}
.btn
{
.btn
{
right
:
10px
;
right
:
10px
;
z-index
:
2
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment