From 53f738768ac9d2ea93ec78de4a82b9ca34e233e0 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 11 Dec 2020 00:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=91=98=E5=B7=A5=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E8=AE=A4=E8=AF=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 8 +-- .../addStaffAppAuth/addStaffAppAuth.html | 42 +++++++++++++ .../addStaffAppAuth/addStaffAppAuth.js | 63 +++++++++++++++++++ .../staffAppAuthManage.html | 52 +++++++++++++++ .../staffAppAuthManage/staffAppAuthManage.js | 54 ++++++++++++++++ 5 files changed, 215 insertions(+), 4 deletions(-) create mode 100644 public/components/property/addStaffAppAuth/addStaffAppAuth.html create mode 100644 public/components/property/addStaffAppAuth/addStaffAppAuth.js create mode 100644 public/pages/property/staffAppAuthManage/staffAppAuthManage.html create mode 100644 public/pages/property/staffAppAuthManage/staffAppAuthManage.js diff --git a/app.js b/app.js index d7f9b1b21..11d945a37 100644 --- a/app.js +++ b/app.js @@ -36,11 +36,11 @@ let opts = { //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); - //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); - //app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); -app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); -app.use('/app',proxy('http://127.0.0.1:8012',opts)); +//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); +//app.use('/app',proxy('http://127.0.0.1:8012',opts)); //app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); //app.use('/app',proxy('http://192.168.1.16:8012',opts)); diff --git a/public/components/property/addStaffAppAuth/addStaffAppAuth.html b/public/components/property/addStaffAppAuth/addStaffAppAuth.html new file mode 100644 index 000000000..b310a8c9e --- /dev/null +++ b/public/components/property/addStaffAppAuth/addStaffAppAuth.html @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/public/components/property/addStaffAppAuth/addStaffAppAuth.js b/public/components/property/addStaffAppAuth/addStaffAppAuth.js new file mode 100644 index 000000000..d5a703e8d --- /dev/null +++ b/public/components/property/addStaffAppAuth/addStaffAppAuth.js @@ -0,0 +1,63 @@ +(function (vc) { + + vc.extends({ + propTypes: { + callBackListener: vc.propTypes.string, //父组件名称 + callBackFunction: vc.propTypes.string //父组件监听方法 + }, + data: { + addStaffAppAuthInfo: { + auId: '', + appType: 'WECHAT', + + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('addStaffAppAuth', 'openAddStaffAppAuthModal', function () { + $('#addStaffAppAuthModel').modal('show'); + $that._changeAppType() + }); + }, + methods: { + _changeAppType: function () { + //判断是否支付 + var param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + appType: $that.addStaffAppAuthInfo.appType + } + }; + //发送get请求 + vc.http.apiGet('/staff/generatorQrCode', + param, + function (json, res) { + let _info = JSON.parse(json); + $that._viewQr(_info.data) + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _viewQr: function (_url) { + document.getElementById("qrcode").innerHTML = ""; + let qrcode = new QRCode(document.getElementById("qrcode"), { + text: "员工认证", //你想要填写的文本 + width: 200, //生成的二维码的宽度 + height: 200, //生成的二维码的高度 + colorDark: "#000000", // 生成的二维码的深色部分 + colorLight: "#ffffff", //生成二维码的浅色部分 + correctLevel: QRCode.CorrectLevel.H + }); + qrcode.makeCode(_url); + }, + _finishScanQrCode: function () { + vc.emit('staffAppAuthManage', 'listStaffAppAuth', {}); + $('#addStaffAppAuthModel').modal('hide'); + } + } + }); + +})(window.vc); diff --git a/public/pages/property/staffAppAuthManage/staffAppAuthManage.html b/public/pages/property/staffAppAuthManage/staffAppAuthManage.html new file mode 100644 index 000000000..e414c5ba2 --- /dev/null +++ b/public/pages/property/staffAppAuthManage/staffAppAuthManage.html @@ -0,0 +1,52 @@ +
+
+
+
+
+
认证信息
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
员工名称认证方式认证ID认证状态认证时间操作
{{staffAppAuthManageInfo.staffName}}{{staffAppAuthManageInfo.appType}}{{staffAppAuthManageInfo.openId}}{{staffAppAuthManageInfo.stateName}}{{staffAppAuthManageInfo.createTime}} +
+ +
+
+
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/public/pages/property/staffAppAuthManage/staffAppAuthManage.js b/public/pages/property/staffAppAuthManage/staffAppAuthManage.js new file mode 100644 index 000000000..0438e5980 --- /dev/null +++ b/public/pages/property/staffAppAuthManage/staffAppAuthManage.js @@ -0,0 +1,54 @@ +/** + 入驻小区 +**/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + staffAppAuthManageInfo: { + staffName: '', + appType: '', + stateName: '', + auId: '', + openId: '', + } + }, + _initMethod: function () { + vc.component._listStaffAppAuths(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + vc.on('staffAppAuthManage', 'listStaffAppAuth', function (_param) { + vc.component._listStaffAppAuths(DEFAULT_PAGE, DEFAULT_ROWS); + }); + }, + methods: { + _listStaffAppAuths: function (_page, _rows) { + var param = { + params: { + page: 1, + row: 1 + } + }; + //发送get请求 + vc.http.apiGet('/staff/queryStaffAppAuth', + param, + function (json, res) { + let _staffAppAuthManageInfo = JSON.parse(json); + vc.copyObject(_staffAppAuthManageInfo.data, $that.staffAppAuthManageInfo); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _openAddStaffAppAuthModal: function () { + vc.emit('addStaffAppAuth', 'openAddStaffAppAuthModal', {}); + }, + _queryStaffAppAuthMethod: function () { + vc.component._listStaffAppAuths(DEFAULT_PAGE, DEFAULT_ROWS); + } + + + } + }); +})(window.vc);