From 2449bac38ab00bfc3bc3e01a5d1d5cee0ad0926a Mon Sep 17 00:00:00 2001 From: woniu <2557188530@qq.com> Date: Wed, 7 Oct 2020 15:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=8B=E6=9C=BA=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=AB=AF=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 48 ++++++++++++++------------------------------- app.js | 2 +- config.js | 4 ++-- pages/my/index.js | 10 ++++++++++ pages/my/index.wxml | 1 + 5 files changed, 29 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index ded503d..e7ae565 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,15 @@ # 招募开发者 -希望找一些志同道合的朋友一起来完善这个开源项目,持续更新下去,有兴趣的可以加入QQ群 ( 926321567 ) 联系管理员,期待您的加入! +希望找一些志同道合的朋友一起来完善这个开源项目,持续更新下去,有兴趣的可以联系管理员,期待您的加入! + +QQ群:926321567 # 荣誉墙 - [@woniudiancang 蜗牛小姐姐,本项目主导者、发起人](https://github.com/woniudiancang) - [@wangxy2020 Jack Wong](https://github.com/wangxy2020) +- 期待您的加入 # 功能展示 ## 首页 @@ -145,6 +148,17 @@ https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html [《餐饮口味/加料/配菜/口味选项解决方案》](https://www.it120.cc/help/eoee8a.html) + +## 小票打印机 + + + +[《api工厂小票机 / 不干胶标签机配置自动打印》](https://www.it120.cc/help/ggrun8.html) + +小票机是打印热敏小票,例如超市购物时候打印的小票;美团、饿了么外卖的打印小票; + +标签机是打印的不干胶的,例如奶茶店打印出来贴在杯子上面的; + # 常见问题 ## 无法登陆 / 无法获取 openid @@ -167,36 +181,4 @@ https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html - 小程序开发工具中,点击 “编译”按钮,重新编译小程序即可; -# 二次开发说明 - -## 如何弹出登陆授权框 - -- wxml 文件中增加: - - ```xml - - ``` - -- js 文件中增加: - - ```js - // 引入 auth - const AUTH = require('../../utils/auth') - // 弹出框 - AUTH.openLoginDialog() - // 处理授权登陆 - processLogin(e) { - if (!e.detail.userInfo) { - wx.showToast({ - title: '已取消', - icon: 'none', - }) - return; - } - AUTH.register(this); - } - ``` - - - diff --git a/app.js b/app.js index 911d379..7a5d6da 100644 --- a/app.js +++ b/app.js @@ -53,7 +53,7 @@ App({ wx.hideToast() } }) - WXAPI.queryConfigBatch('mallName,myBg,mapPos,order_hx_uids,subscribe_ids,share_profile,zxdz').then(res => { + WXAPI.queryConfigBatch('mallName,myBg,mapPos,order_hx_uids,subscribe_ids,share_profile,zxdz,admin_uids').then(res => { if (res.code == 0) { res.data.forEach(config => { wx.setStorageSync(config.key, config.value); diff --git a/config.js b/config.js index 740c14c..74bf280 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ module.exports = { - version: "2.11.0", - note: '增加在线排队取号功能', + version: "2.12.0", + note: '增加手机管理端入口', subDomain: "beeorder", // 根据教程 https://www.it120.cc/help/qr6l4m.html 查看并设置你自己的 subDomain } \ No newline at end of file diff --git a/pages/my/index.js b/pages/my/index.js index 4a3e0e1..da2445d 100644 --- a/pages/my/index.js +++ b/pages/my/index.js @@ -39,6 +39,10 @@ Page({ if (this.data.order_hx_uids && this.data.order_hx_uids.indexOf(res.data.base.id) != -1) { _data.canHX = true // 具有扫码核销的权限 } + const admin_uids = wx.getStorageSync('admin_uids') + if (admin_uids && admin_uids.indexOf(res.data.base.id) != -1) { + _data.isAdmin = true + } this.setData(_data) } }, @@ -101,4 +105,10 @@ Page({ url: '/pages/score/logs', }) }, + goadmin() { + wx.navigateToMiniProgram({ + appId: 'wx5e5b0066c8d3f33d', + path: 'pages/login/auto?token=' + wx.getStorageSync('token'), + }) + } }) \ No newline at end of file diff --git a/pages/my/index.wxml b/pages/my/index.wxml index 5f72705..5c7060f 100644 --- a/pages/my/index.wxml +++ b/pages/my/index.wxml @@ -40,5 +40,6 @@ + v{{version}} \ No newline at end of file