Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
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
hooloo
mp
user
Commits
793bf38d
Commit
793bf38d
authored
Aug 21, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复订阅消息跳转问题
parent
9995ec5b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
46 deletions
+54
-46
orderSubPackage/pages/coupon/index.vue
+13
-1
orderSubPackage/pages/orderInfo/index.vue
+5
-6
orderSubPackage/pages/settlement/index.vue
+35
-38
request/index.js
+1
-1
No files found.
orderSubPackage/pages/coupon/index.vue
View file @
793bf38d
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
<swiper
:current=
"current"
class=
"swiper"
@
change=
"swiperChange"
>
<swiper
:current=
"current"
class=
"swiper"
@
change=
"swiperChange"
>
<swiper-item>
<swiper-item>
<view
class=
"list"
v-if=
"canuse.length!=0"
>
<view
class=
"list"
v-if=
"canuse.length!=0"
>
<scroll-view
class=
"A"
scroll-y
>
<Ticket
v-for=
"(item,index) in canuse"
:key=
"index"
:info=
"item"
:indexValue=
"index+1===canuse.length"
type=
"use"
@
updata=
"updata"
/>
<Ticket
v-for=
"(item,index) in canuse"
:key=
"index"
:info=
"item"
:indexValue=
"index+1===canuse.length"
type=
"use"
@
updata=
"updata"
/>
</scroll-view>
</view>
</view>
<view
class=
"emty"
v-else
>
<view
class=
"emty"
v-else
>
<view
class=
"text"
>
暂无可用优惠券
</view>
<view
class=
"text"
>
暂无可用优惠券
</view>
...
@@ -13,7 +15,9 @@
...
@@ -13,7 +15,9 @@
</swiper-item>
</swiper-item>
<swiper-item>
<swiper-item>
<view
class=
"list"
v-if=
"cantuse.length!=0"
>
<view
class=
"list"
v-if=
"cantuse.length!=0"
>
<scroll-view
class=
"A"
scroll-y
>
<Ticket
v-for=
"(item,index) in cantuse"
:key=
"index"
:info=
"item"
type=
"use"
/>
<Ticket
v-for=
"(item,index) in cantuse"
:key=
"index"
:info=
"item"
type=
"use"
/>
</scroll-view>
</view>
</view>
<view
class=
"emty"
v-else
>
<view
class=
"emty"
v-else
>
<view
class=
"text"
>
暂无不可用优惠券
</view>
<view
class=
"text"
>
暂无不可用优惠券
</view>
...
@@ -142,8 +146,16 @@ export default {
...
@@ -142,8 +146,16 @@ export default {
//
margin-bottom
:
176
rpx
;
//
margin-bottom
:
176
rpx
;
.swiper
{
.swiper
{
background
:
#F8F8F8
;
background
:
#F8F8F8
;
height
:
calc
(
100vh
-
64
rpx
);
height
:
calc
(
100vh
-
90
rpx
);
.list{
.list{
.A
{
max-height
:
calc
(
100vh
-
90
rpx
);
overflow-y
:
scroll
;
}
.B
{
max-height
:
calc
(
100vh
-
90
rpx
);
overflow-y
:
scroll
;
}
height
:
100
%;
height
:
100
%;
padding
:
0rpx
32rpx
;
padding
:
0rpx
32rpx
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
793bf38d
...
@@ -140,11 +140,12 @@ export default {
...
@@ -140,11 +140,12 @@ export default {
this
.
initData
(
option
)
this
.
initData
(
option
)
},
},
onShow
()
{
onShow
()
{
uni
.
setStorageSync
(
'goodsList'
,{})
this
.
backToMneu
=
false
this
.
backToMneu
=
false
},
},
onUnload
(){
//
onUnload(){
this
.
goBack
()
//
this.goBack()
},
//
},
data
()
{
data
()
{
return
{
return
{
orderInfo
:
{},
orderInfo
:
{},
...
@@ -242,10 +243,8 @@ export default {
...
@@ -242,10 +243,8 @@ export default {
}
}
// 从订阅消息进入
// 从订阅消息进入
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
)
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
)
console
.
log
(
this
.
userms
,
'userms'
)
console
.
log
(
this
.
Authorization
,
'Authorization'
)
if
(
orderId
){
if
(
orderId
){
if
(
!
this
.
userms
&&!
this
.
Authorization
){
if
(
!
Authorization
){
this
.
backFlag
=
true
this
.
backFlag
=
true
uni
.
switchTab
({
url
:
'/pages/order/order'
})
uni
.
switchTab
({
url
:
'/pages/order/order'
})
return
return
...
...
orderSubPackage/pages/settlement/index.vue
View file @
793bf38d
...
@@ -129,6 +129,8 @@ export default {
...
@@ -129,6 +129,8 @@ export default {
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
this
.
duration
=
data
.
data
this
.
duration
=
data
.
data
})
})
}
else
{
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
}
}
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
...
@@ -358,34 +360,33 @@ export default {
...
@@ -358,34 +360,33 @@ export default {
}
else
{
}
else
{
if
(
this
.
agreeTerms
)
uni
.
setStorageSync
(
'TermsStatus'
,
true
)
if
(
this
.
agreeTerms
)
uni
.
setStorageSync
(
'TermsStatus'
,
true
)
}
}
let
needChoseMsg
=
true
//
let needChoseMsg = true
const
{
sendMsgFlag1
,
flagExpireData
}
=
this
.
sendMsgData
//
const { sendMsgFlag1, flagExpireData } = this.sendMsgData
const
HasMessageFlag
=
JSON
.
stringify
(
sendMsgFlag1
)
==
'true'
||
JSON
.
stringify
(
sendMsgFlag1
)
==
'false'
?
true
:
false
//
const HasMessageFlag = JSON.stringify(sendMsgFlag1)=='true'||JSON.stringify(sendMsgFlag1)=='false'?true:false
if
(
!
HasMessageFlag
&&!
flagExpireData
){
//
if(!HasMessageFlag&&!flagExpireData){
console
.
log
(
'用户从未选择过授权信息,弹框'
)
//
console.log('用户从未选择过授权信息,弹框')
needChoseMsg
=
true
//
needChoseMsg = true
}
else
{
//
}else{
if
(
!
flagExpireData
&&
HasMessageFlag
){
//
if(!flagExpireData&&HasMessageFlag){
console
.
log
(
'用户已经永久授权信息,不弹框'
)
//
console.log('用户已经永久授权信息,不弹框')
needChoseMsg
=
false
//
needChoseMsg = false
}
else
if
(
flagExpireData
<
new
Date
().
valueOf
()){
//
}else if(flagExpireData
<
new
Date
().
valueOf
()){
console
.
log
(
'用户授权了信息没保存超过七天了,弹框'
)
//
console.log('用户授权了信息没保存超过七天了,弹框')
needChoseMsg
=
true
//
needChoseMsg = true
}
else
{
//
}else{
console
.
log
(
'用户授权了信息没保存没超过七天,不弹框'
)
//
console.log('用户授权了信息没保存没超过七天,不弹框')
needChoseMsg
=
false
//
needChoseMsg = false
}
//
}
}
//
}
if
(
needChoseMsg
)
{
//
if(needChoseMsg) {
this
.
messagePopup
=
true
//
this.messagePopup = true
}
else
{
//
}else{
this
.
saveReserve
()
//
this.saveReserve()
}
//
}
return
//
return
const
tmpid
=
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
]
const
tmpid
=
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
]
const
val
=
{}
const
val
=
{}
wx
.
requestSubscribeMessage
({
wx
.
requestSubscribeMessage
({
// 'Oq_zfRWRXijvXenRmfD2PARgpvdYlbkjR4laxKmBqb0'
tmplIds
:
tmpid
,
tmplIds
:
tmpid
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
const
finalValue
=
Object
.
values
(
res
).
indexOf
(
'reject'
)
const
finalValue
=
Object
.
values
(
res
).
indexOf
(
'reject'
)
...
@@ -394,10 +395,10 @@ export default {
...
@@ -394,10 +395,10 @@ export default {
})
})
if
(
finalValue
===-
1
){
if
(
finalValue
===-
1
){
uni
.
setStorageSync
(
'isMessage'
,
'true'
)
uni
.
setStorageSync
(
'isMessage'
,
'true'
)
User
.
setAllow
(
1
)
//
User.setAllow(1)
this
.
saveReserve
(
val
)
this
.
saveReserve
(
val
)
}
else
{
}
else
{
User
.
setAllow
(
2
)
//
User.setAllow(2)
this
.
saveReserve
(
val
)
this
.
saveReserve
(
val
)
}
}
},
},
...
@@ -406,7 +407,7 @@ export default {
...
@@ -406,7 +407,7 @@ export default {
val
[
item
]
=
false
val
[
item
]
=
false
})
})
console
.
log
(
err
);
console
.
log
(
err
);
User
.
setAllow
(
2
)
//
User.setAllow(2)
this
.
saveReserve
(
val
)
this
.
saveReserve
(
val
)
}
}
})
})
...
@@ -453,13 +454,9 @@ export default {
...
@@ -453,13 +454,9 @@ export default {
// sendMsgFlag1:下单成功通知
// sendMsgFlag1:下单成功通知
// sendMsgFlag2:订单状态变更通知
// sendMsgFlag2:订单状态变更通知
// sendMsgFlag3:取餐提醒
// sendMsgFlag3:取餐提醒
const
{
sendMsgFlag1
,
const
sendMsgFlag1
=
val
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
]?
1
:
0
sendMsgFlag2
,
const
sendMsgFlag2
=
val
[
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
]?
1
:
0
sendMsgFlag3
const
sendMsgFlag3
=
val
[
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
]?
1
:
0
}
=
this
.
sendMsgData
const
sendMsgFlag1N
=
sendMsgFlag1
?
1
:
0
const
sendMsgFlag2N
=
sendMsgFlag2
?
1
:
0
const
sendMsgFlag3N
=
sendMsgFlag3
?
1
:
0
let
res
=
await
Utils
.
AssemblyOrder
(
this
.
shopData
,
this
.
totalPrice
,
this
.
totalNum
,
this
.
buyType
,
list
);
let
res
=
await
Utils
.
AssemblyOrder
(
this
.
shopData
,
this
.
totalPrice
,
this
.
totalNum
,
this
.
buyType
,
list
);
if
(
res
)
{
if
(
res
)
{
...
@@ -470,9 +467,9 @@ export default {
...
@@ -470,9 +467,9 @@ export default {
paidAmount
:
amount
,
paidAmount
:
amount
,
lat
,
lat
,
lng
,
lng
,
sendMsgFlag1
:
sendMsgFlag1N
,
sendMsgFlag1
,
sendMsgFlag2
:
sendMsgFlag2N
,
sendMsgFlag2
,
sendMsgFlag3
:
sendMsgFlag3N
sendMsgFlag3
}
}
if
(
JSON
.
stringify
(
this
.
selectCoupon
)
!=
"{}"
){
if
(
JSON
.
stringify
(
this
.
selectCoupon
)
!=
"{}"
){
sendData
.
couponId
=
this
.
selectCoupon
.
id
||
''
,
sendData
.
couponId
=
this
.
selectCoupon
.
id
||
''
,
...
...
request/index.js
View file @
793bf38d
...
@@ -25,7 +25,7 @@ module.exports = (vm) => {
...
@@ -25,7 +25,7 @@ module.exports = (vm) => {
config
.
method
=
'POST'
;
config
.
method
=
'POST'
;
// 设置为json,返回后会对数据进行一次JSON.parse()
// 设置为json,返回后会对数据进行一次JSON.parse()
config
.
dataType
=
'json'
;
config
.
dataType
=
'json'
;
config
.
timeout
=
3000
;
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
config
.
timeout
=
3000
0
;
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
// 配置请求头信息
// 配置请求头信息
config
.
header
=
{
config
.
header
=
{
'Content-Type'
:
'application/json'
,
// 'application/x-www-form-urlencoded'
'Content-Type'
:
'application/json'
,
// 'application/x-www-form-urlencoded'
...
...
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