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 e0b2df5e
authored
Jan 18, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
4d347d78
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
81 additions
and
411 deletions
src/api/activityApi.js
src/api/equityApi.js
src/api/liveApi.js
src/api/shopmallApi.js
src/components/SearchBox.vue
src/components/Share.vue
src/mixins/couponMixin.js
src/mixins/pageMixin.js
src/mixins/shareMixin.js
src/views/activity/index.vue
src/views/coupon/index.vue
src/views/merchant/index.vue
src/api/activityApi.js
View file @
e0b2df5
const
url
=
'/rop-scrm-shopmall/router'
const
url
=
'/rop-scrm-shopmall/router'
export
default
{
export
default
{
/** 分页查询活动 */
/** 分页查询活动 */
getActivityList
(
data
)
{
getActivityList
(
currentPage
)
{
data
.
method
=
'scrm.api.shopmall.activity.page'
let
data
=
{
data
.
pageSize
=
10
method
:
'scrm.api.shopmall.activity.page'
,
pageSize
:
10
,
currentPage
}
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
data
})
})
},
},
/** 获取分享链接 */
/** 获取分享链接 */
getShared
(
data
)
{
getShared
(
data
)
{
data
.
method
=
'scrm.api.shopmall.activity.get.shared'
data
.
method
=
'scrm.api.shopmall.activity.get.shared'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
...
src/api/equityApi.js
View file @
e0b2df5
const
url
=
'/rop-scrm-equity/router'
const
url
=
'/rop-scrm-equity/router'
export
default
{
export
default
{
/**套餐分页查询 */
/**套餐分页查询 */
getEquityList
(
data
)
{
getEquityList
(
pageNum
)
{
data
.
method
=
'scrm.api.equity.package.info.list.with.page'
let
data
=
{
data
.
pageSize
=
10
method
:
'scrm.api.equity.package.info.list.with.page'
,
data
.
state
=
1
pageSize
:
10
,
state
:
1
,
pageNum
}
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
data
})
})
},
},
/**套餐详情 */
/**套餐详情 */
getEquityDetail
(
data
)
{
getEquityDetail
(
data
)
{
data
.
method
=
'scrm.api.equity.main.page.package.detail.get'
data
.
method
=
'scrm.api.equity.main.page.package.detail.get'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
@@ -19,7 +22,7 @@ export default {
...
@@ -19,7 +22,7 @@ export default {
})
})
},
},
/** 获取套餐分享链接 */
/** 获取套餐分享链接 */
getEquityShared
(
data
)
{
getEquityShared
(
data
)
{
data
.
method
=
'scrm.api.equity.package.info.share'
data
.
method
=
'scrm.api.equity.package.info.share'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
...
src/api/liveApi.js
View file @
e0b2df5
const
url
=
'/rop-scrm-live/router'
const
url
=
'/rop-scrm-live/router'
export
default
{
export
default
{
/** 分页查询活动 */
/** 分页查询活动 */
getLiveList
(
data
)
{
getLiveList
(
pageNum
)
{
data
.
method
=
'scrm.api.live.live.room.list'
let
data
=
{
data
.
pageSize
=
10
method
:
'scrm.api.live.live.room.list'
,
pageSize
:
10
,
pageNum
}
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
,
data
,
...
...
src/api/shopmallApi.js
View file @
e0b2df5
const
url
=
'/rop-scrm-shopmall/router'
const
url
=
'/rop-scrm-shopmall/router'
export
default
{
export
default
{
/** 获取门店商品列表 */
/** 获取门店商品列表 */
getGoodsList
(
data
)
{
getGoodsList
(
currentPage
)
{
data
.
method
=
'scrm.api.shopmall.goods.wework.page'
let
data
=
{
data
.
pageSize
=
10
method
:
'scrm.api.shopmall.goods.wework.page'
,
pageSize
:
10
,
currentPage
}
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
data
...
...
src/components/SearchBox.vue
View file @
e0b2df5
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
value
:
0
,
value
:
0
,
option
:
[
option
:
[
{
text
:
'优惠券'
,
value
:
0
},
{
text
:
'优惠券'
,
value
:
0
},
//
{ text: '精品礼券', value: 1 },
{
text
:
'精品礼券'
,
value
:
1
},
{
text
:
'商品订单'
,
value
:
2
},
{
text
:
'商品订单'
,
value
:
2
},
{
text
:
'会员服务'
,
value
:
3
}
{
text
:
'会员服务'
,
value
:
3
}
]
]
...
...
src/components/Share.vue
deleted
100644 → 0
View file @
4d347d7
<
template
>
<div
class=
"share-box"
v-show=
"showShare"
>
<div
class=
"sheet"
>
<van-share-sheet
v-model=
"showShare"
title=
"立即分享给好友"
:options=
"options"
@
select=
"onSelect"
@
cancel=
"cancel"
@
click-overlay=
"cancel"
/>
</div>
<poster
:value=
"showPoster"
@
close=
"showPoster = false"
:apiName=
"apiName"
:currentItem=
"currentItem"
:activityData=
"activityData"
/>
</div>
</
template
>
<
script
type=
'text/ecmascript-6'
>
import
{
shopmallApi
,
activityApi
,
couponApi
,
liveApi
,
boutiquecouponApi
,
equityApi
}
from
'@/api'
import
{
Notify
}
from
'vant'
const
staticOptions
=
[
{
name
:
'企业微信'
,
icon
:
require
(
'@/assets/images/icon/wx.png'
),
type
:
1
},
{
name
:
'分享海报'
,
icon
:
require
(
'@/assets/images/icon/poster.png'
),
type
:
2
},
{
name
:
'复制链接'
,
icon
:
require
(
'@/assets/images/icon/copy.png'
),
type
:
3
}
]
export
default
{
name
:
'Share'
,
props
:
[
'value'
,
'apiName'
,
'currentItem'
],
data
()
{
return
{
showPoster
:
false
,
showShare
:
false
,
options
:
[],
activityData
:
{},
component_id
:
''
,
component_api_name
:
''
}
},
watch
:
{
value
(
n
)
{
console
.
log
(
n
)
let
{
currentItem
:
{
id
,
userId
},
component_id
,
apiName
,
component_api_name
}
=
this
if
(
component_id
==
id
&&
n
&&
component_api_name
==
apiName
)
{
this
.
showShare
=
true
return
}
if
(
n
)
{
let
options
=
this
.
tools
.
deepClone
(
staticOptions
)
if
(
apiName
==
'couponApi'
||
apiName
==
'boutiquecouponApi'
||
apiName
==
'equityApi'
)
{
options
[
1
].
className
=
'disabled'
this
.
showShare
=
true
}
console
.
log
(
options
)
this
.
options
=
options
if
(
apiName
==
'activityApi'
||
apiName
==
'liveApi'
)
{
this
.
showLoading
()
let
target
=
apiName
==
'activityApi'
?
activityApi
:
liveApi
target
.
getShared
({
id
}).
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
this
.
component_id
=
id
this
.
component_api_name
=
apiName
this
.
showShare
=
true
this
.
activityData
=
data
this
.
hideLoading
()
}
else
{
this
.
hideLoading
()
Notify
(
message
)
this
.
$emit
(
'cancel'
)
}
})
return
}
if
(
apiName
==
'shopmallApi'
)
{
if
(
!
userId
)
options
[
1
].
className
=
'disabled'
this
.
showLoading
()
shopmallApi
.
getGoodsLink
({
id
}).
then
(
data
=>
{
console
.
log
(
'商品链接'
,
data
)
shopmallApi
.
getGoodsPoster
({
id
}).
then
(
res
=>
{
console
.
log
(
'商品海报'
,
res
)
shopmallApi
.
getGoodsPosterMediaId
({
id
}).
then
(
media
=>
{
console
.
log
(
'商品海报ID'
)
this
.
activityData
=
{
posterUrl
:
res
,
url
:
data
,
posterMediaId
:
media
}
this
.
showShare
=
true
this
.
hideLoading
()
})
})
})
}
}
}
},
mounted
()
{},
methods
:
{
closePoster
()
{
this
.
showPoster
=
false
},
onSelect
({
type
,
className
})
{
let
{
currentItem
,
apiName
,
activityData
}
=
this
switch
(
type
)
{
/**分享微信 */
case
1
:
let
{
userId
}
=
currentItem
if
(
apiName
==
'couponApi'
||
apiName
==
'boutiquecouponApi'
)
{
let
{
id
,
couponName
}
=
currentItem
const
desc
=
'您的专属服务顾问为您发来了优惠券,请点击领取~'
if
(
apiName
==
'couponApi'
)
{
this
.
couponShare
(
currentItem
,
1
,
res
=>
{
if
(
userId
)
this
.
sendChatMessage
(
res
,
desc
,
couponName
)
else
this
.
shareAppMessage
(
res
,
desc
,
couponName
)
})
}
else
{
this
.
getBoutiqueCoupon
(
id
,
res
=>
{
if
(
userId
)
this
.
sendChatMessage
(
res
,
desc
,
couponName
)
else
this
.
shareAppMessage
(
res
,
desc
,
couponName
)
})
}
}
if
(
apiName
==
'activityApi'
||
apiName
==
'liveApi'
)
{
if
(
apiName
==
'activityApi'
)
{
if
(
userId
)
this
.
sendChatMessage
(
activityData
.
linkUrl
,
''
,
activityData
.
activityName
,
activityData
.
posterUrl
)
else
this
.
shareAppMessage
(
activityData
.
linkUrl
,
''
,
activityData
.
activityName
,
activityData
.
posterUrl
)
}
else
{
if
(
userId
)
this
.
sendChatMessage
(
activityData
.
cdnUrl
,
''
,
currentItem
.
name
,
currentItem
.
shareImgUrl
)
else
this
.
shareAppMessage
(
activityData
.
cdnUrl
,
''
,
currentItem
.
name
,
currentItem
.
shareImgUrl
)
}
}
if
(
apiName
==
'equityApi'
||
apiName
==
'shopmallApi'
)
{
let
{
id
}
=
currentItem
if
(
apiName
==
'equityApi'
)
{
equityApi
.
getEquityShared
({
id
}).
then
(
res
=>
{
let
desc
=
`您的专属客服顾问为您发来了会员套餐,点击查看哦`
if
(
userId
)
this
.
sendChatMessage
(
res
.
url
,
desc
,
currentItem
.
packageName
)
else
this
.
shareAppMessage
(
res
.
url
,
desc
,
currentItem
.
packageName
)
})
}
else
{
console
.
log
(
'________________________'
,
activityData
.
url
)
if
(
userId
)
this
.
sendChatMessage
(
activityData
.
url
,
''
,
currentItem
.
goodsName
,
currentItem
.
goodsImage
)
else
this
.
shareAppMessage
(
activityData
.
url
,
''
,
currentItem
.
goodsName
,
currentItem
.
goodsImage
)
}
}
this
.
cancel
()
break
/**分享海报 */
case
2
:
if
(
className
)
{
this
.
showToast
(
'无对应内容'
)
return
}
this
.
showPoster
=
true
break
/**复制 */
case
3
:
let
{
id
}
=
currentItem
this
.
showLoading
()
if
(
apiName
==
'shopmallApi'
)
{
let
{
activityData
}
=
this
this
.
setClipboardData
(
activityData
.
url
)
}
else
if
(
apiName
==
'activityApi'
)
{
this
.
setClipboardData
(
activityData
.
linkUrl
)
}
else
if
(
apiName
==
'liveApi'
)
{
this
.
setClipboardData
(
activityData
.
pagePath
)
}
else
if
(
apiName
==
'couponApi'
)
{
this
.
couponShare
(
currentItem
,
0
,
3
)
}
else
if
(
apiName
==
'boutiquecouponApi'
)
{
this
.
getBoutiqueCoupon
(
id
,
res
=>
{
this
.
setClipboardData
(
res
)
})
}
else
{
equityApi
.
getEquityShared
({
id
}).
then
(
res
=>
{
this
.
setClipboardData
(
res
.
url
)
})
}
break
}
},
cancel
()
{
this
.
$emit
(
'cancel'
)
},
couponShare
(
item
,
shareType
,
callBack
)
{
let
{
userId
,
id
}
=
item
let
obj
=
{
couponId
:
id
,
shareType
}
if
(
userId
)
obj
.
userList
=
[
{
userId
}
]
else
obj
.
shareType
=
0
couponApi
.
getCouponShared
(
obj
).
then
(
res
=>
{
if
(
shareType
==
0
)
this
.
setClipboardData
(
res
.
url
)
if
(
shareType
==
1
)
callBack
(
res
.
url
)
})
},
getBoutiqueCoupon
(
id
,
callBack
)
{
boutiquecouponApi
.
getBoutiqueCoupon
({
id
}).
then
(
res
=>
{
callBack
(
res
)
})
},
sendChatMessage
(
link
,
desc
,
title
,
imgUrl
)
{
window
.
$wx
.
sendChatMessage
({
msgtype
:
'news'
,
news
:
{
link
,
//H5消息页面url 必填
desc
,
title
,
imgUrl
},
enterChat
:
false
})
.
then
(()
=>
{
this
.
showToast
(
'发送成功'
)
})
},
shareAppMessage
(
link
,
desc
,
title
,
imgUrl
)
{
window
.
$wx
.
shareAppMessage
({
title
,
desc
,
link
,
imgUrl
})
.
then
(()
=>
{
this
.
showToast
(
'发送成功'
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
>
.van-share-sheet__option.disabled
{
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
>
\ No newline at end of file
\ No newline at end of file
src/mixins/couponMixin.js
deleted
100644 → 0
View file @
4d347d7
export
default
{
data
()
{
return
{
}
},
mounted
()
{},
methods
:
{
}
}
\ No newline at end of file
\ No newline at end of file
src/mixins/pageMixin.js
View file @
e0b2df5
...
@@ -22,8 +22,7 @@ export default {
...
@@ -22,8 +22,7 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
showLoading
()
this
.
showLoading
()
let
{
tabIndex
,
pageNum
}
=
this
this
.
getList
(
this
.
pageNum
)
this
[
`getList_
${
tabIndex
}
`
](
pageNum
)
},
},
change
(
index
)
{
change
(
index
)
{
this
.
tabIndex
=
index
this
.
tabIndex
=
index
...
...
src/mixins/shareMixin.js
View file @
e0b2df5
...
@@ -46,117 +46,89 @@ export default {
...
@@ -46,117 +46,89 @@ export default {
let
{
userId
,
id
,
couponName
,
activityName
,
packageName
,
goodsName
,
goodsImage
,
discountType
}
=
i
let
{
userId
,
id
,
couponName
,
activityName
,
packageName
,
goodsName
,
goodsImage
,
discountType
}
=
i
let
shopmall_appId
=
environment
==
'beta'
?
'wx9f91c1ec493eb425'
:
'wxe10067a63c1856ac'
let
shopmall_appId
=
environment
==
'beta'
?
'wx9f91c1ec493eb425'
:
'wxe10067a63c1856ac'
this
.
showLoading
()
this
.
showLoading
()
switch
(
name
)
{
// channelType 1 嘀加 2:广汇
/**卡券 */
if
(
name
===
'coupon'
)
{
/**卡券 */
case
'coupon'
:
{
let
desc
=
'您的专属服务顾问为您发来了优惠券,请点击领取~'
let
desc
=
'您的专属服务顾问为您发来了优惠券,请点击领取~'
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png'
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png'
if
(
tabIndex
==
0
)
{
if
(
tabIndex
==
0
)
{
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
// channelType 1 嘀加 2:广汇
appid
:
channelType
==
1
?
shopmall_appId
:
'wxfe82b8d65d07808f'
,
appid
:
channelType
==
1
?
shopmall_appId
:
'wxfe82b8d65d07808f'
,
title
:
couponName
,
title
:
couponName
,
imgUrl
,
imgUrl
,
page
:
`/packageMine/pages/boutique/gift/gift.html?id=
${
id
}
&userId=
${
userId
}
&employName=
${
this
.
toUnicode
(
i
.
employeeName
)}
`
page
:
`/packageMine/pages/boutique/gift/gift.html?id=
${
id
}
&userId=
${
userId
}
&employName=
${
this
.
toUnicode
(
i
.
employeeName
)}
`
})
})
else
{
else
boutiquecouponApi
.
getBoutiqueCoupon
({
id
}).
then
(
url
=>
{
boutiquecouponApi
.
getBoutiqueCoupon
({
id
}).
then
(
res
=>
{
this
.
shareAppMessage
(
url
,
desc
,
couponName
,
imgUrl
)
this
.
shareAppMessage
(
res
,
desc
,
couponName
,
imgUrl
)
})
})
}
}
else
{
}
else
{
this
.
couponShare
(
i
,
res
=>
{
this
.
couponShare
(
i
,
url
=>
{
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
appid
:
shopmall_appId
,
appid
:
shopmall_appId
,
title
:
`
${
couponName
}
(
${
window
.
$discountType
[
discountType
]}
券)`
,
title
:
`
${
couponName
}
(
${
window
.
$discountType
[
discountType
]}
券)`
,
imgUrl
,
imgUrl
,
page
:
`/packageMall/pages/coupon/coupon.html?couponId=
${
id
}
&merchantId=
${
merchantId
}
&issueName=
${
this
.
toUnicode
(
userName
)}
&issueDate=
${
new
Date
().
getTime
()}
`
page
:
`/packageMall/pages/coupon/coupon.html?couponId=
${
id
}
&merchantId=
${
merchantId
}
&issueName=
${
this
.
toUnicode
(
userName
)}
&issueDate=
${
new
Date
().
getTime
()}
`
})
})
else
this
.
shareAppMessage
(
res
,
desc
,
couponName
,
imgUrl
)
else
this
.
shareAppMessage
(
url
,
desc
,
couponName
,
imgUrl
)
})
})
}
}
break
}
else
if
(
name
===
'activity'
)
{
/**活动 */
}
/**活动 */
case
'activity'
:
{
if
(
tabIndex
==
0
)
{
if
(
tabIndex
==
0
)
{
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png'
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png'
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
appid
:
shopmall_appId
,
appid
:
shopmall_appId
,
title
:
activityName
,
title
:
activityName
,
imgUrl
,
imgUrl
,
page
:
`/packageMall/pages/detail/detail.html?isActivity=true&id=
${
id
}
&merchantId=
${
merchantId
}
`
page
:
`/packageMall/pages/detail/detail.html?isActivity=true&id=
${
id
}
&merchantId=
${
merchantId
}
`
})
})
else
{
else
activityApi
.
getShared
({
id
}).
then
(
url
=>
{
activityApi
.
getShared
({
id
}).
then
(
res
=>
{
this
.
shareAppMessage
(
url
,
'您有一个秒杀活动可参加'
,
activityName
,
imgUrl
)
this
.
shareAppMessage
(
res
,
'您有一个秒杀活动可参加'
,
activityName
,
imgUrl
)
})
})
}
}
else
{
}
else
{
/**直播 */
}
}
break
}
else
{
/**店铺 */
}
/**店铺 */
case
'merchant'
:
{
if
(
tabIndex
==
0
)
{
if
(
tabIndex
==
0
)
{
let
path
=
'pages/tab/index/index'
let
path
=
'pages/tab/index/index'
let
query
=
`merchantId=
${
merchantId
}
`
let
query
=
`merchantId=
${
merchantId
}
`
const
imgUrl
=
'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg'
const
imgUrl
=
'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg'
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
appid
:
shopmall_appId
,
appid
:
shopmall_appId
,
title
:
merchantName
,
title
:
merchantName
,
imgUrl
,
imgUrl
,
page
:
`/
${
path
}
.html?
${
query
}
`
page
:
`/
${
path
}
.html?
${
query
}
`
})
})
else
{
else
wxConfig
console
.
log
(
'query'
,
query
)
wxConfig
.
createMiniprogramUrlLink
({
.
createMiniprogramUrlLink
({
path
,
path
,
query
:
encodeURIComponent
(
query
),
query
:
encodeURIComponent
(
query
),
appId
:
shopmall_appId
appId
:
shopmall_appId
})
})
.
then
(
res
=>
{
.
then
(
url
=>
{
console
.
log
(
res
)
this
.
shareAppMessage
(
url
,
''
,
merchantName
,
imgUrl
)
this
.
shareAppMessage
(
res
,
''
,
merchantName
,
imgUrl
)
})
})
}
}
else
if
(
tabIndex
==
1
)
{
}
else
if
(
tabIndex
==
1
)
{
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png'
let
imgUrl
=
'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png'
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
appid
:
shopmall_appId
,
appid
:
shopmall_appId
,
title
:
packageName
,
title
:
packageName
,
imgUrl
,
imgUrl
,
page
:
`/packageEquity/pages/package/package.html?id=
${
id
}
&merchantId=
${
merchantId
}
`
page
:
`/packageEquity/pages/package/package.html?id=
${
id
}
&merchantId=
${
merchantId
}
`
})
})
else
{
else
equityApi
.
getEquityShared
({
id
}).
then
(({
url
})
=>
{
equityApi
.
getEquityShared
({
id
}).
then
(
res
=>
{
this
.
shareAppMessage
(
url
,
'您的专属客服顾问为您发来了会员套餐,点击查看哦'
,
packageName
,
imgUrl
)
this
.
shareAppMessage
(
res
.
url
,
'您的专属客服顾问为您发来了会员套餐,点击查看哦'
,
packageName
,
imgUrl
)
})
})
}
}
else
{
}
else
{
if
(
entry
!=
'normal'
)
if
(
entry
!=
'normal'
)
this
.
sendChatMessage
({
this
.
sendChatMessage
({
appid
:
shopmall_appId
,
appid
:
shopmall_appId
,
title
:
goodsName
,
title
:
goodsName
,
imgUrl
:
goodsImage
,
imgUrl
:
goodsImage
,
page
:
`/packageMall/pages/detail/detail.html?id=
${
id
}
&merchantId=
${
merchantId
}
`
page
:
`/packageMall/pages/detail/detail.html?id=
${
id
}
&merchantId=
${
merchantId
}
`
})
})
else
{
else
shopmallApi
.
getGoodsLink
({
id
}).
then
(
url
=>
{
shopmallApi
.
getGoodsLink
({
id
}).
then
(
res
=>
{
this
.
shareAppMessage
(
url
,
''
,
goodsName
,
goodsImage
)
this
.
shareAppMessage
(
res
,
''
,
goodsName
,
goodsImage
)
})
})
}
}
}
}
break
}
}
},
},
sendChatMessage
(
params
)
{
sendChatMessage
(
params
)
{
wxConfig
wxConfig
...
@@ -201,8 +173,7 @@ export default {
...
@@ -201,8 +173,7 @@ export default {
couponId
:
id
,
couponId
:
id
,
shareType
:
1
shareType
:
1
}
}
if
(
is_contact
)
if
(
is_contact
)
obj
.
userList
=
[
obj
.
userList
=
[
{
{
userId
:
is_contact
userId
:
is_contact
}
}
...
...
src/views/activity/index.vue
View file @
e0b2df5
...
@@ -77,12 +77,6 @@
...
@@ -77,12 +77,6 @@
<van-empty
description=
"暂无内容"
/>
<van-empty
description=
"暂无内容"
/>
</
template
>
</
template
>
</template>
</template>
<!-- <share
:value="showShare"
:apiName="tabIndex == 0 ? 'activityApi':'liveApi'"
@cancel="showShare = false"
:currentItem="currentItem"
/> -->
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<router-view></router-view>
<router-view></router-view>
...
@@ -96,42 +90,36 @@ import { activityApi, liveApi } from '@/api'
...
@@ -96,42 +90,36 @@ import { activityApi, liveApi } from '@/api'
export
default
{
export
default
{
name
:
'activity'
,
name
:
'activity'
,
mixins
:
[
shareMixin
,
pageMixin
],
mixins
:
[
shareMixin
,
pageMixin
],
data
()
{
data
()
{
return
{
return
{
tabList
:
[
'秒杀活动'
]
tabList
:
[
'秒杀活动'
]
}
}
},
},
methods
:
{
methods
:
{
getList_0
(
pageNum
)
{
getList
(
pageNum
)
{
let
{
list
}
=
this
let
{
list
,
tabIndex
}
=
this
activityApi
.
getActivityList
({
currentPage
:
pageNum
}).
then
(
res
=>
{
let
API
=
tabIndex
==
0
?
activityApi
:
liveApi
console
.
log
(
'活动列表'
,
res
)
let
target
=
tabIndex
==
0
?
'getActivityList'
:
'getLiveList'
API
[
target
](
pageNum
).
then
(
res
=>
{
console
.
log
(
tabIndex
==
0
?
'活动列表'
:
'直播列表'
,
res
)
if
(
tabIndex
==
0
)
{
res
.
list
.
map
(
e
=>
{
res
.
list
.
map
(
e
=>
{
if
(
e
.
startTime
)
e
.
startTime
=
new
Date
(
this
.
iosTimeFormat
(
e
.
startTime
)).
format
(
'yyyy年M月d日'
)
if
(
e
.
startTime
)
e
.
startTime
=
new
Date
(
this
.
iosTimeFormat
(
e
.
startTime
)).
format
(
'yyyy年M月d日'
)
if
(
e
.
endTime
)
e
.
endTime
=
new
Date
(
this
.
iosTimeFormat
(
e
.
endTime
)).
format
(
'yyyy年M月d日'
)
if
(
e
.
endTime
)
e
.
endTime
=
new
Date
(
this
.
iosTimeFormat
(
e
.
endTime
)).
format
(
'yyyy年M月d日'
)
e
.
price1
=
this
.
centsToyuan
(
e
.
price1
||
0
)
e
.
price1
=
this
.
centsToyuan
(
e
.
price1
||
0
)
e
.
price2
=
this
.
centsToyuan
(
e
.
price2
||
0
)
e
.
price2
=
this
.
centsToyuan
(
e
.
price2
||
0
)
})
})
}
this
.
flag
=
true
this
.
flag
=
true
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
this
.
total
=
res
.
total
this
.
hideLoading
()
this
.
hideLoading
()
})
})
},
},
getList_1
(
pageNum
)
{
centsToyuan
(
price
)
{
let
{
list
}
=
this
liveApi
.
getLiveList
({
pageNum
}).
then
(
res
=>
{
console
.
log
(
'直播列表'
,
res
)
this
.
flag
=
true
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
this
.
hideLoading
()
})
},
centsToyuan
(
price
)
{
return
Number
(
price
/
100
).
toFixed
(
2
)
return
Number
(
price
/
100
).
toFixed
(
2
)
},
},
iosTimeFormat
(
time
)
{
iosTimeFormat
(
time
)
{
return
time
.
replace
(
/
\-
/g
,
'/'
)
return
time
.
replace
(
/
\-
/g
,
'/'
)
}
}
}
}
...
...
src/views/coupon/index.vue
View file @
e0b2df5
...
@@ -60,12 +60,6 @@
...
@@ -60,12 +60,6 @@
<van-empty
description=
"暂无内容"
/>
<van-empty
description=
"暂无内容"
/>
</
template
>
</
template
>
</template>
</template>
<!-- <share
:value="showShare"
:apiName="tabIndex == 0?'boutiquecouponApi':'couponApi'"
@cancel="showShare = false"
:currentItem="currentItem"
/> -->
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<router-view></router-view>
<router-view></router-view>
...
@@ -76,33 +70,23 @@
...
@@ -76,33 +70,23 @@
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
{
shareMixin
,
pageMixin
,
discountTypeMixin
}
from
'@/mixins'
import
{
shareMixin
,
pageMixin
,
discountTypeMixin
}
from
'@/mixins'
import
{
couponApi
,
boutiquecouponApi
}
from
'@/api'
import
{
couponApi
,
boutiquecouponApi
}
from
'@/api'
const
tabList
=
[
'新车精品礼券'
,
'商城优惠券'
]
export
default
{
export
default
{
name
:
'coupon'
,
name
:
'coupon'
,
mixins
:
[
shareMixin
,
pageMixin
,
discountTypeMixin
],
mixins
:
[
shareMixin
,
pageMixin
,
discountTypeMixin
],
data
()
{
data
()
{
return
{
return
{
tabList
,
tabList
:
[
'新车精品礼券'
,
'商城优惠券'
]
updata
:
new
Date
().
getTime
()
}
}
},
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{
getList_0
(
pageNum
)
{
getList
(
pageNum
)
{
let
{
list
}
=
this
let
{
list
,
tabIndex
}
=
this
boutiquecouponApi
.
getBoutiqueCouponList
({
pageNum
}).
then
(
res
=>
{
let
API
=
tabIndex
==
0
?
boutiquecouponApi
:
couponApi
let
target
=
tabIndex
==
0
?
'getBoutiqueCouponList'
:
'getMerchantCouponList'
API
[
target
]({
pageNum
}).
then
(
res
=>
{
this
.
hideLoading
()
this
.
hideLoading
()
console
.
log
(
'精品礼券'
,
res
)
console
.
log
(
tabIndex
==
0
?
'精品礼券'
:
'商城礼券'
,
res
)
this
.
flag
=
true
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
})
},
getList_1
(
pageNum
)
{
let
{
list
}
=
this
couponApi
.
getMerchantCouponList
({
pageNum
}).
then
(
res
=>
{
this
.
hideLoading
()
console
.
log
(
'商城礼券'
,
res
)
this
.
flag
=
true
this
.
flag
=
true
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
this
.
total
=
res
.
total
...
...
src/views/merchant/index.vue
View file @
e0b2df5
...
@@ -108,22 +108,16 @@ export default {
...
@@ -108,22 +108,16 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
getList_0
()
{
getList
(
pageNum
)
{
let
{
list
,
tabIndex
}
=
this
if
(
tabIndex
==
0
)
{
this
.
flag
=
true
this
.
flag
=
true
this
.
hideLoading
()
this
.
hideLoading
()
},
return
getList_1
(
pageNum
)
{
}
let
{
list
}
=
this
let
API
=
tabIndex
==
1
?
equityApi
:
shopmallApi
equityApi
.
getEquityList
({
pageNum
}).
then
(
res
=>
{
let
target
=
tabIndex
==
1
?
'getEquityList'
:
'getGoodsList'
this
.
flag
=
true
API
[
target
](
pageNum
).
then
(
res
=>
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
this
.
hideLoading
()
})
},
getList_2
(
pageNum
)
{
let
{
list
}
=
this
shopmallApi
.
getGoodsList
({
currentPage
:
pageNum
}).
then
(
res
=>
{
this
.
flag
=
true
this
.
flag
=
true
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
total
=
res
.
total
this
.
total
=
res
.
total
...
...
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