flat: 添加定位
This commit is contained in:
@@ -64,8 +64,36 @@ const user = {
|
||||
seeEnterprise: getStore({ //用户发送短信次数
|
||||
name: 'enterprise'
|
||||
}) || 0, // 0 个体招工 ; 企业招工
|
||||
userLocation: null
|
||||
},
|
||||
actions: {
|
||||
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) {}
|
||||
// })
|
||||
},
|
||||
//用户点击radio按钮
|
||||
UserCheckedBtn({
|
||||
commit
|
||||
@@ -186,6 +214,9 @@ const user = {
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setLocation(state, val) {
|
||||
state.userLocation = val
|
||||
},
|
||||
setEnterprise(state, val) { // 0 个体招工 ; 企业招工
|
||||
state.seeEnterprise = val;
|
||||
setStore({
|
||||
|
||||
Reference in New Issue
Block a user