Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-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 fc334e39
authored
Nov 08, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
紧急版本需求
1 parent
bd530a99
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
179 additions
and
134 deletions
api/activityApi/ActivityApi.js
api/mineApi/mineApi.js
components/mp-html/index.wxml
components/mp-html/node/node.wxml
components/sharePopup/sharePopup.js
packageActivity/pages/order/order.js
packageActivity/pages/order/order.scss
packageActivity/pages/order/order.wxml
packageActivity/pages/taskDetail/taskDetail.js
packageActivity/pages/taskDetail/taskDetail.scss
packageActivity/pages/taskDetail/taskDetail.wxml
packageActivity/pages/visitor/visitor.scss
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/components/activeBox/activeBox.scss
pages/tab/index/components/activityDiagnosis/activityDiagnosis.js
pages/tab/index/components/activityDiagnosis/activityDiagnosis.scss
pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml
pages/tab/index/components/activityOverview/activityOverview.scss
pages/tab/index/components/invertAnalyse/invertAnalyse.scss
pages/tab/index/components/invertAnalyse/invertAnalyse.wxml
pages/tab/index/index.js
pages/tab/index/index.scss
pages/tab/index/index.wxml
utils/emoji.js
utils/request/environment.js
api/activityApi/ActivityApi.js
View file @
fc334e3
...
...
@@ -9,11 +9,11 @@ class ActivityApi {
},
false
,
true
)
}
// 获取活动中任务内容
getActiveTaskList
(
data
)
{
getActiveTaskList
(
data
,
params
)
{
return
api
.
post
({
method
:
`stoassistant.api.mission.findStaffMissionList`
,
...
data
},
false
,
true
)
},
false
,
params
&&
params
.
isShowLoading
)
}
// 获取单个任务详情内容
getActiveTaskDetail
(
data
)
{
...
...
@@ -22,7 +22,6 @@ class ActivityApi {
...
data
})
}
// 获取被分享者打开分享内容数据
getTaskShareDetail
(
data
)
{
return
api
.
post
({
...
...
@@ -30,13 +29,6 @@ class ActivityApi {
...
data
})
}
// 获取活动诊断订单数据
getActivityEndOrderList
(
data
)
{
return
api
.
post
({
method
:
`
${
path
}
.service.activity.detail.old`
,
...
data
},
false
,
true
)
}
// 获取申请活动已开通场景
getOpenSceneList
(
data
)
{
return
api
.
post
({
...
...
@@ -60,11 +52,11 @@ class ActivityApi {
}
// 获取活动诊断待预约安装订单数据
getActivityEndInstallOrderList
(
data
)
{
getActivityEndInstallOrderList
(
data
,
params
)
{
return
api
.
post
({
method
:
`
${
path
}
.user.activity.to.be.installed.list`
,
...
data
})
}
,
false
,
params
&&
params
.
isShowLoading
)
}
// 获取我的访客数据
getActivityVisitorList
(
data
)
{
...
...
api/mineApi/mineApi.js
View file @
fc334e3
...
...
@@ -28,12 +28,12 @@ class MineApi {
},
true
)
}
// 获取员工详情
getStaffDetailApi
(
data
)
{
getStaffDetailApi
(
data
,
params
)
{
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.account.staff.detail'
,
...
data
,
})
}
,
false
,
params
&&
params
.
isShowLoading
)
}
// 更新员工信息
updateStaffDetailApi
(
data
)
{
...
...
components/mp-html/index.wxml
View file @
fc334e3
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu]}}" catchadd="_add"/></view>
\ No newline at end of file
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg]}}" catchadd="_add"/></view>
\ No newline at end of file
components/mp-html/node/node.wxml
View file @
fc334e3
<wxs module="use">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n){return!n.c&&(!n.children||"a"===n.name||!e[n.name]&&-1===(n.attrs.style||"").indexOf("inline"))};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block><text wx:elif="{{n.text}}" user-select="{{n.us}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{use(n1)}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{use(n2)}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{use(n3)}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{use(n4)}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{use(n5)}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
\ No newline at end of file
<wxs module="use">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n){return!n.c&&(!n.children||"a"===n.name||!e[n.name]&&-1===(n.attrs.style||"").indexOf("inline"))};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="{{opts[4] ? 'imgTap' : ''}}" bindlongpress="noop"/></block><text wx:elif="{{n.text}}" user-select="{{n.us}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{use(n1)}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{use(n2)}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{use(n3)}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{use(n4)}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{use(n5)}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
\ No newline at end of file
components/sharePopup/sharePopup.js
View file @
fc334e3
...
...
@@ -17,7 +17,12 @@ Component({
navHeight
:
thisPage
.
data
.
navHeight
})
if
(
val
.
showSharePopup
)
{
wx
.
$api
.
showLoading
()
wx
.
setPageStyle
({
style
:
{
overflow
:
'hidden'
}
})
wx
.
$api
.
showLoading
(
'处理中'
)
val
.
boxImageHeight
=
66
// 计算弹窗图片区域最大高度
wx
.
$util
.
getViewInfo
(
'.layout'
,
res
=>
{
...
...
@@ -32,6 +37,9 @@ Component({
})
val
.
postersImageHeight
=
(
e
.
height
/
e
.
width
)
*
247
_this
.
init
(
val
)
},
fail
()
{
wx
.
$api
.
showToast
(
'生成失败'
)
}
})
})
...
...
packageActivity/pages/order/order.js
View file @
fc334e3
...
...
@@ -11,17 +11,17 @@ Page({
list
:
[],
allNum
:
0
,
todayNum
:
0
,
orderStatusImgList
:
{
1
:
'待付款'
,
7
:
'待安装'
,
8
:
'已安装'
},
statusColor
:
{
1
:
'#DF9800'
,
7
:
'#4466F0'
,
8
:
'#7A8299'
},
orderStatusImgList
:
{
1
:
'待付款'
,
7
:
'待安装'
,
8
:
'已安装'
,
6
:
'已退款'
},
statusColor
:
{
1
:
'#DF9800'
,
7
:
'#4466F0'
,
8
:
'#
3FCF77'
,
6
:
'#
7A8299'
},
statusBackgroundColor
:
{
1
:
'linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%)'
,
7
:
'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)'
,
8
:
'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)'
8
:
'linear-gradient(90deg, #F2FAF5 0%, #FCFDFF 86%)'
,
6
:
'linear-gradient(90deg, #F2F4FA 9%, #FCFDFF 100%)'
},
installItem
:
{},
activityTypList
:
index_const
.
data
.
activityTypList
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -34,7 +34,9 @@ Page({
activityId
}).
then
(
res
=>
{
res
.
orderList
&&
res
.
orderList
.
forEach
(
val
=>
{
val
.
time
=
val
.
createdDate
?
new
Date
(
val
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
:
''
// afterSaleStatus售后状态 6已退款
val
.
time
=
val
.
createdDate
?
new
Date
(
val
.
createdDate
).
format
(
'yyyy.MM.dd hh:mm'
)
:
''
val
.
orderStatus
=
val
.
afterSaleStatus
==
6
?
val
.
afterSaleStatus
:
val
.
orderStatus
val
.
orderPrice
=
centsToyuan
(
val
.
orderPrice
)
})
this
.
setData
({
...
...
packageActivity/pages/order/order.scss
View file @
fc334e3
...
...
@@ -35,7 +35,7 @@
position
:
relative
;
margin-bottom
:
24rpx
;
border-radius
:
24rpx
;
padding
:
24rpx
40rpx
;
padding
:
24rpx
;
box-shadow
:
0
10rpx
20rpx
0
rgba
(
129
,
146
,
214
,
0
.24
)
,
inset
0
-2rpx
6rpx
0
rgba
(
255
,
255
,
255
,
0
.40
);
.top
{
display
:
flex
;
...
...
@@ -46,6 +46,7 @@
width
:
80rpx
;
height
:
80rpx
;
margin-right
:
24rpx
;
border-radius
:
50%
;
}
.name
{
font-size
:
30rpx
;
...
...
@@ -103,12 +104,19 @@
display
:
inline-block
;
padding
:
0
16rpx
;
height
:
44rpx
;
line-height
:
44rpx
;
background
:
#F2F3F7
;
border-radius
:
22rpx
;
color
:
#6E6E7A
;
line-height
:
44rpx
;
font-size
:
24rpx
;
margin
:
16rpx
0
;
text
{
display
:
inline-block
;
max-width
:
300rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.time
{
font-size
:
26rpx
;
...
...
@@ -163,7 +171,7 @@
box-shadow
:
0
10rpx
20rpx
0
rgba
(
129
,
146
,
214
,
0
.24
)
,
inset
0
-2rpx
6rpx
0
rgba
(
255
,
255
,
255
,
0
.40
);
}
}
.no-data
{
display
:
flex
;
flex-flow
:
column
;
...
...
packageActivity/pages/order/order.wxml
View file @
fc334e3
...
...
@@ -17,7 +17,6 @@
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
<text class="order-statue {{item.orderStatus == 1 ? '' : 'green'}}">{{item.orderStatus == 1 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile">{{item.customerPhone || ""}}</view>
</view>
...
...
@@ -31,12 +30,12 @@
<image webp src="{{item.activityImg}}"></image>
<view class="activity">
<view class="name">{{item.activityName}} <text>¥{{item.orderPrice}}</text></view>
<view class="activity-type">
{{item.activityName+'-'+activityTypList[0]}}
</view>
<view class="activity-type">
<text>{{item.activityName}}</text><text>{{'-' + activityTypList[0]}}</text>
</view>
<view class="time">下单时间<text>{{item.time}}</text></view>
</view>
</view>
<view class="order-status">
<image webp src="{{IMGURL}}order_status_{{item.orderStatus}}.
png
"></image>
<image webp src="{{IMGURL}}order_status_{{item.orderStatus}}.
webp
"></image>
<text style="color: {{statusColor[item.orderStatus]}};">{{orderStatusImgList[item.orderStatus]}}</text>
</view>
<view wx:if="{{item.orderStatus == 7}}" class="btn-box"><view class="btn" bind:tap="showPopup" data-item="{{item}}">预约安装</view></view>
...
...
packageActivity/pages/taskDetail/taskDetail.js
View file @
fc334e3
...
...
@@ -2,7 +2,6 @@
import
index_const
from
"~/pages/tab/index/index_const"
import
ActivityApi
from
'~/api/activityApi/index'
import
{
showEmoji
}
from
'~/utils/emoji'
import
QR
from
'~/utils/lib/wxqrcode'
import
{
taskShareReport
}
from
'~/api/api.js'
...
...
@@ -53,22 +52,19 @@ Page({
// 获取任务详情
getActiveTaskDetail
(
missionId
)
{
ActivityApi
.
getActiveTaskDetail
({
missionId
:
missionId
}).
then
(
res
=>
{
ActivityApi
.
getActiveTaskDetail
({
missionId
:
Number
(
missionId
)
}).
then
(
res
=>
{
res
.
imgUrlList
=
[]
// missonType 任务类型1注册 2分享 3浏览 4访客 5下单
if
(
res
.
missonType
!=
2
)
{
// 非分享任务 显示活动专属链接
res
.
linkUrl
=
this
.
filterJumpUrl
(
res
.
activityId
)
// wx.hideShareMenu({
// menus: ['shareAppMessage'],
// })
}
// if (res.missonType != 2) { // 非分享任务 显示活动专属链接
// res.linkUrl = this.filterJumpUrl(res.activityId)
// }
let
typeArr
=
[]
res
.
platformMerchantMissionMaterialResponseList
&&
res
.
platformMerchantMissionMaterialResponseList
.
forEach
(
val
=>
{
typeArr
.
push
(
val
.
materialType
)
// materialType 素材类型1文案 2图片 3视频 4专属链接
if
(
val
.
materialType
==
1
)
{
// 文案
res
.
textContent
=
val
.
materialContent
res
.
filterTextContent
=
`<view
style="word-break: break-all;"
>
${
showEmoji
(
val
.
materialContent
)}
</view>`
res
.
filterTextContent
=
`<view>
${
showEmoji
(
val
.
materialContent
)}
</view>`
}
if
(
val
.
materialType
==
2
||
val
.
materialType
==
3
)
{
// 图片视频
res
.
imgUrlList
.
push
({
...
...
@@ -126,9 +122,11 @@ Page({
},
// 分享按钮
shareEvent
()
{
// 分享类型任务
if
(
this
.
data
.
detailInfo
.
missonType
==
2
)
{
shareEvent
(
e
)
{
let
{
materialTypeArr
}
=
this
.
data
let
{
type
}
=
e
.
currentTarget
.
dataset
// 非注册任务
if
(
type
==
1
)
{
if
(
this
.
data
.
isloading
)
return
this
.
setData
({
isloading
:
true
...
...
@@ -136,13 +134,23 @@ Page({
Promise
.
all
([
this
.
copyText
(),
this
.
saveWith
(),
this
.
reportShareData
()]).
then
(()
=>
{
this
.
setData
({
isloading
:
false
})
})
console
.
log
(
materialTypeArr
,
materialTypeArr
.
indexOf
(
'2'
)
>
-
1
)
wx
.
showToast
({
title
:
'图片及视频已保存到手机相册,
文案已黏贴到剪切板'
,
title
:
materialTypeArr
.
indexOf
(
'2'
)
==
-
1
||
materialTypeArr
.
indexOf
(
'3'
)
==
-
1
?
'图片及视频已保存到手机相册,文案已黏贴到剪切板'
:
'
文案已黏贴到剪切板'
,
icon
:
'none'
})
})
}).
catch
((
err
)
=>
{
wx
.
showToast
({
title
:
err
,
icon
:
'none'
})
this
.
setData
({
isloading
:
false
})
})
}
else
{
// 生成海报
let
item
=
this
.
data
.
detailInfo
wx
.
$api
.
showLoading
()
ActivityApi
.
getActivityPosters
({
id
:
item
.
activityId
}).
then
(
res
=>
{
...
...
@@ -155,20 +163,32 @@ Page({
})
})
}
},
},
// 复制文案及专属链接
copyText
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
{
textContent
,
linkUrl
}
=
this
.
data
.
detailInfo
let
{
textContent
,
linkUrl
}
=
this
.
data
.
detailInfo
let
copyData
=
''
if
(
textContent
&&
linkUrl
)
{
copyData
=
`
${
textContent
}
\n活动链接:
${
linkUrl
}
`
}
else
if
(
!
textContent
&&
linkUrl
)
{
copyData
=
`活动链接:
${
linkUrl
}
`
}
else
if
(
textContent
&&
!
linkUrl
)
{
copyData
=
textContent
}
let
_this
=
this
if
(
!
copyData
.
length
)
{
// 复制内容为空 不做处理
return
resolve
()
}
wx
.
setClipboardData
({
data
:
linkUrl
?
`
${
textContent
}
\n活动链接:
${
linkUrl
}
`
:
textContent
,
data
:
copyData
,
success
()
{
wx
.
hideLoading
()
resolve
()
},
fail
()
{
this
.
setData
({
_
this
.
setData
({
isloading
:
false
})
reject
(
'文案复制失败'
)
...
...
@@ -181,7 +201,9 @@ Page({
reportShareData
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
USERINFO
=
wx
.
$storage
.
get
(
'userInfo'
)
let
{
detailInfo
}
=
this
.
data
let
{
detailInfo
}
=
this
.
data
// 非分享任务无须上报埋点
if
(
detailInfo
.
missonType
!=
2
)
return
resolve
()
let
data
=
{
action_type
:
4
,
// 事件类型固定为4-分享
item_type
:
3
,
// 商品类型,固定为3-众筹活动
...
...
@@ -190,7 +212,8 @@ Page({
business_type
:
1
,
// 业务类型,固定为1
add_way
:
104
,
// 来源,固定为104
create_time
:
new
Date
().
format
(
"yyyy-MM-dd hh:mm:ss"
),
// 分享时间
item_id
:
detailInfo
.
activityId
item_id
:
detailInfo
.
activityId
,
share_staff_type
:
3
}
let
jsonList
=
[
JSON
.
stringify
(
data
)]
taskShareReport
({
jsonList
}).
then
((
res
)
=>
{
...
...
@@ -204,8 +227,8 @@ Page({
}
})
})
},
},
// 一键保存
saveWith
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -233,7 +256,7 @@ Page({
that
.
setData
({
isloading
:
false
})
reject
()
reject
(
'图片/视频下载失败'
)
}
})
}
else
{
...
...
packageActivity/pages/taskDetail/taskDetail.scss
View file @
fc334e3
...
...
@@ -96,12 +96,12 @@
margin-bottom
:
30rpx
;
.bg
{
width
:
100%
;
height
:
1
76
rpx
;
height
:
1
60
rpx
;
}
.user-box
{
position
:
absolute
;
top
:
0
;
padding
:
40rpx
;
padding
:
32rpx
40rpx
;
display
:
flex
;
image
{
width
:
96rpx
;
...
...
@@ -209,6 +209,11 @@
height
:
88rpx
;
color
:
#fff
;
}
.tips
{
margin
:
20rpx
56rpx
0
56rpx
;
font-size
:
24rpx
;
color
:
#9299AD
;
}
}
.canvas-box
{
position
:
absolute
;
...
...
packageActivity/pages/taskDetail/taskDetail.wxml
View file @
fc334e3
...
...
@@ -22,7 +22,7 @@
</view>
<!-- 分享内容 -->
<view class="title">分享内容</view>
<view class="share-box" wx:if="{{detailInfo.missonType
== 2
}}">
<view class="share-box" wx:if="{{detailInfo.missonType
!= 1
}}">
<image class="bg" style="height: {{boxImageHeight}}px;" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<image webp class="user_image" src="{{userStorage.sta_avatarUrl ? userStorage.sta_avatarUrl : userStorage.weChatAvatarUrl ? userStorage.weChatAvatarUrl : IMGURL + 'default_avatar.png'}}"></image>
...
...
@@ -49,8 +49,15 @@
</view>
</view>
</view>
<!-- 非注册任务按钮 -->
<view class="btn-box" wx:if="{{detailInfo.missonType != 1}}">
<view class="btn primary" bind:tap="shareEvent" data-type="{{1}}">复制素材<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
<view class="tips">
{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3) ? '提示:复制素材后可进入微信或企微,从相册中选择素材并粘贴文案,实现素材分享。' : '提示:复制文案后可进入微信或企微并粘贴文案,实现素材分享。'}}
</view>
</view>
<!-- 专属链接 -->
<view wx:if="{{detailInfo.missonType
!= 2
}}">
<view wx:if="{{detailInfo.missonType
== 1
}}">
<view class="copyWriting">将链接转发给好友或发送朋友圈可提高活动曝光度</view>
<view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}">
<image src="{{detailInfo.activityImage ? detailInfo.activityImage : IMGURL+'share_task_default_img.png'}}"></image>
...
...
@@ -60,21 +67,13 @@
</view>
</view>
</view>
<!-- <view class="btn-box">
<view class="btn" wx:if="{{fn.indexOf(materialTypeArr, 1)}}" bind:tap="copyText">复制文案</view>
<view class="btn" wx:if="{{detailInfo.missonType != 2 || fn.indexOf(materialTypeArr, 4)}}" bind:tap="copyUrl">复制链接</view>
<view class="btn" bind:tap="saveWith" wx:if="{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3)}}">
<text>一键保存{{fn.indexOf(materialTypeArr, 2) ? '图片' : '视频'}}</text>
</view>
<button class="btn primary" wx:if="{{detailInfo.missonType == 2 && !fn.indexOf(materialTypeArr, 4)}}" open-type="share">分享</button>
</view> -->
<view class="btn-box">
<view class="btn primary" bind:tap="shareEvent">分享<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
<!-- 注册任务按钮 -->
<view class="btn-box" wx:if="{{detailInfo.missonType == 1}}">
<view class="btn primary" bind:tap="shareEvent" data-type="{{2}}">分享<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
</view>
<!-- 分享活动弹窗 -->
<share-popup show="{{sharePopupData.showSharePopup}}" data="{{sharePopupData}}"></share-popup>
<view class="canvas-box">
<canvas style="width: 352rpx;height: 352rpx;" canvas-id="mycanvas" />
</view>
</view>
</view>
\ No newline at end of file
packageActivity/pages/visitor/visitor.scss
View file @
fc334e3
...
...
@@ -47,6 +47,7 @@
width
:
80rpx
;
height
:
80rpx
;
margin-right
:
24rpx
;
border-radius
:
50%
;
}
.name
{
font-size
:
30rpx
;
...
...
pages/tab/index/components/activeBox/activeBox.js
View file @
fc334e3
// pages/tab/index/components/activeBox/activeBox.js
import
{
imgUrlMixin
}
from
'~/mixins/index'
import
ActivityApi
from
"~/api/activityApi/index"
import
QR
from
'~/utils/lib/wxqrcode'
import
{
domain
}
from
'~/utils/request/http'
...
...
@@ -174,30 +173,6 @@ Component({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
wx
.
$api
.
showLoading
()
ActivityApi
.
getActivityPosters
({
id
:
item
.
id
}).
then
(
res
=>
{
// var code= QR.createQrCodeImg(res.activityUrl);
// /*code是指图片base64格式数据*/
// //声明文件系统
// const fs = wx.getFileSystemManager();
// //随机定义路径名称
// var times = new Date().getTime();
// var codeimg = wx.env.USER_DATA_PATH + '/' + times + '.png';
// //将base64图片写入
// fs.writeFile({
// filePath: codeimg,
// data: code.slice(22),
// encoding: 'base64',
// success: () => {
// thisPage.setData({
// sharePopupData: {
// imagePath: codeimg,
// activityName: res.activityName,
// address: res.activityAddressDetailName,
// posterImg: res.posterImg,
// showSharePopup: true
// },
// })
// }
// });
thisPage
.
setData
({
sharePopupData
:
{
posterImg
:
res
,
...
...
@@ -217,6 +192,7 @@ Component({
// 活动战报
jump
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
// wx.$router.jumpH5('http://glsx-posters.test.glsx.com.cn/#/activiting?activityId=769&navigateTitle=实时战报')
wx
.
$router
.
go
(
'packageActivity.warReport'
,
item
)
}
}
...
...
pages/tab/index/components/activeBox/activeBox.scss
View file @
fc334e3
...
...
@@ -7,10 +7,9 @@
position
:
relative
;
display
:
inline-block
;
margin
:
32rpx
0
8rpx
0
;
border-radius
:
24rpx
;
overflow
:
hidden
;
box-shadow
:
0
5px
10
px
0
rgba
(
204
,
133
,
122
,
0
.16
);
border-radius
:
16
px
;
box-shadow
:
0
10rpx
20r
px
0
rgba
(
204
,
133
,
122
,
0
.16
);
border-radius
:
32r
px
;
.item-bg
{
width
:
100%
;
height
:
100%
;
...
...
pages/tab/index/components/activityDiagnosis/activityDiagnosis.js
View file @
fc334e3
...
...
@@ -58,7 +58,7 @@ Component({
val
.
isloading
=
true
ActivityApi
.
getActivityEndInstallOrderList
({
activityId
:
val
.
id
}).
then
(
res
=>
{
res
.
orderList
&&
res
.
orderList
.
forEach
(
it
=>
{
it
.
time
=
new
Date
(
it
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
it
.
time
=
it
.
createdDate
?
new
Date
(
it
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm'
)
:
''
})
val
.
isloading
=
false
val
.
isCollapse
=
false
...
...
pages/tab/index/components/activityDiagnosis/activityDiagnosis.scss
View file @
fc334e3
...
...
@@ -7,7 +7,9 @@
position
:
relative
;
display
:
inline-block
;
margin
:
32rpx
0
8rpx
0
;
box-shadow
:
0
5px
10px
0
rgba
(
116
,
132
,
194
,
0
.16
)
,
inset
0
-1px
3px
0
rgba
(
255
,
255
,
255
,
0
.40
);
overflow
:
hidden
;
box-shadow
:
0
10rpx
20rpx
0
rgba
(
116
,
132
,
194
,
0
.16
)
,
inset
0
-2rpx
6rpx
0
rgba
(
255
,
255
,
255
,
0
.40
);
border-radius
:
32rpx
;
.item-bg
{
width
:
100%
;
height
:
100%
;
...
...
@@ -62,7 +64,7 @@
.earnings-box
{
width
:
100%
;
height
:
144rpx
;
background-image
:
linear-gradient
(
180deg
,
#
99B4FF
16%
,
#6276F5
93
%
);
background-image
:
linear-gradient
(
180deg
,
#
FFFFFF
72%
,
#EBF1FF
100
%
);
border-radius
:
20rpx
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -73,17 +75,27 @@
display
:
flex
;
flex-flow
:
column
;
justify-content
:
space-between
;
color
:
#FFFFFF
;
font-size
:
28rpx
;
.title
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#6E6E7A
;
}
.sort
{
margin-top
:
8rpx
;
font-size
:
20rpx
;
color
:
#1B233D
;
}
}
.integral-num
{
color
:
#FFEB98
;
font-size
:
68rpx
;
font-weight
:
bold
;
font-weight
:
700
;
text
{
background
:
linear-gradient
(
#FFC233
,
#FF9124
);
-webkit-background-clip
:
text
;
background-clip
:
text
;
color
:
transparent
;
}
.unit
{
font-size
:
28rpx
;
font-weight
:
500
;
margin-left
:
12rpx
;
...
...
pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml
View file @
fc334e3
...
...
@@ -25,7 +25,7 @@
<view class="title">累计收益</view>
<view class="sort">最终排名:{{item.statics.incomeRank || "-"}}</view>
</view>
<view class="integral-num">
{{fn.filterIntegral(item.statics.income || 0)}}<text
>积分</text></view>
<view class="integral-num">
<text>{{fn.filterIntegral(item.statics.income || 0)}}</text><text class="unit"
>积分</text></view>
</view>
<!-- 转化分析 -->
<view class="invert-box {{item.isCollapse ? 'hidden' : ''}}">
...
...
pages/tab/index/components/activityOverview/activityOverview.scss
View file @
fc334e3
...
...
@@ -31,6 +31,7 @@
.sort
{
font-size
:
20rpx
;
color
:
#2D2D33
;
line-height
:
28rpx
;
.up
{
color
:
#EB4E4E
;
}
...
...
pages/tab/index/components/invertAnalyse/invertAnalyse.scss
View file @
fc334e3
...
...
@@ -12,19 +12,19 @@
position
:
absolute
;
top
:
40rpx
;
left
:
0
;
width
:
40
8
rpx
;
height
:
336
rpx
;
width
:
40
6
rpx
;
height
:
288
rpx
;
}
.funnel-content
{
display
:
flex
;
height
:
2
86
rpx
;
height
:
2
48
rpx
;
width
:
100%
;
padding-top
:
5
0rpx
;
padding-top
:
4
0rpx
;
.left
,
.right
{
display
:
flex
;
}
.left
{
flex
:
0
0
40
8
rpx
;
flex
:
0
0
40
6
rpx
;
flex-flow
:
column
;
justify-content
:
space-around
;
align-items
:
center
;
...
...
@@ -56,7 +56,7 @@
top
:
50%
;
}
.sort
{
font-size
:
4
8
rpx
;
font-size
:
4
0
rpx
;
font-weight
:
bold
;
margin-top
:
4rpx
;
}
...
...
pages/tab/index/components/invertAnalyse/invertAnalyse.wxml
View file @
fc334e3
...
...
@@ -3,7 +3,7 @@
<view class="title">转化分析</view>
<view class="funnel-box">
<view class="funnel-bg">
<image webp src="{{IMGURL}}activity_funnel.
png
"></image>
<image webp src="{{IMGURL}}activity_funnel.
webp
"></image>
</view>
<view class="funnel-content">
<view class="left">
...
...
pages/tab/index/index.js
View file @
fc334e3
...
...
@@ -58,7 +58,7 @@ Page({
let
para
=
{
id
:
userStorage
.
bussinessId
}
MineApi
.
getStaffDetailApi
(
para
).
then
(
res
=>
{
MineApi
.
getStaffDetailApi
(
para
,
{
isShowLoading
:
true
}
).
then
(
res
=>
{
if
(
res
.
merchantFileResponse
){
userStorage
.
sta_avatarUrl
=
res
.
merchantFileResponse
.
fileUrl
}
...
...
@@ -91,7 +91,7 @@ Page({
val
.
titleIsWarp
=
this
.
getTextWidth
(
val
.
activityName
,
'18'
,
600
)
>
activityTitleViewWidth
if
(
num
==
1
&&
activePageNum
==
1
&&
index
==
0
)
{
// 活动中默认展开第一条 数据处理
val
.
isloading
=
true
ActivityApi
.
getActiveTaskList
({
activityId
:
val
.
id
}).
then
(
res
=>
{
ActivityApi
.
getActiveTaskList
({
activityId
:
val
.
id
}
,
{
isShowLoading
:
true
}
).
then
(
res
=>
{
val
.
isloading
=
false
val
.
missionList
=
res
val
.
newtaskCalenderList
=
this
.
calenderFilter
(
JSON
.
parse
(
JSON
.
stringify
(
val
.
missionList
))
||
[],
7
)
...
...
@@ -127,13 +127,15 @@ Page({
this
.
setData
({
[
itemVal
]:
val
})
}).
catch
(
err
=>
{
val
.
isloading
=
false
})
}
if
(
num
==
2
&&
pageNum
==
1
&&
index
==
0
)
{
// 活动诊断展开第一条
ActivityApi
.
getActivityEndInstallOrderList
({
activityId
:
val
.
id
}).
then
(
res
=>
{
ActivityApi
.
getActivityEndInstallOrderList
({
activityId
:
val
.
id
}
,
{
isShowLoading
:
true
}
).
then
(
res
=>
{
val
.
isCollapse
=
false
res
.
orderList
&&
res
.
orderList
.
forEach
(
it
=>
{
it
.
time
=
new
Date
(
it
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
it
.
time
=
it
.
createdDate
?
new
Date
(
it
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm'
)
:
''
})
val
.
orderList
=
res
.
orderList
val
.
orderTotal
=
res
.
orderTotal
...
...
@@ -143,6 +145,8 @@ Page({
this
.
setData
({
[
itemVal
]:
val
})
}).
catch
(
err
=>
{
val
.
isloading
=
false
})
}
})
...
...
pages/tab/index/index.scss
View file @
fc334e3
...
...
@@ -71,7 +71,7 @@ page{
}
.add-activity
{
position
:
fixed
;
top
:
6
5%
;
top
:
7
5%
;
right
:
16rpx
;
width
:
160rpx
;
height
:
160rpx
;
...
...
pages/tab/index/index.wxml
View file @
fc334e3
...
...
@@ -8,7 +8,7 @@
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<image webp src="{{IMGURL}}
/index_bg.png
?v={{img_version}}"></image>
<image webp src="{{IMGURL}}
index_bg.webp
?v={{img_version}}"></image>
</view>
</view>
<!-- tab切换 -->
...
...
utils/emoji.js
View file @
fc334e3
...
...
@@ -17,7 +17,6 @@ const emoji = [
[
'让我看看'
,
'666'
,
'红包'
,
'蜡烛'
,
'烟花'
,
'福'
,
'庆祝'
,
'爆竹'
]
]
const
emojiReg
=
/
([^\u
0020-
\u
007E
\u
00A0-
\u
00BE
\u
2E80-
\u
A4CF
\u
F900-
\u
FAFF
\u
FE30-
\u
FE4F
\u
FF00-
\u
FFEF
\u
0080-
\u
009F
\u
2000-
\u
201f
\u
2026
\u
2022
\u
20ac
])
/g
/**过滤表情 */
export
function
haveEmoji
(
value
)
{
let
val
=
false
...
...
@@ -31,26 +30,43 @@ export function haveEmoji(value) {
}
return
val
}
/**替换表情 */
export
function
replaceEmoji
(
value
)
{
let
val
=
value
.
replace
(
emojiReg
,
''
)
return
val
.
trimStart
().
trimEnd
()
}
// 表情回显 文本内容
export
function
showEmoji
(
value
)
{
let
filterValue
=
value
.
replace
(
/
\[[\u
4E00-
\u
9FA5
]{1,3}\]
/gi
,
(
res
)
=>
{
const
list
=
emoji
.
flat
(
Infinity
)
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
);
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
if
(
index
<
10
)
{
index
=
'00'
+
index
}
else
if
(
index
>=
10
&&
index
<
100
)
{
index
=
'0'
+
index
}
console
.
log
(
index
,
word
)
return
`<img webp style="width: 40rpx; height: 40rpx;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/
${
index
}
.png" />`
;
if
(
!
value
)
return
let
a
=
decodeURIComponent
(
value
).
replace
(
/
[
(
\r\n
)|(
\n
)|(↵)
]
+/g
,
'\n'
)
let
b
=
a
.
split
(
'\n'
)
let
filterContent
=
''
b
&&
b
.
forEach
((
val
,
index
)
=>
{
let
filterValue
=
val
.
replace
(
/
\[[\u
4E00-
\u
9FA5
]{1,3}\]
/gi
,
(
res
)
=>
{
const
list
=
emoji
.
flat
(
Infinity
)
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
);
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
if
(
index
<
10
)
{
index
=
'00'
+
index
}
else
if
(
index
>=
10
&&
index
<
100
)
{
index
=
'0'
+
index
}
return
`<img webp style="width: 40rpx; height: 40rpx;display:inline-block;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/
${
index
}
.png" />`
;
})
filterContent
=
filterContent
+
`<view style="display: block">
${
filterValue
}
</view>`
})
return
filterValue
return
filterContent
// let filterValue = a.replace(/\[[\u4E00-\u9FA5]{1,3}\]/gi, (res) => {
// const list = emoji.flat(Infinity)
// let word = res.replace(/\[|\]/gi,'');
// let index = parseInt(list.indexOf(word)) + 1
// if (index < 10) {
// index = '00' + index
// } else if (index >= 10 && index < 100) {
// index = '0' + index
// }
// console.log(index, word)
// return `<img webp style="width: 40rpx; height: 40rpx;display:inline-block;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png" />`;
// })
// return filterValue
}
utils/request/environment.js
View file @
fc334e3
...
...
@@ -7,7 +7,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const
index
=
3
const
index
=
2
const
secretKey
=
{
ip
:
{},
dev
:
{
...
...
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