Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 b97f5199
authored
Dec 13, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
去掉vue-qr
1 parent
b8b9001f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
src/router/index.js
src/views/systemConfig/merchant/financialRules/components/financialCalculationDialog.vue
src/router/index.js
View file @
b97f519
...
...
@@ -60,8 +60,8 @@ router.beforeEach(async (to, from, next) => {
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await
store
.
dispatch
(
"d2admin/auth/init"
)
// await store.dispatch('d2admin/account/load')
next
(
to
.
path
)
//
next(to.fullPath)
//
next(to.path)
next
(
to
.
fullPath
)
}
else
{
if
(
store
.
state
.
d2admin
.
user
.
info
)
{
// sessionstorage 用户存在继续当前路由 不存在 跳转登录 防止页面关闭还可以打开页面
...
...
src/views/systemConfig/merchant/financialRules/components/financialCalculationDialog.vue
View file @
b97f519
...
...
@@ -73,8 +73,10 @@
<p
class=
"desc-title"
>
POS机扫码获取订单信息
</p>
<div
class=
"txt-box"
v-if=
"financialCalculationObj.orderCode"
>
<!-- v-if="financialCalculationObj.orderCode" -->
<div
class=
"txt-box"
>
<div
id=
"qrcodeDiv"
class=
"qrImg"
/>
<!--
<vue-qr
class=
"middle"
:margin=
"0"
width=
"134"
...
...
@@ -241,6 +243,7 @@
// import { sendSms, getAdminInfo } from '@api/merchant'
import
{
moneyValidApi
,
getWsUrlApi
,
divisionRuleTestMoneyValid
}
from
'@api/merchant'
import
{
limitPrice
}
from
'@/common/format'
import
QRCode
from
"qrcodejs2"
// import VueQr from 'vue-qr'
export
default
{
name
:
'FinancialCalculationDialog'
,
...
...
@@ -275,6 +278,7 @@ export default {
},
data
()
{
return
{
qrUrl
:
''
,
size
:
'small'
,
subProgress
:
33
,
stepActive
:
0
,
...
...
@@ -329,8 +333,34 @@ export default {
// this.outTradeNo = this.merchantInfo.goodsOrder ? this.merchantInfo.goodsOrder.payOrder.outTradeNo : ''
this
.
getWsUrl
()
this
.
initMoneyForm
()
this
.
initQrCode
()
},
methods
:
{
initQrCode
()
{
// this.$nextTick(() => {
// const qrcode = new QRCode("qrcodeDiv", {
// text: this.financialCalculationObj.orderCode,
// width: 150, // 图像宽度
// height: 150 // 图像高度
// })
// // qrcode.clear() // 清除二维码
// // qrcode.makeCode(shareUrl) // 生成另一个新的二维码
// this.qrUrl = qrcode
// }, 1000)
setTimeout
(()
=>
{
console
.
log
(
this
.
financialCalculationObj
.
orderCode
)
// console.log(document.getElementById('qrcodeDiv'))
const
qrcode
=
new
QRCode
(
"qrcodeDiv"
,
{
text
:
this
.
financialCalculationObj
.
orderCode
,
width
:
150
,
// 图像宽度
height
:
150
// 图像高度
})
// qrcode.clear() // 清除二维码
// qrcode.makeCode(shareUrl) // 生成另一个新的二维码
// this.aliqrCodeURL = qrcode
},
500
)
},
initMoneyForm
()
{
this
.
moneyForm
.
testMerchantDivisions
=
Object
.
assign
(
this
.
financialCalculationObj
.
testMerchantDivisions
)
},
...
...
@@ -621,6 +651,19 @@ export default {
position
:
relative
;
height
:
calc
(
100%
-
100px
);
}
.qrImg
{
position
:
absolute
;
width
:
150px
;
height
:
150px
;
left
:
50%
;
top
:
42%
;
/* transform: translateX(-50%); */
transform
:
translate
(
-50%
,
-50%
);
/* background-color: #d8d8d8; */
z-index
:
2
;
object-fit
:
contain
;
/* transform: scale(0.95); */
}
}
.money-box
{
padding
:
0
20px
;
...
...
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