Commit 32794fac authored by qipeng's avatar qipeng

副本2为 weapp-code 代码

parent 869ba920
This diff is collapsed.
......@@ -47,11 +47,12 @@
</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> -->
<!--显示图片用的标签-->
<image class="code_view" :src="imagePath" v-if="imgTypeShow"></image>
<!--#ifdef MP-WEIXIN-->
<canvas class="box-QRcode" canvas-id="qrcode"/>
<!--#endif-->
<!--#ifdef MP-ALIPAY-->
<uqrcode ref="uqrcode" canvas-id="qrcode" class="box-QRcode" :class="showtip==false&&showUseRule==false?'':'box-QRcode2'" :value="uqrcodeVal" :options="{ margin: 10 }" ></uqrcode>
<!--#endif-->
<view class="progress-box" v-if="qrCodeType==true">
<progress :percent="percentage" activeColor="#3688FF" stroke-width="3" />
</view>
......@@ -144,7 +145,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>
......@@ -347,8 +348,13 @@
</template>
<script>
// import uQRCode from '@/common/uqrcode4.js'
import QRCode from '@/common/weapp-qrcode.js'
//#ifdef MP-WEIXIN
import uQRCodeS from '@/common/js/uqrcode.js'
//#endif
//#ifdef MP-ALIPAY
import uQRCode from '@/common/uqrcode4.js'
//#endif
import UMask from '@/uview-ui/components/u-mask/u-mask.vue'
export default {
components: {
......@@ -550,10 +556,6 @@ export default {
photoType:false,//是否显示优惠券
claimStatus:1,//领取状态 0未领取 1已领取
findCouponPhoto:{},//相册优惠券
imgUrlList:'',
imgUrlListType:false,
imagePath:'',//图片接受地址
imgTypeShow:true,//是否展示图片
}
},
onShow() {
......@@ -853,36 +855,25 @@ 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
this.createCode(verifyCode)
//#ifdef MP-WEIXIN
uQRCodeS.make({
canvasId: 'qrcode',
componentInstance: this,
text: verifyCode,
size: 180,
margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCodeS.errorCorrectLevel.H
})
//#endif
//#ifdef MP-ALIPAY
this.uqrcodeVal=verifyCode
//#endif
}
},
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
......@@ -921,24 +912,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
// })
// 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)
//#ifdef MP-WEIXIN
uQRCodeS.make({
canvasId: 'qrcode',
componentInstance: this,
text: this.codeNo,
size: 180,
margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCodeS.errorCorrectLevel.H
})
//#endif
//#ifdef MP-ALIPAY
this.uqrcodeVal=this.codeNo
//#endif
}
this.percentage+=1
if(this.percentage>=100){
......@@ -1334,6 +1325,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,
......@@ -1341,6 +1333,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;
......@@ -1362,10 +1357,19 @@ export default {
.order-certificate .certificate-box .box-QRcode {
display: block;
width: 200px;
height: 200px;
width: 180px;
height: 180px;
margin: 0 auto;
}
//#ifdef MP-ALIPAY
/deep/ .uqrcode-canvas-wrapper,/deep/ .uqrcode{
margin: 0 auto;
position: relative;
}
/deep/ .uqrcode-canvas{
transform:(1,1)
}
//#endif
.order-certificate .certificate-box .box-QRcode2{
position: fixed;
top: -500rpx;
......@@ -1597,10 +1601,4 @@ export default {
}
}
}
.code_view{
display: block;
width: 180px;
height: 180px;
margin: 0 auto;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment