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
d1353277
Commit
d1353277
authored
Nov 21, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
2eb426bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
20 deletions
+165
-20
index.js
api/index.js
+5
-0
toolBox.vue
components/toolBox/toolBox.vue
+16
-2
index.vue
pages/index/index.vue
+14
-3
myInfo.vue
pages/my/myInfo.vue
+128
-5
index.vue
pages/payRecord/index.vue
+2
-10
No files found.
api/index.js
View file @
d1353277
...
...
@@ -42,6 +42,11 @@ export const dictList=()=>{
return
http
.
get
(
url
)
}
export
const
systemConfig
=
()
=>
{
let
url
=
`/system/config/list`
return
http
.
get
(
url
,{
pageNum
:
1
,
pageSize
:
100
})
}
//上传文件
export
const
uploadFile
=
(
data
)
=>
{
console
.
log
(
data
,
"我要上传文件"
)
...
...
components/toolBox/toolBox.vue
View file @
d1353277
...
...
@@ -41,7 +41,8 @@
}
],
timer
:
null
,
orderInfo
:{}
orderInfo
:{},
servicePhone
:
''
};
},
watch
:{
...
...
@@ -64,8 +65,21 @@
},
methods
:{
onGetSysConfig
(){
let
sysConfigList
=
uni
.
getStorageSync
(
'sysConfig'
)
let
s
=
sysConfigList
.
find
(
item
=>
item
.
configKey
===
'wechat.customer.service.phone'
)
if
(
s
){
this
.
servicePhone
=
s
.
configValue
;
uni
.
makePhoneCall
({
phoneNumber
:
this
.
servicePhone
})
}
},
onHandle
(
val
,
index
){
console
.
log
(
val
,
index
)
if
(
index
===
3
){
this
.
onGetSysConfig
()
return
};
if
([
0
,
1
].
includes
(
index
)){
this
.
onGetOrderByAvailable
(
index
)
return
...
...
pages/index/index.vue
View file @
d1353277
...
...
@@ -121,7 +121,8 @@
import
LoginPop
from
"@/components/login/login"
import
{
login
,
dictList
dictList
,
systemConfig
}
from
"@/api/index.js"
;
import
{
getListStore
...
...
@@ -193,6 +194,7 @@
}
},
onShow
()
{
this
.
onGetSysConfig
();
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
...
...
@@ -203,8 +205,8 @@
roomVoList
:
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
facilities
:
Array
.
isArray
(
item
.
facilities
)
?
item
.
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
:
[]
...
...
@@ -234,6 +236,15 @@
// this.$refs.loginPop.open()
},
methods
:
{
onGetSysConfig
(){
systemConfig
().
then
(
res
=>
{
console
.
log
(
res
,
909090
)
uni
.
setStorage
({
key
:
'sysConfig'
,
data
:
res
.
data
.
rows
})
})
},
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
...
...
pages/my/myInfo.vue
View file @
d1353277
...
...
@@ -53,25 +53,25 @@
</view>
<view
class=
"main"
>
<view
class=
"cu-list menu card-menu sm-border margin-top"
>
<view
class=
"cu-item arrow"
>
<view
class=
"cu-item arrow"
@
tap=
"onHandle(1)"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/cart.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-grey"
>
客服咨询
</text>
</view>
</view>
<view
class=
"cu-item arrow"
>
<view
class=
"cu-item arrow"
@
tap=
"onHandle(2)"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/cart.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-grey"
>
WIFI连接
</text>
</view>
</view>
<view
class=
"cu-item arrow"
>
<view
class=
"cu-item arrow"
@
tap=
"onHandle(3)"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/cart.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-grey"
>
全国门店
</text>
</view>
</view>
<view
class=
"cu-item arrow"
>
<view
class=
"cu-item arrow"
@
tap=
"onHandle(4)"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/cart.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-grey"
>
联系我们
</text>
...
...
@@ -87,6 +87,29 @@
</view>
-->
<LoginPop
ref=
"loginPop"
@
success=
"onCheckUserLogin"
/>
<f-tabbar></f-tabbar>
<uni-popup
ref=
"popup"
type=
"bottom"
maskClick=
"false"
>
<view
class=
"popup-content"
>
<view
class=
"flex-between title-box"
>
<text
class=
"text-black text-bold text-xl"
>
无线WIFI
</text>
<text
class=
"cuIcon-roundclose text-gray text-xxl"
@
tap=
"onClose"
></text>
</view>
<view
class=
"flex-col"
>
<view
class=
"text"
>
<text
class=
"text-title text-xl"
>
wifi名称:
</text>
<text
class=
"text-title text-xxl"
>
{{
wifiData
.
name
}}
</text>
</view>
<view
class=
"text"
>
<text
class=
"text-title text-xl"
>
wifi名称:
</text>
<text
class=
"text-title text-xxl"
>
{{
wifiData
.
password
}}
</text>
</view>
</view>
<view
class=
"box-btn"
>
<button
class=
"cu-btn line-pink lg"
@
tap=
"onCopy"
>
复制密码
</button>
<button
class=
"cu-btn bg-pink lg"
@
tap=
'onConnectWifi'
>
一键连接
</button>
</view>
</view>
</uni-popup>
</view>
</
template
>
...
...
@@ -136,10 +159,16 @@
type
:
""
,
show
:
false
}
]
],
wifiData
:{
name
:
""
,
password
:
''
},
servicePhone
:
''
}
},
onShow
()
{
this
.
onGetSysConfig
();
this
.
onCheckUserLogin
();
},
onLoad
()
{
...
...
@@ -147,6 +176,19 @@
uni
.
hideTabBar
();
},
methods
:
{
onGetSysConfig
(){
let
sysConfigList
=
uni
.
getStorageSync
(
'sysConfig'
)
let
wifi
=
sysConfigList
.
find
(
item
=>
item
.
configKey
===
'wechat.wifi'
)
if
(
wifi
){
let
w
=
wifi
.
configValue
.
split
(
';'
)
this
.
wifiData
.
name
=
w
[
0
];
this
.
wifiData
.
password
=
w
[
1
];
}
let
s
=
sysConfigList
.
find
(
item
=>
item
.
configKey
===
'wechat.customer.service.phone'
)
if
(
s
){
this
.
servicePhone
=
s
.
configValue
}
},
onCheckUserLogin
()
{
let
tokenHeaders
=
uni
.
getStorageSync
(
"tokenHeaders"
);
console
.
log
(
tokenHeaders
,
909090
)
...
...
@@ -195,6 +237,49 @@
})
}
},
onHandle
(
val
){
if
(
val
==
1
){
uni
.
makePhoneCall
({
phoneNumber
:
this
.
servicePhone
})
}
else
if
(
val
==
2
){
this
.
$refs
.
popup
.
open
()
}
else
if
(
val
===
3
){
uni
.
navigateTo
({
url
:
'/pages/storeList/storeList'
})
}
},
onClose
(){
this
.
$refs
.
popup
.
close
()
},
onCopy
(){
uni
.
setClipboardData
({
data
:
this
.
wifiData
.
password
})
},
onConnectWifi
(){
uni
.
connectWifi
({
SSID
:
this
.
wifiData
.
name
,
BSSID
:
this
.
wifiData
.
name
,
password
:
this
.
wifiData
.
password
,
success
:
()
=>
{
uni
.
showToast
({
icon
:
"none"
,
title
:
'连接成功'
})
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
err
.
errMsg
})
},
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
}
})
},
// 退出登录,解除手机号与当前微信的绑定
onLoginOut
(){
uni
.
showLoading
({
...
...
@@ -338,4 +423,41 @@
height
:
100%
;
border-radius
:
50%
;
}
.popup-content
{
display
:
flex
;
flex-direction
:
column
;
width
:
100vw
;
min-height
:
40vh
;
background-color
:
#f1f1f1
;
border-radius
:
20
upx
20
upx
0
0
;
.title-box{
padding
:
30
upx
20
upx
0
20
upx
;
align-items
:
center
;
.cuIcon-roundclose{
font-size
:
68
upx
;
}
}
.flex-col
{
display
:
flex
;
flex
:
1
;
width
:
100%
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.text{
width
:
60%
;
margin
:
10
upx
0
;
}
}
.box-btn
{
display
:
flex
;
flex-direction
:
row
;
padding
:
30
upx
0
;
justify-content
:
center
;
align-items
:
center
;
.cu-btn{
margin
:
0
5%
;
}
}
}
</
style
>
\ No newline at end of file
pages/payRecord/index.vue
View file @
d1353277
...
...
@@ -3,22 +3,14 @@
<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"
>
<view
class=
""
>
<text>
{{
item
.
payType
==
1
?
'微信支付'
:
'余额支付'
}}
:
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
payPrice
}}
元
</text>
<text
class=
"text-title"
>
{{
item
.
name
}}
:
</text>
</view>
<view
class=
"flex-row"
>
<text
>
{{
item
.
orderType
==
1
?
'房间预定'
:
'房间续订'
}}
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
payPrice
}}
元
</text>
</view>
</view>
<view
class=
"flex-row part-1"
>
<text>
订单编号:
</text>
<text>
{{
item
.
orderNo
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<text>
创建时间:
</text>
<text>
{{
item
.
createTime
}}
</text>
...
...
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