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