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
5c27c749
Commit
5c27c749
authored
Nov 15, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能细节优化
parent
a46da194
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
228 additions
and
65 deletions
+228
-65
index.js
common/vmeitime-http/index.js
+0
-1
noLogin.vue
components/noLogin/noLogin.vue
+58
-0
index.config.js
config/index.config.js
+6
-6
manifest.json
manifest.json
+3
-2
index.vue
pages/index/index.vue
+108
-36
myInfo.vue
pages/my/myInfo.vue
+9
-9
orderRecord.vue
pages/orderRecord/orderRecord.vue
+44
-11
No files found.
common/vmeitime-http/index.js
View file @
5c27c749
...
@@ -67,7 +67,6 @@ http.interceptor.response = (config) => {
...
@@ -67,7 +67,6 @@ http.interceptor.response = (config) => {
/
\/
consumer
\/
info/g
,
/
\/
consumer
\/
info/g
,
/
\/
consumer
\/
edit/g
,
/
\/
consumer
\/
edit/g
,
/
\/
order
\/
creat/g
,
/
\/
order
\/
creat/g
,
/
\/
order
\/
list/g
,
/
\/
consumerCoupon
\/
list/g
,
/
\/
consumerCoupon
\/
list/g
,
/
\/
consumerCoupon
\/
query/g
,
/
\/
consumerCoupon
\/
query/g
,
/
\/
chessCards
\/
consumeByUser/g
/
\/
chessCards
\/
consumeByUser/g
...
...
components/noLogin/noLogin.vue
0 → 100644
View file @
5c27c749
<
template
>
<view
v-if=
"!show"
class=
"no-login"
>
<view
class=
"img-box"
>
<text
class=
"cuIcon-peoplefill text-xxl text-gray"
></text>
</view>
<view
class=
"tip"
>
<text>
您还未登录,点击
</text>
<button
class=
"cu-btn bg-pink radius margin-top"
>
登录
</button>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"noLogin"
,
props
:{
value
:{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
show
:
this
.
value
};
},
watch
:{
value
(
val
){
this
.
show
=
val
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.no-login
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
height
:
50vh
;
.img-box{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
120
upx
;
width
:
100%
;
}
.tip
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
}
}
</
style
>
\ No newline at end of file
config/index.config.js
View file @
5c27c749
const
CONFIG
=
{
const
CONFIG
=
{
// 开发环境配置
// 开发环境配置
development
:
{
development
:
{
assetsPath
:
'http
://192.168.43.242:8211/
static'
,
// 静态资源路径
assetsPath
:
'http
s://coujiao.pseer.com/wechat_
static'
,
// 静态资源路径
baseUrl
:
'http
://192.168.43.21:8883
/front-api'
,
// 后台接口请求地址
baseUrl
:
'http
s://coujiao.pseer.com
/front-api'
,
// 后台接口请求地址
hostUrl
:
'http
://192.168.43.21:8882
'
,
// H5地址(前端运行地址)
hostUrl
:
'http
s://coujiao.pseer.com/prod-api
'
,
// H5地址(前端运行地址)
// baseUrl: 'http://192.168.1.189:8883/front', // 后台接口请求地址
// baseUrl: 'http://192.168.1.189:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.1.189:8882', // H5地址(前端运行地址)
// hostUrl: 'http://192.168.1.189:8882', // H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
websocketUrl
:
''
,
// websocket服务端地址
...
@@ -13,9 +13,9 @@ const CONFIG = {
...
@@ -13,9 +13,9 @@ const CONFIG = {
},
},
// 生产环境配置
// 生产环境配置
production
:
{
production
:
{
assetsPath
:
'
/
static'
,
// 静态资源路径
assetsPath
:
'
https://coujiao.pseer.com/wechat_
static'
,
// 静态资源路径
baseUrl
:
''
,
// 后台接口请求地址
baseUrl
:
'
https://coujiao.pseer.com/front-api
'
,
// 后台接口请求地址
hostUrl
:
''
,
// H5地址(前端运行地址)
hostUrl
:
'
https://coujiao.pseer.com/prod-api
'
,
// H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
weixinAppId
:
''
,
// 微信公众号appid
codeHeadUrl
:
""
,
codeHeadUrl
:
""
,
...
...
manifest.json
View file @
5c27c749
{
{
"name"
:
"
clearCar
"
,
"name"
:
"
gxpt_wechat
"
,
"appid"
:
"__UNI__2B9DF18"
,
"appid"
:
"__UNI__2B9DF18"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
...
@@ -87,5 +87,6 @@
...
@@ -87,5 +87,6 @@
"uniStatistics"
:
{
"uniStatistics"
:
{
"enable"
:
false
"enable"
:
false
},
},
"vueVersion"
:
"2"
"vueVersion"
:
"2"
,
"locale"
:
"zh-Hans"
}
}
pages/index/index.vue
View file @
5c27c749
...
@@ -90,6 +90,22 @@
...
@@ -90,6 +90,22 @@
</view>
</view>
</scroll-view>
</scroll-view>
<ToolBox
v-model=
"show"
/>
<ToolBox
v-model=
"show"
/>
<uni-popup
ref=
"popup"
type=
"center"
>
<view
class=
"flex-col location-box"
>
<view
class=
"flex-col content-box"
>
<view
class=
"title"
>
<text
class=
"text-black text-xl text-bold"
>
提示
</text>
</view>
<view
class=
"content"
>
<text
class=
"text-black text-lg"
>
定位已关闭,请开启定位,获取最近的门店信息
</text>
</view>
</view>
<view
class=
"flex-between btn-box"
>
<button
class=
"cu-btn round bg-white block"
@
tap=
"onClose"
>
关闭
</button>
<button
class=
"cu-btn round bg-pink block"
@
tap=
"onNavToSet"
>
去设置
</button>
</view>
</view>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
...
@@ -199,9 +215,7 @@
...
@@ -199,9 +215,7 @@
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
console
.
log
(
option
,
909090
)
this
.
onGetDicts
()
this
.
onGetDicts
()
},
},
methods
:
{
methods
:
{
onGetDicts
()
{
onGetDicts
()
{
...
@@ -212,7 +226,6 @@
...
@@ -212,7 +226,6 @@
this
.
onLoading
()
this
.
onLoading
()
}
else
{
}
else
{
dictList
().
then
(
res
=>
{
dictList
().
then
(
res
=>
{
console
.
log
(
res
,
"获取字典"
)
dicts
=
res
.
data
.
data
;
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
...
@@ -224,33 +237,45 @@
...
@@ -224,33 +237,45 @@
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中..."
title
:
"加载中..."
})
})
uni
.
getLocation
({
uni
.
getSetting
({
type
:
"gcj02"
,
complete
:
(
res
)
=>
{
success
:
(
result
)
=>
{
console
.
log
(
res
,
909090
)
if
(
result
.
errMsg
==
"getLocation:ok"
)
{
if
(
res
.
authSetting
[
'scope.userLocation'
]){
this
.
latitude
=
result
.
latitude
;
console
.
log
(
"打开了定位设置"
)
this
.
longitude
=
result
.
longitude
;
uni
.
getLocation
({
uni
.
setStorageSync
(
"latitude"
,
result
.
latitude
)
type
:
"gcj02"
,
uni
.
setStorageSync
(
"longitude"
,
result
.
longitude
)
success
:
(
result
)
=>
{
}
else
{
if
(
result
.
errMsg
==
"getLocation:ok"
)
{
uni
.
hideLoading
()
this
.
latitude
=
result
.
latitude
;
uni
.
showToast
({
this
.
longitude
=
result
.
longitude
;
icon
:
"none"
,
uni
.
setStorageSync
(
"latitude"
,
result
.
latitude
)
title
:
"获取位置信息失败"
uni
.
setStorageSync
(
"longitude"
,
result
.
longitude
)
}
else
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取位置信息失败"
})
}
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
icon
:
"none"
,
title
:
err
.
errMsg
})
},
complete
:
()
=>
{
uni
.
removeStorage
({
key
:
'storeId'
})
this
.
onGetListStore
()
}
})
})
}
else
{
uni
.
hideLoading
()
this
.
$refs
.
popup
.
open
()
}
}
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
icon
:
"none"
,
title
:
err
.
errMsg
})
},
complete
:
()
=>
{
uni
.
removeStorage
({
key
:
'storeId'
})
this
.
onGetListStore
()
}
}
})
})
},
},
...
@@ -276,8 +301,6 @@
...
@@ -276,8 +301,6 @@
}
}
})
})
}
}
console
.
log
(
this
.
storeInfo
,
909090
)
}
}
})
})
},
},
...
@@ -349,7 +372,19 @@
...
@@ -349,7 +372,19 @@
if
(
!
this
.
show
)
{
if
(
!
this
.
show
)
{
this
.
show
=
true
this
.
show
=
true
}
}
},
onClose
(){
this
.
$refs
.
popup
.
close
()
},
onNavToSet
(){
uni
.
openSetting
({
scope
:
"scope.userLocation"
,
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
this
.
onClose
();
this
.
onLoading
()
}
})
}
}
},
},
}
}
...
@@ -567,20 +602,18 @@
...
@@ -567,20 +602,18 @@
.part-top
{
.part-top
{
position
:
relative
;
position
:
relative
;
width
:
600
upx
;
width
:
600
upx
;
min-
height
:
300
upx
;
height
:
300
upx
;
z-index
:
10
;
z-index
:
10
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
box-shadow
:
0
0
4
upx
rgba
(
0
,
0
,
0
,
0.3
);
box-shadow
:
0
0
4
upx
rgba
(
0
,
0
,
0
,
0.3
);
overflow
:
hidden
;
overflow
:
hidden
;
.room-img
{
.room-img
{
display
:
block
;
width
:
100%
;
width
:
100%
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
height
:
100%
;
height
:
100%
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
}
}
.part-top-content
{
.part-top-content
{
.flex-between
{
.flex-between
{
padding
:
12
upx
4
upx
;
padding
:
12
upx
4
upx
;
...
@@ -705,4 +738,42 @@
...
@@ -705,4 +738,42 @@
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
padding
:
12
upx
20
upx
;
padding
:
12
upx
20
upx
;
}
}
.location-box
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
min-height
:
600
upx
;
.content-box{
display
:
flex
;
flex-direction
:
column
;
width
:
90%
;
background-color
:
#ffffff
;
border
:
1px
solid
#B70469
;
border-radius
:
20
upx
;
margin
:
0
auto
40
upx
;
.title{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
30
upx
0
;
border-bottom
:
1px
solid
#B70469
;
}
.content
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
30
upx
;
min-height
:
300
upx
;
}
}
.btn-box
{
display
:
flex
;
justify-content
:
space-between
;
width
:
84%
;
margin
:
0
auto
;
.cu-btn{
width
:
40%
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/my/myInfo.vue
View file @
5c27c749
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</view>
</view>
<view
class=
"user-action"
>
<view
class=
"user-action"
>
<view
v-for=
"(item,k) in userAction"
:key=
"k"
class=
"action-box"
>
<view
v-for=
"(item,k) in userAction"
:key=
"k"
class=
"action-box"
>
<view
v-if=
"item.show"
class=
"action-item"
@
tap=
"onActionNav(item,k)"
>
<view
v-if=
"item.show
|| userInfo.roleType =='2'
"
class=
"action-item"
@
tap=
"onActionNav(item,k)"
>
<view
class=
"img-box"
>
<view
class=
"img-box"
>
<image
:src=
"item.iconUrl"
mode=
"widthFix"
></image>
<image
:src=
"item.iconUrl"
mode=
"widthFix"
></image>
</view>
</view>
...
@@ -111,19 +111,19 @@
...
@@ -111,19 +111,19 @@
type
:
""
,
type
:
""
,
show
:
true
show
:
true
},
},
{
//
{
label
:
"立即充值"
,
//
label:"立即充值",
iconUrl
:
config
.
assetsPath
+
'/vip_icon.png'
,
//
iconUrl:config.assetsPath+'/vip_icon.png',
routePath
:
""
,
//
routePath:"",
type
:
""
,
//
type:"",
show
:
true
//
show:true
},
//
},
{
{
label
:
"保洁管理"
,
label
:
"保洁管理"
,
iconUrl
:
config
.
assetsPath
+
'/clean_icon.png'
,
iconUrl
:
config
.
assetsPath
+
'/clean_icon.png'
,
routePath
:
"/pages/cleanManage/cleanManage"
,
routePath
:
"/pages/cleanManage/cleanManage"
,
type
:
""
,
type
:
""
,
show
:
tru
e
show
:
fals
e
}
}
]
]
}
}
...
...
pages/orderRecord/orderRecord.vue
View file @
5c27c749
<
template
>
<
template
>
<view
class=
"order-record"
>
<view
class=
"order-record"
>
<scroll-view
scroll-x
class=
"bg-white nav"
>
<scroll-view
v-if=
"loginStatus"
scroll-x
class=
"bg-white nav"
>
<view
class=
"flex text-center"
>
<view
class=
"flex text-center"
>
<view
class=
"cu-item flex-sub"
:class=
"index==statusIndex?'text-orange cur':''"
<view
class=
"cu-item flex-sub"
:class=
"index==statusIndex?'text-orange cur':''"
v-for=
"(item,index) in statusList"
:key=
"index"
@
tap=
"tabSelect
"
:data-id=
"index
"
>
v-for=
"(item,index) in statusList"
:key=
"index"
@
tap=
"tabSelect
(index)
"
>
<text>
{{
item
.
label
}}
</text>
<text>
{{
item
.
label
}}
</text>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
<view
class=
"content-box"
>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
<view
class=
"flex-between part-1"
>
...
@@ -43,11 +43,12 @@
...
@@ -43,11 +43,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"list.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<u-empty
v-if=
"l
oginStatus && l
ist.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<view
v-if=
"l
oginStatus && l
ist.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
</view>
<NoLogin
v-model=
"loginStatus"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -55,15 +56,20 @@
...
@@ -55,15 +56,20 @@
import
{
import
{
orderList
orderList
}
from
"@/api/order.js"
}
from
"@/api/order.js"
import
list
from
"../../uni_modules/uview-ui/libs/config/props/list"
;
import
NoLogin
from
"@/components/noLogin/noLogin"
export
default
{
export
default
{
components
:{
NoLogin
},
data
()
{
data
()
{
return
{
return
{
status
:
'nomore '
,
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
nomoreText
:
'到底啦'
,
statusIndex
:
""
,
statusIndex
:
0
,
list
:
[],
list
:
[],
statusList
:
[{
statusList
:
[{
label
:
"全部"
,
label
:
"全部"
,
...
@@ -91,11 +97,18 @@
...
@@ -91,11 +97,18 @@
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
},
},
loginStatus
:
true
};
};
},
},
onLoad
()
{
onLoad
()
{
},
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
onShow
()
{
this
.
onLoading
()
this
.
onLoading
()
},
},
...
@@ -104,17 +117,33 @@
...
@@ -104,17 +117,33 @@
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
this
.
status
=
'loading'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
orderList
(
this
.
queryParams
).
then
(
res
=>
{
orderList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
list
=
res
.
data
.
rows
if
(
this
.
queryParams
.
pageNum
==
1
){
this
.
list
=
res
.
data
.
rows
}
else
{
this
.
list
=
[...
this
.
list
,...
res
.
data
.
rows
]
}
if
(
this
.
list
.
length
<
res
.
data
.
total
){
this
.
status
=
"loadmore"
}
else
{
this
.
status
=
'nomore'
}
}
else
if
(
res
.
data
.
code
==
401
){
this
.
loginStatus
=
false
}
}
})
})
},
},
tabSelect
(
e
)
{
tabSelect
(
i
)
{
console
.
log
(
e
,
99999
)
console
.
log
(
i
,
99999
)
this
.
statusIndex
=
e
.
currentTarget
.
dataset
.
id
;
this
.
statusIndex
=
i
;
this
.
queryParams
.
pageNum
=
1
;
this
.
list
=
[]
this
.
onLoading
()
},
},
onNavToOrderInfo
(
val
){
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -124,7 +153,11 @@
...
@@ -124,7 +153,11 @@
}
}
}
}
</
script
>
</
script
>
<
style
>
page
{
background-color
:
#ffffff
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-record
{
.order-record
{
display
:
flex
;
display
:
flex
;
...
...
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