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 0cf07170
authored
Oct 14, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开通店面业务,店面产值-未开通
1 parent
8babe65d
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
519 additions
and
6 deletions
components/SenceBox/SenceBox.js
components/SenceBox/SenceBox.wxml
packageOutput/pages/openBusiness/openBusiness.js
packageOutput/pages/openBusiness/openBusiness.json
packageOutput/pages/openBusiness/openBusiness.scss
packageOutput/pages/openBusiness/openBusiness.wxml
packageOutput/pages/summary/summary.js
packageOutput/pages/summary/summary.scss
packageOutput/pages/summary/summary.wxml
components/SenceBox/SenceBox.js
View file @
0cf0717
...
@@ -8,6 +8,10 @@ Component({
...
@@ -8,6 +8,10 @@ Component({
type
:
Number
,
type
:
Number
,
value
:
-
1
value
:
-
1
},
},
hasOpenIcon
:
{
type
:
Boolean
,
value
:
true
},
formData
:
{
formData
:
{
type
:
Object
,
type
:
Object
,
value
:
()
=>
{
}
value
:
()
=>
{
}
...
...
components/SenceBox/SenceBox.wxml
View file @
0cf0717
<!--pages/tab/output/components/senceBox/senceBox.wxml-->
<!--pages/tab/output/components/senceBox/senceBox.wxml-->
<view class="flex sence">
<view class="flex sence">
<view class="sence-item {{ formData['sence' + (index + 1)] ? 'open' : ''}} {{ (senceActive != -1 && senceActive == index + 1) ? 'active' : ''}}" wx:for="{{custSenceList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view class="sence-item {{ formData['sence' + (index + 1)] ? 'open' : ''}} {{ (senceActive != -1 && senceActive == index + 1) ? 'active' : ''}}" wx:for="{{custSenceList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{formData['sence' + (index + 1)] && senceActive != (index + 1)}}" class="open-icon">已开通</view>
<view wx:if="{{
hasOpenIcon &&
formData['sence' + (index + 1)] && senceActive != (index + 1)}}" class="open-icon">已开通</view>
<image wx:if="{{formData['sence' + (index + 1)]}}" class="sence-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:if="{{formData['sence' + (index + 1)]}}" class="sence-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="sence-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="sence-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<view class="sence-title">{{item.title}}</view>
<view class="sence-title">{{item.title}}</view>
...
...
packageOutput/pages/openBusiness/openBusiness.js
0 → 100644
View file @
0cf0717
// packageOutput/pages/openBusiness/openBusiness.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
,
// 场景业务
formData
:
{
sence1
:
true
,
sence2
:
true
,
sence3
:
true
,
sence4
:
true
},
senceActive
:
1
,
// 活动内容
activityList
:
[],
senceActivityObj
:
{
sence1
:
[{
name
:
'360实景导航'
,
price
:
10
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
},
{
name
:
'AR实景导航'
,
price
:
20
}],
sence2
:
[{
name
:
'座椅通风'
,
price
:
30
},
{
name
:
'座椅通风'
,
price
:
40
}],
sence3
:
[{
name
:
'氛围灯'
,
price
:
50
},
{
name
:
'氛围灯'
,
price
:
60
}],
sence4
:
[{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
}]
}
},
handleSenceChange
(
e
)
{
var
idx
=
e
.
detail
.
senceIdx
this
.
setData
({
senceActive
:
idx
})
this
.
setCurActivity
()
// console.log('换内容---')
},
setCurActivity
()
{
this
.
setData
({
activityList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
senceActivityObj
[
'sence'
+
(
this
.
data
.
senceActive
)]))
})
},
handleActClick
(
e
)
{
var
idx
=
e
.
currentTarget
.
dataset
.
idx
this
.
setData
({
[
'activityList['
+
idx
+
'].checked'
]:
!
this
.
data
.
activityList
[
idx
].
checked
})
},
handleConfirm
()
{
var
params
=
{
senceActive
:
this
.
data
.
senceActive
,
activityIdxList
:
this
.
data
.
activityList
.
filter
(
item
=>
item
.
checked
==
true
)
}
if
(
!
params
.
activityIdxList
.
length
)
{
wx
.
$api
.
showToast
(
'请选产品/活动'
)
return
true
}
console
.
log
(
params
)
wx
.
showToast
({
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
()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageOutput/pages/openBusiness/openBusiness.json
0 → 100644
View file @
0cf0717
{
"usingComponents"
:
{
"sence-box"
:
"../../../components/SenceBox/SenceBox"
}
}
\ No newline at end of file
\ No newline at end of file
packageOutput/pages/openBusiness/openBusiness.scss
0 → 100644
View file @
0cf0717
/* packageOutput/pages/openBusiness/openBusiness.wxss */
page
{
background-color
:
#FFFFFF
;
}
.openBusiness
{
padding-bottom
:
100rpx
;
.bg-img
{
width
:
100%
;
height
:
360rpx
;
}
.layout
{
padding
:
32rpx
;
font-size
:
28rpx
;
color
:
#323436
;
.m-b-32
{
margin-bottom
:
32rpx
;
}
.form
{
height
:
40rpx
;
line-height
:
40rpx
;
.label
{
color
:
#8A8C90
;
}
}
.head
{
position
:
relative
;
height
:
50rpx
;
line-height
:
50rpx
;
font-size
:
36rpx
;
font-weight
:
600
;
color
:
#323436
;
&
:
:
before
{
display
:
inline-block
;
content
:
''
;
width
:
6rpx
;
height
:
28rpx
;
background
:
#3666FE
;
border-radius
:
0
4rpx
4rpx
0
;
margin-right
:
16rpx
;
}
}
.box
{
&
-title
{
font-weight
:
600
;
padding
:
0
0
16rpx
12rpx
;
}
.title-tip
{
font-size
:
22rpx
;
color
:
#323436
;
}
}
.activity-box
{
display
:
flex
;
flex-wrap
:
wrap
;
.activity-item
{
box-sizing
:
border-box
;
width
:
calc
((
100%
-
40rpx
)
/
3
);
height
:
64rpx
;
line-height
:
44rpx
;
text-align
:
center
;
background
:
#F2F3F7
;
font-size
:
28rpx
;
padding
:
10rpx
;
margin
:
0
20rpx
16rpx
0
;
border-radius
:
4rpx
;
}
.activity-item
:nth-child
(
3n
)
{
margin-right
:
0
;
}
.activity-item.active
{
background
:
#F0F7FF
;
border
:
2rpx
solid
#3E71FE
;
color
:
#3666FE
;
border
:
1rpx
solid
#3E71FE
;
}
}
}
.btn-blue
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
88rpx
;
line-height
:
88rpx
;
text-align
:
center
;
background
:
#3666FE
;
font-size
:
34rpx
;
color
:
#FFFFFF
;
}
}
\ No newline at end of file
\ No newline at end of file
packageOutput/pages/openBusiness/openBusiness.wxml
0 → 100644
View file @
0cf0717
<!--packageOutput/pages/openBusiness/openBusiness.wxml-->
<view class="openBusiness">
<image class="bg-img" src="{{IMGURL}}output/bg-open-business.png?v={{img_version}}"/>
<view class="layout">
<view class="form m-b-32">
<text class="label">开通门店:</text>
<text>嘀加鹏辉奥迪4S店</text>
</view>
<view class="head m-b-32">开通门店产品/活动</view>
<!-- 场景活动 -->
<view class="box">
<view class="box-title">业务场景</view>
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" hasOpenIcon="{{false}}" bindhandleSenceChange="handleSenceChange"></sence-box>
</view>
<!-- 活动 -->
<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.name}}</view>
</view>
</view>
</view>
<view class="btn-blue" bindtap="handleConfirm">申请开通</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageOutput/pages/summary/summary.js
View file @
0cf0717
...
@@ -5,6 +5,7 @@ Page({
...
@@ -5,6 +5,7 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
,
merchantName
:
'阿哈哈哈哈'
,
merchantName
:
'阿哈哈哈哈'
,
formData
:
{
formData
:
{
sence1
:
false
,
sence1
:
false
,
...
@@ -12,6 +13,7 @@ Page({
...
@@ -12,6 +13,7 @@ Page({
sence3
:
false
,
sence3
:
false
,
sence4
:
true
sence4
:
true
},
},
senceActive
:
1
,
sencePriceList
:
[{
sencePriceList
:
[{
total
:
0
total
:
0
},
{
},
{
...
@@ -21,15 +23,116 @@ Page({
...
@@ -21,15 +23,116 @@ Page({
},
{
},
{
total
:
14580.45
total
:
14580.45
}],
}],
senceActive
:
1
// 活动内容
scrollLeft
:
0
,
activityActive
:
0
,
activityList
:
[],
senceActivityObj
:
{
sence1
:
[{
name
:
'360实景导航'
,
price
:
10
},
{
name
:
'AR实景导航'
,
price
:
20
,
isOpen
:
true
},
{
name
:
'AR实景导航'
,
price
:
20
,
isOpen
:
true
},
{
name
:
'AR实景导航'
,
price
:
20
,
isOpen
:
true
},
{
name
:
'AR实景导航'
,
price
:
20
,
isOpen
:
false
},
{
name
:
'AR实景导航'
,
price
:
20
,
isOpen
:
true
}],
sence2
:
[{
name
:
'座椅通风'
,
price
:
30
,
isOpen
:
true
},
{
name
:
'座椅通风'
,
price
:
40
}],
sence3
:
[{
name
:
'氛围灯'
,
price
:
50
},
{
name
:
'氛围灯'
,
price
:
60
,
isOpen
:
true
}],
sence4
:
[{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
,
isOpen
:
true
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
,
isOpen
:
true
},
{
name
:
'数字化'
,
price
:
70
},
{
name
:
'数字化'
,
price
:
80
,
isOpen
:
true
}]
}
},
},
handleSenceChange
(
e
)
{
handleSenceChange
(
e
)
{
var
idx
=
e
.
detail
.
senceIdx
var
idx
=
e
.
detail
.
senceIdx
this
.
setData
({
this
.
setData
({
senceActive
:
idx
senceActive
:
idx
,
activityActive
:
0
})
this
.
setCurActivity
()
// console.log('换内容---')
},
handleActChange
(
e
)
{
var
idx
=
e
.
currentTarget
.
dataset
.
idx
this
.
setData
({
activityActive
:
idx
})
})
console
.
log
(
'换内容---'
)
// console.log('换内容--')
},
setCurActivity
()
{
console
.
log
(
this
.
data
.
activityActive
)
this
.
setData
({
activityList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
senceActivityObj
[
'sence'
+
(
this
.
data
.
senceActive
)]))
})
// activityActive为0时,触发置顶(左)
if
(
this
.
data
.
activityActive
==
0
)
{
this
.
setData
({
scrollLeft
:
0
})
}
},
handleJump
(
e
)
{
console
.
log
(
this
.
data
.
activityList
[
this
.
data
.
activityActive
])
wx
.
$router
.
go
(
'packageOutput.openBusiness'
)
},
},
/**
/**
...
@@ -41,6 +144,7 @@ Page({
...
@@ -41,6 +144,7 @@ Page({
merchantName
:
merchantName
merchantName
:
merchantName
})
})
})
})
this
.
setCurActivity
()
},
},
/**
/**
...
...
packageOutput/pages/summary/summary.scss
View file @
0cf0717
...
@@ -4,6 +4,10 @@ page {
...
@@ -4,6 +4,10 @@ page {
}
}
.summary
{
.summary
{
.flex
{
display
:
flex
;
}
.layout
{
.layout
{
color
:
#323436
;
color
:
#323436
;
padding
:
12rpx
20rpx
0
;
padding
:
12rpx
20rpx
0
;
...
@@ -19,10 +23,57 @@ page {
...
@@ -19,10 +23,57 @@ page {
.sence-box
{
.sence-box
{
margin
:
27rpx
0
24rpx
;
margin
:
27rpx
0
24rpx
;
}
}
.activity-box
{
height
:
64rpx
;
.activity-item
{
box-sizing
:
border-box
;
flex-shrink
:
0
;
height
:
64rpx
;
line-height
:
64rpx
;
font-size
:
24rpx
;
padding
:
0
16rpx
;
margin-right
:
16rpx
;
border-radius
:
4rpx
;
}
.activity-item
:last-child
{
margin-right
:
0
;
}
.activity-item.open
{
color
:
#323436
;
border
:
2rpx
solid
#DDE3F0
;
}
.activity-item.no-open
{
color
:
#CCCED1
;
border
:
2rpx
solid
#DDE3F0
;
}
.activity-item.active
{
background
:
#3666FE
;
box-shadow
:
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.40
)
,
0
4rpx
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
);
color
:
#FFFFFF
;
border-width
:
0
;
}
}
.activity-content
{
.content-empty
{
text-align
:
center
;
margin-top
:
48rpx
;
.img-empty
{
width
:
512rpx
;
height
:
512rpx
;
}
}
}
}
}
.btn-blue
{
.btn-blue
{
position
:
absolute
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
...
...
packageOutput/pages/summary/summary.wxml
View file @
0cf0717
...
@@ -5,6 +5,19 @@
...
@@ -5,6 +5,19 @@
<view class="sence-box">
<view class="sence-box">
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" bindhandleSenceChange="handleSenceChange"></sence-box>
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" bindhandleSenceChange="handleSenceChange"></sence-box>
</view>
</view>
<!-- 活动 -->
<scroll-view scroll-x="{{true}}" class="activity-box" scroll-left="{{scrollLeft}}">
<view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.isOpen ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.name}}</view>
</view>
</view>
<view class="btn-blue">点击开通</view>
</scroll-view>
<!-- 活动内容 -->
<view class="activity-content">
<view wx:if="{{activityList[activityActive].isOpen}}"></view>
<view wx:else class="content-empty">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{!activityList[activityActive].isOpen}}" class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
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