Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9b8b107d
authored
Jul 19, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
cc47e974
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
59 deletions
api/module/shopmall.js
packageMall/pages/pay/pay.js
packageMall/pages/pay/pay.wxml
api/module/shopmall.js
View file @
9b8b107
...
...
@@ -147,4 +147,8 @@ module.exports = {
...
data
})
},
requestSubscribeMessage
()
{
return
api
.
fetch
(
'scrm.api.shopmall.weapp.order.listSubscribeMsgTemplateIds'
)
},
}
\ No newline at end of file
packageMall/pages/pay/pay.js
View file @
9b8b107
...
...
@@ -411,6 +411,10 @@ Page({
})
},
requestSubscribeMessage
()
{
wx
.
p
.
router
.
reLaunch
(
'/packageMine/pages/order/complete/complete'
,
{
success
:
true
})
return
let
systemInfo
=
wx
.
p
.
storage
.
get
(
'system_info'
)
if
(
systemInfo
&&
systemInfo
.
environment
!=
'wxwork'
)
{
wx
.
p
.
router
.
reLaunch
(
'/packageShopmall/packageMine/pages/order/complete/complete'
,
{
...
...
@@ -472,41 +476,6 @@ Page({
showSuccessModal
:
false
})
},
toPayOrder
(
orderCode
)
{
wx
.
p
.
api
.
shopmallApi
.
platformGoodsPayOrder
({
orderCode
,
paymentSource
:
1
}).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
)
{
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
res
.
payParams
wx
.
requestPayment
({
timeStamp
:
timeStamp
,
nonceStr
:
nonceStr
,
package
:
packages
,
signType
:
signType
,
paySign
:
paySign
,
success
()
{
wx
.
p
.
router
.
reLaunch
(
'/packageMine/pages/order/complete/complete'
,
{
success
:
true
})
},
fail
(
res
)
{
if
(
res
.
errMsg
==
'requestPayment:fail cancel'
)
{
wx
.
p
.
wxApi
.
showToast
(
'取消支付'
)
}
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
packageMall/pages/pay/pay.wxml
View file @
9b8b107
<view class="layout" style="padding-bottom:{{padding_bottom }}px">
<view class="box">
<block wx:if="{{addressFlag}}">
<block wx:if="{{shopFlag && shopCartFlag}}">
<view class="address-box" bindtap="jump">
<block wx:if="{{contactInfo.contactAddress}}">
<view class="left">
<view class="top">
<view class="name text-hide">{{contactInfo.contactName}}</view>
<block wx:if="{{isDefault}}">
<view class="default text-center">默认地址</view>
</block>
<view class="phone">{{contactInfo.contactPhone}}</view>
<block wx:if="{{shopFlag && shopCartFlag}}">
<view class="address-box" bindtap="jump">
<block wx:if="{{contactInfo.contactAddress}}">
<view class="left">
<view class="top">
<view class="name text-hide">{{contactInfo.contactName}}</view>
<block wx:if="{{isDefault}}">
<view class="default text-center">默认地址</view>
</block>
<view class="phone">{{contactInfo.contactPhone}}</view>
</view>
<view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
</view>
</block>
<block wx:else>
选择收货地址
</block>
<view class="right text-center">
<view class="icon">
<glsx-image src="mine/mine-arrow.png"></glsx-image>
</view>
<view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
</view>
</block>
<block wx:else>
选择收货地址
</block>
<view class="right text-center">
<view class="icon">
<glsx-image src="mine/mine-arrow.png"></glsx-image>
</view>
</view>
</view>
</block>
</block>
</block>
<view class="content-box">
<view class="merchantName text-hide">
...
...
@@ -105,8 +105,10 @@
<!-- 支付成功 -->
<view wx:if="{{showSuccessModal}}" class="modal-container flex_ccc">
<view class="modal-body">
<glsx-image webp src="equity/return_success.png" class="icon"></glsx-image>
<view class="text">支付成功</view>
<view class="btn flex_ccc" catch:tap="closeSuccessModal">我知道了</view>
<view class="icon">
<glsx-image webp src="equity/return_success.png"></glsx-image>
</view>
<view class="text">支付成功</view>
<view class="btn flex_ccc" catch:tap="closeSuccessModal">我知道了</view>
</view>
</view>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment