Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 e6de5a02
authored
May 23, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式
1 parent
d6150e43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
54 deletions
pages/tab/output/components/client/client.js
pages/tab/output/components/client/client.wxml
pages/tab/output/components/outputCrowdfund/outputCrowdfund.js
pages/tab/output/components/client/client.js
View file @
e6de5a0
// pages/tab/output/components/client/client.js
import
outputApi
from
'~/api/outputApi/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
deleteSecond
}
from
'~/utils/format'
Component
({
/**
* 组件的属性列表
...
...
@@ -410,6 +411,66 @@ Component({
activityId
})
},
/**战报 */
handleReport
(
e
)
{
const
{
item
,
idx
}
=
e
.
detail
.
currentTarget
.
dataset
wx
.
$api
.
showLoading
(
'战报生成中'
)
outputApi
.
getNewReportUrl
({
activityId
:
item
.
activityId
})
.
then
(
res
=>
{
if
(
!
res
.
url
)
{
wx
.
$api
.
showToast
(
'战报生成失败'
)
return
true
}
var
posterItem
=
{
...
item
,
posterUrl
:
res
.
url
,
updatedTime
:
deleteSecond
(
res
.
updatedDate
),
type
:
'warReport'
}
this
.
setData
({
posterItem
:
posterItem
,
isShowTip
:
false
})
wx
.
$api
.
hideLoading
()
this
.
triggerEvent
(
'handleZhanReport'
,
{
item
:
item
,
idx
:
idx
,
posterItem
:
posterItem
})
})
.
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载战报失败'
)
})
.
finally
(()
=>
{
wx
.
$api
.
hideLoading
()
})
},
/**喜报 */
handleXiReport
(
e
)
{
const
{
item
}
=
e
.
detail
.
currentTarget
.
dataset
wx
.
$api
.
showLoading
(
'喜报生成中'
)
outputApi
.
getNewGoodUrl
({
activityId
:
item
.
activityId
})
.
then
(
res
=>
{
if
(
!
res
.
goodUrl
)
{
wx
.
$api
.
showToast
(
'暂无喜报'
)
return
true
}
var
posterItem
=
{
...
item
,
posterUrl
:
res
.
goodUrl
,
updatedTime
:
res
.
goodReportDate
?
deleteSecond
(
res
.
goodReportDate
)
:
''
,
type
:
'warReport'
}
this
.
setData
({
posterItem
:
posterItem
})
wx
.
$api
.
hideLoading
()
})
.
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载喜报失败'
)
})
.
finally
(()
=>
{
})
},
handleJump
(
e
)
{
let
{
idx
,
sceneCode
}
=
e
.
currentTarget
.
dataset
var
currentItem
=
this
.
data
.
list
[
idx
]
...
...
pages/tab/output/components/client/client.wxml
View file @
e6de5a0
...
...
@@ -72,7 +72,7 @@
</view>
<!-- 售后众筹 -->
<view class="output-box" wx:if="{{formData.sceneCode == 'SC004' || formData.sceneCode == 'SC003'}}">
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004' || formData.sceneCode == 'SC003'}}" orderObj="{{crowdOrderObj}}" sceneCode="{{formData.sceneCode}}" proIdx="{{formData.sceneCode == 'SC003' ? '0' : formData.proIdx}}"></output-crowdfund>
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004' || formData.sceneCode == 'SC003'}}" orderObj="{{crowdOrderObj}}" sceneCode="{{formData.sceneCode}}" proIdx="{{formData.sceneCode == 'SC003' ? '0' : formData.proIdx}}"
bindhandleReport="handleReport" bindhandleXiReport="handleXiReport"
></output-crowdfund>
<view class="end-txt">
{{ crowdOrderObj.activityList.length ? '到底啦!' : '暂无数据' }}
</view>
...
...
pages/tab/output/components/outputCrowdfund/outputCrowdfund.js
View file @
e6de5a0
...
...
@@ -107,62 +107,11 @@ Component({
methods
:
{
/**战报 */
handleReport
(
e
)
{
const
{
item
,
idx
}
=
e
.
currentTarget
.
dataset
wx
.
$api
.
showLoading
(
'战报生成中'
)
outputApi
.
getNewReportUrl
({
activityId
:
item
.
activityId
})
.
then
(
res
=>
{
if
(
!
res
.
url
)
{
wx
.
$api
.
showToast
(
'战报生成失败'
)
return
true
}
var
posterItem
=
{
...
item
,
posterUrl
:
res
.
url
,
updatedTime
:
deleteSecond
(
res
.
updatedDate
),
type
:
'warReport'
}
this
.
setData
({
crowdPosterItem
:
posterItem
,
isShowTip
:
false
})
wx
.
$api
.
hideLoading
()
this
.
triggerEvent
(
'handleZhanReport'
,
{
item
:
item
,
idx
:
idx
,
posterItem
:
posterItem
})
})
.
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载战报失败'
)
})
.
finally
(()
=>
{
wx
.
$api
.
hideLoading
()
})
this
.
triggerEvent
(
'handleReport'
,
e
)
},
/**喜报 */
handleXiReport
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
wx
.
$api
.
showLoading
(
'喜报生成中'
)
outputApi
.
getNewGoodUrl
({
activityId
:
item
.
activityId
})
.
then
(
res
=>
{
if
(
!
res
.
goodUrl
)
{
wx
.
$api
.
showToast
(
'暂无喜报'
)
return
true
}
var
posterItem
=
{
...
item
,
posterUrl
:
res
.
goodUrl
,
updatedTime
:
res
.
goodReportDate
?
deleteSecond
(
res
.
goodReportDate
)
:
''
,
type
:
'warReport'
}
this
.
setData
({
crowdPosterItem
:
posterItem
})
wx
.
$api
.
hideLoading
()
})
.
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载喜报失败'
)
})
.
finally
(()
=>
{
})
this
.
triggerEvent
(
'handleXiReport'
,
e
)
},
// 活动详情-跳转门店助手
...
...
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