wx.js 450 B

1234567891011121314151617181920212223
  1. export default {
  2. mounted() {
  3. this.getWxConfig()
  4. },
  5. data() {
  6. return {
  7. // 详情id
  8. detailID: this.$route.params.detail,
  9. }
  10. },
  11. methods: {
  12. /**
  13. * 获取微信配置
  14. */
  15. async getWxConfig() {
  16. let res = await this.$axios.$post(`/api/auth/get_wechat_js_api_conf`)
  17. this.$store.commit('updateWxConfig', {
  18. wxConfig: res.data || {}
  19. })
  20. if(this.configWx) this.configWx()
  21. }
  22. }
  23. }