|
|
@@ -41,6 +41,17 @@ axios.defaults.baseURL = baseUrl;
|
|
|
axios.post('/auth/loginGuest').then(res => {
|
|
|
if (res.data.success) {
|
|
|
axios.defaults.headers.common['token'] = res.data.data
|
|
|
+
|
|
|
+ if (store.state.serviceType.length == 0) {
|
|
|
+ axios.get('/serviceType/home').then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ store.commit('updateServiceType', res.data.data)
|
|
|
+ }
|
|
|
+ }).catch(e => {
|
|
|
+ console.log(e)
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
Vue.prototype.$http = {
|
|
|
@@ -164,6 +175,8 @@ Vue.prototype.$http = {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
Vue.prototype.getTime = function(str) {
|
|
|
if (str) {
|
|
|
return moment(str).format('YYYY-MM-DD HH:mm')
|