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
9a2d8da5
Commit
9a2d8da5
authored
Feb 24, 2023
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成部分开发
parent
fd48b2da
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
243 additions
and
61 deletions
+243
-61
components/AreaPicker/index.vue
+1
-1
components/OrderQrCode/index.vue
+154
-11
components/menuAssembly/index.vue
+29
-19
components/shopCar/shopCar.vue
+3
-3
menuSubPackage/pages/areaSelect/areaSelect.vue
+19
-2
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+16
-13
orderSubPackage/pages/orderInfo/index.vue
+5
-11
pages/menu/menu.vue
+0
-0
request/menu/index.js
+15
-0
request/user/index.js
+1
-1
static/imgs/location_icon.png
+0
-0
static/js/qqmap-wx-jssdk.js
+0
-0
No files found.
components/AreaPicker/index.vue
View file @
9a2d8da5
...
...
@@ -4,6 +4,7 @@
@
cancel=
"show = false"
:show=
"show"
:immediateChange=
"true"
mode=
"region"
ref=
"uPicker"
:columns=
"columns"
@
confirm=
"confirm"
...
...
@@ -36,7 +37,6 @@ export default {
showArea
()
{
uni
.
getSetting
({
success
:
(
res
)
=>
{
// 已经授权位置不获取默认店铺
if
(
res
.
authSetting
[
'scope.userLocation'
])
{
User
.
getLocation
((
state
,
params
)
=>
{
console
.
log
(
"showArea, state:"
+
state
+
", params:"
+
JSON
.
stringify
(
params
));
...
...
components/OrderQrCode/index.vue
View file @
9a2d8da5
...
...
@@ -32,13 +32,44 @@
<div
class=
"close_icon"
@
click=
"close"
>
<u-icon
name=
"close-circle"
color=
"#666666"
size=
"28"
:top=
"-3"
></u-icon>
</div>
<div
class=
"code"
>
取单码
{{
orderInfo
.
orderNum
}}
</div>
<view
class=
"code"
>
<view
class=
"code_label"
>
取单号:
</view>
<view
class=
"code_content"
>
{{
orderInfo
.
orderNum
}}
</view>
</view>
<view
class=
"statusTip"
>
<view
class=
"tip_box"
>
<view
class=
"tip"
>
<view
class=
"icon"
>
<image
v-if=
"[1].indexOf(Number(orderInfo.state))!=-1"
mode=
"aspectFit"
:src=
"'/static/imgs/daizhizuo_action.png'"
/>
<image
v-else
mode=
"aspectFit"
:src=
"'/static/imgs/daizhizuo.png'"
/>
</view>
<view
:class=
"[1].indexOf(Number(orderInfo.state))!=-1?'tip_titile_action':'tip_tittle'"
>
1待制作
</view>
</view>
<view
class=
"tip"
>
<view
class=
"icon"
>
<image
v-if=
"[2, 3].indexOf(Number(orderInfo.state))!=-1"
mode=
"aspectFit"
:src=
"'/static/imgs/zhizuozhong_action.png'"
/>
<image
v-else
mode=
"aspectFit"
:src=
"'/static/imgs/zhizuozhong.png'"
/>
</view>
<view
:class=
"[2, 3].indexOf(Number(orderInfo.state))!=-1?'tip_titile_action':'tip_tittle'"
>
2制作中
</view>
</view>
<view
class=
"tip"
>
<view
class=
"icon"
>
<image
v-if=
"[4, 5].indexOf(Number(orderInfo.state))!=-1"
mode=
"aspectFit"
:src=
"'/static/imgs/wancheng_action.png'"
/>
<image
v-else
mode=
"aspectFit"
:src=
"'/static/imgs/wancheng.png'"
/>
</view>
<view
:class=
"[4, 5].indexOf(Number(orderInfo.state))!=-1?'tip_titile_action':'tip_tittle'"
>
3完成
</view>
</view>
</view>
</view>
<!--
<div
class=
"code"
>
取单码
{{
orderInfo
.
orderNum
}}
</div>
-->
<div
class=
"qr_code_readly"
>
<image
mode=
"scaleToFill"
:src=
"orderInfo.pickCode"
class=
"qr"
></image>
</div>
<div
class=
"ercodeTip"
>
制作完成后,扫描此二维码取杯。
</div>
<!--
<view
class=
"status_text"
v-if=
"showMask"
>
——制作完成后才能扫哦——
</view>
-->
<div
class=
"flow_describe"
>
<view
class=
"titleBox"
>
<
!--
<
view
class=
"titleBox"
>
<view
class=
"qrcodeTitle"
>
<view
class=
"title"
>
扫码流程
</view>
<view
class=
"icon"
>
...
...
@@ -51,11 +82,21 @@
<image
class=
"arrow"
:style=
"
{'height':'18rpx','width':'10rpx'}" :src="'../../static/imgs/jiantouhui.png'" />
</view>
</view>
</view>
</view>
-->
<image
:mode=
"'aspectFit'"
class=
"flow_img"
:src=
"'/static/imgs/saomaliucheng.png'"
></image>
</div>
<div
class=
"takeCupTip"
>
<div
class=
"text"
@
click=
"goShow()"
>
<view>
查看实景取杯演示
</view>
<image
class=
"arrow"
:style=
"
{ height: '18rpx', width: '10rpx' }"
:src="'/static/imgs/jiantouhui.png'"
/>
</div>
<!--
<div
class=
"btn"
@
click=
"refundInfo"
v-if=
"checkStatus(orderInfo.state, [12, 13, 14, 15])"
>
退款
</div>
-->
</div>
</div>
<div
class=
"flow_describe_tips"
>
<view
class=
"title"
>
注意事项
</view>
...
...
@@ -97,7 +138,6 @@ export default {
watch
:{
'show'
:{
handler
(
val
)
{
console
.
log
(
val
,
'wywy'
)
if
(
!
val
)
{
this
.
cleanTimeout
()
}
...
...
@@ -171,7 +211,7 @@ export default {
this
.
timer
=
setTimeout
(()
=>
{
this
.
getOrderInfo
()
clearTimeout
(
this
.
timer
)
},
2
000
);
},
5
000
);
}
this
.
orderInfo
=
{...
data
.
data
};
}
else
{
...
...
@@ -228,6 +268,108 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.takeCupTip
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
0
rpx
32
rpx
;
.text
{
font-size
:
28
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
display
:
flex
;
align-items
:
center
;
image
{
margin-left
:
10
rpx
;
}
}
.btn
{
border
:
1
rpx
solid
gray
;
border-radius
:
5
rpx
;
text-align
:
center
;
background
:
rgb
(
255
,
255
,
255
);
color
:
black
;
font-size
:
27
rpx
;
letter-spacing
:
5
rpx
;
line-height
:
64
rpx
;
width
:
180
rpx
;
}
}
.ercodeTip
{
margin
:
0
rpx
0
rpx
;
text-align
:
center
;
font-weight
:
bolder
;
font-size
:
30
rpx
;
}
.code
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-family
:
Futura
Medium
,
Arial
,
sans-serif
;
.code_label
{
margin-right
:
10
rpx
;
font-weight
:
900
;
font-size
:
45
rpx
;
color
:
#343434
;
}
.code_content
{
font-size
:
45
rpx
;
font-weight
:
800
;
letter-spacing
:
2
rpx
;
color
:
#0012ff
;
}
}
.statusTip
{
margin
:
30
rpx
0px
;
//
text-align
:
center
;
height
:
100
rpx
;
.tip_box
{
width
:
450
rpx
;
margin
:
0
auto
;
height
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.tip
{
height
:
100%
;
width
:
100
rpx
;
.icon
{
width
:
60
rpx
;
height
:
60
rpx
;
margin
:
5
rpx
auto
;
image
{
width
:
100%
;
height
:
100%
;
transform
:
scale
(
1.4
)
rotate
(
0deg
)
}
}
.tip_tittle
{
margin-top
:
10
rpx
;
text-align
:
center
;
font-size
:
25
rpx
;
color
:
rgb
(
151
,
151
,
151
);
}
.tip_titile_action
{
margin-top
:
10
rpx
;
text-align
:
center
;
font-weight
:
bolder
;
font-size
:
25
rpx
;
}
}
}
}
.pages
{
padding-top
:
1
rpx
;
padding-bottom
:
30
rpx
;
...
...
@@ -288,7 +430,7 @@ export default {
margin
:
32
rpx
;
position
:
relative
;
padding-top
:
54
rpx
;
padding-bottom
:
6
2
rpx
;
padding-bottom
:
3
2
rpx
;
.status_text
{
font-size
:
28
rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
...
...
@@ -305,10 +447,10 @@ export default {
}
.qr_code_readly
{
margin
:
20
rpx
auto
;
margin-top
:
38
rpx
;
margin-bottom
:
66
rpx
;
width
:
4
74.6
rpx
;
height
:
4
76
rpx
;
margin-top
:
50
rpx
;
margin-bottom
:
30
rpx
;
width
:
4
50
rpx
;
height
:
4
50
rpx
;
.qr
{
width
:
100%
;
height
:
100%
;
...
...
@@ -344,6 +486,7 @@ export default {
width
:
100%
;
height
:
300
rpx
;
padding-left
:
31
rpx
;
margin-top
:
20
rpx
;
.titleBox
{
display
:
flex
;
...
...
components/menuAssembly/index.vue
View file @
9a2d8da5
...
...
@@ -71,8 +71,8 @@
</view>
<view
@
click=
"cart(item, category)"
class=
"info"
>
<view
class=
"goods-name"
>
{{
item
.
name
}}
</view>
<view
class=
"tags"
v-if=
"item.tags"
>
<view
class=
"tag-item"
v-for=
"tag in item.tags"
:key=
"tag
"
>
{{
<view
class=
"tags"
v-if=
"item.tags
||item.recommendTag
"
>
<view
v-for=
"(tag,index) in getTags(item)"
:key=
"tag"
:class=
"index===0&&item.recommendTag?'tag-item-recommend':'tag-item'
"
>
{{
tag
}}
</view>
</view>
...
...
@@ -93,7 +93,7 @@
}}
</text></view
>
</view>
<view
class=
"addbox"
v-if=
"
shopState && isInRang
e"
>
<view
class=
"addbox"
v-if=
"
orderStat
e"
>
<image
v-if=
"getSku(item).state == 1"
@
click
.
stop=
"cart(item, category)"
...
...
@@ -123,7 +123,7 @@ import Utils from "@/utils/utils";
import
Order
from
"@/request/order"
;
export
default
{
name
:
"menuAssembly"
,
props
:
[
"buied"
,
"
shopState"
,
"isInRang
e"
],
props
:
[
"buied"
,
"
orderStat
e"
],
data
()
{
return
{
scrollBottom
:
{
...
...
@@ -150,14 +150,7 @@ export default {
};
},
watch
:
{
isInRange
(
val
)
{
if
(
!
val
)
{
this
.
scrollBottom
[
"--scroll-marginbottom"
]
=
131
+
"rpx"
;
}
else
{
this
.
scrollBottom
[
"--scroll-marginbottom"
]
=
0
+
"rpx"
;
}
},
shopState
(
val
)
{
orderState
(
val
)
{
if
(
!
val
)
{
this
.
scrollBottom
[
"--scroll-marginbottom"
]
=
131
+
"rpx"
;
}
else
{
...
...
@@ -227,6 +220,17 @@ export default {
});
},
methods
:
{
getTags
(
item
)
{
if
(
item
.
recommendTag
)
{
if
(
item
.
tags
.
length
!=
0
){
return
item
.
tags
.
unshift
(
item
.
recommendTag
).
splice
(
0
,
3
)
}
else
{
return
[
item
.
recommendTag
]
}
}
else
{
return
item
.
tags
}
},
initScroll
()
{
this
.
scrollLeftTop
=
0
;
this
.
scrollTop
=
0
;
...
...
@@ -342,12 +346,6 @@ export default {
const
el
=
categoryPostion
.
filter
((
item
)
=>
{
return
item
.
top
<=
e
.
target
.
scrollTop
+
otherHeight
;
});
console
.
log
(
el
[
el
.
length
-
1
],
"-------------------"
,
e
.
target
.
scrollTop
+
otherHeight
,
otherHeight
);
if
(
el
[
el
.
length
-
1
])
this
.
categoryId
=
el
[
el
.
length
-
1
].
id
;
},
categoryClickMain
(
id
)
{
...
...
@@ -371,7 +369,7 @@ export default {
icon
:
"none"
,
});
}
else
{
if
(
this
.
shopState
&&
this
.
isInRang
e
)
{
if
(
this
.
orderStat
e
)
{
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
skuStatus
[
0
].
skuId
});
const
{
goods
}
=
data
.
data
;
uni
.
setStorageSync
(
...
...
@@ -534,6 +532,8 @@ export default {
.tags
{
height
:
28
rpx
;
margin-top
:
8
rpx
;
display
:
flex
;
align-items
:
center
;
.tag-item
{
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
background-color
:
#f0f0f0
;
...
...
@@ -544,6 +544,16 @@ export default {
display
:
inline-block
;
margin-right
:
16
rpx
;
}
.tag-item-recommend
{
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
border
:
1
rpx
solid
#EA58DD
;
padding
:
0
rpx
8
rpx
;
font-size
:
20
rpx
;
color
:
#EA58DD
;
vertical-align
:
top
;
display
:
inline-block
;
margin-right
:
16
rpx
;
}
}
.desc-box
{
...
...
components/shopCar/shopCar.vue
View file @
9a2d8da5
...
...
@@ -143,11 +143,11 @@
</view>
<view
class=
"shopClose"
v-if=
"!
shopState || !isInRang
e"
v-if=
"!
orderStat
e"
:style=
"
{ bottom: shopCar + 'rpx' }"
>
<view
class=
"content"
>
{{
!
shopState
?
"门店已休息"
:
"距离较远,门店暂停接单"
orderStateDesc
}}
</view>
</view>
<show-toast
ref=
"toast"
/>
...
...
@@ -160,7 +160,7 @@ import Menu from "@/request/menu";
import
User
from
"@/request/user"
;
import
Utils
from
"@/utils/utils"
;
export
default
{
props
:
[
"shopState"
,
"isInRange
"
],
props
:
[
"orderState"
,
"orderStateDesc
"
],
data
()
{
return
{
showShopCar
:
false
,
//是否弹出购物车列表
...
...
menuSubPackage/pages/areaSelect/areaSelect.vue
View file @
9a2d8da5
...
...
@@ -14,7 +14,12 @@
<image
:style=
"
{'height':'100%','width':'100%'}" :src="'../../../static/imgs/jiantouhei2.png'" />
</view>
</view>
<view
>
<view
v-if=
"finalList.length==0"
>
<view
class=
"emty"
>
<view
class=
"text"
>
抱歉,暂无门店,敬请期待
</view>
</view>
</view>
<view
v-else
>
<div
v-for=
"item in finalList"
:key=
"item.id"
@
click=
"selectedShop(item)"
class=
"shop_item"
:class=
"shopId==item.id?'active':''"
>
<div
class=
"header"
>
<view
class=
"name"
>
{{
item
.
name
}}
</view>
...
...
@@ -60,7 +65,7 @@ export default {
if
(
uni
.
getStorageSync
(
'shopData'
))
{
this
.
shopId
=
uni
.
getStorageSync
(
'shopData'
).
id
;
}
this
.
list
=
uni
.
getStorageSync
(
'shops'
);
this
.
list
=
uni
.
getStorageSync
(
'shops'
)
||
[]
;
this
.
areaName
=
uni
.
getStorageSync
(
'areaName'
)
},
computed
:
{
...
...
@@ -102,6 +107,18 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.emty
{
.text{
text-align
:
center
;
margin-top
:
322
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
40
rpx
;
letter-spacing
:
1
rpx
;
}
}
.product-list
{
background
:
#F2F2F2
;
height
:
100vh
;
...
...
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
9a2d8da5
...
...
@@ -125,7 +125,7 @@
<view
v-if=
"size > 0"
class=
"good-select-cont"
>
<span
:class=
"
!
shopState || !isInRang
e
!
orderStat
e
? 'good-select-btn1-close'
: 'good-select-btn1'
"
...
...
@@ -137,7 +137,7 @@
<view>
<a
:class=
"
!
shopState || !isInRang
e
!
orderStat
e
? 'good-select-btn2-close'
: 'good-select-btn2'
"
...
...
@@ -149,7 +149,7 @@
<button
v-if=
"!userms"
:class=
"
!
shopState || !isInRang
e
!
orderStat
e
? 'good-select-btn2-close'
: 'good-select-btn2'
"
...
...
@@ -192,18 +192,21 @@ export default {
Utils
,
shopState
:
true
,
showSku
:
[],
isInRange
:
true
,
// isInRange: true,
orderState
:
true
,
};
},
onShow
()
{
uni
.
setStorageSync
(
"selectFlag"
,
false
);
uni
.
removeStorageSync
(
"goodsList"
);
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
"BottomSafeHeight"
);
this
.
shopState
=
JSON
.
parse
(
uni
.
getStorageSync
(
"shopState"
));
this
.
isInRange
=
uni
.
getStorageSync
(
"isInRange"
)
===
""
?
true
:
uni
.
getStorageSync
(
"isInRange"
);
this
.
orderState
=
JSON
.
parse
(
uni
.
getStorageSync
(
"shopInfo"
)).
orderState
console
.
log
(
this
.
orderState
,
'orderState'
)
// this.shopState = JSON.parse(uni.getStorageSync("shopState"));
// this.isInRange =
// uni.getStorageSync("isInRange") === ""
// ? true
// : uni.getStorageSync("isInRange");
},
mounted
()
{
// 获取胶囊坐标位置
...
...
@@ -401,7 +404,7 @@ export default {
}
},
async
shoppingCart
()
{
if
(
!
this
.
shopState
||
!
this
.
isInRang
e
)
{
if
(
!
this
.
orderStat
e
)
{
return
;
}
if
(
this
.
checkNum
(
"addShop"
))
{
...
...
@@ -426,7 +429,7 @@ export default {
}
},
async
getallNum
(
e
)
{
if
(
!
this
.
shopState
||
!
this
.
isInRang
e
)
{
if
(
!
this
.
orderStat
e
)
{
return
;
}
const
gosettleFun
=
async
()
=>
{
...
...
@@ -499,7 +502,7 @@ export default {
}
else
{
checkLocak
();
}
if
(
!
this
.
shopState
||
!
this
.
isInRang
e
)
{
if
(
!
this
.
orderStat
e
)
{
return
;
}
...
...
@@ -531,7 +534,7 @@ export default {
},
UseIt
(
ruleId
)
{
return
(
this
.
available
.
indexOf
(
ruleId
)
==
-
1
&&
this
.
shopState
&&
this
.
isInRang
e
this
.
available
.
indexOf
(
ruleId
)
==
-
1
&&
this
.
orderStat
e
);
},
ShowIt
(
ruleId
)
{
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
9a2d8da5
...
...
@@ -25,10 +25,11 @@
'margin-top': statusBarHeight + navigationBarHeight + getPx(32) + 'px',
}"
>
<view
class=
"code"
>
<view
class=
"code"
v-if=
"isBulid"
>
<view
class=
"code_label"
>
取单号:
</view>
<view
class=
"code_content"
>
{{
orderInfo
.
orderNum
}}
</view>
</view>
<view
v-else
class=
"status_text"
>
订单状态:
{{
orderStatusText
}}
</view>
<view
class=
"tips"
>
<view
v-if=
"orderInfo.state == 7"
>
制作完成请取杯,享用愉快!
</view>
<view
v-if=
"orderInfo.state == 4"
>
制作完成请取杯,享用愉快!
</view>
...
...
@@ -65,7 +66,7 @@
</view>
</view>
</view>
<
!--
<div
class=
"btns
"
>
<
div
class=
"btns"
v-if=
"orderInfo.state == 1||(orderInfo.state != 1&&orderInfo.state != 2)||(checkStatus(orderInfo.state, [12, 13, 14, 15]))
"
>
<a
type=
"primary"
@
click=
"cancelOrder"
...
...
@@ -82,15 +83,8 @@
>
<a
type=
"primary"
@
click=
"toRefund"
v-if=
"orderInfo.state == 2"
class=
"btn_cancel"
>
申请退款
</a
>
<a
type=
"primary"
@
click=
"oneMoreOrder(orderInfo)"
v-if=
"orderInfo.state != 1"
v-if=
"orderInfo.state != 1
&&orderInfo.state != 2
"
class=
"btn"
>
再来一单
</a
>
...
...
@@ -101,7 +95,7 @@
class=
"btn_cancel"
>
退款详情
</a
>
</div>
-->
</div>
<!--
</div>
<div
class=
"order_flow"
v-if=
"qrShow"
>
-->
<!--
<div
v-if=
"qrShow"
class=
"code"
>
取单码
{{
orderInfo
.
orderNum
}}
</div>
-->
...
...
pages/menu/menu.vue
View file @
9a2d8da5
This diff is collapsed.
Click to expand it.
request/menu/index.js
View file @
9a2d8da5
...
...
@@ -158,5 +158,20 @@ export default {
// uni.showToast({ title: '哎哟!刚刚走神了,请退出后重进', icon: 'none' })
console
.
log
(
"哎哟!刚刚走神了,请退出后重进"
);
});
},
// 根据经纬度获取店铺
getLocationShops
(
data
)
{
return
uni
.
$u
.
http
.
post
(
"/weixin/v2/getLocationShops"
,
data
)
.
then
((
res
)
=>
{
return
res
;
})
.
catch
((
err
)
=>
{
context
.
showToast
({
title
:
"哎哟!刚刚走神了,请退出后重进"
,
icon
:
"none"
,
});
return
err
;
});
}
};
request/user/index.js
View file @
9a2d8da5
...
...
@@ -31,7 +31,7 @@ export default {
// 获取店铺信息
getShopInfo
(
params
)
{
return
uni
.
$u
.
http
.
get
(
"/weixin/getShop"
,
{
params
})
.
get
(
"/weixin/
v2/
getShop"
,
{
params
})
.
then
((
res
)
=>
{
// console.log("get shop:"+JSON.stringify(res.data.data));
if
(
res
.
data
.
code
==
200
)
{
...
...
static/imgs/location_icon.png
0 → 100644
View file @
9a2d8da5
1.69 KB
static/js/qqmap-wx-jssdk.js
0 → 100644
View file @
9a2d8da5
This diff is collapsed.
Click to expand it.
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