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 @@
<% } %>
<!-- built files will be auto injected -->
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
</html>
......@@ -13,6 +13,7 @@
</div>
</template>
<script>
import { wxConfig } from '@/api'
export default {
name: 'App',
data () {
......@@ -34,7 +35,12 @@ export default {
return this.$store.state.app.showWindow
}
},
mounted () { },
mounted () {
wxConfig.init(['hideOptionMenu']).then(res => {
wx.hideOptionMenu()
})
},
methods: {}
}
......
......@@ -8,8 +8,10 @@
*/
import ssoApi from './ssoApi'
import reportApi from './reportApi'
import wxConfig from './wxConfig'
export {
ssoApi,
reportApi,
wxConfig,
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ module.exports = {
productionSourceMap: false, // 如果不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
devServer: {
disableHostCheck: true,
port: 8081, // 端口 dj-scrm-wx-work-lwk
port: 9527, // 端口 dj-scrm-wx-work-lwk
// port: 9528, // 端口 dj-scrm-wx-work-main-lwk
open: false, // 启动后打开浏览器.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!