1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| import { defineStore } from 'pinia'
| import { SET_KEFU } from '@/store/types.store'
| import { _customer } from '@/service/user.api';
|
|
|
| export const useHomesStore = defineStore('homes', {
| // state 持久化
| persist: true,
| state: () => ('homes', {
| kefu_url: ""
| }),
|
| actions: {
| async [SET_KEFU]() { //获取客服
| const data = await _customer().catch(err => Promise.reject(err))
|
| console.log("sdsdsds",data)
| this.kefu_url = data.customer_service_url
| },
| },
| })
|
|