Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_wechat
Commits
6e385ba6
Commit
6e385ba6
authored
Oct 25, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化各个模块细节
parent
3ca8cbb2
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
369 additions
and
46 deletions
+369
-46
App.vue
App.vue
+24
-4
index.js
api/index.js
+12
-0
order.js
api/order.js
+24
-1
index.js
common/vmeitime-http/index.js
+12
-7
storeList.vue
components/storeList/storeList.vue
+3
-0
toolBox.vue
components/toolBox/toolBox.vue
+6
-2
pages.json
pages.json
+9
-0
index.vue
pages/index/index.vue
+18
-3
login.vue
pages/login/login.vue
+8
-0
myInfo.vue
pages/my/myInfo.vue
+30
-1
order.vue
pages/order/order.vue
+91
-19
orderRecord.vue
pages/orderRecord/orderRecord.vue
+84
-3
orderResult.vue
pages/orderResult/orderResult.vue
+27
-0
storeList.vue
pages/storeList/storeList.vue
+21
-6
No files found.
App.vue
View file @
6e385ba6
<
script
>
import
Vue
from
'vue'
import
{
dictList
}
from
"@/api/index.js"
export
default
{
onLaunch
:
function
(
e
)
{
// 版本更新机制
const
updateManager
=
wx
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
if
(
!
res
.
hasUpdate
)
{
console
.
log
(
"目前是最新版"
,
res
.
hasUpdate
);
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
if
(
!
res
.
hasUpdate
)
{
console
.
log
(
"目前是最新版"
,
res
.
hasUpdate
);
}
})
updateManager
.
onUpdateReady
(
function
()
{
updateManager
.
onUpdateReady
(
function
()
{
updateManager
.
applyUpdate
()
})
...
...
@@ -42,6 +46,20 @@
// #endif
}
})
dictList
().
then
(
res
=>
{
console
.
log
(
res
,
90909090
)
Vue
.
prototype
.
dicts
=
res
.
data
.
data
;
Vue
.
prototype
.
getDictItem
=
(
dictType
)
=>
{
let
arr
=
Vue
.
prototype
.
dicts
.
filter
(
item
=>
item
.
dictType
===
dictType
)
let
obj
=
{};
arr
[
0
].
dictDatas
.
forEach
(
val
=>
{
obj
[
val
.
dictValue
]
=
val
.
dictLabel
})
return
obj
}
})
}
}
</
script
>
...
...
@@ -53,9 +71,11 @@
@import
"./colorui/main.css"
;
@import
"./colorui/icon.css"
;
@import
"./colorui/animation.css"
;
page
{
background-color
:
#f9f9f9
;
}
//
隐藏滚动条
::-webkit-scrollbar
{
width
:
0
;
...
...
api/index.js
View file @
6e385ba6
...
...
@@ -29,3 +29,15 @@ export const updateUserInfo=(data)=>{
let
url
=
`/consumer/edit`
return
http
.
post
(
url
,
data
)
}
// 退出登录操作
export
const
loginOut
=
()
=>
{
let
url
=
`/login/logout`
return
http
.
get
(
url
)
}
// 获取全部字典
export
const
dictList
=
()
=>
{
let
url
=
`/dict/type/optionselect`
return
http
.
get
(
url
)
}
api/order.js
View file @
6e385ba6
import
http
from
"@/common/vmeitime-http/index.js"
// 获取查询我的优惠券
// 用户订单列表
export
const
orderList
=
(
data
)
=>
{
let
url
=
`/order/list`
return
http
.
get
(
url
,
data
)
}
// 订单详情
export
const
getOrderInfo
=
(
id
)
=>
{
let
url
=
`/order/`
+
id
return
http
.
get
(
url
,
data
)
}
// 用户下单
export
const
orderCreate
=
(
data
)
=>
{
let
url
=
`/order/creat`
return
http
.
post
(
url
,
data
)
}
// 计算价格
export
const
computePrice
=
(
data
)
=>
{
let
url
=
`/order/computed/price`
return
http
.
post
(
url
,
data
)
}
common/vmeitime-http/index.js
View file @
6e385ba6
...
...
@@ -64,15 +64,20 @@ http.interceptor.response = (config) => {
}
let
urls
=
[
/
\/
appConfig/g
,
/
\/
consumer
\/
info/g
,
/
\/
consumer
\/
edit/g
,
/
\/
order
\/
creat/g
,
/
\/
order
\/
list/g
,
/
\/
consumerCoupon
\/
list/g
,
/
\/
consumerCoupon
\/
query/g
]
// if (!
urls.some(item => item.test(config.config.url)) && config.data.code == 401) {
//
uni.navigateTo({
//
url: '/pages/login/login'
//
})
//
}
if
(
!
[
401
,
200
].
includes
(
config
.
data
.
code
))
{
if
(
urls
.
some
(
item
=>
item
.
test
(
config
.
config
.
url
))
&&
config
.
data
.
code
==
401
)
{
uni
.
navigateTo
({
url
:
'/pages/login/login'
})
}
if
(
!
[
401
,
200
,
500
].
includes
(
config
.
data
.
code
))
{
uni
.
showToast
({
icon
:
"none"
,
title
:
config
.
data
.
msg
...
...
components/storeList/storeList.vue
View file @
6e385ba6
...
...
@@ -61,6 +61,9 @@
}
}
},
mounted
()
{
this
.
storeTypeEnum
=
this
.
getDictItem
(
"store_type"
);
},
methods
:
{
onLoading
()
{
this
.
list
=
this
.
value
;
...
...
components/toolBox/toolBox.vue
View file @
6e385ba6
<
template
>
<view
class=
"tool-box"
>
<view
v-for=
"(item, index) in toolList"
:key=
"index"
class=
"tool-item"
:class=
"
{active:!show}" :style="{transitionDuration: dNum+'s' }">
<view
v-for=
"(item, index) in toolList"
:key=
"index"
class=
"tool-item"
:class=
"
{active:!show}" :style="{transitionDuration: dNum+'s' }"
@tap.stop="onHandle(item)"
>
<text
class=
"text-white text-bold text-xl"
>
{{
show
?
item
.
name
:
item
.
sortName
}}
</text>
</view>
</view>
...
...
@@ -55,7 +55,11 @@
mounted
()
{
},
methods
:{}
methods
:{
onHandle
(
val
){
console
.
log
(
val
)
}
}
}
</
script
>
...
...
pages.json
View file @
6e385ba6
...
...
@@ -99,6 +99,15 @@
}
}
,{
"path"
:
"pages/orderResult/orderResult"
,
"style"
:
{
"navigationBarTitleText"
:
"下单完成"
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"navigationStyle"
:
"default"
,
...
...
pages/index/index.vue
View file @
6e385ba6
<
template
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchend=
"onTouchEnd"
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touch
move=
"onTouchMove"
@
touch
end=
"onTouchEnd"
>
<view
class=
"header-content"
:style=
"
{height: statusBarHeight + 210+'px',paddingTop:statusBarHeight+'px' }">
<image
src=
"../../static/banner.png"
mode=
"widthFix"
></image>
</view>
...
...
@@ -151,7 +151,8 @@
label
:
"8小时"
}
],
show
:
true
show
:
true
,
timer
:
null
}
},
onShow
()
{
...
...
@@ -251,11 +252,25 @@
})
},
onTouchStart
(){
this
.
show
=
false
this
.
timer
=
null
;
this
.
show
=
true
;
},
onTouchMove
(){
if
(
!
this
.
timer
){
this
.
timer
=
setTimeout
(()
=>
{
this
.
show
=
false
;
},
200
)
}
},
onTouchEnd
(){
if
(
this
.
timer
){
clearTimeout
(
this
.
timer
)
}
if
(
!
this
.
show
){
this
.
show
=
true
}
}
},
}
</
script
>
...
...
pages/login/login.vue
View file @
6e385ba6
...
...
@@ -119,9 +119,13 @@ import {checkPhone} from "@/utils/tools.js"
},
//先查看用户有无注册过
onCheckUserLogin
(
e
)
{
uni
.
showLoading
({
title
:
"查询中"
})
wx
.
login
({
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
uni
.
hideLoading
()
console
.
log
(
res
,
"检查用户是否登录"
)
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
data
.
type
===
"login"
){
...
...
@@ -145,6 +149,9 @@ import {checkPhone} from "@/utils/tools.js"
onRegister
(
key
){
wx
.
login
({
success
:
(
res
)
=>
{
uni
.
showLoading
({
title
:
"注册登录中"
})
register
({
code
:
res
.
code
,
phone
:
this
.
phone
,
...
...
@@ -152,6 +159,7 @@ import {checkPhone} from "@/utils/tools.js"
captcha
:
this
.
captcha
,
key
}).
then
(
res
=>
{
uni
.
hideLoading
()
console
.
log
(
res
,
"为用户注册"
)
if
(
res
.
data
.
code
==
200
){
this
.
num
=
60
;
...
...
pages/my/myInfo.vue
View file @
6e385ba6
...
...
@@ -76,12 +76,19 @@
</view>
</view>
</view>
<view
class=
"login-out"
v-if=
"loginStatus"
>
<button
class=
"cu-btn block bg-pink lg round"
@
tap=
"onLoginOut"
>
<text
class=
"cuIcon-exit"
></text>
退出登录
</button>
</view>
</view>
</
template
>
<
script
>
import
{
getUserInfo
getUserInfo
,
loginOut
}
from
"@/api/index.js"
import
orderIcon
from
"@/static/order_icon.png"
;
...
...
@@ -168,6 +175,23 @@ import cleanIcon from "@/static/clean_icon.png";
url
:
val
.
routePath
})
}
},
// 退出登录,解除手机号与当前微信的绑定
onLoginOut
(){
uni
.
showLoading
({
title
:
"加载中"
})
loginOut
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"用户已退出登录"
})
this
.
loginStatus
=
false
;
uni
.
clearStorage
();
}
})
}
}
}
...
...
@@ -280,4 +304,8 @@ import cleanIcon from "@/static/clean_icon.png";
margin-top
:
30
upx
;
}
}
.login-out
{
width
:
94%
;
margin-top
:
40
upx
;
}
</
style
>
\ No newline at end of file
pages/order/order.vue
View file @
6e385ba6
...
...
@@ -137,13 +137,13 @@
<text
class=
"text-title text-lg"
>
套餐优惠
</text>
<text
class=
"text-title text-lg text-pink"
>
{{
couponList
.
length
?
'-¥20.00'
:
'0'
}}
</text>
</view>
<view
class=
"flex-between price"
>
<
!--
<
view
class=
"flex-between price"
>
<text
class=
"text-title text-lg"
>
账户余额
</text>
<view
class=
"flex-row text-pink"
>
<text
class=
"text-title text-lg"
>
0.00 元
</text>
<text
class=
"text-title cuIcon-right "
></text>
</view>
</view>
</view>
-->
</view>
<view
class=
"pay-content-box"
>
<view
class=
"flex-row"
>
...
...
@@ -215,7 +215,8 @@
getUseCoupon
}
from
"@/api/coupon"
import
{
orderCreate
orderCreate
,
computePrice
}
from
"@/api/order"
export
default
{
...
...
@@ -231,6 +232,7 @@
}
return
{
id
:
''
,
orderType
:
0
,
hostUrl
:
config
.
hostUrl
,
roomInfo
:
{
images
:
[]
...
...
@@ -242,17 +244,16 @@
index
:
0
,
orderTypeList
:
[{
label
:
"小时模式"
,
type
:
"1"
type
:
1
},
{
label
:
"
优惠
模式"
,
type
:
"2"
label
:
"
套餐
模式"
,
type
:
2
}
],
// 时长选择
distanceIndex
:
0
,
distanceMode
:
[
{
distanceMode
:
[{
duration
:
4
},
{
...
...
@@ -268,12 +269,14 @@
// 套餐
modeIndex
:
0
,
packageMode
:
[{
id
:
''
,
label
:
""
,
duration
:
4
,
originalPrice
:
100
,
realPrice
:
78
},
{
id
:
''
,
label
:
""
,
duration
:
8
,
originalPrice
:
200
,
...
...
@@ -286,16 +289,19 @@
checkedIndex
:
[],
checkedDateList
:
[
0
,
0
],
durationIndex
:
[
0
],
hourList
:
[
"0
"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"
9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
hourList
:
[
"0
0"
,
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"0
9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"21"
,
"22"
,
"23"
],
minuteList
:
[
'0'
,
"30"
],
minuteList
:
[
'0
0
'
,
"30"
],
orderTypeEnum
:
{
1
:
"预定"
,
2
:
"续费"
,
3
:
"充值"
},
editDuration
:
[]
editDuration
:
[],
checkedCouponInfo
:{
id
:
''
}
};
},
onLoad
(
option
)
{
...
...
@@ -306,12 +312,38 @@
this
.
onLoading
()
},
methods
:
{
//计算支付金额
onComputePrice
()
{
uni
.
showLoading
({
title
:
"计算价格中..."
})
let
dateObj
=
this
.
onSetDateTime
(
this
.
startTime
,
this
.
endTime
);
let
params
=
{
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
buyType
:
this
.
orderTypeList
[
this
.
index
].
type
,
couponId
:
this
.
checkedCouponInfo
.
id
,
orderType
:
this
.
orderType
,
preStartDate
:
dateObj
.
startDate
,
preEndDate
:
dateObj
.
endDate
}
if
(
this
.
index
>
0
){
params
.
packId
=
this
.
packageMode
[
this
.
modeIndex
].
id
;
}
computePrice
(
params
).
then
(
res
=>
{
uni
.
hideLoading
()
console
.
log
(
res
)
})
},
// 获取可用优惠券
onGetUseCoupon
()
{
let
dateObj
=
this
.
onSetDateTime
(
this
.
startTime
,
this
.
endTime
);
console
.
log
(
this
.
startTime
,
this
.
endTime
,
909090
)
getUseCoupon
({
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
preStartDate
:
"2023-10-25 14:00"
,
preEndDate
:
"2023-10-25 18:00"
preStartDate
:
dateObj
.
startDate
,
preEndDate
:
dateObj
.
endDate
}).
then
(
res
=>
{
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
)
{
...
...
@@ -319,6 +351,7 @@
this
.
packageMode
=
res
.
data
;
}
}
this
.
onComputePrice
();
})
},
onLoading
()
{
...
...
@@ -369,7 +402,7 @@
this
.
onSetEndTime
()
},
onDurationChange
(
i
)
{
if
(
i
>=
this
.
distanceMode
.
length
-
1
)
{
if
(
i
>=
this
.
distanceMode
.
length
-
1
)
{
this
.
onEditDuration
();
return
}
...
...
@@ -397,7 +430,8 @@
}
else
{
num
=
item
}
return
num
return
num
>=
10
?
num
:
`0
${
num
}
`
}).
join
(
":"
)
}
else
{
// 小时模式
...
...
@@ -413,7 +447,7 @@
}
else
{
num
=
item
}
return
num
return
num
>=
10
?
num
:
`0
${
num
}
`
}).
join
(
":"
)
}
...
...
@@ -446,7 +480,7 @@
},
onSelectedDate
()
{
this
.
checkedDateList
=
this
.
checkedIndex
;
this
.
startTime
=
`
${
this
.
checkedDateList
[
0
]}
:
${
this
.
minuteList
[
this
.
checkedDateList
[
1
]]}
`
;
this
.
startTime
=
`
${
this
.
hourList
[
this
.
checkedDateList
[
0
]
]}
:
${
this
.
minuteList
[
this
.
checkedDateList
[
1
]]}
`
;
console
.
log
(
this
.
startTime
,
"开始时间"
)
//重新设置结束时间
this
.
onSetEndTime
()
...
...
@@ -454,7 +488,7 @@
},
onEditDuration
()
{
if
(
this
.
editDuration
.
length
)
{
if
(
this
.
editDuration
.
length
)
{
this
.
durationIndex
=
this
.
editDuration
}
this
.
$refs
.
popupDuration
.
open
()
...
...
@@ -470,7 +504,7 @@
this
.
distanceMode
[
this
.
distanceIndex
]
=
{
duration
:
this
.
editDuration
[
0
]
+
1
,
}
console
.
log
(
this
.
distanceMode
,
"1asdasdasd"
)
console
.
log
(
this
.
distanceMode
,
"1asdasdasd"
)
this
.
onHideModal
()
this
.
$forceUpdate
();
...
...
@@ -481,6 +515,9 @@
this
.
$refs
.
popupDuration
.
close
()
},
onOrderCreate
()
{
uni
.
showLoading
({
title
:
"下单中..."
})
orderCreate
({
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
...
...
@@ -493,7 +530,42 @@
payFee
:
0
}).
then
(
res
=>
{
console
.
log
(
res
,
909090
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
icon
:
"success"
,
title
:
"下单成功"
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
"/pages/orderResult/orderResult?orderNo="
+
res
.
data
.
data
.
orderNo
})
},
1000
)
}
})
}
else
{
uni
.
showToast
({
title
:
"下单失败"
})
}
})
},
// 将时间转换成完整日期
onSetDateTime
(
startTime
,
endTime
){
let
obj
=
{
startDate
:
""
,
endDate
:
''
}
let
startArr
=
startTime
.
split
(
":"
)
let
endArr
=
startTime
.
split
(
":"
)
obj
.
startDate
=
`
${
moment
().
format
(
"YYYY-MM-DD"
)}
${
startTime
}
:00`
if
(
Number
(
endArr
[
0
])
>=
Number
(
startArr
[
0
])){
obj
.
endDate
=
`
${
moment
().
add
(
1
,
"days"
).
format
(
"YYYY-MM-DD"
)}
${
endTime
}
:00`
}
else
{
obj
.
endDate
=
`
${
moment
().
format
(
"YYYY-MM-DD"
)}
${
endTime
}
:00`
}
console
.
log
(
obj
)
return
obj
;
}
}
}
...
...
pages/orderRecord/orderRecord.vue
View file @
6e385ba6
...
...
@@ -8,15 +8,54 @@
</view>
</view>
</scroll-view>
<view
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
>
<view
class=
"flex-between part-1"
>
<text
class=
"text-title text-bold text-xl"
>
一帆风顺(111)
</text>
<text
class=
"text-pink"
>
待使用
</text>
</view>
<view
class=
"flex-between part-1"
>
<view
class=
""
>
<text>
{{
item
.
payType
==
1
?
'微信支付'
:
'余额支付'
}}
:
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
payPrice
}}
元
</text>
</view>
<view
class=
"flex-row"
>
<text>
{{
item
.
orderType
==
1
?
'房间预定'
:
'房间续订'
}}
</text>
</view>
</view>
<view
class=
"flex-between part-1"
>
<text>
优惠券抵扣
</text>
<text>
四小时75元优惠券
</text>
</view>
<view
class=
"flex-row part-1"
>
<text>
订单编号:
</text>
<text>
{{
item
.
orderNo
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<text>
使用时间:
</text>
<text>
{{
item
.
preStartDate
}}
-
{{
item
.
preEndDate
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<text>
下单时间:
</text>
<text>
{{
item
.
createTime
}}
</text>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"list.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<!--
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
-->
</view>
</view>
</
template
>
<
script
>
import
{
orderList
}
from
"@/api/order.js"
export
default
{
data
()
{
return
{
...
...
@@ -46,13 +85,33 @@
label
:
"退单"
,
value
:
"4"
,
}
]
],
queryParams
:
{
status
:
""
,
pageNum
:
1
,
pageSize
:
10
},
};
},
onLoad
()
{
},
onShow
()
{
this
.
onLoading
()
},
methods
:
{
onLoading
()
{
uni
.
showLoading
({
title
:
'加载中'
})
orderList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
this
.
list
=
res
.
data
.
rows
}
})
},
tabSelect
(
e
)
{
console
.
log
(
e
,
99999
)
this
.
statusIndex
=
e
.
currentTarget
.
dataset
.
id
;
...
...
@@ -66,5 +125,26 @@
display
:
flex
;
flex-direction
:
column
;
.content-box
{
display
:
flex
;
flex-direction
:
column
;
.list-content{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.list-item{
width
:
94%
;
padding
:
30
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
.part-1{
display
:
flex
;
align-items
:
center
;
padding
:
10
upx
;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/orderResult/orderResult.vue
0 → 100644
View file @
6e385ba6
<
template
>
<view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
orderNo
:
''
};
},
onLoad
(
option
)
{
this
.
orderNo
=
option
.
orderNo
},
methods
:{
onLoading
(){
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
pages/storeList/storeList.vue
View file @
6e385ba6
<
template
>
<view
class=
"room-list"
@
touchstart=
"onTouchStart"
@
touchend=
"onTouchEnd"
>
<view
class=
"room-list"
@
touchstart=
"onTouchStart"
@
touch
move=
"onTouchMove"
@
touch
end=
"onTouchEnd"
>
<view
class=
"header-top"
:style=
"
{height:CustomBar+50+'px', paddingTop:StatusBar+'px'}">
<view
class=
"bar-title"
:style=
"
{height:CustomBar-StatusBar+'px'}">
<text
class=
"text-lg text-white text-bold"
>
选择门店
</text>
...
...
@@ -73,14 +73,14 @@
pageNum
:
1
,
pageSize
:
20
},
show
:
true
show
:
true
,
timer
:
null
,
storeTypeEnum
:{},
};
},
onLoad
()
{
this
.
onLoading
()
this
.
onLoading
()
},
methods
:
{
onLoading
()
{
...
...
@@ -150,11 +150,26 @@
})
},
onTouchStart
(){
this
.
show
=
false
this
.
timer
=
null
;
this
.
show
=
true
;
},
onTouchMove
(){
if
(
!
this
.
timer
){
this
.
timer
=
setTimeout
(()
=>
{
this
.
show
=
false
;
},
200
)
}
},
onTouchEnd
(){
if
(
this
.
timer
){
clearTimeout
(
this
.
timer
)
}
if
(
!
this
.
show
){
this
.
show
=
true
}
}
},
}
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment