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
4e1f3211
Commit
4e1f3211
authored
Aug 11, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成下单授权接口调整
parent
f20aca34
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
51 deletions
+102
-51
components/ImageLoader/index.vue
+28
-4
orderSubPackage/pages/settlement/index.vue
+42
-36
pages/menu/menu.vue
+17
-8
request/index.js
+0
-2
request/user/index.js
+15
-1
static/imgs/20220720-115535_001.png
+0
-0
No files found.
components/ImageLoader/index.vue
View file @
4e1f3211
<
template
>
<
template
>
<view>
<view
class=
"bnox"
>
<image
class=
"default-img"
:style=
"
{'height':!loadOver?height:0,'width':!loadOver?width:0}" :src="defaultSrc"/>
<image
class=
"default-img"
v-if=
"!show"
:style=
"
{'height':height,'width':width}" :src="defaultSrc"/>
<image
class=
"real-img"
@
load=
"loadOverFunction"
:style=
"
{'height':loadOver?height:0,'width':loadOver?width:0}" :src="realSrc" />
<view
class=
"videoView"
>
<video
autoplay
muted
:enable-progress-gesture=
"false"
:controls=
"false"
loop
class=
"real-img"
:style=
"
{'height':height,'width':width}" :src="realSrc" />
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:[
'defaultSrc'
,
'realSrc'
,
'width'
,
'height'
],
props
:[
'defaultSrc'
,
'realSrc'
,
'width'
,
'height'
],
watch
:{
realSrc
(
val
){
if
(
val
){
setTimeout
(()
=>
{
this
.
show
=
true
},
5000
);
}
}
},
data
(){
data
(){
return
{
return
{
loadOver
:
false
loadOver
:
false
,
show
:
false
}
}
},
},
methods
:
{
methods
:
{
...
@@ -22,5 +34,16 @@ export default {
...
@@ -22,5 +34,16 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.videoView
{
z-index
:
1
;
}
.bnox
{
position
:
relative
;
.default-img
{
position
:
absolute
;
z-index
:
2
;
}
}
</
style
>
</
style
>
\ No newline at end of file
orderSubPackage/pages/settlement/index.vue
View file @
4e1f3211
...
@@ -131,14 +131,18 @@ export default {
...
@@ -131,14 +131,18 @@ export default {
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
},
},
onLoad
(
option
)
{
async
onLoad
(
option
)
{
// 清除优惠卷信息
// 清除优惠卷信息
this
.
$store
.
commit
(
"cleanInfo"
,{})
this
.
$store
.
commit
(
"cleanInfo"
,{})
setTimeout
(()
=>
{
const
{
data
}
=
await
User
.
getUserMsgInfo
()
this
.
msgInfo
.
sendMsgFlag1
=
''
console
.
log
(
data
)
this
.
msgInfo
.
flagExpireData
=
''
const
{
data
:
newdata
}
=
data
},
1000
);
const
{
flagExpireDate
,
sendMsgFlag1
=
''
,
sendMsgFlag2
=
''
,
sendMsgFlag3
=
''
}
=
newdata
this
.
sendMsgData
.
sendMsgFlag1
=
sendMsgFlag1
this
.
sendMsgData
.
sendMsgFlag2
=
sendMsgFlag2
this
.
sendMsgData
.
sendMsgFlag3
=
sendMsgFlag3
this
.
sendMsgData
.
flagExpireData
=
flagExpireDate
?
Date
.
parse
(
flagExpireDate
.
substring
(
0
,
10
)):
''
if
(
!
this
.
userms
){
if
(
!
this
.
userms
){
User
.
wxLoginAndGetOpenid
(
true
).
then
(
loginInfo
=>
{
User
.
wxLoginAndGetOpenid
(
true
).
then
(
loginInfo
=>
{
...
@@ -203,17 +207,17 @@ export default {
...
@@ -203,17 +207,17 @@ export default {
{
{
tmp
:
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
tmp
:
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
title
:
'下单成功通知'
,
title
:
'下单成功通知'
,
status
:
fals
e
status
:
tru
e
},
},
{
{
tmp
:
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
tmp
:
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
title
:
'订单状态变更通知'
,
title
:
'订单状态变更通知'
,
status
:
fals
e
status
:
tru
e
},
},
{
{
tmp
:
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
,
tmp
:
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
,
title
:
'取餐提醒'
,
title
:
'取餐提醒'
,
status
:
fals
e
status
:
tru
e
}
}
],
],
saveFlag
:
false
,
saveFlag
:
false
,
...
@@ -232,6 +236,11 @@ export default {
...
@@ -232,6 +236,11 @@ export default {
ticketNum
:
0
,
ticketNum
:
0
,
msgInfo
:{
msgInfo
:{
},
sendMsgData
:
{
sendMsgFlag1
:
false
,
sendMsgFlag2
:
false
,
sendMsgFlag3
:
false
}
}
}
}
},
},
...
@@ -295,26 +304,14 @@ export default {
...
@@ -295,26 +304,14 @@ export default {
},
},
// 保存用户通知授权信息
// 保存用户通知授权信息
async
submitMessage
()
{
async
submitMessage
()
{
const
sendData
=
{
sendMsgFlag1
:
false
,
sendMsgFlag2
:
false
,
sendMsgFlag3
:
false
,
saveFlag
:
this
.
saveFlag
}
this
.
messageList
.
forEach
((
item
,
index
)
=>
{
this
.
messageList
.
forEach
((
item
,
index
)
=>
{
send
Data
[
`sendMsgFlag
${
index
+
1
}
`
]
=
item
.
status
this
.
sendMsg
Data
[
`sendMsgFlag
${
index
+
1
}
`
]
=
item
.
status
})
})
let
{
data
}
=
await
User
.
setAllow
({...
this
.
sendMsgData
,
rememberFlag
:
this
.
saveFlag
})
// let a = await User.setAllow(sendData)
// console.log(a)
this
.
messagePopup
=
false
this
.
messagePopup
=
false
if
(
data
.
code
===
200
){
this
.
saveReserve
()
this
.
saveReserve
()
}
},
},
changeContentFlag
(
index
)
{
changeContentFlag
(
index
)
{
this
.
messageList
[
index
].
status
=
!
this
.
messageList
[
index
].
status
this
.
messageList
[
index
].
status
=
!
this
.
messageList
[
index
].
status
...
@@ -349,18 +346,23 @@ export default {
...
@@ -349,18 +346,23 @@ export default {
},
},
messageAndSave
()
{
messageAndSave
()
{
let
needChoseMsg
=
true
let
needChoseMsg
=
true
const
{
sendMsgFlag1
,
flagExpireData
}
=
this
.
msgInfo
const
{
sendMsgFlag1
,
flagExpireData
}
=
this
.
sendMsgData
if
(
!
sendMsgFlag1
&&!
flagExpireData
){
const
HasMessageFlag
=
JSON
.
stringify
(
sendMsgFlag1
)
==
'true'
||
JSON
.
stringify
(
sendMsgFlag1
)
==
'false'
?
true
:
true
if
(
!
HasMessageFlag
&&!
flagExpireData
){
console
.
log
(
'用户从未选择过授权信息,弹框'
)
needChoseMsg
=
true
needChoseMsg
=
true
}
else
{
}
else
{
if
(
!
flagExpireData
&&
sendMsgFlag1
){
if
(
!
flagExpireData
&&
HasMessageFlag
){
console
.
log
(
'用户已经永久授权信息,不弹框'
)
needChoseMsg
=
false
needChoseMsg
=
false
}
else
if
(
flagExpireData
<
new
Date
().
valueOf
()){
}
else
if
(
flagExpireData
<
new
Date
().
valueOf
()){
console
.
log
(
'用户授权了信息没保存超过七天了,弹框'
)
needChoseMsg
=
true
needChoseMsg
=
true
}
else
{
console
.
log
(
'用户授权了信息没保存没超过七天,不弹框'
)
needChoseMsg
=
false
}
}
}
}
console
.
log
(
needChoseMsg
)
if
(
needChoseMsg
)
{
if
(
needChoseMsg
)
{
this
.
messagePopup
=
true
this
.
messagePopup
=
true
}
else
{
}
else
{
...
@@ -444,9 +446,13 @@ export default {
...
@@ -444,9 +446,13 @@ export default {
// sendMsgFlag1:下单成功通知
// sendMsgFlag1:下单成功通知
// sendMsgFlag2:订单状态变更通知
// sendMsgFlag2:订单状态变更通知
// sendMsgFlag3:取餐提醒
// sendMsgFlag3:取餐提醒
const
sendMsgFlag1
=
val
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
]?
1
:
0
const
{
sendMsgFlag1
,
const
sendMsgFlag2
=
val
[
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
]?
1
:
0
sendMsgFlag2
,
const
sendMsgFlag3
=
val
[
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
]?
1
:
0
sendMsgFlag3
}
=
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
)
{
...
@@ -457,9 +463,9 @@ export default {
...
@@ -457,9 +463,9 @@ export default {
paidAmount
:
amount
,
paidAmount
:
amount
,
lat
,
lat
,
lng
,
lng
,
sendMsgFlag1
,
sendMsgFlag1
:
sendMsgFlag1N
,
sendMsgFlag2
,
sendMsgFlag2
:
sendMsgFlag2N
,
sendMsgFlag3
sendMsgFlag3
:
sendMsgFlag3N
}
}
if
(
JSON
.
stringify
(
this
.
selectCoupon
)
!=
"{}"
){
if
(
JSON
.
stringify
(
this
.
selectCoupon
)
!=
"{}"
){
sendData
.
couponId
=
this
.
selectCoupon
.
id
||
''
,
sendData
.
couponId
=
this
.
selectCoupon
.
id
||
''
,
...
...
pages/menu/menu.vue
View file @
4e1f3211
<
template
>
<
template
>
<view
class=
"menu-box"
>
<view
class=
"menu-box"
>
<view
class=
"menu-banner"
:style=
"
{'height':buied?'360rpx':'450rpx'}">
<view
class=
"menu-banner"
:style=
"
{'height':buied?'360rpx':'450rpx'}">
<
image
:src=
"img"
/
>
<
!--
<image
:src=
"img"
/>
--
>
<
!--
<ImageLoader
:defaultSrc=
"'../../static/imgs/shouyezhanweitu.png'"
:realSrc=
"img"
width=
"100%"
height=
"400rpx"
/>
--
>
<
ImageLoader
:defaultSrc=
"'../../static/imgs/shouyezhanweitu.png'"
:realSrc=
"img"
width=
"100%"
height=
"400rpx"
/
>
<!--
<video
autoplay
muted
loop
:controls=
"false"
:enable-progress-gesture=
"false"
objectFit=
'cover'
src=
"http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4"
/>
-->
<!--
<video
autoplay
muted
loop
:controls=
"false"
:enable-progress-gesture=
"false"
objectFit=
'cover'
src=
"http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4"
/>
-->
<!--
<HomeBanner
/>
-->
<!--
<HomeBanner
/>
-->
<view
class=
"shop-info"
:style=
"'top:100rpx'"
>
<view
class=
"shop-info"
:style=
"'top:100rpx'"
>
<view
class=
"shop-box"
>
<view
class=
"shop-box"
>
<text
@
click=
"showArea"
class=
"shop-name"
>
{{
shopInfo
.
name
}}
</text>
<text
@
click=
"showArea"
class=
"shop-name"
>
{{
shopInfo
.
name
}}
</text>
<image
class=
"arrow-right-select"
:src=
"'../../static/imgs/jiantoubai.png'"
/>
<image
class=
"arrow-right-select"
:src=
"'../../static/imgs/jiantoubai.png'"
/>
</view>
</view>
...
@@ -97,11 +97,20 @@ export default {
...
@@ -97,11 +97,20 @@ export default {
},
},
created
()
{
created
()
{
let
platform
=
uni
.
getSystemInfoSync
().
platform
;
let
platform
=
uni
.
getSystemInfoSync
().
platform
;
if
(
platform
==
'android'
){
uni
.
downloadFile
({
this
.
img
=
'../../static/imgs/shouyezhanweitu.png'
url
:
'http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4'
,
//仅为示例,并非真实的资源
}
else
{
success
:
(
res
)
=>
{
this
.
img
=
'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif'
if
(
res
.
statusCode
===
200
)
{
}
console
.
log
(
res
);
this
.
img
=
res
.
tempFilePath
}
}
});
// if(platform == 'android'){
// this.img = '../../static/imgs/shouyezhanweitu.png'
// }else{
// this.img = 'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif'
// }
},
},
onLoad
:
async
function
()
{
onLoad
:
async
function
()
{
uni
.
getSetting
({
uni
.
getSetting
({
...
...
request/index.js
View file @
4e1f3211
...
@@ -46,10 +46,8 @@ module.exports = (vm) => {
...
@@ -46,10 +46,8 @@ module.exports = (vm) => {
let
Authorization
=
uni
.
getStorageSync
(
`Authorization`
);
let
Authorization
=
uni
.
getStorageSync
(
`Authorization`
);
const
configUrl
=
[
const
configUrl
=
[
'/weixin/login'
,
'/weixin/login'
,
'/weixin/getShop'
,
'/weixin/infoByShop'
,
'/weixin/infoByShop'
,
'/application/getData'
,
'/application/getData'
,
'/weixin/getArea'
,
];
];
if
(
Authorization
&&
configUrl
.
indexOf
(
config
.
url
)
==
-
1
)
{
if
(
Authorization
&&
configUrl
.
indexOf
(
config
.
url
)
==
-
1
)
{
config
.
header
.
Authorization
=
Authorization
;
config
.
header
.
Authorization
=
Authorization
;
...
...
request/user/index.js
View file @
4e1f3211
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
});
});
},
},
setAllow
(
params
)
{
setAllow
(
params
)
{
uni
.
$u
.
http
return
uni
.
$u
.
http
.
post
(
'/system/customer/allow'
,
params
)
.
post
(
'/system/customer/allow'
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
return
res
;
return
res
;
...
@@ -168,4 +168,18 @@ export default {
...
@@ -168,4 +168,18 @@ export default {
return
err
return
err
});
});
},
},
// 获取用户订阅消息
getUserMsgInfo
(
params
)
{
return
uni
.
$u
.
http
.
get
(
'/system/customer/detail'
)
.
then
((
res
)
=>
{
return
res
;
})
.
catch
((
err
)
=>
{
const
{
data
}
=
err
const
{
msg
}
=
data
context
.
showToast
({
title
:
msg
,
icon
:
'none'
});
return
err
});
}
};
};
static/imgs/20220720-115535_001.png
deleted
100644 → 0
View file @
f20aca34
89.2 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