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 f8adee23
authored
Oct 20, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop
2 parents
3f1cb536
1dfb66ef
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
256 additions
and
345 deletions
api/outputApi/output.js
api/usersApi/UsersApi.js
packageOutput/pages/openBusiness/openBusiness.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml
packageOutput/pages/summary/summary.js
packageOutput/pages/summary/summary.wxml
pages/checkProduct/checkProduct.js
pages/tab/index/index.js
pages/tab/index/index.wxml
pages/tab/output/components/client/client.js
router/router.js
utils/share.js
api/outputApi/output.js
View file @
f8adee2
...
...
@@ -56,5 +56,33 @@ class outputApi {
}
)
}
/**查询场景和产品的开通状态 */
getSceneProStatus
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.activity.findSceneProductStatus'
,
...
data
}
)
}
/** 申请开通活动*/
applyActivity
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.activity.apply'
,
...
data
}
)
}
/** 查询门店众筹活动产值 */
getActivityRevenue
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.merchant.activity.Revenue'
,
...
data
}
)
}
}
export
default
outputApi
api/usersApi/UsersApi.js
View file @
f8adee2
...
...
@@ -140,10 +140,6 @@ class UsersApi {
...
data
})
}
/** 手机号授权解析(单纯解析内容返回前端)
* 只传loginToken就返回unionId和openid
* 传加密信息就解析手机号
*/
/**获取微信用户信息 */
async
getWXUserInfo
()
{
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
)
...
...
@@ -153,6 +149,10 @@ class UsersApi {
return
data
}
else
return
wx_user_info
}
/** 手机号授权解析(单纯解析内容返回前端)
* 只传loginToken就返回unionId和openid
* 传加密信息就解析手机号
*/
async
getUserProfile
(
loginToken
,
detail
=
{})
{
if
(
detail
.
errMsg
&&
detail
.
errMsg
==
'getPhoneNumber:fail user deny'
)
Promise
.
reject
()
delete
detail
.
errMsg
...
...
packageOutput/pages/openBusiness/openBusiness.js
View file @
f8adee2
...
...
@@ -23,95 +23,21 @@ Page({
scene1
:
[],
scene2
:
[],
scene3
:
[],
scene4
:
[],
// scene1: [{
// productName: '360实景导航',
// price: 10
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }, {
// productName: 'AR实景导航',
// price: 20
// }],
// scene2: [{
// productName: '座椅通风',
// price: 30
// }, {
// productName: '座椅通风',
// price: 40
// }],
// scene3: [{
// productName: '氛围灯',
// price: 50
// }, {
// productName: '氛围灯',
// price: 60
// }],
// scene4: [{
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80
// }]
scene4
:
[]
}
},
get
NoOpenPro
(
sceneCode
)
{
get
SceneProStatus
(
sceneCode
)
{
var
params
=
{
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
merchant4sId
:
this
.
data
.
merchantInfo
.
merchantId
,
sceneCode
:
sceneCode
}
outputApi
.
getNoOpenPro
(
params
).
then
(
res
=>
{
outputApi
.
getSceneProStatus
(
params
).
then
(
res
=>
{
var
proList
=
res
.
find
(
item
=>
item
.
sceneCode
==
sceneCode
)
console
.
log
(
proList
,
'??????'
)
this
.
setData
({
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
res
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
proList
.
productList
.
filter
(
item
=>
!
item
.
openFlag
)
})
this
.
setCurActivity
()
})
...
...
@@ -124,7 +50,7 @@ Page({
sceneActive
:
idx
})
if
(
!
this
.
data
.
sceneActivityObj
[
'scene'
+
this
.
data
.
sceneActive
].
length
)
{
this
.
get
NoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
get
SceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
return
true
}
this
.
setCurActivity
()
...
...
@@ -145,19 +71,36 @@ Page({
})
},
handleJump
()
{
clearTimeout
(
this
.
data
.
time
)
this
.
data
.
time
=
new
setTimeout
(()
=>
{
wx
.
$router
.
go
(
'pages.output'
)
},
3000
)
},
handleConfirm
()
{
var
params
=
{
sceneActive
:
this
.
data
.
sceneActive
,
activityIdxList
:
this
.
data
.
activityList
.
filter
(
item
=>
item
.
checked
==
true
)
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
serviceMerchantName
:
this
.
data
.
merchantInfo
.
pMerchantName
,
merchantId
:
this
.
data
.
merchantInfo
.
merchantId
,
merchantName
:
this
.
data
.
merchantInfo
.
merchantName
,
sceneCode
:
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
],
productCodes
:
this
.
data
.
activityList
.
filter
(
item
=>
item
.
checked
==
true
).
map
(
item
=>
item
.
productCode
)
}
if
(
!
params
.
activityIdxList
.
length
)
{
if
(
!
params
.
productCodes
.
length
)
{
wx
.
$api
.
showToast
(
'请选产品/活动'
)
return
true
}
console
.
log
(
params
)
wx
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
outputApi
.
applyActivity
(
params
).
then
(
res
=>
{
wx
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
,
duration
:
3000
,
mask
:
true
,
success
:
()
=>
{
this
.
handleJump
()
}
})
})
},
...
...
@@ -166,14 +109,12 @@ Page({
*/
onLoad
(
options
)
{
wx
.
$router
.
getData
(
obj
=>
{
console
.
log
(
obj
)
this
.
setData
({
merchantInfo
:
obj
,
merchantInfo
:
obj
.
merchantInfo
,
sceneActive
:
obj
.
sceneActive
,
sceneCodeList
:
obj
.
sceneCodeList
})
this
.
getNoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
})
},
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
View file @
f8adee2
...
...
@@ -4,10 +4,10 @@ Component({
* 组件的属性列表
*/
properties
:
{
//
orderObj: {
//
type: Object,
//
value: () => { }
//
},
orderObj
:
{
type
:
Object
,
value
:
()
=>
{
}
},
},
/**
...
...
@@ -16,13 +16,13 @@ Component({
data
:
{
orderFormList
:
[{
label
:
'总场次'
,
name
:
'
zongcc
'
name
:
'
totalNum
'
},
{
label
:
'总订单'
,
name
:
'
orderNum
'
name
:
'
totalAmount
'
},
{
label
:
'成交金额'
,
name
:
'
price
'
,
name
:
'
totalOrderCount
'
,
prefix
:
'¥'
}],
merchantFormList
:
[{
...
...
@@ -30,15 +30,15 @@ Component({
name
:
'time'
},
{
label
:
'订单数'
,
name
:
'order
Num
'
name
:
'order
Count
'
},
{
label
:
'产值'
,
name
:
'
orderPrice
'
,
name
:
'
realAmount
'
,
className
:
'red'
,
prefix
:
'¥'
},
{
label
:
'预估产值'
,
name
:
'
ygcz
'
,
name
:
'
predictAmount
'
,
prefix
:
'¥'
}],
tableHeadList
:
[{
...
...
@@ -47,67 +47,28 @@ Component({
width
:
'24rpx'
},
{
label
:
'业务员'
,
name
:
'
ywy
'
,
name
:
'
shareName
'
,
},
{
label
:
'转发'
,
name
:
'
zf
'
,
name
:
'
shareCount
'
,
},
{
label
:
'浏览'
,
name
:
'
ll
'
name
:
'
browseCount
'
},
{
label
:
'成交'
,
name
:
'
cj
'
,
name
:
'
dealCount
'
,
width
:
'92rpx'
},
{
label
:
'产值'
,
name
:
'
cz
'
,
name
:
'
totalAmount
'
,
prefix
:
'¥'
}],
// 数据--
orderObj
:
{
zongcc
:
28
,
orderNum
:
198
,
price
:
12000
},
merchantDataList
:
[{
name
:
'嘀加鹏辉奥迪4S店(深圳)'
,
time
:
'09/28 11:19~09/30 12:39'
,
orderNum
:
'100'
,
orderPrice
:
'1280.00'
,
ygcz
:
'2280.00'
,
}]
},
rankList
:
[{
ywy
:
'隋瑗'
,
zf
:
'4897'
,
ll
:
'927'
,
cj
:
'166'
,
cz
:
'9991280.00'
},
{
ywy
:
'隋瑗'
,
zf
:
'4897'
,
ll
:
'927'
,
cj
:
'166'
,
cz
:
'9991280.00'
},
{
ywy
:
'隋瑗'
,
zf
:
'4897'
,
ll
:
'927'
,
cj
:
'166'
,
cz
:
'9991280.00'
},
{
ywy
:
'隋瑗'
,
zf
:
'4897'
,
ll
:
'927'
,
cj
:
'166'
,
cz
:
'9991280.00'
},
{
ywy
:
'隋瑗'
,
zf
:
'4897'
,
ll
:
'927'
,
cj
:
'166'
,
cz
:
'9991280.00'
}]
}],
lifetimes
:
{
attached
()
{
console
.
log
(
this
.
data
.
orderObj
,
'///////////'
)
},
},
/**
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml
View file @
f8adee2
...
...
@@ -9,9 +9,9 @@
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{
merchantData
List}}" wx:key="index">
<view class="box merchant" wx:for="{{
orderObj.activity
List}}" wx:key="index">
<view class="head">
<view class="text-hide head-title">{{item.
n
ame}}</view>
<view class="text-hide head-title">{{item.
activityN
ame}}</view>
<view class="head-link" bindtap="handleCopy">复制活动链接</view>
</view>
<view class="content">
...
...
@@ -26,14 +26,16 @@
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status">已开始3天</view>
<view class="activity-status" wx:if="{{item.actStatus == 0}}">距离开始{{item.interDays}}天</view>
<view class="activity-status" wx:if="{{item.actStatus == 1}}">已开始{{item.interDays}}天</view>
<view class="activity-status" wx:if="{{item.actStatus == 2 && item.interDays < 8}}">已结束{{item.interDays}}天</view>
</view>
<view class="rank-table">
<view class="tr">
<view class="th" style="width: {{subItem.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">{{subItem.label}}</view>
</view>
<view wx:if="{{item.
rank
List.length}}">
<block wx:for="{{item.
rank
List}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view wx:if="{{item.
staff
List.length}}">
<block wx:for="{{item.
staff
List}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="tr">
<view class="td" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j">
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
...
...
@@ -48,18 +50,21 @@
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest">
<view class="content-suggest"
wx:if="{{item.actStatus == 1 && item.suggestTxtList.length}}"
>
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">距离活动结束剩余8天,分享员工占比低于40%,点击转化率低于5%;推荐以下建议:</view>
<view class="suggest-txt">
<!-- <text wx:if="{{item.toEndDays < 8}}">距离活动结束剩余{{item.interDays}}天,</text> -->
{{item.suggestTxt}}
</view>
<view class="suggest-block">
<view class="suggest-step">
<view class="step-label">建议
1
</view>
<view class="step-txt">
与4S店关键人沟通下注册员工的转发执行情况。
</view>
<view class="suggest-step"
wx:for="{{item.suggestList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"
>
<view class="step-label">建议
{{idx + 1}}
</view>
<view class="step-txt">
{{subItem}}
</view>
</view>
<view class="suggest-step">
<
!-- <
view class="suggest-step">
<view class="step-label">建议2</view>
<view class="step-txt">触达车主人数太少,建议与4S店关键人沟通注册员工的转发执行情况。</view>
</view>
</view>
-->
</view>
</view>
</view>
...
...
packageOutput/pages/summary/summary.js
View file @
f8adee2
...
...
@@ -13,9 +13,9 @@ Page({
scene1
:
null
,
scene2
:
null
,
scene3
:
null
,
scene4
:
null
scene4
:
true
},
sceneActive
:
2
,
sceneActive
:
4
,
scenePriceList
:
[{
total
:
0
},
{
...
...
@@ -33,80 +33,7 @@ Page({
scene1
:
[],
scene2
:
[],
scene3
:
[],
scene4
:
[],
// [{
// productName: '360实景导航',
// price: 10
// }, {
// productName: 'AR实景导航',
// price: 20,
// openFlag: true
// }, {
// productName: 'AR实景导航',
// price: 20,
// openFlag: true
// }, {
// productName: 'AR实景导航',
// price: 20,
// openFlag: true
// }, {
// productName: 'AR实景导航',
// price: 20,
// openFlag: false
// }, {
// productName: 'AR实景导航',
// price: 20,
// openFlag: true
// }],
// scene2: [{
// productName: '座椅通风',
// price: 30,
// openFlag: true,
// toShopCount: 120,
// experienceCount: 200,
// upgradeCount: 300,
// totalOrderMoney: 365
// }, {
// productName: '座椅通风',
// price: 40
// }],
// scene3: [{
// productName: '氛围灯',
// price: 50
// }, {
// productName: '氛围灯',
// price: 60,
// openFlag: true
// }],
// scene4: [{
// productName: '数字化',
// price: 70,
// openFlag: true
// }, {
// productName: '数字化',
// price: 80
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80,
// openFlag: true
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80,
// openFlag: true
// }, {
// productName: '数字化',
// price: 70
// }, {
// productName: '数字化',
// price: 80,
// openFlag: true
// }]
scene4
:
[]
},
// 产值
searchForm
:
{
...
...
@@ -128,7 +55,7 @@ Page({
activityActive
:
0
})
if
(
!
this
.
data
.
sceneActivityObj
[
'scene'
+
this
.
data
.
sceneActive
].
length
)
{
this
.
get
NoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
get
SceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
return
true
}
this
.
setCurActivity
()
...
...
@@ -182,18 +109,23 @@ Page({
wx
.
$router
.
go
(
'packageOutput.openBusiness'
,
params
)
},
get
NoOpenPro
(
sceneCode
)
{
get
SceneProStatus
(
sceneCode
)
{
var
params
=
{
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
merchant4sId
:
this
.
data
.
merchantInfo
.
merchantId
,
sceneCode
:
sceneCode
}
outputApi
.
getNoOpenPro
(
params
).
then
(
res
=>
{
outputApi
.
getSceneProStatus
(
params
).
then
(
res
=>
{
var
proList
=
res
.
find
(
item
=>
item
.
sceneCode
==
sceneCode
)
// 删----
proList
.
productList
[
1
].
productStatus
=
2
this
.
setData
({
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
res
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
proList
.
productList
})
if
([
2
,
3
].
includes
(
+
this
.
data
.
sceneActive
))
{
this
.
getCustomerDetail
()
}
else
if
(
this
.
data
.
sceneActive
==
4
)
{
this
.
getActivityRevenue
()
}
else
{
this
.
setCurActivity
()
}
...
...
@@ -262,10 +194,97 @@ Page({
})
},
dealSearchStatus
()
{
var
params
=
{}
switch
(
this
.
data
.
searchForm
[
'scene'
+
this
.
data
.
sceneActive
+
'Idx'
])
{
case
0
:
params
.
activityStatuList
=
[
1
,
2
]
break
// 申请中
case
1
:
params
.
activityStatuList
=
[
1
]
break
// 活动中
case
2
:
params
.
activityStatuList
=
[
2
]
break
// 已结束
case
3
:
params
.
activityStatuList
=
[
3
]
break
}
return
params
},
/** 查询场景4的产值 */
getActivityRevenue
()
{
var
params
=
this
.
dealSearchStatus
()
outputApi
.
getActivityRevenue
({
merchantId
:
this
.
data
.
merchantInfo
.
merchantId
,
...
params
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
this
.
data
.
sceneActivityObj
,
'++++++'
)
var
actList
=
this
.
data
.
sceneActivityObj
[
'scene'
+
this
.
data
.
sceneActive
]
actList
.
forEach
((
item
,
idx
)
=>
{
var
curItem
=
res
.
find
(
k
=>
k
.
goodsCategoryCode
==
item
.
productCode
)
if
(
curItem
)
{
console
.
log
(
curItem
)
curItem
.
totalNum
=
curItem
.
activityList
.
length
curItem
.
activityList
.
forEach
(
k
=>
{
k
.
time
=
k
.
startTime
.
slice
(
5
).
replace
(
/-/g
,
'/'
)
+
'~'
+
k
.
endTime
.
slice
(
5
).
replace
(
/-/g
,
'/'
)
// 0-未开始;1-开始中;2-已结束
if
(
new
Date
(
k
.
startTime
)
>
new
Date
())
{
k
.
actStatus
=
0
k
.
interDays
=
parseInt
((
new
Date
().
getTime
(
k
.
startTime
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
else
if
(
new
Date
(
k
.
startTime
)
<
new
Date
()
<
new
Date
(
k
.
endTime
))
{
k
.
actStatus
=
1
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
k
.
startTime
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
k
.
endTime
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
else
if
(
new
Date
(
k
.
endTime
)
<
new
Date
())
{
k
.
actStatus
=
2
k
.
interDays
=
parseInt
((
new
Date
().
getTime
(
k
.
endTime
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
k
.
suggestTxtList
=
[]
k
.
suggestList
=
[]
if
(
k
.
visitCount
<
200
)
{
if
((
k
.
actStatus
==
2
&&
k
.
interDays
<
8
)
||
k
.
actStatus
!=
2
)
{
k
.
suggestTxtList
.
push
(
'距离活动结束剩余'
+
k
.
toEndDays
+
'天'
)
}
k
.
suggestList
.
push
(
'触达车主的数量太少,建议与4S店关键人沟通下注册员工的转发执行情况'
)
}
if
(
k
.
shareRate
<
0.4
)
{
k
.
suggestTxtList
.
push
(
'分享员工占比低于40%'
)
k
.
suggestList
.
push
(
'建议与4S店关键人沟通下注册员工的转发执行情况'
)
}
if
(
k
.
conversionRate
<
0.05
)
{
k
.
suggestTxtList
.
push
(
'点击转化率低于5%'
)
k
.
suggestList
.
push
(
'建议调整该产品的品类话术和营销内容'
)
}
k
.
suggestTxt
=
k
.
suggestTxtList
.
join
(
','
)
+
'。'
})
actList
[
idx
].
outputData
=
curItem
}
})
this
.
setData
({
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
actList
})
this
.
setCurActivity
()
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
this
.
setData
({
merchantInfo
:
{
pMerchantId
:
44209845
,
merchantId
:
44209390
,
merchantName
:
'????'
},
sceneCodeList
:
[
'SC001'
,
'SC002'
,
'SC003'
,
'SC004'
]
})
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
wx
.
$router
.
getData
(
obj
=>
{
console
.
log
(
obj
)
var
scene
=
{}
...
...
@@ -278,7 +297,7 @@ Page({
sceneCodeList
:
obj
.
sceneCodeList
})
this
.
get
NoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
get
SceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
// this.getCustomerDetail()
// this.setCurActivity()
})
...
...
packageOutput/pages/summary/summary.wxml
View file @
f8adee2
<!--packageOutput/pages/summary/summary.wxml-->
<view class="summary">
<view class="layout {{ (sceneActive == 4 && activityList[activityActive].
openFlag
) ? 'bg-grey' : 'bg-white'}}">
<view class="layout {{ (sceneActive == 4 && activityList[activityActive].
productStatus == 2
) ? 'bg-grey' : 'bg-white'}}">
<view class="title bg-white">选产品/活动</view>
<view class="scene-box bg-white">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange"></scene-box>
...
...
@@ -9,13 +9,13 @@
<view class="p-rl-20 bg-white">
<scroll-view scroll-x="{{true}}" class="activity-box" scroll-left="{{scrollLeft}}">
<view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.
openFlag
? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.productName}}</view>
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.
productStatus == 2
? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.productName}}</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content">
<view wx:if="{{activityList[activityActive].
openFlag
&& sceneActive != 1}}">
<view wx:if="{{activityList[activityActive].
productStatus == 2
&& sceneActive != 1}}">
<view class="activity-title title bg-white {{ sceneActive == 4 ? 'no-border' : ''}}">
<view>看产值</view>
<view class="select" bindtap="handleSearch">
...
...
@@ -25,12 +25,12 @@
</view>
</view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}"></output-transform>
<output-crowdfund wx:if="{{sceneActive == 4}}"></output-crowdfund>
<output-crowdfund wx:if="{{sceneActive == 4}}"
orderObj="{{activityList[activityActive].outputData}}"
></output-crowdfund>
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{
!activityList[activityActive].openFlag
}}" class="btn-blue" bindtap="handleJump">点击开通</view>
<view wx:if="{{
activityList[activityActive].productStatus != 2
}}" class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
\ No newline at end of file
pages/checkProduct/checkProduct.js
View file @
f8adee2
...
...
@@ -59,31 +59,32 @@ Page({
actNum
,
activeNavIdx
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
console
.
log
(
options
)
if
(
options
.
shareOpenId
)
{
if
(
this
.
options
?.
shareOpenId
)
{
const
WXUSERINFO
=
wx
.
$storage
.
get
(
'wx_user_info'
),
USERINFO
=
wx
.
$storage
.
get
(
'userInfo'
)
USERINFO
=
wx
.
$storage
.
get
(
'userInfo'
),
shareInfo
=
this
.
options
reportData
({
openId
:
WXUSERINFO
.
openId
||
''
,
unionId
:
WXUSERINFO
.
unionId
||
''
,
nickName
:
WXUSERINFO
.
nickName
||
''
,
avatar
:
WXUSERINFO
.
avatarUrl
||
''
,
phone
:
USERINFO
.
phone
||
''
,
merchantId
:
options
.
merchantId
||
''
,
shareOpenId
:
options
.
shareOpenId
||
''
,
sharePhone
:
options
.
sharePhone
||
''
,
productCode
:
options
.
productCode
||
''
,
productDesc
:
options
.
productDesc
||
''
merchantId
:
shareInfo
.
merchantId
||
''
,
shareOpenId
:
shareInfo
.
shareOpenId
||
''
,
sharePhone
:
shareInfo
.
sharePhone
||
''
,
productCode
:
shareInfo
.
productCode
||
''
,
productDesc
:
shareInfo
.
productDesc
||
''
},
1
)
// 禁用分享功能
wx
.
hideShareMenu
()
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
// actNum,activeNavIdx isShare
},
...
...
pages/tab/index/index.js
View file @
f8adee2
...
...
@@ -226,9 +226,18 @@ Page({
readApi
(
param
)
}
},
gotoApply
()
{
gotoApply
(
e
)
{
let
{
type
,
item
}
=
e
.
currentTarget
.
dataset
console
.
log
(
'type,item: '
,
type
,
item
);
if
(
type
==
"active"
){
//申请活动
wx
.
$router
.
go
(
"packageOutput.openBusiness"
);
}
else
{
//申请门店
wx
.
$router
.
go
(
"apply"
);
}
// wx.$router.go('apply',1235)
wx
.
$router
.
go
(
"apply"
);
},
getMore
(
e
)
{
console
.
log
(
"显示更多数据"
);
...
...
pages/tab/index/index.wxml
View file @
f8adee2
...
...
@@ -70,7 +70,7 @@
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply">
<view class="btn" hover-class="none" hover-stop-propagation="false"
data-type="active" data-item="{{item}}"
bindtap="gotoApply">
开通活动
</view>
</view>
...
...
@@ -106,7 +106,7 @@
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" />
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false"
bindtap="gotoApply
" wx:if="{{item.applyStatus == 0}}">
<view class="btn" hover-class="none" hover-stop-propagation="false"
data-type="shop" bindtap="gotoApply" data-item="{{item}}
" wx:if="{{item.applyStatus == 0}}">
+开店面
</view>
</view>
...
...
pages/tab/output/components/client/client.js
View file @
f8adee2
...
...
@@ -17,73 +17,19 @@ Component({
*/
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
,
pMerchantId
:
44209845
,
// pMerchantId: 41214,
pMerchantId
:
''
,
totalProfit
:
0
,
pageObj
:
{
currentPage
:
1
,
pageSize
:
3
},
totalPages
:
-
1
,
list
:
[{
"totalMoney"
:
540967.00
,
"merchantId"
:
44211468
,
"merchantName"
:
"明明长岭4s店A"
,
"sceneList"
:
[{
"sceneCode"
:
"SC001"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC002"
,
"flag"
:
true
},
{
"sceneCode"
:
"SC003"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC004"
,
"flag"
:
null
}],
"msgList"
:
null
},
{
"totalMoney"
:
67341.00
,
"merchantId"
:
44211470
,
"merchantName"
:
"明明长岭4s店C"
,
"sceneList"
:
[{
"sceneCode"
:
"SC001"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC002"
,
"flag"
:
true
},
{
"sceneCode"
:
"SC003"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC004"
,
"flag"
:
null
}],
"msgList"
:
null
},
{
"totalMoney"
:
54146.00
,
"merchantId"
:
44211469
,
"merchantName"
:
"明明长岭4s店B"
,
"sceneList"
:
[{
"sceneCode"
:
"SC001"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC002"
,
"flag"
:
true
},
{
"sceneCode"
:
"SC003"
,
"flag"
:
null
},
{
"sceneCode"
:
"SC004"
,
"flag"
:
null
}],
"msgList"
:
null
}]
list
:
[]
},
lifetimes
:
{
attached
()
{
// this.getClientApi()
this
.
getPMerchantInfo
()
this
.
getClientApi
()
}
},
...
...
@@ -91,6 +37,13 @@ Component({
* 组件的方法列表
*/
methods
:
{
getPMerchantInfo
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
this
.
setData
({
pMerchantInfo
:
userInfo
,
pMerchantId
:
userInfo
.
subLoginUser
.
merchantId
})
},
getClientApi
()
{
this
.
getProfit
()
this
.
getList
()
...
...
@@ -142,7 +95,8 @@ Component({
scene3
:
currentItem
.
scene3
,
scene4
:
currentItem
.
scene4
,
sceneCodeList
:
currentItem
.
sceneList
.
map
(
item
=>
item
.
sceneCode
),
pMerchantId
:
this
.
data
.
pMerchantId
pMerchantId
:
this
.
data
.
pMerchantId
,
pMerchantName
:
this
.
data
.
pMerchantInfo
.
subLoginUser
.
merchantName
}
wx
.
$router
.
go
(
'packageOutput.summary'
,
params
)
}
...
...
router/router.js
View file @
f8adee2
...
...
@@ -5,6 +5,7 @@ import { IMG_URL } from '~/utils/constantData'
import
{
generateRoutList
}
from
'./wxOnAppRoute.js'
import
{
getNavigationBarTitleText
}
from
'~/utils/cache/storageApi'
import
{
getUserInfo
}
from
'~/utils/cache/userInfo'
import
USERAPI
from
'~/api/usersApi/index'
class
Router
{
[
_query
]
=
{};
[
_routeHooks
]
=
[];
...
...
@@ -12,11 +13,12 @@ class Router {
constructor
(
router
)
{
this
[
_routerList
]
=
generateRoutList
(
router
)
wx
.
onAppRoute
&&
wx
.
onAppRoute
(
e
=>
{
wx
.
onAppRoute
(
async
e
=>
{
let
thisPage
=
this
.
getPageInstance
()
if
(
thisPage
)
{
await
USERAPI
.
getWXUserInfo
()
thisPage
.
setData
({
IMG_URL
})
thisPage
.
options
=
this
[
_query
]
if
(
Object
.
keys
(
this
[
_query
]).
length
)
thisPage
.
options
=
this
[
_query
]
this
.
setNavigationBarTitleText
(
thisPage
)
let
onRoute
=
thisPage
.
onRoute
typeof
onRoute
===
'function'
&&
onRoute
(
this
[
_query
])
...
...
utils/share.js
View file @
f8adee2
...
...
@@ -5,16 +5,13 @@
* @param {*} shareQuery 分享页面参数
* @param {*} noPageAuth 分享页面是否需要登录拦截
* @param {*} shareFun 分享页面
* @param {*}
isShareTrack 是否分享埋点
* @param {*}
shareTrackData 分享埋点数据
* @returns
*/
import
{
reportData
}
from
'~/api/index.js'
import
USERAPI
from
'~/api/usersApi/index'
const
_WXUSERINFO_
=
Symbol
(
'_WXUSERINFO_'
)
class
Share
{
[
_WXUSERINFO_
]
=
null
constructor
()
{
console
.
log
(
'---------------- 分享初始化 ----------------'
)
this
.
initPageProxy
()
...
...
@@ -31,17 +28,11 @@ class Share {
}
}
}
async
checkWxUserInfo
()
{
if
(
!
this
[
_WXUSERINFO_
])
{
const
data
=
await
USERAPI
.
getWXUserInfo
()
this
[
_WXUSERINFO_
]
=
data
}
}
/**设置全局分享 */
pageLeaveProxy
(
page
)
{
if
(
page
.
onShareAppMessage
)
{
const
that
=
this
this
.
checkWxUserInfo
()
page
.
onShareAppMessage
=
function
()
{
let
{
shareTitle
,
...
...
@@ -89,7 +80,7 @@ class Share {
}
}
getCommonData
()
{
const
WXUSERINFO
=
this
[
_WXUSERINFO_
]
,
const
WXUSERINFO
=
wx
.
$storage
.
get
(
'wx_user_info'
)
,
USERINFO
=
wx
.
$storage
.
get
(
'userInfo'
)
return
{
WXUSERINFO
,
...
...
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