|
|
@@ -2,7 +2,26 @@ import { createRouter, createWebHistory } from 'vue-router';
|
|
|
import store from '../store';
|
|
|
import { Page } from './Page';
|
|
|
import { Dialog } from 'vant';
|
|
|
+import http from '../plugins/http';
|
|
|
|
|
|
+console.log(http);
|
|
|
+function jsapiSign() {
|
|
|
+ http.http
|
|
|
+ .get('/wx/jsapiSign', { url: location.origin + location.pathname })
|
|
|
+ .then(res => {
|
|
|
+ res.debug = false;
|
|
|
+ res.jsApiList = [
|
|
|
+ 'chooseWXPay',
|
|
|
+ 'updateAppMessageShareData',
|
|
|
+ 'updateTimelineShareData',
|
|
|
+ 'hideAllNonBaseMenuItem',
|
|
|
+ 'scanQRCode'
|
|
|
+ ];
|
|
|
+ wx.config(res);
|
|
|
+ })
|
|
|
+ .catch(e => {});
|
|
|
+}
|
|
|
+jsapiSign();
|
|
|
const routes = [
|
|
|
{
|
|
|
path: '/',
|