Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-weapp-smartshop
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 cba93ad0
authored
Mar 22, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!12
2 parents
353ebb37
fb6b64bb
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
202 additions
and
19 deletions
packagesPayment/environment.js
packagesPayment/pages/QRPayment/QRPayment.js
packagesPayment/pages/QRPayment/QRPayment.wxml
packagesPayment/pages/QRPayment/QRPayment.wxss
packagesPayment/pages/payment/index.js
packagesPayment/pages/payment/index.wxml
packagesPayment/pages/payment/index.wxss
project.private.config.json
utils/restapi.js
packagesPayment/environment.js
View file @
cba93ad
...
@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync()
...
@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
manual
=
false
const
release
=
false
const
release
=
false
let
index
=
1
let
index
=
3
// 判断小程序环境
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// develop:开发版(正常开发工具,测试时)
...
...
packagesPayment/pages/QRPayment/QRPayment.js
View file @
cba93ad
...
@@ -32,7 +32,8 @@ Page({
...
@@ -32,7 +32,8 @@ Page({
workWechatQrcode
:
''
,
workWechatQrcode
:
''
,
qrcodeType
:
''
,
qrcodeType
:
''
,
userCollaborationName
:
''
,
userCollaborationName
:
''
,
userCollaborationCheck
:
false
userCollaborationCheck
:
false
,
isYqType
:
true
},
},
/**
/**
...
@@ -120,12 +121,15 @@ Page({
...
@@ -120,12 +121,15 @@ Page({
const
[
key
,
val
]
=
item
.
split
(
'='
)
const
[
key
,
val
]
=
item
.
split
(
'='
)
op
[
key
]
=
val
op
[
key
]
=
val
})
})
// 区分是流量方还是园区店
let
isYqType
=
Boolean
(
op
?.
merchantId
)
this
.
setData
({
this
.
setData
({
...
op
...
op
,
isYqType
})
})
// 获取质保卡配置
// 获取质保卡配置
this
.
getwxQrcode
()
isYqType
&&
this
.
getwxQrcode
()
//util.showLoading('加载中...')
//util.showLoading('加载中...')
console
.
log
(
op
)
console
.
log
(
op
)
...
@@ -233,18 +237,23 @@ Page({
...
@@ -233,18 +237,23 @@ Page({
// 支付
// 支付
handlePay
()
{
handlePay
()
{
let
_this
=
this
let
_this
=
this
const
{
payMoney
,
merchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
}
=
this
.
data
const
{
payMoney
,
merchantId
,
isYqType
,
shopMerchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
}
=
this
.
data
if
(
userCollaborationName
&&
!
userCollaborationCheck
)
{
if
(
userCollaborationName
&&
!
userCollaborationCheck
)
{
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
}
}
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
// this.wxPayment(payMoney)
// this.wxPayment(payMoney)
// console.log(Number(payMoney), '付款')
// console.log(Number(payMoney), '付款')
let
params
=
{
let
params
=
{
merchantId
,
openId
,
openId
,
receivedMoney
:
payMoney
*
100
receivedMoney
:
payMoney
*
100
}
}
if
(
isYqType
)
{
params
.
merchantId
=
merchantId
}
else
{
params
.
shopMerchantId
=
shopMerchantId
}
util
.
showLoading
(
'加载中...'
)
util
.
showLoading
(
'加载中...'
)
// 调用支付接口生成对应的微信支付参数
// 调用支付接口生成对应的微信支付参数
// console.log(params)
// console.log(params)
...
...
packagesPayment/pages/QRPayment/QRPayment.wxml
View file @
cba93ad
...
@@ -6,10 +6,14 @@
...
@@ -6,10 +6,14 @@
<view class="pay-header payCompanyInfo">
<view class="pay-header payCompanyInfo">
<!-- <view class=""> -->
<!-- <view class=""> -->
<image class="shopIcon" src="../../../images/shopIcon.png" />
<image class="shopIcon" src="../../../images/shopIcon.png" />
<view class="company">
<view class="company"
wx:if="{{isYqType}}"
>
<view class="company-name">深圳市嘀加智慧云服务有限公司</view>
<view class="company-name">深圳市嘀加智慧云服务有限公司</view>
<view class="company-yqd">{{merchantName}}</view>
<view class="company-yqd">{{merchantName}}</view>
</view>
</view>
<view class="company center" wx:else>
<!-- <view class="company-name" >深圳市嘀加智慧云服务有限公司</view> -->
<view class="company-name">{{shopMerchantName}}</view>
</view>
<!-- 付款给企业 -->
<!-- 付款给企业 -->
<!-- <view class="company-name">(深圳****公司)</view> -->
<!-- <view class="company-name">(深圳****公司)</view> -->
<!-- </view> -->
<!-- </view> -->
...
@@ -75,13 +79,13 @@
...
@@ -75,13 +79,13 @@
支付成功
支付成功
</view>
</view>
<view class="line" />
<view class="line" />
<view class="orderInfo">
<view
wx:if="{{isYqType}}"
class="orderInfo">
<view class="label">收款主体</view>
<view class="label">收款主体</view>
<view class="info">深圳市嘀加智慧云服务有限公司</view>
<view class="info">深圳市嘀加智慧云服务有限公司</view>
</view>
</view>
<view class="orderInfo">
<view class="orderInfo">
<view class="label">商户名称</view>
<view class="label">商户名称</view>
<view class="info">{{merchantName}}</view>
<view class="info">{{merchantName
|| shopMerchantName
}}</view>
</view>
</view>
<view class="orderInfo">
<view class="orderInfo">
<view class="label">支付订单号</view>
<view class="label">支付订单号</view>
...
...
packagesPayment/pages/QRPayment/QRPayment.wxss
View file @
cba93ad
...
@@ -25,12 +25,15 @@
...
@@ -25,12 +25,15 @@
margin-top: 15rpx;
margin-top: 15rpx;
font-size: 24rpx;
font-size: 24rpx;
}
}
.userCollaborationContainer .radio {
.userCollaborationContainer .radio {
margin-top: -4rpx;
margin-top: -4rpx;
}
}
.userCollaborationContainer .label {
.userCollaborationContainer .label {
min-width: 180rpx;
min-width: 180rpx;
}
}
.linkText {
.linkText {
color: #3582EE;
color: #3582EE;
}
}
...
@@ -48,6 +51,14 @@
...
@@ -48,6 +51,14 @@
margin-left: 20rpx;
margin-left: 20rpx;
}
}
.pay-header .center {
/* display: flex; */
justify-content: center;
/* height: 88rpx;
flex-direction: column;
margin-left: 20rpx; */
}
.company-name {
.company-name {
font-size: 32rpx;
font-size: 32rpx;
color: #333;
color: #333;
...
...
packagesPayment/pages/payment/index.js
View file @
cba93ad
...
@@ -4,6 +4,7 @@ var app = getApp()
...
@@ -4,6 +4,7 @@ var app = getApp()
import
api
from
'../../restapi'
import
api
from
'../../restapi'
import
util
from
'../../../utils/util.js'
import
util
from
'../../../utils/util.js'
Page
(
Page
(
// {
filter
.
identityFilter
({
filter
.
identityFilter
({
/**
/**
* 页面的初始数据
* 页面的初始数据
...
@@ -12,29 +13,41 @@ Page(
...
@@ -12,29 +13,41 @@ Page(
authToast
:
false
,
// 是否显示授权提示框
authToast
:
false
,
// 是否显示授权提示框
authType
:
true
,
// 授权类型(true:授权用户信息;false:授权手机号)
authType
:
true
,
// 授权类型(true:授权用户信息;false:授权手机号)
sceneId
:
''
,
sceneId
:
''
,
ajaxing
:
false
ajaxing
:
false
,
paySuccess
:
false
// paySuccess: true
},
},
onLogin
()
{
onLogin
()
{
util
.
showLoading
(
'加载中...'
)
util
.
showLoading
(
'加载中...'
)
console
.
log
(
app
.
globalData
)
if
(
app
.
globalData
.
userInfo
||
app
.
globalData
.
userInfo
.
phone
)
{
this
.
getScenInfo
()
this
.
getScenInfo
()
}
console
.
log
(
app
.
globalData
)
// if (app.globalData.userInfo || app.globalData.userInfo.phone) {
// }
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
// options. scene= 'sceneId=10683'
// let options = {
// let options = {
// scene: 'sceneId=6783'
// scene: 'sceneId=6783'
// }
// }
wx
.
hideHomeButton
({
success
:
function
()
{
console
.
log
(
'隐藏成功!'
)
}
})
console
.
log
(
options
)
console
.
log
(
options
)
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
console
.
log
(
id
,
'id'
)
this
.
setData
({
this
.
setData
({
sceneId
:
id
sceneId
:
id
})
})
util
.
showLoading
(
'加载中...'
)
this
.
getScenInfo
()
},
},
/**
/**
...
@@ -63,6 +76,9 @@ Page(
...
@@ -63,6 +76,9 @@ Page(
util
.
hideLoading
()
util
.
hideLoading
()
console
.
log
(
JSON
.
parse
(
res
.
data
))
console
.
log
(
JSON
.
parse
(
res
.
data
))
let
o
=
res
.
data
?
JSON
.
parse
(
res
.
data
)
:
{}
let
o
=
res
.
data
?
JSON
.
parse
(
res
.
data
)
:
{}
this
.
setData
({
o
})
_this
.
wxPayment
(
o
)
_this
.
wxPayment
(
o
)
})
})
},
},
...
@@ -84,14 +100,29 @@ Page(
...
@@ -84,14 +100,29 @@ Page(
signType
:
'MD5'
,
signType
:
'MD5'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
wx
.
redirectTo
({
_this
.
setData
({
url
:
'/packagePersonal/pages/boutiqueList/boutiqueList'
paySuccess
:
true
,
dataTime
:
new
Date
().
format
(
'yyyy/MM/dd hh:mm'
)
})
wx
.
setNavigationBarTitle
({
title
:
'支付成功'
,
})
})
// wx.redirectTo({
// url: '/packagePersonal/pages/boutiqueList/boutiqueList'
// })
},
},
fail
:
function
(
error
)
{
fail
:
function
(
error
)
{
wx
.
switchTab
({
// wx.switchTab({
url
:
'/pages/tab/index/index'
// url: '/pages/tab/index/index'
// })
wx
.
showToast
({
title
:
'支付失败'
,
icon
:
'error'
})
})
// wx.showToast({
// title: '支付请求失败',
// icon: 'error'
// })
}
}
})
})
},
},
...
@@ -99,6 +130,10 @@ Page(
...
@@ -99,6 +130,10 @@ Page(
// 获取订单信息
// 获取订单信息
getScenInfo
()
{
getScenInfo
()
{
let
id
=
this
.
data
.
sceneId
let
id
=
this
.
data
.
sceneId
console
.
log
(
this
.
data
)
// console.log();
console
.
log
(
id
)
// debugger
if
(
id
)
{
if
(
id
)
{
//let id = decodeURIComponent(options.scene).split('=')[1]
//let id = decodeURIComponent(options.scene).split('=')[1]
//let id = options.sceneId;
//let id = options.sceneId;
...
@@ -116,6 +151,9 @@ Page(
...
@@ -116,6 +151,9 @@ Page(
const
[
key
,
val
]
=
item
.
split
(
'='
)
const
[
key
,
val
]
=
item
.
split
(
'='
)
op
[
key
]
=
val
op
[
key
]
=
val
})
})
this
.
setData
({
...
op
})
//util.showLoading('加载中...')
//util.showLoading('加载中...')
console
.
log
(
op
)
console
.
log
(
op
)
this
.
getInfo
(
op
)
this
.
getInfo
(
op
)
...
@@ -126,4 +164,5 @@ Page(
...
@@ -126,4 +164,5 @@ Page(
}
}
}
}
})
})
// }
)
)
packagesPayment/pages/payment/index.wxml
View file @
cba93ad
<!--支付-->
<!--支付-->
<view class="page">
<view class="page">
<view class="success-Container" wx:if="{{paySuccess}}">
<!-- <view class="amountOfMoney">¥ {{payMoney}}</view> -->
<view class="success-tips">
<image class="successIcon" src="../../../images/successIcon.png" />
支付成功
</view>
<view class="line" />
<view class="orderInfo">
<view class="label">收款主体</view>
<view class="info">深圳市嘀加智慧云服务有限公司</view>
</view>
<!-- <view class="orderInfo">
<view class="label">商户名称</view>
<view class="info">{{merchantName || shopMerchantName}}</view>
</view> -->
<view class="orderInfo">
<view class="label">支付订单号</view>
<view class="info">{{orderCode}}</view>
</view>
<view class="orderInfo">
<view class="label">支付时间</view>
<view class="info">{{dataTime}}</view>
</view>
</view>
</view>
</view>
<auth-setting auth='{{authToast}}' type='{{authType}}' index />
<auth-setting auth='{{authToast}}' type='{{authType}}' index />
\ No newline at end of file
\ No newline at end of file
packagesPayment/pages/payment/index.wxss
View file @
cba93ad
/* packagesPayment/pages/payment/index.wxss */
/* packagesPayment/pages/payment/index.wxss */
.success-Container {
padding: 100rpx 76rpx 0;
text-align: center;
background-color: #fff;
height: 100vh;
}
.amountOfMoney {
font-size: 80rpx;
font-weight: 600;
}
.success-tips {
display: flex;
align-items: center;
justify-content: center;
font-size: 48rpx;
margin-bottom: 30rpx;
}
.successIcon {
width: 64rpx;
height: 64rpx;
margin-right: 30rpx;
}
.orderInfo {
display: flex;
justify-content: space-between;
}
.success-Container {
box-sizing: border-box;
display: flex;
flex-direction: column;
/* justify-content: center; */
align-items: center;
}
.success-Container .line {
height: 1px;
width: 100%;
margin: 28rpx 0;
background: #E5E5E5;
}
.success-Container .orderInfo {
width: 100%;
margin-bottom: 28rpx;
}
.success-Container .label {
font-size: 30rpx;
color: #999;
}
.success-Container .info {
font-size: 30rpx;
color: #333;
flex: 1;
text-align: right;
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
/* display: -webkit-box; */
white-space: nowrap;
}
.footerCon {
margin-top: auto;
margin-bottom: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.wxTips {
font-size: 26rpx;
color: #999999;
/* line-height: 36rpx; */
}
.wxqrCon {
width: 306rpx;
height: 305rpx;
margin: 12rpx 0 84rpx;
Object-fit: contain;
}
.logoIcon {
/* text-align: center; */
width: 200rpx;
height: 50rpx;
}
\ No newline at end of file
\ No newline at end of file
project.private.config.json
View file @
cba93ad
...
@@ -243,7 +243,8 @@
...
@@ -243,7 +243,8 @@
{
{
"name"
:
"支付"
,
"name"
:
"支付"
,
"pathName"
:
"packagesPayment/pages/payment/index"
,
"pathName"
:
"packagesPayment/pages/payment/index"
,
"query"
:
"sceneId=6684"
,
"query"
:
"sceneId='sceneId=10683'"
,
"launchMode"
:
"default"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
utils/restapi.js
View file @
cba93ad
...
@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync()
...
@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
manual
=
false
const
release
=
false
const
release
=
false
let
index
=
1
let
index
=
3
// 判断小程序环境
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// develop:开发版(正常开发工具,测试时)
...
...
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