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 53dc6d7f
authored
Oct 19, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开通业务联调
1 parent
d84edd32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
47 deletions
packageOutput/pages/openBusiness/openBusiness.js
packageOutput/pages/openBusiness/openBusiness.wxml
packageOutput/pages/summary/summary.js
packageOutput/pages/openBusiness/openBusiness.js
View file @
53dc6d7
// packageOutput/pages/openBusiness/openBusiness.js
import
outputApi
from
'~/api/outputApi/index'
Page
({
/**
...
...
@@ -6,6 +7,8 @@ Page({
*/
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
,
merchantInfo
:
{},
sceneCodeList
:
[],
// 场景业务
formData
:
{
scene1
:
true
,
...
...
@@ -22,89 +25,108 @@ Page({
scene3
:
[],
scene4
:
[],
// scene1: [{
//
n
ame: '360实景导航',
//
productN
ame: '360实景导航',
// price: 10
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }, {
//
n
ame: 'AR实景导航',
//
productN
ame: 'AR实景导航',
// price: 20
// }],
// scene2: [{
//
n
ame: '座椅通风',
//
productN
ame: '座椅通风',
// price: 30
// }, {
//
n
ame: '座椅通风',
//
productN
ame: '座椅通风',
// price: 40
// }],
// scene3: [{
//
n
ame: '氛围灯',
//
productN
ame: '氛围灯',
// price: 50
// }, {
//
n
ame: '氛围灯',
//
productN
ame: '氛围灯',
// price: 60
// }],
// scene4: [{
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 70
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 80
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 70
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 80
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 70
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 80
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 70
// }, {
//
n
ame: '数字化',
//
productN
ame: '数字化',
// price: 80
// }]
}
},
getNoOpenPro
(
sceneCode
)
{
var
params
=
{
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
merchant4sId
:
this
.
data
.
merchantInfo
.
merchantId
,
sceneCode
:
sceneCode
}
outputApi
.
getNoOpenPro
(
params
).
then
(
res
=>
{
this
.
setData
({
[
'sceneActivityObj.scene'
+
this
.
data
.
sceneActive
]:
res
})
this
.
setCurActivity
()
})
},
// 场景切换
handleSceneChange
(
e
)
{
var
idx
=
e
.
detail
.
sceneIdx
this
.
setData
({
sceneActive
:
idx
})
if
(
!
this
.
data
.
sceneActivityObj
[
'scene'
+
this
.
data
.
sceneActive
].
length
)
{
this
.
getNoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
return
true
}
this
.
setCurActivity
()
// console.log('换内容---')
},
...
...
@@ -115,10 +137,11 @@ Page({
})
},
// 活动切换
handleActClick
(
e
)
{
var
idx
=
e
.
currentTarget
.
dataset
.
idx
this
.
setData
({
[
'activityList['
+
idx
+
'].checked'
]:
!
this
.
data
.
activityList
[
idx
].
checked
[
'activityList['
+
idx
+
'].checked'
]:
!
this
.
data
.
activityList
[
idx
].
checked
})
},
...
...
@@ -127,7 +150,7 @@ Page({
sceneActive
:
this
.
data
.
sceneActive
,
activityIdxList
:
this
.
data
.
activityList
.
filter
(
item
=>
item
.
checked
==
true
)
}
if
(
!
params
.
activityIdxList
.
length
)
{
if
(
!
params
.
activityIdxList
.
length
)
{
wx
.
$api
.
showToast
(
'请选产品/活动'
)
return
true
}
...
...
@@ -136,28 +159,22 @@ Page({
title
:
'提交成功'
,
icon
:
'success'
})
// equityApi.addClueRescue(obj).then(res => {
// wx.hideLoading()
// wx.showModal({
// content: '您的救援服务单已提交成功',
// confirmText: '返回',
// showCancel: false,
// confirmColor: '#FC5B32'
// }).then(res => {
// if (res.confirm) {
// wx.switchTab({
// url: '/pages/tab/index/index'
// })
// }
// })
// })
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
this
.
setCurActivity
()
wx
.
$router
.
getData
(
obj
=>
{
console
.
log
(
obj
)
this
.
setData
({
merchantInfo
:
obj
,
sceneActive
:
obj
.
sceneActive
,
sceneCodeList
:
obj
.
sceneCodeList
})
this
.
getNoOpenPro
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
})
},
/**
...
...
packageOutput/pages/openBusiness/openBusiness.wxml
View file @
53dc6d7
...
...
@@ -16,7 +16,7 @@
<view class="box">
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box">
<view class="activity-item text-hide {{ item.checked ? 'active' : '' }}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActClick" data-idx="{{index}}">{{item.
n
ame}}</view>
<view class="activity-item text-hide {{ item.checked ? 'active' : '' }}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActClick" data-idx="{{index}}">{{item.
productN
ame}}</view>
</view>
</view>
</view>
...
...
packageOutput/pages/summary/summary.js
View file @
53dc6d7
...
...
@@ -173,8 +173,13 @@ Page({
},
handleJump
(
e
)
{
console
.
log
(
this
.
data
.
activityList
[
this
.
data
.
activityActive
])
wx
.
$router
.
go
(
'packageOutput.openBusiness'
)
// console.log(this.data.activityList[this.data.activityActive])
var
params
=
{
merchantInfo
:
this
.
data
.
merchantInfo
,
sceneActive
:
this
.
data
.
sceneActive
,
sceneCodeList
:
this
.
data
.
sceneCodeList
}
wx
.
$router
.
go
(
'packageOutput.openBusiness'
,
params
)
},
getNoOpenPro
(
sceneCode
)
{
...
...
@@ -231,8 +236,8 @@ Page({
res
.
forEach
(
item
=>
{
var
idx
=
actCodeList
.
findIndex
(
i
=>
i
==
item
.
productCode
)
if
(
idx
!=
-
1
)
{
var
orderTotal
=
item
.
orderTotal
if
(
item
.
orderTotal
)
{
var
orderTotal
=
item
.
orderTotal
if
(
item
.
orderTotal
)
{
item
.
orderTotal
.
calCustomerUnitPrice
=
Math
.
round
(
orderTotal
.
totalSubOrderOrderMoney
/
orderTotal
.
upgradeCount
).
toFixed
(
0
)
item
.
orderTotal
.
calExperience
=
Math
.
round
((
orderTotal
.
experienceCount
*
100
)
/
orderTotal
.
toShopCount
).
toFixed
(
0
)
item
.
orderTotal
.
calTransform
=
Math
.
round
((
orderTotal
.
upgradeCount
*
100
)
/
orderTotal
.
experienceCount
).
toFixed
(
0
)
...
...
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