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
c85fc765
Commit
c85fc765
authored
Aug 22, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
fb561fe3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
23 deletions
+37
-23
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+21
-8
orderSubPackage/pages/coupon/index.vue
+2
-2
orderSubPackage/pages/orderInfo/index.vue
+1
-0
orderSubPackage/pages/settlement/index.vue
+12
-12
pages/menu/menu.vue
+1
-1
No files found.
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
c85fc765
...
...
@@ -23,13 +23,15 @@
<view
v-for=
"specItem in goodInfo.specs"
:key=
"specItem.specId"
>
<div
class=
"good-spec-name"
>
{{
specItem
.
specName
}}
</div>
<view
class=
"good-spec-rule"
>
<div
v-for=
"specItemRule in specItem.rules"
class=
"div_item"
:key=
"specItemRule.ruleId"
@
click=
"selectRoles(specItemRule, specItem)"
>
<div
v-for=
"specItemRule in specItem.rules"
:key=
"specItemRule.ruleId"
@
click=
"selectRoles(specItemRule, specItem)"
>
<div
v-if=
"ShowIt(specItemRule.ruleId)"
class=
"div_item"
>
<div
v-if=
"specItemRule.isRecommend=='1'"
:class=
"[UseIt(specItemRule.ruleId)?'disabledStyle':'']"
class=
"default"
></div>
<button
class=
"good-spec-rule-item"
:disabled=
"UseIt(specItemRule.ruleId)"
:class=
"
{ active: isActvie(specItemRule) }">
<view
@
click
.
prevent=
"checkSku(specItemRule)"
>
{{
specItemRule
.
ruleName
}}
</view>
</button>
</div>
</div>
</view>
</view>
</view>
...
...
@@ -104,6 +106,7 @@ export default {
BottomSafeHeight
:
0
,
Utils
,
shopState
:
true
,
showSku
:[]
}
},
onShow
()
{
...
...
@@ -154,14 +157,15 @@ export default {
},
initInfo
(
goodsInfo
){
this
.
available
=
[]
this
.
showSku
=
[]
this
.
selected
=
[]
const
skus
=
goodsInfo
.
skus
;
if
(
skus
)
{
const
sku
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
0
&&
v
.
state
==
1
);
this
.
skusDefault
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
);
this
.
skusSellout
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
1
)
const
sku
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
(
v
.
state
==
1
&&
v
.
isDelete
===
0
))
||
skus
.
find
(
v
=>
v
.
isDefault
==
0
&&
(
v
.
state
==
1
&&
v
.
isDelete
===
0
)
);
this
.
skusDefault
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
isDelete
===
0
);
this
.
skusSellout
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
(
v
.
state
==
1
&&
v
.
isDelete
===
0
)
)
||
skus
.
find
(
v
=>
(
v
.
state
==
1
&&
v
.
isDelete
===
0
)
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
isDelete
===
0
)
||
skus
[
0
]
if
(
sku
){
this
.
selected
.
push
(...
sku
.
rules
)
...
...
@@ -169,14 +173,20 @@ export default {
this
.
selected
=
[]
};
skus
.
forEach
(
item
=>
{
if
(
item
.
isDelete
===
0
)
{
item
.
rules
.
forEach
(
rule
=>
{
this
.
showSku
.
push
(
rule
.
ruleId
)
})
}
})
skus
.
forEach
(
item
=>
{
if
(
item
.
state
==
1
)
{
item
.
rules
.
forEach
(
rule
=>
{
this
.
available
.
push
(
rule
.
ruleId
)
item
.
ruleIds
.
push
(
rule
.
ruleId
)
})
}
})
console
.
log
(
this
.
selected
,
skus
)
console
.
log
(
this
.
selected
,
this
.
showSku
)
}
this
.
$nextTick
(()
=>
{
this
.
buildGoods
(
e
=>
{
...
...
@@ -363,6 +373,9 @@ export default {
},
UseIt
(
ruleId
)
{
return
this
.
available
.
indexOf
(
ruleId
)
==
-
1
&&
this
.
shopState
},
ShowIt
(
ruleId
)
{
return
this
.
showSku
.
indexOf
(
ruleId
)
!==
-
1
}
},
computed
:
{
...
...
orderSubPackage/pages/coupon/index.vue
View file @
c85fc765
...
...
@@ -27,8 +27,8 @@
</view>
<view
class=
"usebtn"
v-if=
"canuse.length!=0&¤t===0"
>
<view
class=
"content"
>
<view
class=
"text"
v-if=
"price!=0"
>
已选1张HOOLOO
卷
,可优惠
<span
class=
"money"
>
¥
{{
price
}}
</span></view>
<view
class=
"text"
v-else
>
暂未选择HOOLOO优惠
卷
</view>
<view
class=
"text"
v-if=
"price!=0"
>
已选1张HOOLOO
券
,可优惠
<span
class=
"money"
>
¥
{{
price
}}
</span></view>
<view
class=
"text"
v-else
>
暂未选择HOOLOO优惠
券
</view>
<view>
<view
class=
"btnView"
@
click=
"setTickcet"
>
确认
</view>
</view>
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
c85fc765
...
...
@@ -140,6 +140,7 @@ export default {
this
.
initData
(
option
)
},
onShow
()
{
uni
.
setStorageSync
(
'allow'
,
true
)
uni
.
setStorageSync
(
'goodsList'
,{})
this
.
backToMneu
=
false
},
...
...
orderSubPackage/pages/settlement/index.vue
View file @
c85fc765
...
...
@@ -120,13 +120,16 @@ import User from '@/request/user'
import
Order
from
'@/request/order'
export
default
{
onHide
()
{
console
.
log
(
'onHide--------'
,
this
.
cleanFlag
,
'this.cleanFlag'
)
if
(
this
.
cleanFlag
)
{
this
.
goods
=
{}
}
},
onShow
()
{
// this.goods = uni.getStorageSync('goodsList') || {}
;
// setTimeout(() => {
console
.
log
(
'onshow'
,
this
.
returnFlag
,
uni
.
getStorageSync
(
'shopCarInfo'
))
if
((
JSON
.
stringify
(
this
.
goods
)
!=
"{}"
)
&&!
this
.
returnFlag
)
{
const
allow
=
uni
.
getStorageSync
(
'allow'
)
;
console
.
log
(
'onshow-----------'
,
allow
,
'allow'
)
if
(
allow
)
{
if
((
JSON
.
stringify
(
this
.
goods
)
!=
"{}"
)
)
{
Order
.
getWaitTine
({
shopId
:
uni
.
getStorageSync
(
'shopData'
).
id
,
goods
:
this
.
goods
...
...
@@ -136,13 +139,12 @@ export default {
}
else
{
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
}
// }, 1000);
}
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
},
async
onLoad
(
option
)
{
uni
.
setStorageSync
(
'allow'
,
true
)
console
.
log
(
'onload'
)
// 清除优惠卷信息
this
.
$store
.
commit
(
"cleanInfo"
,{})
...
...
@@ -154,7 +156,6 @@ export default {
// 商品详情页点击立即支付进入
if
(
option
.
goodsList
)
{
console
.
log
(
'详情进入'
)
this
.
returnFlag
=
false
this
.
getMessageFlag
()
const
shopData
=
uni
.
getStorageSync
(
'shopData'
);
this
.
shopData
=
shopData
...
...
@@ -172,7 +173,6 @@ export default {
// console.log(q);
if
(
q
)
{
console
.
log
(
'扫码进入'
)
this
.
returnFlag
=
false
this
.
getMessageFlag
()
this
.
saveGetTicket
()
User
.
getLocation
((
state
,
params
)
=>
{
...
...
@@ -198,7 +198,6 @@ 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'
);
...
...
@@ -206,7 +205,6 @@ export default {
this
.
buyType
=
3
;
const
shopCarInfo
=
uni
.
getStorageSync
(
'shopCarInfo'
)
||
[]
this
.
goods
=
shopCarInfo
.
filter
(
item
=>
item
.
flag
);
console
.
log
(
this
.
goods
)
this
.
saveGetTicket
()
return
}
...
...
@@ -215,7 +213,7 @@ export default {
},
data
()
{
return
{
returnFlag
:
tru
e
,
cleanFlag
:
fals
e
,
messageList
:[
{
tmp
:
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
...
...
@@ -463,6 +461,7 @@ export default {
},
//结算组装数据发起订单
async
saveReserve
(
val
=
{})
{
uni
.
setStorageSync
(
'allow'
,
false
)
// 组装购物车数据或者立即支付数据
let
list
=
[];
if
(
this
.
payType
==
'1'
)
{
...
...
@@ -500,6 +499,7 @@ export default {
if
(
orderInfo
&&
orderInfo
.
data
.
code
==
200
)
{
// const {}
await
Menu
.
requestPayment
(
orderInfo
.
data
.
data
,
res
,
this
.
buyType
);
this
.
cleanFlag
=
true
}
else
{
}
...
...
pages/menu/menu.vue
View file @
c85fc765
...
...
@@ -125,7 +125,7 @@ export default {
created
()
{
let
platform
=
uni
.
getSystemInfoSync
().
platform
;
uni
.
downloadFile
({
url
:
'http
://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966
.mp4'
,
//仅为示例,并非真实的资源
url
:
'http
s://hooloo-dev-api.gdatac.com/resources/menu
.mp4'
,
//仅为示例,并非真实的资源
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
console
.
log
(
res
);
...
...
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