Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
de4529df
Commit
de4529df
authored
Jun 09, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新支付
parent
93c616f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
13 deletions
+32
-13
pay.vue
components/pay/pay.vue
+5
-5
cart.vue
pages/cart/cart.vue
+25
-2
order-submit.vue
pages/order-submit/order-submit.vue
+2
-6
No files found.
components/pay/pay.vue
View file @
de4529df
...
...
@@ -42,11 +42,12 @@ export default {
this
.
$emit
(
'closePay'
);
},
getDataInfo
()
{
let
that
=
this
;
let
msg
=
{
OpenId
:
'ow_7I5XC1-RGwwk8QANBmWKYKmOc'
,
OrderId
:
'1'
,
OrderPayType
:
1
,
GoodsName
:
'测试商品名称'
OpenId
:
that
.
payInfo
.
OpenId
,
OrderId
:
that
.
payInfo
.
OrderId
,
OrderPayType
:
that
.
payInfo
.
OrderPayType
,
GoodsName
:
that
.
payInfo
.
GoodsName
};
this
.
request2
(
{
...
...
@@ -54,7 +55,6 @@ export default {
data
:
msg
},
res
=>
{
console
.
log
(
'res'
,
res
);
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
}
...
...
pages/cart/cart.vue
View file @
de4529df
...
...
@@ -171,10 +171,13 @@
</view>
<tabbars></tabbars>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</div>
</template>
<
script
>
import
tabbars
from
'@/components/tabbar/index'
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
data
()
{
return
{
...
...
@@ -199,12 +202,14 @@ export default {
pageIndex
:
1
,
pageSize
:
50
,
Name
:
''
}
},
showAuth
:
false
};
},
created
()
{},
components
:
{
tabbars
tabbars
,
auth
},
onLoad
()
{
this
.
navHeight
=
this
.
$navHeight
-
2
;
...
...
@@ -215,6 +220,16 @@ export default {
if
(
this
.
cstyle
.
cat_style
==
'4'
)
{
}
},
onShow
(){
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
...
...
@@ -234,6 +249,14 @@ export default {
this
.
init
();
},
methods
:
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
showAuth
=
false
;
},
//关闭登录窗口
gbAuth
(){
this
.
showAuth
=
false
;
},
goHome
()
{
uni
.
redirectTo
({
url
:
'/pages/index/main'
...
...
pages/order-submit/order-submit.vue
View file @
de4529df
...
...
@@ -246,7 +246,7 @@ export default {
if
(
option
.
ShoppingCartIdList
)
{
this
.
ShoppingCartIdList
=
JSON
.
parse
(
option
.
ShoppingCartIdList
);
}
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
;
// else {
// uni.redirectTo({
// url: '/pages/index/index'
...
...
@@ -255,6 +255,7 @@ export default {
this
.
initPage
();
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
},
onShow
()
{
this
.
init
();
...
...
@@ -287,7 +288,6 @@ export default {
// 提交订单
submitOrderHandler
()
{
let
that
=
this
;
console
.
log
(
'that.adressInfo'
,
this
.
adressInfo
);
if
(
that
.
adressInfo
.
Consignee
==
''
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'请选择收货信息!'
,
...
...
@@ -324,7 +324,6 @@ export default {
data
:
form
},
res
=>
{
console
.
log
(
'res'
,
res
);
if
(
res
.
resultCode
==
1
)
{
that
.
payBtn
=
true
;
that
.
payInfo
.
OrderId
=
res
.
data
.
OrderId
;
...
...
@@ -415,7 +414,6 @@ export default {
data
:
{
ProductList
:
ProductList
}
},
res
=>
{
console
.
log
(
'优惠券'
,
res
);
if
(
res
.
resultCode
==
1
)
{
this
.
couponList
=
res
.
data
;
}
...
...
@@ -460,7 +458,6 @@ export default {
this
.
$forceUpdate
();
},
chosenAddress
(
id
)
{
console
.
log
(
'chosenAddress'
);
uni
.
navigateTo
({
url
:
'/pages/address/address?form=ordersubmit&id='
+
id
});
...
...
@@ -500,7 +497,6 @@ export default {
this
.
address
=
res
.
data
.
address
;
this
.
mchs
=
res
.
data
.
mch_list
;
this
.
payInfo
.
GoodsName
=
this
.
mchs
[
0
].
goods_list
[
0
].
name
;
console
.
log
(
'this.payInfo.GoodsName'
,
this
.
payInfo
.
GoodsName
);
this
.
ds
=
res
.
data
;
this
.
expressPrice
=
0.0
;
this
.
goodPrice
=
0.0
;
...
...
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