From 67c79ed83ee017498958bf809cc52cb508d50d0b Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 12 Aug 2021 11:06:58 +0800 Subject: [PATCH] catch插件 --- components/catch/catch.js | 46 ---------------------------------------------- components/catch/catch.json | 4 ---- components/catch/catch.wxml | 12 ------------ components/catch/catch.wxss | 39 --------------------------------------- packageB/components/catch/catch.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ packageB/components/catch/catch.json | 4 ++++ packageB/components/catch/catch.wxml | 12 ++++++++++++ packageB/components/catch/catch.wxss | 39 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 101 insertions(+), 101 deletions(-) delete mode 100644 components/catch/catch.js delete mode 100644 components/catch/catch.json delete mode 100644 components/catch/catch.wxml delete mode 100644 components/catch/catch.wxss create mode 100644 packageB/components/catch/catch.js create mode 100644 packageB/components/catch/catch.json create mode 100644 packageB/components/catch/catch.wxml create mode 100644 packageB/components/catch/catch.wxss diff --git a/components/catch/catch.js b/components/catch/catch.js deleted file mode 100644 index 27a6dca..0000000 --- a/components/catch/catch.js +++ /dev/null @@ -1,46 +0,0 @@ -// 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 deleted file mode 100644 index e8cfaaf..0000000 --- a/components/catch/catch.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/components/catch/catch.wxml b/components/catch/catch.wxml deleted file mode 100644 index 2710fdf..0000000 --- a/components/catch/catch.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - 进店逛逛 - - - - diff --git a/components/catch/catch.wxss b/components/catch/catch.wxss deleted file mode 100644 index b6ea155..0000000 --- a/components/catch/catch.wxss +++ /dev/null @@ -1,39 +0,0 @@ -@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 diff --git a/packageB/components/catch/catch.js b/packageB/components/catch/catch.js new file mode 100644 index 0000000..27a6dca --- /dev/null +++ b/packageB/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/packageB/components/catch/catch.json b/packageB/components/catch/catch.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/packageB/components/catch/catch.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/packageB/components/catch/catch.wxml b/packageB/components/catch/catch.wxml new file mode 100644 index 0000000..2710fdf --- /dev/null +++ b/packageB/components/catch/catch.wxml @@ -0,0 +1,12 @@ + + + + + + + + 进店逛逛 + + + + diff --git a/packageB/components/catch/catch.wxss b/packageB/components/catch/catch.wxss new file mode 100644 index 0000000..b6ea155 --- /dev/null +++ b/packageB/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 -- libgit2 0.21.4