| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import Apis from '@/common/apis/index'
- const state = {
- currentPatient: null, // 当前查看患者
- }
- const mutations = {
- // 当前查看患者
- SET_CURRENT_PATIENT(state, data) {
- state.currentPatient = data
- },
- }
- const actions = {
- GetUserProfile({
- commit,
- dispatch,
- state
- }, params) {
- uni.showLoading({
- title:'',
- mask: true
- })
- setTimeout(() => {
- uni.hideLoading()
- }, 1000)
- uni.getUserProfile({
- lang: 'zh_CN',
- desc: '用于完善会员资料',
- success: res => {
- uni.hideLoading()
- uni.setStorageSync('userProfile', res.userInfo)
- uni.navigateTo({
- url: '/pages/login/index'
- })
- },
- fail: err => {
- uni.hideLoading()
- console.error('identify:error', err)
- }
- })
- }
- }
- const getters = {}
- export default {
- state,
- getters,
- actions,
- mutations
- }
|