flat: 暂存1
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
||||
loginByUsername,
|
||||
getUserInfo,
|
||||
logout,
|
||||
refreshToken
|
||||
refreshToken,
|
||||
mobileIsCms
|
||||
} from '@/api/user'
|
||||
import md5 from 'js-md5'
|
||||
import {
|
||||
@@ -64,35 +65,46 @@ const user = {
|
||||
seeEnterprise: getStore({ //用户发送短信次数
|
||||
name: 'enterprise'
|
||||
}) || 0, // 0 个体招工 ; 企业招工
|
||||
userLocation: null
|
||||
userLocation: null,
|
||||
userIsCms: false,
|
||||
},
|
||||
actions: {
|
||||
getMobileIsCms({
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
mobileIsCms().then((res) => {
|
||||
commit('setIsCms', {
|
||||
val: res.data.data
|
||||
})
|
||||
})
|
||||
},
|
||||
getUserLocation({
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
console.log('getUserLocation null1')
|
||||
commit('setLocation', {
|
||||
latitude: 31.133980,
|
||||
longitude: 104.404419,
|
||||
})
|
||||
// uni.getLocation({
|
||||
// type: 'gcj02',
|
||||
// success: function(res) {
|
||||
// const {
|
||||
// longitude,
|
||||
// latitude
|
||||
// } = res
|
||||
// commit('setLocation', {
|
||||
// longitude,
|
||||
// latitude
|
||||
// })
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// commit('setLocation', null)
|
||||
// },
|
||||
// complete: function(e) {}
|
||||
// commit('setLocation', {
|
||||
// latitude: 31.133980,
|
||||
// longitude: 104.404419,
|
||||
// })
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function(res) {
|
||||
const {
|
||||
longitude,
|
||||
latitude
|
||||
} = res
|
||||
commit('setLocation', {
|
||||
longitude,
|
||||
latitude
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
commit('setLocation', null)
|
||||
},
|
||||
complete: function(e) {}
|
||||
})
|
||||
},
|
||||
//用户点击radio按钮
|
||||
UserCheckedBtn({
|
||||
@@ -214,6 +226,9 @@ const user = {
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setIsCms(state, payload) {
|
||||
state.userIsCms = payload.val
|
||||
},
|
||||
setLocation(state, val) {
|
||||
state.userLocation = val
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user