@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import { getTicketFun } from '@/utils/TXApiFun';
+// 微信JSSDK实例
+const wx = Vue.prototype.wx;
+import { wxLogin } from '@/api/digest';
+
+export function WXdigest() {
+ getTicketFun(['getCurExternalContact'], 'agentConfig')
+ .then(() => {
+ // 获取用户code
+ getWeChatCode();
+ })
+ .catch((err) => {
+ debugger;
+ console.log(err);
+ });
+}
+function getWeChatCode() {
+ wx.invoke('getCurExternalContact', {}, (res) => {
+ if (res.err_msg === 'getCurExternalContact:ok') {
+ console.log(res);
+ } else {
+ }
@@ -46,6 +46,7 @@ import tabBar from '@/components/tabBar';
import ABtarget from './ABtarget.vue';
import { mapState } from 'vuex';
import bottomBtn from './bottomBtn.vue';
+import { WXdigest } from '@/utils/digest';
export default {
name: 'home',
components: { tabBar, hintTabPage, ABtarget, bottomBtn },
@@ -87,7 +88,9 @@ export default {
created() {
this.getDict();
},
- mounted() {},
+ mounted() {
+ WXdigest();
+ },
methods: {
onRefresh() {
this.getDict(true);