Commit 32794fac authored by qipeng's avatar qipeng

副本2为 weapp-code 代码

parent 869ba920
This diff is collapsed.
...@@ -47,11 +47,12 @@ ...@@ -47,11 +47,12 @@
</view> </view>
<view class="certificate-box" v-else-if="orderInfo.exchangeMode==1||orderInfo.exchangeMode==4||orderInfo.exchangeMode==5"> <view class="certificate-box" v-else-if="orderInfo.exchangeMode==1||orderInfo.exchangeMode==4||orderInfo.exchangeMode==5">
<view class="box-verificationCode">验证码:{{ticketCode}}</view> <view class="box-verificationCode">验证码:{{ticketCode}}</view>
<!-- <uqrcode ref="uqrcode" canvas-id="qrcode" size="200" class="box-QRcode" :value="uqrcodeVal" :options="{ margin: 10 }" ></uqrcode> --> <!--#ifdef MP-WEIXIN-->
<!--后端生成--> <canvas class="box-QRcode" canvas-id="qrcode"/>
<!-- <image :src="imgUrlList" style="width: 180px;height: 180px;margin: 0 auto;display: block;" v-if="imgUrlListType"></image> --> <!--#endif-->
<!--显示图片用的标签--> <!--#ifdef MP-ALIPAY-->
<image class="code_view" :src="imagePath" v-if="imgTypeShow"></image> <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"> <view class="progress-box" v-if="qrCodeType==true">
<progress :percent="percentage" activeColor="#3688FF" stroke-width="3" /> <progress :percent="percentage" activeColor="#3688FF" stroke-width="3" />
</view> </view>
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
</view> </view>
<view class="rowNumber-list rowNumber-list2" v-if="item.config.paPassedNumEnable==1"> <view class="rowNumber-list rowNumber-list2" v-if="item.config.paPassedNumEnable==1">
<view class="rowNumber-signOver">我的排号:</view> <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>
<view class="rowNumber-list rowNumber-list2" v-if="item.config.paPassedNumEnable==1"> <view class="rowNumber-list rowNumber-list2" v-if="item.config.paPassedNumEnable==1">
<view class="rowNumber-signOver">您排队号已过</view> <view class="rowNumber-signOver">您排队号已过</view>
...@@ -347,8 +348,13 @@ ...@@ -347,8 +348,13 @@
</template> </template>
<script> <script>
// import uQRCode from '@/common/uqrcode4.js' //#ifdef MP-WEIXIN
import QRCode from '@/common/weapp-qrcode.js' 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' import UMask from '@/uview-ui/components/u-mask/u-mask.vue'
export default { export default {
components: { components: {
...@@ -550,10 +556,6 @@ export default { ...@@ -550,10 +556,6 @@ export default {
photoType:false,//是否显示优惠券 photoType:false,//是否显示优惠券
claimStatus:1,//领取状态 0未领取 1已领取 claimStatus:1,//领取状态 0未领取 1已领取
findCouponPhoto:{},//相册优惠券 findCouponPhoto:{},//相册优惠券
imgUrlList:'',
imgUrlListType:false,
imagePath:'',//图片接受地址
imgTypeShow:true,//是否展示图片
} }
}, },
onShow() { onShow() {
...@@ -853,36 +855,25 @@ export default { ...@@ -853,36 +855,25 @@ export default {
}else{ }else{
verifyCode=this.verifyCode verifyCode=this.verifyCode
} }
// uQRCode.make({ //#ifdef MP-WEIXIN
// canvasId: 'qrcode', uQRCodeS.make({
// componentInstance: this, canvasId: 'qrcode',
// text: verifyCode, componentInstance: this,
// size: 180, text: verifyCode,
// margin: 10, size: 180,
// backgroundColor: '#ffffff', margin: 10,
// foregroundColor: '#000000', backgroundColor: '#ffffff',
// fileType: 'jpg', foregroundColor: '#000000',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H fileType: 'jpg',
// }) errorCorrectLevel: uQRCodeS.errorCorrectLevel.H
// this.uqrcodeVal=verifyCode })
//后端生成 //#endif
// var verifyCodeURL = encodeURI(verifyCode)
// this.imgUrlList = 'http://pay.tuyoyoo.com/distribution/c/'+verifyCodeURL+'?width=180&height=180&frontColor=0&backColor=16777215' //#ifdef MP-ALIPAY
// this.imgUrlListType = true this.uqrcodeVal=verifyCode
this.createCode(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){//过号遮罩显示 signOverFun(item){//过号遮罩显示
this.overSignedData = {} this.overSignedData = {}
this.overSignedData = item this.overSignedData = item
...@@ -921,24 +912,24 @@ export default { ...@@ -921,24 +912,24 @@ export default {
// height: 180, // height: 180,
// text:this.codeNo // text:this.codeNo
// }) // })
// uQRCode.make({
// canvasId: 'qrcode', //#ifdef MP-WEIXIN
// componentInstance: this, uQRCodeS.make({
// text: this.codeNo, canvasId: 'qrcode',
// size: 180, componentInstance: this,
// margin: 10, text: this.codeNo,
// backgroundColor: '#ffffff', size: 180,
// foregroundColor: '#000000', margin: 10,
// fileType: 'jpg', backgroundColor: '#ffffff',
// errorCorrectLevel: uQRCode.errorCorrectLevel.H foregroundColor: '#000000',
// }) fileType: 'jpg',
// this.uqrcodeVal=this.codeNo errorCorrectLevel: uQRCodeS.errorCorrectLevel.H
//后端生成 })
// this.imgUrlListType = false //#endif
// var verifyCodeURL = 'http://pay.tuyoyoo.com/distribution/c/'+this.codeNo+'?width=180&height=180&frontColor=0&backColor=16777215'
// this.imgUrlList = encodeURI(verifyCodeURL) //#ifdef MP-ALIPAY
// this.imgUrlListType = true this.uqrcodeVal=this.codeNo
this.createCode(this.codeNo) //#endif
} }
this.percentage+=1 this.percentage+=1
if(this.percentage>=100){ if(this.percentage>=100){
...@@ -1334,6 +1325,7 @@ export default { ...@@ -1334,6 +1325,7 @@ export default {
line-height: 56rpx; line-height: 56rpx;
font-weight: bold; font-weight: bold;
margin-right: 40rpx; margin-right: 40rpx;
flex-shrink:0;
} }
.order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value, .order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value,
.order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value2, .order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value2,
...@@ -1341,6 +1333,9 @@ export default { ...@@ -1341,6 +1333,9 @@ export default {
.order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value3{ .order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value3{
color:#fff; color:#fff;
} }
.order-queueUp .queueUp-rowNumber3 .rowNumber-list .list-value{
flex-shrink:0;
}
.order-queueUp .queueUp-rowNumber3 .rowNumber-takeNum, .order-queueUp .queueUp-rowNumber3 .rowNumber-takeNum,
.order-queueUp .queueUp-rowNumber3 .rowNumber-takeNum2{ .order-queueUp .queueUp-rowNumber3 .rowNumber-takeNum2{
background-color: #fff; background-color: #fff;
...@@ -1362,10 +1357,19 @@ export default { ...@@ -1362,10 +1357,19 @@ export default {
.order-certificate .certificate-box .box-QRcode { .order-certificate .certificate-box .box-QRcode {
display: block; display: block;
width: 200px; width: 180px;
height: 200px; height: 180px;
margin: 0 auto;
}
//#ifdef MP-ALIPAY
/deep/ .uqrcode-canvas-wrapper,/deep/ .uqrcode{
margin: 0 auto; margin: 0 auto;
position: relative;
}
/deep/ .uqrcode-canvas{
transform:(1,1)
} }
//#endif
.order-certificate .certificate-box .box-QRcode2{ .order-certificate .certificate-box .box-QRcode2{
position: fixed; position: fixed;
top: -500rpx; top: -500rpx;
...@@ -1597,10 +1601,4 @@ export default { ...@@ -1597,10 +1601,4 @@ export default {
} }
} }
} }
.code_view{
display: block;
width: 180px;
height: 180px;
margin: 0 auto;
}
</style> </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