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 85eabb11
authored
Oct 11, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
看产值外层页面功能开发完成
1 parent
55199f26
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
178 additions
and
197 deletions
app.json
app.wxss
components/Authorize/Authorize.js
components/Calendar/Calendar.js
components/Popup/Popup.js
components/SearchBox/SearchBox.js
components/SearchInput/SearchInput.js
components/Tab/Tab.js
components/Tab/Tab.wxml
components/Tab/Tab.wxss
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/components/merchant/mrechant.wxml
pages/tab/output/output.js
pages/tab/output/output.json
pages/tab/output/output.scss
pages/tab/output/output.wxml
common.wxss → style/common.wxss
app.json
View file @
85eabb1
{
"pages"
:
[
"login/loading/loading"
,
"pages/tab/index/index"
,
"pages/tab/output/output"
,
"pages/tab/mine/mine"
,
"pages/webView/webView"
,
"login/index/index"
],
"pages"
:
[
"login/loading/loading"
,
"pages/tab/index/index"
,
"pages/tab/output/output"
,
"pages/tab/mine/mine"
,
"pages/webView/webView"
,
"login/index/index"
],
"requiredPrivateInfos"
:
[
"getLocation"
],
"lazyCodeLoading"
:
"requiredComponents"
,
"window"
:
{
...
...
@@ -12,7 +12,8 @@
"selectedColor"
:
"#3666FE"
,
"backgroundColor"
:
"#FFFFFF"
,
"borderStyle"
:
"white"
,
"list"
:
[{
"list"
:
[
{
"pagePath"
:
"pages/tab/index/index"
,
"text"
:
"拓客户"
,
"iconPath"
:
"images/home.png"
,
...
...
@@ -34,7 +35,7 @@
},
"subpackages"
:
[],
"usingComponents"
:
{
"tab"
:
"/components/Tab/Tab"
},
"style"
:
"v2"
,
"resolveAlias"
:
{
...
...
@@ -47,4 +48,4 @@
}
},
"plugins"
:
{}
}
\ No newline at end of file
}
app.wxss
View file @
85eabb1
@import "/common.wxss";
@import "/
style/
common.wxss";
page {
background-color: #F7F7F7;
color: #282829;
font-size: 28rpx;
--themeColor: #F13C3D;
--btnColor: #
FC5B32
;
--btnColor: #
3666FE
;
--borderRadius: 8rpx;
--margin: 32rpx;
}
...
...
components/Authorize/Authorize.js
View file @
85eabb1
// components/Authorize/Authorize.js
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
behaviors
:
[
componentsMixin
],
/**
* 组件的属性列表
*/
...
...
@@ -39,7 +35,7 @@ Component({
}
},
observers
:
{
'show'
:
function
(
newVal
)
{
show
:
function
(
newVal
)
{
this
.
setData
({
openSet
:
newVal
})
...
...
@@ -48,9 +44,7 @@ Component({
/**
* 组件的初始数据
*/
data
:
{
},
data
:
{},
/**
* 组件的方法列表
*/
...
...
@@ -60,13 +54,8 @@ Component({
*/
noScroll
:
wx
.
$util
.
noScroll
(),
cancel
(
e
)
{
let
{
confirm
}
=
e
.
currentTarget
.
dataset
let
{
buttonType
,
title
}
=
this
.
data
let
{
confirm
}
=
e
.
currentTarget
.
dataset
let
{
buttonType
,
title
}
=
this
.
data
let
_this
=
this
if
(
buttonType
==
'getUserInfo'
&&
confirm
)
{
wx
.
getUserProfile
({
...
...
@@ -87,11 +76,7 @@ Component({
/**检验是否已授权位置 */
check
()
{
const
_this
=
this
let
{
buttonType
,
scopeType
,
autoOpen
}
=
this
.
properties
let
{
buttonType
,
scopeType
,
autoOpen
}
=
this
.
properties
if
(
buttonType
!=
'getPhoneNumber'
)
{
let
type
=
`scope.
${
scopeType
}
`
buttonType
=
'openSetting'
...
...
@@ -128,12 +113,9 @@ Component({
}
})
}
},
/**授权手机号 */
getPhoneNumber
({
detail
})
{
getPhoneNumber
({
detail
})
{
console
.
log
(
detail
)
this
.
triggerEvent
(
'getphonenumber'
,
detail
)
}
...
...
@@ -144,4 +126,4 @@ Component({
},
hide
:
function
()
{}
}
})
\ No newline at end of file
})
components/Calendar/Calendar.js
View file @
85eabb1
...
...
@@ -2,9 +2,7 @@
import
Calendar
from
'./Calendar_Function'
import
_component_
from
'./Static_Properties'
const
CalendarFunction
=
Symbol
(
'CalendarFunction'
)
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
behaviors
:[
componentsMixin
],
/**
* 组件的属性列表
*/
...
...
@@ -24,7 +22,7 @@ Component({
this
[
CalendarFunction
].
setCalenderBodyHeight
()
},
showCalendar
(
e
)
{
let
type
=
e
&&
e
.
currentTarget
&&
e
.
currentTarget
.
dataset
.
type
||
''
let
type
=
(
e
&&
e
.
currentTarget
&&
e
.
currentTarget
.
dataset
.
type
)
||
''
let
result
=
type
===
'show'
if
(
!
result
)
{
this
.
setData
({
...
...
@@ -44,29 +42,19 @@ Component({
}
},
dateChange
(
e
)
{
let
{
current
}
=
e
.
detail
let
{
current
}
=
e
.
detail
this
.
setData
({
current
})
},
choose
(
e
)
{
let
{
dateType
,
minDate
,
maxDate
}
=
this
.
data
let
{
data
}
=
e
.
currentTarget
.
dataset
let
{
dateType
,
minDate
,
maxDate
}
=
this
.
data
let
{
data
}
=
e
.
currentTarget
.
dataset
if
((
minDate
&&
Date
.
parse
(
minDate
)
>
Date
.
parse
(
data
))
||
(
maxDate
&&
Date
.
parse
(
maxDate
)
<
Date
.
parse
(
data
)))
return
this
[
CalendarFunction
][
dateType
](
e
)
},
done
()
{
let
{
dateType
}
=
this
.
data
let
{
dateType
}
=
this
.
data
this
[
CalendarFunction
].
done
(
dateType
)
},
changeDate
(
e
)
{
...
...
@@ -87,4 +75,4 @@ Component({
attached
()
{
this
[
CalendarFunction
]
=
new
Calendar
(
this
)
}
})
\ No newline at end of file
})
components/Popup/Popup.js
View file @
85eabb1
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
behaviors
:
[
componentsMixin
],
/**
* 组件的属性列表
*/
...
...
@@ -30,7 +26,6 @@ Component({
hideTab
})
}
}
},
title
:
String
,
...
...
@@ -47,9 +42,7 @@ Component({
/**
* 组件的初始数据
*/
data
:
{
},
data
:
{},
/**
* 组件的方法列表
...
...
@@ -66,11 +59,9 @@ Component({
}
},
attached
()
{
const
{
isTab
}
=
wx
.
$router
.
getRouterList
().
find
(
item
=>
item
.
url
===
`/
${
wx
.
$router
.
getPageInstance
().
route
}
`
)
const
{
isTab
}
=
wx
.
$router
.
getRouterList
().
find
(
item
=>
item
.
url
===
`/
${
wx
.
$router
.
getPageInstance
().
route
}
`
)
this
.
setData
({
isTab
})
},
})
\ No newline at end of file
}
})
components/SearchBox/SearchBox.js
View file @
85eabb1
// components/SearchBox/SearchBox.js
import
{
componentsMixin
}
from
'../../mixins/index'
;
Component
({
behaviors
:
[
componentsMixin
],
/**
* 组件的属性列表
*/
properties
:
{
placeholder
:
{
type
:
String
,
value
:
"请输入搜索内容"
,
value
:
'请输入搜索内容'
},
value
:
{
type
:
String
,
value
:
""
,
value
:
''
,
observer
(
n
)
{
this
.
setData
({
inputValue
:
n
,
})
;
}
,
inputValue
:
n
})
}
},
searchType
:
{
type
:
Number
,
value
:
1
,
value
:
1
},
couponDetails
:
Boolean
,
couponDetails
:
Boolean
},
/**
* 组件的初始数据
*/
data
:
{
inputValue
:
""
,
inputValue
:
''
},
/**
...
...
@@ -38,29 +36,29 @@ Component({
*/
methods
:
{
input
(
e
)
{
let
{
value
}
=
e
.
detail
;
let
{
value
}
=
e
.
detail
this
.
setData
({
inputValue
:
value
,
})
;
inputValue
:
value
})
},
blur
(
e
)
{
let
{
inputValue
}
=
this
.
data
;
let
{
inputValue
}
=
this
.
data
this
.
setData
({
inputValue
,
})
;
inputValue
})
},
clear
()
{
this
.
setData
({
inputValue
:
""
,
})
;
inputValue
:
''
})
},
confirm
(
e
)
{
let
{
value
}
=
e
.
detail
;
this
.
triggerEvent
(
"search"
,
value
);
let
{
value
}
=
e
.
detail
this
.
triggerEvent
(
'search'
,
value
)
},
search
(
e
)
{
let
{
value
}
=
e
.
currentTarget
.
dataset
;
this
.
triggerEvent
(
"search"
,
value
);
}
,
}
,
})
;
let
{
value
}
=
e
.
currentTarget
.
dataset
this
.
triggerEvent
(
'search'
,
value
)
}
}
})
components/SearchInput/SearchInput.js
View file @
85eabb1
// components/SearchInput/SearchInput.js
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
behaviors
:[
componentsMixin
],
/**
* 组件的属性列表
*/
...
...
@@ -22,9 +20,7 @@ Component({
/**
* 组件的初始数据
*/
data
:
{
},
data
:
{},
/**
* 组件的方法列表
...
...
@@ -39,9 +35,7 @@ Component({
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
this
.
setValue
(
value
)
this
.
triggerEvent
(
'input'
,
{
value
...
...
@@ -55,9 +49,7 @@ Component({
},
emit
(
e
)
{
let
{
detail
:{
value
},
detail
:
{
value
},
type
}
=
e
this
.
setData
({
...
...
@@ -69,4 +61,4 @@ Component({
})
}
}
})
\ No newline at end of file
})
components/Tab/Tab.js
View file @
85eabb1
// components/Tab/Tab.js
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
behaviors
:[
componentsMixin
],
/**
* 组件的属性列表
*/
...
...
@@ -17,6 +15,7 @@ Component({
})
}
},
itemWidth
:
String
,
align
:
{
type
:
String
,
default
:
''
...
...
@@ -36,9 +35,7 @@ Component({
*/
methods
:
{
click
(
e
)
{
let
{
count
}
=
e
.
currentTarget
.
dataset
let
{
count
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
count
,
to
:
`to-
${
count
}
`
...
...
@@ -46,4 +43,4 @@ Component({
this
.
triggerEvent
(
'click'
,
count
)
}
}
})
\ No newline at end of file
})
components/Tab/Tab.wxml
View file @
85eabb1
<block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" >
<view class="text" >{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line"></view>
</view>
</block>
</scroll-view>
<scroll-view
class="tab-box {{align}}"
scroll-x
enable-flex
scroll-with-animation
scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
bindtap="click"
data-count="{{index}}"
id="to-{{index}}">
<view class="text">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" />
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}">
<view class="text text-center">{{item}}</view>
<view class="line"></view>
</view>
</block>
</view>
</block>
\ No newline at end of file
<view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}"
bindtap="click"
data-count="{{index}}">
<view class="text text-center">{{item}}</view>
<view class="line" style="lineStyle" />
</view>
</block>
</view>
</block>
components/Tab/Tab.wxss
View file @
85eabb1
/* components/Tab/Tab.wxss */
@import "../../common.wxss";
.tab-box {
display: flex;
/* display: grid; */
width: 100%;
height: 92rpx;
box-sizing: border-box;
}
.tab-box.left{
.tab-box.left {
padding-left: 32rpx;
}
.left .tab{
padding-right:40rpx;
.left .tab {
padding-right: 40rpx;
}
.flex .tab {
/* .flex .tab {
flex: 1;
}
}
*/
.tab {
position: relative;
flex-shrink: 0;
}
.tab .text {
height: 84rpx;
display: flex;
...
...
@@ -28,18 +33,22 @@
color: #A9A9A9;
justify-content: center;
}
.left .text{
.left .text {
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab.active .text {
font-weight: 500;
font-size: 28rpx;
/* font-weight: 500; */
font-weight: 600;
font-size: 44rpx;
transition: all .25s;
color: #2C2C2C;
font-family: PingFangSC-S0pxibold;
}
.tab .line {
...
...
pages/tab/output/components/merchant/mrechant.js
View file @
85eabb1
...
...
@@ -3,21 +3,17 @@ Component({
/**
* 组件的属性列表
*/
properties
:
{
},
properties
:
{},
/**
* 组件的初始数据
*/
data
:
{
tabIndx
:
1
},
/**
* 组件的方法列表
*/
methods
:
{
}
methods
:
{}
})
pages/tab/output/components/merchant/mrechant.wxml
View file @
85eabb1
<!--pages/tab/output/components/merchant/mrechant.wxml-->
<text>pages/tab/output/components/merchant/mrechant.wxml</text>
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- <text>pages/tab/output/components/merchant/mrechant.wxml</text> -->
<text>商户产值</text>
pages/tab/output/output.js
View file @
85eabb1
// pages/tab/output/output.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
navStyle
:
'background-color: rgba(0,0,0,0);'
,
loginType
:
0
,
agree
:
true
agree
:
true
,
tabIndx
:
1
,
tabList
:
[
'我的客户'
,
'我的门店'
,
'我的员工'
]
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
console
.
log
(
e
)
},
changeTabIndx
(
e
)
{
this
.
setData
({
tabIndx
:
e
.
detail
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onLoad
(
options
)
{},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
onReady
()
{},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
onShow
()
{},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
onHide
()
{},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
onUnload
()
{},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
onPullDownRefresh
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
onReachBottom
()
{},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
onShareAppMessage
()
{}
})
pages/tab/output/output.json
View file @
85eabb1
{
"usingComponents"
:
{
"navigation-bar"
:
"../../../components/NavigationBar/NavigationBar"
,
"tab"
:
"../../../components/Tab/Tab"
,
"client"
:
"./components/client/client"
,
"merchant"
:
"./components/merchant/mrechant"
,
"staff"
:
"./components/staff/staff"
},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
}
pages/tab/output/output.scss
View file @
85eabb1
...
...
@@ -11,7 +11,7 @@
.layout
{
position
:
relative
;
padding
:
400rpx
32
rpx
0
;
padding
:
400rpx
16
rpx
0
;
font-size
:
24rpx
;
color
:
#8A8C90
;
...
...
@@ -26,22 +26,10 @@
top
:
0
;
z-index
:
-1
;
}
.button
{
width
:
100%
;
height
:
88rpx
;
background
:
#3666FE
;
border-radius
:
8rpx
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
line-height
:
88rpx
;
padding
:
0
;
}
.disabled
{
background
:
#CCCED1
;
}
.btn-hover
{
opacity
:
.75
;
.tabContainer
{
height
:
100rpx
;
}
}
\ No newline at end of file
pages/tab/output/output.wxml
View file @
85eabb1
<!--
pages/tab/output/output.wxml
-->
<!--
pages/tab/output/output.wxml
-->
<!-- <navigation-bar navStyle="{{navStyle}}">服务商账号名称</navigation-bar>
<view class="layout">
</view> -->
<navigation-bar navStyle="{{navStyle}}">服务商账号名称</navigation-bar>
<view class="layout">
<!-- 我的客户 -->
<client></client>
<!-- 我的门店 -->
<merchant></merchant>
<!-- 我的员工 -->
<staff></staff>
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">服务商账号名称</navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;">
<tab
tab="{{tabList}}"
itemWidth="{{'27%'}}"
index="{{tabIndx}}"
bindclick="changeTabIndx"
class="tabContainer" />
<!-- 我的客户 -->
<view hidden="{{tabIndx != 0}}">
<client id="client" />
</view>
<!-- 我的门店 -->
<view hidden="{{tabIndx != 1}}">
<merchant id="merchant" />
</view>
<!-- 我的员工 -->
<view hidden="{{tabIndx != 2}}">
<staff id="staff" />
</view>
</view>
common.wxss
→
style/
common.wxss
View file @
85eabb1
...
...
@@ -7,6 +7,7 @@
z-index: 2;
background-color: #fff;
}
.flex-center {
display: flex;
align-items: center;
...
...
@@ -58,4 +59,16 @@
.isFullSucreen-bottom {
bottom: constant(safe-area-inset-bottom) !important;
bottom: env(safe-area-inset-bottom) !important;
}
.c-blue {
color: #3666FE;
}
.c-white {
color: #fff;
}
.bgc-blue {
background-color: #3666FE;
}
\ 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