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
f9b3aea7
Commit
f9b3aea7
authored
May 29, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
d21fc2dc
9d93c931
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
5 deletions
+76
-5
manifest.json
manifest.json
+5
-4
pages.json
pages.json
+6
-1
pay.vue
pages/pay/pay/pay.vue
+65
-0
No files found.
manifest.json
View file @
f9b3aea7
...
...
@@ -57,9 +57,10 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"appid"
:
"
wxacd9f8cc3480d29e
"
,
"setting"
:
{
"urlCheck"
:
false
"urlCheck"
:
false
,
"minified"
:
false
},
"usingComponents"
:
true
},
...
...
@@ -72,7 +73,7 @@
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
"uniStatistics"
:
{
"enable"
:
false
}
}
pages.json
View file @
f9b3aea7
...
...
@@ -2,7 +2,11 @@
"easycom"
:
{
"^u-(.*)"
:
"uview-ui/components/u-$1/u-$1.vue"
},
"pages"
:
[{
"pages"
:
[
{
"path"
:
"pages/pay/pay/pay"
},
{
"path"
:
"pages/user-center/user-center"
},
{
"path"
:
"pages/cart/cart"
...
...
@@ -74,6 +78,7 @@
,{
"path"
:
"pages/coupon/details/details"
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/pay/pay/pay.vue
0 → 100644
View file @
f9b3aea7
<
template
>
<view>
<u-button
@
click=
"Pay"
>
支付
</u-button>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
payInfo
:{},
}
},
created
(){
this
.
getDataInfo
();
},
methods
:
{
getDataInfo
()
{
let
msg
=
{
"OpenId"
:
"ow_7I5XC1-RGwwk8QANBmWKYKmOc"
,
"OrderId"
:
"1"
,
"OrderPayType"
:
1
,
"GoodsName"
:
"测试商品名称"
}
this
.
request2
(
{
url
:
'/api/WeChatPay/GetPayInfo'
,
data
:
msg
},
res
=>
{
console
.
log
(
"res"
,
res
);
if
(
res
.
resultCode
==
1
){
this
.
payInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
"getDataInfo"
,
this
.
payInfo
);
}
uni
.
hideNavigationBarLoading
();
}
);
},
Pay
(){
let
payInfo
=
this
.
payInfo
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
timeStamp
:
this
.
payInfo
.
timeStamp
,
nonceStr
:
this
.
payInfo
.
nonceStr
,
package
:
this
.
payInfo
.
package
,
signType
:
this
.
payInfo
.
signType
,
paySign
:
''
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
)
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
}
});
},
}
}
</
script
>
<
style
>
</
style
>
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