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
c0cb8258
Commit
c0cb8258
authored
Jun 20, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 我的订单页面 样式
parent
304eb752
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
92 additions
and
58 deletions
+92
-58
components/bocft-toast/bocft-toast.vue
+1
-1
components/menuAssembly/index.vue
+1
-1
components/shopCar/shopCar.vue
+5
-3
main.js
+1
-4
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+4
-3
orderSubPackage/pages/settlement/index.vue
+2
-1
pages.json
+2
-2
pages/order/order.vue
+71
-40
request/menu/index.js
+5
-3
static/imgs/xiaojiantou.png
+0
-0
No files found.
components/bocft-toast/bocft-toast.vue
View file @
c0cb8258
...
...
@@ -40,7 +40,7 @@
background
:
#4C4C4C
;
max-width
:
266
rpx
;
position
:
fixed
;
z-index
:
10023
;
z-index
:
999999
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
...
...
components/menuAssembly/index.vue
View file @
c0cb8258
...
...
@@ -33,10 +33,10 @@
<view
class=
"addbox"
>
<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=
"#003AE9"
@
click
.
stop=
"getallNum(item, category)"
size=
"22"
></u-icon>
-->
<div
v-if=
"getSku(item).state!=1"
style=
"color: #858585;font-size: 20rpx;"
>
已售罄
</div>
</view>
</view>
</view>
<div
v-if=
"getSku(item).state!=1"
class=
"sellNull"
style=
"color: orangered;font-size: 22rpx;"
>
已售罄
</div>
</view>
</view>
</scroll-view>
...
...
components/shopCar/shopCar.vue
View file @
c0cb8258
...
...
@@ -82,6 +82,7 @@
@
getphonenumber=
"saveReserve"
>
</button>
</view>
<show-toast
ref=
"toast"
/>
</view>
</
template
>
...
...
@@ -137,7 +138,7 @@ export default {
//跳转到结算
saveReserve
(
e
)
{
if
(
this
.
totalPrice
<
0
||
this
.
totalNum
<=
0
)
{
uni
.
showToast
({
title
:
'请选择商品'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'请选择商品'
,
icon
:
'error'
})
return
;
}
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
);
...
...
@@ -159,7 +160,7 @@ export default {
e
.
loginInfo
=
this
.
loginInfo
User
.
getPhoneNumber
(
e
);
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
uni
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
}
},
change
(
e
)
{
},
...
...
@@ -206,8 +207,9 @@ export default {
s
+=
Number
(
val
.
num
);
},
0
);
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
console
.
log
(
s
,
countOfOrder
)
if
(
s
>=
countOfOrder
)
{
uni
.
showToast
({
this
.
showToast
({
title
:
'最多可一次购买'
+
countOfOrder
+
'杯'
,
icon
:
'none'
});
...
...
main.js
View file @
c0cb8258
...
...
@@ -31,10 +31,6 @@ Vue.prototype.loginByPhoneNumber = (e) => {
}
};
Vue
.
prototype
.
$toast
=
(
e
)
=>
{
console
.
log
(
Vuex
)
}
Vue
.
config
.
productionTip
=
false
;
App
.
mpType
=
'app'
;
...
...
@@ -42,6 +38,7 @@ const app = new Vue({
...
App
,
store
,
});
export
default
app
app
.
$mount
();
require
(
'./request/index'
)(
app
);
// #endif
...
...
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
c0cb8258
...
...
@@ -79,6 +79,7 @@
</view>
</view>
</view>
<show-toast
ref=
"toast"
/>
</view>
</
template
>
...
...
@@ -209,7 +210,7 @@ export default {
}
const
[
sku
]
=
skus
.
filter
(
item
=>
item
.
skuId
==
selectedSku
);
if
(
!
sku
||
skus
.
state
==
2
)
{
uni
.
showToast
({
title
:
'本商品已经售罄'
,
icon
:
'none'
});
this
.
showToast
({
title
:
'本商品已经售罄'
,
icon
:
'none'
});
callback
&&
callback
()
}
else
{
const
{
category
,
...
goods
}
=
this
.
goodInfo
;
...
...
@@ -228,7 +229,7 @@ export default {
if
(
this
.
size
<
countOfOrder
)
{
this
.
size
=
this
.
size
+
1
;
}
else
{
uni
.
showToast
({
this
.
showToast
({
title
:
'最多可一次购买'
+
countOfOrder
+
'杯'
,
icon
:
'none'
,
});
...
...
@@ -265,7 +266,7 @@ export default {
e
.
loginInfo
=
this
.
loginInfo
User
.
getPhoneNumber
(
e
);
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
uni
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
}
},
UseIt
(
ruleId
)
{
...
...
orderSubPackage/pages/settlement/index.vue
View file @
c0cb8258
...
...
@@ -77,6 +77,7 @@
<view
v-if=
"userms"
class=
"payment"
@
click=
"messageAndSave"
></view>
<button
v-if=
"!userms"
class=
"payment"
style=
"border-radius: 0;"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
></button>
</div>
<show-toast
ref=
"toast"
/>
</view>
</
template
>
...
...
@@ -212,7 +213,7 @@ export default {
e
.
loginInfo
=
this
.
loginInfo
User
.
getPhoneNumber
(
e
);
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
uni
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
}
},
messageAndSave
()
{
...
...
pages.json
View file @
c0cb8258
...
...
@@ -14,7 +14,7 @@
{
"path"
:
"pages/order/order"
,
"style"
:
{
"navigationBarTitleText"
:
"订单"
,
"navigationBarTitleText"
:
"
我的
订单"
,
"enablePullDownRefresh"
:
false
}
},
...
...
@@ -97,7 +97,7 @@
"custom"
:
false
,
"color"
:
"#999999"
,
"selectedColor"
:
"#003AE9"
,
"iconWidth"
:
"3
2
rpx"
,
"iconWidth"
:
"3
0
rpx"
,
"borderStyle"
:
"white"
,
"list"
:
[
{
...
...
pages/order/order.vue
View file @
c0cb8258
...
...
@@ -18,23 +18,31 @@
<h3
class=
"order_adrass"
>
{{
item
.
shop
.
name
}}
</h3>
<text
class=
"order_time"
>
{{
item
.
createdAt
}}
</text>
</view>
<view
class=
"order_status"
>
{{
getStateText
(
item
.
state
)
}}
>
</view>
<view
class=
"order_status"
>
<text>
{{
getStateText
(
item
.
state
)
}}
</text>
<image
class=
"xiaojiantou"
src=
"@/static/imgs/xiaojiantou.png"
/>
</view>
</view>
<div
class=
"order_content"
>
<view>
<view
class=
"order_content_box1"
>
<view
class=
"goods_item"
v-for=
"good in item.orderDetails"
:key=
"good.id"
>
<image
class=
"goods_img"
v-if=
"jsonParse(good.goods.pics).thumbnailApplet"
:src=
"jsonParse(good.goods.pics).thumbnailApplet"
></image>
<image
v-else
class=
"goods_img"
:src=
"jsonParse(good.goods.pics).thumbnail"
></image>
<view
class=
"goods_text"
>
<view
class=
"goods_title"
>
{{
good
.
goodsName
}}
×
{{
good
.
num
}}
</view>
<view
class=
"goods_title"
>
{{
good
.
goodsName
}}
</view>
<view
class=
"goods_spce"
>
<view>
<span
v-for=
"(rule, index) in jsonParse(good.specRuleDetail)"
:key=
"rule.specId"
>
{{
rule
.
ruleName
}}
<span
v-if=
"index!=jsonParse(good.specRuleDetail).length-1"
>
/
</span>
</span>
</view>
<view>
×
{{
good
.
num
}}
</view>
</view>
</view>
</view>
</view>
...
...
@@ -45,14 +53,14 @@
</div>
<view
class=
"order_footer"
>
<view
class=
"total"
>
共
{{
orderDetailsSize
(
item
.
orderDetails
)
}}
件商品 合计
:
<text
class=
"price"
>
¥
{{
item
.
amount
}}
</text>
共
{{
orderDetailsSize
(
item
.
orderDetails
)
}}
件商品 合计
<text
class=
"price"
>
¥
{{
item
.
amount
}}
</text>
</view>
<a
class=
"btn"
@
click
.
stop=
"PayNow(item)"
v-if=
"item.state == 1"
type=
"primary"
>
立刻支付
</a>
<a
class=
"btn"
v-else
@
click
.
stop=
"oneMoreOrder(item)"
type=
"primary"
>
再来一单
</a>
</view>
</view>
</view>
<show-toast
ref=
"toast"
/>
</view>
</
template
>
...
...
@@ -133,7 +141,7 @@ export default {
})
const
{
data
}
=
await
order
.
moreOrder
({
orderId
:
id
,
shopId
});
if
(
!
data
||
!
data
.
data
){
uni
.
showToast
({
title
:
"该订单中的商品已经售罄了"
});
this
.
showToast
({
title
:
"该订单中的商品已经售罄了"
});
return
;
}
...
...
@@ -146,7 +154,7 @@ export default {
}
});
if
(
!
list
||
list
.
length
<=
0
)
{
uni
.
showToast
({
title
:
"该订单中的商品已经售罄了"
,
icon
:
'error'
});
this
.
showToast
({
title
:
"该订单中的商品已经售罄了"
,
icon
:
'error'
});
return
;
}
list
.
forEach
(
nextData
=>
{
...
...
@@ -165,7 +173,7 @@ export default {
this
.
empty
=
true
;
}
}
else
{
uni
.
showToast
({
title
:
'请登录!'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'请登录!'
,
icon
:
'error'
})
}
},
async
PayNow
({
id
})
{
...
...
@@ -186,7 +194,7 @@ export default {
e
.
loginInfo
=
this
.
loginInfo
User
.
getPhoneNumber
(
e
,
this
.
getList
);
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
uni
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
this
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
}
},
openInfo
(
data
)
{
...
...
@@ -252,12 +260,10 @@ export default {
.order_item
{
width
:
686
rpx
;
min-height
:
370
rpx
;
background
:
#FFFFFF
;
border-radius
:
10
rpx
;
margin
:
15
rpx
auto
0
;
margin
:
30
rpx
auto
0
;
box-sizing
:
border-box
;
padding
:
2
8
rpx
32
rpx
;
padding
:
2
5
rpx
32
rpx
;
.order_header
{
display
:
flex
;
...
...
@@ -267,31 +273,41 @@ export default {
font-size
:
28
rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#
000000
;
color
:
#
333333
;
}
.order_time
{
font-size
:
2
0
rpx
;
font-size
:
2
4
rpx
;
font-family
:
ArialMT
;
color
:
#
666666
;
color
:
#
999999
;
}
.order_status
{
font-size
:
24
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
500
;
color
:
#000000
;
margin-top
:
10
rpx
;
font-weight
:
400
;
color
:
#999999
;
display
:
flex
;
align-items
:
baseline
;
justify-content
:
flex-start
;
.xiaojiantou
{
width
:
12
rpx
;
height
:
16
rpx
;
margin-left
:
5
rpx
;
}
}
}
.order_content
{
margin-top
:
38
rpx
;
margin-top
:
42
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.order_content_box1{
flex
:
1
;
}
.qr_code
{
font-size
:
16
rpx
;
...
...
@@ -300,43 +316,54 @@ export default {
color
:
#666666
;
line-height
:
22
rpx
;
text-align
:
center
;
margin-right
:
1
5
rpx
;
margin-
top
:
30
rpx
;
margin-right
:
1
0
rpx
;
margin-
left
:
39
rpx
;
.qr_code_img
{
width
:
76
rpx
;
height
:
76
rpx
;
}
.qr_text
{
margin-top
:
10
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
}
}
.goods_item
{
display
:
flex
;
align-items
:
center
;
margin-top
:
10
rpx
;
.goods_img
{
height
:
80
rpx
;
width
:
80
rpx
;
height
:
96
rpx
;
width
:
96
rpx
;
background-color
:
#eee
;
}
.goods_text
{
margin-left
:
38
rpx
;
margin-left
:
22
rpx
;
flex
:
1
;
.goods_title
{
font-size
:
28
rpx
;
font-family
:
PingFangSC-
Medium
,
PingFang
SC
;
font-weight
:
6
00
;
color
:
#
000000
;
font-family
:
PingFangSC-
Regular
,
PingFang
SC
;
font-weight
:
4
00
;
color
:
#
666666
;
}
.goods_spce
{
margin-top
:
2
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
margin-top
:
6
rpx
;
color
:
#999999
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
}
...
...
@@ -348,29 +375,33 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
50
rpx
;
margin-top
:
28
rpx
;
.total
{
font-size
:
2
4
rpx
;
font-size
:
2
8
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
.price
{
color
:
#FF5200
;
font-weight
:
700
font-size
:
28
rpx
;
font-family
:
Futura-Medium
,
Futura
;
font-weight
:
500
;
color
:
#666666
;
letter-spacing
:
1
rpx
;
}
}
.btn
{
width
:
1
44
rpx
;
height
:
48
rpx
;
line-height
:
48
rpx
;
background
:
#006ECF
;
b
order-radius
:
6
rpx
;
width
:
1
67
rpx
;
height
:
64
rpx
;
line-height
:
64
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
b
ackground
:
#003AE9
;
font-size
:
24
rpx
;
margin
:
0
;
color
:
#fff
;
font-weight
:
400
;
text-align
:
center
;
}
}
...
...
request/menu/index.js
View file @
c0cb8258
import
{
$EventBus
}
from
'@/utils/EventBus'
;
import
context
from
'../../main.js'
export
default
{
// 获取菜单列表
getMenuList
(
id
)
{
...
...
@@ -12,7 +13,7 @@ export default {
return
res
;
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
});
},
// 获取点单屏幕的订单信息
...
...
@@ -26,7 +27,7 @@ export default {
return
res
;
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
,
});
...
...
@@ -64,7 +65,8 @@ export default {
// 业务逻辑。。。
},
fail
:
function
(
err
)
{
uni
.
showToast
({
console
.
log
(
context
)
context
.
showToast
({
title
:
'支付失败'
,
icon
:
'error'
,
});
...
...
static/imgs/xiaojiantou.png
0 → 100644
View file @
c0cb8258
781 Bytes
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