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 d3741d9c
authored
Mar 22, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v4.17.0功能开发
1 parent
d7cdb64d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
13 deletions
packagesPayment/environment.js
packagesPayment/pages/QRPayment/QRPayment.wxml
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 @
d3741d9
...
@@ -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.wxml
View file @
d3741d9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</view>
</view>
<view class="company center" wx:else>
<view class="company center" wx:else>
<!-- <view class="company-name" >深圳市嘀加智慧云服务有限公司</view> -->
<!-- <view class="company-name" >深圳市嘀加智慧云服务有限公司</view> -->
<view class="company-name">{{
m
erchantName}}</view>
<view class="company-name">{{
shopM
erchantName}}</view>
</view>
</view>
<!-- 付款给企业 -->
<!-- 付款给企业 -->
<!-- <view class="company-name">(深圳****公司)</view> -->
<!-- <view class="company-name">(深圳****公司)</view> -->
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
</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/payment/index.js
View file @
d3741d9
...
@@ -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 @
d3741d9
<!--支付-->
<!--支付-->
<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 @
d3741d9
/* 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 @
d3741d9
...
@@ -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 @
d3741d9
...
@@ -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