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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
202 additions
and
39 deletions
+202
-39
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
+83
-11
myInfo.vue
pages/my/myInfo.vue
+9
-9
orderRecord.vue
pages/orderRecord/orderRecord.vue
+43
-10
No files found.
common/vmeitime-http/index.js
View file @
5c27c749
...
...
@@ -67,7 +67,6 @@ http.interceptor.response = (config) => {
/
\/
consumer
\/
info/g
,
/
\/
consumer
\/
edit/g
,
/
\/
order
\/
creat/g
,
/
\/
order
\/
list/g
,
/
\/
consumerCoupon
\/
list/g
,
/
\/
consumerCoupon
\/
query/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
=
{
// 开发环境配置
development
:
{
assetsPath
:
'http
://192.168.43.242:8211/
static'
,
// 静态资源路径
baseUrl
:
'http
://192.168.43.21:8883
/front-api'
,
// 后台接口请求地址
hostUrl
:
'http
://192.168.43.21:8882
'
,
// H5地址(前端运行地址)
assetsPath
:
'http
s://coujiao.pseer.com/wechat_
static'
,
// 静态资源路径
baseUrl
:
'http
s://coujiao.pseer.com
/front-api'
,
// 后台接口请求地址
hostUrl
:
'http
s://coujiao.pseer.com/prod-api
'
,
// H5地址(前端运行地址)
// baseUrl: 'http://192.168.1.189:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.1.189:8882', // H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
...
...
@@ -13,9 +13,9 @@ const CONFIG = {
},
// 生产环境配置
production
:
{
assetsPath
:
'
/
static'
,
// 静态资源路径
baseUrl
:
''
,
// 后台接口请求地址
hostUrl
:
''
,
// H5地址(前端运行地址)
assetsPath
:
'
https://coujiao.pseer.com/wechat_
static'
,
// 静态资源路径
baseUrl
:
'
https://coujiao.pseer.com/front-api
'
,
// 后台接口请求地址
hostUrl
:
'
https://coujiao.pseer.com/prod-api
'
,
// H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
codeHeadUrl
:
""
,
...
...
manifest.json
View file @
5c27c749
{
"name"
:
"
clearCar
"
,
"name"
:
"
gxpt_wechat
"
,
"appid"
:
"__UNI__2B9DF18"
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
...
...
@@ -87,5 +87,6 @@
"uniStatistics"
:
{
"enable"
:
false
},
"vueVersion"
:
"2"
"vueVersion"
:
"2"
,
"locale"
:
"zh-Hans"
}
pages/index/index.vue
View file @
5c27c749
...
...
@@ -90,6 +90,22 @@
</view>
</scroll-view>
<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>
</
template
>
...
...
@@ -199,9 +215,7 @@
},
onLoad
(
option
)
{
console
.
log
(
option
,
909090
)
this
.
onGetDicts
()
},
methods
:
{
onGetDicts
()
{
...
...
@@ -212,7 +226,6 @@
this
.
onLoading
()
}
else
{
dictList
().
then
(
res
=>
{
console
.
log
(
res
,
"获取字典"
)
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
...
...
@@ -224,6 +237,11 @@
uni
.
showLoading
({
title
:
"加载中..."
})
uni
.
getSetting
({
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
if
(
res
.
authSetting
[
'scope.userLocation'
]){
console
.
log
(
"打开了定位设置"
)
uni
.
getLocation
({
type
:
"gcj02"
,
success
:
(
result
)
=>
{
...
...
@@ -253,6 +271,13 @@
this
.
onGetListStore
()
}
})
}
else
{
uni
.
hideLoading
()
this
.
$refs
.
popup
.
open
()
}
}
})
},
onGetListStore
()
{
getListStore
({
...
...
@@ -276,8 +301,6 @@
}
})
}
console
.
log
(
this
.
storeInfo
,
909090
)
}
})
},
...
...
@@ -349,7 +372,19 @@
if
(
!
this
.
show
)
{
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 @@
.part-top
{
position
:
relative
;
width
:
600
upx
;
min-
height
:
300
upx
;
height
:
300
upx
;
z-index
:
10
;
background-color
:
#FFFFFF
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
box-shadow
:
0
0
4
upx
rgba
(
0
,
0
,
0
,
0.3
);
overflow
:
hidden
;
.room-img
{
display
:
block
;
width
:
100%
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
height
:
100%
;
}
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
}
.part-top-content
{
.flex-between
{
padding
:
12
upx
4
upx
;
...
...
@@ -705,4 +738,42 @@
flex-wrap
:
wrap
;
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
>
\ No newline at end of file
pages/my/myInfo.vue
View file @
5c27c749
...
...
@@ -39,7 +39,7 @@
</view>
<view
class=
"user-action"
>
<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"
>
<image
:src=
"item.iconUrl"
mode=
"widthFix"
></image>
</view>
...
...
@@ -111,19 +111,19 @@
type
:
""
,
show
:
true
},
{
label
:
"立即充值"
,
iconUrl
:
config
.
assetsPath
+
'/vip_icon.png'
,
routePath
:
""
,
type
:
""
,
show
:
true
},
//
{
//
label:"立即充值",
//
iconUrl:config.assetsPath+'/vip_icon.png',
//
routePath:"",
//
type:"",
//
show:true
//
},
{
label
:
"保洁管理"
,
iconUrl
:
config
.
assetsPath
+
'/clean_icon.png'
,
routePath
:
"/pages/cleanManage/cleanManage"
,
type
:
""
,
show
:
tru
e
show
:
fals
e
}
]
}
...
...
pages/orderRecord/orderRecord.vue
View file @
5c27c749
<
template
>
<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=
"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>
</view>
</view>
</scroll-view>
<view
class=
"content-box"
>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
...
...
@@ -43,11 +43,12 @@
</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;"
>
<u-empty
v-if=
"l
oginStatus && l
ist.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<view
v-if=
"l
oginStatus && l
ist.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
<NoLogin
v-model=
"loginStatus"
/>
</view>
</
template
>
...
...
@@ -55,15 +56,20 @@
import
{
orderList
}
from
"@/api/order.js"
import
list
from
"../../uni_modules/uview-ui/libs/config/props/list"
;
import
NoLogin
from
"@/components/noLogin/noLogin"
export
default
{
components
:{
NoLogin
},
data
()
{
return
{
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
statusIndex
:
""
,
statusIndex
:
0
,
list
:
[],
statusList
:
[{
label
:
"全部"
,
...
...
@@ -91,11 +97,18 @@
pageNum
:
1
,
pageSize
:
10
},
loginStatus
:
true
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
this
.
onLoading
()
},
...
...
@@ -104,17 +117,33 @@
uni
.
showLoading
({
title
:
'加载中'
})
this
.
status
=
'loading'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
orderList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
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
)
{
console
.
log
(
e
,
99999
)
this
.
statusIndex
=
e
.
currentTarget
.
dataset
.
id
;
tabSelect
(
i
)
{
console
.
log
(
i
,
99999
)
this
.
statusIndex
=
i
;
this
.
queryParams
.
pageNum
=
1
;
this
.
list
=
[]
this
.
onLoading
()
},
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
...
...
@@ -124,7 +153,11 @@
}
}
</
script
>
<
style
>
page
{
background-color
:
#ffffff
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.order-record
{
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