sunChengjie 11 months ago
parent
commit
17221f36bc
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/main.js
  2. 1 1
      src/pages/index.vue

+ 2 - 1
src/main.js

@@ -51,7 +51,8 @@ Vue.filter('dateFormat', (dataStr) => {
 })
 
 
-import { getWxOpenId } from './script/wxGetOpenId.js'
+// import { getWxOpenId } from './script/wxGetOpenId.js'
+export { getWxOpenId } from './script/wxGetOpenId.js'
 const whiteList = ['/Login']
 router.beforeEach((to, from, next) => {
     // if (to.matched.some(record => record.meta.needLogin)) { // 判断该路由是否需要登录权限

+ 1 - 1
src/pages/index.vue

@@ -40,7 +40,7 @@
 <script>
 import { Toast, Dialog } from 'vant'
 import { getWxUserInfo } from '../api/login'
-import { getWxOpenId } from '../script/wxGetOpenId'
+export { getWxOpenId } from '../script/wxGetOpenId'
 export default {
 	data() {
 		return {