From 3d7b94b2230672838bc14f28c2b4fc10207a12f1 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 4 Jan 2023 09:30:47 +0800 Subject: [PATCH] 企业微信的优化 --- pages/test/test.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ pages/test/test.json | 1 + pages/test/test.wxml | 0 pages/test/test.wxss | 26 ++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 0 deletions(-) create mode 100644 pages/test/test.js create mode 100644 pages/test/test.json create mode 100644 pages/test/test.wxml create mode 100644 pages/test/test.wxss diff --git a/pages/test/test.js b/pages/test/test.js new file mode 100644 index 0000000..00bda79 --- /dev/null +++ b/pages/test/test.js @@ -0,0 +1,47 @@ +var ut = require("../../utils/util.js"); +var os=getApp().globalData.setting; +Page({ + data:{ + store:null, + imghots: os.imghost, + msg:"", + qyid:'wwc96c9375cd8d185a' + }, + + onLoad:function(t){ + wx.qy.login({ + success: function (res) { + //var qyid = that.data.qyid; + var req_data = { + js_code: res.code, + //qyid: qyid + }; + + + //调用接口获取userid + that.globalData.request.promiseGet('api/weshop/qywechat/getjscode2session', { + data: req_data + }).then(rs => { + if (rs.data.code == 0) { + + + wx.qy.getCurExternalChat ({ + success: function(res) { + var chatId = res.chatId //返回当前外部群的群聊ID + + console.log(chatId); + getApp().confirmBox(chatId+"---"); + + } + }) + + + } + }) + } + }) + }, + + + +}); diff --git a/pages/test/test.json b/pages/test/test.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/test/test.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pages/test/test.wxml b/pages/test/test.wxml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/test/test.wxml diff --git a/pages/test/test.wxss b/pages/test/test.wxss new file mode 100644 index 0000000..f09d0b3 --- /dev/null +++ b/pages/test/test.wxss @@ -0,0 +1,26 @@ +.all_page{ + position: fixed; + height: 100%; + width: 100%; + background: #fff; + justify-content: center;/*水平居中*/ +} +.all_page .content{ + font-size: 30rpx; + text-align: center; + height: 400px; + width: 100%; + position: absolute; + top: 50%; + margin-top:-200px; +} +.logo{width: 140rpx; height: 140rpx; border-radius:50% } +.all_page .content .title{ + font-size: 36rpx; margin: 20rpx 0 +} + +.all_page .err{ + color:red; + font-size: 36rpx; + margin-top: 300rpx; +} \ No newline at end of file -- libgit2 0.21.4