diff --git a/components/catch/catch.js b/components/catch/catch.js new file mode 100644 index 0000000..27a6dca --- /dev/null +++ b/components/catch/catch.js @@ -0,0 +1,46 @@ +// pages/user/yhq/qr_code/qr_code.js +const { + barcode, + qrcode +} = require('../../utils/index.js') + +Component({ + data: { + q_show:0, + object:null, + index:0, + is_fw:0, + + barcode_canvas:null, + qrcode_canvas:null, + }, + properties: { + // 这里定义了innerText属性,属性值可以在组件使用时指定 + }, + ready: function () { + }, + + methods: { + //关闭 + close: function (e) { + this.setData({q_show: 0,barcode_canvas:null,qrcode_canvas:null }); + this.triggerEvent('close',{},{bubbles: true}); + }, + + //打开 + open:function (e) { + this.data.index++; + var list=[{index:this.data.index }]; + + this.setData({q_show: 1,object:e,barcode_canvas:list,qrcode_canvas:list,is_fw:e.is_fw }); + var val=e.val; + + // barcode('barcode'+this.data.index,val, 620, 160,this); + qrcode('qrcode'+this.data.index, val, 520, 520,this); + } + }, + + + + +}) \ No newline at end of file diff --git a/components/catch/catch.json b/components/catch/catch.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/catch/catch.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/catch/catch.wxml b/components/catch/catch.wxml new file mode 100644 index 0000000..2710fdf --- /dev/null +++ b/components/catch/catch.wxml @@ -0,0 +1,12 @@ + + + + + + + + 进店逛逛 + + + + diff --git a/components/catch/catch.wxss b/components/catch/catch.wxss new file mode 100644 index 0000000..b6ea155 --- /dev/null +++ b/components/catch/catch.wxss @@ -0,0 +1,39 @@ +@import '../../app.wxss'; + + +.container { + background-color: #f5f5f5; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +.container-wrapper { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + text-align: center; + color: rgb(173,173,173); +} + +.t-icon { + width: 200rpx; + height: 200rpx; +} + +.btn { + display: inline-block; + padding: 10rpx 50rpx; + border: 2rpx solid red; + color: red; + font-size: 30rpx; + border-radius: 30rpx; + box-sizing: border-box; +} + +.mgt60 { + margin-top: 60rpx; +} \ No newline at end of file