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
d8ec07d8
Commit
d8ec07d8
authored
Jul 26, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成部分开发
parent
78e599c7
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
375 additions
and
52 deletions
+375
-52
App.vue
+1
-0
components/Modal/index.vue
+70
-14
components/menuAssembly/index.vue
+8
-4
components/shopCar/shopCar.vue
+28
-2
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+38
-4
mineSubPackage/pages/userInfo/index.vue
+45
-24
orderSubPackage/pages/orderInfo/index.vue
+14
-0
orderSubPackage/pages/settlement/index.vue
+60
-1
orderSubPackage/pages/terms/index.vue
+81
-0
pages.json
+8
-0
pages/menu/menu.vue
+2
-2
pages/mine/mine.vue
+15
-1
store/modules/user.js
+5
-0
No files found.
App.vue
View file @
d8ec07d8
...
@@ -50,6 +50,7 @@ export default {
...
@@ -50,6 +50,7 @@ export default {
this
.
globalData
.
navHeight
=
this
.
globalData
.
navigationBarHeight
+
this
.
globalData
.
statusBarHeight
this
.
globalData
.
navHeight
=
this
.
globalData
.
navigationBarHeight
+
this
.
globalData
.
statusBarHeight
// #endif
// #endif
Store
.
commit
(
'setSystemBar'
,
this
.
globalData
)
},
},
onShow
:
function
()
{
onShow
:
function
()
{
},
},
...
...
components/Modal/index.vue
View file @
d8ec07d8
<
template
>
<
template
>
<view
class=
"overlay"
>
<view
class=
"overlay"
v-show=
"show"
>
<view
class=
"main"
:style=
"
{'width':width+'rpx'}">
<view
class=
"main"
:style=
"
{'width':width+'rpx'}">
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"title"
>
标题
</view>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"content"
>
内容
</view>
<view
class=
"content"
>
{{
content
}}
</view>
</view>
</view>
<view
class=
"bottom"
>
<view
class=
"bottom"
>
<view
class=
"close"
>
取消
</view>
<view
class=
"close"
@
click=
"close"
>
取消
</view>
<view
class=
"submit"
>
确定
</view>
<view
class=
"submit"
@
click=
"ok"
>
确定
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -15,17 +15,42 @@
...
@@ -15,17 +15,42 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:{
props
:
{
width
:{
show
:
{
type
:
Boolean
,
default
()
{
return
false
}
},
width
:
{
type
:
Number
,
type
:
Number
,
default
(){
default
()
{
return
614
return
614
}
}
},
title
:
{
type
:
String
,
default
()
{
return
'标题'
}
},
content
:
{
type
:
String
,
default
()
{
return
'内容'
}
}
},
},
},
data
()
{
data
()
{
return
{
return
{
}
},
methods
:
{
close
()
{
this
.
$emit
(
'close'
)
},
ok
()
{
this
.
$emit
(
'ok'
)
}
}
}
}
}
}
...
@@ -38,14 +63,15 @@
...
@@ -38,14 +63,15 @@
width
:
100%
;
width
:
100%
;
z-index
:
999
;
z-index
:
999
;
.top
{
.main
{
background
:
white
;
padding
:
60
rpx
100
rpx
0
rpx
98
rpx
;
box-sizing
:
border-box
;
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
left
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
white
;
.top
{
padding
:
60
rpx
100
rpx
0
rpx
98
rpx
;
.title
{
.title
{
text-align
:
center
;
text-align
:
center
;
...
@@ -55,18 +81,47 @@
...
@@ -55,18 +81,47 @@
color
:
#333333
;
color
:
#333333
;
}
}
.content
{
margin-top
:
38.77
rpx
;
margin-bottom
:
55
rpx
;
text-align
:
center
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
44
rpx
;
}
}
}
.bottom
{
.bottom
{
display
:
flex
;
display
:
flex
;
border-top
:
2
rpx
solid
#ECECEC
;
.close
{
.close
{
text-align
:
center
;
width
:
100%
;
width
:
100%
;
height
:
106
rpx
;
line-height
:
106
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
border-right
:
2px
solid
#ECECEC
;
}
}
.submit
{
.submit
{
text-align
:
center
;
width
:
100%
;
width
:
100%
;
height
:
106
rpx
;
line-height
:
106
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
}
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
components/menuAssembly/index.vue
View file @
d8ec07d8
<
template
>
<
template
>
<view
class=
"page-body"
>
<view
class=
"page-body"
>
<scroll-view
class=
"nav-left"
:style=
"[heightStyle]"
:class=
"[shopCarFlag?'shopCarcss':'' ]"
scroll-y
:scroll-top=
"scrollLeftTop"
scroll-with-animation
>
<scroll-view
class=
"nav-left"
:style=
"[heightStyle]"
:class=
"[shopCarFlag
||shopState===0
?'shopCarcss':'' ]"
scroll-y
:scroll-top=
"scrollLeftTop"
scroll-with-animation
>
<view
class=
"nav-left-item"
v-for=
"item in classifyData"
@
click=
"categoryClickMain(item.id)"
:key=
"item.id"
<view
class=
"nav-left-item"
v-for=
"item in classifyData"
@
click=
"categoryClickMain(item.id)"
:key=
"item.id"
:class=
"item.id == categoryId ? 'active' : ''"
>
:class=
"item.id == categoryId ? 'active' : ''"
>
<!--
<view
class=
"imgbox"
><image
:style=
"
{'height':'100%','width':'100%'}" :src="'../../static/imgs/image_50_50.png'"/>
</view>
-->
<!--
<view
class=
"imgbox"
><image
:style=
"
{'height':'100%','width':'100%'}" :src="'../../static/imgs/image_50_50.png'"/>
</view>
-->
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<!--
<view
:class=
"item.id == categoryId ? 'active-line' : ''"
></view>
-->
<!--
<view
:class=
"item.id == categoryId ? 'active-line' : ''"
></view>
-->
</view>
</view>
</scroll-view>
</scroll-view>
<scroll-view
class=
"nav-right"
:style=
"[heightStyle]"
:class=
"[shopCarFlag?'shopCarcss':'' ]"
scroll-y
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
@
touchstart=
"openScroll"
<scroll-view
class=
"nav-right"
:style=
"[heightStyle]"
:class=
"[shopCarFlag
||shopState===0
?'shopCarcss':'' ]"
scroll-y
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
@
touchstart=
"openScroll"
scroll-with-animation
>
scroll-with-animation
>
<view
v-for=
"(category,index) in classifyData"
:id=
"category.id"
:key=
"category.id"
class=
"box"
:style=
"[goodBottom]"
>
<view
v-for=
"(category,index) in classifyData"
:id=
"category.id"
:key=
"category.id"
class=
"box"
:style=
"[goodBottom]"
>
<view
:style=
"loads"
class=
"right-title"
>
{{
category
.
name
}}
</view>
<view
:style=
"loads"
class=
"right-title"
>
{{
category
.
name
}}
</view>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<view
class=
"discount"
><text
class=
"moneyLog"
>
¥
</text>
{{
Utils
.
isInteger
(
getSku
(
item
).
discount
)
}}
</view>
<view
class=
"discount"
><text
class=
"moneyLog"
>
¥
</text>
{{
Utils
.
isInteger
(
getSku
(
item
).
discount
)
}}
</view>
<view
class=
"price"
v-if=
"getSku(item).price!=getSku(item).discount"
>
¥
<text
class=
"num"
>
{{
Utils
.
isInteger
(
getSku
(
item
).
price
)
}}
</text></view>
<view
class=
"price"
v-if=
"getSku(item).price!=getSku(item).discount"
>
¥
<text
class=
"num"
>
{{
Utils
.
isInteger
(
getSku
(
item
).
price
)
}}
</text></view>
</view>
</view>
<view
class=
"addbox"
>
<view
class=
"addbox"
v-if=
"shopState!==0"
>
<image
v-if=
"getSku(item).state==1"
@
click
.
stop=
"getallNum(item, category)"
class=
"add"
:src=
"'../../static/imgs/jiahao.png'"
/>
<image
v-if=
"getSku(item).state==1"
@
click
.
stop=
"getallNum(item, category)"
class=
"add"
:src=
"'../../static/imgs/jiahao.png'"
/>
<!--
<u-icon
class=
"add"
name=
"plus-circle-fill"
color=
"#0050F6"
@
click
.
stop=
"getallNum(item, category)"
size=
"22"
></u-icon>
-->
<!--
<u-icon
class=
"add"
name=
"plus-circle-fill"
color=
"#0050F6"
@
click
.
stop=
"getallNum(item, category)"
size=
"22"
></u-icon>
-->
<div
v-if=
"getSku(item).state!=1"
style=
"color: #858585;font-size: 20rpx;margin-top:16rpx"
>
已售罄
</div>
<div
v-if=
"getSku(item).state!=1"
style=
"color: #858585;font-size: 20rpx;margin-top:16rpx"
>
已售罄
</div>
...
@@ -51,7 +51,7 @@ import Utils from '@/utils/utils'
...
@@ -51,7 +51,7 @@ import Utils from '@/utils/utils'
import
Order
from
'@/request/order'
import
Order
from
'@/request/order'
export
default
{
export
default
{
name
:
'menuAssembly'
,
name
:
'menuAssembly'
,
props
:[
'buied'
],
props
:[
'buied'
,
'shopState'
],
data
()
{
data
()
{
return
{
return
{
heightStyle
:
{
heightStyle
:
{
...
@@ -196,10 +196,14 @@ export default {
...
@@ -196,10 +196,14 @@ export default {
icon
:
'none'
,
icon
:
'none'
,
})
})
}
else
{
}
else
{
if
(
this
.
shopState
!==
0
){
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
item
.
skus
[
0
].
skuId
})
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
item
.
skus
[
0
].
skuId
})
const
{
goods
}
=
data
.
data
const
{
goods
}
=
data
.
data
console
.
log
(
goods
)
console
.
log
(
goods
)
uni
.
setStorageSync
(
'goodsInfo'
,
JSON
.
stringify
({
...
goods
,
category
}));
uni
.
setStorageSync
(
'goodsInfo'
,
JSON
.
stringify
({
...
goods
,
category
}));
}
else
{
uni
.
setStorageSync
(
'goodsInfo'
,
JSON
.
stringify
({
...
item
,
category
}));
}
uni
.
navigateTo
({
url
:
'/menuSubPackage/pages/goodsDetail/goodsDetail'
})
uni
.
navigateTo
({
url
:
'/menuSubPackage/pages/goodsDetail/goodsDetail'
})
}
}
...
...
components/shopCar/shopCar.vue
View file @
d8ec07d8
...
@@ -73,15 +73,18 @@
...
@@ -73,15 +73,18 @@
</view>
</view>
</view>
</view>
<view
class=
"end-right goSubmmit"
@
click=
"saveReserve"
v-if=
"userms"
>
<view
class=
"end-right goSubmmit"
@
click=
"saveReserve"
v-if=
"userms"
>
付款
结算
</view>
</view>
<!--
<view
v-if=
"!userms"
class=
"end-right goSubmmit"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
@
getphonenumber=
"saveReserve"
>
<!--
<view
v-if=
"!userms"
class=
"end-right goSubmmit"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
@
getphonenumber=
"saveReserve"
>
</view>
-->
</view>
-->
<button
v-if=
"!userms"
class=
"end-right goSubmmit"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
<button
v-if=
"!userms"
class=
"end-right goSubmmit"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
@
getphonenumber=
"saveReserve"
>
付款
@
getphonenumber=
"saveReserve"
>
结算
</button>
</button>
</view>
</view>
<view
class=
"shopClose"
v-if=
"shopState===0"
:style=
"
{'bottom':shopCar+'rpx'}">
<view
class=
"content"
>
门店已休息
</view>
</view>
<show-toast
ref=
"toast"
/>
<show-toast
ref=
"toast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -92,6 +95,7 @@ import Menu from '@/request/menu';
...
@@ -92,6 +95,7 @@ import Menu from '@/request/menu';
import
User
from
'@/request/user'
;
import
User
from
'@/request/user'
;
import
Utils
from
'@/utils/utils'
import
Utils
from
'@/utils/utils'
export
default
{
export
default
{
props
:[
'shopState'
],
data
()
{
data
()
{
return
{
return
{
showShopCar
:
false
,
//是否弹出购物车列表
showShopCar
:
false
,
//是否弹出购物车列表
...
@@ -585,4 +589,26 @@ export default {
...
@@ -585,4 +589,26 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
}
}
.shopClose
{
width
:
100%
;
height
:
100
rpx
;
background
:
linear-gradient
(
180deg
,
#FFFFFF
0%
,
#F0F0F0
100%
);
position
:
fixed
;
left
:
0
;
display
:
flex
;
z-index
:
10072
;
align-items
:
center
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
text-align
:
center
;
line-height
:
100
rpx
;
.content
{
width
:
100%
;
text-align
:
center
;
}
}
</
style
>
</
style
>
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
d8ec07d8
...
@@ -63,16 +63,16 @@
...
@@ -63,16 +63,16 @@
</view>
</view>
<view
v-if=
"size > 0"
class=
"good-select-cont"
>
<view
v-if=
"size > 0"
class=
"good-select-cont"
>
<view>
<view>
<a
class=
"good-select-btn1
"
@
click=
"getallNum()"
v-if=
"userms"
>
<a
:class=
"shopState===0?'good-select-btn1-close':'good-select-btn1'
"
@
click=
"getallNum()"
v-if=
"userms"
>
立即购买
立即购买
</a>
</a>
<button
v-if=
"!userms"
class=
"good-select-btn1
"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
<button
v-if=
"!userms"
:class=
"shopState===0?'good-select-btn1-close':'good-select-btn1'
"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getallNum"
>
@
getphonenumber=
"getallNum"
>
立即购买
立即购买
</button>
</button>
</view>
</view>
<span
class=
"good-select-btn2
"
@
click=
"shoppingCart"
type=
"default"
>
加入购物袋
</span>
<span
:class=
"shopState===0?'good-select-btn2-close':'good-select-btn2'
"
@
click=
"shoppingCart"
type=
"default"
>
加入购物袋
</span>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -103,11 +103,13 @@ export default {
...
@@ -103,11 +103,13 @@ export default {
topBarHeight
:
0
,
topBarHeight
:
0
,
BottomSafeHeight
:
0
,
BottomSafeHeight
:
0
,
Utils
,
Utils
,
shopState
:
0
,
}
}
},
},
onShow
()
{
onShow
()
{
uni
.
removeStorageSync
(
'goodsList'
);
uni
.
removeStorageSync
(
'goodsList'
);
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
shopState
=
Number
(
JSON
.
parse
(
uni
.
getStorageSync
(
"shopInfo"
)).
state
)
},
},
mounted
(){
mounted
(){
// 获取胶囊坐标位置
// 获取胶囊坐标位置
...
@@ -285,6 +287,9 @@ export default {
...
@@ -285,6 +287,9 @@ export default {
}
}
},
},
async
shoppingCart
()
{
async
shoppingCart
()
{
if
(
this
.
shopState
===
0
){
return
}
if
(
this
.
checkNum
(
'addShop'
)){
if
(
this
.
checkNum
(
'addShop'
)){
const
{
goods
}
=
this
;
const
{
goods
}
=
this
;
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
...
@@ -312,6 +317,9 @@ export default {
...
@@ -312,6 +317,9 @@ export default {
this
.
loginByPhoneNumber
(
e
);
this
.
loginByPhoneNumber
(
e
);
return
return
}
}
if
(
this
.
shopState
===
0
){
return
}
const
{
goods
}
=
this
;
const
{
goods
}
=
this
;
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
const
{
state
,
goods
:
newgoods
}
=
data
.
data
const
{
state
,
goods
:
newgoods
}
=
data
.
data
...
@@ -353,7 +361,7 @@ export default {
...
@@ -353,7 +361,7 @@ export default {
}
}
},
},
UseIt
(
ruleId
)
{
UseIt
(
ruleId
)
{
return
this
.
available
.
indexOf
(
ruleId
)
==
-
1
return
this
.
available
.
indexOf
(
ruleId
)
==
-
1
&&
this
.
shopState
!==
0
}
}
},
},
computed
:
{
computed
:
{
...
@@ -629,6 +637,20 @@ button[disabled]:not([type]) {
...
@@ -629,6 +637,20 @@ button[disabled]:not([type]) {
background
:
#FFFFFF
;
background
:
#FFFFFF
;
}
}
.good-select-btn1-close
{
width
:
328
rpx
;
height
:
104
rpx
;
border
:
2
rpx
solid
#999999
;
font-size
:
28
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
border-radius
:
2px
;
line-height
:
104
rpx
;
text-align
:
center
;
background
:
#FFFFFF
;
}
.good-select-btn2
{
.good-select-btn2
{
width
:
328
rpx
;
width
:
328
rpx
;
height
:
104
rpx
;
height
:
104
rpx
;
...
@@ -641,6 +663,18 @@ button[disabled]:not([type]) {
...
@@ -641,6 +663,18 @@ button[disabled]:not([type]) {
color
:
#fff
;
color
:
#fff
;
}
}
.good-select-btn2-close
{
width
:
328
rpx
;
height
:
104
rpx
;
border-radius
:
2px
;
font-size
:
28
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
background
:
#999999
;
line-height
:
104
rpx
;
text-align
:
center
;
color
:
#fff
;
}
.set_size
{
.set_size
{
display
:
flex
;
display
:
flex
;
width
:
150
rpx
;
width
:
150
rpx
;
...
...
mineSubPackage/pages/userInfo/index.vue
View file @
d8ec07d8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view>
<view>
<view
class=
"page"
>
<view
class=
"page"
>
<view
class=
"avatarBox"
>
<view
class=
"avatarBox"
>
<image
class=
"avatar"
src=
"../../../static/touxiang.png
"
/>
<image
class=
"avatar"
:src=
"userInfo.avatarUrl
"
/>
</view>
</view>
<view
class=
"infoBox"
>
<view
class=
"infoBox"
>
<view
class=
"infoItem name"
>
<view
class=
"infoItem name"
>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<view
class=
"label"
>
生日
</view>
<view
class=
"label"
>
生日
</view>
<view
class=
"input"
>
<view
class=
"input"
>
<view
class=
"birthdayBox"
>
<view
class=
"birthdayBox"
>
<view
class=
"text"
>
{{
userInfo
.
birthday
}}
</view>
<view
class=
"text"
>
{{
birthdayComuted
}}
</view>
<view
class=
"btn"
@
click=
"changeBirthday"
>
修改
</view>
<view
class=
"btn"
@
click=
"changeBirthday"
>
修改
</view>
</view>
</view>
</view>
</view>
...
@@ -43,11 +43,22 @@
...
@@ -43,11 +43,22 @@
<u-datetime-picker
<u-datetime-picker
:show=
"timerShow"
:show=
"timerShow"
v-model=
"value1"
:maxDate=
"(new Date()).valueOf()"
:minDate=
"-631094400"
@
close=
"timerShow = false"
@
confirm=
"choseTime"
v-model=
"userInfo.birthday"
mode=
"date"
mode=
"date"
></u-datetime-picker>
></u-datetime-picker>
<Modal
class=
"modal"
/>
<Modal
class=
"modal"
title=
"确认更换生日日期?"
content=
"生日只可修改一次,是否想要修改?"
:show=
"birthdayModalShow"
@
close=
"birthdayModalShow = false"
@
ok=
"openTimer"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -55,15 +66,27 @@
...
@@ -55,15 +66,27 @@
import
Modal
from
'@/components/Modal/index.vue'
import
Modal
from
'@/components/Modal/index.vue'
export
default
{
export
default
{
components
:
{
Modal
},
components
:
{
Modal
},
computed
:{
birthdayComuted
(){
const
{
birthday
}
=
this
.
userInfo
const
date
=
new
Date
(
birthday
)
const
years
=
date
.
getFullYear
()
const
month
=
date
.
getMonth
()
+
1
const
days
=
date
.
getDate
()
return
years
+
'.'
+
month
+
'.'
+
days
}
},
data
()
{
data
()
{
return
{
return
{
timerShow
:
false
,
timerShow
:
false
,
birthdayModalShow
:
false
,
value1
:
Number
(
new
Date
()),
value1
:
Number
(
new
Date
()),
userInfo
:
{
userInfo
:
{
avatarUrl
:
'../../../static/touxiang.png'
,
name
:
'脸脸'
,
name
:
'脸脸'
,
phone
:
'152****8932'
,
phone
:
'152****8932'
,
sex
:
0
,
sex
:
0
,
birthday
:
'1996.5.29'
birthday
:
1658679810130
},
},
sexList
:[
sexList
:[
{
{
...
@@ -77,28 +100,26 @@ export default {
...
@@ -77,28 +100,26 @@ export default {
]
]
}
}
},
},
mounted
(){
onLoad
(
option
)
{
// wx.showModal({
const
{
info
}
=
option
// title:'提示',
const
{
avatarUrl
,
gender
,
nickName
}
=
JSON
.
parse
(
decodeURIComponent
(
info
))
// content: "是否允许获取微信昵称和头像?",
this
.
userInfo
.
avatarUrl
=
avatarUrl
// success:()=>{
this
.
userInfo
.
sex
=
gender
// wx.getUserProfile({
this
.
userInfo
.
name
=
nickName
// desc:'用于完善用户资料',
const
phoneNumber
=
uni
.
getStorageSync
(
'phoneNumber'
)
// success:(res)=>{
this
.
userInfo
.
phone
=
phoneNumber
.
substr
(
0
,
3
)
+
"****"
+
phoneNumber
.
substr
(
7
)
// console.log(res)
// }
// })
// }
// })
},
},
methods
:{
methods
:{
choseTime
(
e
)
{
this
.
userInfo
.
birthday
=
e
.
value
this
.
timerShow
=
false
},
openTimer
()
{
this
.
birthdayModalShow
=
false
this
.
timerShow
=
true
},
changeBirthday
(){
changeBirthday
(){
wx
.
getUserProfile
({
this
.
birthdayModalShow
=
true
desc
:
'用于完善用户资料'
,
success
:(
res
)
=>
{
console
.
log
(
res
)
}
})
},
},
selectedSex
(
val
){
selectedSex
(
val
){
console
.
log
(
val
)
console
.
log
(
val
)
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
d8ec07d8
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<a
type=
"primary"
@
click=
"PayNow"
v-if=
"orderInfo.state == 1"
class=
"btn"
>
立即支付
</a>
<a
type=
"primary"
@
click=
"PayNow"
v-if=
"orderInfo.state == 1"
class=
"btn"
>
立即支付
</a>
<a
type=
"primary"
@
click=
"toRefund"
v-if=
"orderInfo.state == 2"
class=
"btn_cancel"
>
申请退款
</a>
<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"
class=
"btn"
>
再来一单
</a>
<a
type=
"primary"
@
click=
"oneMoreOrder(orderInfo)"
v-if=
"orderInfo.state != 1"
class=
"btn"
>
再来一单
</a>
<a
type=
"primary"
@
click=
"refundInfo"
v-if=
"checkStatus(orderInfo.state,[12,13,14,15])"
class=
"btn_cancel"
>
退款详情
</a>
</div>
</div>
</div>
</div>
<div
class=
"order_flow"
v-if=
"qrShow"
>
<div
class=
"order_flow"
v-if=
"qrShow"
>
...
@@ -131,6 +132,19 @@ export default {
...
@@ -131,6 +132,19 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
refundInfo
()
{
const
{
id
}
=
this
.
orderInfo
uni
.
setStorageSync
(
'orderId'
,
id
);
let
url
=
'/orderSubPackage/pages/refundInfo/index'
uni
.
navigateTo
({
url
})
},
checkStatus
(
status
,
list
){
if
(
list
.
includes
(
Number
(
status
))){
return
true
}
else
{
return
false
}
},
getPx
(
rpx
)
{
getPx
(
rpx
)
{
// console.log((rpx * (wx.getSystemInfoSync().windowWidth / 750)));
// console.log((rpx * (wx.getSystemInfoSync().windowWidth / 750)));
// console.log(wx.getSystemInfoSync().windowWidth);
// console.log(wx.getSystemInfoSync().windowWidth);
...
...
orderSubPackage/pages/settlement/index.vue
View file @
d8ec07d8
...
@@ -61,6 +61,12 @@
...
@@ -61,6 +61,12 @@
<span>
微信支付
</span>
<span>
微信支付
</span>
</div>
</div>
</div>
</div>
<div
class=
"TermsOfAgreement"
v-if=
"!TermsStatus"
>
<div
@
click=
"clickAgreeTerms"
:class=
"agreeTerms?'checked':'nochecked'"
></div>
<div
class=
"content"
>
已阅读并同意
<span
@
click=
"goTerms(1)"
>
《用户协议》
</span>
、
<span
@
click=
"goTerms(2)"
>
《隐私权政策》
</span>
、
<span
@
click=
"goTerms(3)"
>
《支付协议》
</span>
</div>
</div>
<div
style=
"height:150rpx"
></div>
<div
style=
"height:150rpx"
></div>
<div
class=
"footer"
:style=
"
{'padding-bottom':BottomSafeHeight+'px'}">
<div
class=
"footer"
:style=
"
{'padding-bottom':BottomSafeHeight+'px'}">
<div
class=
"total"
>
<div
class=
"total"
>
...
@@ -96,6 +102,7 @@ export default {
...
@@ -96,6 +102,7 @@ export default {
})
})
}
}
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
this
.
TermsStatus
=
uni
.
getStorageSync
(
'TermsStatus'
)
||
false
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
if
(
!
this
.
userms
){
if
(
!
this
.
userms
){
...
@@ -162,7 +169,9 @@ export default {
...
@@ -162,7 +169,9 @@ export default {
duration
:
''
,
duration
:
''
,
loginInfo
:
''
,
loginInfo
:
''
,
BottomSafeHeight
:
0
,
BottomSafeHeight
:
0
,
Utils
Utils
,
agreeTerms
:
true
,
TermsStatus
:
true
}
}
},
},
computed
:
{
computed
:
{
...
@@ -203,6 +212,15 @@ export default {
...
@@ -203,6 +212,15 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 勾选隐私协议
clickAgreeTerms
(){
this
.
agreeTerms
=
!
this
.
agreeTerms
},
// 跳转隐私协议页面
goTerms
(
type
)
{
uni
.
navigateTo
({
url
:
'/orderSubPackage/pages/terms/index?type='
+
type
})
},
itemReduction
(
discount
,
price
,
num
)
{
itemReduction
(
discount
,
price
,
num
)
{
return
((
price
-
discount
)
*
num
).
toFixed
(
2
)
return
((
price
-
discount
)
*
num
).
toFixed
(
2
)
},
},
...
@@ -216,6 +234,12 @@ export default {
...
@@ -216,6 +234,12 @@ export default {
}
}
},
},
messageAndSave
()
{
messageAndSave
()
{
if
(
!
this
.
TermsStatus
&&!
this
.
agreeTerms
){
this
.
showToast
({
title
:
"请同意下方协议条款"
});
return
}
else
{
if
(
this
.
agreeTerms
)
uni
.
setStorageSync
(
'TermsStatus'
,
true
)
}
wx
.
requestSubscribeMessage
({
wx
.
requestSubscribeMessage
({
// 'Oq_zfRWRXijvXenRmfD2PARgpvdYlbkjR4laxKmBqb0'
// 'Oq_zfRWRXijvXenRmfD2PARgpvdYlbkjR4laxKmBqb0'
tmplIds
:
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
],
tmplIds
:
[
'1uErx-15S-3vuopXSvvsxCeM_Jd-1iZC-nXzd2yW3QU'
,
'Q4HDwBEvpTXpwtZktqWm4SZOTEuQK1x48xjqjD2GqyM'
,
'Fu_CPIXa0cnJ4EDdVKqFQ3qqKJccMqt2oorI5mfNq74'
],
...
@@ -249,10 +273,12 @@ export default {
...
@@ -249,10 +273,12 @@ export default {
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
)
{
// 发起订单
// 发起订单
// if(this.agreeTerms)uni.setStorageSync('TermsStatus',true)
let
orderInfo
=
await
Menu
.
saveReserve
(
res
);
let
orderInfo
=
await
Menu
.
saveReserve
(
res
);
if
(
orderInfo
&&
orderInfo
.
data
.
code
==
200
)
{
if
(
orderInfo
&&
orderInfo
.
data
.
code
==
200
)
{
await
Menu
.
requestPayment
(
orderInfo
.
data
.
data
,
res
,
this
.
buyType
);
await
Menu
.
requestPayment
(
orderInfo
.
data
.
data
,
res
,
this
.
buyType
);
}
}
}
}
},
},
goCouponSelect
()
{
goCouponSelect
()
{
...
@@ -570,6 +596,39 @@ export default {
...
@@ -570,6 +596,39 @@ export default {
}
}
}
}
.TermsOfAgreement
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
margin-top
:
31
rpx
;
margin-left
:
32
rpx
;
.content
{
font-size
:
24
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
34
rpx
;
span
{
color
:
#0050F6
;
}
}
.checked
{
width
:
24
rpx
;
height
:
24
rpx
;
background
:
url('../../../static/imgs/duigouxuanzhong.png')
center
center
no-repeat
;
background-size
:
100%
100%
;
margin-right
:
8
rpx
;
}
.nochecked
{
width
:
24
rpx
;
height
:
24
rpx
;
background
:
url('../../../static/imgs/weixuanzhong.png')
center
center
no-repeat
;
background-size
:
100%
100%
;
margin-right
:
8
rpx
;
}
}
.footer
{
.footer
{
height
:
100
rpx
;
height
:
100
rpx
;
background
:
#fff
;
background
:
#fff
;
...
...
orderSubPackage/pages/terms/index.vue
0 → 100644
View file @
d8ec07d8
<
template
>
<view>
<view
class=
"topBar"
:style=
"
{'padding-top':systemBarHeight.statusBarHeight+'px','height':systemBarHeight.navigationBarHeight+'px'}">
<u-icon
@
click=
"goBackOrder"
name=
"close"
color=
"#000000"
size=
"20"
></u-icon>
<view
class=
"tabTitle"
:style=
"
{'line-height':systemBarHeight.navigationBarHeight+'px'}">
{{
type
===
1
?
'用户协议'
:
type
===
2
?
'隐私权政策'
:
'支付协议'
}}
</view>
</view>
<view
class=
"content"
:style=
"
{'margin-top':(systemBarHeight.statusBarHeight+systemBarHeight.navigationBarHeight+getPx(32))+'px'}" v-if="type===1">
<view
class=
"title"
>
HOOLOO咖啡用户协议
</view>
</view>
<view
class=
"content"
:style=
"
{'margin-top':(systemBarHeight.statusBarHeight+systemBarHeight.navigationBarHeight+getPx(32))+'px'}" v-else-if="type===2">
<view
class=
"title"
>
HOOLOO咖啡隐私权限协议
</view>
</view>
<view
class=
"content"
:style=
"
{'margin-top':(systemBarHeight.statusBarHeight+systemBarHeight.navigationBarHeight+getPx(32))+'px'}" v-else-if="type===2">
<view
class=
"title"
>
HOOLOO咖啡支付协议
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
computed
:
{
systemBarHeight
(){
return
this
.
$store
.
state
.
user
.
systemBarHeight
}
},
data
()
{
return
{
type
:
1
}
},
methods
:
{
getPx
(
rpx
)
{
// console.log((rpx * (wx.getSystemInfoSync().windowWidth / 750)));
// console.log(wx.getSystemInfoSync().windowWidth);
return
rpx
*
(
wx
.
getSystemInfoSync
().
windowWidth
/
750
);
},
goBackOrder
()
{
uni
.
navigateBack
()
}
},
onLoad
(
option
)
{
this
.
type
=
option
.
type
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.topBar
{
top
:
0
;
position
:
fixed
;
width
:
100%
;
background
:
#f5f5f9
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
z-index
:
9999
;
padding-left
:
34
rpx
;
//
.arrow-left
{
//
margin-left
:
20
rpx
;
//
}
.tabTitle
{
font-size
:
32
rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
text-align
:
center
;
width
:
79%
;
color
:
#333333
}
}
.content
{
.title
{
font-weight
:
bold
;
font-size
:
30
rpx
;
text-align
:
center
;
}
}
</
style
>
\ No newline at end of file
pages.json
View file @
d8ec07d8
...
@@ -79,6 +79,14 @@
...
@@ -79,6 +79,14 @@
"navigationBarTitleText"
:
"退款详情"
,
"navigationBarTitleText"
:
"退款详情"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
{
"path"
:
"pages/terms/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}
}
}
]
]
},
},
...
...
pages/menu/menu.vue
View file @
d8ec07d8
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<view
class=
"barCode-dis"
>
点击二维码取单
</view>
<view
class=
"barCode-dis"
>
点击二维码取单
</view>
</view>
</view>
</view>
</view>
<MenuAssembly
ref=
"MenuAssembly"
@
getallNum=
"getallNum"
:buied=
"buied"
/>
<MenuAssembly
ref=
"MenuAssembly"
@
getallNum=
"getallNum"
:buied=
"buied"
:shopState=
"shopInfo.state"
/>
<!--
<u-picker
@
cancel=
"show = false"
:show=
"show"
:immediateChange=
"true"
ref=
"uPicker"
:columns=
"columns"
<!--
<u-picker
@
cancel=
"show = false"
:show=
"show"
:immediateChange=
"true"
ref=
"uPicker"
:columns=
"columns"
@
confirm=
"confirm"
keyName=
"name"
@
change=
"changeHandler"
></u-picker>
-->
@
confirm=
"confirm"
keyName=
"name"
@
change=
"changeHandler"
></u-picker>
-->
<AreaPicker
ref=
"AreaPicker"
/>
<AreaPicker
ref=
"AreaPicker"
/>
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
style=
"background:#fff;width: 200px;height: 200px; display:block; left:-800rpx;position:absolute;"
/>
style=
"background:#fff;width: 200px;height: 200px; display:block; left:-800rpx;position:absolute;"
/>
<show-toast
ref=
"toast"
/>
<show-toast
ref=
"toast"
/>
<taBar
select=
"0"
></taBar>
<taBar
select=
"0"
></taBar>
<ShopCar
ref=
"shopbar"
/
>
<ShopCar
ref=
"shopbar"
:shopState=
"shopInfo.state"
>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
pages/mine/mine.vue
View file @
d8ec07d8
...
@@ -139,7 +139,21 @@ export default {
...
@@ -139,7 +139,21 @@ export default {
}
}
page
==
'order'
&&
uni
.
switchTab
({
url
:
'/pages/order/order'
})
page
==
'order'
&&
uni
.
switchTab
({
url
:
'/pages/order/order'
})
page
==
'msg'
&&
uni
.
navigateTo
({
url
:
'/mineSubPackage/pages/msg/index'
})
page
==
'msg'
&&
uni
.
navigateTo
({
url
:
'/mineSubPackage/pages/msg/index'
})
page
==
'userInfo'
&&
uni
.
navigateTo
({
url
:
'/mineSubPackage/pages/userInfo/index'
})
if
(
page
==
'userInfo'
){
wx
.
getUserProfile
({
desc
:
'用于完善用户资料'
,
success
:(
res
)
=>
{
const
{
userInfo
}
=
res
const
Info
=
JSON
.
stringify
({
avatarUrl
:
userInfo
.
avatarUrl
,
gender
:
userInfo
.
gender
,
nickName
:
userInfo
.
nickName
})
// console.log(res)
page
==
'userInfo'
&&
uni
.
navigateTo
({
url
:
'/mineSubPackage/pages/userInfo/index?info='
+
encodeURIComponent
(
Info
)
})
}
})
}
}
}
}
}
}
}
...
...
store/modules/user.js
View file @
d8ec07d8
...
@@ -6,12 +6,17 @@ const user = {
...
@@ -6,12 +6,17 @@ const user = {
userPhoneInfo
:
null
,
userPhoneInfo
:
null
,
shopInfo
:
null
,
//店铺信息
shopInfo
:
null
,
//店铺信息
orderId
:
null
,
//扫码进入时携带的订单id
orderId
:
null
,
//扫码进入时携带的订单id
systemBarHeight
:
{}
//设备头部高度信息
},
},
mutations
:
{
mutations
:
{
// 保存扫码进入时携带的订单id
// 保存扫码进入时携带的订单id
setOrderId
(
state
,
orderId
)
{
setOrderId
(
state
,
orderId
)
{
state
.
orderId
=
orderId
;
state
.
orderId
=
orderId
;
},
},
// 保存设备tabHeight信息
setSystemBar
(
state
,
systemBarHeight
)
{
state
.
systemBarHeight
=
systemBarHeight
},
// 设置是否授权
// 设置是否授权
setAuthorization
(
state
,
data
)
{
setAuthorization
(
state
,
data
)
{
state
.
Authorization
=
data
;
state
.
Authorization
=
data
;
...
...
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