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
7a9b8b0e
Commit
7a9b8b0e
authored
Nov 30, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
5ec478f2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
234 additions
and
82 deletions
+234
-82
login.vue
components/login/login.vue
+24
-3
cleanManage.vue
pages/cleanManage/cleanManage.vue
+180
-41
index.vue
pages/index/index.vue
+8
-28
share.vue
pages/share/share.vue
+22
-10
logo_icon.png
static/logo_icon.png
+0
-0
No files found.
components/login/login.vue
View file @
7a9b8b0e
...
...
@@ -19,9 +19,9 @@
</
template
>
<
script
>
import
{
register
,
login
,
register
}
from
"@/api/index.js"
;
export
default
{
...
...
@@ -33,7 +33,28 @@
},
methods
:{
open
(){
this
.
$refs
.
popupPhone
.
open
()
let
that
=
this
;
wx
.
login
({
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
type
===
"login"
)
{
uni
.
setStorageSync
(
'tokenHeaders'
,
"Authori-zation"
)
uni
.
setStorage
({
key
:
uni
.
getStorageSync
(
'tokenHeaders'
),
data
:
res
.
data
.
data
.
token
})
that
.
$emit
(
'success'
)
}
else
{
uni
.
removeStorageSync
(
'tokenHeaders'
)
this
.
$refs
.
popupPhone
.
open
();
}
}
})
}
})
},
onCancle
(){
this
.
$refs
.
popupPhone
.
close
()
...
...
pages/cleanManage/cleanManage.vue
View file @
7a9b8b0e
<
template
>
<view
class=
"clean-manage"
>
<view
class=
"card-box
bg-white-box
"
>
<view
class=
"card-box"
>
<view
class=
"flex-row title-box"
>
<
text
class=
"cuIcon-title text-pink text-lg"
></text
>
<text
class=
"text-title text-
bold text-xl
"
>
我的保洁
</text>
<
!--
<text
class=
"cuIcon-title text-pink text-lg"
></text>
--
>
<text
class=
"text-title text-
lg
"
>
我的保洁
</text>
</view>
<view
class=
"item-box"
>
<view
class=
"item-box"
:style=
"
{background:'url('+assetsPath+'/clean_list_bg.png) 0 0 / 100% 100% no-repeat'}"
>
<view
class=
"item"
@
tap=
"onNavToInfo"
>
<view
class=
"icon-box"
>
<image
:src=
"assetsPath+'/clean_
icon
.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/clean_
list_1
.png'"
mode=
"widthFix"
></image>
</view>
<text
class=
"text-
white text-bold
text-lg"
>
开始保洁
</text>
<text
class=
"text-
black
text-lg"
>
开始保洁
</text>
</view>
<view
class=
"item"
@
tap=
"onNavToList"
>
<view
class=
"icon-box"
>
<image
:src=
"assetsPath+'/
order_icon
.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/
clean_list_2
.png'"
mode=
"widthFix"
></image>
</view>
<text
class=
"text-
white text-bold
text-lg"
>
保洁记录
</text>
<text
class=
"text-
black
text-lg"
>
保洁记录
</text>
</view>
</view>
</view>
<view
class=
"card-box"
>
<view
class=
"flex-row title-box"
>
<
text
class=
"cuIcon-title text-pink text-lg"
></text
>
<text
class=
"text-title text-
bold text-xl
"
>
负责门店
</text>
<
!--
<text
class=
"cuIcon-title text-pink text-lg"
></text>
--
>
<text
class=
"text-title text-
lg
"
>
负责门店
</text>
</view>
</view>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"card-box
bg-white-box
"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"card-box"
>
<view
class=
"store-info"
>
<view
class=
"flex-row"
>
<view
class=
"part-left"
>
<image
class=
"img"
:src=
"hostUrl+item.images"
mode=
"aspectFill"
></image>
</view>
<view
class=
"flex-col part-right"
>
<view
class=
"flex-between"
>
<text
class=
"text-title text-lg
"
>
{{
item
.
name
}}
</text>
<text
class=
"text-black text-bold text-xl
"
>
{{
item
.
name
}}
</text>
<image
:src=
"assetsPath+'/map_icon.png'"
mode=
"widthFix"
@
tap=
"onNavLocation(item)"
></image>
</view>
<view
class=
"flex-row"
>
<image
:src=
"assetsPath+'/location_icon.png'"
mode=
"widthFix"
></image>
<view
class=
""
>
<text
class=
"text-gray"
>
{{
item
.
address
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"flex-row color-list-box"
>
<view
v-for=
"(vals, i) in colorList"
:key=
"i"
class=
"flex-1 flex-row"
>
<view
class=
"block-box"
:style=
"
{background: vals.color}">
</view>
<text>
{{
vals
.
label
}}
</text>
</view>
</view>
</view>
<view
class=
"room-box"
>
<view
v-for=
"(val,k) in item.roolList"
:key=
'k'
class=
"room-item"
:class=
"val.status==3?'bg-blue':val.status==2?'bg-red':'bg-gray'"
@
tap=
'onNavSearch(val)'
>
<view
v-for=
"(val,k) in item.roolList"
:key=
'k'
class=
"room-item"
:class=
"
{marginLeft: k%4 == 0, marginRight: k%4 == 3}" @tap='onNavSearch(val)'>
<view
class=
"room-stauts"
>
<text
:style=
"
{color: colorEnum[val.colorStatus] }">
{{
statusEnum
[
val
.
colorStatus
]
}}
</text>
<image
class=
"img"
:src=
"assetsPath+'/avatar_no.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"room-name"
>
<text>
{{
val
.
name
}}
</text>
</view>
<!--
<view
class=
"room-name"
>
<text>
{{
val
.
roomName
}}
</text>
</view>
-->
<view
class=
"room-stauts margin-top"
>
<text>
{{
[
0
,
1
].
includes
(
val
.
recordsStatus
)?
cleanStatusEnum
[
val
.
recordsStatus
]:
statusEnum
[
val
.
status
]
}}
</text>
</view>
</view>
</view>
...
...
@@ -72,13 +92,49 @@
data
()
{
return
{
assetsPath
:
config
.
assetsPath
,
hostUrl
:
config
.
hostUrl
,
list
:[],
statusEnum
:{
0
:
'空闲中'
,
1
:
'使用中'
,
2
:
'待保洁'
,
3
:
'保洁中'
2
:
'维护中'
,
3
:
'待保洁'
,
4
:
'保洁中'
},
colorEnum
:{
0
:
"#6fc544"
,
1
:
"#e7a646"
,
2
:
"#4aa3ff"
,
3
:
"#ff494e"
,
4
:
"#ff49ef"
},
colorList
:[
{
label
:
"空闲中"
,
status
:
0
,
color
:
"#6fc544"
},
{
label
:
"使用中"
,
status
:
1
,
color
:
"#e7a646"
},
{
label
:
"维护中"
,
status
:
2
,
color
:
"#4aa3ff"
},
{
label
:
"待保洁"
,
status
:
3
,
color
:
"#ff494e"
},
{
label
:
"保洁中"
,
status
:
4
,
color
:
"#ff49ef"
}
],
cleanStatusEnum
:{}
};
},
...
...
@@ -105,7 +161,18 @@
getListStore
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
code
===
200
){
this
.
list
=
res
.
data
.
data
&&
res
.
data
.
data
.
length
?
res
.
data
.
data
:[]
let
list
=
res
.
data
.
data
&&
res
.
data
.
data
.
length
?
res
.
data
.
data
:[];
this
.
list
=
list
.
map
(
item
=>
{
return
{
...
item
,
roolList
:
item
.
roolList
.
length
?
item
.
roolList
.
map
(
val
=>
{
return
{
...
val
,
colorStatus
:
val
.
recordsStatus
>=
0
&&
val
.
recordsStatus
===
0
?
3
:
val
.
recordsStatus
>=
0
&&
val
.
recordsStatus
===
1
?
4
:
val
.
status
}
}):[]
}
})
}
})
},
...
...
@@ -162,38 +229,38 @@
display
:
flex
;
flex-direction
:
column
;
border-radius
:
20
upx
;
width
:
9
4
%
;
margin-top
:
24
upx
;
width
:
9
2
%
;
margin-top
:
10
upx
;
}
.title-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin
:
24
upx
;
margin
:
10
upx
0
;
}
.item-box
{
display
:
flex
;
flex-direction
:
row
;
width
:
100%
;
padding
:
0
1%
;
height
:
150
rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
5
rpx
25
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
18
rpx
;
.item{
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
align-items
:
center
;
width
:
23%
;
margin
:
10
upx
1%
30
upx
1%
;
background
:
rgba
(
255
,
72
,
255
,
0.45
);
border-radius
:
20
upx
;
padding
:
20
upx
0
;
justify-content
:
center
;
.icon-box{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
80%
;
width
:
60
upx
;
margin-bottom
:
12
upx
;
image{
display
:
block
;
width
:
6
0%
;
width
:
10
0%
;
max-height
:
124
upx
;
}
}
...
...
@@ -204,20 +271,63 @@
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
border
-bottom
:
1px
solid
#e5e5e5
;
padding
:
30
upx
20
upx
;
border
:
1px
solid
#e5e5e5
;
padding
:
18
upx
20
upx
;
margin-bottom
:
12
upx
;
border-radius
:
20
upx
;
.part-left{
width
:
142
upx
;
height
:
128
upx
;
border-radius
:
12
upx
;
margin-right
:
20
upx
;
overflow
:
hidden
;
.img{
height
:
100%
;
max-width
:
200
upx
;
}
}
.part-right
{
display
:
flex
;
flex
:
1
;
.flex-between{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
image{
display
:
block
;
width
:
8
0
upx
;
width
:
5
0
upx
;
max-width
:
140
upx
;
border-radius
:
25
upx
;
}
}
.flex-row
{
display
:
flex
;
flex
:
1
;
flex-direction
:
row
;
align-items
:
center
;
image{
width
:
24
upx
;
max-height
:
50
upx
;
}
}
}
.color-list-box
{
margin-top
:
12
upx
;
.flex-row{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
.block-box{
display
:
flex
;
width
:
12px
;
height
:
12px
;
border-radius
:
4
upx
;
margin-right
:
8
upx
;
}
}
}
}
.bg-white-box
{
background-color
:
#ffffff
;
}
...
...
@@ -225,16 +335,45 @@
display
:
flex
;
flex-wrap
:
wrap
;
width
:
100%
;
padding
:
0
1%
;
.room-item{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
width
:
30%
;
margin
:
12
upx
1.6%
;
padding
:
30
upx
0
;
border-radius
:
20
upx
;
width
:
23.5%
;
margin
:
12
upx
1%
;
.room-stauts{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100%
;
//
height
:
138
rpx
;
background
:
#FFFFFF
;
border
:
1px
solid
#EEE6E3
;
border-radius
:
8
rpx
;
text{
margin
:
10
upx
0
4
upx
;
}
.img
{
display
:
block
;
width
:
64%
;
max-height
:
240
upx
;
}
}
.room-name
{
margin-top
:
20
upx
;
text{
font-size
:
32
rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
}
}
.marginLeft
{
margin-left
:
0
;
}
.marginRight
{
margin-right
:
0
;
}
}
</
style
>
pages/index/index.vue
View file @
7a9b8b0e
...
...
@@ -275,15 +275,12 @@
onLoad
(
option
)
{
// 隐藏原生的tabbar
uni
.
hideTabBar
();
this
.
onCheckUserLogi
n
();
this
.
$refs
.
loginPop
.
ope
n
();
this
.
onGetDicts
()
// this.$refs.popup.open()
// this.$refs.loginPop.open()
},
methods
:
{
onGetSysConfig
(){
systemConfig
().
then
(
res
=>
{
console
.
log
(
res
,
909090
)
uni
.
setStorage
({
key
:
'sysConfig'
,
data
:
res
.
data
.
rows
...
...
@@ -306,26 +303,6 @@
})
// }
},
onCheckUserLogin
(){
wx
.
login
({
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
type
===
"login"
)
{
uni
.
setStorageSync
(
'tokenHeaders'
,
"Authori-zation"
)
uni
.
setStorage
({
key
:
uni
.
getStorageSync
(
'tokenHeaders'
),
data
:
res
.
data
.
data
.
token
})
}
else
{
uni
.
removeStorageSync
(
'tokenHeaders'
)
this
.
$refs
.
loginPop
.
open
();
}
}
})
}
})
},
onLoading
()
{
// uni.getSetting({
// complete: (res) => {
...
...
@@ -349,10 +326,10 @@
uni
.
setStorageSync
(
"latitude"
,
res
.
latitude
)
uni
.
setStorageSync
(
"longitude"
,
res
.
longitude
)
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
'获取位置信息失败'
})
//
uni.showToast({
//
icon: "none",
//
title: '获取位置信息失败'
//
})
this
.
$refs
.
popup
.
open
()
}
uni
.
removeStorage
({
...
...
@@ -472,9 +449,12 @@
uni
.
openSetting
({
scope
:
"scope.userLocation"
,
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
if
(
res
.
authSetting
[
'scope.userLocation'
]){
this
.
onClose
();
this
.
onLoading
()
}
}
})
},
onPreview
(
val
){
...
...
pages/share/share.vue
View file @
7a9b8b0e
...
...
@@ -5,9 +5,11 @@
<tki-qrcode
ref=
"qrcode"
:cid=
"cid"
:val=
"text"
:size=
"size"
unit=
"upx"
:icon=
"iconUrl"
:iconSize=
"24"
:onval=
"true"
:loadMake=
"loadMake"
:showLoading=
"false"
@
result=
"qrR"
/>
</view>
<view
class=
"info"
>
<view
v-if=
"orderInfo"
class=
"info"
>
<view
class=
"room-name"
>
<text
class=
"text-white text-bold text-xxl"
>
{{
orderInfo
.
name
||
'一帆风顺(111)[中包]'
}}
</text>
<text
class=
"text-white"
>
{{
orderInfo
.
storeName
}}
</text>
<text
class=
"text-white text-bold text-xxl"
>
{{
orderInfo
.
roomName
}}
【
{{
orderInfo
.
roomTypeName
}}
】
</text>
<text
class=
"text-white text-xl"
>
{{
orderInfo
.
consumerName
}}
-
{{
orderInfo
.
consumerPhone
}}
预定
</text>
</view>
<view
class=
"store-name"
>
<text
class=
"icon cuIcon-location text-white text-xl"
></text>
<text
class=
"text text-white text-lg"
>
{{
orderInfo
.
address
||
'武汉市汉阳区龙阳大道商业街110号'
}}
</text>
...
...
@@ -28,20 +30,23 @@
</view>
</view>
</view>
<LoginPop
ref=
"loginPop"
@
success=
"onLoading"
/>
</view>
</
template
>
<
script
>
import
LoginPop
from
"@/components/login/login"
import
tkiQrcode
from
"@/components/tki-qrcode/tki-qrcode"
import
{
getOrderInfoByNo
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
{
openDoor
}
from
"@/api/order.js"
import
iconUrl
from
"@/static/
cart.png"
import
{
openDoor
}
from
"@/api/order.js"
;
import
iconUrl
from
"@/static/
logo_icon.png"
;
export
default
{
components
:
{
tkiQrcode
tkiQrcode
,
LoginPop
},
data
()
{
return
{
...
...
@@ -54,7 +59,7 @@
colorDark
:
'#000000'
,
colorLight
:
'#ffffff'
,
orderNo
:
''
,
orderInfo
:
{}
,
orderInfo
:
''
,
};
},
filters
:{
...
...
@@ -63,6 +68,9 @@
}
},
onLoad
(
query
)
{
uni
.
showLoading
({
title
:
'加载中'
})
if
(
query
&&
query
.
q
){
const
q
=
decodeURIComponent
(
query
.
q
)
// 获取到二维码原始链接内容
if
(
q
){
...
...
@@ -71,7 +79,7 @@
}
else
{
this
.
orderNo
=
query
.
orderNo
}
this
.
onLoading
();
this
.
$refs
.
loginPop
.
open
();
},
onShareAppMessage
()
{
return
{
...
...
@@ -83,7 +91,8 @@
methods
:
{
onLoading
()
{
getOrderInfoByNo
(
this
.
orderNo
).
then
(
res
=>
{
console
.
log
(
res
,
909090
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
){
this
.
orderInfo
=
{
...
res
.
data
.
data
,
startDate
:
res
.
data
.
data
.
preStartDate
.
split
(
" "
)[
0
],
...
...
@@ -93,6 +102,7 @@
payTime
:
moment
(
res
.
data
.
data
.
payTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
this
.
text
=
"https://www.coujio.com/wx-share?orderNo="
+
this
.
orderNo
}
})
},
qrR
(
r
)
{
...
...
@@ -158,9 +168,11 @@
.room-name
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
padding
:
30
upx
0
;
padding
:
20
upx
0
10
upx
;
}
.store-name
{
...
...
@@ -169,7 +181,7 @@
justify-content
:
center
;
align-items
:
center
;
width
:
90%
;
padding
:
30
upx
0
;
padding
:
10
upx
0
20
upx
;
.text{
text-decoration
:
underline
;
}
...
...
static/logo_icon.png
0 → 100644
View file @
7a9b8b0e
13.4 KB
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