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
21dda5d3
Commit
21dda5d3
authored
Nov 05, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
db1d5468
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
26 deletions
+99
-26
myInfo.vue
pages/my/myInfo.vue
+66
-20
order.vue
pages/order/order.vue
+20
-3
orderResult.vue
pages/orderResult/orderResult.vue
+13
-3
No files found.
pages/my/myInfo.vue
View file @
21dda5d3
...
...
@@ -120,14 +120,25 @@
</view>
</view>
<view
v-if=
"userInfo && userInfo.secondaryCardList && userInfo.secondaryCardList.length"
class=
"flex-3"
>
<text
class=
"text-1"
>
次卡
</text>
<view
v-if=
"monthlyCard.status || secondaryCard.status"
class=
"flex-3"
>
<text
class=
"text-2"
>
权益会员专享
</text>
<view
class=
"flex-row"
>
<text
class=
"text-3"
>
还剩
</text>
<text
class=
"text-4"
>
{{
userInfo
.
secondaryCardList
[
0
].
number
}}
</text>
<text
class=
"text-3"
>
张
</text>
</view>
<view
class=
"flex-1 flex-col"
>
<view
v-if=
"secondaryCard.status"
class=
"flex-row-center"
>
<text
class=
"text-1"
>
次卡
</text>
<view
class=
"flex-row"
>
<text
class=
"text-3"
>
还剩
</text>
<text
class=
"text-4"
>
{{
secondaryCard
.
number
}}
</text>
<text
class=
"text-3"
>
张
</text>
</view>
</view>
<view
v-if=
"monthlyCard.status"
class=
"flex-row-center"
>
<text
class=
"text-1"
>
月卡
</text>
<view
class=
"flex-row"
>
<text
v-if=
"monthlyCard.status==1"
class=
"text-3"
>
今日待使用
</text>
<text
v-else-if=
"monthlyCard.status==2"
class=
"text-3"
>
明日待使用
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
@@ -484,6 +495,7 @@
equityMembersList
,
createEquityMembers
}
from
"@/api/userInfo.js"
;
import
moment
from
"../../common/moment"
;
export
default
{
components
:
{
...
...
@@ -558,7 +570,14 @@
},
list
:
''
,
consumerMemberStatus
:
false
,
loginStatus
:
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
loginStatus
:
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
,
monthlyCard
:{
status
:
0
,
},
secondaryCard
:{
status
:
0
,
number
:
0
}
}
},
onShow
()
{
...
...
@@ -566,7 +585,6 @@
this
.
onGetUserInfo
();
},
onLoad
(
query
)
{
console
.
log
(
query
,
"页面传递过来的参数"
)
if
(
query
.
q
)
{
const
q
=
decodeURIComponent
(
query
.
q
)
let
d
=
q
.
split
(
'?'
)
...
...
@@ -576,7 +594,6 @@
let
l
=
item
.
split
(
'='
);
obj
[
l
[
0
]]
=
l
[
1
];
})
console
.
log
(
obj
,
"参数对象"
)
if
(
obj
.
uid
)
{
uni
.
setStorageSync
(
"shareUserId"
,
obj
.
uid
)
}
...
...
@@ -646,7 +663,32 @@
if
(
this
.
userInfo
&&
this
.
userInfo
.
phone
){
this
.
userName
=
this
.
userInfo
.
phone
.
slice
(
-
4
);
}
console
.
log
(
this
.
userInfo
,
999999
)
if
(
this
.
userInfo
.
monthlyCardList
&&
this
.
userInfo
.
monthlyCardList
.
length
){
let
obj
=
this
.
userInfo
.
monthlyCardList
.
find
(
item
=>
{
return
moment
().
valueOf
()
<
moment
(
item
.
expirationDate
).
valueOf
()
})
if
(
obj
){
this
.
monthlyCard
.
status
=
1
;
if
(
obj
.
freeDuration
<=
0
){
this
.
monthlyCard
.
status
=
2
;
}
}
}
if
(
this
.
userInfo
.
secondaryCardList
&&
this
.
userInfo
.
secondaryCardList
.
length
){
let
list
=
this
.
userInfo
.
secondaryCardList
.
filter
(
item
=>
{
return
moment
().
valueOf
()
<
moment
(
item
.
expirationDate
).
valueOf
()
&&
item
.
number
>
0
})
if
(
list
&&
list
.
length
){
this
.
secondaryCard
.
status
=
1
;
let
num
=
0
;
list
.
forEach
(
val
=>
{
num
+=
val
.
number
})
this
.
secondaryCard
.
number
=
num
;
}
}
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
this
.
$forceUpdate
();
this
.
onGetOrderInfo
();
...
...
@@ -720,7 +762,6 @@
})
},
onNavToOrderRecord
(
val
=
0
){
console
.
log
(
val
,
9999
)
let
statusIndex
=
val
?
val
.
value
:
0
;
uni
.
setStorageSync
(
"statusIndex"
,
statusIndex
)
uni
.
switchTab
({
...
...
@@ -762,7 +803,6 @@
onNavByPath
(
pathName
){
if
(
pathName
===
'equityFundLog'
&&
!
(
this
.
userInfo
.
consumerMember
&&
this
.
userInfo
.
consumerMember
.
isRights
))
return
;
if
([
"levelDetail"
].
includes
(
pathName
)
&&
!
this
.
loginStatus
){
console
.
log
(
pathName
,
999999
)
this
.
$refs
.
loginPop
.
open
();
}
else
{
uni
.
navigateTo
({
...
...
@@ -884,7 +924,6 @@
})
},
qrR
(
r
)
{
console
.
log
(
r
,
"二维码路径"
)
this
.
qrPath
=
r
;
},
onShareByQrcode
(){
...
...
@@ -1455,7 +1494,7 @@
display
:
flex
;
align-items
:
center
;
height
:
100%
;
padding-right
:
20
upx
;
padding-right
:
12
upx
;
.tag-icon{
display
:
block
;
width
:
120
upx
;
...
...
@@ -1474,20 +1513,28 @@
border-radius
:
14
rpx
;
border
:
1px
solid
#FDD8B8
;
margin-left
:
20
upx
;
padding-left
:
20
upx
;
.flex-row-center{
margin-top
:
8
upx
;
justify-content
:
center
;
}
.text-1
{
font-weight
:
bolder
;
font-size
:
32
rpx
;
font-size
:
26
rpx
;
font-style
:
italic
;
color
:
#A3A3A3
;
background
:
linear-gradient
(
47deg
,
#FD7C01
0%
,
#FCAB00
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
margin-right
:
6
upx
;
}
.text-2
{
font-size
:
2
0
rpx
;
font-size
:
2
4
rpx
;
color
:
#985E39
;
margin-top
:
4
upx
;
margin
:
12
upx
0
0
12
upx
;
}
.flex-1
{
justify-content
:
center
;
padding-bottom
:
10
upx
;
}
.flex-row
{
display
:
flex
;
...
...
@@ -1499,7 +1546,6 @@
background
:
#FFEED9
;
border-radius
:
4
rpx
;
border
:
1px
solid
#E6A37F
;
margin-top
:
8
upx
;
.text-3{
font-size
:
18
rpx
;
color
:
#985E39
;
...
...
pages/order/order.vue
View file @
21dda5d3
...
...
@@ -220,7 +220,7 @@
<radio-group
class=
"radio-group"
>
<label
v-if=
"secondaryCardList.length"
class=
"flex-between"
@
tap=
"onRadioChange('secondaryCard')"
>
<view
class=
"flex-row-center"
>
<text>
次卡(剩余
{{
secondaryCard
List
[
0
]
.
number
}}
次)
</text>
<text>
次卡(剩余
{{
secondaryCard
.
number
}}
次)
</text>
</view>
<view
class=
"flex-row-center"
>
<text>
请选择
</text>
...
...
@@ -592,7 +592,11 @@
storeCleanDuration
:
getSysConfigValue
(
'StoreCleanDuration'
)?
Number
(
getSysConfigValue
(
'StoreCleanDuration'
)):
30
,
radioChecked
:
''
,
monthlyCardList
:[],
secondaryCardList
:[]
secondaryCardList
:[],
secondaryCard
:{
status
:
0
,
number
:
0
}
};
},
filters
:
{
...
...
@@ -1334,7 +1338,20 @@
}
if
(
this
.
userInfo
.
secondaryCardList
&&
res
.
data
.
data
&&
res
.
data
.
data
.
consumerSecondaryCard
&&
res
.
data
.
data
.
consumerSecondaryCard
.
length
){
this
.
secondaryCardList
=
this
.
userInfo
.
secondaryCardList
.
filter
(
item
=>
res
.
data
.
data
.
consumerSecondaryCard
.
includes
(
item
.
id
))
this
.
secondaryCardList
=
this
.
userInfo
.
secondaryCardList
.
filter
(
item
=>
res
.
data
.
data
.
consumerSecondaryCard
.
includes
(
item
.
id
));
let
list
=
this
.
userInfo
.
secondaryCardList
.
filter
(
item
=>
{
return
moment
().
valueOf
()
<
moment
(
item
.
expirationDate
).
valueOf
()
&&
item
.
number
>
0
})
if
(
list
&&
list
.
length
){
this
.
secondaryCard
.
status
=
1
;
let
num
=
0
;
list
.
forEach
(
val
=>
{
num
+=
val
.
number
})
this
.
secondaryCard
.
number
=
num
;
}
}
else
{
this
.
secondaryCardList
=
[];
}
...
...
pages/orderResult/orderResult.vue
View file @
21dda5d3
...
...
@@ -172,7 +172,7 @@
</
template
>
<
script
>
import
{
login
,
dictList
}
from
"@/api/index.js"
;
import
{
login
,
dictList
,
getUserInfo
}
from
"@/api/index.js"
;
import
{
getDictItem
,
getSysConfigValue
}
from
"@/utils/tools.js"
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
{
getOrderInfoByNo
,
orderRefund
,
openDoor
,
noLoginOpenDoor
,
noLoginGetOrderInfo
}
from
"@/api/order.js"
...
...
@@ -204,9 +204,8 @@
};
},
onLoad
(
option
)
{
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
this
.
orderNo
=
option
.
orderNo
;
this
.
onGetUserInfo
();
if
(
option
.
share
&&
option
.
share
==
"share"
){
this
.
shareOrder
=
true
this
.
onGetOrderInfo
()
...
...
@@ -228,6 +227,17 @@
}
},
methods
:{
onGetUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
userInfo
=
{
...
res
.
data
.
data
,
consumerWallet
:
res
.
data
.
data
.
consumerWallet
?
res
.
data
.
data
.
consumerWallet
:
{
remainingIntegral
:
0
}
}
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
}
})
},
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
...
...
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