Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
ea73a5b2
Commit
ea73a5b2
authored
Mar 15, 2023
by
珠峰架构
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付
parent
e4e2df2e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
26 deletions
+112
-26
pages.json
pages.json
+12
-2
pages/h5/index.vue
pages/h5/index.vue
+9
-2
pages/h5/pay.vue
pages/h5/pay.vue
+53
-0
pages/index/index.vue
pages/index/index.vue
+30
-21
shopro/request/apis.js
shopro/request/apis.js
+5
-0
shopro/request/index.js
shopro/request/index.js
+1
-1
shopro/store/modules/user.js
shopro/store/modules/user.js
+2
-0
No files found.
pages.json
View file @
ea73a5b2
...
@@ -47,6 +47,16 @@
...
@@ -47,6 +47,16 @@
}
}
}
}
,{
"path"
:
"pages/h5/pay"
,
"name"
:
"pay"
,
"style"
:
{
"navigationBarTitleText"
:
"支付"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"subPackages"
:[],
"subPackages"
:[],
"tabBar"
:
{
"tabBar"
:
{
...
@@ -84,8 +94,8 @@
...
@@ -84,8 +94,8 @@
"current"
:
0
,
//当前激活的模式(list
的索引项)
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
"list"
:
[
{
{
"name"
:
"
index
"
,
//模式名称
"name"
:
"
pay
"
,
//模式名称
"path"
:
"/pages/
index/index
"
//启动页面,必选
"path"
:
"/pages/
h5/pay
"
//启动页面,必选
}
}
]
]
},
},
...
...
pages/h5/index.vue
View file @
ea73a5b2
<
template
>
<
template
>
<view>
<view>
<web-view
@
message=
"handleMsg"
:src=
'webUrl'
></web-view>
<web-view
@
message=
"handleMsg"
:src=
'webUrl'
></web-view>
</view>
</view>
</
template
>
</
template
>
...
@@ -12,11 +12,18 @@
...
@@ -12,11 +12,18 @@
}
}
}
,
}
,
onReady
(){
onReady
(){
this
.
webUrl
=
"
https://wx.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=134581110000230&companyId=00000310&time=
"
+
new
Date
().
getTime
()
// this.webUrl = "http://172.18.0.147:8000/#/?time="+new Date().getTime()
console
.
log
(
this
.
webUrl
)
this
.
webUrl
=
"
https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=171795610000098&time=
"
+
new
Date
().
getTime
()
// this.webUrl = "https://wx.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=134581110000230&companyId=00000310&time="+new Date().getTime()
},
},
methods
:{
methods
:{
handleMsg
(
e
){
handleMsg
(
e
){
console
.
log
(
e
)
console
.
log
(
e
)
console
.
log
(
'
接收到消息:
'
+
JSON
.
stringify
(
e
.
detail
.
data
));
uni
.
navigateToMiniProgram
({
orderId
:
data
.
orderId
,
});
}
}
},
},
onLoad
(){
onLoad
(){
...
...
pages/h5/pay.vue
0 → 100644
View file @
ea73a5b2
<
template
>
<view>
<button
@
click=
"pay"
>
测试小程序支付
</button>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
}
},
methods
:
{
pay
()
{
let
params
=
{
"
prepay_id
"
:
"
wx151613092294758229d4369b2a414d0000
"
,
"
appId
"
:
"
wx60c6530c49c52ff7
"
,
"
timeStamp
"
:
"
1678867989
"
,
"
nonceStr
"
:
"
1gaLpfAGDaG70y7SlQMd4GDfd0SzhP8j
"
,
"
package
"
:
"
prepay_id=wx151613092294758229d4369b2a414d0000
"
,
"
signType
"
:
"
RSA
"
,
"
paySign
"
:
"
DEZRfCE2eCZ5Oi+jzEx2qtnSZiDzqy0GE7GRHOfjf1zmwZXpE+OgW6+7ExpmHInNWmiBRoxuDX6TpjM1O/B1241yNi47buf2IsuLE49nlPqw/o0lv1o9zBav/7elM0o3d7jLTljhR6GguEpcBmwNkaFJGYmvO2kS3Llzwl+RHJUPTcfs3YgWFtdJTRhul9aBuIs0ZUAG3qSWIawipBfFBGUYBLusn6+ebYh+SRzOEPZSV8N5lEbLd8CqYq7CxNuJVG5IYZlva3cWRmK8f3R6F/t2gTQveFlI8jEl1OK5ZqEjvYi1ct64DHYtbUl/kzl4pMJAZweQnNbZk8bYQwPGsA==
"
}
console
.
log
(
params
)
wx
.
requestPayment
({
appId
:
params
.
appId
,
timeStamp
:
params
.
timeStamp
,
nonceStr
:
params
.
nonceStr
,
package
:
params
.
nonceStr
,
signType
:
params
.
signType
,
paySign
:
params
.
paySign
,
success
(
res
)
{
console
.
log
(
"
小程序成功。。。。
"
)
console
.
log
(
res
)
},
fail
(
res
)
{
console
.
log
(
"
shibai 。。。。
"
)
console
.
log
(
res
)
}
})
}
},
}
</
script
>
<
style
>
</
style
>
pages/index/index.vue
View file @
ea73a5b2
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
</view>
</view>
</view>
</view>
<image
src=
"../../static/img/run/ranking_btn.png"
class=
"ranking_btn"
mode=
"widthFix"
></image>
<image
src=
"../../static/img/run/ranking_btn.png"
class=
"ranking_btn"
mode=
"widthFix"
></image>
<!-- open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" -->
<!--
<button
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
>
1111
</button>
-->
</view>
</view>
</view>
</view>
<u-tabbar
:value=
"tabBarVal"
@
change=
"changeTabBar"
:fixed=
"true"
:placeholder=
"true"
activeColor=
"#00c791"
:safeAreaInsetBottom=
"true"
>
<u-tabbar
:value=
"tabBarVal"
@
change=
"changeTabBar"
:fixed=
"true"
:placeholder=
"true"
activeColor=
"#00c791"
:safeAreaInsetBottom=
"true"
>
...
@@ -44,7 +46,11 @@
...
@@ -44,7 +46,11 @@
data
()
{
data
()
{
return
{
return
{
todayNum
:
0
,
todayNum
:
0
,
tabBarVal
:
'
步数
'
tabBarVal
:
'
步数
'
,
registerPopup
:
true
,
form
:{
name
:
'
xxx
'
},
tips
:
'
获取
'
,
seconds
:
10
}
}
},
},
computed
:
{
computed
:
{
...
@@ -60,10 +66,10 @@
...
@@ -60,10 +66,10 @@
success
:
function
(
res
)
{
success
:
function
(
res
)
{
wRunEncryptedData
.
encryptedData
=
res
.
encryptedData
wRunEncryptedData
.
encryptedData
=
res
.
encryptedData
wRunEncryptedData
.
iv
=
res
.
iv
wRunEncryptedData
.
iv
=
res
.
iv
console
.
log
(
wRunEncryptedData
)
http
(
'
user.wxRun
'
,
wRunEncryptedData
).
then
(
res
=>
{
http
(
'
user.wxRun
'
,
wRunEncryptedData
).
then
(
res
=>
{
if
(
!
res
.
code
&&
res
.
data
)
{
if
(
!
res
.
code
&&
res
.
data
)
{
that
.
todayNum
=
res
.
data
.
todayNum
;
// that.todayNum = res.data.todayNum;
that
.
todayNum
=
0
;
console
.
log
(
that
.
todayNum
)
console
.
log
(
that
.
todayNum
)
}
else
{
}
else
{
that
.
todayNum
=
0
;
that
.
todayNum
=
0
;
...
@@ -75,13 +81,19 @@
...
@@ -75,13 +81,19 @@
},
},
changeTabBar
(
name
){
changeTabBar
(
name
){
this
.
tabBarVal
=
name
;
this
.
tabBarVal
=
name
;
console
.
log
(
name
)
console
.
log
(
name
)
if
(
name
==
'
商城
'
)
{
if
(
name
==
'
商城
'
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
url
:
'
/pages/h5/index
'
,
})
})
}
}
}
},
getPhoneNumber
(
e
)
{
if
(
!
e
.
detail
.
code
){
this
.
$u
.
toast
(
e
.
detail
.
code
);
}
},
},
},
onHide
(){
onHide
(){
},
},
...
@@ -114,7 +126,7 @@
...
@@ -114,7 +126,7 @@
console
.
log
(
this
.
registerInfo
)
console
.
log
(
this
.
registerInfo
)
http
(
'
user.register
'
,
this
.
registerInfo
).
then
(
res
=>
{
http
(
'
user.register
'
,
this
.
registerInfo
).
then
(
res
=>
{
if
(
!
res
.
code
)
{
if
(
!
res
.
code
)
{
// this.getWeRunData()
}
else
{
}
else
{
// that.$u.toast(res.msg);
// that.$u.toast(res.msg);
}
}
...
@@ -188,16 +200,13 @@
...
@@ -188,16 +200,13 @@
}
}
}
}
// .footer {
.registre-popup
{
// position: fixed;
margin
:
60rpx
0
;
// bottom: 0;
padding
:
0
40rpx
;
// background: red;
.btn
{
// display: flex;
// width: 100%;
}
// li{
}
// flex: 1;
// }
// }
}
}
.u-page__item__slot-icon
{
.u-page__item__slot-icon
{
...
...
shopro/request/apis.js
View file @
ea73a5b2
...
@@ -24,6 +24,11 @@ export default {
...
@@ -24,6 +24,11 @@ export default {
auth
:
true
,
auth
:
true
,
method
:
"
post
"
method
:
"
post
"
},
},
getPh
:{
url
:
'
mall/miniProgram/wxRun
'
,
auth
:
true
,
method
:
"
post
"
}
},
},
...
...
shopro/request/index.js
View file @
ea73a5b2
...
@@ -18,7 +18,7 @@ export default function http(
...
@@ -18,7 +18,7 @@ export default function http(
throw
(
`暂未登录,已阻止此次API请求: '
${
api
.
url
}
'`
);
throw
(
`暂未登录,已阻止此次API请求: '
${
api
.
url
}
'`
);
}
}
token
&&
shoproRequest
.
setConfig
(
config
=>
{
token
&&
shoproRequest
.
setConfig
(
config
=>
{
config
.
header
.
mpAuthor
=
token
config
.
header
.
mp
o
Author
=
token
})
})
if
(
toastBefore
!==
''
)
{
if
(
toastBefore
!==
''
)
{
uni
.
showLoading
({
uni
.
showLoading
({
...
...
shopro/store/modules/user.js
View file @
ea73a5b2
...
@@ -37,6 +37,8 @@ const actions = {
...
@@ -37,6 +37,8 @@ const actions = {
}
else
{
}
else
{
uni
.
login
({
uni
.
login
({
success
:
function
(
info
)
{
success
:
function
(
info
)
{
console
.
log
(
"
获取手机号======
"
)
console
.
log
(
info
)
let
code
=
info
.
code
;
let
code
=
info
.
code
;
http
(
'
user.getHomePage
'
,
{
http
(
'
user.getHomePage
'
,
{
code
:
code
,
code
:
code
,
...
...
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