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
fb561fe3
Commit
fb561fe3
authored
Aug 21, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
793bf38d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
28 deletions
+51
-28
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+2
-1
orderSubPackage/pages/orderInfo/index.vue
+1
-0
orderSubPackage/pages/settlement/index.vue
+48
-27
No files found.
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
fb561fe3
...
...
@@ -172,10 +172,11 @@ export default {
if
(
item
.
state
==
1
)
{
item
.
rules
.
forEach
(
rule
=>
{
this
.
available
.
push
(
rule
.
ruleId
)
item
.
ruleIds
.
push
(
rule
.
ruleId
)
})
}
})
console
.
log
(
this
.
selected
,
skus
)
}
this
.
$nextTick
(()
=>
{
this
.
buildGoods
(
e
=>
{
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
fb561fe3
...
...
@@ -239,6 +239,7 @@ export default {
// 从结算进入
console
.
log
(
from
)
if
(
from
===
'settlement'
){
uni
.
setStorageSync
(
'shopCarInfo'
,[])
this
.
backToMneu
=
true
}
// 从订阅消息进入
...
...
orderSubPackage/pages/settlement/index.vue
View file @
fb561fe3
...
...
@@ -119,10 +119,14 @@ import Menu from '@/request/menu'
import
User
from
'@/request/user'
import
Order
from
'@/request/order'
export
default
{
onHide
()
{
this
.
goods
=
{}
},
onShow
()
{
this
.
goods
=
uni
.
getStorageSync
(
'goodsList'
)
||
[];
console
.
log
(
'show'
,
this
.
goods
)
if
(
JSON
.
stringify
(
this
.
goods
)
!=
"{}"
)
{
// this.goods = uni.getStorageSync('goodsList') || {};
// setTimeout(() => {
console
.
log
(
'onshow'
,
this
.
returnFlag
,
uni
.
getStorageSync
(
'shopCarInfo'
))
if
((
JSON
.
stringify
(
this
.
goods
)
!=
"{}"
)
&&!
this
.
returnFlag
)
{
Order
.
getWaitTine
({
shopId
:
uni
.
getStorageSync
(
'shopData'
).
id
,
goods
:
this
.
goods
...
...
@@ -132,22 +136,16 @@ export default {
}
else
{
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
}
// }, 1000);
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
},
async
onLoad
(
option
)
{
console
.
log
(
'onload'
)
// 清除优惠卷信息
this
.
$store
.
commit
(
"cleanInfo"
,{})
const
{
data
}
=
await
User
.
getUserMsgInfo
()
console
.
log
(
data
)
const
{
data
:
newdata
}
=
data
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
){
User
.
wxLoginAndGetOpenid
(
true
).
then
(
loginInfo
=>
{
this
.
loginInfo
=
loginInfo
...
...
@@ -155,6 +153,9 @@ export default {
}
// 商品详情页点击立即支付进入
if
(
option
.
goodsList
)
{
console
.
log
(
'详情进入'
)
this
.
returnFlag
=
false
this
.
getMessageFlag
()
const
shopData
=
uni
.
getStorageSync
(
'shopData'
);
this
.
shopData
=
shopData
this
.
buyType
=
3
;
...
...
@@ -170,6 +171,10 @@ export default {
const
{
q
}
=
option
;
// console.log(q);
if
(
q
)
{
console
.
log
(
'扫码进入'
)
this
.
returnFlag
=
false
this
.
getMessageFlag
()
this
.
saveGetTicket
()
User
.
getLocation
((
state
,
params
)
=>
{
uni
.
removeStorageSync
(
'shopCarInfo'
);
$EventBus
.
$emit
(
'updateCar'
);
...
...
@@ -191,22 +196,26 @@ export default {
}
// 购物车点击进入
const
shopData
=
uni
.
getStorageSync
(
'shopData'
);
this
.
shopData
=
shopData
this
.
buyType
=
3
;
const
shopCarInfo
=
uni
.
getStorageSync
(
'shopCarInfo'
)
||
[]
this
.
goods
=
shopCarInfo
.
filter
(
item
=>
item
.
flag
);
// Order.getWaitTine({
// shopId: uni.getStorageSync('shopData').id,
// goods: this.goods
// }).then(({ data }) => {
// this.duration = data.data
// })
this
.
saveGetTicket
()
if
(
uni
.
getStorageSync
(
'shopCarInfo'
).
length
!=
0
)
{
console
.
log
(
'购物车进入'
)
this
.
returnFlag
=
false
this
.
getMessageFlag
()
console
.
log
(
uni
.
getStorageSync
(
'shopCarInfo'
))
const
shopData
=
uni
.
getStorageSync
(
'shopData'
);
this
.
shopData
=
shopData
this
.
buyType
=
3
;
const
shopCarInfo
=
uni
.
getStorageSync
(
'shopCarInfo'
)
||
[]
this
.
goods
=
shopCarInfo
.
filter
(
item
=>
item
.
flag
);
console
.
log
(
this
.
goods
)
this
.
saveGetTicket
()
return
}
},
data
()
{
return
{
returnFlag
:
true
,
messageList
:[
{
tmp
:
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
...
...
@@ -257,6 +266,7 @@ export default {
return
this
.
$store
.
getters
.
Authorization
;
},
totalNum
()
{
if
(
JSON
.
stringify
(
this
.
goods
)
==
'{}'
)
return
0
let
totalNum
=
0
;
this
.
goods
.
map
(
item
=>
{
item
.
flag
?
totalNum
+=
item
.
num
:
totalNum
+=
0
...
...
@@ -264,6 +274,7 @@ export default {
return
totalNum
},
reduction
()
{
if
(
JSON
.
stringify
(
this
.
goods
)
==
'{}'
)
return
0
let
price
=
0
;
let
discountNum
=
0
;
this
.
goods
.
forEach
(
item
=>
{
...
...
@@ -279,8 +290,8 @@ export default {
return
(
price
-
discountNum
).
toFixed
(
2
)
},
amountOld
()
{
if
(
JSON
.
stringify
(
this
.
goods
)
==
'{}'
)
return
0
let
totalPrice
=
0
;
this
.
goods
.
forEach
(
item
=>
{
const
sku
=
item
.
sku
;
item
.
flag
?
totalPrice
+=
(
item
.
num
*
sku
.
discount
)
:
(
totalPrice
+=
0
)
...
...
@@ -289,8 +300,8 @@ export default {
return
totalPrice
.
toFixed
(
2
)
},
totalPrice
()
{
if
(
JSON
.
stringify
(
this
.
goods
)
==
'{}'
)
return
0
let
totalPrice
=
0
;
this
.
goods
.
forEach
(
item
=>
{
const
sku
=
item
.
sku
;
item
.
flag
?
totalPrice
+=
(
item
.
num
*
sku
.
discount
)
:
(
totalPrice
+=
0
)
...
...
@@ -302,6 +313,16 @@ export default {
}
},
methods
:
{
async
getMessageFlag
()
{
const
{
data
}
=
await
User
.
getUserMsgInfo
()
console
.
log
(
data
)
const
{
data
:
newdata
}
=
data
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
)):
''
},
cancleMessage
()
{
this
.
messagePopup
=
false
this
.
sendMsgData
=
{
...
...
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