Commit a14d6834 by 李伟康

feat(app): 集成微信企业号SDK配置功能

- 在vue.config.js中修改devServer端口为9527
- 在public/index.html中添加微信JSSDK脚本引用
- 在App.vue中引入wxConfig并初始化隐藏选项菜单
- 在api/index.js中导出新增的wxConfig模块
- 新增src/api/wxConfig.js实现微信企业号相关API功能,包括配置初始化、小程序短链生成、上下文获取、外部联系人操作、消息分享、群发、扫描、图片处理、地理位置等功能
1 parent 3ead68ce
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
<% } %> <% } %>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
</html> </html>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
</div> </div>
</template> </template>
<script> <script>
import { wxConfig } from '@/api'
export default { export default {
name: 'App', name: 'App',
data () { data () {
...@@ -34,7 +35,12 @@ export default { ...@@ -34,7 +35,12 @@ export default {
return this.$store.state.app.showWindow return this.$store.state.app.showWindow
} }
}, },
mounted () { }, mounted () {
wxConfig.init(['hideOptionMenu']).then(res => {
wx.hideOptionMenu()
})
},
methods: {} methods: {}
} }
......
...@@ -8,8 +8,10 @@ ...@@ -8,8 +8,10 @@
*/ */
import ssoApi from './ssoApi' import ssoApi from './ssoApi'
import reportApi from './reportApi' import reportApi from './reportApi'
import wxConfig from './wxConfig'
export { export {
ssoApi, ssoApi,
reportApi, reportApi,
wxConfig,
} }
\ No newline at end of file \ No newline at end of file
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
productionSourceMap: false, // 如果不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, // 如果不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
devServer: { devServer: {
disableHostCheck: true, disableHostCheck: true,
port: 8081, // 端口 dj-scrm-wx-work-lwk port: 9527, // 端口 dj-scrm-wx-work-lwk
// port: 9528, // 端口 dj-scrm-wx-work-main-lwk // port: 9528, // 端口 dj-scrm-wx-work-main-lwk
open: false, // 启动后打开浏览器. open: false, // 启动后打开浏览器.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!