Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0c8e71df
authored
Jun 28, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
门店添加搜索功能
1 parent
9402946e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
328 additions
and
247 deletions
components/Popup/Popup.js
components/Popup/Popup.wxml
components/Popup/Popup.wxss
tabIndex/components/storePicker/storePicker.js → components/storePicker/storePicker.js
tabIndex/components/storePicker/storePicker.json → components/storePicker/storePicker.json
tabIndex/components/storePicker/storePicker.wxml → components/storePicker/storePicker.wxml
tabIndex/components/storePicker/storePicker.wxss → components/storePicker/storePicker.wxss
pages/wxLogin/wxLogin.wxss
store/index.js
tabIndex/pages/index/index.js
tabIndex/pages/index/index.json
tabIndex/pages/index/index.wxml
tabMine/pages/index/index.wxml
tabOperating/pages/index/index.js
tabOperating/pages/index/index.json
tabOperating/pages/index/index.wxml
tabOperating/pages/operatingShow/operatingShow.js
tabOperating/pages/operatingShow/operatingShow.json
tabOperating/pages/operatingShow/operatingShow.wxml
utils/request/request.js
utils/utils_wx.js
components/Popup/Popup.js
View file @
0c8e71d
...
...
@@ -41,6 +41,7 @@ Component({
}
},
attached
()
{
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this
.
setData
({
isFullSucreen
:
wx
.
$util
.
isFullSucreen
()
})
...
...
components/Popup/Popup.wxml
View file @
0c8e71d
<view class="popup" hidden="{{
!showPopup
}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{height
}}">
<block wx:if="{{title
}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''
}}">
<slot></slot>
</view>
<view class="popup-footer {{isFullSucreen?'isFullSucreen':''
}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
<view class="popup" hidden="{{
!showPopup
}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{ height
}}">
<block wx:if="{{ title
}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''
}}">
<slot></slot>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':''
}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
\ No newline at end of file
components/Popup/Popup.wxss
View file @
0c8e71d
...
...
@@ -42,23 +42,28 @@
}
.popup-slot {
height: calc(100% -
2
00rpx);
height: calc(100% -
1
00rpx);
}
.popup-slot.isFullSucreen{
.popup-slot.isFullSucreen {
height: calc(100% - 268rpx);
}
.popup-slot.isFullSucreen-notitle{
.popup-slot.isFullSucreen-notitle {
height: calc(100% - 170rpx);
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding:
10rpx 0
;
padding:
10rpx 0
;
}
.popup-footer.isFullSucreen{
.popup-footer.isFullSucreen {
padding-bottom: 68rpx !important;
}
.popup-footer .btn {
width: 330rpx;
height: 80rpx;
...
...
@@ -71,10 +76,12 @@
color: #323233;
border: 2rpx solid #DCDEE0;
}
.popup-footer .confirm{
.popup-footer .confirm {
background: #3582EE;
color: #fff;
}
@keyframes show-popup {
0% {
bottom: -100%;
...
...
tabIndex/
components/storePicker/storePicker.js
→
components/storePicker/storePicker.js
View file @
0c8e71d
...
...
@@ -8,92 +8,95 @@ Component({
* 组件的属性列表
*/
properties
:
{
items
:
{
type
:
Array
,
value
:
[],
subIndex
:
{
type
:
Number
,
//
value: [],
observer
:
function
(
n
)
{
if
(
n
)
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
defaultSelectStoreIndex
=
n
?.
findIndex
(
v
=>
{
return
v
.
merchantId
==
userInfo
?.
default4SStoreInfo
?.
merchantId
})
>
-
1
?
n
?.
findIndex
(
v
=>
{
return
v
.
merchantId
==
userInfo
?.
default4SStoreInfo
?.
merchantId
})
:
0
this
.
setData
({
defaultSelectStoreIndex
:
[
defaultSelectStoreIndex
],
selectStoreIndex
:
defaultSelectStoreIndex
})
}
this
.
setData
({
selectStoreIndex
:
[
n
]
})
}
},
pickList
:
{
type
:
Array
,
value
:
[]
},
show
:
{
type
:
Boolean
,
type
:
Boolean
}
},
/**
* 组件的初始数据
*/
data
:
{
searchValue
:
''
,
selectStoreIndex
:
''
,
edit
:
false
,
defaultSelectStoreIndex
:
[]
searchValue
:
''
,
selectStoreIndex
:
''
,
edit
:
false
},
/**
* 组件的方法列表
*/
methods
:
{
open
()
{
if
(
this
.
data
.
disabled
)
return
this
.
setData
({
edit
:
true
,
inputFocus
:
true
})
},
setValue
(
value
)
{
if
(
this
.
properties
.
filterEmoji
)
{
if
(
wx
.
$util
.
haveEmoji
(
value
))
value
=
wx
.
$util
.
replaceEmoji
(
value
)
}
this
.
setData
({
searchValue
:
value
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
this
.
setValue
(
value
)
this
.
triggerEvent
(
'input'
,
{
value
})
},
inputBlur
(
e
)
{
this
.
emit
(
e
)
},
inputConfifm
(
e
)
{
this
.
emit
(
e
)
},
emit
(
e
)
{
let
{
detail
:{
open
()
{
if
(
this
.
data
.
disabled
)
return
this
.
setData
({
edit
:
true
,
inputFocus
:
true
})
},
setValue
(
value
)
{
if
(
this
.
properties
.
filterEmoji
)
{
if
(
wx
.
$util
.
haveEmoji
(
value
))
value
=
wx
.
$util
.
replaceEmoji
(
value
)
}
this
.
setData
({
searchValue
:
value
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
this
.
setValue
(
value
)
this
.
triggerEvent
(
'input'
,
{
value
},
type
}
=
e
this
.
setData
({
edit
:
false
})
this
.
setValue
(
value
)
console
.
log
(
'123'
)
this
.
triggerEvent
(
type
==
'confirm'
?
'search'
:
'blur'
,
{
value
})
},
confirm
()
{
let
{
selectStoreIndex
,
items
}
=
this
.
data
if
(
!
items
.
length
)
{
return
wx
.
$util
.
showToast
(
'请选择门店'
)
})
},
inputBlur
(
e
)
{
this
.
emit
(
e
)
},
inputConfifm
(
e
)
{
this
.
emit
(
e
)
},
emit
(
e
)
{
let
{
detail
:
{
value
},
type
}
=
e
this
.
setData
({
edit
:
false
})
this
.
setValue
(
value
)
console
.
log
(
'123'
)
this
.
triggerEvent
(
type
==
'confirm'
?
'search'
:
'blur'
,
{
value
})
},
confirm
()
{
let
{
selectStoreIndex
,
pickList
}
=
this
.
data
let
value
=
selectStoreIndex
[
0
]
console
.
log
(
value
)
console
.
log
(
pickList
)
if
(
!
pickList
[
value
]?.
merchantName
)
{
return
wx
.
$util
.
showToast
(
'请选择门店'
)
}
// console.log(value)
this
.
triggerEvent
(
'confirm'
,
{
value
})
this
.
triggerEvent
(
'search'
,
{
value
})
this
.
setData
({
show
:
false
})
},
changeStore
(
e
)
{
// console.log(e.detail.value[0])
this
.
setData
({
selectStoreIndex
:
[
e
.
detail
.
value
[
0
]]
})
}
this
.
triggerEvent
(
'confirm'
,
selectStoreIndex
)
this
.
setData
({
show
:
false
})
},
changeStore
(
e
)
{
this
.
setData
({
selectStoreIndex
:
e
.
detail
.
value
[
0
]
})
}
}
})
tabIndex/
components/storePicker/storePicker.json
→
components/storePicker/storePicker.json
View file @
0c8e71d
File moved
tabIndex/
components/storePicker/storePicker.wxml
→
components/storePicker/storePicker.wxml
View file @
0c8e71d
<!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx">
<view class='date-container'>
<view class='date-confirm'>
<view class="search-box">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
<block wx:if="{{searchValue}}">
{{searchValue}}
</block>
<block wx:else>
<image src="../../../images/search.png" class="icon"></image>
{{'请输入门店'}}
</block>
</view>
</block>
<block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view class="picker" value="{{defaultSelectStoreIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore">
<picker-view-column>
<block wx:for="{{items}}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.merchantName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
<popup class="date-background" show="{{ show }}" bindconfirm="confirm" height="800rpx">
<view class="date-container">
<view class="date-confirm">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
{{'请输入门店'}}
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column>
<block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.merchantName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
\ No newline at end of file
tabIndex/
components/storePicker/storePicker.wxss
→
components/storePicker/storePicker.wxss
View file @
0c8e71d
File moved
pages/wxLogin/wxLogin.wxss
View file @
0c8e71d
...
...
@@ -61,7 +61,7 @@ page {
}
.login-btn {
margin: 1
4
0rpx 0 28rpx;
margin: 1
3
0rpx 0 28rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
border-radius: 12rpx;
text-align: center;
...
...
store/index.js
View file @
0c8e71d
...
...
@@ -34,17 +34,19 @@ export const getYQInfo = userInfo => {
// getUserInfo
// 判断是否是多账号用户
let
subIndex
=
0
console
.
log
(
!
userInfo
.
isSuper
&&
userInfo
.
merchantType
&&
userInfo
.
userType
==
2
);
console
.
log
(
userInfo
.
merchantId
,
'userInfo.merchantId'
);
if
(
!
userInfo
.
loginRole
||
userInfo
.
loginRole
==
4
)
{
//
console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
//
console.log(userInfo.merchantId,'userInfo.merchantId');
if
(
!
userInfo
.
loginRole
||
userInfo
.
loginRole
==
4
)
{
// console.log(userInfo.merchantId,'userInfo.merchantId');
app
.
globalData
.
yqdInfo
=
{
subIndex
,
merchantRange
:
[{
merchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
merchantId
}]
merchantRange
:
[
{
merchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
merchantId
}
]
}
// this.setData({
// merchantRange: [{ merchantName: userInfo.merchantName }]
...
...
@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => {
.
getYQList
()
.
then
(
res
=>
{
// console.log(res)
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
let
arr
=
[]
if
(
data
.
length
>
1
)
{
...
...
@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => {
}
arr
=
[
all
,
...
data
]
}
else
{
arr
=
[{
merchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
merchantId
}]
arr
=
[
{
merchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
merchantId
}
]
}
app
.
globalData
.
yqdInfo
=
{
merchantRange
:
arr
,
...
...
@@ -102,10 +103,7 @@ export const getYQorderInfo = () => {
}
else
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
if
(
!
userInfo
)
this
.
login
(
true
)
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
api
.
getMerchantRecordingSettings
({
...
...
@@ -114,10 +112,7 @@ export const getYQorderInfo = () => {
})
.
then
(
res
=>
{
// console.log(res)
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
// debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
...
...
@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => {
// 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let
{
configInfo
}
=
globalData
let
{
configInfo
}
=
globalData
if
(
configInfo
)
{
return
resolve
(
configInfo
)
}
else
{
...
...
@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => {
export
const
checkScene
=
options
=>
{
// let query = options.query
let
{
query
}
=
options
let
{
query
}
=
options
if
(
query
)
{
// 解码
for
(
const
key
in
query
)
{
...
...
@@ -259,17 +250,14 @@ export const setWebSocket = () => {
/** 获取园区店下的4S店 */
export
const
get4SStoreList
=
options
=>
{
console
.
log
(
options
,
'options'
);
console
.
log
(
options
,
'options'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
const
app
=
getApp
()
api
.
getSceneMerchantRefStoreList
(
options
)
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
app
.
globalData
.
storeListRange
=
data
let
default4SStoreInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
?
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
:
data
&&
data
[
0
]
...
...
@@ -282,7 +270,8 @@ export const get4SStoreList = options => {
default4SStoreInfo
:
default4SStoreInfo
})
if
(
options
.
scene
==
3
||
options
.
scene
==
2
)
if
(
options
.
isSubcehicle
)
{
// 是否是次新车转化业务场景(商户关联关系与众筹一样)
if
(
options
.
isSubcehicle
)
{
// 是否是次新车转化业务场景(商户关联关系与众筹一样)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
default4SStoreInfo_newCarConversion
:
default4SStoreInfo_newCarConversion
...
...
@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => {
api
.
getStaffListByMerchantAPI
(
options
)
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
app
.
globalData
.
staffListRange
=
data
resolve
(
app
.
globalData
.
staffListRange
)
...
...
@@ -321,4 +307,4 @@ export const getStaffListByMerchant = options => {
console
.
log
(
error
)
})
})
}
\ No newline at end of file
}
tabIndex/pages/index/index.js
View file @
0c8e71d
...
...
@@ -25,12 +25,16 @@ Page({
flag
:
true
,
dateObj
:
{
beginDateStr
:
''
}
},
showPicker
:
false
// showPicker: true
},
showStorePicker
()
{
this
.
setData
({
showPicker
:
true
})
let
{
merchantRange
}
=
this
.
data
merchantRange
.
length
>
1
&&
this
.
setData
({
showPicker
:
true
})
},
tipsEvent
()
{
...
...
@@ -124,7 +128,24 @@ Page({
moveArrow
:
!
this
.
data
.
moveArrow
})
},
getStoreList
(
e
)
{
console
.
log
(
e
)
let
{
value
}
=
e
.
detail
getYQInfo
(
this
.
data
.
userInfo
)
.
then
(
result
=>
{
// console.log(result)
let
{
merchantRange
}
=
result
if
(
value
)
{
merchantRange
=
merchantRange
.
filter
(
item
=>
item
.
merchantName
.
includes
(
value
))
}
this
.
setData
({
merchantRange
})
})
.
catch
(
err
=>
{})
},
changePicker
(
e
)
{
console
.
log
(
e
)
let
{
value
}
=
e
.
detail
let
{
merchantId
}
=
this
.
data
.
merchantRange
[
value
]
// 修改对应下标显示
...
...
@@ -147,7 +168,7 @@ Page({
this
.
tapPicker
()
},
jump
(
e
)
{
let
{
item
,
type
,
}
=
e
.
currentTarget
.
dataset
let
{
item
,
type
}
=
e
.
currentTarget
.
dataset
let
{
userInfo
}
=
this
.
data
// 判断是不是门店员工
if
(
userInfo
.
merchantType
&&
!
userInfo
.
isSuper
&&
type
==
2
)
{
...
...
@@ -399,7 +420,7 @@ Page({
},
getOutputValue
(
yqdInfo
)
{
let
{
dateObj
,
userInfo
}
=
this
.
data
console
.
log
(
yqdInfo
,
'yqdInfo'
)
//
console.log(yqdInfo, 'yqdInfo')
let
{
subIndex
,
merchantRange
}
=
yqdInfo
// yqMerchantId 不是全部就必要要带过去
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员
...
...
tabIndex/pages/index/index.json
View file @
0c8e71d
...
...
@@ -5,6 +5,6 @@
"side-select-popup"
:
"/components/SideSelectPopup/SideSelectPopup"
,
"CalendarMonthSingle"
:
"/components/CalendarMonthSingle/CalendarMonth"
,
"van-progress"
:
"@vant/weapp/progress/index"
,
"store-picker"
:
"
../..
/components/storePicker/storePicker"
"store-picker"
:
"/components/storePicker/storePicker"
}
}
tabIndex/pages/index/index.wxml
View file @
0c8e71d
This diff is collapsed.
Click to expand it.
tabMine/pages/index/index.wxml
View file @
0c8e71d
...
...
@@ -27,7 +27,8 @@
</view>
</view>
</view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}">
<!-- wx:if="{{!userInfo.isSuper && userInfo.merchantType}}" -->
<block >
<view class="set-box " bindtap="showWork">
<view class="label">
<image src="../../images/set.png" />
...
...
tabOperating/pages/index/index.js
View file @
0c8e71d
...
...
@@ -17,19 +17,19 @@ Page({
name
:
'营业概况'
,
active
:
true
,
componentsName
:
'businessCell'
,
recordId
:
12
recordId
:
12
},
{
name
:
'员工业绩'
,
active
:
false
,
componentsName
:
'staffCell'
,
recordId
:
13
recordId
:
13
},
{
name
:
'今日战果'
,
active
:
false
,
componentsName
:
'conquestCell'
,
recordId
:
14
recordId
:
14
}
],
dateObj
:
{
...
...
@@ -43,10 +43,34 @@ Page({
totalOrderMoney
:
0
,
totalAdd
:
0
},
refresh
:
false
refresh
:
false
,
showPicker
:
false
},
// 混入跳转方法
...
mixins
.
methods
,
showStorePicker
()
{
let
{
merchantRange
}
=
this
.
data
merchantRange
.
length
>
1
&&
this
.
setData
({
showPicker
:
true
})
},
getStoreList
(
e
)
{
console
.
log
(
e
)
let
{
value
}
=
e
.
detail
getYQInfo
(
this
.
data
.
userInfo
)
.
then
(
result
=>
{
// console.log(result)
let
{
merchantRange
}
=
result
if
(
value
)
{
merchantRange
=
merchantRange
.
filter
(
item
=>
item
.
merchantName
.
includes
(
value
))
}
this
.
setData
({
merchantRange
})
})
.
catch
(
err
=>
{})
},
changePicker
(
e
)
{
console
.
log
(
'changePicker'
)
let
{
value
}
=
e
.
detail
...
...
@@ -192,7 +216,7 @@ Page({
}
else
{
this
.
setTimeList
(
dateObj
.
nextDay
)
}
wx
.
$util
.
pointRecord
(
type
==
'before'
?
16
:
17
)
wx
.
$util
.
pointRecord
(
type
==
'before'
?
16
:
17
)
this
.
calendar
.
resetData
(
type
==
'before'
?
dateObj
.
beforeDay
:
dateObj
.
nextDay
)
},
// 获取选中天数
...
...
tabOperating/pages/index/index.json
View file @
0c8e71d
...
...
@@ -4,6 +4,7 @@
"businessCell"
:
"./components/businessCell/businessCell"
,
"staffCell"
:
"./components/staffCell/staffCell"
,
"conquestCell"
:
"./components/conquestCell/conquestCell"
,
"tipsPopup"
:
"/components/tipsPopup/Popup"
"tipsPopup"
:
"/components/tipsPopup/Popup"
,
"store-picker"
:
"/components/storePicker/storePicker"
}
}
tabOperating/pages/index/index.wxml
View file @
0c8e71d
This diff is collapsed.
Click to expand it.
tabOperating/pages/operatingShow/operatingShow.js
View file @
0c8e71d
...
...
@@ -44,9 +44,32 @@ Page({
pages
:
1
,
dateObj
:
{
beginDateStr
:
''
}
},
showPicker
:
false
},
showStorePicker
()
{
let
{
merchantRange
}
=
this
.
data
merchantRange
.
length
>
1
&&
this
.
setData
({
showPicker
:
true
})
},
getStoreList
(
e
)
{
console
.
log
(
e
)
let
{
value
}
=
e
.
detail
getYQInfo
(
this
.
data
.
userInfo
)
.
then
(
result
=>
{
// console.log(result)
let
{
merchantRange
}
=
result
if
(
value
)
{
merchantRange
=
merchantRange
.
filter
(
item
=>
item
.
merchantName
.
includes
(
value
))
}
this
.
setData
({
merchantRange
})
})
.
catch
(
err
=>
{})
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
...
...
tabOperating/pages/operatingShow/operatingShow.json
View file @
0c8e71d
{
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{
"CalendarMonth"
:
"/components/CalendarMonth/CalendarMonth"
"CalendarMonth"
:
"/components/CalendarMonth/CalendarMonth"
,
"store-picker"
:
"/components/storePicker/storePicker"
}
}
tabOperating/pages/operatingShow/operatingShow.wxml
View file @
0c8e71d
<!-- tabOperating/pages/operatingShow/operatingShow.wxml -->
<!-- src引入filter.wxs, module给模块起名 -->
<wxs src="../index.wxs" module="filter" />
<view class="layout {{
flag?'opacity':''
}}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{
true
}}">
<picker
<view class="layout {{
flag?'opacity':''
}}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{
true
}}">
<
!-- <
picker
range="{{merchantRange}}"
value="{{subIndex}}"
range-key="merchantName"
bindchange="changePicker"
bindtap="tapPicker"
bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">
{{merchantRange[subIndex].merchantName}}
</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" />
</view>
disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow {{ moveArrow?'move':'' }}" wx:if="{{ merchantRange.length > 1 }}">
<image src="/images/arrow-bottom.png" />
</view>
</picker>
</view>
<!-- </picker> -->
</navigation-bar>
<view class="header" style="margin-top:{{
statusBarHeight
}}px">
<view class="header" style="margin-top:{{
statusBarHeight
}}px">
<view class="date">
<!-- {{dateObj.maxDate}} -->
<CalendarMonth
allowSameDay
shortcut
bindselect='rangeSelect'
bindtapCalendar='tapCalendar'
rangeAll
dateType='range'
calenderColor='#3582EE'
vertical
minDate="2020-10-01"
maxDate="{{dateObj.today}}"
forceFullSucreen="{{bottomLift>0?true:false}}"
isComponents>
allowSameDay
shortcut
bindselect="rangeSelect"
bindtapCalendar="tapCalendar"
rangeAll
dateType="range"
calenderColor="#3582EE"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.today }}"
forceFullSucreen="{{ bottomLift>0?true:false }}"
isComponents
>
<view class="item dateNum">
<block wx:if="{{
dateObj.type=='year'
}}">{{dateObj.label}}年</block>
<block wx:if="{{
dateObj.type=='year'
}}">{{dateObj.label}}年</block>
<block wx:else>
<!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} -->
五月份
...
...
@@ -50,7 +49,7 @@
</block> -->
<!-- wx:if="{{merchantRange.length > 1}}" -->
<!-- 2021年 2-8月 -->
<view class="arrow {{
whiteArrow?'move':''
}}">
<view class="arrow {{
whiteArrow?'move':''
}}">
<image src="/images/whiteArrowIcon.png" />
</view>
</view>
...
...
@@ -73,60 +72,47 @@
</view>
</view>
<!-- -->
<view class="table {{
isFullSucreen?'isFullSucreen':''
}}">
<view class="table {{
isFullSucreen?'isFullSucreen':''
}}">
<view class="tableContainer">
<view class="table-header">
<block wx:for="{{
tableHeaderList
}}" wx:key="index">
<block wx:for="{{
tableHeaderList
}}" wx:key="index">
<view class="tableHeader-td">{{item.name}}</view>
</block>
</view>
<block wx:if="{{
tableList.length
}}">
<block wx:if="{{
tableList.length
}}">
<view class="table-body">
<!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" -->
<!-- bindrefresherrefresh="search" -->
<!-- bindscrolltolower="scrollonReachBottom" -->
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
class="list"
refresher-triggered="{{triggered}}">
<block wx:for="{{tableList}}" wx:for-item="tableItem" wx:key="index">
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
class="list"
refresher-triggered="{{ triggered }}"
>
<block wx:for="{{ tableList }}" wx:for-item="tableItem" wx:key="index">
<view class="table-th">
<block
wx:for="{{tableHeaderList}}"
wx:for-item="item"
wx:for-index="tdIndex"
wx:key="tdIndex">
<block wx:for="{{ tableHeaderList }}" wx:for-item="item" wx:for-index="tdIndex" wx:key="tdIndex">
<!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> -->
<view class="table-td" wx:if="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day'}}">
{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year'}}">
{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month'}}">
{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='upgradeRate'}}">
{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:else>
{{tableItem[tableHeaderList[tdIndex]['propName']]}}
</view>
<view class="table-td" wx:if="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day' }}">{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year' }}">{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month' }}">{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='upgradeRate' }}">{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:else>{{tableItem[tableHeaderList[tdIndex]['propName']]}}</view>
<!-- <view class="table-td">{{tableItem[]}}</view> -->
</block>
</view>
</block>
<view class="tips" wx:if="{{
currentPage == pages&&tableList.length>13
}}">到底了~</view>
<view class="tips" wx:if="{{
currentPage == pages&&tableList.length>13
}}">到底了~</view>
</scroll-view>
</view>
</block>
<block wx:if="{{
!tableList.length
}}">
<block wx:if="{{
!tableList.length
}}">
<!-- <view class="tips-nothing">暂无数据</view> -->
<!-- <view class=" noListText">
<image
...
...
@@ -141,4 +127,10 @@
</view>
</view>
</view>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
\ No newline at end of file
utils/request/request.js
View file @
0c8e71d
...
...
@@ -21,8 +21,8 @@ class Request {
}
:
{}
data
=
_this
.
getData
(
data
,
method
,
noSignAttr
)
console
.
log
(
'reqData'
,
data
?.
sessionId
);
// delete
//
console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
...
...
utils/utils_wx.js
View file @
0c8e71d
...
...
@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => {
success
(
res
)
{
// console.log(res)
let
{
statusBarHeight
,
screenHeight
,
windowHeight
,
safeArea
}
=
res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res
const
{
bottom
}
=
safeArea
// console.log(bottom)
// console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
// 用safeArea可以处理
val
=
router
.
isTab
?
screenHeight
-
windowHeight
-
statusBarHeight
-
32
>
72
:
screenHeight
-
bottom
>
0
// val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72
// if (isComponents) val = screenHeight - windowHeight > 72
if
(
isComponents
)
val
=
screenHeight
-
bottom
>
0
// console.log(router, 'route')
// if (router.url.includes('tabIndex/pages/index/index')) {
// // console.log('当前页面为 TabBar 页面');
// val = true
// }
},
fail
(
err
)
{
...
...
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