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 ff866d90
authored
Jan 08, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!34
2 parents
b8161a46
ec5fa653
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
19 deletions
packagesPayment/pages/QRPayment/QRPayment.js
packagesPayment/pages/QRPayment/QRPayment.wxml
packagesPayment/pages/QRPayment/QRPayment.js
View file @
ff866d9
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
import
api
from
'../../restapi'
import
api
from
'../../restapi'
const
util
=
require
(
'../../../utils/util.js'
)
const
util
=
require
(
'../../../utils/util.js'
)
const
app
=
getApp
()
const
app
=
getApp
()
import
{
orderPosterImgUrl
}
from
'~/config'
import
{
orderPosterImgUrl
,
envIndex
}
from
'~/config'
// console.log(orderPosterImgUrl);
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
...
@@ -60,9 +61,13 @@ Page({
...
@@ -60,9 +61,13 @@ Page({
console
.
log
(
decodeURIComponent
(
options
.
scene
))
console
.
log
(
decodeURIComponent
(
options
.
scene
))
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
if
(
!
id
)
{
throw
new
Error
(
'id缺失'
)
}
// console.log(id)
// console.log(id)
//获取门店信息
//获取门店信息
this
.
getMerthcantInfo
(
id
)
this
.
getMerthcantInfo
(
id
)
// 获取用户隐私协议配置
// 获取用户隐私协议配置
this
.
getTitleByModule
()
this
.
getTitleByModule
()
// this.navToUserCollaboration()
// this.navToUserCollaboration()
...
@@ -74,7 +79,40 @@ Page({
...
@@ -74,7 +79,40 @@ Page({
wx
.
$router
.
go
(
'userCollaboration'
)
wx
.
$router
.
go
(
'userCollaboration'
)
// console.log(wx.$router.getRouterList())
// console.log(wx.$router.getRouterList())
},
},
getMiniAppConfig
(
id
)
{
console
.
log
(
id
,
'id'
);
let
that
=
this
const
target
=
[
'develop'
,
'develop'
,
'test'
,
'production'
,
'beta'
]
wx
.
request
({
// url: `${domain}${path}?method=${method}`,
url
:
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-weapp-smartshop-miniapp&env=
${
target
[
envIndex
]}
`
,
// data,
method
:
'GET'
,
// header,
dataType
:
'json'
,
responseType
:
'text'
,
success
(
response
)
{
// app.globalData.configInfo = response.data
let
{
statusCode
,
data
:
{
disabledList
}
}
=
response
console
.
log
(
statusCode
,
'statusCode'
);
if
(
statusCode
==
200
)
{
let
merchantDisabled
=
disabledList
.
some
(
item
=>
item
.
merchantId
==
id
)
that
.
setData
({
merchantDisabled
})
}
// console.log(data.disabledList, 'response');
// resolve(response.data)
},
fail
(
error
)
{
console
.
log
(
error
,
'error'
)
},
complete
()
{
// wx.stopPullDownRefresh()
// wx.hideNavigationBarLoading()
}
})
},
navWarrantyCard
()
{
navWarrantyCard
()
{
// console.log('navWebview')
// console.log('navWebview')
// console.log(wx.$router.getRouterList())
// console.log(wx.$router.getRouterList())
...
@@ -126,6 +164,10 @@ Page({
...
@@ -126,6 +164,10 @@ Page({
})
})
// 区分是流量方还是园区店
// 区分是流量方还是园区店
let
isYqType
=
Boolean
(
op
?.
merchantId
)
let
isYqType
=
Boolean
(
op
?.
merchantId
)
// console.log(op.merchantId,op.shopMerchantId,'请求接口门店id缺失');
if
(
!
op
.
merchantId
&&
!
op
.
shopMerchantId
)
{
throw
new
Error
(
'请求接口门店id缺失'
)
}
this
.
setData
({
this
.
setData
({
...
op
,
...
op
,
isYqType
isYqType
...
@@ -133,7 +175,7 @@ Page({
...
@@ -133,7 +175,7 @@ Page({
// 获取质保卡配置
// 获取质保卡配置
isYqType
&&
this
.
getwxQrcode
()
isYqType
&&
this
.
getwxQrcode
()
this
.
getMiniAppConfig
(
op
.
merchantId
||
op
.
shopMerchantId
)
//util.showLoading('加载中...')
//util.showLoading('加载中...')
console
.
log
(
op
)
console
.
log
(
op
)
// this.getInfo(op)
// this.getInfo(op)
...
@@ -240,8 +282,8 @@ Page({
...
@@ -240,8 +282,8 @@ Page({
// 支付
// 支付
handlePay
()
{
handlePay
()
{
let
_this
=
this
let
_this
=
this
const
{
payMoney
,
merchantId
,
isYqType
,
shopMerchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
}
=
this
.
data
const
{
payMoney
,
merchantId
,
isYqType
,
shopMerchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
,
merchantDisabled
}
=
this
.
data
if
(
userCollaborationName
&&
!
userCollaborationCheck
)
{
if
(
userCollaborationName
&&
!
userCollaborationCheck
&&
!
merchantDisabled
)
{
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
}
}
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
...
@@ -261,6 +303,10 @@ Page({
...
@@ -261,6 +303,10 @@ Page({
// 调用支付接口生成对应的微信支付参数
// 调用支付接口生成对应的微信支付参数
// console.log(params)
// console.log(params)
// return
// return
if
(
!
params
.
merchantId
&&
!
params
.
shopMerchantId
)
{
throw
new
Error
(
'门店id缺失'
)
// throw '门店id缺失'
}
api
.
createWxPayOrderH5
(
api
.
createWxPayOrderH5
(
params
,
params
,
res
=>
{
res
=>
{
...
@@ -377,6 +423,6 @@ Page({
...
@@ -377,6 +423,6 @@ Page({
posterUrl
:
result
.
data
posterUrl
:
result
.
data
})
})
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
}
}
})
})
packagesPayment/pages/QRPayment/QRPayment.wxml
View file @
ff866d9
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<view hidden="{{ keyHidden }}" class="pay-cursor" />
<view hidden="{{ keyHidden }}" class="pay-cursor" />
<view class="pay-after-icon">元</view>
<view class="pay-after-icon">元</view>
</view>
</view>
<block wx:if="{{!merchantDisabled}}">
<view class="userCollaborationContainer" wx:if="{{ userCollaborationName }}">
<view class="userCollaborationContainer" wx:if="{{ userCollaborationName }}">
<!-- <label class="radio"> value="{{userCollaborationCheck}}" -->
<!-- <label class="radio"> value="{{userCollaborationCheck}}" -->
<radio class="radio" style="transform:scale(0.6)" checked="{{ userCollaborationCheck }}" catchtap="handleRadio" />
<radio class="radio" style="transform:scale(0.6)" checked="{{ userCollaborationCheck }}" catchtap="handleRadio" />
...
@@ -34,19 +35,13 @@
...
@@ -34,19 +35,13 @@
<!-- </label> -->
<!-- </label> -->
<view class="linkText" catchtap="navToUserCollaboration">《{{userCollaborationName}}》</view>
<view class="linkText" catchtap="navToUserCollaboration">《{{userCollaborationName}}》</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
<view class="keyboard {{ !keyHidden && 'hind_box' }}">
<view class="keyboard {{ !keyHidden && 'hind_box' }}">
<view class="key-box">
<view class="key-box">
<view class="number-box clearfix">
<view class="number-box clearfix">
<view
<view wx:for="{{ KeyboardKeys }}" wx:key="*this" data-key="{{ item }}" class="key {{ index === 9 ? 'key-zero' : '' }}" hover-class="number-box-hover" catchtap="handleKey">{{item}}</view>
wx:for="{{ KeyboardKeys }}"
wx:key="*this"
data-key="{{ item }}"
class="key {{ index === 9 ? 'key-zero' : '' }}"
hover-class="number-box-hover"
catchtap="handleKey"
>{{item}}</view>
</view>
</view>
<view class="btn-box">
<view class="btn-box">
<!-- TODO: 需要替换成删除icon -->
<!-- TODO: 需要替换成删除icon -->
...
@@ -100,11 +95,7 @@
...
@@ -100,11 +95,7 @@
<!-- wx:if="{{workWechatQrcode}}" -->
<!-- wx:if="{{workWechatQrcode}}" -->
<block wx:if="{{ qrcodeType== 1 }}">
<block wx:if="{{ qrcodeType== 1 }}">
<view class="wxTips">长按识别扫码领取质保卡</view>
<view class="wxTips">长按识别扫码领取质保卡</view>
<image
<image bindlongpress="navWarrantyCard" class="wxqrCon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/minizhibaoka.png" />
bindlongpress="navWarrantyCard"
class="wxqrCon"
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/minizhibaoka.png"
/>
</block>
</block>
<block wx:if="{{ qrcodeType== 2 }}">
<block wx:if="{{ qrcodeType== 2 }}">
<view class="wxTips">长按识别添加客服</view>
<view class="wxTips">长按识别添加客服</view>
...
...
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