Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panyongping
uni-pdtravel
Commits
869ba920
Commit
869ba920
authored
Sep 15, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://git.tbd.yanzuoguang.com/panyongping/uni-pdtravel
into develop
parents
bca175eb
40bd3c11
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1679 additions
and
483 deletions
+1679
-483
weapp-qrcode.js
common/weapp-qrcode.js
+1580
-408
electronicTicket-副本.vue
pages/my/order/electronicTicket/electronicTicket-副本.vue
+32
-44
electronicTicket.vue
pages/my/order/electronicTicket/electronicTicket.vue
+67
-31
No files found.
common/weapp-qrcode.js
View file @
869ba920
This diff is collapsed.
Click to expand it.
pages/my/order/electronicTicket/electronicTicket-副本.vue
View file @
869ba920
...
...
@@ -47,9 +47,7 @@
</view>
<view
class=
"certificate-box"
v-else-if=
"orderInfo.exchangeMode==1||orderInfo.exchangeMode==4||orderInfo.exchangeMode==5"
>
<view
class=
"box-verificationCode"
>
验证码:
{{
ticketCode
}}
</view>
<!--
<uqrcode
ref=
"uqrcode"
canvas-id=
"qrcode"
size=
"200"
class=
"box-QRcode"
:value=
"uqrcodeVal"
:options=
"
{ margin: 10 }" >
</uqrcode>
-->
<!--后端生成-->
<!--
<image
:src=
"imgUrlList"
style=
"width: 180px;height: 180px;margin: 0 auto;display: block;"
v-if=
"imgUrlListType"
></image>
-->
<canvas
class=
"box-QRcode"
canvas-id=
"qrcode"
/>
<view
class=
"progress-box"
v-if=
"qrCodeType==true"
>
<progress
:percent=
"percentage"
activeColor=
"#3688FF"
stroke-width=
"3"
/>
</view>
...
...
@@ -142,7 +140,7 @@
</view>
<view
class=
"rowNumber-list rowNumber-list2"
v-if=
"item.config.paPassedNumEnable==1"
>
<view
class=
"rowNumber-signOver"
>
我的排号:
</view>
<view
class=
"list-value"
>
{{
item
.
sortNo
}}
<text
style=
"font-size: 28rpx;margin-left: 8rpx;line-height: 56rpx;"
>
(
{{
item
.
projectName
}}
)
</text></view>
<view
class=
"list-value"
>
{{
item
.
sortNo
}}
<text
style=
"font-size: 28rpx;margin-left: 8rpx;line-height: 56rpx;
flex-shrink:0;
"
>
(
{{
item
.
projectName
}}
)
</text></view>
</view>
<view
class=
"rowNumber-list rowNumber-list2"
v-if=
"item.config.paPassedNumEnable==1"
>
<view
class=
"rowNumber-signOver"
>
您排队号已过
</view>
...
...
@@ -345,7 +343,7 @@
</template>
<
script
>
import
uQRCode
from
'@/common/
uqrcode4
.js'
import
uQRCode
from
'@/common/
js/uqrcode
.js'
import
UMask
from
'@/uview-ui/components/u-mask/u-mask.vue'
export
default
{
components
:
{
...
...
@@ -509,7 +507,6 @@ export default {
},
data
()
{
return
{
uqrcodeVal
:
''
,
orderDataType
:
false
,
openId
:
''
,
//用户信息
id
:
''
,
//订单ID
...
...
@@ -547,8 +544,6 @@ export default {
photoType
:
false
,
//是否显示优惠券
claimStatus
:
1
,
//领取状态 0未领取 1已领取
findCouponPhoto
:{},
//相册优惠券
imgUrlList
:
''
,
imgUrlListType
:
false
,
}
},
onShow
()
{
...
...
@@ -585,7 +580,7 @@ export default {
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//this.id = "z00167956572219584dc15634b62cf75"
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
this
.
openId
=
'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ'
//
this.openId = 'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ'
this
.
getDetail
()
},
onUnload
()
{
...
...
@@ -848,22 +843,17 @@ export default {
}
else
{
verifyCode
=
this
.
verifyCode
}
// uQRCode.make({
// canvasId: 'qrcode',
// componentInstance: this,
// text: verifyCode,
// size: 180,
// margin: 10,
// backgroundColor: '#ffffff',
// foregroundColor: '#000000',
// fileType: 'jpg',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H
// })
// this.uqrcodeVal=verifyCode
//后端生成
// var verifyCodeURL = encodeURI(verifyCode)
// this.imgUrlList = 'http://pay.tuyoyoo.com/distribution/c/'+verifyCodeURL+'?width=180&height=180&frontColor=0&backColor=16777215'
// this.imgUrlListType = true
uQRCode
.
make
({
canvasId
:
'qrcode'
,
componentInstance
:
this
,
text
:
verifyCode
,
size
:
180
,
margin
:
10
,
backgroundColor
:
'#ffffff'
,
foregroundColor
:
'#000000'
,
fileType
:
'jpg'
,
errorCorrectLevel
:
uQRCode
.
errorCorrectLevel
.
H
})
}
},
signOverFun
(
item
){
//过号遮罩显示
...
...
@@ -904,23 +894,17 @@ export default {
// height: 180,
// text:this.codeNo
// })
// uQRCode.make({
// canvasId: 'qrcode',
// componentInstance: this,
// text: this.codeNo,
// size: 180,
// margin: 10,
// backgroundColor: '#ffffff',
// foregroundColor: '#000000',
// fileType: 'jpg',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H
// })
// this.uqrcodeVal=this.codeNo
//后端生成
// this.imgUrlListType = false
// var verifyCodeURL = 'http://pay.tuyoyoo.com/distribution/c/'+this.codeNo+'?width=180&height=180&frontColor=0&backColor=16777215'
// this.imgUrlList = encodeURI(verifyCodeURL)
// this.imgUrlListType = true
uQRCode
.
make
({
canvasId
:
'qrcode'
,
componentInstance
:
this
,
text
:
this
.
codeNo
,
size
:
180
,
margin
:
10
,
backgroundColor
:
'#ffffff'
,
foregroundColor
:
'#000000'
,
fileType
:
'jpg'
,
errorCorrectLevel
:
uQRCode
.
errorCorrectLevel
.
H
})
}
this
.
percentage
+=
1
if
(
this
.
percentage
>=
100
){
...
...
@@ -1316,6 +1300,7 @@ export default {
line-height
:
56rpx
;
font-weight
:
bold
;
margin-right
:
40rpx
;
flex-shrink
:
0
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value
,
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value2
,
...
...
@@ -1323,6 +1308,9 @@ export default {
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value3
{
color
:
#fff
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value
{
flex-shrink
:
0
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-takeNum
,
.order-queueUp
.queueUp-rowNumber3
.rowNumber-takeNum2
{
background-color
:
#fff
;
...
...
@@ -1344,8 +1332,8 @@ export default {
.order-certificate
.certificate-box
.box-QRcode
{
display
:
block
;
width
:
20
0px
;
height
:
20
0px
;
width
:
18
0px
;
height
:
18
0px
;
margin
:
0
auto
;
}
.order-certificate
.certificate-box
.box-QRcode2
{
...
...
pages/my/order/electronicTicket/electronicTicket.vue
View file @
869ba920
...
...
@@ -47,7 +47,11 @@
</view>
<view
class=
"certificate-box"
v-else-if=
"orderInfo.exchangeMode==1||orderInfo.exchangeMode==4||orderInfo.exchangeMode==5"
>
<view
class=
"box-verificationCode"
>
验证码:
{{
ticketCode
}}
</view>
<canvas
class=
"box-QRcode"
canvas-id=
"qrcode"
/>
<!--
<uqrcode
ref=
"uqrcode"
canvas-id=
"qrcode"
size=
"200"
class=
"box-QRcode"
:value=
"uqrcodeVal"
:options=
"
{ margin: 10 }" >
</uqrcode>
-->
<!--后端生成-->
<!--
<image
:src=
"imgUrlList"
style=
"width: 180px;height: 180px;margin: 0 auto;display: block;"
v-if=
"imgUrlListType"
></image>
-->
<!--显示图片用的标签-->
<image
class=
"code_view"
:src=
"imagePath"
v-if=
"imgTypeShow"
></image>
<view
class=
"progress-box"
v-if=
"qrCodeType==true"
>
<progress
:percent=
"percentage"
activeColor=
"#3688FF"
stroke-width=
"3"
/>
</view>
...
...
@@ -140,7 +144,7 @@
</view>
<view
class=
"rowNumber-list rowNumber-list2"
v-if=
"item.config.paPassedNumEnable==1"
>
<view
class=
"rowNumber-signOver"
>
我的排号:
</view>
<view
class=
"list-value"
>
{{
item
.
sortNo
}}
<text
style=
"font-size: 28rpx;margin-left: 8rpx;line-height: 56rpx;flex-shrink:0;"
>
(
{{
item
.
projectName
}}
)
</text></view>
<view
class=
"list-value"
>
{{
item
.
sortNo
}}
<text
style=
"font-size: 28rpx;margin-left: 8rpx;line-height: 56rpx;flex-shrink:
0;"
>
(
{{
item
.
projectName
}}
)
</text></view>
</view>
<view
class=
"rowNumber-list rowNumber-list2"
v-if=
"item.config.paPassedNumEnable==1"
>
<view
class=
"rowNumber-signOver"
>
您排队号已过
</view>
...
...
@@ -343,7 +347,8 @@
</template>
<
script
>
import
uQRCode
from
'@/common/js/uqrcode.js'
// import uQRCode from '@/common/uqrcode4.js'
import
QRCode
from
'@/common/weapp-qrcode.js'
import
UMask
from
'@/uview-ui/components/u-mask/u-mask.vue'
export
default
{
components
:
{
...
...
@@ -507,6 +512,7 @@ export default {
},
data
()
{
return
{
uqrcodeVal
:
''
,
orderDataType
:
false
,
openId
:
''
,
//用户信息
id
:
''
,
//订单ID
...
...
@@ -544,6 +550,10 @@ export default {
photoType
:
false
,
//是否显示优惠券
claimStatus
:
1
,
//领取状态 0未领取 1已领取
findCouponPhoto
:{},
//相册优惠券
imgUrlList
:
''
,
imgUrlListType
:
false
,
imagePath
:
''
,
//图片接受地址
imgTypeShow
:
true
,
//是否展示图片
}
},
onShow
()
{
...
...
@@ -843,19 +853,36 @@ export default {
}
else
{
verifyCode
=
this
.
verifyCode
}
uQRCode
.
make
({
canvasId
:
'qrcode'
,
componentInstance
:
this
,
text
:
verifyCode
,
size
:
180
,
margin
:
10
,
backgroundColor
:
'#ffffff'
,
foregroundColor
:
'#000000'
,
fileType
:
'jpg'
,
errorCorrectLevel
:
uQRCode
.
errorCorrectLevel
.
H
})
// uQRCode.make({
// canvasId: 'qrcode',
// componentInstance: this,
// text: verifyCode,
// size: 180,
// margin: 10,
// backgroundColor: '#ffffff',
// foregroundColor: '#000000',
// fileType: 'jpg',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H
// })
// this.uqrcodeVal=verifyCode
//后端生成
// var verifyCodeURL = encodeURI(verifyCode)
// this.imgUrlList = 'http://pay.tuyoyoo.com/distribution/c/'+verifyCodeURL+'?width=180&height=180&frontColor=0&backColor=16777215'
// this.imgUrlListType = true
this
.
createCode
(
verifyCode
)
}
},
createCode
(
showCode
)
{
//创建二维码
var
imgData
=
QRCode
.
drawImg
(
showCode
,
{
typeNumber
:
3
,
//码点大小 1-40,数字越大,码点越小,二维码会显得越密集
errorCorrectLevel
:
'H'
,
//纠错等级 H等级最高(30%) 简单来说,就是二维码被覆盖了多少仍然能被识别出来 详见qrcode.js
size
:
180
})
console
.
log
(
imgData
)
this
.
imgTypeShow
=
false
this
.
imagePath
=
imgData
this
.
imgTypeShow
=
true
},
signOverFun
(
item
){
//过号遮罩显示
this
.
overSignedData
=
{}
this
.
overSignedData
=
item
...
...
@@ -894,17 +921,24 @@ export default {
// height: 180,
// text:this.codeNo
// })
uQRCode
.
make
({
canvasId
:
'qrcode'
,
componentInstance
:
this
,
text
:
this
.
codeNo
,
size
:
180
,
margin
:
10
,
backgroundColor
:
'#ffffff'
,
foregroundColor
:
'#000000'
,
fileType
:
'jpg'
,
errorCorrectLevel
:
uQRCode
.
errorCorrectLevel
.
H
})
// uQRCode.make({
// canvasId: 'qrcode',
// componentInstance: this,
// text: this.codeNo,
// size: 180,
// margin: 10,
// backgroundColor: '#ffffff',
// foregroundColor: '#000000',
// fileType: 'jpg',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H
// })
// this.uqrcodeVal=this.codeNo
//后端生成
// this.imgUrlListType = false
// var verifyCodeURL = 'http://pay.tuyoyoo.com/distribution/c/'+this.codeNo+'?width=180&height=180&frontColor=0&backColor=16777215'
// this.imgUrlList = encodeURI(verifyCodeURL)
// this.imgUrlListType = true
this
.
createCode
(
this
.
codeNo
)
}
this
.
percentage
+=
1
if
(
this
.
percentage
>=
100
){
...
...
@@ -1300,7 +1334,6 @@ export default {
line-height
:
56rpx
;
font-weight
:
bold
;
margin-right
:
40rpx
;
flex-shrink
:
0
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value
,
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value2
,
...
...
@@ -1308,9 +1341,6 @@ export default {
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value3
{
color
:
#fff
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-list
.list-value
{
flex-shrink
:
0
;
}
.order-queueUp
.queueUp-rowNumber3
.rowNumber-takeNum
,
.order-queueUp
.queueUp-rowNumber3
.rowNumber-takeNum2
{
background-color
:
#fff
;
...
...
@@ -1332,8 +1362,8 @@ export default {
.order-certificate
.certificate-box
.box-QRcode
{
display
:
block
;
width
:
18
0px
;
height
:
18
0px
;
width
:
20
0px
;
height
:
20
0px
;
margin
:
0
auto
;
}
.order-certificate
.certificate-box
.box-QRcode2
{
...
...
@@ -1567,4 +1597,10 @@ export default {
}
}
}
.code_view
{
display
:
block
;
width
:
180px
;
height
:
180px
;
margin
:
0
auto
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment